From: Ludwig Zenz <lzenz@dh-electronics.com>
To: u-boot@lists.denx.de
Subject: [PATCH 03/16] dh_imx6: Switch to full DM-aware
Date: Mon, 29 Jun 2020 12:27:08 +0000 [thread overview]
Message-ID: <1f48319e07c449cd8437fbab28ed04dc@dh-electronics.com> (raw)
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
next reply other threads:[~2020-06-29 12:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-29 12:27 Ludwig Zenz [this message]
2020-06-29 14:01 ` [PATCH 03/16] dh_imx6: Switch to full DM-aware 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1f48319e07c449cd8437fbab28ed04dc@dh-electronics.com \
--to=lzenz@dh-electronics.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox