lan9303.txt 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. SMSC/MicroChip LAN9303 three port ethernet switch
  2. -------------------------------------------------
  3. Required properties:
  4. - compatible: should be
  5. - "smsc,lan9303-i2c" for I2C managed mode
  6. or
  7. - "smsc,lan9303-mdio" for mdio managed mode
  8. Optional properties:
  9. - reset-gpios: GPIO to be used to reset the whole device
  10. - reset-duration: reset duration in milliseconds, defaults to 200 ms
  11. Subnodes:
  12. The integrated switch subnode should be specified according to the binding
  13. described in dsa/dsa.txt. The CPU port of this switch is always port 0.
  14. Note: always use 'reg = <0/1/2>;' for the three DSA ports, even if the device is
  15. configured to use 1/2/3 instead. This hardware configuration will be
  16. auto-detected and mapped accordingly.
  17. Example:
  18. I2C managed mode:
  19. master: masterdevice@X {
  20. fixed-link { /* RMII fixed link to LAN9303 */
  21. speed = <100>;
  22. full-duplex;
  23. };
  24. };
  25. switch: switch@a {
  26. compatible = "smsc,lan9303-i2c";
  27. reg = <0xa>;
  28. reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
  29. reset-duration = <200>;
  30. ports {
  31. #address-cells = <1>;
  32. #size-cells = <0>;
  33. port@0 { /* RMII fixed link to master */
  34. reg = <0>;
  35. ethernet = <&master>;
  36. };
  37. port@1 { /* external port 1 */
  38. reg = <1>;
  39. label = "lan1";
  40. };
  41. port@2 { /* external port 2 */
  42. reg = <2>;
  43. label = "lan2";
  44. };
  45. };
  46. };
  47. MDIO managed mode:
  48. master: masterdevice@X {
  49. phy-handle = <&switch>;
  50. mdio {
  51. #address-cells = <1>;
  52. #size-cells = <0>;
  53. switch: switch-phy@0 {
  54. compatible = "smsc,lan9303-mdio";
  55. reg = <0>;
  56. reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
  57. reset-duration = <100>;
  58. ports {
  59. #address-cells = <1>;
  60. #size-cells = <0>;
  61. port@0 {
  62. reg = <0>;
  63. ethernet = <&master>;
  64. };
  65. port@1 { /* external port 1 */
  66. reg = <1>;
  67. label = "lan1";
  68. };
  69. port@2 { /* external port 2 */
  70. reg = <2>;
  71. label = "lan2";
  72. };
  73. };
  74. };
  75. };
  76. };