* [PATCH v2 1/7] arm64: dts: rockchip: Drop unused rk3328-xhci node
2023-06-06 17:09 [PATCH v2 0/7] rockchip: Fix RK3328 USB support Jagan Teki
@ 2023-06-06 17:09 ` Jagan Teki
2023-07-26 10:59 ` Kever Yang
2023-06-06 17:09 ` [PATCH v2 2/7] configs: Drop unused XHCI_DWC3 for RK3328 boards Jagan Teki
` (7 subsequent siblings)
8 siblings, 1 reply; 20+ messages in thread
From: Jagan Teki @ 2023-06-06 17:09 UTC (permalink / raw)
To: Kever Yang, Simon Glass, Philipp Tomsich
Cc: Jonas Karlman, u-boot, linux-amarula, Jagan Teki
rk3328-xhci has been added due to the fact that the upstream
dwc3 is unsupported. Moreover, the driver for rk3328-xhci is
not added to the code tree.
By considering these facts and unsupported rk3328-xhci this
patch is dropping all related code from DT. However, the DWC3
is fixed now in dwc3-generic and RK3328 USB 3.0 is functional
in upcoming patches.
Let's drop it.
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v2:
- none
arch/arm/dts/rk3328-evb-u-boot.dtsi | 5 -----
arch/arm/dts/rk3328-roc-cc-u-boot.dtsi | 14 --------------
arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi | 5 -----
arch/arm/dts/rk3328-rock64-u-boot.dtsi | 15 ---------------
arch/arm/dts/rk3328-u-boot.dtsi | 11 -----------
5 files changed, 50 deletions(-)
diff --git a/arch/arm/dts/rk3328-evb-u-boot.dtsi b/arch/arm/dts/rk3328-evb-u-boot.dtsi
index 4bfa0c2330..f9c729d3bd 100644
--- a/arch/arm/dts/rk3328-evb-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-evb-u-boot.dtsi
@@ -44,8 +44,3 @@
/* Integrated PHY unsupported by U-boot */
status = "broken";
};
-
-&usb_host0_xhci {
- vbus-supply = <&vcc5v0_host_xhci>;
- status = "okay";
-};
diff --git a/arch/arm/dts/rk3328-roc-cc-u-boot.dtsi b/arch/arm/dts/rk3328-roc-cc-u-boot.dtsi
index 27a454f017..2062f34bf8 100644
--- a/arch/arm/dts/rk3328-roc-cc-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-roc-cc-u-boot.dtsi
@@ -48,20 +48,6 @@
bootph-pre-ram;
};
-&usb_host0_xhci {
- vbus-supply = <&vcc_host1_5v>;
- status = "okay";
-};
-
-/*
- * This makes XHCI responsible for toggling VBUS. This is needed to work
- * around an issue where either XHCI only works with USB 2.0 or OTG doesn't
- * work, depending on how VBUS is configured. Having USB 3.0 seems better.
- */
-&vcc_host1_5v {
- /delete-property/ regulator-always-on;
-};
-
/* Need this and all the pinctrl/gpio stuff above to set pinmux */
&vcc_sd {
bootph-pre-ram;
diff --git a/arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi b/arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi
index 088e21c76a..1f220c6dcd 100644
--- a/arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi
@@ -45,11 +45,6 @@
bootph-pre-ram;
};
-&usb_host0_xhci {
- vbus-supply = <&vcc_host_5v>;
- status = "okay";
-};
-
/* Need this and all the pinctrl/gpio stuff above to set pinmux */
&vcc_sd {
bootph-pre-ram;
diff --git a/arch/arm/dts/rk3328-rock64-u-boot.dtsi b/arch/arm/dts/rk3328-rock64-u-boot.dtsi
index c20a99a620..849854302e 100644
--- a/arch/arm/dts/rk3328-rock64-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-rock64-u-boot.dtsi
@@ -48,21 +48,6 @@
bootph-pre-ram;
};
-&usb_host0_xhci {
- vbus-supply = <&vcc_host_5v>;
- status = "okay";
-};
-
-/*
- * This makes XHCI responsible for toggling VBUS. This is needed to work
- * around an issue where either XHCI only works with USB 2.0 or OTG doesn't
- * work, depending on how VBUS is configured. Having USB 3.0 seems better.
- */
-&vcc_host_5v {
- /delete-property/ regulator-always-on;
- /delete-property/ regulator-boot-on;
-};
-
/* Need this and all the pinctrl/gpio stuff above to set pinmux */
&vcc_sd {
bootph-pre-ram;
diff --git a/arch/arm/dts/rk3328-u-boot.dtsi b/arch/arm/dts/rk3328-u-boot.dtsi
index 668f8ca29d..ce96ce40a7 100644
--- a/arch/arm/dts/rk3328-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-u-boot.dtsi
@@ -26,17 +26,6 @@
0x0 0xff720000 0x0 0x1000
0x0 0xff798000 0x0 0x1000>;
};
-
- usb_host0_xhci: usb@ff600000 {
- compatible = "rockchip,rk3328-xhci";
- reg = <0x0 0xff600000 0x0 0x100000>;
- interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
- snps,dis-enblslpm-quirk;
- snps,phyif-utmi-bits = <16>;
- snps,dis-u2-freeclk-exists-quirk;
- snps,dis-u2-susphy-quirk;
- status = "disabled";
- };
};
&cru {
--
2.25.1
^ permalink raw reply related [flat|nested] 20+ messages in thread* Re: [PATCH v2 1/7] arm64: dts: rockchip: Drop unused rk3328-xhci node
2023-06-06 17:09 ` [PATCH v2 1/7] arm64: dts: rockchip: Drop unused rk3328-xhci node Jagan Teki
@ 2023-07-26 10:59 ` Kever Yang
0 siblings, 0 replies; 20+ messages in thread
From: Kever Yang @ 2023-07-26 10:59 UTC (permalink / raw)
To: Jagan Teki, Simon Glass, Philipp Tomsich
Cc: Jonas Karlman, u-boot, linux-amarula
On 2023/6/7 01:09, Jagan Teki wrote:
> rk3328-xhci has been added due to the fact that the upstream
> dwc3 is unsupported. Moreover, the driver for rk3328-xhci is
> not added to the code tree.
>
> By considering these facts and unsupported rk3328-xhci this
> patch is dropping all related code from DT. However, the DWC3
> is fixed now in dwc3-generic and RK3328 USB 3.0 is functional
> in upcoming patches.
>
> Let's drop it.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> Changes for v2:
> - none
>
> arch/arm/dts/rk3328-evb-u-boot.dtsi | 5 -----
> arch/arm/dts/rk3328-roc-cc-u-boot.dtsi | 14 --------------
> arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi | 5 -----
> arch/arm/dts/rk3328-rock64-u-boot.dtsi | 15 ---------------
> arch/arm/dts/rk3328-u-boot.dtsi | 11 -----------
> 5 files changed, 50 deletions(-)
>
> diff --git a/arch/arm/dts/rk3328-evb-u-boot.dtsi b/arch/arm/dts/rk3328-evb-u-boot.dtsi
> index 4bfa0c2330..f9c729d3bd 100644
> --- a/arch/arm/dts/rk3328-evb-u-boot.dtsi
> +++ b/arch/arm/dts/rk3328-evb-u-boot.dtsi
> @@ -44,8 +44,3 @@
> /* Integrated PHY unsupported by U-boot */
> status = "broken";
> };
> -
> -&usb_host0_xhci {
> - vbus-supply = <&vcc5v0_host_xhci>;
> - status = "okay";
> -};
> diff --git a/arch/arm/dts/rk3328-roc-cc-u-boot.dtsi b/arch/arm/dts/rk3328-roc-cc-u-boot.dtsi
> index 27a454f017..2062f34bf8 100644
> --- a/arch/arm/dts/rk3328-roc-cc-u-boot.dtsi
> +++ b/arch/arm/dts/rk3328-roc-cc-u-boot.dtsi
> @@ -48,20 +48,6 @@
> bootph-pre-ram;
> };
>
> -&usb_host0_xhci {
> - vbus-supply = <&vcc_host1_5v>;
> - status = "okay";
> -};
> -
> -/*
> - * This makes XHCI responsible for toggling VBUS. This is needed to work
> - * around an issue where either XHCI only works with USB 2.0 or OTG doesn't
> - * work, depending on how VBUS is configured. Having USB 3.0 seems better.
> - */
> -&vcc_host1_5v {
> - /delete-property/ regulator-always-on;
> -};
> -
> /* Need this and all the pinctrl/gpio stuff above to set pinmux */
> &vcc_sd {
> bootph-pre-ram;
> diff --git a/arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi b/arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi
> index 088e21c76a..1f220c6dcd 100644
> --- a/arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi
> +++ b/arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi
> @@ -45,11 +45,6 @@
> bootph-pre-ram;
> };
>
> -&usb_host0_xhci {
> - vbus-supply = <&vcc_host_5v>;
> - status = "okay";
> -};
> -
> /* Need this and all the pinctrl/gpio stuff above to set pinmux */
> &vcc_sd {
> bootph-pre-ram;
> diff --git a/arch/arm/dts/rk3328-rock64-u-boot.dtsi b/arch/arm/dts/rk3328-rock64-u-boot.dtsi
> index c20a99a620..849854302e 100644
> --- a/arch/arm/dts/rk3328-rock64-u-boot.dtsi
> +++ b/arch/arm/dts/rk3328-rock64-u-boot.dtsi
> @@ -48,21 +48,6 @@
> bootph-pre-ram;
> };
>
> -&usb_host0_xhci {
> - vbus-supply = <&vcc_host_5v>;
> - status = "okay";
> -};
> -
> -/*
> - * This makes XHCI responsible for toggling VBUS. This is needed to work
> - * around an issue where either XHCI only works with USB 2.0 or OTG doesn't
> - * work, depending on how VBUS is configured. Having USB 3.0 seems better.
> - */
> -&vcc_host_5v {
> - /delete-property/ regulator-always-on;
> - /delete-property/ regulator-boot-on;
> -};
> -
> /* Need this and all the pinctrl/gpio stuff above to set pinmux */
> &vcc_sd {
> bootph-pre-ram;
> diff --git a/arch/arm/dts/rk3328-u-boot.dtsi b/arch/arm/dts/rk3328-u-boot.dtsi
> index 668f8ca29d..ce96ce40a7 100644
> --- a/arch/arm/dts/rk3328-u-boot.dtsi
> +++ b/arch/arm/dts/rk3328-u-boot.dtsi
> @@ -26,17 +26,6 @@
> 0x0 0xff720000 0x0 0x1000
> 0x0 0xff798000 0x0 0x1000>;
> };
> -
> - usb_host0_xhci: usb@ff600000 {
> - compatible = "rockchip,rk3328-xhci";
> - reg = <0x0 0xff600000 0x0 0x100000>;
> - interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
> - snps,dis-enblslpm-quirk;
> - snps,phyif-utmi-bits = <16>;
> - snps,dis-u2-freeclk-exists-quirk;
> - snps,dis-u2-susphy-quirk;
> - status = "disabled";
> - };
> };
>
> &cru {
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v2 2/7] configs: Drop unused XHCI_DWC3 for RK3328 boards
2023-06-06 17:09 [PATCH v2 0/7] rockchip: Fix RK3328 USB support Jagan Teki
2023-06-06 17:09 ` [PATCH v2 1/7] arm64: dts: rockchip: Drop unused rk3328-xhci node Jagan Teki
@ 2023-06-06 17:09 ` Jagan Teki
2023-07-26 11:00 ` Kever Yang
2023-06-06 17:09 ` [PATCH v2 3/7] usb: dwc3-generic: Restrict single ctrl node for RK3328 Jagan Teki
` (6 subsequent siblings)
8 siblings, 1 reply; 20+ messages in thread
From: Jagan Teki @ 2023-06-06 17:09 UTC (permalink / raw)
To: Kever Yang, Simon Glass, Philipp Tomsich
Cc: Jonas Karlman, u-boot, linux-amarula, Jagan Teki, Tianling Shen,
David Bauer, Loic Devulder, Chen-Yu Tsai, Banglang Huang,
Matwey V . Kornilov
Driver support for rk3328 is not supported so drop this
unused XHCI_DWC3.
Cc: Tianling Shen <cnsztl@gmail.com>
Cc: David Bauer <mail@david-bauer.net>
Cc: Loic Devulder <ldevulder@suse.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Banglang Huang <banglang.huang@foxmail.com>
Cc: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v2:
- none
configs/evb-rk3328_defconfig | 1 -
configs/nanopi-r2c-rk3328_defconfig | 1 -
configs/nanopi-r2s-rk3328_defconfig | 1 -
configs/roc-cc-rk3328_defconfig | 1 -
configs/rock-pi-e-rk3328_defconfig | 1 -
configs/rock64-rk3328_defconfig | 1 -
6 files changed, 6 deletions(-)
diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
index 580ee502dc..5ab7abff9e 100644
--- a/configs/evb-rk3328_defconfig
+++ b/configs/evb-rk3328_defconfig
@@ -93,7 +93,6 @@ CONFIG_SYSRESET=y
# CONFIG_TPL_SYSRESET is not set
CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
-CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
diff --git a/configs/nanopi-r2c-rk3328_defconfig b/configs/nanopi-r2c-rk3328_defconfig
index 84710c185b..6af874ca2c 100644
--- a/configs/nanopi-r2c-rk3328_defconfig
+++ b/configs/nanopi-r2c-rk3328_defconfig
@@ -97,7 +97,6 @@ CONFIG_SYSRESET=y
# CONFIG_TPL_SYSRESET is not set
CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
-CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
diff --git a/configs/nanopi-r2s-rk3328_defconfig b/configs/nanopi-r2s-rk3328_defconfig
index 21d7a073e2..7b0fadbce9 100644
--- a/configs/nanopi-r2s-rk3328_defconfig
+++ b/configs/nanopi-r2s-rk3328_defconfig
@@ -97,7 +97,6 @@ CONFIG_SYSRESET=y
# CONFIG_TPL_SYSRESET is not set
CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
-CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
diff --git a/configs/roc-cc-rk3328_defconfig b/configs/roc-cc-rk3328_defconfig
index 6b3bc75ae9..477179e80e 100644
--- a/configs/roc-cc-rk3328_defconfig
+++ b/configs/roc-cc-rk3328_defconfig
@@ -102,7 +102,6 @@ CONFIG_SYSRESET=y
# CONFIG_TPL_SYSRESET is not set
CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
-CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
diff --git a/configs/rock-pi-e-rk3328_defconfig b/configs/rock-pi-e-rk3328_defconfig
index 9c67d0c5fe..633d5417a9 100644
--- a/configs/rock-pi-e-rk3328_defconfig
+++ b/configs/rock-pi-e-rk3328_defconfig
@@ -103,7 +103,6 @@ CONFIG_SYSRESET=y
# CONFIG_TPL_SYSRESET is not set
CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
-CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
index 74a9cc0a7d..ae761d08a1 100644
--- a/configs/rock64-rk3328_defconfig
+++ b/configs/rock64-rk3328_defconfig
@@ -100,7 +100,6 @@ CONFIG_SYSRESET=y
# CONFIG_TPL_SYSRESET is not set
CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
-CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
--
2.25.1
^ permalink raw reply related [flat|nested] 20+ messages in thread* Re: [PATCH v2 2/7] configs: Drop unused XHCI_DWC3 for RK3328 boards
2023-06-06 17:09 ` [PATCH v2 2/7] configs: Drop unused XHCI_DWC3 for RK3328 boards Jagan Teki
@ 2023-07-26 11:00 ` Kever Yang
0 siblings, 0 replies; 20+ messages in thread
From: Kever Yang @ 2023-07-26 11:00 UTC (permalink / raw)
To: Jagan Teki, Simon Glass, Philipp Tomsich
Cc: Jonas Karlman, u-boot, linux-amarula, Tianling Shen, David Bauer,
Loic Devulder, Chen-Yu Tsai, Banglang Huang, Matwey V . Kornilov
On 2023/6/7 01:09, Jagan Teki wrote:
> Driver support for rk3328 is not supported so drop this
> unused XHCI_DWC3.
>
> Cc: Tianling Shen <cnsztl@gmail.com>
> Cc: David Bauer <mail@david-bauer.net>
> Cc: Loic Devulder <ldevulder@suse.com>
> Cc: Chen-Yu Tsai <wens@csie.org>
> Cc: Banglang Huang <banglang.huang@foxmail.com>
> Cc: Matwey V. Kornilov <matwey.kornilov@gmail.com>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> Changes for v2:
> - none
>
> configs/evb-rk3328_defconfig | 1 -
> configs/nanopi-r2c-rk3328_defconfig | 1 -
> configs/nanopi-r2s-rk3328_defconfig | 1 -
> configs/roc-cc-rk3328_defconfig | 1 -
> configs/rock-pi-e-rk3328_defconfig | 1 -
> configs/rock64-rk3328_defconfig | 1 -
> 6 files changed, 6 deletions(-)
>
> diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
> index 580ee502dc..5ab7abff9e 100644
> --- a/configs/evb-rk3328_defconfig
> +++ b/configs/evb-rk3328_defconfig
> @@ -93,7 +93,6 @@ CONFIG_SYSRESET=y
> # CONFIG_TPL_SYSRESET is not set
> CONFIG_USB=y
> CONFIG_USB_XHCI_HCD=y
> -CONFIG_USB_XHCI_DWC3=y
> CONFIG_USB_EHCI_HCD=y
> CONFIG_USB_EHCI_GENERIC=y
> CONFIG_USB_OHCI_HCD=y
> diff --git a/configs/nanopi-r2c-rk3328_defconfig b/configs/nanopi-r2c-rk3328_defconfig
> index 84710c185b..6af874ca2c 100644
> --- a/configs/nanopi-r2c-rk3328_defconfig
> +++ b/configs/nanopi-r2c-rk3328_defconfig
> @@ -97,7 +97,6 @@ CONFIG_SYSRESET=y
> # CONFIG_TPL_SYSRESET is not set
> CONFIG_USB=y
> CONFIG_USB_XHCI_HCD=y
> -CONFIG_USB_XHCI_DWC3=y
> CONFIG_USB_EHCI_HCD=y
> CONFIG_USB_EHCI_GENERIC=y
> CONFIG_USB_OHCI_HCD=y
> diff --git a/configs/nanopi-r2s-rk3328_defconfig b/configs/nanopi-r2s-rk3328_defconfig
> index 21d7a073e2..7b0fadbce9 100644
> --- a/configs/nanopi-r2s-rk3328_defconfig
> +++ b/configs/nanopi-r2s-rk3328_defconfig
> @@ -97,7 +97,6 @@ CONFIG_SYSRESET=y
> # CONFIG_TPL_SYSRESET is not set
> CONFIG_USB=y
> CONFIG_USB_XHCI_HCD=y
> -CONFIG_USB_XHCI_DWC3=y
> CONFIG_USB_EHCI_HCD=y
> CONFIG_USB_EHCI_GENERIC=y
> CONFIG_USB_OHCI_HCD=y
> diff --git a/configs/roc-cc-rk3328_defconfig b/configs/roc-cc-rk3328_defconfig
> index 6b3bc75ae9..477179e80e 100644
> --- a/configs/roc-cc-rk3328_defconfig
> +++ b/configs/roc-cc-rk3328_defconfig
> @@ -102,7 +102,6 @@ CONFIG_SYSRESET=y
> # CONFIG_TPL_SYSRESET is not set
> CONFIG_USB=y
> CONFIG_USB_XHCI_HCD=y
> -CONFIG_USB_XHCI_DWC3=y
> CONFIG_USB_EHCI_HCD=y
> CONFIG_USB_EHCI_GENERIC=y
> CONFIG_USB_OHCI_HCD=y
> diff --git a/configs/rock-pi-e-rk3328_defconfig b/configs/rock-pi-e-rk3328_defconfig
> index 9c67d0c5fe..633d5417a9 100644
> --- a/configs/rock-pi-e-rk3328_defconfig
> +++ b/configs/rock-pi-e-rk3328_defconfig
> @@ -103,7 +103,6 @@ CONFIG_SYSRESET=y
> # CONFIG_TPL_SYSRESET is not set
> CONFIG_USB=y
> CONFIG_USB_XHCI_HCD=y
> -CONFIG_USB_XHCI_DWC3=y
> CONFIG_USB_EHCI_HCD=y
> CONFIG_USB_EHCI_GENERIC=y
> CONFIG_USB_OHCI_HCD=y
> diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
> index 74a9cc0a7d..ae761d08a1 100644
> --- a/configs/rock64-rk3328_defconfig
> +++ b/configs/rock64-rk3328_defconfig
> @@ -100,7 +100,6 @@ CONFIG_SYSRESET=y
> # CONFIG_TPL_SYSRESET is not set
> CONFIG_USB=y
> CONFIG_USB_XHCI_HCD=y
> -CONFIG_USB_XHCI_DWC3=y
> CONFIG_USB_EHCI_HCD=y
> CONFIG_USB_EHCI_GENERIC=y
> CONFIG_USB_OHCI_HCD=y
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v2 3/7] usb: dwc3-generic: Restrict single ctrl node for RK3328
2023-06-06 17:09 [PATCH v2 0/7] rockchip: Fix RK3328 USB support Jagan Teki
2023-06-06 17:09 ` [PATCH v2 1/7] arm64: dts: rockchip: Drop unused rk3328-xhci node Jagan Teki
2023-06-06 17:09 ` [PATCH v2 2/7] configs: Drop unused XHCI_DWC3 for RK3328 boards Jagan Teki
@ 2023-06-06 17:09 ` Jagan Teki
2023-06-11 14:53 ` Peter Robinson
2023-07-26 11:00 ` Kever Yang
2023-06-06 17:09 ` [PATCH v2 4/7] configs: Enable DWC3 USB 3.0 on RK3328 boards Jagan Teki
` (5 subsequent siblings)
8 siblings, 2 replies; 20+ messages in thread
From: Jagan Teki @ 2023-06-06 17:09 UTC (permalink / raw)
To: Kever Yang, Simon Glass, Philipp Tomsich
Cc: Jonas Karlman, u-boot, linux-amarula, Jagan Teki, Marek Vasut
Like Rockchip RK3568, the RK3328 also have single node to
represent the glue and ctrl for USB 3.0.
So, use the driver data to use single ctrl for RK3328 DWC3.
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v2:
- collect Marek RB
drivers/usb/dwc3/dwc3-generic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
index 5f8c2613a4..dcf420bafd 100644
--- a/drivers/usb/dwc3/dwc3-generic.c
+++ b/drivers/usb/dwc3/dwc3-generic.c
@@ -621,7 +621,7 @@ static const struct udevice_id dwc3_glue_ids[] = {
{ .compatible = "ti,dwc3", .data = (ulong)&ti_ops },
{ .compatible = "ti,am437x-dwc3", .data = (ulong)&ti_ops },
{ .compatible = "ti,am654-dwc3" },
- { .compatible = "rockchip,rk3328-dwc3" },
+ { .compatible = "rockchip,rk3328-dwc3", .data = (ulong)&rk_ops },
{ .compatible = "rockchip,rk3399-dwc3" },
{ .compatible = "rockchip,rk3568-dwc3", .data = (ulong)&rk_ops },
{ .compatible = "qcom,dwc3" },
--
2.25.1
^ permalink raw reply related [flat|nested] 20+ messages in thread* Re: [PATCH v2 3/7] usb: dwc3-generic: Restrict single ctrl node for RK3328
2023-06-06 17:09 ` [PATCH v2 3/7] usb: dwc3-generic: Restrict single ctrl node for RK3328 Jagan Teki
@ 2023-06-11 14:53 ` Peter Robinson
2023-06-11 16:25 ` Jagan Teki
2023-07-26 11:00 ` Kever Yang
1 sibling, 1 reply; 20+ messages in thread
From: Peter Robinson @ 2023-06-11 14:53 UTC (permalink / raw)
To: Jagan Teki
Cc: Kever Yang, Simon Glass, Philipp Tomsich, Jonas Karlman, u-boot,
linux-amarula, Marek Vasut
On Tue, Jun 6, 2023 at 6:10 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> Like Rockchip RK3568, the RK3328 also have single node to
> represent the glue and ctrl for USB 3.0.
>
> So, use the driver data to use single ctrl for RK3328 DWC3.
>
> Reviewed-by: Marek Vasut <marex@denx.de>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
> Changes for v2:
> - collect Marek RB
>
> drivers/usb/dwc3/dwc3-generic.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
> index 5f8c2613a4..dcf420bafd 100644
> --- a/drivers/usb/dwc3/dwc3-generic.c
> +++ b/drivers/usb/dwc3/dwc3-generic.c
> @@ -621,7 +621,7 @@ static const struct udevice_id dwc3_glue_ids[] = {
> { .compatible = "ti,dwc3", .data = (ulong)&ti_ops },
> { .compatible = "ti,am437x-dwc3", .data = (ulong)&ti_ops },
> { .compatible = "ti,am654-dwc3" },
> - { .compatible = "rockchip,rk3328-dwc3" },
> + { .compatible = "rockchip,rk3328-dwc3", .data = (ulong)&rk_ops },
This doesn't build for me against master due to rk_ops not being
defined, is this against another branch or builds upon another patch
set?
> { .compatible = "rockchip,rk3399-dwc3" },
> { .compatible = "rockchip,rk3568-dwc3", .data = (ulong)&rk_ops },
> { .compatible = "qcom,dwc3" },
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [PATCH v2 3/7] usb: dwc3-generic: Restrict single ctrl node for RK3328
2023-06-11 14:53 ` Peter Robinson
@ 2023-06-11 16:25 ` Jagan Teki
0 siblings, 0 replies; 20+ messages in thread
From: Jagan Teki @ 2023-06-11 16:25 UTC (permalink / raw)
To: Peter Robinson
Cc: Kever Yang, Simon Glass, Philipp Tomsich, Jonas Karlman, u-boot,
linux-amarula, Marek Vasut
On Sun, Jun 11, 2023 at 8:23 PM Peter Robinson <pbrobinson@gmail.com> wrote:
>
> On Tue, Jun 6, 2023 at 6:10 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
> >
> > Like Rockchip RK3568, the RK3328 also have single node to
> > represent the glue and ctrl for USB 3.0.
> >
> > So, use the driver data to use single ctrl for RK3328 DWC3.
> >
> > Reviewed-by: Marek Vasut <marex@denx.de>
> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > ---
> > Changes for v2:
> > - collect Marek RB
> >
> > drivers/usb/dwc3/dwc3-generic.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
> > index 5f8c2613a4..dcf420bafd 100644
> > --- a/drivers/usb/dwc3/dwc3-generic.c
> > +++ b/drivers/usb/dwc3/dwc3-generic.c
> > @@ -621,7 +621,7 @@ static const struct udevice_id dwc3_glue_ids[] = {
> > { .compatible = "ti,dwc3", .data = (ulong)&ti_ops },
> > { .compatible = "ti,am437x-dwc3", .data = (ulong)&ti_ops },
> > { .compatible = "ti,am654-dwc3" },
> > - { .compatible = "rockchip,rk3328-dwc3" },
> > + { .compatible = "rockchip,rk3328-dwc3", .data = (ulong)&rk_ops },
>
> This doesn't build for me against master due to rk_ops not being
> defined, is this against another branch or builds upon another patch
> set?
This, on top of
https://patchwork.ozlabs.org/project/uboot/patch/20230530102617.3413183-5-jonas@kwiboo.se/
Jagan.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 3/7] usb: dwc3-generic: Restrict single ctrl node for RK3328
2023-06-06 17:09 ` [PATCH v2 3/7] usb: dwc3-generic: Restrict single ctrl node for RK3328 Jagan Teki
2023-06-11 14:53 ` Peter Robinson
@ 2023-07-26 11:00 ` Kever Yang
1 sibling, 0 replies; 20+ messages in thread
From: Kever Yang @ 2023-07-26 11:00 UTC (permalink / raw)
To: Jagan Teki, Simon Glass, Philipp Tomsich
Cc: Jonas Karlman, u-boot, linux-amarula, Marek Vasut
On 2023/6/7 01:09, Jagan Teki wrote:
> Like Rockchip RK3568, the RK3328 also have single node to
> represent the glue and ctrl for USB 3.0.
>
> So, use the driver data to use single ctrl for RK3328 DWC3.
>
> Reviewed-by: Marek Vasut <marex@denx.de>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> Changes for v2:
> - collect Marek RB
>
> drivers/usb/dwc3/dwc3-generic.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
> index 5f8c2613a4..dcf420bafd 100644
> --- a/drivers/usb/dwc3/dwc3-generic.c
> +++ b/drivers/usb/dwc3/dwc3-generic.c
> @@ -621,7 +621,7 @@ static const struct udevice_id dwc3_glue_ids[] = {
> { .compatible = "ti,dwc3", .data = (ulong)&ti_ops },
> { .compatible = "ti,am437x-dwc3", .data = (ulong)&ti_ops },
> { .compatible = "ti,am654-dwc3" },
> - { .compatible = "rockchip,rk3328-dwc3" },
> + { .compatible = "rockchip,rk3328-dwc3", .data = (ulong)&rk_ops },
> { .compatible = "rockchip,rk3399-dwc3" },
> { .compatible = "rockchip,rk3568-dwc3", .data = (ulong)&rk_ops },
> { .compatible = "qcom,dwc3" },
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v2 4/7] configs: Enable DWC3 USB 3.0 on RK3328 boards
2023-06-06 17:09 [PATCH v2 0/7] rockchip: Fix RK3328 USB support Jagan Teki
` (2 preceding siblings ...)
2023-06-06 17:09 ` [PATCH v2 3/7] usb: dwc3-generic: Restrict single ctrl node for RK3328 Jagan Teki
@ 2023-06-06 17:09 ` Jagan Teki
2023-07-26 11:01 ` Kever Yang
2023-06-06 17:09 ` [PATCH v2 5/7] phy: rockchip-inno-usb2: Add USB2 PHY for RK3328 Jagan Teki
` (4 subsequent siblings)
8 siblings, 1 reply; 20+ messages in thread
From: Jagan Teki @ 2023-06-06 17:09 UTC (permalink / raw)
To: Kever Yang, Simon Glass, Philipp Tomsich
Cc: Jonas Karlman, u-boot, linux-amarula, Jagan Teki, Tianling Shen,
David Bauer, Loic Devulder, Chen-Yu Tsai, Banglang Huang,
Matwey V . Kornilov
Enable USB 3.0 in all RK3328 boards.
=> usb start
starting USB...
Bus usb@ff5c0000: ehci_generic usb@ff5c0000: Failed to get clocks (ret=-19)
Port not available.
Bus usb@ff5d0000: USB OHCI 1.0
Bus usb@ff600000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus usb@ff580000: 1 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
=> usb tree
USB device tree:
1 Hub (12 Mb/s, 0mA)
U-Boot Root Hub
1 Hub (5 Gb/s, 0mA)
| U-Boot XHCI Host Controller
|
+-2 Mass Storage (5 Gb/s, 224mA)
SanDisk Dual Drive 040130e3ee554b7078843f4eb331646
1 Hub (480 Mb/s, 0mA)
U-Boot Root Hub
Cc: Tianling Shen <cnsztl@gmail.com>
Cc: David Bauer <mail@david-bauer.net>
Cc: Loic Devulder <ldevulder@suse.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Banglang Huang <banglang.huang@foxmail.com>
Cc: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v2:
- none
configs/evb-rk3328_defconfig | 2 ++
configs/nanopi-r2c-rk3328_defconfig | 2 ++
configs/nanopi-r2s-rk3328_defconfig | 2 ++
configs/roc-cc-rk3328_defconfig | 2 ++
configs/rock-pi-e-rk3328_defconfig | 2 ++
configs/rock64-rk3328_defconfig | 2 ++
6 files changed, 12 insertions(+)
diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
index 5ab7abff9e..5183d65451 100644
--- a/configs/evb-rk3328_defconfig
+++ b/configs/evb-rk3328_defconfig
@@ -69,6 +69,7 @@ CONFIG_FASTBOOT_BUF_ADDR=0x800800
CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
+CONFIG_MISC=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_ETH_DESIGNWARE=y
@@ -100,6 +101,7 @@ CONFIG_USB_OHCI_GENERIC=y
CONFIG_USB_DWC2=y
CONFIG_USB_DWC3=y
# CONFIG_USB_DWC3_GADGET is not set
+CONFIG_USB_DWC3_GENERIC=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DWC2_OTG=y
CONFIG_SPL_TINY_MEMSET=y
diff --git a/configs/nanopi-r2c-rk3328_defconfig b/configs/nanopi-r2c-rk3328_defconfig
index 6af874ca2c..fb0b8719fb 100644
--- a/configs/nanopi-r2c-rk3328_defconfig
+++ b/configs/nanopi-r2c-rk3328_defconfig
@@ -71,6 +71,7 @@ CONFIG_FASTBOOT_BUF_ADDR=0x800800
CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
+CONFIG_MISC=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_ETH_DESIGNWARE=y
@@ -104,6 +105,7 @@ CONFIG_USB_OHCI_GENERIC=y
CONFIG_USB_DWC2=y
CONFIG_USB_DWC3=y
# CONFIG_USB_DWC3_GADGET is not set
+CONFIG_USB_DWC3_GENERIC=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DWC2_OTG=y
CONFIG_SPL_TINY_MEMSET=y
diff --git a/configs/nanopi-r2s-rk3328_defconfig b/configs/nanopi-r2s-rk3328_defconfig
index 7b0fadbce9..79cb17d751 100644
--- a/configs/nanopi-r2s-rk3328_defconfig
+++ b/configs/nanopi-r2s-rk3328_defconfig
@@ -71,6 +71,7 @@ CONFIG_FASTBOOT_BUF_ADDR=0x800800
CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
+CONFIG_MISC=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_ETH_DESIGNWARE=y
@@ -104,6 +105,7 @@ CONFIG_USB_OHCI_GENERIC=y
CONFIG_USB_DWC2=y
CONFIG_USB_DWC3=y
# CONFIG_USB_DWC3_GADGET is not set
+CONFIG_USB_DWC3_GENERIC=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DWC2_OTG=y
CONFIG_SPL_TINY_MEMSET=y
diff --git a/configs/roc-cc-rk3328_defconfig b/configs/roc-cc-rk3328_defconfig
index 477179e80e..f5912ceca9 100644
--- a/configs/roc-cc-rk3328_defconfig
+++ b/configs/roc-cc-rk3328_defconfig
@@ -72,6 +72,7 @@ CONFIG_FASTBOOT_BUF_ADDR=0x800800
CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
+CONFIG_MISC=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_PHY_REALTEK=y
@@ -109,6 +110,7 @@ CONFIG_USB_OHCI_GENERIC=y
CONFIG_USB_DWC2=y
CONFIG_USB_DWC3=y
# CONFIG_USB_DWC3_GADGET is not set
+CONFIG_USB_DWC3_GENERIC=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DWC2_OTG=y
CONFIG_SPL_TINY_MEMSET=y
diff --git a/configs/rock-pi-e-rk3328_defconfig b/configs/rock-pi-e-rk3328_defconfig
index 633d5417a9..e86a6f7b1a 100644
--- a/configs/rock-pi-e-rk3328_defconfig
+++ b/configs/rock-pi-e-rk3328_defconfig
@@ -73,6 +73,7 @@ CONFIG_FASTBOOT_BUF_ADDR=0x800800
CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
+CONFIG_MISC=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_ETH_DESIGNWARE=y
@@ -101,6 +102,7 @@ CONFIG_SYSINFO=y
CONFIG_SYSINFO_SMBIOS=y
CONFIG_SYSRESET=y
# CONFIG_TPL_SYSRESET is not set
+CONFIG_USB_DWC3_GENERIC=y
CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
index ae761d08a1..4acbca0140 100644
--- a/configs/rock64-rk3328_defconfig
+++ b/configs/rock64-rk3328_defconfig
@@ -71,6 +71,7 @@ CONFIG_FASTBOOT_BUF_ADDR=0x800800
CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
+CONFIG_MISC=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_SPI_FLASH_GIGADEVICE=y
@@ -107,6 +108,7 @@ CONFIG_USB_OHCI_GENERIC=y
CONFIG_USB_DWC2=y
CONFIG_USB_DWC3=y
# CONFIG_USB_DWC3_GADGET is not set
+CONFIG_USB_DWC3_GENERIC=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DWC2_OTG=y
CONFIG_SPL_TINY_MEMSET=y
--
2.25.1
^ permalink raw reply related [flat|nested] 20+ messages in thread* Re: [PATCH v2 4/7] configs: Enable DWC3 USB 3.0 on RK3328 boards
2023-06-06 17:09 ` [PATCH v2 4/7] configs: Enable DWC3 USB 3.0 on RK3328 boards Jagan Teki
@ 2023-07-26 11:01 ` Kever Yang
0 siblings, 0 replies; 20+ messages in thread
From: Kever Yang @ 2023-07-26 11:01 UTC (permalink / raw)
To: Jagan Teki, Simon Glass, Philipp Tomsich
Cc: Jonas Karlman, u-boot, linux-amarula, Tianling Shen, David Bauer,
Loic Devulder, Chen-Yu Tsai, Banglang Huang, Matwey V . Kornilov
On 2023/6/7 01:09, Jagan Teki wrote:
> Enable USB 3.0 in all RK3328 boards.
>
> => usb start
> starting USB...
> Bus usb@ff5c0000: ehci_generic usb@ff5c0000: Failed to get clocks (ret=-19)
> Port not available.
> Bus usb@ff5d0000: USB OHCI 1.0
> Bus usb@ff600000: Register 2000140 NbrPorts 2
> Starting the controller
> USB XHCI 1.10
> Bus usb@ff580000: 1 USB Device(s) found
> scanning usb for storage devices... 1 Storage Device(s) found
> => usb tree
> USB device tree:
> 1 Hub (12 Mb/s, 0mA)
> U-Boot Root Hub
>
> 1 Hub (5 Gb/s, 0mA)
> | U-Boot XHCI Host Controller
> |
> +-2 Mass Storage (5 Gb/s, 224mA)
> SanDisk Dual Drive 040130e3ee554b7078843f4eb331646
>
> 1 Hub (480 Mb/s, 0mA)
> U-Boot Root Hub
>
> Cc: Tianling Shen <cnsztl@gmail.com>
> Cc: David Bauer <mail@david-bauer.net>
> Cc: Loic Devulder <ldevulder@suse.com>
> Cc: Chen-Yu Tsai <wens@csie.org>
> Cc: Banglang Huang <banglang.huang@foxmail.com>
> Cc: Matwey V. Kornilov <matwey.kornilov@gmail.com>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> Changes for v2:
> - none
>
> configs/evb-rk3328_defconfig | 2 ++
> configs/nanopi-r2c-rk3328_defconfig | 2 ++
> configs/nanopi-r2s-rk3328_defconfig | 2 ++
> configs/roc-cc-rk3328_defconfig | 2 ++
> configs/rock-pi-e-rk3328_defconfig | 2 ++
> configs/rock64-rk3328_defconfig | 2 ++
> 6 files changed, 12 insertions(+)
>
> diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
> index 5ab7abff9e..5183d65451 100644
> --- a/configs/evb-rk3328_defconfig
> +++ b/configs/evb-rk3328_defconfig
> @@ -69,6 +69,7 @@ CONFIG_FASTBOOT_BUF_ADDR=0x800800
> CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
> CONFIG_ROCKCHIP_GPIO=y
> CONFIG_SYS_I2C_ROCKCHIP=y
> +CONFIG_MISC=y
> CONFIG_MMC_DW=y
> CONFIG_MMC_DW_ROCKCHIP=y
> CONFIG_ETH_DESIGNWARE=y
> @@ -100,6 +101,7 @@ CONFIG_USB_OHCI_GENERIC=y
> CONFIG_USB_DWC2=y
> CONFIG_USB_DWC3=y
> # CONFIG_USB_DWC3_GADGET is not set
> +CONFIG_USB_DWC3_GENERIC=y
> CONFIG_USB_GADGET=y
> CONFIG_USB_GADGET_DWC2_OTG=y
> CONFIG_SPL_TINY_MEMSET=y
> diff --git a/configs/nanopi-r2c-rk3328_defconfig b/configs/nanopi-r2c-rk3328_defconfig
> index 6af874ca2c..fb0b8719fb 100644
> --- a/configs/nanopi-r2c-rk3328_defconfig
> +++ b/configs/nanopi-r2c-rk3328_defconfig
> @@ -71,6 +71,7 @@ CONFIG_FASTBOOT_BUF_ADDR=0x800800
> CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
> CONFIG_ROCKCHIP_GPIO=y
> CONFIG_SYS_I2C_ROCKCHIP=y
> +CONFIG_MISC=y
> CONFIG_MMC_DW=y
> CONFIG_MMC_DW_ROCKCHIP=y
> CONFIG_ETH_DESIGNWARE=y
> @@ -104,6 +105,7 @@ CONFIG_USB_OHCI_GENERIC=y
> CONFIG_USB_DWC2=y
> CONFIG_USB_DWC3=y
> # CONFIG_USB_DWC3_GADGET is not set
> +CONFIG_USB_DWC3_GENERIC=y
> CONFIG_USB_GADGET=y
> CONFIG_USB_GADGET_DWC2_OTG=y
> CONFIG_SPL_TINY_MEMSET=y
> diff --git a/configs/nanopi-r2s-rk3328_defconfig b/configs/nanopi-r2s-rk3328_defconfig
> index 7b0fadbce9..79cb17d751 100644
> --- a/configs/nanopi-r2s-rk3328_defconfig
> +++ b/configs/nanopi-r2s-rk3328_defconfig
> @@ -71,6 +71,7 @@ CONFIG_FASTBOOT_BUF_ADDR=0x800800
> CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
> CONFIG_ROCKCHIP_GPIO=y
> CONFIG_SYS_I2C_ROCKCHIP=y
> +CONFIG_MISC=y
> CONFIG_MMC_DW=y
> CONFIG_MMC_DW_ROCKCHIP=y
> CONFIG_ETH_DESIGNWARE=y
> @@ -104,6 +105,7 @@ CONFIG_USB_OHCI_GENERIC=y
> CONFIG_USB_DWC2=y
> CONFIG_USB_DWC3=y
> # CONFIG_USB_DWC3_GADGET is not set
> +CONFIG_USB_DWC3_GENERIC=y
> CONFIG_USB_GADGET=y
> CONFIG_USB_GADGET_DWC2_OTG=y
> CONFIG_SPL_TINY_MEMSET=y
> diff --git a/configs/roc-cc-rk3328_defconfig b/configs/roc-cc-rk3328_defconfig
> index 477179e80e..f5912ceca9 100644
> --- a/configs/roc-cc-rk3328_defconfig
> +++ b/configs/roc-cc-rk3328_defconfig
> @@ -72,6 +72,7 @@ CONFIG_FASTBOOT_BUF_ADDR=0x800800
> CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
> CONFIG_ROCKCHIP_GPIO=y
> CONFIG_SYS_I2C_ROCKCHIP=y
> +CONFIG_MISC=y
> CONFIG_MMC_DW=y
> CONFIG_MMC_DW_ROCKCHIP=y
> CONFIG_PHY_REALTEK=y
> @@ -109,6 +110,7 @@ CONFIG_USB_OHCI_GENERIC=y
> CONFIG_USB_DWC2=y
> CONFIG_USB_DWC3=y
> # CONFIG_USB_DWC3_GADGET is not set
> +CONFIG_USB_DWC3_GENERIC=y
> CONFIG_USB_GADGET=y
> CONFIG_USB_GADGET_DWC2_OTG=y
> CONFIG_SPL_TINY_MEMSET=y
> diff --git a/configs/rock-pi-e-rk3328_defconfig b/configs/rock-pi-e-rk3328_defconfig
> index 633d5417a9..e86a6f7b1a 100644
> --- a/configs/rock-pi-e-rk3328_defconfig
> +++ b/configs/rock-pi-e-rk3328_defconfig
> @@ -73,6 +73,7 @@ CONFIG_FASTBOOT_BUF_ADDR=0x800800
> CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
> CONFIG_ROCKCHIP_GPIO=y
> CONFIG_SYS_I2C_ROCKCHIP=y
> +CONFIG_MISC=y
> CONFIG_MMC_DW=y
> CONFIG_MMC_DW_ROCKCHIP=y
> CONFIG_ETH_DESIGNWARE=y
> @@ -101,6 +102,7 @@ CONFIG_SYSINFO=y
> CONFIG_SYSINFO_SMBIOS=y
> CONFIG_SYSRESET=y
> # CONFIG_TPL_SYSRESET is not set
> +CONFIG_USB_DWC3_GENERIC=y
> CONFIG_USB=y
> CONFIG_USB_XHCI_HCD=y
> CONFIG_USB_EHCI_HCD=y
> diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
> index ae761d08a1..4acbca0140 100644
> --- a/configs/rock64-rk3328_defconfig
> +++ b/configs/rock64-rk3328_defconfig
> @@ -71,6 +71,7 @@ CONFIG_FASTBOOT_BUF_ADDR=0x800800
> CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
> CONFIG_ROCKCHIP_GPIO=y
> CONFIG_SYS_I2C_ROCKCHIP=y
> +CONFIG_MISC=y
> CONFIG_MMC_DW=y
> CONFIG_MMC_DW_ROCKCHIP=y
> CONFIG_SPI_FLASH_GIGADEVICE=y
> @@ -107,6 +108,7 @@ CONFIG_USB_OHCI_GENERIC=y
> CONFIG_USB_DWC2=y
> CONFIG_USB_DWC3=y
> # CONFIG_USB_DWC3_GADGET is not set
> +CONFIG_USB_DWC3_GENERIC=y
> CONFIG_USB_GADGET=y
> CONFIG_USB_GADGET_DWC2_OTG=y
> CONFIG_SPL_TINY_MEMSET=y
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v2 5/7] phy: rockchip-inno-usb2: Add USB2 PHY for RK3328
2023-06-06 17:09 [PATCH v2 0/7] rockchip: Fix RK3328 USB support Jagan Teki
` (3 preceding siblings ...)
2023-06-06 17:09 ` [PATCH v2 4/7] configs: Enable DWC3 USB 3.0 on RK3328 boards Jagan Teki
@ 2023-06-06 17:09 ` Jagan Teki
2023-06-07 9:12 ` Xavier Drudis Ferran
2023-07-26 11:01 ` Kever Yang
2023-06-06 17:09 ` [PATCH v2 6/7] clk: rockchip: rk3328: Handle usb480m phy clock Jagan Teki
` (3 subsequent siblings)
8 siblings, 2 replies; 20+ messages in thread
From: Jagan Teki @ 2023-06-06 17:09 UTC (permalink / raw)
To: Kever Yang, Simon Glass, Philipp Tomsich
Cc: Jonas Karlman, u-boot, linux-amarula, Jagan Teki
USB2.0 Host and OTG controllers in RK3328 are using USB2PHY.
Add support for it.
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v2:
- add clkout_ctl
drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 34 +++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
index e43a5ba9b5..d8738f891d 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
@@ -345,6 +345,36 @@ bind_fail:
return ret;
}
+static const struct rockchip_usb2phy_cfg rk3328_usb2phy_cfgs[] = {
+ {
+ .reg = 0x100,
+ .clkout_ctl = { 0x108, 4, 4, 1, 0 },
+ .port_cfgs = {
+ [USB2PHY_PORT_OTG] = {
+ .phy_sus = { 0x0100, 15, 0, 0, 0x1d1 },
+ .bvalid_det_en = { 0x0110, 3, 2, 0, 3 },
+ .bvalid_det_st = { 0x0114, 3, 2, 0, 3 },
+ .bvalid_det_clr = { 0x0118, 3, 2, 0, 3 },
+ .ls_det_en = { 0x0110, 0, 0, 0, 1 },
+ .ls_det_st = { 0x0114, 0, 0, 0, 1 },
+ .ls_det_clr = { 0x0118, 0, 0, 0, 1 },
+ .utmi_avalid = { 0x0120, 10, 10, 0, 1 },
+ .utmi_bvalid = { 0x0120, 9, 9, 0, 1 },
+ .utmi_ls = { 0x0120, 5, 4, 0, 1 },
+ },
+ [USB2PHY_PORT_HOST] = {
+ .phy_sus = { 0x104, 15, 0, 0, 0x1d1 },
+ .ls_det_en = { 0x110, 1, 1, 0, 1 },
+ .ls_det_st = { 0x114, 1, 1, 0, 1 },
+ .ls_det_clr = { 0x118, 1, 1, 0, 1 },
+ .utmi_ls = { 0x120, 17, 16, 0, 1 },
+ .utmi_hstdet = { 0x120, 19, 19, 0, 1 }
+ }
+ },
+ },
+ { /* sentinel */ }
+};
+
static const struct rockchip_usb2phy_cfg rk3399_usb2phy_cfgs[] = {
{
.reg = 0xe450,
@@ -498,6 +528,10 @@ static const struct rockchip_usb2phy_cfg rk3588_phy_cfgs[] = {
};
static const struct udevice_id rockchip_usb2phy_ids[] = {
+ {
+ .compatible = "rockchip,rk3328-usb2phy",
+ .data = (ulong)&rk3328_usb2phy_cfgs,
+ },
{
.compatible = "rockchip,rk3399-usb2phy",
.data = (ulong)&rk3399_usb2phy_cfgs,
--
2.25.1
^ permalink raw reply related [flat|nested] 20+ messages in thread* Re: [PATCH v2 5/7] phy: rockchip-inno-usb2: Add USB2 PHY for RK3328
2023-06-06 17:09 ` [PATCH v2 5/7] phy: rockchip-inno-usb2: Add USB2 PHY for RK3328 Jagan Teki
@ 2023-06-07 9:12 ` Xavier Drudis Ferran
2023-07-26 11:01 ` Kever Yang
1 sibling, 0 replies; 20+ messages in thread
From: Xavier Drudis Ferran @ 2023-06-07 9:12 UTC (permalink / raw)
To: Jagan Teki
Cc: Kever Yang, Simon Glass, Philipp Tomsich, Jonas Karlman, u-boot,
linux-amarula
El Tue, Jun 06, 2023 at 10:39:16PM +0530, Jagan Teki deia:
> USB2.0 Host and OTG controllers in RK3328 are using USB2PHY.
>
> Add support for it.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Xavier Drudis Ferran <xdrudis@tinet.cat>
(fwiw, I just compared it with linux)
I just wanted to note this patch as written most likely depends on
https://patchwork.ozlabs.org/project/uboot/patch/464111fca83008503022e8ada5305e69ffd1afbd.1685974993.git.xdrudis@tinet.cat/
which introduces the struct member clkout_ctl used here.
> ---
> Changes for v2:
> - add clkout_ctl
>
> drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 34 +++++++++++++++++++
> 1 file changed, 34 insertions(+)
>
> diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
> index e43a5ba9b5..d8738f891d 100644
> --- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
> +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
> @@ -345,6 +345,36 @@ bind_fail:
> return ret;
> }
>
> +static const struct rockchip_usb2phy_cfg rk3328_usb2phy_cfgs[] = {
> + {
> + .reg = 0x100,
> + .clkout_ctl = { 0x108, 4, 4, 1, 0 },
[...]
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [PATCH v2 5/7] phy: rockchip-inno-usb2: Add USB2 PHY for RK3328
2023-06-06 17:09 ` [PATCH v2 5/7] phy: rockchip-inno-usb2: Add USB2 PHY for RK3328 Jagan Teki
2023-06-07 9:12 ` Xavier Drudis Ferran
@ 2023-07-26 11:01 ` Kever Yang
1 sibling, 0 replies; 20+ messages in thread
From: Kever Yang @ 2023-07-26 11:01 UTC (permalink / raw)
To: Jagan Teki, Simon Glass, Philipp Tomsich
Cc: Jonas Karlman, u-boot, linux-amarula
On 2023/6/7 01:09, Jagan Teki wrote:
> USB2.0 Host and OTG controllers in RK3328 are using USB2PHY.
>
> Add support for it.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> Changes for v2:
> - add clkout_ctl
>
> drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 34 +++++++++++++++++++
> 1 file changed, 34 insertions(+)
>
> diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
> index e43a5ba9b5..d8738f891d 100644
> --- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
> +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
> @@ -345,6 +345,36 @@ bind_fail:
> return ret;
> }
>
> +static const struct rockchip_usb2phy_cfg rk3328_usb2phy_cfgs[] = {
> + {
> + .reg = 0x100,
> + .clkout_ctl = { 0x108, 4, 4, 1, 0 },
> + .port_cfgs = {
> + [USB2PHY_PORT_OTG] = {
> + .phy_sus = { 0x0100, 15, 0, 0, 0x1d1 },
> + .bvalid_det_en = { 0x0110, 3, 2, 0, 3 },
> + .bvalid_det_st = { 0x0114, 3, 2, 0, 3 },
> + .bvalid_det_clr = { 0x0118, 3, 2, 0, 3 },
> + .ls_det_en = { 0x0110, 0, 0, 0, 1 },
> + .ls_det_st = { 0x0114, 0, 0, 0, 1 },
> + .ls_det_clr = { 0x0118, 0, 0, 0, 1 },
> + .utmi_avalid = { 0x0120, 10, 10, 0, 1 },
> + .utmi_bvalid = { 0x0120, 9, 9, 0, 1 },
> + .utmi_ls = { 0x0120, 5, 4, 0, 1 },
> + },
> + [USB2PHY_PORT_HOST] = {
> + .phy_sus = { 0x104, 15, 0, 0, 0x1d1 },
> + .ls_det_en = { 0x110, 1, 1, 0, 1 },
> + .ls_det_st = { 0x114, 1, 1, 0, 1 },
> + .ls_det_clr = { 0x118, 1, 1, 0, 1 },
> + .utmi_ls = { 0x120, 17, 16, 0, 1 },
> + .utmi_hstdet = { 0x120, 19, 19, 0, 1 }
> + }
> + },
> + },
> + { /* sentinel */ }
> +};
> +
> static const struct rockchip_usb2phy_cfg rk3399_usb2phy_cfgs[] = {
> {
> .reg = 0xe450,
> @@ -498,6 +528,10 @@ static const struct rockchip_usb2phy_cfg rk3588_phy_cfgs[] = {
> };
>
> static const struct udevice_id rockchip_usb2phy_ids[] = {
> + {
> + .compatible = "rockchip,rk3328-usb2phy",
> + .data = (ulong)&rk3328_usb2phy_cfgs,
> + },
> {
> .compatible = "rockchip,rk3399-usb2phy",
> .data = (ulong)&rk3399_usb2phy_cfgs,
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v2 6/7] clk: rockchip: rk3328: Handle usb480m phy clock
2023-06-06 17:09 [PATCH v2 0/7] rockchip: Fix RK3328 USB support Jagan Teki
` (4 preceding siblings ...)
2023-06-06 17:09 ` [PATCH v2 5/7] phy: rockchip-inno-usb2: Add USB2 PHY for RK3328 Jagan Teki
@ 2023-06-06 17:09 ` Jagan Teki
2023-07-26 11:01 ` Kever Yang
2023-06-06 17:09 ` [PATCH v2 7/7] configs: rockchip: Enable USB2PHY for RK3328 boards Jagan Teki
` (2 subsequent siblings)
8 siblings, 1 reply; 20+ messages in thread
From: Jagan Teki @ 2023-06-06 17:09 UTC (permalink / raw)
To: Kever Yang, Simon Glass, Philipp Tomsich
Cc: Jonas Karlman, u-boot, linux-amarula, Jagan Teki, Lukasz Majewski,
Sean Anderson
Handle USB480M clock ID in set_rate() and set_parent()
to allow the dt assigned-clocks and assigned-clock-parents
work on rk3328.dtsi
Cc: Lukasz Majewski <lukma@denx.de>
Cc: Sean Anderson <seanga2@gmail.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v2:
- add USB480M to set_parent
drivers/clk/rockchip/clk_rk3328.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/clk/rockchip/clk_rk3328.c b/drivers/clk/rockchip/clk_rk3328.c
index 969b7a8581..ef97381f0e 100644
--- a/drivers/clk/rockchip/clk_rk3328.c
+++ b/drivers/clk/rockchip/clk_rk3328.c
@@ -681,6 +681,7 @@ static ulong rk3328_clk_set_rate(struct clk *clk, ulong rate)
case ACLK_GMAC:
case PCLK_GMAC:
case SCLK_USB3OTG_SUSPEND:
+ case USB480M:
return 0;
default:
return -ENOENT;
@@ -771,6 +772,7 @@ static int rk3328_clk_set_parent(struct clk *clk, struct clk *parent)
case SCLK_MAC2IO_EXT:
return rk3328_gmac2io_ext_set_parent(clk, parent);
case DCLK_LCDC:
+ case USB480M:
case SCLK_PDM:
case SCLK_RTC32K:
case SCLK_UART0:
--
2.25.1
^ permalink raw reply related [flat|nested] 20+ messages in thread* Re: [PATCH v2 6/7] clk: rockchip: rk3328: Handle usb480m phy clock
2023-06-06 17:09 ` [PATCH v2 6/7] clk: rockchip: rk3328: Handle usb480m phy clock Jagan Teki
@ 2023-07-26 11:01 ` Kever Yang
0 siblings, 0 replies; 20+ messages in thread
From: Kever Yang @ 2023-07-26 11:01 UTC (permalink / raw)
To: Jagan Teki, Simon Glass, Philipp Tomsich
Cc: Jonas Karlman, u-boot, linux-amarula, Lukasz Majewski,
Sean Anderson
On 2023/6/7 01:09, Jagan Teki wrote:
> Handle USB480M clock ID in set_rate() and set_parent()
> to allow the dt assigned-clocks and assigned-clock-parents
> work on rk3328.dtsi
>
> Cc: Lukasz Majewski <lukma@denx.de>
> Cc: Sean Anderson <seanga2@gmail.com>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> Changes for v2:
> - add USB480M to set_parent
>
> drivers/clk/rockchip/clk_rk3328.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/clk/rockchip/clk_rk3328.c b/drivers/clk/rockchip/clk_rk3328.c
> index 969b7a8581..ef97381f0e 100644
> --- a/drivers/clk/rockchip/clk_rk3328.c
> +++ b/drivers/clk/rockchip/clk_rk3328.c
> @@ -681,6 +681,7 @@ static ulong rk3328_clk_set_rate(struct clk *clk, ulong rate)
> case ACLK_GMAC:
> case PCLK_GMAC:
> case SCLK_USB3OTG_SUSPEND:
> + case USB480M:
> return 0;
> default:
> return -ENOENT;
> @@ -771,6 +772,7 @@ static int rk3328_clk_set_parent(struct clk *clk, struct clk *parent)
> case SCLK_MAC2IO_EXT:
> return rk3328_gmac2io_ext_set_parent(clk, parent);
> case DCLK_LCDC:
> + case USB480M:
> case SCLK_PDM:
> case SCLK_RTC32K:
> case SCLK_UART0:
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v2 7/7] configs: rockchip: Enable USB2PHY for RK3328 boards
2023-06-06 17:09 [PATCH v2 0/7] rockchip: Fix RK3328 USB support Jagan Teki
` (5 preceding siblings ...)
2023-06-06 17:09 ` [PATCH v2 6/7] clk: rockchip: rk3328: Handle usb480m phy clock Jagan Teki
@ 2023-06-06 17:09 ` Jagan Teki
2023-07-26 11:02 ` Kever Yang
2023-06-11 22:31 ` [PATCH v2 0/7] rockchip: Fix RK3328 USB support Peter Robinson
2023-07-13 9:31 ` Jagan Teki
8 siblings, 1 reply; 20+ messages in thread
From: Jagan Teki @ 2023-06-06 17:09 UTC (permalink / raw)
To: Kever Yang, Simon Glass, Philipp Tomsich
Cc: Jonas Karlman, u-boot, linux-amarula, Jagan Teki, Tianling Shen,
David Bauer, Loic Devulder, Chen-Yu Tsai, Banglang Huang,
Matwey V . Kornilov
Enable USB2PHY for all RK3328 boards.
=> usb start
starting USB...
Bus usb@ff5c0000: USB EHCI 1.00
Bus usb@ff5d0000: USB OHCI 1.0
Bus usb@ff600000: generic_phy_get_bulk : no phys property
Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus usb@ff580000: USB DWC2
scanning bus usb@ff5c0000 for devices... 2 USB Device(s) found
scanning bus usb@ff5d0000 for devices... 1 USB Device(s) found
scanning bus usb@ff600000 for devices... 2 USB Device(s) found
scanning bus usb@ff580000 for devices... 2 USB Device(s) found
scanning usb for storage devices... 2 Storage Device(s) found
=> usb tree
USB device tree:
1 Hub (480 Mb/s, 0mA)
| u-boot EHCI Host Controller
|
+-2 Mass Storage (480 Mb/s, 500mA)
TS-RDF5A Transcend 000000000009
1 Hub (12 Mb/s, 0mA)
U-Boot Root Hub
1 Hub (5 Gb/s, 0mA)
| U-Boot XHCI Host Controller
|
+-2 Mass Storage (5 Gb/s, 224mA)
SanDisk Dual Drive 040130e3ee554b7078843f4eb331646
1 Hub (480 Mb/s, 0mA)
| U-Boot Root Hub
|
+-2 Human Interface (12 Mb/s, 98mA)
Logitech USB Receiver
=> dm tree -s
Class Index Probed Driver Name
-----------------------------------------------------------
syscon 1 [ + ] syscon |-- syscon@ff450000
phy 0 [ + ] rockchip_usb2phy | `-- usb2phy@100
clk 2 [ + ] rockchip_usb2phy_clo | |-- usb480m_phy
phy 1 [ + ] rockchip_usb2phy_por | |-- otg-port
phy 2 [ + ] rockchip_usb2phy_por | `-- host-port
sysinfo 0 [ + ] sysinfo_smbios |-- smbios
usb 3 [ + ] dwc2_usb |-- usb@ff580000
usb_hub 3 [ + ] usb_hub | `-- usb_hub
usb_dev_ge 0 [ + ] usb_dev_generic_drv | `-- generic_bus_3_dev_2
usb 0 [ + ] ehci_generic |-- usb@ff5c0000
usb_hub 0 [ + ] usb_hub | `-- usb_hub
usb_mass_s 0 [ + ] usb_mass_storage | `-- usb_mass_storage
blk 2 [ + ] usb_storage_blk | |-- usb_mass_storage.lun0
partition 4 [ + ] blk_partition | | |-- usb_mass_storage.lun0:1
partition 5 [ + ] blk_partition | | `-- usb_mass_storage.lun0:2
bootdev 3 [ ] usb_bootdev | `-- usb_mass_storage.lun0.bootdev
usb 1 [ + ] ohci_generic `-- usb@ff5d0000
usb_hub 1 [ + ] usb_hub `-- usb_hub
Cc: Tianling Shen <cnsztl@gmail.com>
Cc: David Bauer <mail@david-bauer.net>
Cc: Loic Devulder <ldevulder@suse.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Banglang Huang <banglang.huang@foxmail.com>
Cc: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v2:
- update commit message.
configs/evb-rk3328_defconfig | 1 +
configs/nanopi-r2c-rk3328_defconfig | 1 +
configs/nanopi-r2s-rk3328_defconfig | 1 +
configs/roc-cc-rk3328_defconfig | 1 +
configs/rock-pi-e-rk3328_defconfig | 1 +
configs/rock64-rk3328_defconfig | 1 +
6 files changed, 6 insertions(+)
diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
index 5183d65451..8f53aadbb6 100644
--- a/configs/evb-rk3328_defconfig
+++ b/configs/evb-rk3328_defconfig
@@ -74,6 +74,7 @@ CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_GMAC_ROCKCHIP=y
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
CONFIG_PINCTRL=y
CONFIG_SPL_PINCTRL=y
CONFIG_DM_PMIC=y
diff --git a/configs/nanopi-r2c-rk3328_defconfig b/configs/nanopi-r2c-rk3328_defconfig
index fb0b8719fb..583179d7c5 100644
--- a/configs/nanopi-r2c-rk3328_defconfig
+++ b/configs/nanopi-r2c-rk3328_defconfig
@@ -76,6 +76,7 @@ CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_GMAC_ROCKCHIP=y
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
CONFIG_PINCTRL=y
CONFIG_SPL_PINCTRL=y
CONFIG_DM_PMIC=y
diff --git a/configs/nanopi-r2s-rk3328_defconfig b/configs/nanopi-r2s-rk3328_defconfig
index 79cb17d751..f7ed71e412 100644
--- a/configs/nanopi-r2s-rk3328_defconfig
+++ b/configs/nanopi-r2s-rk3328_defconfig
@@ -76,6 +76,7 @@ CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_GMAC_ROCKCHIP=y
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
CONFIG_PINCTRL=y
CONFIG_SPL_PINCTRL=y
CONFIG_DM_PMIC=y
diff --git a/configs/roc-cc-rk3328_defconfig b/configs/roc-cc-rk3328_defconfig
index f5912ceca9..4ac3c9403b 100644
--- a/configs/roc-cc-rk3328_defconfig
+++ b/configs/roc-cc-rk3328_defconfig
@@ -79,6 +79,7 @@ CONFIG_PHY_REALTEK=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_GMAC_ROCKCHIP=y
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
CONFIG_PINCTRL=y
CONFIG_SPL_PINCTRL=y
CONFIG_DM_PMIC=y
diff --git a/configs/rock-pi-e-rk3328_defconfig b/configs/rock-pi-e-rk3328_defconfig
index e86a6f7b1a..277f691d4d 100644
--- a/configs/rock-pi-e-rk3328_defconfig
+++ b/configs/rock-pi-e-rk3328_defconfig
@@ -78,6 +78,7 @@ CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_GMAC_ROCKCHIP=y
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
CONFIG_PHY=y
CONFIG_PINCTRL=y
CONFIG_SPL_PINCTRL=y
diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
index 4acbca0140..5e36612bb8 100644
--- a/configs/rock64-rk3328_defconfig
+++ b/configs/rock64-rk3328_defconfig
@@ -77,6 +77,7 @@ CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_SPI_FLASH_GIGADEVICE=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_GMAC_ROCKCHIP=y
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
CONFIG_PINCTRL=y
CONFIG_SPL_PINCTRL=y
CONFIG_DM_PMIC=y
--
2.25.1
^ permalink raw reply related [flat|nested] 20+ messages in thread* Re: [PATCH v2 7/7] configs: rockchip: Enable USB2PHY for RK3328 boards
2023-06-06 17:09 ` [PATCH v2 7/7] configs: rockchip: Enable USB2PHY for RK3328 boards Jagan Teki
@ 2023-07-26 11:02 ` Kever Yang
0 siblings, 0 replies; 20+ messages in thread
From: Kever Yang @ 2023-07-26 11:02 UTC (permalink / raw)
To: Jagan Teki, Simon Glass, Philipp Tomsich
Cc: Jonas Karlman, u-boot, linux-amarula, Tianling Shen, David Bauer,
Loic Devulder, Chen-Yu Tsai, Banglang Huang, Matwey V . Kornilov
On 2023/6/7 01:09, Jagan Teki wrote:
> Enable USB2PHY for all RK3328 boards.
>
> => usb start
> starting USB...
> Bus usb@ff5c0000: USB EHCI 1.00
> Bus usb@ff5d0000: USB OHCI 1.0
> Bus usb@ff600000: generic_phy_get_bulk : no phys property
> Register 2000140 NbrPorts 2
> Starting the controller
> USB XHCI 1.10
> Bus usb@ff580000: USB DWC2
> scanning bus usb@ff5c0000 for devices... 2 USB Device(s) found
> scanning bus usb@ff5d0000 for devices... 1 USB Device(s) found
> scanning bus usb@ff600000 for devices... 2 USB Device(s) found
> scanning bus usb@ff580000 for devices... 2 USB Device(s) found
> scanning usb for storage devices... 2 Storage Device(s) found
> => usb tree
> USB device tree:
> 1 Hub (480 Mb/s, 0mA)
> | u-boot EHCI Host Controller
> |
> +-2 Mass Storage (480 Mb/s, 500mA)
> TS-RDF5A Transcend 000000000009
>
> 1 Hub (12 Mb/s, 0mA)
> U-Boot Root Hub
>
> 1 Hub (5 Gb/s, 0mA)
> | U-Boot XHCI Host Controller
> |
> +-2 Mass Storage (5 Gb/s, 224mA)
> SanDisk Dual Drive 040130e3ee554b7078843f4eb331646
>
> 1 Hub (480 Mb/s, 0mA)
> | U-Boot Root Hub
> |
> +-2 Human Interface (12 Mb/s, 98mA)
> Logitech USB Receiver
>
> => dm tree -s
> Class Index Probed Driver Name
> -----------------------------------------------------------
> syscon 1 [ + ] syscon |-- syscon@ff450000
> phy 0 [ + ] rockchip_usb2phy | `-- usb2phy@100
> clk 2 [ + ] rockchip_usb2phy_clo | |-- usb480m_phy
> phy 1 [ + ] rockchip_usb2phy_por | |-- otg-port
> phy 2 [ + ] rockchip_usb2phy_por | `-- host-port
> sysinfo 0 [ + ] sysinfo_smbios |-- smbios
> usb 3 [ + ] dwc2_usb |-- usb@ff580000
> usb_hub 3 [ + ] usb_hub | `-- usb_hub
> usb_dev_ge 0 [ + ] usb_dev_generic_drv | `-- generic_bus_3_dev_2
> usb 0 [ + ] ehci_generic |-- usb@ff5c0000
> usb_hub 0 [ + ] usb_hub | `-- usb_hub
> usb_mass_s 0 [ + ] usb_mass_storage | `-- usb_mass_storage
> blk 2 [ + ] usb_storage_blk | |-- usb_mass_storage.lun0
> partition 4 [ + ] blk_partition | | |-- usb_mass_storage.lun0:1
> partition 5 [ + ] blk_partition | | `-- usb_mass_storage.lun0:2
> bootdev 3 [ ] usb_bootdev | `-- usb_mass_storage.lun0.bootdev
> usb 1 [ + ] ohci_generic `-- usb@ff5d0000
> usb_hub 1 [ + ] usb_hub `-- usb_hub
>
> Cc: Tianling Shen <cnsztl@gmail.com>
> Cc: David Bauer <mail@david-bauer.net>
> Cc: Loic Devulder <ldevulder@suse.com>
> Cc: Chen-Yu Tsai <wens@csie.org>
> Cc: Banglang Huang <banglang.huang@foxmail.com>
> Cc: Matwey V. Kornilov <matwey.kornilov@gmail.com>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> Changes for v2:
> - update commit message.
>
> configs/evb-rk3328_defconfig | 1 +
> configs/nanopi-r2c-rk3328_defconfig | 1 +
> configs/nanopi-r2s-rk3328_defconfig | 1 +
> configs/roc-cc-rk3328_defconfig | 1 +
> configs/rock-pi-e-rk3328_defconfig | 1 +
> configs/rock64-rk3328_defconfig | 1 +
> 6 files changed, 6 insertions(+)
>
> diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
> index 5183d65451..8f53aadbb6 100644
> --- a/configs/evb-rk3328_defconfig
> +++ b/configs/evb-rk3328_defconfig
> @@ -74,6 +74,7 @@ CONFIG_MMC_DW=y
> CONFIG_MMC_DW_ROCKCHIP=y
> CONFIG_ETH_DESIGNWARE=y
> CONFIG_GMAC_ROCKCHIP=y
> +CONFIG_PHY_ROCKCHIP_INNO_USB2=y
> CONFIG_PINCTRL=y
> CONFIG_SPL_PINCTRL=y
> CONFIG_DM_PMIC=y
> diff --git a/configs/nanopi-r2c-rk3328_defconfig b/configs/nanopi-r2c-rk3328_defconfig
> index fb0b8719fb..583179d7c5 100644
> --- a/configs/nanopi-r2c-rk3328_defconfig
> +++ b/configs/nanopi-r2c-rk3328_defconfig
> @@ -76,6 +76,7 @@ CONFIG_MMC_DW=y
> CONFIG_MMC_DW_ROCKCHIP=y
> CONFIG_ETH_DESIGNWARE=y
> CONFIG_GMAC_ROCKCHIP=y
> +CONFIG_PHY_ROCKCHIP_INNO_USB2=y
> CONFIG_PINCTRL=y
> CONFIG_SPL_PINCTRL=y
> CONFIG_DM_PMIC=y
> diff --git a/configs/nanopi-r2s-rk3328_defconfig b/configs/nanopi-r2s-rk3328_defconfig
> index 79cb17d751..f7ed71e412 100644
> --- a/configs/nanopi-r2s-rk3328_defconfig
> +++ b/configs/nanopi-r2s-rk3328_defconfig
> @@ -76,6 +76,7 @@ CONFIG_MMC_DW=y
> CONFIG_MMC_DW_ROCKCHIP=y
> CONFIG_ETH_DESIGNWARE=y
> CONFIG_GMAC_ROCKCHIP=y
> +CONFIG_PHY_ROCKCHIP_INNO_USB2=y
> CONFIG_PINCTRL=y
> CONFIG_SPL_PINCTRL=y
> CONFIG_DM_PMIC=y
> diff --git a/configs/roc-cc-rk3328_defconfig b/configs/roc-cc-rk3328_defconfig
> index f5912ceca9..4ac3c9403b 100644
> --- a/configs/roc-cc-rk3328_defconfig
> +++ b/configs/roc-cc-rk3328_defconfig
> @@ -79,6 +79,7 @@ CONFIG_PHY_REALTEK=y
> CONFIG_PHY_GIGE=y
> CONFIG_ETH_DESIGNWARE=y
> CONFIG_GMAC_ROCKCHIP=y
> +CONFIG_PHY_ROCKCHIP_INNO_USB2=y
> CONFIG_PINCTRL=y
> CONFIG_SPL_PINCTRL=y
> CONFIG_DM_PMIC=y
> diff --git a/configs/rock-pi-e-rk3328_defconfig b/configs/rock-pi-e-rk3328_defconfig
> index e86a6f7b1a..277f691d4d 100644
> --- a/configs/rock-pi-e-rk3328_defconfig
> +++ b/configs/rock-pi-e-rk3328_defconfig
> @@ -78,6 +78,7 @@ CONFIG_MMC_DW=y
> CONFIG_MMC_DW_ROCKCHIP=y
> CONFIG_ETH_DESIGNWARE=y
> CONFIG_GMAC_ROCKCHIP=y
> +CONFIG_PHY_ROCKCHIP_INNO_USB2=y
> CONFIG_PHY=y
> CONFIG_PINCTRL=y
> CONFIG_SPL_PINCTRL=y
> diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
> index 4acbca0140..5e36612bb8 100644
> --- a/configs/rock64-rk3328_defconfig
> +++ b/configs/rock64-rk3328_defconfig
> @@ -77,6 +77,7 @@ CONFIG_MMC_DW_ROCKCHIP=y
> CONFIG_SPI_FLASH_GIGADEVICE=y
> CONFIG_ETH_DESIGNWARE=y
> CONFIG_GMAC_ROCKCHIP=y
> +CONFIG_PHY_ROCKCHIP_INNO_USB2=y
> CONFIG_PINCTRL=y
> CONFIG_SPL_PINCTRL=y
> CONFIG_DM_PMIC=y
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 0/7] rockchip: Fix RK3328 USB support
2023-06-06 17:09 [PATCH v2 0/7] rockchip: Fix RK3328 USB support Jagan Teki
` (6 preceding siblings ...)
2023-06-06 17:09 ` [PATCH v2 7/7] configs: rockchip: Enable USB2PHY for RK3328 boards Jagan Teki
@ 2023-06-11 22:31 ` Peter Robinson
2023-07-13 9:31 ` Jagan Teki
8 siblings, 0 replies; 20+ messages in thread
From: Peter Robinson @ 2023-06-11 22:31 UTC (permalink / raw)
To: Jagan Teki
Cc: Kever Yang, Simon Glass, Philipp Tomsich, Jonas Karlman, u-boot,
linux-amarula
On Tue, Jun 6, 2023 at 6:09 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> This series support fixes for RK3328 USB.
>
> Changes for v2:
> - collect Marek RB
> - update phy driver clockout_ctl for rk3328
> - retest on Xavier patches.
>
> Any inputs?
I've done some basic testing of thing on a Rock64 and it looks good to
me so for the series:
Tested-by: Peter Robinson <pbrobinson@gmail.com>
> Jagan.
>
> Jagan Teki (7):
> arm64: dts: rockchip: Drop unused rk3328-xhci node
> configs: Drop unused XHCI_DWC3 for RK3328 boards
> usb: dwc3-generic: Restrict single ctrl node for RK3328
> configs: Enable DWC3 USB 3.0 on RK3328 boards
> phy: rockchip-inno-usb2: Add USB2 PHY for RK3328
> clk: rockchip: rk3328: Handle usb480m phy clock
> configs: rockchip: Enable USB2PHY for RK3328 boards
>
> arch/arm/dts/rk3328-evb-u-boot.dtsi | 5 ---
> arch/arm/dts/rk3328-roc-cc-u-boot.dtsi | 14 --------
> arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi | 5 ---
> arch/arm/dts/rk3328-rock64-u-boot.dtsi | 15 --------
> arch/arm/dts/rk3328-u-boot.dtsi | 11 ------
> configs/evb-rk3328_defconfig | 4 ++-
> configs/nanopi-r2c-rk3328_defconfig | 4 ++-
> configs/nanopi-r2s-rk3328_defconfig | 4 ++-
> configs/roc-cc-rk3328_defconfig | 4 ++-
> configs/rock-pi-e-rk3328_defconfig | 4 ++-
> configs/rock64-rk3328_defconfig | 4 ++-
> drivers/clk/rockchip/clk_rk3328.c | 2 ++
> drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 34 +++++++++++++++++++
> drivers/usb/dwc3/dwc3-generic.c | 2 +-
> 14 files changed, 55 insertions(+), 57 deletions(-)
>
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [PATCH v2 0/7] rockchip: Fix RK3328 USB support
2023-06-06 17:09 [PATCH v2 0/7] rockchip: Fix RK3328 USB support Jagan Teki
` (7 preceding siblings ...)
2023-06-11 22:31 ` [PATCH v2 0/7] rockchip: Fix RK3328 USB support Peter Robinson
@ 2023-07-13 9:31 ` Jagan Teki
8 siblings, 0 replies; 20+ messages in thread
From: Jagan Teki @ 2023-07-13 9:31 UTC (permalink / raw)
To: Kever Yang, Simon Glass, Philipp Tomsich
Cc: Jonas Karlman, u-boot, linux-amarula
Hi Kever,
On Tue, Jun 6, 2023 at 10:39 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> This series support fixes for RK3328 USB.
>
> Changes for v2:
> - collect Marek RB
> - update phy driver clockout_ctl for rk3328
> - retest on Xavier patches.
>
> Any inputs?
> Jagan.
>
> Jagan Teki (7):
> arm64: dts: rockchip: Drop unused rk3328-xhci node
> configs: Drop unused XHCI_DWC3 for RK3328 boards
> usb: dwc3-generic: Restrict single ctrl node for RK3328
> configs: Enable DWC3 USB 3.0 on RK3328 boards
> phy: rockchip-inno-usb2: Add USB2 PHY for RK3328
> clk: rockchip: rk3328: Handle usb480m phy clock
> configs: rockchip: Enable USB2PHY for RK3328 boards
Merge them in MW if you don't have any comments.
Thanks,
Jagan.
^ permalink raw reply [flat|nested] 20+ messages in thread