1b97ee269SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2b97ee269SEmmanuel Vadot%YAML 1.2 3b97ee269SEmmanuel Vadot--- 4b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/net/dsa/renesas,rzn1-a5psw.yaml# 5b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6b97ee269SEmmanuel Vadot 7b97ee269SEmmanuel Vadottitle: Renesas RZ/N1 Advanced 5 ports ethernet switch 8b97ee269SEmmanuel Vadot 9b97ee269SEmmanuel Vadotmaintainers: 10b97ee269SEmmanuel Vadot - Clément Léger <clement.leger@bootlin.com> 11b97ee269SEmmanuel Vadot 12b97ee269SEmmanuel Vadotdescription: | 13b97ee269SEmmanuel Vadot The advanced 5 ports switch is present on the Renesas RZ/N1 SoC family and 14b97ee269SEmmanuel Vadot handles 4 ports + 1 CPU management port. 15b97ee269SEmmanuel Vadot 16b97ee269SEmmanuel VadotallOf: 17cb7aa33aSEmmanuel Vadot - $ref: dsa.yaml#/$defs/ethernet-ports 18b97ee269SEmmanuel Vadot 19b97ee269SEmmanuel Vadotproperties: 20b97ee269SEmmanuel Vadot compatible: 21b97ee269SEmmanuel Vadot items: 22b97ee269SEmmanuel Vadot - enum: 23b97ee269SEmmanuel Vadot - renesas,r9a06g032-a5psw 24b97ee269SEmmanuel Vadot - const: renesas,rzn1-a5psw 25b97ee269SEmmanuel Vadot 26b97ee269SEmmanuel Vadot reg: 27b97ee269SEmmanuel Vadot maxItems: 1 28b97ee269SEmmanuel Vadot 29b97ee269SEmmanuel Vadot interrupts: 30b97ee269SEmmanuel Vadot items: 31b97ee269SEmmanuel Vadot - description: Device Level Ring (DLR) interrupt 32b97ee269SEmmanuel Vadot - description: Switch interrupt 33b97ee269SEmmanuel Vadot - description: Parallel Redundancy Protocol (PRP) interrupt 34b97ee269SEmmanuel Vadot - description: Integrated HUB module interrupt 35b97ee269SEmmanuel Vadot - description: Receive Pattern Match interrupt 36b97ee269SEmmanuel Vadot 37b97ee269SEmmanuel Vadot interrupt-names: 38b97ee269SEmmanuel Vadot items: 39b97ee269SEmmanuel Vadot - const: dlr 40b97ee269SEmmanuel Vadot - const: switch 41b97ee269SEmmanuel Vadot - const: prp 42b97ee269SEmmanuel Vadot - const: hub 43b97ee269SEmmanuel Vadot - const: ptrn 44b97ee269SEmmanuel Vadot 45b97ee269SEmmanuel Vadot power-domains: 46b97ee269SEmmanuel Vadot maxItems: 1 47b97ee269SEmmanuel Vadot 48b97ee269SEmmanuel Vadot mdio: 49b97ee269SEmmanuel Vadot $ref: /schemas/net/mdio.yaml# 50b97ee269SEmmanuel Vadot unevaluatedProperties: false 51b97ee269SEmmanuel Vadot 52b97ee269SEmmanuel Vadot clocks: 53b97ee269SEmmanuel Vadot items: 54b97ee269SEmmanuel Vadot - description: AHB clock used for the switch register interface 55b97ee269SEmmanuel Vadot - description: Switch system clock 56b97ee269SEmmanuel Vadot 57b97ee269SEmmanuel Vadot clock-names: 58b97ee269SEmmanuel Vadot items: 59b97ee269SEmmanuel Vadot - const: hclk 60b97ee269SEmmanuel Vadot - const: clk 61b97ee269SEmmanuel Vadot 62b97ee269SEmmanuel Vadot ethernet-ports: 63b97ee269SEmmanuel Vadot type: object 64*84943d6fSEmmanuel Vadot additionalProperties: true 65b97ee269SEmmanuel Vadot patternProperties: 66b97ee269SEmmanuel Vadot "^(ethernet-)?port@[0-4]$": 67b97ee269SEmmanuel Vadot type: object 68*84943d6fSEmmanuel Vadot additionalProperties: true 69b97ee269SEmmanuel Vadot properties: 70b97ee269SEmmanuel Vadot pcs-handle: 718bab661aSEmmanuel Vadot maxItems: 1 72b97ee269SEmmanuel Vadot description: 73b97ee269SEmmanuel Vadot phandle pointing to a PCS sub-node compatible with 74b97ee269SEmmanuel Vadot renesas,rzn1-miic.yaml# 75b97ee269SEmmanuel Vadot 76b97ee269SEmmanuel VadotunevaluatedProperties: false 77b97ee269SEmmanuel Vadot 78b97ee269SEmmanuel Vadotrequired: 79b97ee269SEmmanuel Vadot - compatible 80b97ee269SEmmanuel Vadot - reg 81b97ee269SEmmanuel Vadot - clocks 82b97ee269SEmmanuel Vadot - clock-names 83b97ee269SEmmanuel Vadot - power-domains 84b97ee269SEmmanuel Vadot 85b97ee269SEmmanuel Vadotexamples: 86b97ee269SEmmanuel Vadot - | 87b97ee269SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 88b97ee269SEmmanuel Vadot #include <dt-bindings/clock/r9a06g032-sysctrl.h> 89b97ee269SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 90b97ee269SEmmanuel Vadot 91b97ee269SEmmanuel Vadot switch@44050000 { 92b97ee269SEmmanuel Vadot compatible = "renesas,r9a06g032-a5psw", "renesas,rzn1-a5psw"; 93b97ee269SEmmanuel Vadot reg = <0x44050000 0x10000>; 94b97ee269SEmmanuel Vadot clocks = <&sysctrl R9A06G032_HCLK_SWITCH>, <&sysctrl R9A06G032_CLK_SWITCH>; 95b97ee269SEmmanuel Vadot clock-names = "hclk", "clk"; 96b97ee269SEmmanuel Vadot power-domains = <&sysctrl>; 97b97ee269SEmmanuel Vadot interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>, 98b97ee269SEmmanuel Vadot <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, 99b97ee269SEmmanuel Vadot <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>, 100b97ee269SEmmanuel Vadot <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>, 101b97ee269SEmmanuel Vadot <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>; 102b97ee269SEmmanuel Vadot interrupt-names = "dlr", "switch", "prp", "hub", "ptrn"; 103b97ee269SEmmanuel Vadot 104b97ee269SEmmanuel Vadot dsa,member = <0 0>; 105b97ee269SEmmanuel Vadot 106b97ee269SEmmanuel Vadot ethernet-ports { 107b97ee269SEmmanuel Vadot #address-cells = <1>; 108b97ee269SEmmanuel Vadot #size-cells = <0>; 109b97ee269SEmmanuel Vadot 110b97ee269SEmmanuel Vadot port@0 { 111b97ee269SEmmanuel Vadot reg = <0>; 112b97ee269SEmmanuel Vadot label = "lan0"; 113b97ee269SEmmanuel Vadot phy-handle = <&switch0phy3>; 114b97ee269SEmmanuel Vadot pcs-handle = <&mii_conv4>; 115b97ee269SEmmanuel Vadot }; 116b97ee269SEmmanuel Vadot 117b97ee269SEmmanuel Vadot port@1 { 118b97ee269SEmmanuel Vadot reg = <1>; 119b97ee269SEmmanuel Vadot label = "lan1"; 120b97ee269SEmmanuel Vadot phy-handle = <&switch0phy1>; 121b97ee269SEmmanuel Vadot pcs-handle = <&mii_conv3>; 122b97ee269SEmmanuel Vadot }; 123b97ee269SEmmanuel Vadot 124b97ee269SEmmanuel Vadot port@4 { 125b97ee269SEmmanuel Vadot reg = <4>; 126b97ee269SEmmanuel Vadot ethernet = <&gmac2>; 1277ef62cebSEmmanuel Vadot phy-mode = "internal"; 1287ef62cebSEmmanuel Vadot 129b97ee269SEmmanuel Vadot fixed-link { 130b97ee269SEmmanuel Vadot speed = <1000>; 131b97ee269SEmmanuel Vadot full-duplex; 132b97ee269SEmmanuel Vadot }; 133b97ee269SEmmanuel Vadot }; 134b97ee269SEmmanuel Vadot }; 135b97ee269SEmmanuel Vadot 136b97ee269SEmmanuel Vadot mdio { 137b97ee269SEmmanuel Vadot #address-cells = <1>; 138b97ee269SEmmanuel Vadot #size-cells = <0>; 139b97ee269SEmmanuel Vadot 140b97ee269SEmmanuel Vadot reset-gpios = <&gpio0a 2 GPIO_ACTIVE_HIGH>; 141b97ee269SEmmanuel Vadot reset-delay-us = <15>; 142b97ee269SEmmanuel Vadot clock-frequency = <2500000>; 143b97ee269SEmmanuel Vadot 144b97ee269SEmmanuel Vadot switch0phy1: ethernet-phy@1{ 145b97ee269SEmmanuel Vadot reg = <1>; 146b97ee269SEmmanuel Vadot }; 147b97ee269SEmmanuel Vadot 148b97ee269SEmmanuel Vadot switch0phy3: ethernet-phy@3{ 149b97ee269SEmmanuel Vadot reg = <3>; 150b97ee269SEmmanuel Vadot }; 151b97ee269SEmmanuel Vadot }; 152b97ee269SEmmanuel Vadot }; 153