1b97ee269SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 2b97ee269SEmmanuel Vadot%YAML 1.2 3b97ee269SEmmanuel Vadot--- 4b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/net/rockchip,emac.yaml# 5b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6b97ee269SEmmanuel Vadot 7b97ee269SEmmanuel Vadottitle: Rockchip RK3036/RK3066/RK3188 Ethernet Media Access Controller (EMAC) 8b97ee269SEmmanuel Vadot 9b97ee269SEmmanuel Vadotmaintainers: 10b97ee269SEmmanuel Vadot - Heiko Stuebner <heiko@sntech.de> 11b97ee269SEmmanuel Vadot 12b97ee269SEmmanuel Vadotproperties: 13b97ee269SEmmanuel Vadot compatible: 14b97ee269SEmmanuel Vadot enum: 15b97ee269SEmmanuel Vadot - rockchip,rk3036-emac 16b97ee269SEmmanuel Vadot - rockchip,rk3066-emac 17b97ee269SEmmanuel Vadot - rockchip,rk3188-emac 18b97ee269SEmmanuel Vadot 19b97ee269SEmmanuel Vadot reg: 20b97ee269SEmmanuel Vadot maxItems: 1 21b97ee269SEmmanuel Vadot 22b97ee269SEmmanuel Vadot interrupts: 23b97ee269SEmmanuel Vadot maxItems: 1 24b97ee269SEmmanuel Vadot 25b97ee269SEmmanuel Vadot clocks: 26b97ee269SEmmanuel Vadot minItems: 2 27b97ee269SEmmanuel Vadot items: 28b97ee269SEmmanuel Vadot - description: host clock 29b97ee269SEmmanuel Vadot - description: reference clock 30b97ee269SEmmanuel Vadot - description: mac TX/RX clock 31b97ee269SEmmanuel Vadot 32b97ee269SEmmanuel Vadot clock-names: 33b97ee269SEmmanuel Vadot minItems: 2 34b97ee269SEmmanuel Vadot items: 35b97ee269SEmmanuel Vadot - const: hclk 36b97ee269SEmmanuel Vadot - const: macref 37b97ee269SEmmanuel Vadot - const: macclk 38b97ee269SEmmanuel Vadot 39b97ee269SEmmanuel Vadot rockchip,grf: 40b97ee269SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 41b97ee269SEmmanuel Vadot description: 42b97ee269SEmmanuel Vadot Phandle to the syscon GRF used to control speed and mode for the EMAC. 43b97ee269SEmmanuel Vadot 44b97ee269SEmmanuel Vadot phy-supply: 45b97ee269SEmmanuel Vadot description: 46b97ee269SEmmanuel Vadot Phandle to a regulator if the PHY needs one. 47b97ee269SEmmanuel Vadot 48b97ee269SEmmanuel Vadot mdio: 49b97ee269SEmmanuel Vadot $ref: mdio.yaml# 50b97ee269SEmmanuel Vadot unevaluatedProperties: false 51b97ee269SEmmanuel Vadot 52b97ee269SEmmanuel Vadotrequired: 53b97ee269SEmmanuel Vadot - compatible 54b97ee269SEmmanuel Vadot - reg 55b97ee269SEmmanuel Vadot - interrupts 56b97ee269SEmmanuel Vadot - clocks 57b97ee269SEmmanuel Vadot - clock-names 58b97ee269SEmmanuel Vadot - rockchip,grf 59b97ee269SEmmanuel Vadot - phy 60b97ee269SEmmanuel Vadot - phy-mode 61b97ee269SEmmanuel Vadot - mdio 62b97ee269SEmmanuel Vadot 63b97ee269SEmmanuel VadotallOf: 64*fac71e4eSEmmanuel Vadot - $ref: ethernet-controller.yaml# 65b97ee269SEmmanuel Vadot - if: 66b97ee269SEmmanuel Vadot properties: 67b97ee269SEmmanuel Vadot compatible: 68b97ee269SEmmanuel Vadot contains: 69b97ee269SEmmanuel Vadot const: rockchip,rk3036-emac 70b97ee269SEmmanuel Vadot 71b97ee269SEmmanuel Vadot then: 72b97ee269SEmmanuel Vadot properties: 73b97ee269SEmmanuel Vadot clocks: 74b97ee269SEmmanuel Vadot minItems: 3 75b97ee269SEmmanuel Vadot 76b97ee269SEmmanuel Vadot clock-names: 77b97ee269SEmmanuel Vadot minItems: 3 78b97ee269SEmmanuel Vadot 79b97ee269SEmmanuel Vadot else: 80b97ee269SEmmanuel Vadot properties: 81b97ee269SEmmanuel Vadot clocks: 82b97ee269SEmmanuel Vadot maxItems: 2 83b97ee269SEmmanuel Vadot 84b97ee269SEmmanuel Vadot clock-names: 85b97ee269SEmmanuel Vadot maxItems: 2 86b97ee269SEmmanuel Vadot 87b97ee269SEmmanuel VadotunevaluatedProperties: false 88b97ee269SEmmanuel Vadot 89b97ee269SEmmanuel Vadotexamples: 90b97ee269SEmmanuel Vadot - | 91b97ee269SEmmanuel Vadot #include <dt-bindings/clock/rk3188-cru-common.h> 92b97ee269SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 93b97ee269SEmmanuel Vadot 94b97ee269SEmmanuel Vadot ethernet@10204000 { 95b97ee269SEmmanuel Vadot compatible = "rockchip,rk3188-emac"; 96b97ee269SEmmanuel Vadot reg = <0xc0fc2000 0x3c>; 97b97ee269SEmmanuel Vadot interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; 98b97ee269SEmmanuel Vadot clocks = <&cru HCLK_EMAC>, <&cru SCLK_MAC>; 99b97ee269SEmmanuel Vadot clock-names = "hclk", "macref"; 100b97ee269SEmmanuel Vadot rockchip,grf = <&grf>; 101b97ee269SEmmanuel Vadot pinctrl-0 = <&emac_xfer>, <&emac_mdio>, <&phy_int>; 102b97ee269SEmmanuel Vadot pinctrl-names = "default"; 103b97ee269SEmmanuel Vadot phy = <&phy0>; 104b97ee269SEmmanuel Vadot phy-mode = "rmii"; 105b97ee269SEmmanuel Vadot phy-supply = <&vcc_rmii>; 106b97ee269SEmmanuel Vadot 107b97ee269SEmmanuel Vadot mdio { 108b97ee269SEmmanuel Vadot #address-cells = <1>; 109b97ee269SEmmanuel Vadot #size-cells = <0>; 110b97ee269SEmmanuel Vadot 111b97ee269SEmmanuel Vadot phy0: ethernet-phy@0 { 112b97ee269SEmmanuel Vadot reg = <1>; 113b97ee269SEmmanuel Vadot }; 114b97ee269SEmmanuel Vadot }; 115b97ee269SEmmanuel Vadot }; 116