Debian Codegraph @

Documentation/devicetree/bindings/net/spacemit,k1-emac.yaml

raw
1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/net/spacemit,k1-emac.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: SpacemiT K1 Ethernet MAC
8
9 allOf:
10 - $ref: ethernet-controller.yaml#
11
12 maintainers:
13 - Vivian Wang <[email protected]>
14
15 properties:
16 compatible:
17 const: spacemit,k1-emac
18
19 reg:
20 maxItems: 1
21
22 clocks:
23 maxItems: 1
24
25 interrupts:
26 maxItems: 1
27
28 mdio-bus:
29 $ref: mdio.yaml#
30 unevaluatedProperties: false
31
32 resets:
33 maxItems: 1
34
35 spacemit,apmu:
36 $ref: /schemas/types.yaml#/definitions/phandle-array
37 items:
38 - items:
39 - description: phandle to syscon that controls this MAC
40 - description: offset of control registers
41 description:
42 A phandle to syscon with byte offset to control registers for this MAC
43
44 required:
45 - compatible
46 - reg
47 - clocks
48 - interrupts
49 - resets
50 - spacemit,apmu
51
52 unevaluatedProperties: false
53
54 examples:
55 - |
56 #include <dt-bindings/clock/spacemit,k1-syscon.h>
57
58 ethernet@cac80000 {
59 compatible = "spacemit,k1-emac";
60 reg = <0xcac80000 0x00000420>;
61 clocks = <&syscon_apmu CLK_EMAC0_BUS>;
62 interrupts = <131>;
63 mac-address = [ 00 00 00 00 00 00 ];
64 phy-handle = <&rgmii0>;
65 phy-mode = "rgmii-id";
66 pinctrl-names = "default";
67 pinctrl-0 = <&gmac0_cfg>;
68 resets = <&syscon_apmu RESET_EMAC0>;
69 rx-internal-delay-ps = <0>;
70 tx-internal-delay-ps = <0>;
71 spacemit,apmu = <&syscon_apmu 0x3e4>;
72
73 mdio-bus {
74 #address-cells = <0x1>;
75 #size-cells = <0x0>;
76
77 rgmii0: phy@1 {
78 reg = <0x1>;
79 };
80 };
81 };