bcsr.h 1.5 KB

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