Commit c31b670
committed
rk3528-10-phy-rockchip-inno-usb2: fix usbgrf regmap split (6.18 + 7.0 + 7.1)
The merged RK3528 USB2 PHY support patch (PR armbian#9500) collapsed
rphy->grf onto rphy->phy_base when the DT node had rockchip,usbgrf,
making GRF/port-control register accesses hit the standalone PHY
MMIO window instead of the syscon. On NanoPi Zero2 this prevents
the USB-C gadget from completing high-speed NCM enumeration: the
UDC stays at default/full-speed, Windows does not enumerate a
usable UsbNcm adapter, and usb0 stays DOWN/NO-CARRIER.
The patch description already documented the intended topology
(phy_base for the standalone PHY window, grf via the rockchip,usbgrf
phandle for port-control fields), but the implementation drifted.
Restore the split: keep phy_base mapped to the PHY node, and resolve
rphy->grf from the rockchip,usbgrf phandle. Fall back to the parent
syscon for older SoC layouts without the phandle.
Apply identically to rockchip64-6.18, rockchip64-7.0, and the
rockchip64-7.1 archive (added in 9d967ec, inherited the bug).
Tested on FriendlyElec NanoPi Zero2 (RK3528) with a configfs NCM
gadget over /sys/kernel/config/usb_gadget:
Before this patch:
/sys/class/udc/fe500000.usb/state = default
/sys/class/udc/fe500000.usb/current_speed = full-speed
usb0: DOWN, NO-CARRIER
Windows host: no UsbNcm Host Device
After this patch:
/sys/class/udc/fe500000.usb/state = configured
/sys/class/udc/fe500000.usb/current_speed = high-speed
usb0: UP, LOWER_UP, 10.10.10.1/24, fe80::12:34ff:fe56:789a/64
Windows host: UsbNcm Host Device armbian#5, Up, 426.0 Mbps
ping fe80::12:34ff:fe56:789a%122: 3 sent / 3 received / 0% loss
Note: a separate u_ether NULL-deref on gadget teardown is tracked
under PR armbian#9608 and is not addressed here.
Signed-off-by: Shlomi Marco <s.marco@rubycomm.com>1 parent 3ae6351 commit c31b670
3 files changed
Lines changed: 30 additions & 27 deletions
File tree
- patch/kernel/archive
- rockchip64-6.18
- rockchip64-7.0
- rockchip64-7.1
patch/kernel/archive/rockchip64-6.18/rk3528-10-phy-rockchip-inno-usb2-Add-support-for-RK3528.patch
Lines changed: 10 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
| 177 | + | |
177 | 178 | | |
| 179 | + | |
178 | 180 | | |
179 | 181 | | |
180 | 182 | | |
181 | | - | |
| 183 | + | |
182 | 184 | | |
183 | 185 | | |
184 | 186 | | |
| |||
215 | 217 | | |
216 | 218 | | |
217 | 219 | | |
218 | | - | |
| 220 | + | |
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
| |||
273 | 275 | | |
274 | 276 | | |
275 | 277 | | |
276 | | - | |
| 278 | + | |
277 | 279 | | |
278 | 280 | | |
279 | 281 | | |
| |||
283 | 285 | | |
284 | 286 | | |
285 | 287 | | |
286 | | - | |
| |||
Lines changed: 10 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
| 177 | + | |
177 | 178 | | |
| 179 | + | |
178 | 180 | | |
179 | 181 | | |
180 | 182 | | |
181 | | - | |
| 183 | + | |
182 | 184 | | |
183 | 185 | | |
184 | 186 | | |
| |||
215 | 217 | | |
216 | 218 | | |
217 | 219 | | |
218 | | - | |
| 220 | + | |
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
| |||
273 | 275 | | |
274 | 276 | | |
275 | 277 | | |
276 | | - | |
| 278 | + | |
277 | 279 | | |
278 | 280 | | |
279 | 281 | | |
| |||
283 | 285 | | |
284 | 286 | | |
285 | 287 | | |
286 | | - | |
| |||
Lines changed: 10 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
| 177 | + | |
177 | 178 | | |
| 179 | + | |
178 | 180 | | |
179 | 181 | | |
180 | 182 | | |
181 | | - | |
| 183 | + | |
182 | 184 | | |
183 | 185 | | |
184 | 186 | | |
| |||
215 | 217 | | |
216 | 218 | | |
217 | 219 | | |
218 | | - | |
| 220 | + | |
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
| |||
273 | 275 | | |
274 | 276 | | |
275 | 277 | | |
276 | | - | |
| 278 | + | |
277 | 279 | | |
278 | 280 | | |
279 | 281 | | |
| |||
283 | 285 | | |
284 | 286 | | |
285 | 287 | | |
286 | | - | |
| |||
0 commit comments