bcsr.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Copyright (C) 2011 Freescale Semiconductor, Inc.
  3. *
  4. * Authors: Chunhe Lan <b25806@freescale.com>
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License as published by the Free
  8. * Software Foundation; either version 2 of the License, or (at your option)
  9. * any later version.
  10. *
  11. */
  12. #ifndef __BCSR_H_
  13. #define __BCSR_H_
  14. #include <common.h>
  15. /*
  16. * BCSR Bit definitions
  17. * BCSR 15 *
  18. 0 device insertion oriention
  19. 1 stack processor present
  20. 2 power supply shut down/normal operation
  21. 3 I2C bus0 drive enable
  22. 4 reserved
  23. 5:7 I2C bus0 select
  24. 5 - I2C_BUS_0_SS0
  25. 6 - I2C_BUS_0_SS1
  26. 7 - I2C_BUS_0_SS2
  27. */
  28. /* BCSR register base address is 0xFX000020 */
  29. #define BCSR_BASE_REG_OFFSET 0x20
  30. #define BCSR_ACCESS_REG_ADDR (CONFIG_SYS_BCSR_BASE + BCSR_BASE_REG_OFFSET)
  31. #define BCSR15_DEV_INS_ORI 0x80
  32. #define BCSR15_STACK_PRO_PRE 0x40
  33. #define BCSR15_POWER_SUPPLY 0x20
  34. #define BCSR15_I2C_BUS0_EN 0x10
  35. #define BCSR15_I2C_BUS0_SEG0 0x00
  36. #define BCSR15_I2C_BUS0_SEG1 0x04
  37. #define BCSR15_I2C_BUS0_SEG2 0x02
  38. #define BCSR15_I2C_BUS0_SEG3 0x06
  39. #define BCSR15_I2C_BUS0_SEG4 0x01
  40. #define BCSR15_I2C_BUS0_SEG5 0x05
  41. #define BCSR15_I2C_BUS0_SEG6 0x03
  42. #define BCSR15_I2C_BUS0_SEG7 0x07
  43. #define BCSR15_I2C_BUS0_SEG_CLR 0x07
  44. #define BCSR19_SGMII_SEL_L 0x01
  45. /*BCSR Utils functions*/
  46. void fixup_i2c_bus0_sel_seg0(void);
  47. #endif /* __BCSR_H_ */