Sophgo SG2044 DWMAC glue layer
Schema identifier ($id): "http://devicetree.org/schemas/net/sophgo,sg2044-dwmac.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Inochi Amaoto <inochiama@gmail.com>"
Automatic schema selection (select) #
Properties and child nodes (
properties) #
compatible— required here #Rule for matching array elements (
contains)Allowed values (
enum):"sophgo,sg2044-dwmac","sophgo,sg2042-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):"sophgo,sg2042-dwmac"Item 2
Exact value (
const):"snps,dwmac-5.00a"
Rule 2
Array item rules (
items)Item 1
Exact value (
const):"sophgo,sg2044-dwmac"Item 2
Exact value (
const):"snps,dwmac-5.30a"
reg — required here #
Maximum number of items (maxItems): 1
clocks — required here #
Array item rules (items) #
Item 1
GMAC main clock
Item 2
PTP clock
Item 3
TX clock
clock-names — required here #
Array item rules (items) #
Item 1
Exact value (
const):"stmmaceth"
Item 2
Exact value (
const):"ptp_ref"
Item 3
Exact value (
const):"tx"
dma-noncoherent — not listed as required here #
true — No constraints added by this property rule.
interrupts — required here #
Maximum number of items (maxItems): 1
interrupt-names — required here #
Maximum number of items (maxItems): 1
resets — required here #
Maximum number of items (maxItems): 1
reset-names — required here #
Exact value (const): "stmmaceth"
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):"sophgo,sg2042-dwmac"When the condition matches (
then) #Properties and child nodes (
properties)
phy-mode— not listed as required hereWhen the condition does not match (
else) #Properties and child nodes (
properties)
phy-mode— not listed as required hereAllowed values (
enum):"rgmii","rgmii-rxid","rgmii-txid","rgmii-id"
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/interrupt-controller/irq.h>
ethernet@30006000 {
compatible = "sophgo,sg2044-dwmac", "snps,dwmac-5.30a";
reg = <0x30006000 0x4000>;
clocks = <&clk 151>, <&clk 152>, <&clk 154>;
clock-names = "stmmaceth", "ptp_ref", "tx";
interrupt-parent = <&intc>;
interrupts = <296 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "macirq";
phy-handle = <&phy0>;
phy-mode = "rgmii-id";
resets = <&rst 30>;
reset-names = "stmmaceth";
snps,multicast-filter-bins = <0>;
snps,perfect-filter-entries = <1>;
snps,aal;
snps,tso;
snps,txpbl = <32>;
snps,rxpbl = <32>;
snps,mtl-rx-config = <&gmac0_mtl_rx_setup>;
snps,mtl-tx-config = <&gmac0_mtl_tx_setup>;
snps,axi-config = <&gmac0_stmmac_axi_setup>;
gmac0_mtl_rx_setup: rx-queues-config {
snps,rx-queues-to-use = <8>;
snps,rx-sched-wsp;
queue0 {};
queue1 {};
queue2 {};
queue3 {};
queue4 {};
queue5 {};
queue6 {};
queue7 {};
};
gmac0_mtl_tx_setup: tx-queues-config {
snps,tx-queues-to-use = <8>;
queue0 {};
queue1 {};
queue2 {};
queue3 {};
queue4 {};
queue5 {};
queue6 {};
queue7 {};
};
gmac0_stmmac_axi_setup: stmmac-axi-config {
snps,blen = <16 8 4 0 0 0 0>;
snps,wr_osr_lmt = <1>;
snps,rd_osr_lmt = <2>;
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)