diff mbox series

[1/3] phycore-imx8mp: add USB host support

Message ID 20240129-usb_support-v1-1-8bd2fe84005b@phytec.de
State Changes Requested
Delegated to: Fabio Estevam
Headers show
Series phycore-imx8mp: Add USB support | expand

Commit Message

Benjamin Hahn Jan. 29, 2024, 7:55 a.m. UTC
The phyBOARD Pollux has two USB ports. Add support for USB host and USB
storage for the USB1 port.

Signed-off-by: Benjamin Hahn <B.Hahn@phytec.de>
---
 arch/arm/dts/imx8mp-phyboard-pollux-rdk-u-boot.dtsi | 13 +++++++++++++
 configs/phycore-imx8mp_defconfig                    | 10 ++++++++++
 2 files changed, 23 insertions(+)

Comments

Fabio Estevam Jan. 30, 2024, 12:36 p.m. UTC | #1
Hi Benjamin,

On Mon, Jan 29, 2024 at 4:56 AM Benjamin Hahn <B.Hahn@phytec.de> wrote:

> diff --git a/arch/arm/dts/imx8mp-phyboard-pollux-rdk-u-boot.dtsi b/arch/arm/dts/imx8mp-phyboard-pollux-rdk-u-boot.dtsi
> index 1c7b250549..5d6974f8fa 100644
> --- a/arch/arm/dts/imx8mp-phyboard-pollux-rdk-u-boot.dtsi
> +++ b/arch/arm/dts/imx8mp-phyboard-pollux-rdk-u-boot.dtsi
> @@ -70,6 +70,19 @@
>         bootph-pre-ram;
>  };
>
> +&usb3_1 {
> +       status = "okay";
> +       dr_mode = "host";
> +};
> +
> +&usb_dwc3_1 {
> +       status = "okay";
> +};
> +
> +&usb3_phy1 {
> +       status = "okay";
> +};

Why are these USB nodes being added to -u-boot.dtsi?

These nodes are already present in  the kernel dts:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts?h=v6.8-rc2#n169

Please add a patch to the series that syncs
imx8mp-phyboard-pollux-rdk.dts with the upstream version, then you
don't need to touch u-boot.dtsi.
diff mbox series

Patch

diff --git a/arch/arm/dts/imx8mp-phyboard-pollux-rdk-u-boot.dtsi b/arch/arm/dts/imx8mp-phyboard-pollux-rdk-u-boot.dtsi
index 1c7b250549..5d6974f8fa 100644
--- a/arch/arm/dts/imx8mp-phyboard-pollux-rdk-u-boot.dtsi
+++ b/arch/arm/dts/imx8mp-phyboard-pollux-rdk-u-boot.dtsi
@@ -70,6 +70,19 @@ 
 	bootph-pre-ram;
 };
 
+&usb3_1 {
+	status = "okay";
+	dr_mode = "host";
+};
+
+&usb_dwc3_1 {
+	status = "okay";
+};
+
+&usb3_phy1 {
+	status = "okay";
+};
+
 &usdhc2 {
 	bootph-pre-ram;
 };
diff --git a/configs/phycore-imx8mp_defconfig b/configs/phycore-imx8mp_defconfig
index 519e0cfb3d..74450b957b 100644
--- a/configs/phycore-imx8mp_defconfig
+++ b/configs/phycore-imx8mp_defconfig
@@ -65,6 +65,7 @@  CONFIG_CMD_FUSE=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
@@ -104,6 +105,7 @@  CONFIG_DM_ETH_PHY=y
 CONFIG_FEC_MXC=y
 CONFIG_RGMII=y
 CONFIG_MII=y
+CONFIG_PHY_IMX8MQ_USB=y
 CONFIG_PINCTRL=y
 CONFIG_SPL_PINCTRL=y
 CONFIG_PINCTRL_IMX8M=y
@@ -120,4 +122,12 @@  CONFIG_SPL_SYSRESET=y
 CONFIG_SYSRESET_PSCI=y
 CONFIG_SYSRESET_WATCHDOG=y
 CONFIG_DM_THERMAL=y
+CONFIG_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_XHCI_DWC3_OF_SIMPLE=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GENERIC=y
+CONFIG_USB_STORAGE=y
 CONFIG_IMX_WATCHDOG=y