* [PATCH 03/16] dh_imx6: Switch to full DM-aware
@ 2020-06-29 12:27 Ludwig Zenz
2020-06-29 14:01 ` Tom Rini
0 siblings, 1 reply; 9+ messages in thread
From: Ludwig Zenz @ 2020-06-29 12:27 UTC (permalink / raw)
To: u-boot
On 25/06/20 2:52 PM, Tom Rini wrote:
> On Thu, Jun 25, 2020 at 02:52:58PM +0000, Ludwig Zenz wrote:
>> On 22/06/20 9:38 AM, Tom Rini wrote:
>> > On Mon, Jun 22, 2020 at 09:38:36AM +0000, Ludwig Zenz wrote:
>> >
>> >> On 6/13/20 3:55 PM, Jagan Teki wrote:
>> >> > Enable DM_SPI/DM_SPI_FLASH with a related config option.
>> >> >
>> >> > Build fine, but not tested.
>> >>
>> >> Hello,
>> >>
>> >> due to memory limitations in the SRAM of the i.MX6S in SPL we have not used the device tree. Have the restrictions been removed in the meantime? We need a single binary for the i.MX6 q/d/dl/s variants of our system on module.
>> >>
>> >> I think this patch breaks the board support for our module.
>> >
>> > I _think_ i.MX is making use of the generic hooks to cause build time failures when we grow too large. And we have addressed some, but not all of the concerns about DM size. Can you please test this patch? If it doesn't work doing:
>> >
>> >> > diff --git a/include/configs/dh_imx6.h
>> >> > b/include/configs/dh_imx6.h index 5bfdf4044b..5fb84f72a2 100644
>> >> > --- a/include/configs/dh_imx6.h
>> >> > +++ b/include/configs/dh_imx6.h
>> >> > @@ -53,12 +53,6 @@
>> >> > /* SATA Configs */
>> >> > #define CONFIG_LBA48
>> >> >
>> >> > -/* SPI Flash Configs */
>> >> > -#if defined(CONFIG_SPL_BUILD)
>> >> > -#undef CONFIG_DM_SPI
>> >> > -#undef CONFIG_DM_SPI_FLASH
>> >> > -#endif
>> >
>> > is still needed as we have a symbol to control DM SPI in SPL directly so the above isn't doing what you imply you want. Thanks!
>> >
I can remove the above defines from include/configs/dh_imx6.h when I add the following patch:
include/config_uncmd_spl.h
@@ -14,6 +14,7 @@
#undef CONFIG_DM_SERIAL
#undef CONFIG_DM_I2C
#undef CONFIG_DM_SPI
+#undef CONFIG_DM_SPI_FLASH
#endif
>>
>>
>> With the above patch the board hangs after printing "U-Boot SPL 2020.07-rc5-38776-g922c6d5d009-dirty (Jun 25 2020 - 16:34:23 +0200)".
>>
>> Through some debugging i found the board hangs on calling gpio_request() in dhcom_get_ddr3_code().
>>
>> Just for testing I skipped dhcom_get_ddr3_code and hardcoded the DDR3 size. Then I get:
>>
>> Missing DTB
>> fdtdec_setup() returned error -1
>> ### ERROR ### Please RESET the board ###
>>
>> Unfortunately I have not found out how the SPL should load the devicetree. Can you give me a hint for this?
>
>Ah, so you've not done any SPL DM migration.
>
>So there's two paths here. Path 1, the config header snippet that got things rolling here does need to be removed as "no DM SPI in SPL" means CONFIG_SPL_DM_SPI=n and not "CONFIG_DM_SPI=n if CONFIG_SPL_BUILD". We are not now, and are not at the point where we can say we will be at some future point, saying everyone must use DM in SPL. You may want to examine the .config you get today from running dh_imx6_defconfig and seeing what can/should be disabled, if anything, that's an unexpected enabled option. Path 2, look at something like mx6cuboxi and convert to CONFIG_SPL_DM=y
>
The CONFIG_SPL_DM_SPI is not in the .config of my build. The little patch for include/config_uncmd_spl.h from above allows me to clean up dh_imx6.h.
Remark on path 2: mx6cuboxi avoids gpio usage in spl for some reason. We need gpio support to detect the DDR3 size. I would like to go with path 1.
How can I check if adding CONFIG_DM_SPI_FLASH to include/config_uncmd_spl.h causes problems for other boards?
regards,
Ludwig
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 03/16] dh_imx6: Switch to full DM-aware
2020-06-29 12:27 [PATCH 03/16] dh_imx6: Switch to full DM-aware Ludwig Zenz
@ 2020-06-29 14:01 ` Tom Rini
2021-01-13 18:14 ` Marek Vasut
0 siblings, 1 reply; 9+ messages in thread
From: Tom Rini @ 2020-06-29 14:01 UTC (permalink / raw)
To: u-boot
On Mon, Jun 29, 2020 at 12:27:08PM +0000, Ludwig Zenz wrote:
> On 25/06/20 2:52 PM, Tom Rini wrote:
> > On Thu, Jun 25, 2020 at 02:52:58PM +0000, Ludwig Zenz wrote:
> >> On 22/06/20 9:38 AM, Tom Rini wrote:
> >> > On Mon, Jun 22, 2020 at 09:38:36AM +0000, Ludwig Zenz wrote:
> >> >
> >> >> On 6/13/20 3:55 PM, Jagan Teki wrote:
> >> >> > Enable DM_SPI/DM_SPI_FLASH with a related config option.
> >> >> >
> >> >> > Build fine, but not tested.
> >> >>
> >> >> Hello,
> >> >>
> >> >> due to memory limitations in the SRAM of the i.MX6S in SPL we have not used the device tree. Have the restrictions been removed in the meantime? We need a single binary for the i.MX6 q/d/dl/s variants of our system on module.
> >> >>
> >> >> I think this patch breaks the board support for our module.
> >> >
> >> > I _think_ i.MX is making use of the generic hooks to cause build time failures when we grow too large. And we have addressed some, but not all of the concerns about DM size. Can you please test this patch? If it doesn't work doing:
> >> >
> >> >> > diff --git a/include/configs/dh_imx6.h
> >> >> > b/include/configs/dh_imx6.h index 5bfdf4044b..5fb84f72a2 100644
> >> >> > --- a/include/configs/dh_imx6.h
> >> >> > +++ b/include/configs/dh_imx6.h
> >> >> > @@ -53,12 +53,6 @@
> >> >> > /* SATA Configs */
> >> >> > #define CONFIG_LBA48
> >> >> >
> >> >> > -/* SPI Flash Configs */
> >> >> > -#if defined(CONFIG_SPL_BUILD)
> >> >> > -#undef CONFIG_DM_SPI
> >> >> > -#undef CONFIG_DM_SPI_FLASH
> >> >> > -#endif
> >> >
> >> > is still needed as we have a symbol to control DM SPI in SPL directly so the above isn't doing what you imply you want. Thanks!
> >> >
>
> I can remove the above defines from include/configs/dh_imx6.h when I add the following patch:
>
> include/config_uncmd_spl.h
> @@ -14,6 +14,7 @@
> #undef CONFIG_DM_SERIAL
> #undef CONFIG_DM_I2C
> #undef CONFIG_DM_SPI
> +#undef CONFIG_DM_SPI_FLASH
> #endif
>
> >>
> >>
> >> With the above patch the board hangs after printing "U-Boot SPL 2020.07-rc5-38776-g922c6d5d009-dirty (Jun 25 2020 - 16:34:23 +0200)".
> >>
> >> Through some debugging i found the board hangs on calling gpio_request() in dhcom_get_ddr3_code().
> >>
> >> Just for testing I skipped dhcom_get_ddr3_code and hardcoded the DDR3 size. Then I get:
> >>
> >> Missing DTB
> >> fdtdec_setup() returned error -1
> >> ### ERROR ### Please RESET the board ###
> >>
> >> Unfortunately I have not found out how the SPL should load the devicetree. Can you give me a hint for this?
> >
> >Ah, so you've not done any SPL DM migration.
> >
> >So there's two paths here. Path 1, the config header snippet that got things rolling here does need to be removed as "no DM SPI in SPL" means CONFIG_SPL_DM_SPI=n and not "CONFIG_DM_SPI=n if CONFIG_SPL_BUILD". We are not now, and are not at the point where we can say we will be at some future point, saying everyone must use DM in SPL. You may want to examine the .config you get today from running dh_imx6_defconfig and seeing what can/should be disabled, if anything, that's an unexpected enabled option. Path 2, look at something like mx6cuboxi and convert to CONFIG_SPL_DM=y
> >
>
> The CONFIG_SPL_DM_SPI is not in the .config of my build. The little patch for include/config_uncmd_spl.h from above allows me to clean up dh_imx6.h.
>
> Remark on path 2: mx6cuboxi avoids gpio usage in spl for some reason. We need gpio support to detect the DDR3 size. I would like to go with path 1.
>
> How can I check if adding CONFIG_DM_SPI_FLASH to include/config_uncmd_spl.h causes problems for other boards?
So this is another example then where we do need
http://patchwork.ozlabs.org/project/uboot/patch/20200604151153.3980-4-Zhiqiang.Hou at nxp.com/
and I'll be pushing that to -next shortly, as it needed
http://patchwork.ozlabs.org/project/uboot/patch/20200627120041.11223-1-trini at konsulko.com/
as well. Thanks for digging in to this more.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200629/5f32ccaf/attachment.sig>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 03/16] dh_imx6: Switch to full DM-aware
2020-06-29 14:01 ` Tom Rini
@ 2021-01-13 18:14 ` Marek Vasut
0 siblings, 0 replies; 9+ messages in thread
From: Marek Vasut @ 2021-01-13 18:14 UTC (permalink / raw)
To: u-boot
On 6/29/20 4:01 PM, Tom Rini wrote:
> On Mon, Jun 29, 2020 at 12:27:08PM +0000, Ludwig Zenz wrote:
>> On 25/06/20 2:52 PM, Tom Rini wrote:
>>> On Thu, Jun 25, 2020 at 02:52:58PM +0000, Ludwig Zenz wrote:
>>>> On 22/06/20 9:38 AM, Tom Rini wrote:
>>>>> On Mon, Jun 22, 2020 at 09:38:36AM +0000, Ludwig Zenz wrote:
>>>>>
>>>>>> On 6/13/20 3:55 PM, Jagan Teki wrote:
>>>>>>> Enable DM_SPI/DM_SPI_FLASH with a related config option.
>>>>>>>
>>>>>>> Build fine, but not tested.
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> due to memory limitations in the SRAM of the i.MX6S in SPL we have not used the device tree. Have the restrictions been removed in the meantime? We need a single binary for the i.MX6 q/d/dl/s variants of our system on module.
>>>>>>
>>>>>> I think this patch breaks the board support for our module.
>>>>>
>>>>> I _think_ i.MX is making use of the generic hooks to cause build time failures when we grow too large. And we have addressed some, but not all of the concerns about DM size. Can you please test this patch? If it doesn't work doing:
>>>>>
>>>>>>> diff --git a/include/configs/dh_imx6.h
>>>>>>> b/include/configs/dh_imx6.h index 5bfdf4044b..5fb84f72a2 100644
>>>>>>> --- a/include/configs/dh_imx6.h
>>>>>>> +++ b/include/configs/dh_imx6.h
>>>>>>> @@ -53,12 +53,6 @@
>>>>>>> /* SATA Configs */
>>>>>>> #define CONFIG_LBA48
>>>>>>>
>>>>>>> -/* SPI Flash Configs */
>>>>>>> -#if defined(CONFIG_SPL_BUILD)
>>>>>>> -#undef CONFIG_DM_SPI
>>>>>>> -#undef CONFIG_DM_SPI_FLASH
>>>>>>> -#endif
>>>>>
>>>>> is still needed as we have a symbol to control DM SPI in SPL directly so the above isn't doing what you imply you want. Thanks!
>>>>>
>>
>> I can remove the above defines from include/configs/dh_imx6.h when I add the following patch:
>>
>> include/config_uncmd_spl.h
>> @@ -14,6 +14,7 @@
>> #undef CONFIG_DM_SERIAL
>> #undef CONFIG_DM_I2C
>> #undef CONFIG_DM_SPI
>> +#undef CONFIG_DM_SPI_FLASH
>> #endif
>>
>>>>
>>>>
>>>> With the above patch the board hangs after printing "U-Boot SPL 2020.07-rc5-38776-g922c6d5d009-dirty (Jun 25 2020 - 16:34:23 +0200)".
>>>>
>>>> Through some debugging i found the board hangs on calling gpio_request() in dhcom_get_ddr3_code().
>>>>
>>>> Just for testing I skipped dhcom_get_ddr3_code and hardcoded the DDR3 size. Then I get:
>>>>
>>>> Missing DTB
>>>> fdtdec_setup() returned error -1
>>>> ### ERROR ### Please RESET the board ###
>>>>
>>>> Unfortunately I have not found out how the SPL should load the devicetree. Can you give me a hint for this?
>>>
>>> Ah, so you've not done any SPL DM migration.
>>>
>>> So there's two paths here. Path 1, the config header snippet that got things rolling here does need to be removed as "no DM SPI in SPL" means CONFIG_SPL_DM_SPI=n and not "CONFIG_DM_SPI=n if CONFIG_SPL_BUILD". We are not now, and are not at the point where we can say we will be at some future point, saying everyone must use DM in SPL. You may want to examine the .config you get today from running dh_imx6_defconfig and seeing what can/should be disabled, if anything, that's an unexpected enabled option. Path 2, look at something like mx6cuboxi and convert to CONFIG_SPL_DM=y
>>>
>>
>> The CONFIG_SPL_DM_SPI is not in the .config of my build. The little patch for include/config_uncmd_spl.h from above allows me to clean up dh_imx6.h.
>>
>> Remark on path 2: mx6cuboxi avoids gpio usage in spl for some reason. We need gpio support to detect the DDR3 size. I would like to go with path 1.
>>
>> How can I check if adding CONFIG_DM_SPI_FLASH to include/config_uncmd_spl.h causes problems for other boards?
>
> So this is another example then where we do need
> http://patchwork.ozlabs.org/project/uboot/patch/20200604151153.3980-4-Zhiqiang.Hou at nxp.com/
> and I'll be pushing that to -next shortly, as it needed
> http://patchwork.ozlabs.org/project/uboot/patch/20200627120041.11223-1-trini at konsulko.com/
> as well. Thanks for digging in to this more.
Note that this patch broke the DH iMX6 board, it now hangs in SPL.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 03/16] dh_imx6: Switch to full DM-aware
@ 2020-06-22 9:38 Ludwig Zenz
2020-06-22 12:32 ` Tom Rini
2020-07-08 13:06 ` Jagan Teki
0 siblings, 2 replies; 9+ messages in thread
From: Ludwig Zenz @ 2020-06-22 9:38 UTC (permalink / raw)
To: u-boot
On 6/13/20 3:55 PM, Jagan Teki wrote:
> Enable DM_SPI/DM_SPI_FLASH with a related config option.
>
> Build fine, but not tested.
Hello,
due to memory limitations in the SRAM of the i.MX6S in SPL we have not used the device tree. Have the restrictions been removed in the meantime? We need a single binary for the i.MX6 q/d/dl/s variants of our system on module.
I think this patch breaks the board support for our module.
regards,
Ludwig Zenz
> Cc: Ludwig Zenz <lzenz@dh-electronics.de>
> Cc: Andreas Geisreiter <ageisreiter@dh-electronics.de>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
> configs/dh_imx6_defconfig | 3 +++
> include/configs/dh_imx6.h | 6 ------
> 2 files changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/configs/dh_imx6_defconfig b/configs/dh_imx6_defconfig index d20405e5b2..da756a8e3d 100644
> --- a/configs/dh_imx6_defconfig
> +++ b/configs/dh_imx6_defconfig
> @@ -49,12 +49,14 @@ CONFIG_CMD_CACHE=y
> CONFIG_CMD_TIME=y
> CONFIG_CMD_EXT4_WRITE=y
> CONFIG_OF_CONTROL=y
> +CONFIG_SPL_OF_CONTROL=y
> CONFIG_DEFAULT_DEVICE_TREE="imx6q-dhcom-pdk2"
> CONFIG_OF_LIST="imx6q-dhcom-pdk2 imx6dl-dhcom-pdk2"
> CONFIG_MULTI_DTB_FIT=y
> CONFIG_ENV_IS_IN_SPI_FLASH=y
> CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
> CONFIG_SYS_RELOC_GD_ENV_ADDR=y
> +CONFIG_SPL_DM=y
> CONFIG_DWC_AHSATA=y
> CONFIG_BOOTCOUNT_LIMIT=y
> CONFIG_DM_I2C=y
> @@ -100,4 +102,5 @@ CONFIG_CI_UDC=y
> CONFIG_USB_GADGET_DOWNLOAD=y
> CONFIG_WATCHDOG_TIMEOUT_MSECS=60000
> CONFIG_IMX_WATCHDOG=y
> +# CONFIG_SPL_WDT is not set
> CONFIG_BZIP2=y
> diff --git a/include/configs/dh_imx6.h b/include/configs/dh_imx6.h index 5bfdf4044b..5fb84f72a2 100644
> --- a/include/configs/dh_imx6.h
> +++ b/include/configs/dh_imx6.h
> @@ -53,12 +53,6 @@
> /* SATA Configs */
> #define CONFIG_LBA48
>
> -/* SPI Flash Configs */
> -#if defined(CONFIG_SPL_BUILD)
> -#undef CONFIG_DM_SPI
> -#undef CONFIG_DM_SPI_FLASH
> -#endif
> -
> /* UART */
> #define CONFIG_MXC_UART
> #define CONFIG_MXC_UART_BASE UART1_BASE
> --
> 2.25.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 03/16] dh_imx6: Switch to full DM-aware
2020-06-22 9:38 Ludwig Zenz
@ 2020-06-22 12:32 ` Tom Rini
2020-06-25 14:52 ` AW: " Ludwig Zenz
2020-07-08 13:06 ` Jagan Teki
1 sibling, 1 reply; 9+ messages in thread
From: Tom Rini @ 2020-06-22 12:32 UTC (permalink / raw)
To: u-boot
On Mon, Jun 22, 2020 at 09:38:36AM +0000, Ludwig Zenz wrote:
> On 6/13/20 3:55 PM, Jagan Teki wrote:
> > Enable DM_SPI/DM_SPI_FLASH with a related config option.
> >
> > Build fine, but not tested.
>
> Hello,
>
> due to memory limitations in the SRAM of the i.MX6S in SPL we have not used the device tree. Have the restrictions been removed in the meantime? We need a single binary for the i.MX6 q/d/dl/s variants of our system on module.
>
> I think this patch breaks the board support for our module.
I _think_ i.MX is making use of the generic hooks to cause build time
failures when we grow too large. And we have addressed some, but not
all of the concerns about DM size. Can you please test this patch? If
it doesn't work doing:
> > diff --git a/include/configs/dh_imx6.h b/include/configs/dh_imx6.h index 5bfdf4044b..5fb84f72a2 100644
> > --- a/include/configs/dh_imx6.h
> > +++ b/include/configs/dh_imx6.h
> > @@ -53,12 +53,6 @@
> > /* SATA Configs */
> > #define CONFIG_LBA48
> >
> > -/* SPI Flash Configs */
> > -#if defined(CONFIG_SPL_BUILD)
> > -#undef CONFIG_DM_SPI
> > -#undef CONFIG_DM_SPI_FLASH
> > -#endif
is still needed as we have a symbol to control DM SPI in SPL directly so
the above isn't doing what you imply you want. Thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200622/0dbcbe04/attachment.sig>
^ permalink raw reply [flat|nested] 9+ messages in thread
* AW: [PATCH 03/16] dh_imx6: Switch to full DM-aware
2020-06-22 12:32 ` Tom Rini
@ 2020-06-25 14:52 ` Ludwig Zenz
2020-06-25 17:21 ` Tom Rini
2020-06-25 17:22 ` Simon Glass
0 siblings, 2 replies; 9+ messages in thread
From: Ludwig Zenz @ 2020-06-25 14:52 UTC (permalink / raw)
To: u-boot
On 22/06/20 9:38 AM, Tom Rini wrote:
> On Mon, Jun 22, 2020 at 09:38:36AM +0000, Ludwig Zenz wrote:
>
>> On 6/13/20 3:55 PM, Jagan Teki wrote:
>> > Enable DM_SPI/DM_SPI_FLASH with a related config option.
>> >
>> > Build fine, but not tested.
>>
>> Hello,
>>
>> due to memory limitations in the SRAM of the i.MX6S in SPL we have not used the device tree. Have the restrictions been removed in the meantime? We need a single binary for the i.MX6 q/d/dl/s variants of our system on module.
>>
>> I think this patch breaks the board support for our module.
>
> I _think_ i.MX is making use of the generic hooks to cause build time failures when we grow too large. And we have addressed some, but not all of the concerns about DM size. Can you please test this patch? If it doesn't work doing:
>
>> > diff --git a/include/configs/dh_imx6.h b/include/configs/dh_imx6.h
>> > index 5bfdf4044b..5fb84f72a2 100644
>> > --- a/include/configs/dh_imx6.h
>> > +++ b/include/configs/dh_imx6.h
>> > @@ -53,12 +53,6 @@
>> > /* SATA Configs */
>> > #define CONFIG_LBA48
>> >
>> > -/* SPI Flash Configs */
>> > -#if defined(CONFIG_SPL_BUILD)
>> > -#undef CONFIG_DM_SPI
>> > -#undef CONFIG_DM_SPI_FLASH
>> > -#endif
>
> is still needed as we have a symbol to control DM SPI in SPL directly so the above isn't doing what you imply you want. Thanks!
>
>
With the above patch the board hangs after printing "U-Boot SPL 2020.07-rc5-38776-g922c6d5d009-dirty (Jun 25 2020 - 16:34:23 +0200)".
Through some debugging i found the board hangs on calling gpio_request() in dhcom_get_ddr3_code().
Just for testing I skipped dhcom_get_ddr3_code and hardcoded the DDR3 size. Then I get:
Missing DTB
fdtdec_setup() returned error -1
### ERROR ### Please RESET the board ###
Unfortunately I have not found out how the SPL should load the devicetree. Can you give me a hint for this?
regards,
Ludwig
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 03/16] dh_imx6: Switch to full DM-aware
2020-06-25 14:52 ` AW: " Ludwig Zenz
@ 2020-06-25 17:21 ` Tom Rini
2020-06-25 17:22 ` Simon Glass
1 sibling, 0 replies; 9+ messages in thread
From: Tom Rini @ 2020-06-25 17:21 UTC (permalink / raw)
To: u-boot
On Thu, Jun 25, 2020 at 02:52:58PM +0000, Ludwig Zenz wrote:
> On 22/06/20 9:38 AM, Tom Rini wrote:
> > On Mon, Jun 22, 2020 at 09:38:36AM +0000, Ludwig Zenz wrote:
> >
> >> On 6/13/20 3:55 PM, Jagan Teki wrote:
> >> > Enable DM_SPI/DM_SPI_FLASH with a related config option.
> >> >
> >> > Build fine, but not tested.
> >>
> >> Hello,
> >>
> >> due to memory limitations in the SRAM of the i.MX6S in SPL we have not used the device tree. Have the restrictions been removed in the meantime? We need a single binary for the i.MX6 q/d/dl/s variants of our system on module.
> >>
> >> I think this patch breaks the board support for our module.
> >
> > I _think_ i.MX is making use of the generic hooks to cause build time failures when we grow too large. And we have addressed some, but not all of the concerns about DM size. Can you please test this patch? If it doesn't work doing:
> >
> >> > diff --git a/include/configs/dh_imx6.h b/include/configs/dh_imx6.h
> >> > index 5bfdf4044b..5fb84f72a2 100644
> >> > --- a/include/configs/dh_imx6.h
> >> > +++ b/include/configs/dh_imx6.h
> >> > @@ -53,12 +53,6 @@
> >> > /* SATA Configs */
> >> > #define CONFIG_LBA48
> >> >
> >> > -/* SPI Flash Configs */
> >> > -#if defined(CONFIG_SPL_BUILD)
> >> > -#undef CONFIG_DM_SPI
> >> > -#undef CONFIG_DM_SPI_FLASH
> >> > -#endif
> >
> > is still needed as we have a symbol to control DM SPI in SPL directly so the above isn't doing what you imply you want. Thanks!
> >
> >
>
> With the above patch the board hangs after printing "U-Boot SPL 2020.07-rc5-38776-g922c6d5d009-dirty (Jun 25 2020 - 16:34:23 +0200)".
>
> Through some debugging i found the board hangs on calling gpio_request() in dhcom_get_ddr3_code().
>
> Just for testing I skipped dhcom_get_ddr3_code and hardcoded the DDR3 size. Then I get:
>
> Missing DTB
> fdtdec_setup() returned error -1
> ### ERROR ### Please RESET the board ###
>
> Unfortunately I have not found out how the SPL should load the devicetree. Can you give me a hint for this?
Ah, so you've not done any SPL DM migration.
So there's two paths here. Path 1, the config header snippet that got
things rolling here does need to be removed as "no DM SPI in SPL" means
CONFIG_SPL_DM_SPI=n and not "CONFIG_DM_SPI=n if CONFIG_SPL_BUILD". We
are not now, and are not at the point where we can say we will be at
some future point, saying everyone must use DM in SPL. You may want to
examine the .config you get today from running dh_imx6_defconfig and
seeing what can/should be disabled, if anything, that's an unexpected
enabled option. Path 2, look at something like mx6cuboxi and convert to
CONFIG_SPL_DM=y
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200625/7b477e8f/attachment.sig>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 03/16] dh_imx6: Switch to full DM-aware
2020-06-25 14:52 ` AW: " Ludwig Zenz
2020-06-25 17:21 ` Tom Rini
@ 2020-06-25 17:22 ` Simon Glass
1 sibling, 0 replies; 9+ messages in thread
From: Simon Glass @ 2020-06-25 17:22 UTC (permalink / raw)
To: u-boot
Hi Ludwig,
On Thu, 25 Jun 2020 at 08:53, Ludwig Zenz <lzenz@dh-electronics.com> wrote:
>
> On 22/06/20 9:38 AM, Tom Rini wrote:
> > On Mon, Jun 22, 2020 at 09:38:36AM +0000, Ludwig Zenz wrote:
> >
> >> On 6/13/20 3:55 PM, Jagan Teki wrote:
> >> > Enable DM_SPI/DM_SPI_FLASH with a related config option.
> >> >
> >> > Build fine, but not tested.
> >>
> >> Hello,
> >>
> >> due to memory limitations in the SRAM of the i.MX6S in SPL we have not used the device tree. Have the restrictions been removed in the meantime? We need a single binary for the i.MX6 q/d/dl/s variants of our system on module.
> >>
> >> I think this patch breaks the board support for our module.
> >
> > I _think_ i.MX is making use of the generic hooks to cause build time failures when we grow too large. And we have addressed some, but not all of the concerns about DM size. Can you please test this patch? If it doesn't work doing:
> >
> >> > diff --git a/include/configs/dh_imx6.h b/include/configs/dh_imx6.h
> >> > index 5bfdf4044b..5fb84f72a2 100644
> >> > --- a/include/configs/dh_imx6.h
> >> > +++ b/include/configs/dh_imx6.h
> >> > @@ -53,12 +53,6 @@
> >> > /* SATA Configs */
> >> > #define CONFIG_LBA48
> >> >
> >> > -/* SPI Flash Configs */
> >> > -#if defined(CONFIG_SPL_BUILD)
> >> > -#undef CONFIG_DM_SPI
> >> > -#undef CONFIG_DM_SPI_FLASH
> >> > -#endif
> >
> > is still needed as we have a symbol to control DM SPI in SPL directly so the above isn't doing what you imply you want. Thanks!
> >
> >
>
> With the above patch the board hangs after printing "U-Boot SPL 2020.07-rc5-38776-g922c6d5d009-dirty (Jun 25 2020 - 16:34:23 +0200)".
>
> Through some debugging i found the board hangs on calling gpio_request() in dhcom_get_ddr3_code().
>
> Just for testing I skipped dhcom_get_ddr3_code and hardcoded the DDR3 size. Then I get:
>
> Missing DTB
> fdtdec_setup() returned error -1
> ### ERROR ### Please RESET the board ###
>
> Unfortunately I have not found out how the SPL should load the devicetree. Can you give me a hint for this?
The device tree is normally appended to SPL, so it is located by
fdtdec_setup() at __bss_end. See board_fdt_blob_setup().
Regards,
Simon
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 03/16] dh_imx6: Switch to full DM-aware
2020-06-22 9:38 Ludwig Zenz
2020-06-22 12:32 ` Tom Rini
@ 2020-07-08 13:06 ` Jagan Teki
1 sibling, 0 replies; 9+ messages in thread
From: Jagan Teki @ 2020-07-08 13:06 UTC (permalink / raw)
To: u-boot
On Mon, Jun 22, 2020 at 3:09 PM 'Ludwig Zenz' via Amarula Linux
<linux-amarula@amarulasolutions.com> wrote:
>
> On 6/13/20 3:55 PM, Jagan Teki wrote:
> > Enable DM_SPI/DM_SPI_FLASH with a related config option.
> >
> > Build fine, but not tested.
>
> Hello,
>
> due to memory limitations in the SRAM of the i.MX6S in SPL we have not used the device tree. Have the restrictions been removed in the meantime? We need a single binary for the i.MX6 q/d/dl/s variants of our system on module.
>
> I think this patch breaks the board support for our module.
Have you tried platdata on SPL side?
Jagan.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 00/16] spi: dm-conversion (part3)
@ 2020-06-13 13:54 Jagan Teki
2020-06-13 13:54 ` [PATCH 03/16] dh_imx6: Switch to full DM-aware Jagan Teki
0 siblings, 1 reply; 9+ messages in thread
From: Jagan Teki @ 2020-06-13 13:54 UTC (permalink / raw)
To: u-boot
This series updated boards which are using mxc_spi
driver.
Series has patches for
1) DM_SPI/SPI_FLASH enablement for boards which
already support DM and OF_CONTROL.
2) Drop the boards which doesn't support DM or OF_CONTROL.
Now it's call for board maintainers to update their
board to use device tree and DM options to alive
on tree before MW.
thanks,
Jagan.
Jagan Teki (16):
cl-som-imx7: Switch to DM_SPI/DM_SPI_FLASH
cm_fx6: Switch to full DM-aware
dh_imx6: Switch to full DM-aware
arm: Remove mx51evk board
arm: Remove ts4800 board
arm: Remove tqma6s_wru4_mmc_defconfig
arm: Remove pfla02 board
arm: Remove pcm058 board
arm: Remove riotboard board
arm: Remove zc5202/zc5601 board
arm: Remove cgtqmx6eval board
arm: Remove ot1200 board
arm: Remove dms-ba16 board
arm: Remove configs/mx35pdk_defconfig board
arm: Remove flea3_defconfig board
arm: Remove mx31pdk_defconfig board
arch/arm/Kconfig | 11 -
arch/arm/mach-imx/mx3/Kconfig | 12 -
arch/arm/mach-imx/mx5/Kconfig | 11 -
arch/arm/mach-imx/mx6/Kconfig | 59 --
board/CarMediaLab/flea3/Kconfig | 15 -
board/CarMediaLab/flea3/MAINTAINERS | 6 -
board/CarMediaLab/flea3/Makefile | 8 -
board/CarMediaLab/flea3/flea3.c | 224 ----
board/CarMediaLab/flea3/lowlevel_init.S | 24 -
board/advantech/dms-ba16/Kconfig | 31 -
board/advantech/dms-ba16/MAINTAINERS | 8 -
board/advantech/dms-ba16/Makefile | 6 -
board/advantech/dms-ba16/clocks.cfg | 25 -
board/advantech/dms-ba16/ddr-setup.cfg | 39 -
board/advantech/dms-ba16/dms-ba16.c | 629 -----------
board/advantech/dms-ba16/dms-ba16_1g.cfg | 24 -
board/advantech/dms-ba16/dms-ba16_2g.cfg | 24 -
board/advantech/dms-ba16/micron-1g.cfg | 63 --
board/advantech/dms-ba16/samsung-2g.cfg | 63 --
board/bachmann/ot1200/Kconfig | 12 -
board/bachmann/ot1200/MAINTAINERS | 6 -
board/bachmann/ot1200/Makefile | 11 -
board/bachmann/ot1200/README | 20 -
board/bachmann/ot1200/mx6q_4x_mt41j128.cfg | 154 ---
board/bachmann/ot1200/ot1200.c | 359 -------
board/bachmann/ot1200/ot1200_spl.c | 152 ---
board/congatec/cgtqmx6eval/Kconfig | 12 -
board/congatec/cgtqmx6eval/MAINTAINERS | 6 -
board/congatec/cgtqmx6eval/Makefile | 8 -
board/congatec/cgtqmx6eval/README | 74 --
board/congatec/cgtqmx6eval/cgtqmx6eval.c | 1091 --------------------
board/el/el6x/Kconfig | 25 -
board/el/el6x/MAINTAINERS | 8 -
board/el/el6x/Makefile | 5 -
board/el/el6x/el6x.c | 636 ------------
board/embest/mx6boards/Kconfig | 12 -
board/embest/mx6boards/MAINTAINERS | 8 -
board/embest/mx6boards/Makefile | 7 -
board/embest/mx6boards/mx6boards.c | 662 ------------
board/freescale/mx31pdk/Kconfig | 15 -
board/freescale/mx31pdk/MAINTAINERS | 6 -
board/freescale/mx31pdk/Makefile | 11 -
board/freescale/mx31pdk/lowlevel_init.S | 76 --
board/freescale/mx31pdk/mx31pdk.c | 119 ---
board/freescale/mx35pdk/Kconfig | 15 -
board/freescale/mx35pdk/MAINTAINERS | 6 -
board/freescale/mx35pdk/Makefile | 8 -
board/freescale/mx35pdk/README | 114 --
board/freescale/mx35pdk/lowlevel_init.S | 239 -----
board/freescale/mx35pdk/mx35pdk.c | 293 ------
board/freescale/mx35pdk/mx35pdk.h | 41 -
board/freescale/mx51evk/Kconfig | 15 -
board/freescale/mx51evk/MAINTAINERS | 6 -
board/freescale/mx51evk/Makefile | 8 -
board/freescale/mx51evk/imximage.cfg | 108 --
board/freescale/mx51evk/mx51evk.c | 401 -------
board/freescale/mx51evk/mx51evk_video.c | 98 --
board/phytec/pcm058/Kconfig | 12 -
board/phytec/pcm058/MAINTAINERS | 6 -
board/phytec/pcm058/Makefile | 7 -
board/phytec/pcm058/README | 35 -
board/phytec/pcm058/pcm058.c | 571 ----------
board/phytec/pfla02/Kconfig | 18 -
board/phytec/pfla02/MAINTAINERS | 6 -
board/phytec/pfla02/Makefile | 7 -
board/phytec/pfla02/README | 24 -
board/phytec/pfla02/pfla02.c | 713 -------------
board/technologic/ts4800/Kconfig | 15 -
board/technologic/ts4800/MAINTAINERS | 6 -
board/technologic/ts4800/Makefile | 5 -
board/technologic/ts4800/ts4800.c | 262 -----
board/technologic/ts4800/ts4800.h | 15 -
configs/cgtqmx6eval_defconfig | 85 --
configs/cl-som-imx7_defconfig | 7 +-
configs/cm_fx6_defconfig | 3 +
configs/dh_imx6_defconfig | 3 +
configs/dms-ba16-1g_defconfig | 64 --
configs/dms-ba16_defconfig | 63 --
configs/flea3_defconfig | 48 -
configs/marsboard_defconfig | 44 -
configs/mx31pdk_defconfig | 40 -
configs/mx35pdk_defconfig | 52 -
configs/mx51evk_defconfig | 42 -
configs/ot1200_defconfig | 55 -
configs/ot1200_spl_defconfig | 66 --
configs/pcm058_defconfig | 70 --
configs/pfla02_defconfig | 71 --
configs/riotboard_defconfig | 44 -
configs/riotboard_spl_defconfig | 55 -
configs/tqma6s_wru4_mmc_defconfig | 81 --
configs/ts4800_defconfig | 28 -
configs/zc5202_defconfig | 56 -
configs/zc5601_defconfig | 54 -
include/configs/advantech_dms-ba16.h | 233 -----
include/configs/cgtqmx6eval.h | 209 ----
include/configs/cm_fx6.h | 7 -
include/configs/dh_imx6.h | 6 -
include/configs/embestmx6boards.h | 140 ---
include/configs/flea3.h | 182 ----
include/configs/mx31pdk.h | 141 ---
include/configs/mx35pdk.h | 210 ----
include/configs/mx51evk.h | 197 ----
include/configs/ot1200.h | 99 --
include/configs/pcm058.h | 77 --
include/configs/pfla02.h | 131 ---
include/configs/ts4800.h | 139 ---
include/configs/zc5202.h | 27 -
include/configs/zc5601.h | 26 -
108 files changed, 11 insertions(+), 10675 deletions(-)
delete mode 100644 board/CarMediaLab/flea3/Kconfig
delete mode 100644 board/CarMediaLab/flea3/MAINTAINERS
delete mode 100644 board/CarMediaLab/flea3/Makefile
delete mode 100644 board/CarMediaLab/flea3/flea3.c
delete mode 100644 board/CarMediaLab/flea3/lowlevel_init.S
delete mode 100644 board/advantech/dms-ba16/Kconfig
delete mode 100644 board/advantech/dms-ba16/MAINTAINERS
delete mode 100644 board/advantech/dms-ba16/Makefile
delete mode 100644 board/advantech/dms-ba16/clocks.cfg
delete mode 100644 board/advantech/dms-ba16/ddr-setup.cfg
delete mode 100644 board/advantech/dms-ba16/dms-ba16.c
delete mode 100644 board/advantech/dms-ba16/dms-ba16_1g.cfg
delete mode 100644 board/advantech/dms-ba16/dms-ba16_2g.cfg
delete mode 100644 board/advantech/dms-ba16/micron-1g.cfg
delete mode 100644 board/advantech/dms-ba16/samsung-2g.cfg
delete mode 100644 board/bachmann/ot1200/Kconfig
delete mode 100644 board/bachmann/ot1200/MAINTAINERS
delete mode 100644 board/bachmann/ot1200/Makefile
delete mode 100644 board/bachmann/ot1200/README
delete mode 100644 board/bachmann/ot1200/mx6q_4x_mt41j128.cfg
delete mode 100644 board/bachmann/ot1200/ot1200.c
delete mode 100644 board/bachmann/ot1200/ot1200_spl.c
delete mode 100644 board/congatec/cgtqmx6eval/Kconfig
delete mode 100644 board/congatec/cgtqmx6eval/MAINTAINERS
delete mode 100644 board/congatec/cgtqmx6eval/Makefile
delete mode 100644 board/congatec/cgtqmx6eval/README
delete mode 100644 board/congatec/cgtqmx6eval/cgtqmx6eval.c
delete mode 100644 board/el/el6x/Kconfig
delete mode 100644 board/el/el6x/MAINTAINERS
delete mode 100644 board/el/el6x/Makefile
delete mode 100644 board/el/el6x/el6x.c
delete mode 100644 board/embest/mx6boards/Kconfig
delete mode 100644 board/embest/mx6boards/MAINTAINERS
delete mode 100644 board/embest/mx6boards/Makefile
delete mode 100644 board/embest/mx6boards/mx6boards.c
delete mode 100644 board/freescale/mx31pdk/Kconfig
delete mode 100644 board/freescale/mx31pdk/MAINTAINERS
delete mode 100644 board/freescale/mx31pdk/Makefile
delete mode 100644 board/freescale/mx31pdk/lowlevel_init.S
delete mode 100644 board/freescale/mx31pdk/mx31pdk.c
delete mode 100644 board/freescale/mx35pdk/Kconfig
delete mode 100644 board/freescale/mx35pdk/MAINTAINERS
delete mode 100644 board/freescale/mx35pdk/Makefile
delete mode 100644 board/freescale/mx35pdk/README
delete mode 100644 board/freescale/mx35pdk/lowlevel_init.S
delete mode 100644 board/freescale/mx35pdk/mx35pdk.c
delete mode 100644 board/freescale/mx35pdk/mx35pdk.h
delete mode 100644 board/freescale/mx51evk/Kconfig
delete mode 100644 board/freescale/mx51evk/MAINTAINERS
delete mode 100644 board/freescale/mx51evk/Makefile
delete mode 100644 board/freescale/mx51evk/imximage.cfg
delete mode 100644 board/freescale/mx51evk/mx51evk.c
delete mode 100644 board/freescale/mx51evk/mx51evk_video.c
delete mode 100644 board/phytec/pcm058/Kconfig
delete mode 100644 board/phytec/pcm058/MAINTAINERS
delete mode 100644 board/phytec/pcm058/Makefile
delete mode 100644 board/phytec/pcm058/README
delete mode 100644 board/phytec/pcm058/pcm058.c
delete mode 100644 board/phytec/pfla02/Kconfig
delete mode 100644 board/phytec/pfla02/MAINTAINERS
delete mode 100644 board/phytec/pfla02/Makefile
delete mode 100644 board/phytec/pfla02/README
delete mode 100644 board/phytec/pfla02/pfla02.c
delete mode 100644 board/technologic/ts4800/Kconfig
delete mode 100644 board/technologic/ts4800/MAINTAINERS
delete mode 100644 board/technologic/ts4800/Makefile
delete mode 100644 board/technologic/ts4800/ts4800.c
delete mode 100644 board/technologic/ts4800/ts4800.h
delete mode 100644 configs/cgtqmx6eval_defconfig
delete mode 100644 configs/dms-ba16-1g_defconfig
delete mode 100644 configs/dms-ba16_defconfig
delete mode 100644 configs/flea3_defconfig
delete mode 100644 configs/marsboard_defconfig
delete mode 100644 configs/mx31pdk_defconfig
delete mode 100644 configs/mx35pdk_defconfig
delete mode 100644 configs/mx51evk_defconfig
delete mode 100644 configs/ot1200_defconfig
delete mode 100644 configs/ot1200_spl_defconfig
delete mode 100644 configs/pcm058_defconfig
delete mode 100644 configs/pfla02_defconfig
delete mode 100644 configs/riotboard_defconfig
delete mode 100644 configs/riotboard_spl_defconfig
delete mode 100644 configs/tqma6s_wru4_mmc_defconfig
delete mode 100644 configs/ts4800_defconfig
delete mode 100644 configs/zc5202_defconfig
delete mode 100644 configs/zc5601_defconfig
delete mode 100644 include/configs/advantech_dms-ba16.h
delete mode 100644 include/configs/cgtqmx6eval.h
delete mode 100644 include/configs/embestmx6boards.h
delete mode 100644 include/configs/flea3.h
delete mode 100644 include/configs/mx31pdk.h
delete mode 100644 include/configs/mx35pdk.h
delete mode 100644 include/configs/mx51evk.h
delete mode 100644 include/configs/ot1200.h
delete mode 100644 include/configs/pcm058.h
delete mode 100644 include/configs/pfla02.h
delete mode 100644 include/configs/ts4800.h
delete mode 100644 include/configs/zc5202.h
delete mode 100644 include/configs/zc5601.h
--
2.25.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 03/16] dh_imx6: Switch to full DM-aware
2020-06-13 13:54 [PATCH 00/16] spi: dm-conversion (part3) Jagan Teki
@ 2020-06-13 13:54 ` Jagan Teki
0 siblings, 0 replies; 9+ messages in thread
From: Jagan Teki @ 2020-06-13 13:54 UTC (permalink / raw)
To: u-boot
Enable DM_SPI/DM_SPI_FLASH with a related config option.
Build fine, but not tested.
Cc: Ludwig Zenz <lzenz@dh-electronics.de>
Cc: Andreas Geisreiter <ageisreiter@dh-electronics.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
configs/dh_imx6_defconfig | 3 +++
include/configs/dh_imx6.h | 6 ------
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/configs/dh_imx6_defconfig b/configs/dh_imx6_defconfig
index d20405e5b2..da756a8e3d 100644
--- a/configs/dh_imx6_defconfig
+++ b/configs/dh_imx6_defconfig
@@ -49,12 +49,14 @@ CONFIG_CMD_CACHE=y
CONFIG_CMD_TIME=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
CONFIG_DEFAULT_DEVICE_TREE="imx6q-dhcom-pdk2"
CONFIG_OF_LIST="imx6q-dhcom-pdk2 imx6dl-dhcom-pdk2"
CONFIG_MULTI_DTB_FIT=y
CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SPL_DM=y
CONFIG_DWC_AHSATA=y
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_DM_I2C=y
@@ -100,4 +102,5 @@ CONFIG_CI_UDC=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_WATCHDOG_TIMEOUT_MSECS=60000
CONFIG_IMX_WATCHDOG=y
+# CONFIG_SPL_WDT is not set
CONFIG_BZIP2=y
diff --git a/include/configs/dh_imx6.h b/include/configs/dh_imx6.h
index 5bfdf4044b..5fb84f72a2 100644
--- a/include/configs/dh_imx6.h
+++ b/include/configs/dh_imx6.h
@@ -53,12 +53,6 @@
/* SATA Configs */
#define CONFIG_LBA48
-/* SPI Flash Configs */
-#if defined(CONFIG_SPL_BUILD)
-#undef CONFIG_DM_SPI
-#undef CONFIG_DM_SPI_FLASH
-#endif
-
/* UART */
#define CONFIG_MXC_UART
#define CONFIG_MXC_UART_BASE UART1_BASE
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-01-13 18:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-29 12:27 [PATCH 03/16] dh_imx6: Switch to full DM-aware Ludwig Zenz
2020-06-29 14:01 ` Tom Rini
2021-01-13 18:14 ` Marek Vasut
-- strict thread matches above, loose matches on Subject: below --
2020-06-22 9:38 Ludwig Zenz
2020-06-22 12:32 ` Tom Rini
2020-06-25 14:52 ` AW: " Ludwig Zenz
2020-06-25 17:21 ` Tom Rini
2020-06-25 17:22 ` Simon Glass
2020-07-08 13:06 ` Jagan Teki
2020-06-13 13:54 [PATCH 00/16] spi: dm-conversion (part3) Jagan Teki
2020-06-13 13:54 ` [PATCH 03/16] dh_imx6: Switch to full DM-aware Jagan Teki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox