brintos

brintos / linux-shallow public Read only

0
0
Text · 5.0 KiB · f3154b1 Raw
203 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/net/dsa/lantiq,gswip.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Lantiq GSWIP Ethernet switches8 9allOf:10  - $ref: dsa.yaml#/$defs/ethernet-ports11 12maintainers:13  - Hauke Mehrtens <hauke@hauke-m.de>14 15properties:16  compatible:17    enum:18      - lantiq,xrx200-gswip19      - lantiq,xrx300-gswip20      - lantiq,xrx330-gswip21 22  reg:23    minItems: 324    maxItems: 325 26  reg-names:27    items:28      - const: switch29      - const: mdio30      - const: mii31 32  mdio:33    $ref: /schemas/net/mdio.yaml#34    unevaluatedProperties: false35 36    properties:37      compatible:38        const: lantiq,xrx200-mdio39 40    required:41      - compatible42 43  gphy-fw:44    type: object45    properties:46      '#address-cells':47        const: 148 49      '#size-cells':50        const: 051 52      compatible:53        items:54          - enum:55              - lantiq,xrx200-gphy-fw56              - lantiq,xrx300-gphy-fw57              - lantiq,xrx330-gphy-fw58          - const: lantiq,gphy-fw59 60      lantiq,rcu:61        $ref: /schemas/types.yaml#/definitions/phandle62        description: phandle to the RCU syscon63 64    patternProperties:65      "^gphy@[0-9a-f]{1,2}$":66        type: object67 68        additionalProperties: false69 70        properties:71          reg:72            minimum: 073            maximum: 25574            description:75              Offset of the GPHY firmware register in the RCU register range76 77          resets:78            items:79              - description: GPHY reset line80 81          reset-names:82            items:83              - const: gphy84 85        required:86          - reg87 88    required:89      - compatible90      - lantiq,rcu91 92    additionalProperties: false93 94required:95  - compatible96  - reg97 98unevaluatedProperties: false99 100examples:101  - |102    switch@e108000 {103            compatible = "lantiq,xrx200-gswip";104            reg = <0xe108000 0x3100>,  /* switch */105                  <0xe10b100 0xd8>,    /* mdio */106                  <0xe10b1d8 0x130>;   /* mii */107            dsa,member = <0 0>;108 109            ports {110                    #address-cells = <1>;111                    #size-cells = <0>;112 113                    port@0 {114                            reg = <0>;115                            label = "lan3";116                            phy-mode = "rgmii";117                            phy-handle = <&phy0>;118                    };119 120                    port@1 {121                            reg = <1>;122                            label = "lan4";123                            phy-mode = "rgmii";124                            phy-handle = <&phy1>;125                    };126 127                    port@2 {128                            reg = <2>;129                            label = "lan2";130                            phy-mode = "internal";131                            phy-handle = <&phy11>;132                    };133 134                    port@4 {135                            reg = <4>;136                            label = "lan1";137                            phy-mode = "internal";138                            phy-handle = <&phy13>;139                    };140 141                    port@5 {142                            reg = <5>;143                            label = "wan";144                            phy-mode = "rgmii";145                            phy-handle = <&phy5>;146                    };147 148                    port@6 {149                            reg = <0x6>;150                            phy-mode = "internal";151                            ethernet = <&eth0>;152 153                            fixed-link {154                                    speed = <1000>;155                                    full-duplex;156                            };157                    };158            };159 160            mdio {161                    #address-cells = <1>;162                    #size-cells = <0>;163                    compatible = "lantiq,xrx200-mdio";164 165                    phy0: ethernet-phy@0 {166                            reg = <0x0>;167                    };168                    phy1: ethernet-phy@1 {169                            reg = <0x1>;170                    };171                    phy5: ethernet-phy@5 {172                            reg = <0x5>;173                    };174                    phy11: ethernet-phy@11 {175                            reg = <0x11>;176                    };177                    phy13: ethernet-phy@13 {178                            reg = <0x13>;179                    };180            };181 182            gphy-fw {183                    #address-cells = <1>;184                    #size-cells = <0>;185                    compatible = "lantiq,xrx200-gphy-fw", "lantiq,gphy-fw";186                    lantiq,rcu = <&rcu0>;187 188                    gphy@20 {189                            reg = <0x20>;190 191                            resets = <&reset0 31 30>;192                            reset-names = "gphy";193                    };194 195                    gphy@68 {196                            reg = <0x68>;197 198                            resets = <&reset0 29 28>;199                            reset-names = "gphy";200                    };201            };202    };203