15ecd39d1SJohan Jonker# SPDX-License-Identifier: GPL-2.0 25ecd39d1SJohan Jonker%YAML 1.2 35ecd39d1SJohan Jonker--- 45ecd39d1SJohan Jonker$id: http://devicetree.org/schemas/net/rockchip,emac.yaml# 55ecd39d1SJohan Jonker$schema: http://devicetree.org/meta-schemas/core.yaml# 65ecd39d1SJohan Jonker 75ecd39d1SJohan Jonkertitle: Rockchip RK3036/RK3066/RK3188 Ethernet Media Access Controller (EMAC) 85ecd39d1SJohan Jonker 95ecd39d1SJohan Jonkermaintainers: 105ecd39d1SJohan Jonker - Heiko Stuebner <heiko@sntech.de> 115ecd39d1SJohan Jonker 125ecd39d1SJohan Jonkerproperties: 135ecd39d1SJohan Jonker compatible: 145ecd39d1SJohan Jonker enum: 155ecd39d1SJohan Jonker - rockchip,rk3036-emac 165ecd39d1SJohan Jonker - rockchip,rk3066-emac 175ecd39d1SJohan Jonker - rockchip,rk3188-emac 185ecd39d1SJohan Jonker 195ecd39d1SJohan Jonker reg: 205ecd39d1SJohan Jonker maxItems: 1 215ecd39d1SJohan Jonker 225ecd39d1SJohan Jonker interrupts: 235ecd39d1SJohan Jonker maxItems: 1 245ecd39d1SJohan Jonker 255ecd39d1SJohan Jonker clocks: 265ecd39d1SJohan Jonker minItems: 2 275ecd39d1SJohan Jonker items: 285ecd39d1SJohan Jonker - description: host clock 295ecd39d1SJohan Jonker - description: reference clock 305ecd39d1SJohan Jonker - description: mac TX/RX clock 315ecd39d1SJohan Jonker 325ecd39d1SJohan Jonker clock-names: 335ecd39d1SJohan Jonker minItems: 2 345ecd39d1SJohan Jonker items: 355ecd39d1SJohan Jonker - const: hclk 365ecd39d1SJohan Jonker - const: macref 375ecd39d1SJohan Jonker - const: macclk 385ecd39d1SJohan Jonker 395ecd39d1SJohan Jonker rockchip,grf: 405ecd39d1SJohan Jonker $ref: /schemas/types.yaml#/definitions/phandle 415ecd39d1SJohan Jonker description: 425ecd39d1SJohan Jonker Phandle to the syscon GRF used to control speed and mode for the EMAC. 435ecd39d1SJohan Jonker 445ecd39d1SJohan Jonker phy-supply: 455ecd39d1SJohan Jonker description: 465ecd39d1SJohan Jonker Phandle to a regulator if the PHY needs one. 475ecd39d1SJohan Jonker 485ecd39d1SJohan Jonker mdio: 495ecd39d1SJohan Jonker $ref: mdio.yaml# 505ecd39d1SJohan Jonker unevaluatedProperties: false 515ecd39d1SJohan Jonker 525ecd39d1SJohan Jonkerrequired: 535ecd39d1SJohan Jonker - compatible 545ecd39d1SJohan Jonker - reg 555ecd39d1SJohan Jonker - interrupts 565ecd39d1SJohan Jonker - clocks 575ecd39d1SJohan Jonker - clock-names 585ecd39d1SJohan Jonker - rockchip,grf 595ecd39d1SJohan Jonker - phy 605ecd39d1SJohan Jonker - phy-mode 615ecd39d1SJohan Jonker - mdio 625ecd39d1SJohan Jonker 635ecd39d1SJohan JonkerallOf: 64*3079bfdbSRob Herring - $ref: ethernet-controller.yaml# 655ecd39d1SJohan Jonker - if: 665ecd39d1SJohan Jonker properties: 675ecd39d1SJohan Jonker compatible: 685ecd39d1SJohan Jonker contains: 695ecd39d1SJohan Jonker const: rockchip,rk3036-emac 705ecd39d1SJohan Jonker 715ecd39d1SJohan Jonker then: 725ecd39d1SJohan Jonker properties: 735ecd39d1SJohan Jonker clocks: 745ecd39d1SJohan Jonker minItems: 3 755ecd39d1SJohan Jonker 765ecd39d1SJohan Jonker clock-names: 775ecd39d1SJohan Jonker minItems: 3 785ecd39d1SJohan Jonker 795ecd39d1SJohan Jonker else: 805ecd39d1SJohan Jonker properties: 815ecd39d1SJohan Jonker clocks: 825ecd39d1SJohan Jonker maxItems: 2 835ecd39d1SJohan Jonker 845ecd39d1SJohan Jonker clock-names: 855ecd39d1SJohan Jonker maxItems: 2 865ecd39d1SJohan Jonker 875ecd39d1SJohan JonkerunevaluatedProperties: false 885ecd39d1SJohan Jonker 895ecd39d1SJohan Jonkerexamples: 905ecd39d1SJohan Jonker - | 915ecd39d1SJohan Jonker #include <dt-bindings/clock/rk3188-cru-common.h> 925ecd39d1SJohan Jonker #include <dt-bindings/interrupt-controller/arm-gic.h> 935ecd39d1SJohan Jonker 945ecd39d1SJohan Jonker ethernet@10204000 { 955ecd39d1SJohan Jonker compatible = "rockchip,rk3188-emac"; 965ecd39d1SJohan Jonker reg = <0xc0fc2000 0x3c>; 975ecd39d1SJohan Jonker interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; 985ecd39d1SJohan Jonker clocks = <&cru HCLK_EMAC>, <&cru SCLK_MAC>; 995ecd39d1SJohan Jonker clock-names = "hclk", "macref"; 1005ecd39d1SJohan Jonker rockchip,grf = <&grf>; 1015ecd39d1SJohan Jonker pinctrl-0 = <&emac_xfer>, <&emac_mdio>, <&phy_int>; 1025ecd39d1SJohan Jonker pinctrl-names = "default"; 1035ecd39d1SJohan Jonker phy = <&phy0>; 1045ecd39d1SJohan Jonker phy-mode = "rmii"; 1055ecd39d1SJohan Jonker phy-supply = <&vcc_rmii>; 1065ecd39d1SJohan Jonker 1075ecd39d1SJohan Jonker mdio { 1085ecd39d1SJohan Jonker #address-cells = <1>; 1095ecd39d1SJohan Jonker #size-cells = <0>; 1105ecd39d1SJohan Jonker 1115ecd39d1SJohan Jonker phy0: ethernet-phy@0 { 1125ecd39d1SJohan Jonker reg = <1>; 1135ecd39d1SJohan Jonker }; 1145ecd39d1SJohan Jonker }; 1155ecd39d1SJohan Jonker }; 116