Skip to contentSkip to conversation

imx93-phyboard-segin: Add USB support.

PATCH Superseded Mathieu Othacehe 4 participants 13 messages Mar 18, 2024 – Mar 20, 2024

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#11 lore raw

PATCH 3/3 configs: imx93-phyboard-segin: Add fastboot support.

In reply to Mathieu Othacehe

Enable the fastboot command.

---
 configs/imx93-phyboard-segin_defconfig | 6 ++++++
 1 file changed, 6 insertions(+)
configs/imx93-phyboard-segin_defconfig +6 -0
index 5acb987b817..44ab6f7073b 100644
@@ -94,6 +94,12 @@ CONFIG_SPL_CLK_IMX93=y
 CONFIG_CLK_IMX93=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x82800000
+CONFIG_FASTBOOT_BUF_SIZE=0x20000000
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_FASTBOOT_UUU_SUPPORT=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_GPIO_HOG=y
 CONFIG_IMX_RGPIO2P=y
 CONFIG_DM_I2C=y
Signature · 1 line
2.41.0
#1 lore raw

PATCH 1/3 arm: dts: imx93-phyboard-segin: Add USB support.

In reply to Mathieu Othacehe

Enable both usbotg1 and usbotg2 ports.

---
 arch/arm/dts/imx93-phyboard-segin.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm/dts/imx93-phyboard-segin.dts +13 -0
index 85fb188b057..acf307a3192 100644
@@ -40,6 +40,19 @@
 	status = "okay";
 };
 
+/* USB  */
+&usbotg1 {
+	disable-over-current;
+	dr_mode = "otg";
+	status = "okay";
+};
+
+&usbotg2 {
+	disable-over-current;
+	dr_mode = "host";
+	status = "okay";
+};
+
 /* eMMC */
 &usdhc1 {
 	no-1-8-v;
Signature · 1 line
2.41.0
#0 lore raw

cover imx93-phyboard-segin: Add USB support.

Hello,

This series adds USB support to imx93-phyboard-segin, in the same way as it has been done for imx93_var_som here:

https://lists.denx.de/pipermail/u-boot/2024-February/546301.html

Thanks,

Mathieu

Mathieu Othacehe (3):
arm: dts: imx93-phyboard-segin: Add USB support.
configs: imx93-phyboard-segin: Add USB support.
configs: imx93-phyboard-segin: Add fastboot support.

 arch/arm/dts/imx93-phyboard-segin.dts  | 13 +++++++++++++
 configs/imx93-phyboard-segin_defconfig | 14 ++++++++++++++
 2 files changed, 27 insertions(+)
Signature · 1 line
2.41.0
#5 lore raw

PATCH 2/3 configs: imx93-phyboard-segin: Add USB support.

Enable the usb command and some USB drivers.

---
 configs/imx93-phyboard-segin_defconfig | 8 ++++++++
 1 file changed, 8 insertions(+)
configs/imx93-phyboard-segin_defconfig +8 -0
index 24f9bd553aa..5acb987b817 100644
@@ -23,6 +23,7 @@ CONFIG_SPL_STACK=0x20519dd0
 CONFIG_SPL=y
 CONFIG_ENV_OFFSET_REDUND=0x720000
 CONFIG_CMD_DEKBLOB=y
+CONFIG_CMD_USB=y
 CONFIG_SPL_IMX_ROMAPI_LOADADDR=0x88000000
 CONFIG_SYS_LOAD_ADDR=0x80400000
 CONFIG_SYS_MEMTEST_START=0x80000000
@@ -132,6 +133,13 @@ CONFIG_SPL_SYSRESET=y
 CONFIG_SYSRESET_WATCHDOG=y
 CONFIG_DM_THERMAL=y
 CONFIG_IMX_TMU=y
+CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_MANUFACTURER="FSL"
+CONFIG_USB_GADGET_VENDOR_NUM=0x1fc9
+CONFIG_USB_GADGET_PRODUCT_NUM=0x0152
+CONFIG_CI_UDC=y
 CONFIG_ULP_WATCHDOG=y
 CONFIG_LZO=y
 CONFIG_BZIP2=y
Signature · 1 line
2.41.0
#2 lore raw

Re: [PATCH 1/3] arm: dts: imx93-phyboard-segin: Add USB support.

In reply to Mathieu Othacehe
Quoted 1 line · Mathieu Othacehe

Enable both usbotg1 and usbotg2 ports.

Drop fullstop from $subject end.

Quoted 10 lines
---
  arch/arm/dts/imx93-phyboard-segin.dts | 13 +++++++++++++
  1 file changed, 13 insertions(+)
arch/arm/dts/imx93-phyboard-segin.dts +0 -0
index 85fb188b057..acf307a3192 100644

arch/arm/dts/imx93-phyboard-segin.dts line 45

Quoted 6 lines
arch/arm/dts/imx93-phyboard-segin.dts +3 -0
@@ -40,6 +40,19 @@
  	status = "okay";
  };
 
+/* USB  */
+&usbotg1 {
+	disable-over-current;

Why is this needed ?

#6 lore raw

Re: [PATCH 2/3] configs: imx93-phyboard-segin: Add USB support.

In reply to Mathieu Othacehe
Quoted 20 lines · Mathieu Othacehe

Enable the usb command and some USB drivers.

---
  configs/imx93-phyboard-segin_defconfig | 8 ++++++++
  1 file changed, 8 insertions(+)
configs/imx93-phyboard-segin_defconfig +1 -0
index 24f9bd553aa..5acb987b817 100644
@@ -23,6 +23,7 @@ CONFIG_SPL_STACK=0x20519dd0
  CONFIG_SPL=y
  CONFIG_ENV_OFFSET_REDUND=0x720000
  CONFIG_CMD_DEKBLOB=y
+CONFIG_CMD_USB=y
  CONFIG_SPL_IMX_ROMAPI_LOADADDR=0x88000000
  CONFIG_SYS_LOAD_ADDR=0x80400000
  CONFIG_SYS_MEMTEST_START=0x80000000

configs/imx93-phyboard-segin_defconfig CONFIG_SPL_SYSRESET=y · line 141

Quoted 9 lines
configs/imx93-phyboard-segin_defconfig +6 -0
@@ -132,6 +133,13 @@ CONFIG_SPL_SYSRESET=y
  CONFIG_SYSRESET_WATCHDOG=y
  CONFIG_DM_THERMAL=y
  CONFIG_IMX_TMU=y
+CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_MANUFACTURER="FSL"
+CONFIG_USB_GADGET_VENDOR_NUM=0x1fc9
+CONFIG_USB_GADGET_PRODUCT_NUM=0x0152

Shouldn't this by Phytec or similar USB IDs ?

#10 lore raw

Re: [PATCH 2/3] configs: imx93-phyboard-segin: Add USB support.

In reply to Mathieu Othacehe

Hi Mathieu,

Quoted 2 lines · Mathieu Othacehe

Enable the usb command and some USB drivers.

I would rephrase commit msg to something like this:

Add USB support by enabling usb command and required USB drivers.

Quoted 10 lines
---
 configs/imx93-phyboard-segin_defconfig | 8 ++++++++
 1 file changed, 8 insertions(+)
configs/imx93-phyboard-segin_defconfig +0 -0
index 24f9bd553aa..5acb987b817 100644

configs/imx93-phyboard-segin_defconfig CONFIG_SPL_STACK=0x20519dd0 · line 26

Quoted 4 lines
configs/imx93-phyboard-segin_defconfig +1 -0
@@ -23,6 +23,7 @@ CONFIG_SPL_STACK=0x20519dd0
 CONFIG_SPL=y
 CONFIG_ENV_OFFSET_REDUND=0x720000
 CONFIG_CMD_DEKBLOB=y
+CONFIG_CMD_USB=y

Can you run

$ make savedefconfig && cp defconfig configs/imx93-phyboard-segin_defconfig

to re-order CONFIG_CMD_USB please?

Quoted 17 lines
configs/imx93-phyboard-segin_defconfig +7 -0
 CONFIG_SPL_IMX_ROMAPI_LOADADDR=0x88000000
 CONFIG_SYS_LOAD_ADDR=0x80400000
 CONFIG_SYS_MEMTEST_START=0x80000000
@@ -132,6 +133,13 @@ CONFIG_SPL_SYSRESET=y
 CONFIG_SYSRESET_WATCHDOG=y
 CONFIG_DM_THERMAL=y
 CONFIG_IMX_TMU=y
+CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_MANUFACTURER="FSL"
+CONFIG_USB_GADGET_VENDOR_NUM=0x1fc9
+CONFIG_USB_GADGET_PRODUCT_NUM=0x0152
+CONFIG_CI_UDC=y
 CONFIG_ULP_WATCHDOG=y
 CONFIG_LZO=y
 CONFIG_BZIP2=y
Signature · 9 lines
Primoz Fiser                    | phone: +386-41-540-545
<tel:+386-41-390-545> |
---------------------------------------------------------|
Norik systems d.o.o.            | https://www.norik.com
<https://www.norik.com>  |
Your embedded software partner  | email: [email protected]
<mailto:[email protected]> |
Slovenia, EU                    | phone: +386-41-540-545
<tel:+386-41-540-545> |
#3 lore raw

Re: [PATCH 1/3] arm: dts: imx93-phyboard-segin: Add USB support.

In reply to Marek Vasut

Hi Marek,

Quoted 10 lines · Marek Vasut
Quoted 1 line · Mathieu Othacehe

Enable both usbotg1 and usbotg2 ports.

Drop fullstop from $subject end.

Quoted 5 lines

---
  arch/arm/dts/imx93-phyboard-segin.dts | 13 +++++++++++++

  1 file changed, 13 insertions(+)
Quoted 13 lines
Quoted 11 lines
arch/arm/dts/imx93-phyboard-segin.dts +0 -0
index 85fb188b057..acf307a3192 100644
@@ -40,6 +40,19 @@
       status = "okay";
   };

  +/* USB  */
+&usbotg1 {
+    disable-over-current;

Why is this needed ?

OC pins are not connected to the SoC thus disable OC to avoid warnings (c/p from kernel dts).

BR,
Primoz

#7 lore raw

Re: [PATCH 2/3] configs: imx93-phyboard-segin: Add USB support.

In reply to Marek Vasut

Am 18.03.24 um 22:48 schrieb Marek Vasut:

Quoted 24 lines · Mathieu Othacehe
Quoted 23 lines

Enable the usb command and some USB drivers.

---
  configs/imx93-phyboard-segin_defconfig | 8 ++++++++

  1 file changed, 8 insertions(+)
configs/imx93-phyboard-segin_defconfig +0 -0
index 24f9bd553aa..5acb987b817 100644
@@ -23,6 +23,7 @@ CONFIG_SPL_STACK=0x20519dd0

  CONFIG_SPL=y
  CONFIG_ENV_OFFSET_REDUND=0x720000
  CONFIG_CMD_DEKBLOB=y
+CONFIG_CMD_USB=y
  CONFIG_SPL_IMX_ROMAPI_LOADADDR=0x88000000
  CONFIG_SYS_LOAD_ADDR=0x80400000
  CONFIG_SYS_MEMTEST_START=0x80000000

configs/imx93-phyboard-segin_defconfig +0 -0
@@ -132,6 +133,13 @@ CONFIG_SPL_SYSRESET=y

  CONFIG_SYSRESET_WATCHDOG=y
  CONFIG_DM_THERMAL=y
  CONFIG_IMX_TMU=y

Quoted 8 lines

configs/imx93-phyboard-segin_defconfig CONFIG_SPL_SYSRESET=y · line 141

Quoted 6 lines
configs/imx93-phyboard-segin_defconfig +6 -0
+CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_MANUFACTURER="FSL"
+CONFIG_USB_GADGET_VENDOR_NUM=0x1fc9
+CONFIG_USB_GADGET_PRODUCT_NUM=0x0152

Shouldn't this by Phytec or similar USB IDs ?

AFAIK, PHYTEC does not have its own IDs registered yet. So the freescale IDs should be fine.

#4 lore raw

Re: [PATCH 1/3] arm: dts: imx93-phyboard-segin: Add USB support.

In reply to Primoz Fiser
Quoted 27 lines · Primoz Fiser

Hi Marek,

Quoted 10 lines · Marek Vasut
Quoted 1 line · Mathieu Othacehe

Enable both usbotg1 and usbotg2 ports.

Drop fullstop from $subject end.

Quoted 5 lines
---
   arch/arm/dts/imx93-phyboard-segin.dts | 13 +++++++++++++
   1 file changed, 13 insertions(+)
Quoted 13 lines

arch/arm/dts/imx93-phyboard-segin.dts line 44

Quoted 11 lines
arch/arm/dts/imx93-phyboard-segin.dts +2 -0
index 85fb188b057..acf307a3192 100644
@@ -40,6 +40,19 @@
       status = "okay";
   };
   +/* USB  */
+&usbotg1 {
+    disable-over-current;

Why is this needed ?

Quoted 2 lines

OC pins are not connected to the SoC thus disable OC to avoid warnings (c/p from kernel dts).

Please add it to the commit message for posterity, thanks.

#8 lore raw

Re: [PATCH 2/3] configs: imx93-phyboard-segin: Add USB support.

In reply to Wadim Egorov
Quoted 34 lines · Wadim Egorov

Am 18.03.24 um 22:48 schrieb Marek Vasut:

Quoted 24 lines · Mathieu Othacehe
Quoted 23 lines

Enable the usb command and some USB drivers.

---
  configs/imx93-phyboard-segin_defconfig | 8 ++++++++

  1 file changed, 8 insertions(+)
configs/imx93-phyboard-segin_defconfig +0 -0
index 24f9bd553aa..5acb987b817 100644
@@ -23,6 +23,7 @@ CONFIG_SPL_STACK=0x20519dd0

  CONFIG_SPL=y
  CONFIG_ENV_OFFSET_REDUND=0x720000
  CONFIG_CMD_DEKBLOB=y
+CONFIG_CMD_USB=y
  CONFIG_SPL_IMX_ROMAPI_LOADADDR=0x88000000
  CONFIG_SYS_LOAD_ADDR=0x80400000
  CONFIG_SYS_MEMTEST_START=0x80000000

configs/imx93-phyboard-segin_defconfig +0 -0
@@ -132,6 +133,13 @@ CONFIG_SPL_SYSRESET=y

  CONFIG_SYSRESET_WATCHDOG=y
  CONFIG_DM_THERMAL=y
  CONFIG_IMX_TMU=y

Quoted 8 lines

configs/imx93-phyboard-segin_defconfig CONFIG_SPL_SYSRESET=y · line 141

Quoted 6 lines
configs/imx93-phyboard-segin_defconfig +6 -0
+CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_MANUFACTURER="FSL"
+CONFIG_USB_GADGET_VENDOR_NUM=0x1fc9
+CONFIG_USB_GADGET_PRODUCT_NUM=0x0152

Shouldn't this by Phytec or similar USB IDs ?

Quoted 1 line

AFAIK, PHYTEC does not have its own IDs registered yet. So the freescale IDs should be fine.

Manufacturer can still be Phytec , can it not ?

#9 lore raw

Re: [PATCH 2/3] configs: imx93-phyboard-segin: Add USB support.

Am 19.03.24 um 14:58 schrieb Marek Vasut:

Quoted 35 lines · Wadim Egorov
Quoted 34 lines

Am 18.03.24 um 22:48 schrieb Marek Vasut:

Quoted 32 lines · Mathieu Othacehe
Quoted 23 lines

Enable the usb command and some USB drivers.

---
  configs/imx93-phyboard-segin_defconfig | 8 ++++++++

  1 file changed, 8 insertions(+)
configs/imx93-phyboard-segin_defconfig +0 -0
index 24f9bd553aa..5acb987b817 100644
@@ -23,6 +23,7 @@ CONFIG_SPL_STACK=0x20519dd0

  CONFIG_SPL=y
  CONFIG_ENV_OFFSET_REDUND=0x720000
  CONFIG_CMD_DEKBLOB=y
+CONFIG_CMD_USB=y
  CONFIG_SPL_IMX_ROMAPI_LOADADDR=0x88000000
  CONFIG_SYS_LOAD_ADDR=0x80400000
  CONFIG_SYS_MEMTEST_START=0x80000000

configs/imx93-phyboard-segin_defconfig +0 -0
@@ -132,6 +133,13 @@ CONFIG_SPL_SYSRESET=y

  CONFIG_SYSRESET_WATCHDOG=y
  CONFIG_DM_THERMAL=y
  CONFIG_IMX_TMU=y

configs/imx93-phyboard-segin_defconfig CONFIG_SPL_SYSRESET=y · line 141

Quoted 6 lines
configs/imx93-phyboard-segin_defconfig +6 -0
+CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_MANUFACTURER="FSL"
+CONFIG_USB_GADGET_VENDOR_NUM=0x1fc9
+CONFIG_USB_GADGET_PRODUCT_NUM=0x0152

Shouldn't this by Phytec or similar USB IDs ?

Quoted 3 lines
Quoted 1 line

AFAIK, PHYTEC does not have its own IDs registered yet. So the freescale IDs should be fine.

Manufacturer can still be Phytec , can it not ?

Yes, we can use PHYTEC for manufacturer.