Commit 21fb43e
authored
Feature/sunxi mainline stmmac ac300 (#9952)
* sunxi: H618: drop unused legacy vendor sunxi-gmac driver and align Orange Pi Zero 2W
Remove the unused legacy vendor GMAC driver from patches. Revert syscon register range changes in the Orange Pi Zero 2W patch to align it with standard mainline stmmac bindings.
The vendor GMAC was only referenced in the Orange Pi Zero 2W (where it was broken) and the Banana Pi M4 Berry board (where it was disabled), making it completely safe to remove.
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
Assisted-by: Antigravity <antigravity@google.com>
* sunxi: EPHY: add dedicated modular AC300 EPHY driver
Introduce a dedicated, mainline-quality Clause 22 PHY driver for the Allwinner AC300 Ethernet PHY. This driver matches the AC300 EPHY via a custom compatible string and communicates directly over MDIO.
We compile the driver directly into the kernel (CONFIG_AC300_PHY=y) instead of building a module (CONFIG_AC300_PHY=m) for the following reasons:
- The integrated AC300 EPHY starts in a powered-down state.
- The MAC controller driver (dwmac-sun8i) is compiled in (y). If the AC300 PHY driver is built as a module (m), early MAC driver probing during boot will default to binding the generic C22 PHY driver because the AC300 module cannot be loaded yet.
- Without the custom AC300 PHY driver's early SYSCON configuration, clock gating setup, and Bandgap calibration programming, the EPHY will fail to negotiate a stable link or establish packet transmission on boot.
- Compiling the driver directly in ensures that it is immediately available to bind when the MAC probes, allowing out-of-the-box DHCP and network access.
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
Assisted-by: Antigravity <antigravity@google.com>
* sunxi: EPHY: Support internal PHYs for H616 in the stmmac driver
Introduce support for the co-packaged internal Ethernet Physical Layer (EPHY)
on Allwinner H616/H618 SoCs in the mainline dwmac-sun8i driver.
This adds internal PHY handling changes:
- Define emac_variant_h616_internal with internal PHY, MII, RMII, and RGMII support.
- Delay the MAC software reset until sun8i_dwmac_init phase. For internal PHYs,
doing a MAC software reset during early probe/mux-switching fails with an EMAC
reset timeout because the internal PHY's clocks are not yet active.
- Skip setting H3_EPHY_SELECT for the H616 syscon MDIO mux configuration, as
this bit is not applicable to H616/H618.
- Add stable locally-administered MAC address generation derived from the SoC chip ID
when a valid hardware address is not present.
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
Assisted-by: Antigravity <antigravity@google.com>
* sunxi: orangepi-zero2w: Enable AC300 EPHY in device tree patches
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
Assisted-by: Antigravity <antigravity@google.com>
---------
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>1 parent 5bfbe26 commit 21fb43e
14 files changed
Lines changed: 1179 additions & 8044 deletions
File tree
- config/kernel
- patch/kernel/archive
- sunxi-6.18
- patches.armbian
- sunxi-7.0
- patches.armbian
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
760 | 760 | | |
761 | 761 | | |
762 | 762 | | |
| 763 | + | |
763 | 764 | | |
764 | 765 | | |
765 | 766 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
759 | 759 | | |
760 | 760 | | |
761 | 761 | | |
| 762 | + | |
762 | 763 | | |
763 | 764 | | |
764 | 765 | | |
| |||
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
117 | 128 | | |
118 | 129 | | |
119 | 130 | | |
120 | 131 | | |
121 | 132 | | |
| 133 | + | |
122 | 134 | | |
123 | 135 | | |
124 | 136 | | |
| |||
Lines changed: 32 additions & 87 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | | - | |
| 10 | + | |
12 | 11 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | 12 | | |
63 | 13 | | |
64 | 14 | | |
| |||
134 | 84 | | |
135 | 85 | | |
136 | 86 | | |
137 | | - | |
| 87 | + | |
138 | 88 | | |
139 | 89 | | |
140 | | - | |
| 90 | + | |
141 | 91 | | |
142 | 92 | | |
143 | 93 | | |
| |||
204 | 154 | | |
205 | 155 | | |
206 | 156 | | |
207 | | - | |
| 157 | + | |
208 | 158 | | |
209 | 159 | | |
210 | 160 | | |
| |||
224 | 174 | | |
225 | 175 | | |
226 | 176 | | |
| 177 | + | |
227 | 178 | | |
228 | 179 | | |
229 | 180 | | |
230 | | - | |
| 181 | + | |
231 | 182 | | |
232 | 183 | | |
233 | 184 | | |
234 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
235 | 210 | | |
236 | 211 | | |
237 | 212 | | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
| 213 | + | |
242 | 214 | | |
243 | 215 | | |
244 | 216 | | |
| |||
260 | 232 | | |
261 | 233 | | |
262 | 234 | | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
| 235 | + | |
291 | 236 | | |
292 | 237 | | |
293 | 238 | | |
| |||
0 commit comments