[U-Boot] (no subject)

Hi all,
I want to introduce a small patch that fixes v 2019.07 bootloader crash during USB scan on our i.MX7 based custom board (see explanation in the patch comment).
Could you please review and add to next u-boot release?
Best regards, Thomas
From 3a5dab56111d55fca0f5925bc852f663c71de6c8 Mon Sep 17 00:00:00 2001
From: Thomas Schaefer thomas.schaefer@kontron.com Date: Thu, 29 Aug 2019 11:36:53 +0200 Subject: [PATCH] dts: arm: fix USB controller 'size' parameter
With introduction of bind method in ehci-mx6 driver, usb device sequence number is calculated using the base address and size paramters of the reg property in the usbotg and usbh nodes.
Currently the size parameter is set to 0x200 in imx7s and imx7d dtsi files, which is wrong for i.MX7 and results in board reset in case that more than one USB interface is used. Setting reg to the correct value of 0x10000 will fix this issue.
Signed-off-by: Thomas Schaefer thomas.schaefer@kontron.com --- arch/arm/dts/imx7d.dtsi | 2 +- arch/arm/dts/imx7s.dtsi | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/dts/imx7d.dtsi b/arch/arm/dts/imx7d.dtsi index 30b058934b..2c33aa876f 100644 --- a/arch/arm/dts/imx7d.dtsi +++ b/arch/arm/dts/imx7d.dtsi @@ -101,7 +101,7 @@ &aips3 { usbotg2: usb@30b20000 { compatible = "fsl,imx7d-usb", "fsl,imx27-usb"; - reg = <0x30b20000 0x200>; + reg = <0x30b20000 0x10000>; interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clks IMX7D_USB_CTRL_CLK>; fsl,usbphy = <&usbphynop2>; diff --git a/arch/arm/dts/imx7s.dtsi b/arch/arm/dts/imx7s.dtsi index 5067b9f7e7..8b9b4bbd8a 100644 --- a/arch/arm/dts/imx7s.dtsi +++ b/arch/arm/dts/imx7s.dtsi @@ -1003,7 +1003,7 @@
usbotg1: usb@30b10000 { compatible = "fsl,imx7d-usb", "fsl,imx27-usb"; - reg = <0x30b10000 0x200>; + reg = <0x30b10000 0x10000>; interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clks IMX7D_USB_CTRL_CLK>; fsl,usbphy = <&usbphynop1>; @@ -1014,7 +1014,7 @@
usbh: usb@30b30000 { compatible = "fsl,imx7d-usb", "fsl,imx27-usb"; - reg = <0x30b30000 0x200>; + reg = <0x30b30000 0x10000>; interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clks IMX7D_USB_CTRL_CLK>; fsl,usbphy = <&usbphynop3>;

Hi Thomas,
On Thu, Aug 29, 2019 at 10:40 AM Thomas Schaefer thomas.schaefer@kontron.com wrote:
arch/arm/dts/imx7d.dtsi | 2 +- arch/arm/dts/imx7s.dtsi | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/dts/imx7d.dtsi b/arch/arm/dts/imx7d.dtsi index 30b058934b..2c33aa876f 100644 --- a/arch/arm/dts/imx7d.dtsi +++ b/arch/arm/dts/imx7d.dtsi @@ -101,7 +101,7 @@ &aips3 { usbotg2: usb@30b20000 { compatible = "fsl,imx7d-usb", "fsl,imx27-usb";
reg = <0x30b20000 0x200>;
reg = <0x30b20000 0x10000>;
Yes, I have just checked the reference manual and 0x10000 size is correct.
Could you please send a patch to fix it in the kernel dts?
Then, after it gets fixed in the kernel we can simply import it to U-Boot.
Thanks

Hi Fabio,
Hi Thomas,
On Thu, Aug 29, 2019 at 10:40 AM Thomas Schaefer thomas.schaefer@kontron.com wrote:
arch/arm/dts/imx7d.dtsi | 2 +- arch/arm/dts/imx7s.dtsi | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/dts/imx7d.dtsi b/arch/arm/dts/imx7d.dtsi index 30b058934b..2c33aa876f 100644 --- a/arch/arm/dts/imx7d.dtsi +++ b/arch/arm/dts/imx7d.dtsi @@ -101,7 +101,7 @@ &aips3 { usbotg2: usb@30b20000 { compatible = "fsl,imx7d-usb", "fsl,imx27-usb";
reg = <0x30b20000 0x200>;
reg = <0x30b20000 0x10000>;
Yes, I have just checked the reference manual and 0x10000 size is correct.
Could you please send a patch to fix it in the kernel dts?
Then, after it gets fixed in the kernel we can simply import it to U-Boot.
Thanks
does this mean that these dts files are directly imported from linux tree without modification?
I have cloned https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git . Is this the right repository to use for the patch?
I found you and Shawn Guo in the imx maintainers list (among others). Should I send the patch directly to you, and also to linux-arm-kernel@lists.infradead.org list?
Best regards, Thomas

Hi Thomas,
On Thu, Aug 29, 2019 at 12:12 PM Thomas Schaefer Thomas.Schaefer@kontron.com wrote:
does this mean that these dts files are directly imported from linux tree without modification?
Yes, this is our goal.
I have cloned https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git . Is this the right repository to use for the patch?
Yes, you can generate your patch against this tree.
I found you and Shawn Guo in the imx maintainers list (among others). Should I send the patch directly to you, and also to linux-arm-kernel@lists.infradead.org list?
Please send it via git send-email to all i.MX kernel folks and the linux-arm-kernel list.
Thanks
participants (3)
-
Fabio Estevam
-
Thomas Schaefer
-
Thomas Schaefer