1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/net/allwinner,sun8i-a83t-emac.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 77ef62cebSEmmanuel Vadottitle: Allwinner A83t EMAC 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10c66ec88fSEmmanuel Vadot - Chen-Yu Tsai <wens@csie.org> 11c66ec88fSEmmanuel Vadot - Maxime Ripard <mripard@kernel.org> 12c66ec88fSEmmanuel Vadot 13c66ec88fSEmmanuel Vadotproperties: 14c66ec88fSEmmanuel Vadot compatible: 15c66ec88fSEmmanuel Vadot oneOf: 16c66ec88fSEmmanuel Vadot - const: allwinner,sun8i-a83t-emac 17c66ec88fSEmmanuel Vadot - const: allwinner,sun8i-h3-emac 188cc087a1SEmmanuel Vadot - const: allwinner,sun8i-r40-gmac 19c66ec88fSEmmanuel Vadot - const: allwinner,sun8i-v3s-emac 20c66ec88fSEmmanuel Vadot - const: allwinner,sun50i-a64-emac 21c66ec88fSEmmanuel Vadot - items: 22354d7675SEmmanuel Vadot - enum: 23354d7675SEmmanuel Vadot - allwinner,sun20i-d1-emac 24354d7675SEmmanuel Vadot - allwinner,sun50i-h6-emac 25b97ee269SEmmanuel Vadot - allwinner,sun50i-h616-emac0 26c66ec88fSEmmanuel Vadot - const: allwinner,sun50i-a64-emac 27c66ec88fSEmmanuel Vadot 28c66ec88fSEmmanuel Vadot reg: 29c66ec88fSEmmanuel Vadot maxItems: 1 30c66ec88fSEmmanuel Vadot 31c66ec88fSEmmanuel Vadot interrupts: 32c66ec88fSEmmanuel Vadot maxItems: 1 33c66ec88fSEmmanuel Vadot 34c66ec88fSEmmanuel Vadot interrupt-names: 35c66ec88fSEmmanuel Vadot const: macirq 36c66ec88fSEmmanuel Vadot 37c66ec88fSEmmanuel Vadot clocks: 38c66ec88fSEmmanuel Vadot maxItems: 1 39c66ec88fSEmmanuel Vadot 40c66ec88fSEmmanuel Vadot clock-names: 41c66ec88fSEmmanuel Vadot const: stmmaceth 42c66ec88fSEmmanuel Vadot 438bab661aSEmmanuel Vadot phy-supply: 448bab661aSEmmanuel Vadot description: PHY regulator 458bab661aSEmmanuel Vadot 46c66ec88fSEmmanuel Vadot syscon: 475def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 48c66ec88fSEmmanuel Vadot description: 49c66ec88fSEmmanuel Vadot Phandle to the device containing the EMAC or GMAC clock 50c66ec88fSEmmanuel Vadot register 51c66ec88fSEmmanuel Vadot 52c66ec88fSEmmanuel Vadotrequired: 53c66ec88fSEmmanuel Vadot - compatible 54c66ec88fSEmmanuel Vadot - reg 55c66ec88fSEmmanuel Vadot - interrupts 56c66ec88fSEmmanuel Vadot - interrupt-names 57c66ec88fSEmmanuel Vadot - clocks 58c66ec88fSEmmanuel Vadot - clock-names 59c66ec88fSEmmanuel Vadot - resets 60c66ec88fSEmmanuel Vadot - reset-names 61c66ec88fSEmmanuel Vadot - phy-handle 62c66ec88fSEmmanuel Vadot - phy-mode 63c66ec88fSEmmanuel Vadot - syscon 64c66ec88fSEmmanuel Vadot 65c66ec88fSEmmanuel VadotallOf: 66f126890aSEmmanuel Vadot - $ref: snps,dwmac.yaml# 67c66ec88fSEmmanuel Vadot - if: 68c66ec88fSEmmanuel Vadot properties: 69c66ec88fSEmmanuel Vadot compatible: 70c66ec88fSEmmanuel Vadot contains: 71c66ec88fSEmmanuel Vadot enum: 72c66ec88fSEmmanuel Vadot - allwinner,sun8i-a83t-emac 73c66ec88fSEmmanuel Vadot - allwinner,sun8i-h3-emac 74c66ec88fSEmmanuel Vadot - allwinner,sun8i-v3s-emac 75c66ec88fSEmmanuel Vadot - allwinner,sun50i-a64-emac 76c66ec88fSEmmanuel Vadot 77c66ec88fSEmmanuel Vadot then: 78c66ec88fSEmmanuel Vadot properties: 79c66ec88fSEmmanuel Vadot allwinner,tx-delay-ps: 80c66ec88fSEmmanuel Vadot default: 0 81c66ec88fSEmmanuel Vadot minimum: 0 82c66ec88fSEmmanuel Vadot maximum: 700 83c66ec88fSEmmanuel Vadot multipleOf: 100 84c66ec88fSEmmanuel Vadot description: 85c66ec88fSEmmanuel Vadot External RGMII PHY TX clock delay chain value in ps. 86c66ec88fSEmmanuel Vadot 87c66ec88fSEmmanuel Vadot allwinner,rx-delay-ps: 88c66ec88fSEmmanuel Vadot default: 0 89c66ec88fSEmmanuel Vadot minimum: 0 90c66ec88fSEmmanuel Vadot maximum: 3100 91c66ec88fSEmmanuel Vadot multipleOf: 100 92c66ec88fSEmmanuel Vadot description: 93c66ec88fSEmmanuel Vadot External RGMII PHY TX clock delay chain value in ps. 94c66ec88fSEmmanuel Vadot 95c66ec88fSEmmanuel Vadot - if: 96c66ec88fSEmmanuel Vadot properties: 97c66ec88fSEmmanuel Vadot compatible: 98c66ec88fSEmmanuel Vadot contains: 99c66ec88fSEmmanuel Vadot enum: 1008cc087a1SEmmanuel Vadot - allwinner,sun8i-r40-gmac 101c66ec88fSEmmanuel Vadot 102c66ec88fSEmmanuel Vadot then: 103c66ec88fSEmmanuel Vadot properties: 104c66ec88fSEmmanuel Vadot allwinner,rx-delay-ps: 105c66ec88fSEmmanuel Vadot default: 0 106c66ec88fSEmmanuel Vadot minimum: 0 107c66ec88fSEmmanuel Vadot maximum: 700 108c66ec88fSEmmanuel Vadot multipleOf: 100 109c66ec88fSEmmanuel Vadot description: 110c66ec88fSEmmanuel Vadot External RGMII PHY TX clock delay chain value in ps. 111c66ec88fSEmmanuel Vadot 112c66ec88fSEmmanuel Vadot - if: 113c66ec88fSEmmanuel Vadot properties: 114c66ec88fSEmmanuel Vadot compatible: 115c66ec88fSEmmanuel Vadot contains: 116c66ec88fSEmmanuel Vadot enum: 117c66ec88fSEmmanuel Vadot - allwinner,sun8i-h3-emac 118c66ec88fSEmmanuel Vadot - allwinner,sun8i-v3s-emac 119c66ec88fSEmmanuel Vadot 120c66ec88fSEmmanuel Vadot then: 121c66ec88fSEmmanuel Vadot properties: 122c66ec88fSEmmanuel Vadot allwinner,leds-active-low: 1235def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 124c66ec88fSEmmanuel Vadot description: 125c66ec88fSEmmanuel Vadot EPHY LEDs are active low. 126c66ec88fSEmmanuel Vadot 127c66ec88fSEmmanuel Vadot mdio-mux: 128c66ec88fSEmmanuel Vadot type: object 129e67e8565SEmmanuel Vadot unevaluatedProperties: false 130c66ec88fSEmmanuel Vadot 131c66ec88fSEmmanuel Vadot properties: 132c66ec88fSEmmanuel Vadot compatible: 133c66ec88fSEmmanuel Vadot const: allwinner,sun8i-h3-mdio-mux 134c66ec88fSEmmanuel Vadot 135c66ec88fSEmmanuel Vadot mdio-parent-bus: 1365def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 137c66ec88fSEmmanuel Vadot description: 138c66ec88fSEmmanuel Vadot Phandle to EMAC MDIO. 139c66ec88fSEmmanuel Vadot 140c66ec88fSEmmanuel Vadot "#address-cells": 141c66ec88fSEmmanuel Vadot const: 1 142c66ec88fSEmmanuel Vadot 143c66ec88fSEmmanuel Vadot "#size-cells": 144c66ec88fSEmmanuel Vadot const: 0 145c66ec88fSEmmanuel Vadot 146e67e8565SEmmanuel Vadot mdio@1: 147e67e8565SEmmanuel Vadot $ref: mdio.yaml# 148e67e8565SEmmanuel Vadot unevaluatedProperties: false 149e67e8565SEmmanuel Vadot description: Internal MDIO Bus 150e67e8565SEmmanuel Vadot 151e67e8565SEmmanuel Vadot properties: 152c66ec88fSEmmanuel Vadot compatible: 153c66ec88fSEmmanuel Vadot const: allwinner,sun8i-h3-mdio-internal 154c66ec88fSEmmanuel Vadot 155c66ec88fSEmmanuel Vadot reg: 156c66ec88fSEmmanuel Vadot const: 1 157c66ec88fSEmmanuel Vadot 158c66ec88fSEmmanuel Vadot patternProperties: 159c66ec88fSEmmanuel Vadot "^ethernet-phy@[0-9a-f]$": 160c66ec88fSEmmanuel Vadot type: object 161*84943d6fSEmmanuel Vadot $ref: ethernet-phy.yaml# 162*84943d6fSEmmanuel Vadot unevaluatedProperties: false 163c66ec88fSEmmanuel Vadot description: 164c66ec88fSEmmanuel Vadot Integrated PHY node 165c66ec88fSEmmanuel Vadot 166c66ec88fSEmmanuel Vadot properties: 167c66ec88fSEmmanuel Vadot clocks: 168c66ec88fSEmmanuel Vadot maxItems: 1 169c66ec88fSEmmanuel Vadot 170c66ec88fSEmmanuel Vadot resets: 171c66ec88fSEmmanuel Vadot maxItems: 1 172c66ec88fSEmmanuel Vadot 173c66ec88fSEmmanuel Vadot required: 174c66ec88fSEmmanuel Vadot - clocks 175c66ec88fSEmmanuel Vadot - resets 176c66ec88fSEmmanuel Vadot 177c66ec88fSEmmanuel Vadot 178c66ec88fSEmmanuel Vadot mdio@2: 179e67e8565SEmmanuel Vadot $ref: mdio.yaml# 180e67e8565SEmmanuel Vadot unevaluatedProperties: false 181c66ec88fSEmmanuel Vadot description: External MDIO Bus (H3 only) 182c66ec88fSEmmanuel Vadot 183c66ec88fSEmmanuel Vadot properties: 184c66ec88fSEmmanuel Vadot reg: 185c66ec88fSEmmanuel Vadot const: 2 186c66ec88fSEmmanuel Vadot 187c66ec88fSEmmanuel Vadot required: 188c66ec88fSEmmanuel Vadot - compatible 189c66ec88fSEmmanuel Vadot - mdio-parent-bus 190c66ec88fSEmmanuel Vadot - mdio@1 191c66ec88fSEmmanuel Vadot 192c66ec88fSEmmanuel VadotunevaluatedProperties: false 193c66ec88fSEmmanuel Vadot 194c66ec88fSEmmanuel Vadotexamples: 195c66ec88fSEmmanuel Vadot - | 196c66ec88fSEmmanuel Vadot ethernet@1c0b000 { 197c66ec88fSEmmanuel Vadot compatible = "allwinner,sun8i-h3-emac"; 198c66ec88fSEmmanuel Vadot syscon = <&syscon>; 199c66ec88fSEmmanuel Vadot reg = <0x01c0b000 0x104>; 200c66ec88fSEmmanuel Vadot interrupts = <0 82 1>; 201c66ec88fSEmmanuel Vadot interrupt-names = "macirq"; 202c66ec88fSEmmanuel Vadot resets = <&ccu 12>; 203c66ec88fSEmmanuel Vadot reset-names = "stmmaceth"; 204c66ec88fSEmmanuel Vadot clocks = <&ccu 27>; 205c66ec88fSEmmanuel Vadot clock-names = "stmmaceth"; 206c66ec88fSEmmanuel Vadot 207c66ec88fSEmmanuel Vadot phy-handle = <&int_mii_phy>; 208c66ec88fSEmmanuel Vadot phy-mode = "mii"; 209c66ec88fSEmmanuel Vadot allwinner,leds-active-low; 210c66ec88fSEmmanuel Vadot 211c66ec88fSEmmanuel Vadot mdio1: mdio { 212c66ec88fSEmmanuel Vadot #address-cells = <1>; 213c66ec88fSEmmanuel Vadot #size-cells = <0>; 214c66ec88fSEmmanuel Vadot compatible = "snps,dwmac-mdio"; 215c66ec88fSEmmanuel Vadot }; 216c66ec88fSEmmanuel Vadot 217c66ec88fSEmmanuel Vadot mdio-mux { 218c66ec88fSEmmanuel Vadot compatible = "allwinner,sun8i-h3-mdio-mux"; 219c66ec88fSEmmanuel Vadot #address-cells = <1>; 220c66ec88fSEmmanuel Vadot #size-cells = <0>; 221c66ec88fSEmmanuel Vadot 222c66ec88fSEmmanuel Vadot mdio-parent-bus = <&mdio1>; 223c66ec88fSEmmanuel Vadot 224c66ec88fSEmmanuel Vadot int_mii_phy: mdio@1 { 225c66ec88fSEmmanuel Vadot compatible = "allwinner,sun8i-h3-mdio-internal"; 226c66ec88fSEmmanuel Vadot reg = <1>; 227c66ec88fSEmmanuel Vadot #address-cells = <1>; 228c66ec88fSEmmanuel Vadot #size-cells = <0>; 229c66ec88fSEmmanuel Vadot 230c66ec88fSEmmanuel Vadot ethernet-phy@1 { 231c66ec88fSEmmanuel Vadot reg = <1>; 232c66ec88fSEmmanuel Vadot clocks = <&ccu 67>; 233c66ec88fSEmmanuel Vadot resets = <&ccu 39>; 234c66ec88fSEmmanuel Vadot phy-is-integrated; 235c66ec88fSEmmanuel Vadot }; 236c66ec88fSEmmanuel Vadot }; 237c66ec88fSEmmanuel Vadot 238c66ec88fSEmmanuel Vadot mdio@2 { 239c66ec88fSEmmanuel Vadot reg = <2>; 240c66ec88fSEmmanuel Vadot #address-cells = <1>; 241c66ec88fSEmmanuel Vadot #size-cells = <0>; 242c66ec88fSEmmanuel Vadot }; 243c66ec88fSEmmanuel Vadot }; 244c66ec88fSEmmanuel Vadot }; 245c66ec88fSEmmanuel Vadot 246c66ec88fSEmmanuel Vadot - | 247c66ec88fSEmmanuel Vadot ethernet@1c0b000 { 248c66ec88fSEmmanuel Vadot compatible = "allwinner,sun8i-h3-emac"; 249c66ec88fSEmmanuel Vadot syscon = <&syscon>; 250c66ec88fSEmmanuel Vadot reg = <0x01c0b000 0x104>; 251c66ec88fSEmmanuel Vadot interrupts = <0 82 1>; 252c66ec88fSEmmanuel Vadot interrupt-names = "macirq"; 253c66ec88fSEmmanuel Vadot resets = <&ccu 12>; 254c66ec88fSEmmanuel Vadot reset-names = "stmmaceth"; 255c66ec88fSEmmanuel Vadot clocks = <&ccu 27>; 256c66ec88fSEmmanuel Vadot clock-names = "stmmaceth"; 257c66ec88fSEmmanuel Vadot 258c66ec88fSEmmanuel Vadot phy-handle = <&ext_rgmii_phy>; 259c66ec88fSEmmanuel Vadot phy-mode = "rgmii"; 260c66ec88fSEmmanuel Vadot allwinner,leds-active-low; 261c66ec88fSEmmanuel Vadot 262c66ec88fSEmmanuel Vadot mdio2: mdio { 263c66ec88fSEmmanuel Vadot #address-cells = <1>; 264c66ec88fSEmmanuel Vadot #size-cells = <0>; 265c66ec88fSEmmanuel Vadot compatible = "snps,dwmac-mdio"; 266c66ec88fSEmmanuel Vadot }; 267c66ec88fSEmmanuel Vadot 268c66ec88fSEmmanuel Vadot mdio-mux { 269c66ec88fSEmmanuel Vadot compatible = "allwinner,sun8i-h3-mdio-mux"; 270c66ec88fSEmmanuel Vadot #address-cells = <1>; 271c66ec88fSEmmanuel Vadot #size-cells = <0>; 272c66ec88fSEmmanuel Vadot mdio-parent-bus = <&mdio2>; 273c66ec88fSEmmanuel Vadot 274c66ec88fSEmmanuel Vadot mdio@1 { 275c66ec88fSEmmanuel Vadot compatible = "allwinner,sun8i-h3-mdio-internal"; 276c66ec88fSEmmanuel Vadot reg = <1>; 277c66ec88fSEmmanuel Vadot #address-cells = <1>; 278c66ec88fSEmmanuel Vadot #size-cells = <0>; 279c66ec88fSEmmanuel Vadot 280c66ec88fSEmmanuel Vadot ethernet-phy@1 { 281c66ec88fSEmmanuel Vadot reg = <1>; 282c66ec88fSEmmanuel Vadot clocks = <&ccu 67>; 283c66ec88fSEmmanuel Vadot resets = <&ccu 39>; 284c66ec88fSEmmanuel Vadot }; 285c66ec88fSEmmanuel Vadot }; 286c66ec88fSEmmanuel Vadot 287c66ec88fSEmmanuel Vadot mdio@2 { 288c66ec88fSEmmanuel Vadot reg = <2>; 289c66ec88fSEmmanuel Vadot #address-cells = <1>; 290c66ec88fSEmmanuel Vadot #size-cells = <0>; 291c66ec88fSEmmanuel Vadot 292c66ec88fSEmmanuel Vadot ext_rgmii_phy: ethernet-phy@1 { 293c66ec88fSEmmanuel Vadot reg = <1>; 294c66ec88fSEmmanuel Vadot }; 295c66ec88fSEmmanuel Vadot }; 296c66ec88fSEmmanuel Vadot }; 297c66ec88fSEmmanuel Vadot }; 298c66ec88fSEmmanuel Vadot 299c66ec88fSEmmanuel Vadot - | 300c66ec88fSEmmanuel Vadot ethernet@1c0b000 { 301c66ec88fSEmmanuel Vadot compatible = "allwinner,sun8i-a83t-emac"; 302c66ec88fSEmmanuel Vadot syscon = <&syscon>; 303c66ec88fSEmmanuel Vadot reg = <0x01c0b000 0x104>; 304c66ec88fSEmmanuel Vadot interrupts = <0 82 1>; 305c66ec88fSEmmanuel Vadot interrupt-names = "macirq"; 306c66ec88fSEmmanuel Vadot resets = <&ccu 13>; 307c66ec88fSEmmanuel Vadot reset-names = "stmmaceth"; 308c66ec88fSEmmanuel Vadot clocks = <&ccu 27>; 309c66ec88fSEmmanuel Vadot clock-names = "stmmaceth"; 310c66ec88fSEmmanuel Vadot phy-handle = <&ext_rgmii_phy1>; 311c66ec88fSEmmanuel Vadot phy-mode = "rgmii"; 312c66ec88fSEmmanuel Vadot 313c66ec88fSEmmanuel Vadot mdio { 314c66ec88fSEmmanuel Vadot compatible = "snps,dwmac-mdio"; 315c66ec88fSEmmanuel Vadot #address-cells = <1>; 316c66ec88fSEmmanuel Vadot #size-cells = <0>; 317c66ec88fSEmmanuel Vadot 318c66ec88fSEmmanuel Vadot ext_rgmii_phy1: ethernet-phy@1 { 319c66ec88fSEmmanuel Vadot reg = <1>; 320c66ec88fSEmmanuel Vadot }; 321c66ec88fSEmmanuel Vadot }; 322c66ec88fSEmmanuel Vadot }; 323c66ec88fSEmmanuel Vadot 324c66ec88fSEmmanuel Vadot... 325