Rockchip 10/100/1000 Ethernet driver(GMAC)
Schema identifier ($id): "http://devicetree.org/schemas/net/rockchip-dwmac.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "David Wu <david.wu@rock-chips.com>"
Automatic schema selection (select) #
Properties and child nodes (
properties) #
compatible— required here #Rule for matching array elements (
contains)Allowed values (
enum):"rockchip,px30-gmac","rockchip,rk3128-gmac","rockchip,rk3228-gmac","rockchip,rk3288-gmac","rockchip,rk3308-gmac","rockchip,rk3328-gmac","rockchip,rk3366-gmac","rockchip,rk3368-gmac","rockchip,rk3399-gmac","rockchip,rk3506-gmac","rockchip,rk3528-gmac","rockchip,rk3568-gmac","rockchip,rk3576-gmac","rockchip,rk3588-gmac","rockchip,rv1108-gmac","rockchip,rv1126-gmac"
Properties and child nodes (properties) #
compatible — required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Array item rules (
items)Item 1
Allowed values (
enum):"rockchip,px30-gmac","rockchip,rk3128-gmac","rockchip,rk3228-gmac","rockchip,rk3288-gmac","rockchip,rk3308-gmac","rockchip,rk3328-gmac","rockchip,rk3366-gmac","rockchip,rk3368-gmac","rockchip,rk3399-gmac","rockchip,rv1108-gmac"
Rule 2
Array item rules (
items)Item 1
Allowed values (
enum):"rockchip,rk3506-gmac","rockchip,rk3528-gmac","rockchip,rk3568-gmac","rockchip,rk3576-gmac","rockchip,rk3588-gmac","rockchip,rv1126-gmac"Item 2
Exact value (
const):"snps,dwmac-4.20a"
interrupts — not listed as required here #
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 2
interrupt-names — not listed as required here #
Minimum number of items (minItems): 1
Array item rules (items) #
Item 1
Exact value (
const):"macirq"
Item 2
Exact value (
const):"eth_wake_irq"
clocks — required here #
Minimum number of items (minItems): 4
Maximum number of items (maxItems): 8
clock-names — required here #
Rule for matching array elements (contains) #
Allowed values (
enum):"stmmaceth","mac_clk_tx","mac_clk_rx","aclk_mac","pclk_mac","clk_mac_ref","clk_mac_refout","clk_mac_speed"
dma-coherent — not listed as required here #
true — No constraints added by this property rule.
clock_in_out — not listed as required here #
For RGMII, it must be "input", means main clock(125MHz) is not sourced from SoC's PLL, but input from PHY. For RMII, "input" means PHY provides the reference clock(50MHz), "output" means GMAC provides the reference clock.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/string
Allowed values (enum): "input", "output"
Default value (default): "input"
rockchip,grf — required here #
The phandle of the syscon node for the general register file.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle
rockchip,php-grf — not listed as required here #
The phandle of the syscon node for the peripheral general register file.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle
tx_delay — not listed as required here #
Delay value for TXD timing.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Minimum value (minimum): 0
Maximum value (maximum): 127
Default value (default): 48
rx_delay — not listed as required here #
Delay value for RXD timing.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Minimum value (minimum): 0
Maximum value (maximum): 127
Default value (default): 16
phy-supply — not listed as required here #
PHY regulator
Required in this object (required): "compatible", "clocks", "clock-names", "rockchip,grf"
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):snps,dwmac.yaml#
Rule 2 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Allowed values (
enum):"rockchip,rk3576-gmac","rockchip,rk3588-gmac"When the condition matches (
then) #When the condition does not match (
else) #Properties and child nodes (
properties)
rockchip,php-grf— not listed as required here
false— Not permitted by this property rule.
Rule 3 #
Condition (
if) #This rule must not match (
not)Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Allowed values (
enum):"rockchip,rk3506-gmac","rockchip,rk3528-gmac"When the condition matches (
then) #Properties and child nodes (
properties)
clocks— not listed as required hereMinimum number of items (
minItems):5
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/rk3288-cru.h>
gmac: ethernet@ff290000 {
compatible = "rockchip,rk3288-gmac";
reg = <0xff290000 0x10000>;
interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "macirq";
clocks = <&cru SCLK_MAC>,
<&cru SCLK_MAC_RX>, <&cru SCLK_MAC_TX>,
<&cru SCLK_MACREF>, <&cru SCLK_MACREF_OUT>,
<&cru ACLK_GMAC>, <&cru PCLK_GMAC>;
clock-names = "stmmaceth",
"mac_clk_rx", "mac_clk_tx",
"clk_mac_ref", "clk_mac_refout",
"aclk_mac", "pclk_mac";
assigned-clocks = <&cru SCLK_MAC>;
assigned-clock-parents = <&ext_gmac>;
rockchip,grf = <&grf>;
phy-mode = "rgmii-id";
clock_in_out = "input";
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: GPL-2.0
Line 12: We need a select here so we don't match all nodes with 'snps,dwmac'