xref: /freebsd/sys/contrib/device-tree/Bindings/net/dsa/microchip,ksz.yaml (revision c9ccf3a32da427475985b85d7df023ccfb138c27)
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:
145def4c47SEmmanuel Vadot  - $ref: dsa.yaml#
155def4c47SEmmanuel Vadot
165def4c47SEmmanuel Vadotproperties:
175def4c47SEmmanuel Vadot  # See Documentation/devicetree/bindings/net/dsa/dsa.yaml for a list of additional
185def4c47SEmmanuel Vadot  # required and optional properties.
195def4c47SEmmanuel Vadot  compatible:
205def4c47SEmmanuel Vadot    enum:
215def4c47SEmmanuel Vadot      - microchip,ksz8765
225def4c47SEmmanuel Vadot      - microchip,ksz8794
235def4c47SEmmanuel Vadot      - microchip,ksz8795
242eb4d8dcSEmmanuel Vadot      - microchip,ksz8863
252eb4d8dcSEmmanuel Vadot      - microchip,ksz8873
265def4c47SEmmanuel Vadot      - microchip,ksz9477
275def4c47SEmmanuel Vadot      - microchip,ksz9897
285def4c47SEmmanuel Vadot      - microchip,ksz9896
295def4c47SEmmanuel Vadot      - microchip,ksz9567
305def4c47SEmmanuel Vadot      - microchip,ksz8565
315def4c47SEmmanuel Vadot      - microchip,ksz9893
325def4c47SEmmanuel Vadot      - microchip,ksz9563
335def4c47SEmmanuel Vadot      - microchip,ksz8563
345def4c47SEmmanuel Vadot
355def4c47SEmmanuel Vadot  reset-gpios:
365def4c47SEmmanuel Vadot    description:
375def4c47SEmmanuel Vadot      Should be a gpio specifier for a reset line.
385def4c47SEmmanuel Vadot    maxItems: 1
395def4c47SEmmanuel Vadot
405def4c47SEmmanuel Vadot  microchip,synclko-125:
415def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
425def4c47SEmmanuel Vadot    description:
435def4c47SEmmanuel Vadot      Set if the output SYNCLKO frequency should be set to 125MHz instead of 25MHz.
445def4c47SEmmanuel Vadot
45*c9ccf3a3SEmmanuel Vadot  microchip,synclko-disable:
46*c9ccf3a3SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
47*c9ccf3a3SEmmanuel Vadot    description:
48*c9ccf3a3SEmmanuel Vadot      Set if the output SYNCLKO clock should be disabled. Do not mix with
49*c9ccf3a3SEmmanuel Vadot      microchip,synclko-125.
50*c9ccf3a3SEmmanuel Vadot
515def4c47SEmmanuel Vadotrequired:
525def4c47SEmmanuel Vadot  - compatible
535def4c47SEmmanuel Vadot  - reg
545def4c47SEmmanuel Vadot
555def4c47SEmmanuel VadotunevaluatedProperties: false
565def4c47SEmmanuel Vadot
575def4c47SEmmanuel Vadotexamples:
585def4c47SEmmanuel Vadot  - |
595def4c47SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
605def4c47SEmmanuel Vadot
615def4c47SEmmanuel Vadot    // Ethernet switch connected via SPI to the host, CPU port wired to eth0:
625def4c47SEmmanuel Vadot    eth0 {
635def4c47SEmmanuel Vadot        fixed-link {
645def4c47SEmmanuel Vadot            speed = <1000>;
655def4c47SEmmanuel Vadot            full-duplex;
665def4c47SEmmanuel Vadot        };
675def4c47SEmmanuel Vadot    };
685def4c47SEmmanuel Vadot
695def4c47SEmmanuel Vadot    spi0 {
705def4c47SEmmanuel Vadot        #address-cells = <1>;
715def4c47SEmmanuel Vadot        #size-cells = <0>;
725def4c47SEmmanuel Vadot
735def4c47SEmmanuel Vadot        pinctrl-0 = <&pinctrl_spi_ksz>;
745def4c47SEmmanuel Vadot        cs-gpios = <&pioC 25 0>;
755def4c47SEmmanuel Vadot        id = <1>;
765def4c47SEmmanuel Vadot
775def4c47SEmmanuel Vadot        ksz9477: switch@0 {
785def4c47SEmmanuel Vadot            compatible = "microchip,ksz9477";
795def4c47SEmmanuel Vadot            reg = <0>;
805def4c47SEmmanuel Vadot            reset-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
815def4c47SEmmanuel Vadot
825def4c47SEmmanuel Vadot            spi-max-frequency = <44000000>;
835def4c47SEmmanuel Vadot
845def4c47SEmmanuel Vadot            ethernet-ports {
855def4c47SEmmanuel Vadot                #address-cells = <1>;
865def4c47SEmmanuel Vadot                #size-cells = <0>;
875def4c47SEmmanuel Vadot                port@0 {
885def4c47SEmmanuel Vadot                    reg = <0>;
895def4c47SEmmanuel Vadot                    label = "lan1";
905def4c47SEmmanuel Vadot                };
915def4c47SEmmanuel Vadot                port@1 {
925def4c47SEmmanuel Vadot                    reg = <1>;
935def4c47SEmmanuel Vadot                    label = "lan2";
945def4c47SEmmanuel Vadot                };
955def4c47SEmmanuel Vadot                port@2 {
965def4c47SEmmanuel Vadot                    reg = <2>;
975def4c47SEmmanuel Vadot                    label = "lan3";
985def4c47SEmmanuel Vadot                };
995def4c47SEmmanuel Vadot                port@3 {
1005def4c47SEmmanuel Vadot                    reg = <3>;
1015def4c47SEmmanuel Vadot                    label = "lan4";
1025def4c47SEmmanuel Vadot                };
1035def4c47SEmmanuel Vadot                port@4 {
1045def4c47SEmmanuel Vadot                    reg = <4>;
1055def4c47SEmmanuel Vadot                    label = "lan5";
1065def4c47SEmmanuel Vadot                };
1075def4c47SEmmanuel Vadot                port@5 {
1085def4c47SEmmanuel Vadot                    reg = <5>;
1095def4c47SEmmanuel Vadot                    label = "cpu";
1105def4c47SEmmanuel Vadot                    ethernet = <&eth0>;
1115def4c47SEmmanuel Vadot                    fixed-link {
1125def4c47SEmmanuel Vadot                        speed = <1000>;
1135def4c47SEmmanuel Vadot                        full-duplex;
1145def4c47SEmmanuel Vadot                    };
1155def4c47SEmmanuel Vadot                };
1165def4c47SEmmanuel Vadot            };
1175def4c47SEmmanuel Vadot        };
1185def4c47SEmmanuel Vadot
1195def4c47SEmmanuel Vadot        ksz8565: switch@1 {
1205def4c47SEmmanuel Vadot            compatible = "microchip,ksz8565";
1215def4c47SEmmanuel Vadot            reg = <1>;
1225def4c47SEmmanuel Vadot
1235def4c47SEmmanuel Vadot            spi-max-frequency = <44000000>;
1245def4c47SEmmanuel Vadot
1255def4c47SEmmanuel Vadot            ethernet-ports {
1265def4c47SEmmanuel Vadot                #address-cells = <1>;
1275def4c47SEmmanuel Vadot                #size-cells = <0>;
1285def4c47SEmmanuel Vadot                port@0 {
1295def4c47SEmmanuel Vadot                    reg = <0>;
1305def4c47SEmmanuel Vadot                    label = "lan1";
1315def4c47SEmmanuel Vadot                };
1325def4c47SEmmanuel Vadot                port@1 {
1335def4c47SEmmanuel Vadot                    reg = <1>;
1345def4c47SEmmanuel Vadot                    label = "lan2";
1355def4c47SEmmanuel Vadot                };
1365def4c47SEmmanuel Vadot                port@2 {
1375def4c47SEmmanuel Vadot                    reg = <2>;
1385def4c47SEmmanuel Vadot                    label = "lan3";
1395def4c47SEmmanuel Vadot                };
1405def4c47SEmmanuel Vadot                port@3 {
1415def4c47SEmmanuel Vadot                    reg = <3>;
1425def4c47SEmmanuel Vadot                    label = "lan4";
1435def4c47SEmmanuel Vadot                };
1445def4c47SEmmanuel Vadot                port@6 {
1455def4c47SEmmanuel Vadot                    reg = <6>;
1465def4c47SEmmanuel Vadot                    label = "cpu";
1475def4c47SEmmanuel Vadot                    ethernet = <&eth0>;
1485def4c47SEmmanuel Vadot                    fixed-link {
1495def4c47SEmmanuel Vadot                        speed = <1000>;
1505def4c47SEmmanuel Vadot                        full-duplex;
1515def4c47SEmmanuel Vadot                    };
1525def4c47SEmmanuel Vadot                };
1535def4c47SEmmanuel Vadot            };
1545def4c47SEmmanuel Vadot        };
1555def4c47SEmmanuel Vadot    };
1565def4c47SEmmanuel Vadot...
157