StarFive JH7110 DWMAC glue layer
Schema identifier ($id): "http://devicetree.org/schemas/net/starfive,jh7110-dwmac.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Emil Renner Berthing <kernel@esmil.dk>", "Samin Guo <samin.guo@starfivetech.com>"
Automatic schema selection (select) #
Properties and child nodes (
properties) #
compatible— required here #Rule for matching array elements (
contains)Allowed values (
enum):"starfive,jh7100-dwmac","starfive,jh7110-dwmac"
Properties and child nodes (properties) #
compatible — required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Array item rules (
items)Item 1
Exact value (
const):"starfive,jh7100-dwmac"Item 2
Exact value (
const):"snps,dwmac"
Rule 2
Array item rules (
items)Item 1
Exact value (
const):"starfive,jh7110-dwmac"Item 2
Exact value (
const):"snps,dwmac-5.20"
Rule 3
Array item rules (
items)Item 1
Exact value (
const):"starfive,jh8100-dwmac"Item 2
Exact value (
const):"starfive,jh7110-dwmac"Item 3
Exact value (
const):"snps,dwmac-5.20"
reg — required here #
Maximum number of items (maxItems): 1
clocks — required here #
Array item rules (items) #
Item 1
GMAC main clock
Item 2
GMAC AHB clock
Item 3
PTP clock
Item 4
TX clock
Item 5
GTX clock
clock-names — required here #
Array item rules (items) #
Item 1
Exact value (
const):"stmmaceth"
Item 2
Exact value (
const):"pclk"
Item 3
Exact value (
const):"ptp_ref"
Item 4
Exact value (
const):"tx"
Item 5
Exact value (
const):"gtx"
starfive,tx-use-rgmii-clk — not listed as required here #
Tx clock is provided by external rgmii clock.
Value type (type): "boolean"
starfive,syscon — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle-array
Array item rules (items) #
Item 1
Array item rules (
items)Item 1
phandle to syscon that configures phy mode
Item 2
Offset of phy mode selection
Item 3
Shift of phy mode selection
A phandle to syscon with two arguments that configure phy mode. The argument one is the offset of phy mode selection, the argument two is the shift of phy mode selection.
Required in this object (required): "compatible", "reg", "clocks", "clock-names", "interrupts", "interrupt-names", "resets", "reset-names"
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)Exact value (
const):"starfive,jh7100-dwmac"When the condition matches (
then) #Properties and child nodes (
properties)
interrupts— not listed as required hereMinimum number of items (
minItems):2Maximum number of items (
maxItems):2
interrupt-names— not listed as required hereMinimum number of items (
minItems):2Maximum number of items (
maxItems):2
resets— not listed as required hereMaximum number of items (
maxItems):1
reset-names— not listed as required hereExact value (
const):"ahb"
Rule 3 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Exact value (
const):"starfive,jh7110-dwmac"When the condition matches (
then) #Properties and child nodes (
properties)
interrupts— not listed as required hereMinimum number of items (
minItems):3Maximum number of items (
maxItems):3
interrupt-names— not listed as required hereMinimum number of items (
minItems):3Maximum number of items (
maxItems):3Condition (
if)Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Exact value (
const):"starfive,jh8100-dwmac"When the condition matches (
then)Properties and child nodes (
properties)
resets— not listed as required hereMaximum number of items (
maxItems):1
reset-names— not listed as required hereExact value (
const):"stmmaceth"When the condition does not match (
else)Properties and child nodes (
properties)
resets— not listed as required hereMinimum number of items (
minItems):2
reset-names— not listed as required hereMinimum number of items (
minItems):2
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Examples (examples) #
ethernet@16030000 {
compatible = "starfive,jh7110-dwmac", "snps,dwmac-5.20";
reg = <0x16030000 0x10000>;
clocks = <&clk 3>, <&clk 2>, <&clk 109>,
<&clk 6>, <&clk 111>;
clock-names = "stmmaceth", "pclk", "ptp_ref",
"tx", "gtx";
resets = <&rst 1>, <&rst 2>;
reset-names = "stmmaceth", "ahb";
interrupts = <7>, <6>, <5>;
interrupt-names = "macirq", "eth_wake_irq", "eth_lpi";
phy-mode = "rgmii-id";
snps,multicast-filter-bins = <64>;
snps,perfect-filter-entries = <8>;
rx-fifo-depth = <2048>;
tx-fifo-depth = <2048>;
snps,fixed-burst;
snps,no-pbl-x8;
snps,tso;
snps,force_thresh_dma_mode;
snps,axi-config = <&stmmac_axi_setup>;
snps,en-tx-lpi-clockgating;
snps,txpbl = <16>;
snps,rxpbl = <16>;
starfive,syscon = <&aon_syscon 0xc 0x12>;
phy-handle = <&phy0>;
mdio {
#address-cells = <1>;
#size-cells = <0>;
compatible = "snps,dwmac-mdio";
phy0: ethernet-phy@0 {
reg = <0>;
};
};
stmmac_axi_setup: stmmac-axi-config {
snps,lpi_en;
snps,wr_osr_lmt = <4>;
snps,rd_osr_lmt = <4>;
snps,blen = <256 128 64 32 0 0 0>;
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
Line 2: Copyright (C) 2022 StarFive Technology Co., Ltd.