mdio-mux-mmioreg.txt 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. Properties for an MDIO bus multiplexer controlled by a memory-mapped device
  2. This is a special case of a MDIO bus multiplexer. A memory-mapped device,
  3. like an FPGA, is used to control which child bus is connected. The mdio-mux
  4. node must be a child of the memory-mapped device. The driver currently only
  5. supports devices with eight-bit registers.
  6. Required properties in addition to the generic multiplexer properties:
  7. - compatible : string, must contain "mdio-mux-mmioreg"
  8. - reg : integer, contains the offset of the register that controls the bus
  9. multiplexer. The size field in the 'reg' property is the size of
  10. register, and must therefore be 1.
  11. - mux-mask : integer, contains an eight-bit mask that specifies which
  12. bits in the register control the actual bus multiplexer. The
  13. 'reg' property of each child mdio-mux node must be constrained by
  14. this mask.
  15. Example:
  16. The FPGA node defines a memory-mapped FPGA with a register space of 0x30 bytes.
  17. For the "EMI2" MDIO bus, register 9 (BRDCFG1) controls the mux on that bus.
  18. A bitmask of 0x6 means that bits 1 and 2 (bit 0 is lsb) are the bits on
  19. BRDCFG1 that control the actual mux.
  20. /* The FPGA node */
  21. fpga: board-control@3,0 {
  22. #address-cells = <1>;
  23. #size-cells = <1>;
  24. compatible = "fsl,p5020ds-fpga", "fsl,fpga-ngpixis";
  25. reg = <3 0 0x30>;
  26. ranges = <0 3 0 0x30>;
  27. mdio-mux-emi2 {
  28. compatible = "mdio-mux-mmioreg", "mdio-mux";
  29. mdio-parent-bus = <&xmdio0>;
  30. #address-cells = <1>;
  31. #size-cells = <0>;
  32. reg = <9 1>; // BRDCFG1
  33. mux-mask = <0x6>; // EMI2
  34. emi2_slot1: mdio@0 { // Slot 1 XAUI (FM2)
  35. reg = <0>;
  36. #address-cells = <1>;
  37. #size-cells = <0>;
  38. phy_xgmii_slot1: ethernet-phy@0 {
  39. compatible = "ethernet-phy-ieee802.3-c45";
  40. reg = <4>;
  41. };
  42. };
  43. emi2_slot2: mdio@2 { // Slot 2 XAUI (FM1)
  44. reg = <2>;
  45. #address-cells = <1>;
  46. #size-cells = <0>;
  47. phy_xgmii_slot2: ethernet-phy@4 {
  48. compatible = "ethernet-phy-ieee802.3-c45";
  49. reg = <0>;
  50. };
  51. };
  52. };
  53. };
  54. /* The parent MDIO bus. */
  55. xmdio0: mdio@f1000 {
  56. #address-cells = <1>;
  57. #size-cells = <0>;
  58. compatible = "fsl,fman-xmdio";
  59. reg = <0xf1000 0x1000>;
  60. interrupts = <100 1 0 0>;
  61. };