xref: /freebsd/sys/contrib/device-tree/Bindings/net/dsa/microchip,ksz.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
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
415def4c47SEmmanuel Vadot  microchip,synclko-125:
425def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
435def4c47SEmmanuel Vadot    description:
445def4c47SEmmanuel Vadot      Set if the output SYNCLKO frequency should be set to 125MHz instead of 25MHz.
455def4c47SEmmanuel Vadot
46c9ccf3a3SEmmanuel Vadot  microchip,synclko-disable:
47c9ccf3a3SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
48c9ccf3a3SEmmanuel Vadot    description:
49c9ccf3a3SEmmanuel Vadot      Set if the output SYNCLKO clock should be disabled. Do not mix with
50c9ccf3a3SEmmanuel Vadot      microchip,synclko-125.
51c9ccf3a3SEmmanuel Vadot
525def4c47SEmmanuel Vadotrequired:
535def4c47SEmmanuel Vadot  - compatible
545def4c47SEmmanuel Vadot  - reg
555def4c47SEmmanuel Vadot
565def4c47SEmmanuel VadotunevaluatedProperties: false
575def4c47SEmmanuel Vadot
585def4c47SEmmanuel Vadotexamples:
595def4c47SEmmanuel Vadot  - |
605def4c47SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
615def4c47SEmmanuel Vadot
625def4c47SEmmanuel Vadot    // Ethernet switch connected via SPI to the host, CPU port wired to eth0:
635def4c47SEmmanuel Vadot    eth0 {
645def4c47SEmmanuel Vadot        fixed-link {
655def4c47SEmmanuel Vadot            speed = <1000>;
665def4c47SEmmanuel Vadot            full-duplex;
675def4c47SEmmanuel Vadot        };
685def4c47SEmmanuel Vadot    };
695def4c47SEmmanuel Vadot
70*fac71e4eSEmmanuel Vadot    spi {
715def4c47SEmmanuel Vadot        #address-cells = <1>;
725def4c47SEmmanuel Vadot        #size-cells = <0>;
735def4c47SEmmanuel Vadot
745def4c47SEmmanuel Vadot        pinctrl-0 = <&pinctrl_spi_ksz>;
755def4c47SEmmanuel Vadot        cs-gpios = <&pioC 25 0>;
765def4c47SEmmanuel Vadot        id = <1>;
775def4c47SEmmanuel Vadot
785def4c47SEmmanuel Vadot        ksz9477: switch@0 {
795def4c47SEmmanuel Vadot            compatible = "microchip,ksz9477";
805def4c47SEmmanuel Vadot            reg = <0>;
815def4c47SEmmanuel Vadot            reset-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
825def4c47SEmmanuel Vadot
835def4c47SEmmanuel Vadot            spi-max-frequency = <44000000>;
845def4c47SEmmanuel Vadot
855def4c47SEmmanuel Vadot            ethernet-ports {
865def4c47SEmmanuel Vadot                #address-cells = <1>;
875def4c47SEmmanuel Vadot                #size-cells = <0>;
885def4c47SEmmanuel Vadot                port@0 {
895def4c47SEmmanuel Vadot                    reg = <0>;
905def4c47SEmmanuel Vadot                    label = "lan1";
915def4c47SEmmanuel Vadot                };
925def4c47SEmmanuel Vadot                port@1 {
935def4c47SEmmanuel Vadot                    reg = <1>;
945def4c47SEmmanuel Vadot                    label = "lan2";
955def4c47SEmmanuel Vadot                };
965def4c47SEmmanuel Vadot                port@2 {
975def4c47SEmmanuel Vadot                    reg = <2>;
985def4c47SEmmanuel Vadot                    label = "lan3";
995def4c47SEmmanuel Vadot                };
1005def4c47SEmmanuel Vadot                port@3 {
1015def4c47SEmmanuel Vadot                    reg = <3>;
1025def4c47SEmmanuel Vadot                    label = "lan4";
1035def4c47SEmmanuel Vadot                };
1045def4c47SEmmanuel Vadot                port@4 {
1055def4c47SEmmanuel Vadot                    reg = <4>;
1065def4c47SEmmanuel Vadot                    label = "lan5";
1075def4c47SEmmanuel Vadot                };
1085def4c47SEmmanuel Vadot                port@5 {
1095def4c47SEmmanuel Vadot                    reg = <5>;
1105def4c47SEmmanuel Vadot                    ethernet = <&eth0>;
1117ef62cebSEmmanuel Vadot                    phy-mode = "rgmii";
1127ef62cebSEmmanuel Vadot
1135def4c47SEmmanuel Vadot                    fixed-link {
1145def4c47SEmmanuel Vadot                        speed = <1000>;
1155def4c47SEmmanuel Vadot                        full-duplex;
1165def4c47SEmmanuel Vadot                    };
1175def4c47SEmmanuel Vadot                };
1185def4c47SEmmanuel Vadot            };
1195def4c47SEmmanuel Vadot        };
1205def4c47SEmmanuel Vadot
1215def4c47SEmmanuel Vadot        ksz8565: switch@1 {
1225def4c47SEmmanuel Vadot            compatible = "microchip,ksz8565";
1235def4c47SEmmanuel Vadot            reg = <1>;
1245def4c47SEmmanuel Vadot
1255def4c47SEmmanuel Vadot            spi-max-frequency = <44000000>;
1265def4c47SEmmanuel Vadot
1275def4c47SEmmanuel Vadot            ethernet-ports {
1285def4c47SEmmanuel Vadot                #address-cells = <1>;
1295def4c47SEmmanuel Vadot                #size-cells = <0>;
1305def4c47SEmmanuel Vadot                port@0 {
1315def4c47SEmmanuel Vadot                    reg = <0>;
1325def4c47SEmmanuel Vadot                    label = "lan1";
1335def4c47SEmmanuel Vadot                };
1345def4c47SEmmanuel Vadot                port@1 {
1355def4c47SEmmanuel Vadot                    reg = <1>;
1365def4c47SEmmanuel Vadot                    label = "lan2";
1375def4c47SEmmanuel Vadot                };
1385def4c47SEmmanuel Vadot                port@2 {
1395def4c47SEmmanuel Vadot                    reg = <2>;
1405def4c47SEmmanuel Vadot                    label = "lan3";
1415def4c47SEmmanuel Vadot                };
1425def4c47SEmmanuel Vadot                port@3 {
1435def4c47SEmmanuel Vadot                    reg = <3>;
1445def4c47SEmmanuel Vadot                    label = "lan4";
1455def4c47SEmmanuel Vadot                };
1465def4c47SEmmanuel Vadot                port@6 {
1475def4c47SEmmanuel Vadot                    reg = <6>;
1485def4c47SEmmanuel Vadot                    ethernet = <&eth0>;
1497ef62cebSEmmanuel Vadot                    phy-mode = "rgmii";
1507ef62cebSEmmanuel Vadot
1515def4c47SEmmanuel Vadot                    fixed-link {
1525def4c47SEmmanuel Vadot                        speed = <1000>;
1535def4c47SEmmanuel Vadot                        full-duplex;
1545def4c47SEmmanuel Vadot                    };
1555def4c47SEmmanuel Vadot                };
1565def4c47SEmmanuel Vadot            };
1575def4c47SEmmanuel Vadot        };
1585def4c47SEmmanuel Vadot    };
1595def4c47SEmmanuel Vadot...
160