Rockchip RK3036/RK3066/RK3188 Ethernet Media Access Controller (EMAC)

Schema identifier ($id): "http://devicetree.org/schemas/net/rockchip,emac.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Heiko Stuebner <heiko@sntech.de>"

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "rockchip,rk3036-emac", "rockchip,rk3066-emac", "rockchip,rk3188-emac"

reg — required here #

Maximum number of items (maxItems): 1

interrupts — required here #

Maximum number of items (maxItems): 1

clocks — required here #

Minimum number of items (minItems): 2

Array item rules (items) #

Item 1

host clock

Item 2

reference clock

Item 3

mac TX/RX clock

clock-names — required here #

Minimum number of items (minItems): 2

Array item rules (items) #

Item 1

Exact value (const): "hclk"

Item 2

Exact value (const): "macref"

Item 3

Exact value (const): "macclk"

rockchip,grf — required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle

Phandle to the syscon GRF used to control speed and mode for the EMAC.

phy-supply — not listed as required here #

Phandle to a regulator if the PHY needs one.

mdio — required here #

Shared schema rule ($ref): mdio.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Required in this object (required): "compatible", "reg", "interrupts", "clocks", "clock-names", "rockchip,grf", "phy", "phy-mode", "mdio"

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): ethernet-controller.yaml#

Rule 2 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "rockchip,rk3036-emac"

When the condition matches (then) #

Properties and child nodes (properties)

clocks — not listed as required here

Minimum number of items (minItems): 3

clock-names — not listed as required here

Minimum number of items (minItems): 3

When the condition does not match (else) #

Properties and child nodes (properties)

clocks — not listed as required here

Maximum number of items (maxItems): 2

clock-names — not listed as required here

Maximum number of items (maxItems): 2

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/clock/rk3188-cru-common.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>

ethernet@10204000 {
  compatible = "rockchip,rk3188-emac";
  reg = <0xc0fc2000 0x3c>;
  interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
  clocks = <&cru HCLK_EMAC>, <&cru SCLK_MAC>;
  clock-names = "hclk", "macref";
  rockchip,grf = <&grf>;
  pinctrl-0 = <&emac_xfer>, <&emac_mdio>, <&phy_int>;
  pinctrl-names = "default";
  phy = <&phy0>;
  phy-mode = "rmii";
  phy-supply = <&vcc_rmii>;

  mdio {
    #address-cells = <1>;
    #size-cells = <0>;

    phy0: ethernet-phy@0 {
      reg = <1>;
    };
  };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0

Edit this page