usb: onboard_dev: add the Rockchip rk1808
Subsystems (2)
PATCH 1/1 usb: onboard_dev: add the Rockchip rk1808
The rk1808 is the npu die in an rk3399pro package. It is wired to one of the usb3 controllers rather than to an external port, and it needs its reference clock running before it will boot, which is exactly what this driver exists to do for onboard devices.
It takes no supply from the driver: the rails are sequenced elsewhere. Only the clock matters here, and that is already optional and handled generically.
Two ids, because the die changes identity as it boots: 180a while it is in maskrom and then in the rockusb loader, 1808 once it is running.
--- drivers/usb/misc/onboard_usb_dev.h | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/usb/misc/onboard_usb_dev.h +8 -0
@@ -134,6 +134,12 @@ static const struct onboard_dev_pdata xmos_xvf3500_data = { .is_hub = false, }; +static const struct onboard_dev_pdata rockchip_rk1808_data = { + .reset_us =0 , + .num_supplies =0 , + .is_hub = false, +}; +static const struct of_device_id onboard_dev_match[] = { { .compatible ="usb-a-connector" , .data = &usb_a_conn_data, }, { .compatible ="usb424,2412" , .data = µchip_usb424_data, },
@@ -167,6 +173,8 @@ static const struct of_device_id onboard_dev_match[] = { { .compatible = "usb2109,817", .data = &vialab_vl817_data, }, { .compatible = "usb2109,2817", .data = &vialab_vl817_data, }, { .compatible = "usb20b1,0013", .data = &xmos_xvf3500_data, }, + { .compatible = "usb2207,1808", .data = &rockchip_rk1808_data, }, + { .compatible = "usb2207,180a", .data = &rockchip_rk1808_data, }, { .compatible = "usb3431,6241", .data = &corechips_sl6341_data, }, { .compatible = "usb3431,6341", .data = &corechips_sl6341_data, }, { .compatible = "usb5986,1198", .data = &bison_intcamera_data, },
Signature · 1 line
2.53.0
Heiko Stuebner
maintainerHi Rudi,
Am Montag, 24. August 2026, 04:52:02 Mitteleuropäische Sommerzeit schrieb Rudi Heitbaum:
Quoted 8 lines
The rk1808 is the npu die in an rk3399pro package. It is wired to one of the usb3 controllers rather than to an external port, and it needs its reference clock running before it will boot, which is exactly what this driver exists to do for onboard devices.
It takes no supply from the driver: the rails are sequenced elsewhere. Only the clock matters here, and that is already optional and handled generically.
the "elsewhere" might need a bit more explanation to verify it's the right implementation. Even if the regulators are always-on or something, we still want the supplies defined - for future uses.
Thanks
Heiko
Quoted 35 lines
Two ids, because the die changes identity as it boots: 180a while it is in maskrom and then in the rockusb loader, 1808 once it is running.
Signed-off-by Rudi Heitbaum <[email protected]>--- drivers/usb/misc/onboard_usb_dev.h | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/usb/misc/onboard_usb_dev.h +8
-0@@ -134,6 +134,12 @@ static const struct onboard_dev_pdata xmos_xvf3500_data = { .is_hub = false, }; +static const struct onboard_dev_pdata rockchip_rk1808_data = { + .reset_us =0 , + .num_supplies =0 , + .is_hub = false, +}; +static const struct of_device_id onboard_dev_match[] = { { .compatible ="usb-a-connector" , .data = &usb_a_conn_data, }, { .compatible ="usb424,2412" , .data = µchip_usb424_data, },@@ -167,6 +173,8 @@ static const struct of_device_id onboard_dev_match[] = { { .compatible = "usb2109,817", .data = &vialab_vl817_data, }, { .compatible = "usb2109,2817", .data = &vialab_vl817_data, }, { .compatible = "usb20b1,0013", .data = &xmos_xvf3500_data, }, + { .compatible = "usb2207,1808", .data = &rockchip_rk1808_data, }, + { .compatible = "usb2207,180a", .data = &rockchip_rk1808_data, }, { .compatible = "usb3431,6241", .data = &corechips_sl6341_data, }, { .compatible = "usb3431,6341", .data = &corechips_sl6341_data, }, { .compatible = "usb5986,1198", .data = &bison_intcamera_data, },
Quoted 8 lines · Heiko Stuebner
Hi Rudi,
Am Montag, 24. August 2026, 04:52:02 Mitteleuropäische Sommerzeit schrieb Rudi Heitbaum:
Quoted 5 lines
The rk1808 is the npu die in an rk3399pro package. It is wired to one of the usb3 controllers rather than to an external port, and it needs its reference clock running before it will boot, which is exactly what this driver exists to do for onboard devices.
Quoted 7 lines
Quoted 3 lines
It takes no supply from the driver: the rails are sequenced elsewhere. Only the clock matters here, and that is already optional and handled generically.
the "elsewhere" might need a bit more explanation to verify it's the right implementation. Even if the regulators are always-on or something, we still want the supplies defined - for future uses.
Hi Heiko,
As follow up on the bringup of the Rock-Pi-N10, the proposed change to the dtsi for the rk3399pro-vmarc-som is here, but needs the provision of the usb first.
https://github.com/heitbaum/linux/commit/6b114b6fff4022c330003d7f70ce09915ffd774f
Thanks
Rudi
Quoted 43 lines
Thanks
HeikoQuoted 35 lines
Two ids, because the die changes identity as it boots: 180a while it is in maskrom and then in the rockusb loader, 1808 once it is running.
Signed-off-by Rudi Heitbaum <[email protected]>--- drivers/usb/misc/onboard_usb_dev.h | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/usb/misc/onboard_usb_dev.h +8
-0@@ -134,6 +134,12 @@ static const struct onboard_dev_pdata xmos_xvf3500_data = { .is_hub = false, }; +static const struct onboard_dev_pdata rockchip_rk1808_data = { + .reset_us =0 , + .num_supplies =0 , + .is_hub = false, +}; +static const struct of_device_id onboard_dev_match[] = { { .compatible ="usb-a-connector" , .data = &usb_a_conn_data, }, { .compatible ="usb424,2412" , .data = µchip_usb424_data, },@@ -167,6 +173,8 @@ static const struct of_device_id onboard_dev_match[] = { { .compatible = "usb2109,817", .data = &vialab_vl817_data, }, { .compatible = "usb2109,2817", .data = &vialab_vl817_data, }, { .compatible = "usb20b1,0013", .data = &xmos_xvf3500_data, }, + { .compatible = "usb2207,1808", .data = &rockchip_rk1808_data, }, + { .compatible = "usb2207,180a", .data = &rockchip_rk1808_data, }, { .compatible = "usb3431,6241", .data = &corechips_sl6341_data, }, { .compatible = "usb3431,6341", .data = &corechips_sl6341_data, }, { .compatible = "usb5986,1198", .data = &bison_intcamera_data, },
Heiko Stübner
maintainerHi Rudi,
Am Freitag, 28. August 2026, 12:55:56 Mitteleuropäische Sommerzeit schrieb Rudi Heitbaum:
Quoted 11 lines · Heiko Stuebner
Quoted 10 lines
Am Montag, 24. August 2026, 04:52:02 Mitteleuropäische Sommerzeit schrieb Rudi Heitbaum:
Quoted 8 lines
The rk1808 is the npu die in an rk3399pro package. It is wired to one of the usb3 controllers rather than to an external port, and it needs its reference clock running before it will boot, which is exactly what this driver exists to do for onboard devices.
It takes no supply from the driver: the rails are sequenced elsewhere. Only the clock matters here, and that is already optional and handled generically.
Quoted 7 lines
Quoted 3 lines
the "elsewhere" might need a bit more explanation to verify it's the right implementation. Even if the regulators are always-on or something, we still want the supplies defined - for future uses.
As follow up on the bringup of the Rock-Pi-N10, the proposed change to the dtsi for the rk3399pro-vmarc-som is here, but needs the provision of the usb first.
https://github.com/heitbaum/linux/commit/6b114b6fff4022c330003d7f70ce09915ffd774f
I might have formulated that strangly, what I meant was, who is enabling the power supplies.
The "NPU Power" part of any rk3399pro schematics (should) list 5 power supplies for the NPU block itself:
NPU_LOGIC_VDD
--> regulator likely named NPU_VDD_LOG_S0
--> enabled by NPU_PWREN_2 gpio fixed regulatorNPU_EFUSE_VQPS
--> regulator likely named NPU_VCC1V8_EFUSE
--> enabled by NPU_EFUSE_EN_H gpio fixed regulatorNPU_CORE_VDD
--> regulator likely named NPU_VDD_S0
--> TCS4525 regulator with voltage being set via the i2c controller
inside the NPU - but enabled by the NPU_PWREN_6 gpio from
core RK3399.NPU_CPU_VDD
--> regulator likely named NPU_VDD_CPU_S0
--> enabled by NPU_PWREN_4 gpio fixed regulatorNPU_ADC_AVDD_1V8
--> regulator likely named NPU_VCC_1V8_S3
--> enabled by NPU_PWREN_3 gpio fixed regulatorNaming might vary, I found just some EVB schematics.
Someone needs to enable these, so the question was, who is doing that?
Thanks
Heiko
Quoted 46 lines · Heiko Stübner
Hi Rudi,
Am Freitag, 28. August 2026, 12:55:56 Mitteleuropäische Sommerzeit schrieb Rudi Heitbaum:
Quoted 11 lines · Heiko Stuebner
Quoted 10 lines
Am Montag, 24. August 2026, 04:52:02 Mitteleuropäische Sommerzeit schrieb Rudi Heitbaum:
Quoted 8 lines
The rk1808 is the npu die in an rk3399pro package. It is wired to one of the usb3 controllers rather than to an external port, and it needs its reference clock running before it will boot, which is exactly what this driver exists to do for onboard devices.
It takes no supply from the driver: the rails are sequenced elsewhere. Only the clock matters here, and that is already optional and handled generically.
Quoted 7 lines
Quoted 3 lines
the "elsewhere" might need a bit more explanation to verify it's the right implementation. Even if the regulators are always-on or something, we still want the supplies defined - for future uses.
As follow up on the bringup of the Rock-Pi-N10, the proposed change to the dtsi for the rk3399pro-vmarc-som is here, but needs the provision of the usb first.
https://github.com/heitbaum/linux/commit/6b114b6fff4022c330003d7f70ce09915ffd774fI might have formulated that strangly, what I meant was, who is enabling the power supplies.
The "NPU Power" part of any rk3399pro schematics (should) list 5 power supplies for the NPU block itself:
NPU_LOGIC_VDD--> regulator likely named NPU_VDD_LOG_S0 --> enabled by NPU_PWREN_2 gpio fixed regulator
NPU_EFUSE_VQPS--> regulator likely named NPU_VCC1V8_EFUSE --> enabled by NPU_EFUSE_EN_H gpio fixed regulator
NPU_CORE_VDD--> regulator likely named NPU_VDD_S0 --> TCS4525 regulator with voltage being set via the i2c controller inside the NPU - but enabled by the NPU_PWREN_6 gpio from core RK3399.
NPU_CPU_VDD--> regulator likely named NPU_VDD_CPU_S0 --> enabled by NPU_PWREN_4 gpio fixed regulator
Quoted 7 lines
NPU_ADC_AVDD_1V8--> regulator likely named NPU_VCC_1V8_S3 --> enabled by NPU_PWREN_3 gpio fixed regulatorNaming might vary, I found just some EVB schematics.
Someone needs to enable these, so the question was, who is doing that?
Hi Heiko,
I hadn't looked in to these from the mainline viewpoint. I had been using an adapted vendor script based on the radxa npu_powerctl binary which reimplements the npu_reset sequence over GPIO.
This has been the sequence:
gpio0 line 4 NPU_PWREN_1 -> 1, 2 ms gpio0 line 10 NPU_PWREN_2 -> 1, 2 ms gpio0 line 11 NPU_PWREN_3 -> 1, 2 ms gpio1 line 22 -> 1, 2 ms gpio1 line 23 -> 1, 2 ms gpio1 line 24 NPU_PWREN_6 -> 1, 25 ms gpio1 line 0 -> 1 (reset release)
I have the schematics and the working N10 here, so let me look into describing these in the .dts and update the onboard_usb_dev.h.
Would you prefer that once I have a working and tested dts description of the rk1808 - submit the onboard_usb_dev.h and rk3399pro-vmarc-som.dtsi changes as a patchset - or just update the onboard_usb_dev.h as a v2?
Regards
Rudi
Quoted 5 lines
Thanks
Heiko
Hello Rudi,
Quoted 16 lines · Rudi Heitbaum
Hi Heiko,
I hadn't looked in to these from the mainline viewpoint. I had been using an adapted vendor script based on the radxa
npu_powerctlbinary which reimplements thenpu_resetsequence over GPIO.This has been the sequence:
gpio0 line 4 NPU_PWREN_1 -> 1, 2 ms gpio0 line 10 NPU_PWREN_2 -> 1, 2 ms gpio0 line 11 NPU_PWREN_3 -> 1, 2 ms gpio1 line 22 -> 1, 2 ms gpio1 line 23 -> 1, 2 ms gpio1 line 24 NPU_PWREN_6 -> 1, 25 ms gpio1 line 0 -> 1 (reset release)
Quoted 3 lines
I have the schematics and the working N10 here, so let me look into describing these in the .dts and update the
onboard_usb_dev.h.
Perhaps we should first check whether the power-on sequence in onboard_usb_dev.c meets the requirements, as it enables all regulator supplies at the same time.
Signature · 8 lines
Best, Chaoyi _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
Quoted 8 lines · Chaoyi Chen
Hello Rudi,
Quoted 5 lines · Rudi Heitbaum
Hi Heiko,
I hadn't looked in to these from the mainline viewpoint. I had been using an adapted vendor script based on the radxa
npu_powerctlbinary which reimplements thenpu_resetsequence over GPIO.
...
Quoted 7 lines
Quoted 3 lines
I have the schematics and the working N10 here, so let me look into describing these in the .dts and update the
onboard_usb_dev.h.Perhaps we should first check whether the power-on sequence in
onboard_usb_dev.cmeets the requirements, as it enables all regulator supplies at the same time.
Hi Chaoyi and Heiko,
I have done some work on the bringup of the rk1808, and can confirm that it needs six rails up and its reset released before it appears on the bus. There are no ordering requirements, issuing the reset 25 ms later is reliably working. The supply names being "vdd", "vddlog", "vddcpu", "vdd0v8", "vcc1v8", "vccio". This moves the power-on into the kernel and not the userland script.
The MAX_SUPPLIES fixed size array needs to be expanded from 2 to 6 to accommodate the rails.
The rock-pi-n10 and the on-die rk1808 (including the onboard VIP8000Nano-Q NPU) are now both running on the 7.2 mainline kernel. The rock-pi-n10/rk3399pro-vmarc-som is booting with the mainline .dts and the rk1808 is booting with an adapted vendor .dts.
The required changes to the drivers/usb/misc/onboard_usb_dev.h are now:
@@ -6,1 +6,1 @@
-#define MAX_SUPPLIES 2
+#define MAX_SUPPLIES 6
@@ -134,6 +134,6 @@ static const struct onboard_dev_pdata xmos_xvf3500_data = { +static const struct onboard_dev_pdata rockchip_rk1808_data = {
+ .reset_us = 25000,
+ .num_supplies = 6,
+ .supply_names = { "vdd", "vddlog", "vddcpu", "vdd0v8", "vcc1v8", "vccio" },
+ .is_hub = false,
+};
@@ -167,2 +167,2 @@ static const struct of_device_id onboard_dev_match[] = {
+ { .compatible = "usb2207,1808", .data = &rockchip_rk1808_data, },
+ { .compatible = "usb2207,180a", .data = &rockchip_rk1808_data, },
Hoping to get your direction on this, and if this can go through as a single patch, or should be raised as a series. I will raise a v2 of the above if this is suitable.
https://github.com/heitbaum/linux/commits/rock-pi-n10/
https://github.com/heitbaum/linux/commits/rk1808/
Regards
Rudi
Quoted 5 lines
Signature · 3 lines
-- Best, Chaoyi
Hello Rudi,
Quoted 53 lines · Rudi Heitbaum
Quoted 8 lines · Chaoyi Chen
Hello Rudi,
Quoted 5 lines · Rudi Heitbaum
Hi Heiko,
I hadn't looked in to these from the mainline viewpoint. I had been using an adapted vendor script based on the radxa
npu_powerctlbinary which reimplements thenpu_resetsequence over GPIO....
Quoted 7 lines
Quoted 3 lines
I have the schematics and the working N10 here, so let me look into describing these in the .dts and update the
onboard_usb_dev.h.Perhaps we should first check whether the power-on sequence in
onboard_usb_dev.cmeets the requirements, as it enables all regulator supplies at the same time.Hi Chaoyi and Heiko,
I have done some work on the bringup of the rk1808, and can confirm that it needs six rails up and its reset released before it appears on the bus. There are no ordering requirements, issuing the reset 25 ms later is reliably working. The supply names being "vdd", "vddlog", "vddcpu", "vdd0v8", "vcc1v8", "vccio". This moves the power-on into the kernel and not the userland script.
The
MAX_SUPPLIESfixed size array needs to be expanded from 2 to 6 to accommodate the rails.The rock-pi-n10 and the on-die rk1808 (including the onboard VIP8000Nano-Q NPU) are now both running on the 7.2 mainline kernel. The rock-pi-n10/rk3399pro-vmarc-som is booting with the mainline .dts and the rk1808 is booting with an adapted vendor .dts.
The required changes to the
drivers/usb/misc/onboard_usb_dev.hare now:@@ -6,1 +6,1 @@
-#defineMAX_SUPPLIES2
+#defineMAX_SUPPLIES6@@ -134,6 +134,6 @@ static const struct
onboard_dev_pdataxmos_xvf3500_data= { +static const structonboard_dev_pdatarockchip_rk1808_data= {
+ .reset_us = 25000,
+ .num_supplies = 6,
+ .supply_names = { "vdd", "vddlog", "vddcpu", "vdd0v8", "vcc1v8", "vccio" },
+ .is_hub = false,
+};@@ -167,2 +167,2 @@ static const struct
of_device_idonboard_dev_match[] = {
+ { .compatible = "usb2207,1808", .data =&rockchip_rk1808_data, },
+ { .compatible = "usb2207,180a", .data =&rockchip_rk1808_data, },
Quoted 7 lines
Hoping to get your direction on this, and if this can go through as a single patch, or should be raised as a series. I will raise a v2 of the above if this is suitable.
https://github.com/heitbaum/linux/commits/rock-pi-n10/
https://github.com/heitbaum/linux/commits/rk1808/
I took a quick look at your submission. Since it spans multiple subsystems, I'd suggest splitting it into separate series by subsystem so that maintainers can review them more easily.
Signature · 2 lines
Best, Chaoyi