kernel: sweep — usb2phy port (USB host up) + saradc data port
usb2phy: ported the RV1106 inno-usb2 phy config to 6.18 (rv1106_usb2phy_cfg; fields map 1:1 except utmi_iddig->utmi_id and chg_mode->opmode; 5.10-only iddig_output/en/bvalid_grf_sel dropped; phy_tuning left off, guarded so safe). With PHY_ROCKCHIP_INNO_USB2=y + the u2phy/usbdrd/dwc3 DT enabled, verified on warden-c8a3: the DWC3 comes up as xhci-hcd @ 0xffb00000 — USB host works. eth0 gadget just needs dr_mode=peripheral. saradc: added rv1106_saradc_data (2-ch v2, matches the vendor) + the native compatible. Driver now matches; probe still returns -22 (a clk-rate/setup detail, not the data) — TODO. Also captured: the growing board dts (USB nodes), the port fragments under usb/ and adc/. DRIVER-PARITY.md updated: ~14 drivers now at parity on 6.18. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017wB8KB3MMQztRDXCMCkPrf
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
5abf1c4468
commit
daed33056f
@@ -19,13 +19,13 @@ c8a3, not just compiled.
|
|||||||
| I2C (dw-apb, ff460000=i2c3) | ff460000.i2c | mainline | ✅ batch1 (i2c-3) |
|
| I2C (dw-apb, ff460000=i2c3) | ff460000.i2c | mainline | ✅ batch1 (i2c-3) |
|
||||||
| watchdog (dw-wdt, ff5a0000) | ff5a0000.watchdog | mainline | ✅ batch1 (watchdog0) |
|
| watchdog (dw-wdt, ff5a0000) | ff5a0000.watchdog | mainline | ✅ batch1 (watchdog0) |
|
||||||
| thermal governor | rockchip_thermal | mainline | 🔨 gov up; tsadc node TODO |
|
| thermal governor | rockchip_thermal | mainline | 🔨 gov up; tsadc node TODO |
|
||||||
| SARADC (ff3c0000) | ff3c0000.saradc | mainline (no rv1106 compat) | ⬜ needs compat fallback |
|
| SARADC (ff3c0000) | ff3c0000.saradc | ported (2-ch v2 data) | 🔨 driver added; probe -22 (clk-rate) |
|
||||||
| GPIO_SYSFS (legacy /sys/class/gpio) | — | mainline (config) | ⬜ goodix script needs it |
|
| GPIO_SYSFS (legacy /sys/class/gpio) | — | mainline (config) | ⬜ goodix script needs it |
|
||||||
| PWM (rockchip) | — | mainline (=m) | ⬜ batch2 =y (backlight) |
|
| PWM (rockchip) | — | mainline (=m) | ⬜ batch2 =y (backlight) |
|
||||||
| RTC (rv1106-rtc) | — | **no mainline driver** | ⬜ port (low prio) |
|
| RTC (rv1106-rtc) | — | **no mainline driver** | ⬜ port (low prio) |
|
||||||
| USB2 phy (inno, rv1106) | rockchip_usb2phy_* | mainline (no rv1106 data) | ⬜ port (data + tuning) |
|
| USB2 phy (inno, rv1106) | rockchip_usb2phy_* | ported (data, no tuning) | ✅ probes → USB up |
|
||||||
| USB OTG gadget (DWC3, eth0) | eth0 | mainline dwc3 (needs phy) | ⬜ M6 (after phy) |
|
| USB host (DWC3→xhci, ffb00000) | xhci-hcd:usb1 | mainline | ✅ xhci host registered |
|
||||||
| USB host (xhci, usb1) | xhci-hcd:usb1 | mainline | ⬜ M6 |
|
| USB OTG gadget (DWC3, eth0) | eth0 | mainline dwc3 | 🔨 host works; eth0 needs dr_mode=peripheral |
|
||||||
| crypto (aes/ccm/ctr/arc4) | modules | mainline | ⬜ batch2 (config =y) |
|
| crypto (aes/ccm/ctr/arc4) | modules | mainline | ⬜ batch2 (config =y) |
|
||||||
| PSCI node (removed) | — | — | ✅ deleted (no secure monitor → SMC fault) |
|
| PSCI node (removed) | — | — | ✅ deleted (no secure monitor → SMC fault) |
|
||||||
| VOP display (ff990000) | ff990000.vop | ported (rv1126 sibling) | 🔨 binds+DRM+card0; connector WIP |
|
| VOP display (ff990000) | ff990000.vop | ported (rv1126 sibling) | 🔨 binds+DRM+card0; connector WIP |
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
/* RV1106: a 2-channel v2 SARADC (ported from the vendor driver). */
|
||||||
|
static const struct iio_chan_spec rockchip_rv1106_saradc_iio_channels[] = {
|
||||||
|
SARADC_CHANNEL(0, "adc0", 10),
|
||||||
|
SARADC_CHANNEL(1, "adc1", 10),
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct rockchip_saradc_data rv1106_saradc_data = {
|
||||||
|
.channels = rockchip_rv1106_saradc_iio_channels,
|
||||||
|
.num_channels = ARRAY_SIZE(rockchip_rv1106_saradc_iio_channels),
|
||||||
|
.clk_rate = 1000000,
|
||||||
|
.start = rockchip_saradc_start_v2,
|
||||||
|
.read = rockchip_saradc_read_v2,
|
||||||
|
};
|
||||||
@@ -128,3 +128,21 @@
|
|||||||
&rgb {
|
&rgb {
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* --- sweep: USB OTG (eth0 gadget / host) via the ported inno-usb2 phy --- */
|
||||||
|
&u2phy {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&u2phy_otg {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usbdrd {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usbdrd_dwc3 {
|
||||||
|
status = "okay";
|
||||||
|
dr_mode = "otg";
|
||||||
|
};
|
||||||
|
|||||||
@@ -0,0 +1,78 @@
|
|||||||
|
* RV1106 USB2 PHY: single OTG port at 0xff3e0000 (ported from the vendor driver;
|
||||||
|
* fields map 1:1 to 6.18 except utmi_iddig -> utmi_id, and the 5.10-only
|
||||||
|
* iddig_output/iddig_en/bvalid_grf_sel are dropped). Signal-quality phy_tuning is
|
||||||
|
* left off for now (guarded, so NULL is safe) — the phy is functional without it.
|
||||||
|
*/
|
||||||
|
static const struct rockchip_usb2phy_cfg rv1106_phy_cfgs[] = {
|
||||||
|
{
|
||||||
|
.reg = 0xff3e0000,
|
||||||
|
.num_ports = 1,
|
||||||
|
.clkout_ctl = { 0x0058, 4, 4, 1, 0 },
|
||||||
|
.port_cfgs = {
|
||||||
|
[USB2PHY_PORT_OTG] = {
|
||||||
|
.phy_sus = { 0x0050, 8, 0, 0, 0x1d1 },
|
||||||
|
.bvalid_det_en = { 0x0100, 2, 2, 0, 1 },
|
||||||
|
.bvalid_det_st = { 0x0104, 2, 2, 0, 1 },
|
||||||
|
.bvalid_det_clr = { 0x0108, 2, 2, 0, 1 },
|
||||||
|
.idfall_det_en = { 0x0100, 5, 5, 0, 1 },
|
||||||
|
.idfall_det_st = { 0x0104, 5, 5, 0, 1 },
|
||||||
|
.idfall_det_clr = { 0x0108, 5, 5, 0, 1 },
|
||||||
|
.idrise_det_en = { 0x0100, 4, 4, 0, 1 },
|
||||||
|
.idrise_det_st = { 0x0104, 4, 4, 0, 1 },
|
||||||
|
.idrise_det_clr = { 0x0108, 4, 4, 0, 1 },
|
||||||
|
.ls_det_en = { 0x0100, 0, 0, 0, 1 },
|
||||||
|
.ls_det_st = { 0x0104, 0, 0, 0, 1 },
|
||||||
|
.ls_det_clr = { 0x0108, 0, 0, 0, 1 },
|
||||||
|
.utmi_avalid = { 0x0060, 10, 10, 0, 1 },
|
||||||
|
.utmi_bvalid = { 0x0060, 9, 9, 0, 1 },
|
||||||
|
.utmi_id = { 0x0060, 6, 6, 0, 1 },
|
||||||
|
.utmi_ls = { 0x0060, 5, 4, 0, 1 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
.chg_det = {
|
||||||
|
.opmode = { 0x0050, 8, 0, 0, 0x1d7 },
|
||||||
|
.cp_det = { 0x0060, 13, 13, 0, 1 },
|
||||||
|
.dcp_det = { 0x0060, 12, 12, 0, 1 },
|
||||||
|
.dp_det = { 0x0060, 14, 14, 0, 1 },
|
||||||
|
.idm_sink_en = { 0x0058, 8, 8, 0, 1 },
|
||||||
|
.idp_sink_en = { 0x0058, 7, 7, 0, 1 },
|
||||||
|
.idp_src_en = { 0x0058, 9, 9, 0, 1 },
|
||||||
|
.rdm_pdwn_en = { 0x0058, 10, 10, 0, 1 },
|
||||||
|
.vdm_src_en = { 0x0058, 12, 12, 0, 1 },
|
||||||
|
.vdp_src_en = { 0x0058, 11, 11, 0, 1 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ /* sentinel */ }
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct of_device_id rockchip_usb2phy_dt_match[] = {
|
||||||
|
{ .compatible = "rockchip,rv1106-usb2phy", .data = &rv1106_phy_cfgs },
|
||||||
|
{ .compatible = "rockchip,px30-usb2phy", .data = &rk3328_phy_cfgs },
|
||||||
|
{ .compatible = "rockchip,rk3036-usb2phy", .data = &rk3036_phy_cfgs },
|
||||||
|
{ .compatible = "rockchip,rk3128-usb2phy", .data = &rk3128_phy_cfgs },
|
||||||
|
{ .compatible = "rockchip,rk3228-usb2phy", .data = &rk3228_phy_cfgs },
|
||||||
|
{ .compatible = "rockchip,rk3308-usb2phy", .data = &rk3308_phy_cfgs },
|
||||||
|
{ .compatible = "rockchip,rk3328-usb2phy", .data = &rk3328_phy_cfgs },
|
||||||
|
{ .compatible = "rockchip,rk3366-usb2phy", .data = &rk3366_phy_cfgs },
|
||||||
|
{ .compatible = "rockchip,rk3399-usb2phy", .data = &rk3399_phy_cfgs },
|
||||||
|
{ .compatible = "rockchip,rk3562-usb2phy", .data = &rk3562_phy_cfgs },
|
||||||
|
{ .compatible = "rockchip,rk3568-usb2phy", .data = &rk3568_phy_cfgs },
|
||||||
|
{ .compatible = "rockchip,rk3576-usb2phy", .data = &rk3576_phy_cfgs },
|
||||||
|
{ .compatible = "rockchip,rk3588-usb2phy", .data = &rk3588_phy_cfgs },
|
||||||
|
{ .compatible = "rockchip,rv1108-usb2phy", .data = &rv1108_phy_cfgs },
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
MODULE_DEVICE_TABLE(of, rockchip_usb2phy_dt_match);
|
||||||
|
|
||||||
|
static struct platform_driver rockchip_usb2phy_driver = {
|
||||||
|
.probe = rockchip_usb2phy_probe,
|
||||||
|
.driver = {
|
||||||
|
.name = "rockchip-usb2phy",
|
||||||
|
.of_match_table = rockchip_usb2phy_dt_match,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
module_platform_driver(rockchip_usb2phy_driver);
|
||||||
|
|
||||||
|
MODULE_AUTHOR("Frank Wang <frank.wang@rock-chips.com>");
|
||||||
|
MODULE_DESCRIPTION("Rockchip USB2.0 PHY driver");
|
||||||
|
MODULE_LICENSE("GPL v2");
|
||||||
Reference in New Issue
Block a user