All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] imx93-phyboard-segin: Add USB support.
@ 2024-03-21 14:45 Mathieu Othacehe
  2024-03-21 14:45 ` [PATCH v3 1/3] arm: dts: " Mathieu Othacehe
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Mathieu Othacehe @ 2024-03-21 14:45 UTC (permalink / raw
  To: Tom Rini, Marek Vasut, Peng Fan, Shiji Yang, Ye Li, Alice Guo,
	Stefano Babic, Sébastien Szymanski, Fabio Estevam,
	Simon Glass, Mathieu Othacehe, Yannic Moog, Primoz Fiser,
	Christoph Stoidner, Wadim Egorov
  Cc: u-boot, Mathieu Othacehe

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

Changelog:

v1: https://lists.denx.de/pipermail/u-boot/2024-March/548613.html

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-u-boot.dtsi | 15 +++++++++++++++
 configs/imx93-phyboard-segin_defconfig        | 14 ++++++++++++++
 2 files changed, 29 insertions(+)

-- 
2.41.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v3 1/3] arm: dts: imx93-phyboard-segin: Add USB support
  2024-03-21 14:45 [PATCH v3 0/3] imx93-phyboard-segin: Add USB support Mathieu Othacehe
@ 2024-03-21 14:45 ` Mathieu Othacehe
  2024-03-21 14:47   ` Fabio Estevam
  2024-03-21 16:13   ` Marek Vasut
  2024-03-21 14:45 ` [PATCH v3 2/3] configs: " Mathieu Othacehe
  2024-03-21 14:45 ` [PATCH v3 3/3] configs: imx93-phyboard-segin: Add fastboot support Mathieu Othacehe
  2 siblings, 2 replies; 11+ messages in thread
From: Mathieu Othacehe @ 2024-03-21 14:45 UTC (permalink / raw
  To: Tom Rini, Marek Vasut, Peng Fan, Shiji Yang, Ye Li, Alice Guo,
	Stefano Babic, Sébastien Szymanski, Fabio Estevam,
	Simon Glass, Mathieu Othacehe, Yannic Moog, Primoz Fiser,
	Christoph Stoidner, Wadim Egorov
  Cc: u-boot, Mathieu Othacehe

Enable both usbotg1 and usbotg2 ports. Disable over-current as OC pins are
not connected to the SoC.

This is temporary, until USB support is added to imx93-phyboard-segin.dts
in Linux.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
---
 arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi b/arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi
index 8bf28c2de87..6897c91f4d9 100644
--- a/arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi
+++ b/arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi
@@ -121,6 +121,21 @@
 	bootph-some-ram;
 };
 
+/*
+ * Remove once USB support is added to imx93-phyboard-segin.dts upstream.
+ */
+&usbotg1 {
+	disable-over-current;
+	dr_mode = "otg";
+	status = "okay";
+};
+
+&usbotg2 {
+	disable-over-current;
+	dr_mode = "host";
+	status = "okay";
+};
+
 &usdhc1 {
 	bootph-pre-ram;
 	bootph-some-ram;
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v3 2/3] configs: imx93-phyboard-segin: Add USB support
  2024-03-21 14:45 [PATCH v3 0/3] imx93-phyboard-segin: Add USB support Mathieu Othacehe
  2024-03-21 14:45 ` [PATCH v3 1/3] arm: dts: " Mathieu Othacehe
@ 2024-03-21 14:45 ` Mathieu Othacehe
  2024-03-21 16:16   ` Marek Vasut
  2024-03-21 14:45 ` [PATCH v3 3/3] configs: imx93-phyboard-segin: Add fastboot support Mathieu Othacehe
  2 siblings, 1 reply; 11+ messages in thread
From: Mathieu Othacehe @ 2024-03-21 14:45 UTC (permalink / raw
  To: Tom Rini, Marek Vasut, Peng Fan, Shiji Yang, Ye Li, Alice Guo,
	Stefano Babic, Sébastien Szymanski, Fabio Estevam,
	Simon Glass, Mathieu Othacehe, Yannic Moog, Primoz Fiser,
	Christoph Stoidner, Wadim Egorov
  Cc: u-boot, Mathieu Othacehe

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

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
---
 configs/imx93-phyboard-segin_defconfig | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/configs/imx93-phyboard-segin_defconfig b/configs/imx93-phyboard-segin_defconfig
index 24f9bd553aa..0345e7deeab 100644
--- a/configs/imx93-phyboard-segin_defconfig
+++ b/configs/imx93-phyboard-segin_defconfig
@@ -67,6 +67,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_POWEROFF=y
+CONFIG_CMD_USB=y
 CONFIG_CMD_SNTP=y
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_EFIDEBUG=y
@@ -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="PHYTEC"
+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
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v3 3/3] configs: imx93-phyboard-segin: Add fastboot support
  2024-03-21 14:45 [PATCH v3 0/3] imx93-phyboard-segin: Add USB support Mathieu Othacehe
  2024-03-21 14:45 ` [PATCH v3 1/3] arm: dts: " Mathieu Othacehe
  2024-03-21 14:45 ` [PATCH v3 2/3] configs: " Mathieu Othacehe
@ 2024-03-21 14:45 ` Mathieu Othacehe
  2 siblings, 0 replies; 11+ messages in thread
From: Mathieu Othacehe @ 2024-03-21 14:45 UTC (permalink / raw
  To: Tom Rini, Marek Vasut, Peng Fan, Shiji Yang, Ye Li, Alice Guo,
	Stefano Babic, Sébastien Szymanski, Fabio Estevam,
	Simon Glass, Mathieu Othacehe, Yannic Moog, Primoz Fiser,
	Christoph Stoidner, Wadim Egorov
  Cc: u-boot, Mathieu Othacehe

Enable the `fastboot` command.

Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
---
 configs/imx93-phyboard-segin_defconfig | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/configs/imx93-phyboard-segin_defconfig b/configs/imx93-phyboard-segin_defconfig
index 0345e7deeab..54215c51c08 100644
--- a/configs/imx93-phyboard-segin_defconfig
+++ b/configs/imx93-phyboard-segin_defconfig
@@ -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
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v3 1/3] arm: dts: imx93-phyboard-segin: Add USB support
  2024-03-21 14:45 ` [PATCH v3 1/3] arm: dts: " Mathieu Othacehe
@ 2024-03-21 14:47   ` Fabio Estevam
  2024-03-21 16:13   ` Marek Vasut
  1 sibling, 0 replies; 11+ messages in thread
From: Fabio Estevam @ 2024-03-21 14:47 UTC (permalink / raw
  To: Mathieu Othacehe
  Cc: Tom Rini, Marek Vasut, Peng Fan, Shiji Yang, Ye Li, Alice Guo,
	Stefano Babic, Sébastien Szymanski, Simon Glass,
	Mathieu Othacehe, Yannic Moog, Primoz Fiser, Christoph Stoidner,
	Wadim Egorov, u-boot

Hi Mathieu,

On Thu, Mar 21, 2024 at 11:46 AM Mathieu Othacehe <othacehe@gnu.org> wrote:
>
> Enable both usbotg1 and usbotg2 ports. Disable over-current as OC pins are
> not connected to the SoC.
>
> This is temporary, until USB support is added to imx93-phyboard-segin.dts
> in Linux.
>
> Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>

Thanks, this looks better:

Reviewed-by: Fabio Estevam <festevam@gmail.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v3 1/3] arm: dts: imx93-phyboard-segin: Add USB support
  2024-03-21 14:45 ` [PATCH v3 1/3] arm: dts: " Mathieu Othacehe
  2024-03-21 14:47   ` Fabio Estevam
@ 2024-03-21 16:13   ` Marek Vasut
  2024-03-24 17:55     ` Fabio Estevam
  1 sibling, 1 reply; 11+ messages in thread
From: Marek Vasut @ 2024-03-21 16:13 UTC (permalink / raw
  To: Mathieu Othacehe, Tom Rini, Peng Fan, Shiji Yang, Ye Li,
	Alice Guo, Stefano Babic, Sébastien Szymanski, Fabio Estevam,
	Simon Glass, Mathieu Othacehe, Yannic Moog, Primoz Fiser,
	Christoph Stoidner, Wadim Egorov
  Cc: u-boot

On 3/21/24 3:45 PM, Mathieu Othacehe wrote:
> Enable both usbotg1 and usbotg2 ports. Disable over-current as OC pins are
> not connected to the SoC.
> 
> This

"This addition to ...-u-boot.dtsi is temporary, ..." would be clearer.

> is temporary, until USB support is added to imx93-phyboard-segin.dts
> in Linux.
> 
> Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>

Reviewed-by: Marek Vasut <marex@denx.de>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v3 2/3] configs: imx93-phyboard-segin: Add USB support
  2024-03-21 14:45 ` [PATCH v3 2/3] configs: " Mathieu Othacehe
@ 2024-03-21 16:16   ` Marek Vasut
  2024-03-24 18:00     ` Fabio Estevam
  0 siblings, 1 reply; 11+ messages in thread
From: Marek Vasut @ 2024-03-21 16:16 UTC (permalink / raw
  To: Mathieu Othacehe, Tom Rini, Peng Fan, Shiji Yang, Ye Li,
	Alice Guo, Stefano Babic, Sébastien Szymanski, Fabio Estevam,
	Simon Glass, Mathieu Othacehe, Yannic Moog, Primoz Fiser,
	Christoph Stoidner, Wadim Egorov
  Cc: u-boot

On 3/21/24 3:45 PM, Mathieu Othacehe wrote:
> Add USB support by enabling `usb` command and required USB drivers.
> 
> Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
> ---
>   configs/imx93-phyboard-segin_defconfig | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/configs/imx93-phyboard-segin_defconfig b/configs/imx93-phyboard-segin_defconfig
> index 24f9bd553aa..0345e7deeab 100644
> --- a/configs/imx93-phyboard-segin_defconfig
> +++ b/configs/imx93-phyboard-segin_defconfig
> @@ -67,6 +67,7 @@ CONFIG_CMD_GPIO=y
>   CONFIG_CMD_I2C=y
>   CONFIG_CMD_MMC=y
>   CONFIG_CMD_POWEROFF=y
> +CONFIG_CMD_USB=y
>   CONFIG_CMD_SNTP=y
>   CONFIG_CMD_CACHE=y
>   CONFIG_CMD_EFIDEBUG=y
> @@ -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="PHYTEC"

$ git grep -i usb.*phytec configs
configs/phycore_pcl063_defconfig:CONFIG_USB_GADGET_MANUFACTURER="Phytec"
configs/phycore_pcl063_ull_defconfig:CONFIG_USB_GADGET_MANUFACTURER="Phytec"

It would be good to be consistent.

Also, what is the vendor/product number those two boards use ?

Also, it would be good to fix the extra leading zero in those board 
boards vendor number, this, in both configs:

CONFIG_USB_GADGET_VENDOR_NUM=0x01b67

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v3 1/3] arm: dts: imx93-phyboard-segin: Add USB support
  2024-03-21 16:13   ` Marek Vasut
@ 2024-03-24 17:55     ` Fabio Estevam
  0 siblings, 0 replies; 11+ messages in thread
From: Fabio Estevam @ 2024-03-24 17:55 UTC (permalink / raw
  To: Marek Vasut
  Cc: Mathieu Othacehe, Tom Rini, Peng Fan, Shiji Yang, Ye Li,
	Alice Guo, Stefano Babic, Sébastien Szymanski, Simon Glass,
	Mathieu Othacehe, Yannic Moog, Primoz Fiser, Christoph Stoidner,
	Wadim Egorov, u-boot

On Thu, Mar 21, 2024 at 4:17 PM Marek Vasut <marex@denx.de> wrote:
>
> On 3/21/24 3:45 PM, Mathieu Othacehe wrote:
> > Enable both usbotg1 and usbotg2 ports. Disable over-current as OC pins are
> > not connected to the SoC.
> >
> > This
>
> "This addition to ...-u-boot.dtsi is temporary, ..." would be clearer.

I fixed as Marek's suggestion and applied it to u-boot-imx/next, thanks.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v3 2/3] configs: imx93-phyboard-segin: Add USB support
  2024-03-21 16:16   ` Marek Vasut
@ 2024-03-24 18:00     ` Fabio Estevam
  2024-03-24 21:25       ` Marek Vasut
  2024-03-26  6:24       ` Yannic Moog
  0 siblings, 2 replies; 11+ messages in thread
From: Fabio Estevam @ 2024-03-24 18:00 UTC (permalink / raw
  To: Marek Vasut
  Cc: Mathieu Othacehe, Tom Rini, Peng Fan, Shiji Yang, Ye Li,
	Alice Guo, Stefano Babic, Sébastien Szymanski, Simon Glass,
	Mathieu Othacehe, Yannic Moog, Primoz Fiser, Christoph Stoidner,
	Wadim Egorov, u-boot

On Thu, Mar 21, 2024 at 4:17 PM Marek Vasut <marex@denx.de> wrote:

> $ git grep -i usb.*phytec configs
> configs/phycore_pcl063_defconfig:CONFIG_USB_GADGET_MANUFACTURER="Phytec"
> configs/phycore_pcl063_ull_defconfig:CONFIG_USB_GADGET_MANUFACTURER="Phytec"
>
> It would be good to be consistent.
>
> Also, what is the vendor/product number those two boards use ?

They both use:

CONFIG_USB_GADGET_VENDOR_NUM=0x01b67
CONFIG_USB_GADGET_PRODUCT_NUM=0x4fff

configs/phycore-imx8mp_defconfig has:

CONFIG_USB_GADGET_MANUFACTURER="FSL"
CONFIG_USB_GADGET_VENDOR_NUM=0x0525
CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5

I agree we should make this consistent.

To not block this series, I applied it, but it would be great if
Phytec could submit
a separate series making it consistent across their boards.

Thanks

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v3 2/3] configs: imx93-phyboard-segin: Add USB support
  2024-03-24 18:00     ` Fabio Estevam
@ 2024-03-24 21:25       ` Marek Vasut
  2024-03-26  6:24       ` Yannic Moog
  1 sibling, 0 replies; 11+ messages in thread
From: Marek Vasut @ 2024-03-24 21:25 UTC (permalink / raw
  To: Fabio Estevam
  Cc: Mathieu Othacehe, Tom Rini, Peng Fan, Shiji Yang, Ye Li,
	Alice Guo, Stefano Babic, Sébastien Szymanski, Simon Glass,
	Mathieu Othacehe, Yannic Moog, Primoz Fiser, Christoph Stoidner,
	Wadim Egorov, u-boot

On 3/24/24 7:00 PM, Fabio Estevam wrote:
> On Thu, Mar 21, 2024 at 4:17 PM Marek Vasut <marex@denx.de> wrote:
> 
>> $ git grep -i usb.*phytec configs
>> configs/phycore_pcl063_defconfig:CONFIG_USB_GADGET_MANUFACTURER="Phytec"
>> configs/phycore_pcl063_ull_defconfig:CONFIG_USB_GADGET_MANUFACTURER="Phytec"
>>
>> It would be good to be consistent.
>>
>> Also, what is the vendor/product number those two boards use ?
> 
> They both use:
> 
> CONFIG_USB_GADGET_VENDOR_NUM=0x01b67

USB VID is 16bit number, the nubmer above is 20bit , drop the leading 
zero while at it.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v3 2/3] configs: imx93-phyboard-segin: Add USB support
  2024-03-24 18:00     ` Fabio Estevam
  2024-03-24 21:25       ` Marek Vasut
@ 2024-03-26  6:24       ` Yannic Moog
  1 sibling, 0 replies; 11+ messages in thread
From: Yannic Moog @ 2024-03-26  6:24 UTC (permalink / raw
  To: festevam@gmail.com, marex@denx.de
  Cc: ye.li@nxp.com, Wadim Egorov, trini@konsulko.com,
	Christoph Stoidner, peng.fan@nxp.com, othacehe@gnu.org,
	sebastien.szymanski@armadeus.com, alice.guo@nxp.com,
	sbabic@denx.de, sjg@chromium.org, yangshiji66@outlook.com,
	m.othacehe@gmail.com, primoz.fiser@norik.com,
	u-boot@lists.denx.de

Hi Fabio, hi Marek,

On Sun, 2024-03-24 at 15:00 -0300, Fabio Estevam wrote:
> On Thu, Mar 21, 2024 at 4:17 PM Marek Vasut <marex@denx.de> wrote:
> 
> > $ git grep -i usb.*phytec configs
> > configs/phycore_pcl063_defconfig:CONFIG_USB_GADGET_MANUFACTURER="Phytec"
> > configs/phycore_pcl063_ull_defconfig:CONFIG_USB_GADGET_MANUFACTURER="Phytec"
> > 
> > It would be good to be consistent.
> > 
> > Also, what is the vendor/product number those two boards use ?
> 
> They both use:
> 
> CONFIG_USB_GADGET_VENDOR_NUM=0x01b67
> CONFIG_USB_GADGET_PRODUCT_NUM=0x4fff
> 
> configs/phycore-imx8mp_defconfig has:
> 
> CONFIG_USB_GADGET_MANUFACTURER="FSL"
> CONFIG_USB_GADGET_VENDOR_NUM=0x0525
> CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
> 
> I agree we should make this consistent.
> 
> To not block this series, I applied it, but it would be great if
> 

> Phytec could submit
> a separate series making it consistent across their boards.

We'll take care of that. Thank you for the feedback.

Yannic

> 
> Thanks


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-03-26  6:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-21 14:45 [PATCH v3 0/3] imx93-phyboard-segin: Add USB support Mathieu Othacehe
2024-03-21 14:45 ` [PATCH v3 1/3] arm: dts: " Mathieu Othacehe
2024-03-21 14:47   ` Fabio Estevam
2024-03-21 16:13   ` Marek Vasut
2024-03-24 17:55     ` Fabio Estevam
2024-03-21 14:45 ` [PATCH v3 2/3] configs: " Mathieu Othacehe
2024-03-21 16:16   ` Marek Vasut
2024-03-24 18:00     ` Fabio Estevam
2024-03-24 21:25       ` Marek Vasut
2024-03-26  6:24       ` Yannic Moog
2024-03-21 14:45 ` [PATCH v3 3/3] configs: imx93-phyboard-segin: Add fastboot support Mathieu Othacehe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.