public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 0/5] imx93_var_som: Add USB support.
@ 2024-02-20 10:35 Mathieu Othacehe
  2024-02-20 10:35 ` [PATCH 1/5] arm: dts: imx93: " Mathieu Othacehe
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Mathieu Othacehe @ 2024-02-20 10:35 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
  Cc: u-boot, Mathieu Othacehe

Hello,

This series adds USB support for the imx93_var_som board.  It depends on:
https://lists.denx.de/pipermail/u-boot/2024-February/546203.html

It also adds support for fastboot and EFI partitions.

Thanks,

Mathieu

Mathieu Othacehe (5):
  arm: dts: imx93: Add USB support.
  arm: dts: imx93-var-som-symphony: Add USB support.
  configs: imx93_var_som: Add USB support.
  configs: imx93_var_som: Add fastboot support.
  configs: imx93_var_som: Add EFI support.

 arch/arm/dts/imx93-var-som-symphony.dts | 18 ++++++++
 arch/arm/dts/imx93.dtsi                 | 58 +++++++++++++++++++++++++
 configs/imx93_var_som_defconfig         | 19 +++++++-
 3 files changed, 94 insertions(+), 1 deletion(-)

-- 
2.41.0


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

* [PATCH 1/5] arm: dts: imx93: Add USB support.
  2024-02-20 10:35 [PATCH 0/5] imx93_var_som: Add USB support Mathieu Othacehe
@ 2024-02-20 10:35 ` Mathieu Othacehe
  2024-02-20 10:35 ` [PATCH 2/5] arm: dts: imx93-var-som-symphony: " Mathieu Othacehe
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Mathieu Othacehe @ 2024-02-20 10:35 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
  Cc: u-boot, Mathieu Othacehe

Copied from:
https://lore.kernel.org/linux-devicetree/20240131114324.3722428-6-xu.yang_2@nxp.com/

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

diff --git a/arch/arm/dts/imx93.dtsi b/arch/arm/dts/imx93.dtsi
index 90de635481f..d6964714ea0 100644
--- a/arch/arm/dts/imx93.dtsi
+++ b/arch/arm/dts/imx93.dtsi
@@ -149,6 +149,20 @@
 		};
 	};
 
+	usbphynop1: usbphynop1 {
+		compatible = "usb-nop-xceiv";
+		#phy-cells = <0>;
+		clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
+		clock-names = "main_clk";
+	};
+
+	usbphynop2: usbphynop2 {
+		compatible = "usb-nop-xceiv";
+		#phy-cells = <0>;
+		clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
+		clock-names = "main_clk";
+	};
+
 	soc@0 {
 		compatible = "simple-bus";
 		#address-cells = <1>;
@@ -844,5 +858,49 @@
 			#power-domain-cells = <1>;
 			status = "disabled";
 		};
+
+		usbotg1: usb@4c100000 {
+			compatible = "fsl,imx93-usb", "fsl,imx7d-usb", "fsl,imx27-usb";
+			reg = <0x4c100000 0x200>;
+			interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
+				 <&clk IMX93_CLK_HSIO_32K_GATE>;
+			clock-names = "usb_ctrl_root_clk", "usb_wakeup";
+			assigned-clocks = <&clk IMX93_CLK_HSIO>;
+			assigned-clock-parents = <&clk IMX93_CLK_SYS_PLL_PFD1_DIV2>;
+			assigned-clock-rates = <133000000>;
+			phys = <&usbphynop1>;
+			fsl,usbmisc = <&usbmisc1 0>;
+			status = "disabled";
+		};
+
+		usbmisc1: usbmisc@4c100200 {
+			compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-usbmisc",
+				     "fsl,imx6q-usbmisc";
+			reg = <0x4c100200 0x200>;
+			#index-cells = <1>;
+		};
+
+		usbotg2: usb@4c200000 {
+			compatible = "fsl,imx93-usb", "fsl,imx7d-usb", "fsl,imx27-usb";
+			reg = <0x4c200000 0x200>;
+			interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
+				 <&clk IMX93_CLK_HSIO_32K_GATE>;
+			clock-names = "usb_ctrl_root_clk", "usb_wakeup";
+			assigned-clocks = <&clk IMX93_CLK_HSIO>;
+			assigned-clock-parents = <&clk IMX93_CLK_SYS_PLL_PFD1_DIV2>;
+			assigned-clock-rates = <133000000>;
+			phys = <&usbphynop2>;
+			fsl,usbmisc = <&usbmisc2 0>;
+			status = "disabled";
+		};
+
+		usbmisc2: usbmisc@4c200200 {
+			compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-usbmisc",
+				     "fsl,imx6q-usbmisc";
+			reg = <0x4c200200 0x200>;
+			#index-cells = <1>;
+		};
 	};
 };
-- 
2.41.0


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

* [PATCH 2/5] arm: dts: imx93-var-som-symphony: Add USB support.
  2024-02-20 10:35 [PATCH 0/5] imx93_var_som: Add USB support Mathieu Othacehe
  2024-02-20 10:35 ` [PATCH 1/5] arm: dts: imx93: " Mathieu Othacehe
@ 2024-02-20 10:35 ` Mathieu Othacehe
  2024-02-20 10:35 ` [PATCH 3/5] configs: imx93_var_som: " Mathieu Othacehe
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Mathieu Othacehe @ 2024-02-20 10:35 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
  Cc: u-boot, Mathieu Othacehe

Enable both usbotg1 and usbotg2 ports.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
---
 arch/arm/dts/imx93-var-som-symphony.dts | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm/dts/imx93-var-som-symphony.dts b/arch/arm/dts/imx93-var-som-symphony.dts
index a67bd005e54..1bc61942716 100644
--- a/arch/arm/dts/imx93-var-som-symphony.dts
+++ b/arch/arm/dts/imx93-var-som-symphony.dts
@@ -285,6 +285,24 @@
 	status = "okay";
 };
 
+&usbotg1 {
+	dr_mode = "otg";
+	hnp-disable;
+	srp-disable;
+	adp-disable;
+	disable-over-current;
+	status = "okay";
+};
+
+&usbotg2 {
+	dr_mode = "host";
+	hnp-disable;
+	srp-disable;
+	adp-disable;
+	disable-over-current;
+	status = "okay";
+};
+
 /* SD */
 &usdhc2 {
 	pinctrl-names = "default", "state_100mhz", "state_200mhz";
-- 
2.41.0


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

* [PATCH 3/5] configs: imx93_var_som: Add USB support.
  2024-02-20 10:35 [PATCH 0/5] imx93_var_som: Add USB support Mathieu Othacehe
  2024-02-20 10:35 ` [PATCH 1/5] arm: dts: imx93: " Mathieu Othacehe
  2024-02-20 10:35 ` [PATCH 2/5] arm: dts: imx93-var-som-symphony: " Mathieu Othacehe
@ 2024-02-20 10:35 ` Mathieu Othacehe
  2024-02-20 10:35 ` [PATCH 4/5] configs: imx93_var_som: Add fastboot support Mathieu Othacehe
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Mathieu Othacehe @ 2024-02-20 10:35 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
  Cc: u-boot, Mathieu Othacehe

Enable the `usb` command and some USB drivers.

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

diff --git a/configs/imx93_var_som_defconfig b/configs/imx93_var_som_defconfig
index 71cd016d332..0aab222c7c1 100644
--- a/configs/imx93_var_som_defconfig
+++ b/configs/imx93_var_som_defconfig
@@ -70,6 +70,7 @@ CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_POWEROFF=y
 CONFIG_CMD_READ=y
+CONFIG_CMD_USB=y
 CONFIG_CMD_WDT=y
 CONFIG_BOOTP_PREFER_SERVERIP=y
 CONFIG_CMD_SNTP=y
@@ -132,6 +133,14 @@ CONFIG_DM_SERIAL=y
 CONFIG_FSL_LPUART=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_USB_PORT_AUTO=y
 CONFIG_ULP_WATCHDOG=y
 CONFIG_WDT=y
 CONFIG_LZO=y
-- 
2.41.0


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

* [PATCH 4/5] configs: imx93_var_som: Add fastboot support.
  2024-02-20 10:35 [PATCH 0/5] imx93_var_som: Add USB support Mathieu Othacehe
                   ` (2 preceding siblings ...)
  2024-02-20 10:35 ` [PATCH 3/5] configs: imx93_var_som: " Mathieu Othacehe
@ 2024-02-20 10:35 ` Mathieu Othacehe
  2024-02-20 10:35 ` [PATCH 5/5] configs: imx93_var_som: Add EFI support Mathieu Othacehe
  2024-02-24 22:12 ` [PATCH 0/5] imx93_var_som: Add USB support Fabio Estevam
  5 siblings, 0 replies; 7+ messages in thread
From: Mathieu Othacehe @ 2024-02-20 10:35 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
  Cc: u-boot, Mathieu Othacehe

Enable the `fastboot` command.

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

diff --git a/configs/imx93_var_som_defconfig b/configs/imx93_var_som_defconfig
index 0aab222c7c1..60751a77037 100644
--- a/configs/imx93_var_som_defconfig
+++ b/configs/imx93_var_som_defconfig
@@ -97,6 +97,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_PCA953X=y
-- 
2.41.0


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

* [PATCH 5/5] configs: imx93_var_som: Add EFI support.
  2024-02-20 10:35 [PATCH 0/5] imx93_var_som: Add USB support Mathieu Othacehe
                   ` (3 preceding siblings ...)
  2024-02-20 10:35 ` [PATCH 4/5] configs: imx93_var_som: Add fastboot support Mathieu Othacehe
@ 2024-02-20 10:35 ` Mathieu Othacehe
  2024-02-24 22:12 ` [PATCH 0/5] imx93_var_som: Add USB support Fabio Estevam
  5 siblings, 0 replies; 7+ messages in thread
From: Mathieu Othacehe @ 2024-02-20 10:35 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
  Cc: u-boot, Mathieu Othacehe

Enable the `gpt` command and EFI partitions support.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
---
 configs/imx93_var_som_defconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/configs/imx93_var_som_defconfig b/configs/imx93_var_som_defconfig
index 60751a77037..a3f98abc161 100644
--- a/configs/imx93_var_som_defconfig
+++ b/configs/imx93_var_som_defconfig
@@ -78,6 +78,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_EFIDEBUG=y
 CONFIG_CMD_RTC=y
 CONFIG_CMD_TIME=y
+CONFIG_CMD_GPT=y
 CONFIG_CMD_GETTIME=y
 CONFIG_CMD_TIMER=y
 CONFIG_CMD_REGULATOR=y
@@ -151,4 +152,5 @@ CONFIG_ULP_WATCHDOG=y
 CONFIG_WDT=y
 CONFIG_LZO=y
 CONFIG_BZIP2=y
-CONFIG_RSA=y
\ No newline at end of file
+CONFIG_RSA=y
+CONFIG_EFI_PARTITION=y
\ No newline at end of file
-- 
2.41.0


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

* Re: [PATCH 0/5] imx93_var_som: Add USB support.
  2024-02-20 10:35 [PATCH 0/5] imx93_var_som: Add USB support Mathieu Othacehe
                   ` (4 preceding siblings ...)
  2024-02-20 10:35 ` [PATCH 5/5] configs: imx93_var_som: Add EFI support Mathieu Othacehe
@ 2024-02-24 22:12 ` Fabio Estevam
  5 siblings, 0 replies; 7+ messages in thread
From: Fabio Estevam @ 2024-02-24 22:12 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, u-boot

On Tue, Feb 20, 2024 at 7:35 AM Mathieu Othacehe <othacehe@gnu.org> wrote:
>
> Hello,
>
> This series adds USB support for the imx93_var_som board.  It depends on:
> https://lists.denx.de/pipermail/u-boot/2024-February/546203.html
>
> It also adds support for fastboot and EFI partitions.
>
> Thanks,
>
> Mathieu
>
> Mathieu Othacehe (5):
>   arm: dts: imx93: Add USB support.
>   arm: dts: imx93-var-som-symphony: Add USB support.
>   configs: imx93_var_som: Add USB support.
>   configs: imx93_var_som: Add fastboot support.
>   configs: imx93_var_som: Add EFI support.

This last one did not apply against master.

I checked and the two options are already enabled, so I dropped the
patch 5/5 and applied the others, thanks.

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

end of thread, other threads:[~2024-02-24 22:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-20 10:35 [PATCH 0/5] imx93_var_som: Add USB support Mathieu Othacehe
2024-02-20 10:35 ` [PATCH 1/5] arm: dts: imx93: " Mathieu Othacehe
2024-02-20 10:35 ` [PATCH 2/5] arm: dts: imx93-var-som-symphony: " Mathieu Othacehe
2024-02-20 10:35 ` [PATCH 3/5] configs: imx93_var_som: " Mathieu Othacehe
2024-02-20 10:35 ` [PATCH 4/5] configs: imx93_var_som: Add fastboot support Mathieu Othacehe
2024-02-20 10:35 ` [PATCH 5/5] configs: imx93_var_som: Add EFI support Mathieu Othacehe
2024-02-24 22:12 ` [PATCH 0/5] imx93_var_som: Add USB support Fabio Estevam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox