1b331b8efSEzequiel Garcia# SPDX-License-Identifier: GPL-2.0 2b331b8efSEzequiel Garcia%YAML 1.2 3b331b8efSEzequiel Garcia--- 43079bfdbSRob Herring$id: http://devicetree.org/schemas/net/rockchip-dwmac.yaml# 53079bfdbSRob Herring$schema: http://devicetree.org/meta-schemas/core.yaml# 6b331b8efSEzequiel Garcia 7b331b8efSEzequiel Garciatitle: Rockchip 10/100/1000 Ethernet driver(GMAC) 8b331b8efSEzequiel Garcia 9b331b8efSEzequiel Garciamaintainers: 10b331b8efSEzequiel Garcia - David Wu <david.wu@rock-chips.com> 11b331b8efSEzequiel Garcia 12b331b8efSEzequiel Garcia# We need a select here so we don't match all nodes with 'snps,dwmac' 13b331b8efSEzequiel Garciaselect: 14b331b8efSEzequiel Garcia properties: 15b331b8efSEzequiel Garcia compatible: 16b331b8efSEzequiel Garcia contains: 17b331b8efSEzequiel Garcia enum: 18b331b8efSEzequiel Garcia - rockchip,px30-gmac 19b331b8efSEzequiel Garcia - rockchip,rk3128-gmac 20b331b8efSEzequiel Garcia - rockchip,rk3228-gmac 21b331b8efSEzequiel Garcia - rockchip,rk3288-gmac 222cc8c910STobias Schramm - rockchip,rk3308-gmac 23b331b8efSEzequiel Garcia - rockchip,rk3328-gmac 24b331b8efSEzequiel Garcia - rockchip,rk3366-gmac 25b331b8efSEzequiel Garcia - rockchip,rk3368-gmac 26b331b8efSEzequiel Garcia - rockchip,rk3399-gmac 27f9da1c9dSEzequiel Garcia - rockchip,rk3568-gmac 28a2b77831SSebastian Reichel - rockchip,rk3588-gmac 29b331b8efSEzequiel Garcia - rockchip,rv1108-gmac 30b36fe2f4SAnand Moon - rockchip,rv1126-gmac 31b331b8efSEzequiel Garcia required: 32b331b8efSEzequiel Garcia - compatible 33b331b8efSEzequiel Garcia 34b331b8efSEzequiel GarciaallOf: 3561ab5a06SKrzysztof Kozlowski - $ref: snps,dwmac.yaml# 36b331b8efSEzequiel Garcia 37b331b8efSEzequiel Garciaproperties: 38b331b8efSEzequiel Garcia compatible: 39f9da1c9dSEzequiel Garcia oneOf: 40f9da1c9dSEzequiel Garcia - items: 41b331b8efSEzequiel Garcia - enum: 42b331b8efSEzequiel Garcia - rockchip,px30-gmac 43b331b8efSEzequiel Garcia - rockchip,rk3128-gmac 44b331b8efSEzequiel Garcia - rockchip,rk3228-gmac 45b331b8efSEzequiel Garcia - rockchip,rk3288-gmac 462cc8c910STobias Schramm - rockchip,rk3308-gmac 47b331b8efSEzequiel Garcia - rockchip,rk3328-gmac 48b331b8efSEzequiel Garcia - rockchip,rk3366-gmac 49b331b8efSEzequiel Garcia - rockchip,rk3368-gmac 50b331b8efSEzequiel Garcia - rockchip,rk3399-gmac 51b331b8efSEzequiel Garcia - rockchip,rv1108-gmac 52f9da1c9dSEzequiel Garcia - items: 53f9da1c9dSEzequiel Garcia - enum: 54f9da1c9dSEzequiel Garcia - rockchip,rk3568-gmac 55a2b77831SSebastian Reichel - rockchip,rk3588-gmac 56e471d83eSAnand Moon - rockchip,rv1126-gmac 57f9da1c9dSEzequiel Garcia - const: snps,dwmac-4.20a 58b331b8efSEzequiel Garcia 59b331b8efSEzequiel Garcia clocks: 60b331b8efSEzequiel Garcia minItems: 5 61b331b8efSEzequiel Garcia maxItems: 8 62b331b8efSEzequiel Garcia 63b331b8efSEzequiel Garcia clock-names: 64b331b8efSEzequiel Garcia contains: 65b331b8efSEzequiel Garcia enum: 66b331b8efSEzequiel Garcia - stmmaceth 67b331b8efSEzequiel Garcia - mac_clk_tx 68b331b8efSEzequiel Garcia - mac_clk_rx 69b331b8efSEzequiel Garcia - aclk_mac 70b331b8efSEzequiel Garcia - pclk_mac 71b331b8efSEzequiel Garcia - clk_mac_ref 72b331b8efSEzequiel Garcia - clk_mac_refout 73b331b8efSEzequiel Garcia - clk_mac_speed 74b331b8efSEzequiel Garcia 75b331b8efSEzequiel Garcia clock_in_out: 76b331b8efSEzequiel Garcia description: 77b331b8efSEzequiel Garcia For RGMII, it must be "input", means main clock(125MHz) 78b331b8efSEzequiel Garcia is not sourced from SoC's PLL, but input from PHY. 79b331b8efSEzequiel Garcia For RMII, "input" means PHY provides the reference clock(50MHz), 80b331b8efSEzequiel Garcia "output" means GMAC provides the reference clock. 81b331b8efSEzequiel Garcia $ref: /schemas/types.yaml#/definitions/string 82b331b8efSEzequiel Garcia enum: [input, output] 8351318bf4SEugen Hristev default: input 84b331b8efSEzequiel Garcia 85b331b8efSEzequiel Garcia rockchip,grf: 86b331b8efSEzequiel Garcia description: The phandle of the syscon node for the general register file. 87b331b8efSEzequiel Garcia $ref: /schemas/types.yaml#/definitions/phandle 88b331b8efSEzequiel Garcia 89a2b77831SSebastian Reichel rockchip,php-grf: 90a2b77831SSebastian Reichel description: 91a2b77831SSebastian Reichel The phandle of the syscon node for the peripheral general register file. 92a2b77831SSebastian Reichel $ref: /schemas/types.yaml#/definitions/phandle 93a2b77831SSebastian Reichel 94b331b8efSEzequiel Garcia tx_delay: 95*5416d792SEugen Hristev description: Delay value for TXD timing. 96b331b8efSEzequiel Garcia $ref: /schemas/types.yaml#/definitions/uint32 97*5416d792SEugen Hristev minimum: 0 98*5416d792SEugen Hristev maximum: 0x7F 99*5416d792SEugen Hristev default: 0x30 100b331b8efSEzequiel Garcia 101b331b8efSEzequiel Garcia rx_delay: 102*5416d792SEugen Hristev description: Delay value for RXD timing. 103b331b8efSEzequiel Garcia $ref: /schemas/types.yaml#/definitions/uint32 104*5416d792SEugen Hristev minimum: 0 105*5416d792SEugen Hristev maximum: 0x7F 106*5416d792SEugen Hristev default: 0x10 107b331b8efSEzequiel Garcia 108b331b8efSEzequiel Garcia phy-supply: 109b331b8efSEzequiel Garcia description: PHY regulator 110b331b8efSEzequiel Garcia 111b331b8efSEzequiel Garciarequired: 112b331b8efSEzequiel Garcia - compatible 113b331b8efSEzequiel Garcia - clocks 114b331b8efSEzequiel Garcia - clock-names 115b331b8efSEzequiel Garcia 116b331b8efSEzequiel GarciaunevaluatedProperties: false 117b331b8efSEzequiel Garcia 118b331b8efSEzequiel Garciaexamples: 119b331b8efSEzequiel Garcia - | 120b331b8efSEzequiel Garcia #include <dt-bindings/interrupt-controller/arm-gic.h> 121b331b8efSEzequiel Garcia #include <dt-bindings/clock/rk3288-cru.h> 122b331b8efSEzequiel Garcia 123b331b8efSEzequiel Garcia gmac: ethernet@ff290000 { 124b331b8efSEzequiel Garcia compatible = "rockchip,rk3288-gmac"; 125b331b8efSEzequiel Garcia reg = <0xff290000 0x10000>; 126b331b8efSEzequiel Garcia interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>; 127b331b8efSEzequiel Garcia interrupt-names = "macirq"; 128b331b8efSEzequiel Garcia clocks = <&cru SCLK_MAC>, 129b331b8efSEzequiel Garcia <&cru SCLK_MAC_RX>, <&cru SCLK_MAC_TX>, 130b331b8efSEzequiel Garcia <&cru SCLK_MACREF>, <&cru SCLK_MACREF_OUT>, 131b331b8efSEzequiel Garcia <&cru ACLK_GMAC>, <&cru PCLK_GMAC>; 132b331b8efSEzequiel Garcia clock-names = "stmmaceth", 133b331b8efSEzequiel Garcia "mac_clk_rx", "mac_clk_tx", 134b331b8efSEzequiel Garcia "clk_mac_ref", "clk_mac_refout", 135b331b8efSEzequiel Garcia "aclk_mac", "pclk_mac"; 136b331b8efSEzequiel Garcia assigned-clocks = <&cru SCLK_MAC>; 137b331b8efSEzequiel Garcia assigned-clock-parents = <&ext_gmac>; 138b331b8efSEzequiel Garcia 139b331b8efSEzequiel Garcia rockchip,grf = <&grf>; 140b331b8efSEzequiel Garcia phy-mode = "rgmii"; 141b331b8efSEzequiel Garcia clock_in_out = "input"; 142b331b8efSEzequiel Garcia tx_delay = <0x30>; 143b331b8efSEzequiel Garcia rx_delay = <0x10>; 144b331b8efSEzequiel Garcia }; 145