~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/devicetree/bindings/net/stm32-dwmac.yaml

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
  2 # Copyright 2019 BayLibre, SAS
  3 %YAML 1.2
  4 ---
  5 $id: http://devicetree.org/schemas/net/stm32-dwmac.yaml#
  6 $schema: http://devicetree.org/meta-schemas/core.yaml#
  7 
  8 title: STMicroelectronics STM32 / MCU DWMAC glue layer controller
  9 
 10 maintainers:
 11   - Alexandre Torgue <alexandre.torgue@foss.st.com>
 12   - Christophe Roullier <christophe.roullier@foss.st.com>
 13 
 14 description:
 15   This file documents platform glue layer for stmmac.
 16 
 17 # We need a select here so we don't match all nodes with 'snps,dwmac'
 18 select:
 19   properties:
 20     compatible:
 21       contains:
 22         enum:
 23           - st,stm32-dwmac
 24           - st,stm32mp1-dwmac
 25           - st,stm32mp13-dwmac
 26           - st,stm32mp25-dwmac
 27   required:
 28     - compatible
 29 
 30 properties:
 31   compatible:
 32     oneOf:
 33       - items:
 34           - enum:
 35               - st,stm32mp25-dwmac
 36           - const: snps,dwmac-5.20
 37       - items:
 38           - enum:
 39               - st,stm32mp1-dwmac
 40               - st,stm32mp13-dwmac
 41           - const: snps,dwmac-4.20a
 42       - items:
 43           - enum:
 44               - st,stm32-dwmac
 45           - const: snps,dwmac-4.10a
 46       - items:
 47           - enum:
 48               - st,stm32-dwmac
 49           - const: snps,dwmac-3.50a
 50 
 51   reg: true
 52 
 53   reg-names:
 54     items:
 55       - const: stmmaceth
 56 
 57   clocks:
 58     minItems: 3
 59     items:
 60       - description: GMAC main clock
 61       - description: MAC TX clock
 62       - description: MAC RX clock
 63       - description: For MPU family, used for power mode
 64       - description: For MPU family, used for PHY without quartz
 65       - description: PTP clock
 66 
 67   clock-names:
 68     minItems: 3
 69     maxItems: 6
 70     contains:
 71       enum:
 72         - stmmaceth
 73         - mac-clk-tx
 74         - mac-clk-rx
 75         - ethstp
 76         - eth-ck
 77         - ptp_ref
 78 
 79   st,syscon:
 80     $ref: /schemas/types.yaml#/definitions/phandle-array
 81     items:
 82       - minItems: 2
 83         items:
 84           - description: phandle to the syscon node which encompases the glue register
 85           - description: offset of the control register
 86           - description: field to set mask in register
 87     description:
 88       Should be phandle/offset pair. The phandle to the syscon node which
 89       encompases the glue register, the offset of the control register and
 90       the mask to set bitfield in control register
 91 
 92   st,ext-phyclk:
 93     description:
 94       set this property in RMII mode when you have PHY without crystal 50MHz and want to
 95       select RCC clock instead of ETH_REF_CLK. OR in RGMII mode when you want to select
 96       RCC clock instead of ETH_CLK125.
 97     type: boolean
 98 
 99   st,eth-clk-sel:
100     description:
101       set this property in RGMII PHY when you want to select RCC clock instead of ETH_CLK125.
102     type: boolean
103 
104   st,eth-ref-clk-sel:
105     description:
106       set this property in RMII mode when you have PHY without crystal 50MHz and want to
107       select RCC clock instead of ETH_REF_CLK.
108     type: boolean
109 
110   access-controllers:
111     minItems: 1
112     maxItems: 2
113 
114 required:
115   - compatible
116   - clocks
117   - clock-names
118   - st,syscon
119 
120 unevaluatedProperties: false
121 
122 allOf:
123   - $ref: snps,dwmac.yaml#
124   - if:
125       properties:
126         compatible:
127           contains:
128             enum:
129               - st,stm32-dwmac
130               - st,stm32mp1-dwmac
131               - st,stm32mp25-dwmac
132     then:
133       properties:
134         st,syscon:
135           items:
136             minItems: 2
137             maxItems: 2
138 
139   - if:
140       properties:
141         compatible:
142           contains:
143             enum:
144               - st,stm32mp13-dwmac
145     then:
146       properties:
147         st,syscon:
148           items:
149             minItems: 3
150             maxItems: 3
151 
152 examples:
153   - |
154     #include <dt-bindings/interrupt-controller/arm-gic.h>
155     #include <dt-bindings/clock/stm32mp1-clks.h>
156     //Example 1
157      ethernet0: ethernet@5800a000 {
158            compatible = "st,stm32mp1-dwmac", "snps,dwmac-4.20a";
159            reg = <0x5800a000 0x2000>;
160            reg-names = "stmmaceth";
161            interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
162            interrupt-names = "macirq";
163            clock-names = "stmmaceth",
164                      "mac-clk-tx",
165                      "mac-clk-rx",
166                      "ethstp",
167                      "eth-ck";
168            clocks = <&rcc ETHMAC>,
169                 <&rcc ETHTX>,
170                 <&rcc ETHRX>,
171                 <&rcc ETHSTP>,
172                 <&rcc ETHCK_K>;
173            st,syscon = <&syscfg 0x4>;
174            snps,pbl = <2>;
175            snps,axi-config = <&stmmac_axi_config_0>;
176            snps,tso;
177            phy-mode = "rgmii";
178        };
179 
180   - |
181     //Example 2 (MCU example)
182      ethernet1: ethernet@40028000 {
183            compatible = "st,stm32-dwmac", "snps,dwmac-3.50a";
184            reg = <0x40028000 0x8000>;
185            reg-names = "stmmaceth";
186            interrupts = <0 61 0>, <0 62 0>;
187            interrupt-names = "macirq", "eth_wake_irq";
188            clock-names = "stmmaceth", "mac-clk-tx", "mac-clk-rx";
189            clocks = <&rcc 0 25>, <&rcc 0 26>, <&rcc 0 27>;
190            st,syscon = <&syscfg 0x4>;
191            snps,pbl = <8>;
192            snps,mixed-burst;
193            phy-mode = "mii";
194        };
195 
196   - |
197     //Example 3
198      ethernet2: ethernet@40027000 {
199            compatible = "st,stm32-dwmac", "snps,dwmac-4.10a";
200            reg = <0x40028000 0x8000>;
201            reg-names = "stmmaceth";
202            interrupts = <61>;
203            interrupt-names = "macirq";
204            clock-names = "stmmaceth", "mac-clk-tx", "mac-clk-rx";
205            clocks = <&rcc 62>, <&rcc 61>, <&rcc 60>;
206            st,syscon = <&syscfg 0x4>;
207            snps,pbl = <8>;
208            phy-mode = "mii";
209        };

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php