xref: /freebsd/sys/contrib/device-tree/Bindings/net/dsa/microchip,ksz.yaml (revision 84943d6f38e936ac3b7a3947ca26eeb27a39f938)
15def4c47SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only
25def4c47SEmmanuel Vadot%YAML 1.2
35def4c47SEmmanuel Vadot---
45def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/net/dsa/microchip,ksz.yaml#
55def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
65def4c47SEmmanuel Vadot
75def4c47SEmmanuel Vadottitle: Microchip KSZ Series Ethernet switches
85def4c47SEmmanuel Vadot
95def4c47SEmmanuel Vadotmaintainers:
105def4c47SEmmanuel Vadot  - Marek Vasut <marex@denx.de>
115def4c47SEmmanuel Vadot  - Woojung Huh <Woojung.Huh@microchip.com>
125def4c47SEmmanuel Vadot
135def4c47SEmmanuel VadotallOf:
14cb7aa33aSEmmanuel Vadot  - $ref: dsa.yaml#/$defs/ethernet-ports
15d5b0e70fSEmmanuel Vadot  - $ref: /schemas/spi/spi-peripheral-props.yaml#
165def4c47SEmmanuel Vadot
175def4c47SEmmanuel Vadotproperties:
185def4c47SEmmanuel Vadot  # See Documentation/devicetree/bindings/net/dsa/dsa.yaml for a list of additional
195def4c47SEmmanuel Vadot  # required and optional properties.
205def4c47SEmmanuel Vadot  compatible:
215def4c47SEmmanuel Vadot    enum:
225def4c47SEmmanuel Vadot      - microchip,ksz8765
235def4c47SEmmanuel Vadot      - microchip,ksz8794
245def4c47SEmmanuel Vadot      - microchip,ksz8795
252eb4d8dcSEmmanuel Vadot      - microchip,ksz8863
262eb4d8dcSEmmanuel Vadot      - microchip,ksz8873
275def4c47SEmmanuel Vadot      - microchip,ksz9477
285def4c47SEmmanuel Vadot      - microchip,ksz9897
295def4c47SEmmanuel Vadot      - microchip,ksz9896
305def4c47SEmmanuel Vadot      - microchip,ksz9567
315def4c47SEmmanuel Vadot      - microchip,ksz8565
325def4c47SEmmanuel Vadot      - microchip,ksz9893
335def4c47SEmmanuel Vadot      - microchip,ksz9563
345def4c47SEmmanuel Vadot      - microchip,ksz8563
355def4c47SEmmanuel Vadot
365def4c47SEmmanuel Vadot  reset-gpios:
375def4c47SEmmanuel Vadot    description:
385def4c47SEmmanuel Vadot      Should be a gpio specifier for a reset line.
395def4c47SEmmanuel Vadot    maxItems: 1
405def4c47SEmmanuel Vadot
41*84943d6fSEmmanuel Vadot  wakeup-source: true
42*84943d6fSEmmanuel Vadot
435def4c47SEmmanuel Vadot  microchip,synclko-125:
445def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
455def4c47SEmmanuel Vadot    description:
465def4c47SEmmanuel Vadot      Set if the output SYNCLKO frequency should be set to 125MHz instead of 25MHz.
475def4c47SEmmanuel Vadot
48c9ccf3a3SEmmanuel Vadot  microchip,synclko-disable:
49c9ccf3a3SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
50c9ccf3a3SEmmanuel Vadot    description:
51c9ccf3a3SEmmanuel Vadot      Set if the output SYNCLKO clock should be disabled. Do not mix with
52c9ccf3a3SEmmanuel Vadot      microchip,synclko-125.
53c9ccf3a3SEmmanuel Vadot
54*84943d6fSEmmanuel Vadot  microchip,io-drive-strength-microamp:
55*84943d6fSEmmanuel Vadot    description:
56*84943d6fSEmmanuel Vadot      IO Pad Drive Strength
57*84943d6fSEmmanuel Vadot    enum: [8000, 16000]
58*84943d6fSEmmanuel Vadot    default: 16000
59*84943d6fSEmmanuel Vadot
60*84943d6fSEmmanuel Vadot  microchip,hi-drive-strength-microamp:
61*84943d6fSEmmanuel Vadot    description:
62*84943d6fSEmmanuel Vadot      High Speed Drive Strength. Controls drive strength of GMII / RGMII /
63*84943d6fSEmmanuel Vadot      MII / RMII (except TX_CLK/REFCLKI, COL and CRS) and CLKO_25_125 lines.
64*84943d6fSEmmanuel Vadot    enum: [2000, 4000, 8000, 12000, 16000, 20000, 24000, 28000]
65*84943d6fSEmmanuel Vadot    default: 24000
66*84943d6fSEmmanuel Vadot
67*84943d6fSEmmanuel Vadot  microchip,lo-drive-strength-microamp:
68*84943d6fSEmmanuel Vadot    description:
69*84943d6fSEmmanuel Vadot      Low Speed Drive Strength. Controls drive strength of TX_CLK / REFCLKI,
70*84943d6fSEmmanuel Vadot      COL, CRS, LEDs, PME_N, NTRP_N, SDO and SDI/SDA/MDIO lines.
71*84943d6fSEmmanuel Vadot    enum: [2000, 4000, 8000, 12000, 16000, 20000, 24000, 28000]
72*84943d6fSEmmanuel Vadot    default: 8000
73*84943d6fSEmmanuel Vadot
74aa1a8ff2SEmmanuel Vadot  interrupts:
75aa1a8ff2SEmmanuel Vadot    maxItems: 1
76aa1a8ff2SEmmanuel Vadot
775def4c47SEmmanuel Vadotrequired:
785def4c47SEmmanuel Vadot  - compatible
795def4c47SEmmanuel Vadot  - reg
805def4c47SEmmanuel Vadot
815def4c47SEmmanuel VadotunevaluatedProperties: false
825def4c47SEmmanuel Vadot
835def4c47SEmmanuel Vadotexamples:
845def4c47SEmmanuel Vadot  - |
855def4c47SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
865def4c47SEmmanuel Vadot
875def4c47SEmmanuel Vadot    // Ethernet switch connected via SPI to the host, CPU port wired to eth0:
885def4c47SEmmanuel Vadot    eth0 {
895def4c47SEmmanuel Vadot        fixed-link {
905def4c47SEmmanuel Vadot            speed = <1000>;
915def4c47SEmmanuel Vadot            full-duplex;
925def4c47SEmmanuel Vadot        };
935def4c47SEmmanuel Vadot    };
945def4c47SEmmanuel Vadot
95fac71e4eSEmmanuel Vadot    spi {
965def4c47SEmmanuel Vadot        #address-cells = <1>;
975def4c47SEmmanuel Vadot        #size-cells = <0>;
985def4c47SEmmanuel Vadot
995def4c47SEmmanuel Vadot        pinctrl-0 = <&pinctrl_spi_ksz>;
1005def4c47SEmmanuel Vadot        cs-gpios = <&pioC 25 0>;
1015def4c47SEmmanuel Vadot        id = <1>;
1025def4c47SEmmanuel Vadot
1035def4c47SEmmanuel Vadot        ksz9477: switch@0 {
1045def4c47SEmmanuel Vadot            compatible = "microchip,ksz9477";
1055def4c47SEmmanuel Vadot            reg = <0>;
1065def4c47SEmmanuel Vadot            reset-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
1075def4c47SEmmanuel Vadot
1085def4c47SEmmanuel Vadot            spi-max-frequency = <44000000>;
1095def4c47SEmmanuel Vadot
1105def4c47SEmmanuel Vadot            ethernet-ports {
1115def4c47SEmmanuel Vadot                #address-cells = <1>;
1125def4c47SEmmanuel Vadot                #size-cells = <0>;
1135def4c47SEmmanuel Vadot                port@0 {
1145def4c47SEmmanuel Vadot                    reg = <0>;
1155def4c47SEmmanuel Vadot                    label = "lan1";
1165def4c47SEmmanuel Vadot                };
1175def4c47SEmmanuel Vadot                port@1 {
1185def4c47SEmmanuel Vadot                    reg = <1>;
1195def4c47SEmmanuel Vadot                    label = "lan2";
1205def4c47SEmmanuel Vadot                };
1215def4c47SEmmanuel Vadot                port@2 {
1225def4c47SEmmanuel Vadot                    reg = <2>;
1235def4c47SEmmanuel Vadot                    label = "lan3";
1245def4c47SEmmanuel Vadot                };
1255def4c47SEmmanuel Vadot                port@3 {
1265def4c47SEmmanuel Vadot                    reg = <3>;
1275def4c47SEmmanuel Vadot                    label = "lan4";
1285def4c47SEmmanuel Vadot                };
1295def4c47SEmmanuel Vadot                port@4 {
1305def4c47SEmmanuel Vadot                    reg = <4>;
1315def4c47SEmmanuel Vadot                    label = "lan5";
1325def4c47SEmmanuel Vadot                };
1335def4c47SEmmanuel Vadot                port@5 {
1345def4c47SEmmanuel Vadot                    reg = <5>;
1355def4c47SEmmanuel Vadot                    ethernet = <&eth0>;
1367ef62cebSEmmanuel Vadot                    phy-mode = "rgmii";
1377ef62cebSEmmanuel Vadot
1385def4c47SEmmanuel Vadot                    fixed-link {
1395def4c47SEmmanuel Vadot                        speed = <1000>;
1405def4c47SEmmanuel Vadot                        full-duplex;
1415def4c47SEmmanuel Vadot                    };
1425def4c47SEmmanuel Vadot                };
1435def4c47SEmmanuel Vadot            };
1445def4c47SEmmanuel Vadot        };
1455def4c47SEmmanuel Vadot
1465def4c47SEmmanuel Vadot        ksz8565: switch@1 {
1475def4c47SEmmanuel Vadot            compatible = "microchip,ksz8565";
1485def4c47SEmmanuel Vadot            reg = <1>;
1495def4c47SEmmanuel Vadot
1505def4c47SEmmanuel Vadot            spi-max-frequency = <44000000>;
1515def4c47SEmmanuel Vadot
1525def4c47SEmmanuel Vadot            ethernet-ports {
1535def4c47SEmmanuel Vadot                #address-cells = <1>;
1545def4c47SEmmanuel Vadot                #size-cells = <0>;
1555def4c47SEmmanuel Vadot                port@0 {
1565def4c47SEmmanuel Vadot                    reg = <0>;
1575def4c47SEmmanuel Vadot                    label = "lan1";
1585def4c47SEmmanuel Vadot                };
1595def4c47SEmmanuel Vadot                port@1 {
1605def4c47SEmmanuel Vadot                    reg = <1>;
1615def4c47SEmmanuel Vadot                    label = "lan2";
1625def4c47SEmmanuel Vadot                };
1635def4c47SEmmanuel Vadot                port@2 {
1645def4c47SEmmanuel Vadot                    reg = <2>;
1655def4c47SEmmanuel Vadot                    label = "lan3";
1665def4c47SEmmanuel Vadot                };
1675def4c47SEmmanuel Vadot                port@3 {
1685def4c47SEmmanuel Vadot                    reg = <3>;
1695def4c47SEmmanuel Vadot                    label = "lan4";
1705def4c47SEmmanuel Vadot                };
1715def4c47SEmmanuel Vadot                port@6 {
1725def4c47SEmmanuel Vadot                    reg = <6>;
1735def4c47SEmmanuel Vadot                    ethernet = <&eth0>;
1747ef62cebSEmmanuel Vadot                    phy-mode = "rgmii";
1757ef62cebSEmmanuel Vadot
1765def4c47SEmmanuel Vadot                    fixed-link {
1775def4c47SEmmanuel Vadot                        speed = <1000>;
1785def4c47SEmmanuel Vadot                        full-duplex;
1795def4c47SEmmanuel Vadot                    };
1805def4c47SEmmanuel Vadot                };
1815def4c47SEmmanuel Vadot            };
1825def4c47SEmmanuel Vadot        };
1835def4c47SEmmanuel Vadot    };
1845def4c47SEmmanuel Vadot...
185