bcsr.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright 2007 Freescale Semiconductor.
  4. */
  5. #ifndef __BCSR_H_
  6. #define __BCSR_H_
  7. #include <common.h>
  8. /* BCSR Bit definitions
  9. * BCSR 0 *
  10. 0:3 ccb sys pll
  11. 4:6 cfg core pll
  12. 7 cfg boot seq
  13. * BCSR 1 *
  14. 0:2 cfg rom lock
  15. 3:5 cfg host agent
  16. 6 PCI IO
  17. 7 cfg RIO size
  18. * BCSR 2 *
  19. 0:4 QE PLL
  20. 5 QE clock
  21. 6 cfg PCI arbiter
  22. * BCSR 3 *
  23. 0 TSEC1 reduce
  24. 1 TSEC2 reduce
  25. 2:3 TSEC1 protocol
  26. 4:5 TSEC2 protocol
  27. 6 PHY1 slave
  28. 7 PHY2 slave
  29. * BCSR 4 *
  30. 4 clock enable
  31. 5 boot EPROM
  32. 6 GETH transactive reset
  33. 7 BRD write potect
  34. * BCSR 5 *
  35. 1:3 Leds 1-3
  36. 4 UPC1 enable
  37. 5 UPC2 enable
  38. 6 UPC2 pos
  39. 7 RS232 enable
  40. * BCSR 6 *
  41. 0 CFG ver 0
  42. 1 CFG ver 1
  43. 6 Register config led
  44. 7 Power on reset
  45. * BCSR 7 *
  46. 2 board host mode indication
  47. 5 enable TSEC1 PHY
  48. 6 enable TSEC2 PHY
  49. * BCSR 8 *
  50. 0 UCC GETH1 enable
  51. 1 UCC GMII enable
  52. 3 UCC TBI enable
  53. 5 UCC MII enable
  54. 7 Real time clock reset
  55. * BCSR 9 *
  56. 0 UCC2 GETH enable
  57. 1 UCC2 GMII enable
  58. 3 UCC2 TBI enable
  59. 5 UCC2 MII enable
  60. 6 Ready only - indicate flash ready after burning
  61. 7 Flash write protect
  62. */
  63. #define BCSR_UCC1_GETH_EN (0x1 << 7)
  64. #define BCSR_UCC2_GETH_EN (0x1 << 7)
  65. #define BCSR_UCC1_MODE_MSK (0x3 << 4)
  66. #define BCSR_UCC2_MODE_MSK (0x3 << 0)
  67. /*BCSR Utils functions*/
  68. void enable_8568mds_duart(void);
  69. void enable_8568mds_flash_write(void);
  70. void disable_8568mds_flash_write(void);
  71. void enable_8568mds_qe_mdio(void);
  72. #if defined(CONFIG_UEC_ETH1) || defined(CONFIG_UEC_ETH2)
  73. void reset_8568mds_uccs(void);
  74. #endif
  75. #endif /* __BCSR_H_ */