Skip to content

Commit d9fcb34

Browse files
wensPaolo Abeni
authored andcommitted
dt-bindings: net: sun8i-emac: Add A523 GMAC200 compatible
The Allwinner A523 SoC family has a second Ethernet controller, called the GMAC200 in the BSP and T527 datasheet, and referred to as GMAC1 for numbering. This controller, according to BSP sources, is fully compatible with a slightly newer version of the Synopsys DWMAC core. The glue layer around the controller is the same as found around older DWMAC cores on Allwinner SoCs. The only slight difference is that since this is the second controller on the SoC, the register for the clock delay controls is at a different offset. Last, the integration includes a dedicated clock gate for the memory bus and the whole thing is put in a separately controllable power domain. Add a compatible string entry for it, and work in the requirements for a second clock and a power domain. Reviewed-by: Rob Herring (Arm) <[email protected]> Acked-by: Conor Dooley <[email protected]> Signed-off-by: Chen-Yu Tsai <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent 1a98f56 commit d9fcb34

File tree

1 file changed

+93
-2
lines changed

1 file changed

+93
-2
lines changed

Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml

Lines changed: 93 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@ maintainers:
1010
- Chen-Yu Tsai <[email protected]>
1111
- Maxime Ripard <[email protected]>
1212

13+
# We need a select here so we don't match all nodes with 'snps,dwmac'
14+
select:
15+
properties:
16+
compatible:
17+
contains:
18+
enum:
19+
- allwinner,sun8i-a83t-emac
20+
- allwinner,sun8i-h3-emac
21+
- allwinner,sun8i-r40-gmac
22+
- allwinner,sun8i-v3s-emac
23+
- allwinner,sun50i-a64-emac
24+
- allwinner,sun55i-a523-gmac200
25+
required:
26+
- compatible
27+
1328
properties:
1429
compatible:
1530
oneOf:
@@ -26,6 +41,9 @@ properties:
2641
- allwinner,sun50i-h616-emac0
2742
- allwinner,sun55i-a523-gmac0
2843
- const: allwinner,sun50i-a64-emac
44+
- items:
45+
- const: allwinner,sun55i-a523-gmac200
46+
- const: snps,dwmac-4.20a
2947

3048
reg:
3149
maxItems: 1
@@ -37,14 +55,21 @@ properties:
3755
const: macirq
3856

3957
clocks:
40-
maxItems: 1
58+
minItems: 1
59+
maxItems: 2
4160

4261
clock-names:
43-
const: stmmaceth
62+
minItems: 1
63+
items:
64+
- const: stmmaceth
65+
- const: mbus
4466

4567
phy-supply:
4668
description: PHY regulator
4769

70+
power-domains:
71+
maxItems: 1
72+
4873
syscon:
4974
$ref: /schemas/types.yaml#/definitions/phandle
5075
description:
@@ -191,6 +216,42 @@ allOf:
191216
- mdio-parent-bus
192217
- mdio@1
193218

219+
- if:
220+
properties:
221+
compatible:
222+
contains:
223+
const: allwinner,sun55i-a523-gmac200
224+
then:
225+
properties:
226+
clocks:
227+
minItems: 2
228+
clock-names:
229+
minItems: 2
230+
tx-internal-delay-ps:
231+
default: 0
232+
minimum: 0
233+
maximum: 700
234+
multipleOf: 100
235+
description:
236+
External RGMII PHY TX clock delay chain value in ps.
237+
rx-internal-delay-ps:
238+
default: 0
239+
minimum: 0
240+
maximum: 3100
241+
multipleOf: 100
242+
description:
243+
External RGMII PHY TX clock delay chain value in ps.
244+
required:
245+
- power-domains
246+
else:
247+
properties:
248+
clocks:
249+
maxItems: 1
250+
clock-names:
251+
maxItems: 1
252+
power-domains: false
253+
254+
194255
unevaluatedProperties: false
195256

196257
examples:
@@ -323,4 +384,34 @@ examples:
323384
};
324385
};
325386
387+
- |
388+
ethernet@4510000 {
389+
compatible = "allwinner,sun55i-a523-gmac200",
390+
"snps,dwmac-4.20a";
391+
reg = <0x04510000 0x10000>;
392+
clocks = <&ccu 117>, <&ccu 79>;
393+
clock-names = "stmmaceth", "mbus";
394+
resets = <&ccu 43>;
395+
reset-names = "stmmaceth";
396+
interrupts = <0 47 4>;
397+
interrupt-names = "macirq";
398+
pinctrl-names = "default";
399+
pinctrl-0 = <&rgmii1_pins>;
400+
power-domains = <&pck600 4>;
401+
syscon = <&syscon>;
402+
phy-handle = <&ext_rgmii_phy_1>;
403+
phy-mode = "rgmii-id";
404+
snps,fixed-burst;
405+
snps,axi-config = <&gmac1_stmmac_axi_setup>;
406+
407+
mdio {
408+
compatible = "snps,dwmac-mdio";
409+
#address-cells = <1>;
410+
#size-cells = <0>;
411+
412+
ext_rgmii_phy_1: ethernet-phy@1 {
413+
reg = <1>;
414+
};
415+
};
416+
};
326417
...

0 commit comments

Comments
 (0)