public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* DM_SERIAL for i.MX6 Hummingboard/Cubox-i
@ 2022-11-03 12:22 Baruch Siach
  2022-11-03 12:38 ` Fabio Estevam
  0 siblings, 1 reply; 9+ messages in thread
From: Baruch Siach @ 2022-11-03 12:22 UTC (permalink / raw)
  To: u-boot; +Cc: Fabio Estevam

Hi u-boot list,

I am trying to migrate the Hummingboard platform to DM_SERIAL. See below
what I got so far. Booting this on top of master (as of commit
8bc87a4c5) shows nothing on the serial console. Next thing I plan to try
is toggle GPIOs in entry code to see how far the code proceeds.

Any idea where to look before I go down that way?

Thanks,
baruch

diff --git a/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi b/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
index 400b885e4370..8507b818d4cf 100644
--- a/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
+++ b/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
@@ -15,6 +15,10 @@
 	};
 };
 
+&uart1 {
+	u-boot,dm-pre-reloc;
+};
+
 &gpio2 {
 	u-boot,dm-pre-reloc;
 };
diff --git a/configs/mx6cuboxi_defconfig b/configs/mx6cuboxi_defconfig
index 9de5e77c75ad..a29e973eccce 100644
--- a/configs/mx6cuboxi_defconfig
+++ b/configs/mx6cuboxi_defconfig
@@ -46,7 +46,6 @@ CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_LIST="imx6dl-hummingboard2-emmc-som-v15 imx6q-hummingboard2-emmc-som-v15"
 CONFIG_MULTI_DTB_FIT=y
-CONFIG_SPL_OF_PLATDATA=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
@@ -68,6 +67,8 @@ CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
 CONFIG_DM_THERMAL=y
 CONFIG_IMX_THERMAL=y


-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

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

* Re: DM_SERIAL for i.MX6 Hummingboard/Cubox-i
  2022-11-03 12:22 DM_SERIAL for i.MX6 Hummingboard/Cubox-i Baruch Siach
@ 2022-11-03 12:38 ` Fabio Estevam
  2022-11-03 13:57   ` Baruch Siach
  0 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2022-11-03 12:38 UTC (permalink / raw)
  To: Baruch Siach; +Cc: u-boot

Hi Baruch,

On Thu, Nov 3, 2022 at 9:29 AM Baruch Siach <baruch@tkos.co.il> wrote:
>
> Hi u-boot list,
>
> I am trying to migrate the Hummingboard platform to DM_SERIAL. See below
> what I got so far. Booting this on top of master (as of commit
> 8bc87a4c5) shows nothing on the serial console. Next thing I plan to try
> is toggle GPIOs in entry code to see how far the code proceeds.
>
> Any idea where to look before I go down that way?
>
> Thanks,
> baruch
>
> diff --git a/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi b/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
> index 400b885e4370..8507b818d4cf 100644
> --- a/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
> +++ b/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
> @@ -15,6 +15,10 @@
>         };
>  };
>
> +&uart1 {
> +       u-boot,dm-pre-reloc;
> +};

Here you also need to pass &aips1, &pinctrl_uart1, and &soc.

Please look at the following commit for reference:

commit 8fbca1a8b9b02fbc40147401d9af764e07dc96af
Author: Fabio Estevam <festevam@denx.de>
Date:   Tue Mar 15 17:47:05 2022 -0300

    tbs2910: Convert to DM_SERIAL

    Conversion to DM_SERIAL is mandatory.

    Select DM_SERIAL and add a imx6q-tbs2910-u-boot.dtsi file
    that describes the nodes that require dm-pre-reloc, which allows
    the DM model to configure the UART pinctrl early.

    Remove the now unneeded board UART initialization.

    Signed-off-by: Fabio Estevam <festevam@denx.de>
    Tested-by: Soeren Moch <smoch@web.de>

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

* Re: DM_SERIAL for i.MX6 Hummingboard/Cubox-i
  2022-11-03 12:38 ` Fabio Estevam
@ 2022-11-03 13:57   ` Baruch Siach
  2022-11-03 14:15     ` Fabio Estevam
  0 siblings, 1 reply; 9+ messages in thread
From: Baruch Siach @ 2022-11-03 13:57 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: u-boot

Hi Fabio,

On Thu, Nov 03 2022, Fabio Estevam wrote:
> On Thu, Nov 3, 2022 at 9:29 AM Baruch Siach <baruch@tkos.co.il> wrote:
>> I am trying to migrate the Hummingboard platform to DM_SERIAL. See below
>> what I got so far. Booting this on top of master (as of commit
>> 8bc87a4c5) shows nothing on the serial console. Next thing I plan to try
>> is toggle GPIOs in entry code to see how far the code proceeds.
>>
>> Any idea where to look before I go down that way?
>>
>> Thanks,
>> baruch
>>
>> diff --git a/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi b/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
>> index 400b885e4370..8507b818d4cf 100644
>> --- a/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
>> +++ b/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
>> @@ -15,6 +15,10 @@
>>         };
>>  };
>>
>> +&uart1 {
>> +       u-boot,dm-pre-reloc;
>> +};
>
> Here you also need to pass &aips1, &pinctrl_uart1, and &soc.

I tried this (see below) but no luck yet. The tbs2910 appears not to use
SPL. I might be missing an SPL driver.

Thanks for your help,
baruch

diff --git a/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi b/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
index 400b885e4370..e1cb9b3e89ec 100644
--- a/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
+++ b/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
@@ -15,6 +15,22 @@
 	};
 };
 
+&soc {
+	u-boot,dm-pre-reloc;
+};
+
+&aips1 {
+	u-boot,dm-pre-reloc;
+};
+
+&pinctrl_microsom_uart1 {
+	u-boot,dm-pre-reloc;
+};
+
+&uart1 {
+	u-boot,dm-pre-reloc;
+};
+
 &gpio2 {
 	u-boot,dm-pre-reloc;
 };
diff --git a/configs/mx6cuboxi_defconfig b/configs/mx6cuboxi_defconfig
index 9de5e77c75ad..9d7b2764c969 100644
--- a/configs/mx6cuboxi_defconfig
+++ b/configs/mx6cuboxi_defconfig
@@ -46,7 +46,6 @@ CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_LIST="imx6dl-hummingboard2-emmc-som-v15 imx6q-hummingboard2-emmc-som-v15"
 CONFIG_MULTI_DTB_FIT=y
-CONFIG_SPL_OF_PLATDATA=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
@@ -65,9 +64,11 @@ CONFIG_FEC_MXC=y
 CONFIG_RGMII=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
 CONFIG_DM_THERMAL=y
 CONFIG_IMX_THERMAL=y

> Please look at the following commit for reference:
>
> commit 8fbca1a8b9b02fbc40147401d9af764e07dc96af
> Author: Fabio Estevam <festevam@denx.de>
> Date:   Tue Mar 15 17:47:05 2022 -0300
>
>     tbs2910: Convert to DM_SERIAL
>
>     Conversion to DM_SERIAL is mandatory.
>
>     Select DM_SERIAL and add a imx6q-tbs2910-u-boot.dtsi file
>     that describes the nodes that require dm-pre-reloc, which allows
>     the DM model to configure the UART pinctrl early.
>
>     Remove the now unneeded board UART initialization.
>
>     Signed-off-by: Fabio Estevam <festevam@denx.de>
>     Tested-by: Soeren Moch <smoch@web.de>


-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

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

* Re: DM_SERIAL for i.MX6 Hummingboard/Cubox-i
  2022-11-03 13:57   ` Baruch Siach
@ 2022-11-03 14:15     ` Fabio Estevam
  2022-11-03 14:28       ` Fabio Estevam
  0 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2022-11-03 14:15 UTC (permalink / raw)
  To: Baruch Siach; +Cc: u-boot

Hi Baruch,

On Thu, Nov 3, 2022 at 11:06 AM Baruch Siach <baruch@tkos.co.il> wrote:

> I tried this (see below) but no luck yet. The tbs2910 appears not to use
> SPL. I might be missing an SPL driver.

That's a good point.

imx8mm_evk_defconfig has been converted to DM_SERIAL and it uses SPL.

> +&soc {
> +       u-boot,dm-pre-reloc;

Please try using u-boot,dm-spl for all nodes instead.

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

* Re: DM_SERIAL for i.MX6 Hummingboard/Cubox-i
  2022-11-03 14:15     ` Fabio Estevam
@ 2022-11-03 14:28       ` Fabio Estevam
  2022-11-03 15:03         ` Fabio Estevam
  2022-11-03 15:30         ` Baruch Siach
  0 siblings, 2 replies; 9+ messages in thread
From: Fabio Estevam @ 2022-11-03 14:28 UTC (permalink / raw)
  To: Baruch Siach; +Cc: u-boot

Hi Baruch,

On Thu, Nov 3, 2022 at 11:15 AM Fabio Estevam <festevam@gmail.com> wrote:

> Please try using u-boot,dm-spl for all nodes instead.

In addition to using u-boot,dm-spl, please try calling
spl_early_init() like done here:
https://source.denx.de/u-boot/u-boot/-/commit/7cf388fa6977136dd2384bd746d237efc306c829

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

* Re: DM_SERIAL for i.MX6 Hummingboard/Cubox-i
  2022-11-03 14:28       ` Fabio Estevam
@ 2022-11-03 15:03         ` Fabio Estevam
  2022-11-03 15:31           ` Baruch Siach
  2022-11-03 15:30         ` Baruch Siach
  1 sibling, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2022-11-03 15:03 UTC (permalink / raw)
  To: Baruch Siach; +Cc: u-boot

On Thu, Nov 3, 2022 at 11:28 AM Fabio Estevam <festevam@gmail.com> wrote:
>
> Hi Baruch,
>
> On Thu, Nov 3, 2022 at 11:15 AM Fabio Estevam <festevam@gmail.com> wrote:
>
> > Please try using u-boot,dm-spl for all nodes instead.
>
> In addition to using u-boot,dm-spl, please try calling
> spl_early_init() like done here:
> https://source.denx.de/u-boot/u-boot/-/commit/7cf388fa6977136dd2384bd746d237efc306c829

Interestingly, on a wandboard I did:

diff --git a/configs/wandboard_defconfig b/configs/wandboard_defconfig
index 70b4cf9ffaa3..33d9db56e1cb 100644
--- a/configs/wandboard_defconfig
+++ b/configs/wandboard_defconfig
@@ -72,6 +72,7 @@ CONFIG_PINCTRL_IMX6=y
 CONFIG_DM_PMIC=y
 CONFIG_DM_PMIC_PFUZE100=y
 CONFIG_DM_SCSI=y
+CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
 CONFIG_DM_THERMAL=y
 CONFIG_USB=y

and it boots fine.

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

* Re: DM_SERIAL for i.MX6 Hummingboard/Cubox-i
  2022-11-03 14:28       ` Fabio Estevam
  2022-11-03 15:03         ` Fabio Estevam
@ 2022-11-03 15:30         ` Baruch Siach
  1 sibling, 0 replies; 9+ messages in thread
From: Baruch Siach @ 2022-11-03 15:30 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: u-boot

Hi Fabio,

On Thu, Nov 03 2022, Fabio Estevam wrote:
> On Thu, Nov 3, 2022 at 11:15 AM Fabio Estevam <festevam@gmail.com> wrote:
>
>> Please try using u-boot,dm-spl for all nodes instead.
>
> In addition to using u-boot,dm-spl, please try calling
> spl_early_init() like done here:
> https://source.denx.de/u-boot/u-boot/-/commit/7cf388fa6977136dd2384bd746d237efc306c829

That did the trick. Thanks.

A patch is forthcoming.

baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

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

* Re: DM_SERIAL for i.MX6 Hummingboard/Cubox-i
  2022-11-03 15:03         ` Fabio Estevam
@ 2022-11-03 15:31           ` Baruch Siach
  2022-11-03 15:36             ` Fabio Estevam
  0 siblings, 1 reply; 9+ messages in thread
From: Baruch Siach @ 2022-11-03 15:31 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: u-boot

Hi Fabio,

On Thu, Nov 03 2022, Fabio Estevam wrote:
> On Thu, Nov 3, 2022 at 11:28 AM Fabio Estevam <festevam@gmail.com> wrote:
>> On Thu, Nov 3, 2022 at 11:15 AM Fabio Estevam <festevam@gmail.com> wrote:
>>
>> > Please try using u-boot,dm-spl for all nodes instead.
>>
>> In addition to using u-boot,dm-spl, please try calling
>> spl_early_init() like done here:
>> https://source.denx.de/u-boot/u-boot/-/commit/7cf388fa6977136dd2384bd746d237efc306c829
>
> Interestingly, on a wandboard I did:
>
> diff --git a/configs/wandboard_defconfig b/configs/wandboard_defconfig
> index 70b4cf9ffaa3..33d9db56e1cb 100644
> --- a/configs/wandboard_defconfig
> +++ b/configs/wandboard_defconfig
> @@ -72,6 +72,7 @@ CONFIG_PINCTRL_IMX6=y
>  CONFIG_DM_PMIC=y
>  CONFIG_DM_PMIC_PFUZE100=y
>  CONFIG_DM_SCSI=y
> +CONFIG_DM_SERIAL=y
>  CONFIG_MXC_UART=y
>  CONFIG_DM_THERMAL=y
>  CONFIG_USB=y
>
> and it boots fine.

Without any u-boot,dm-pre-reloc or u-boot,dm-spl? I don't see any for
wandboard DT files in current master.

baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

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

* Re: DM_SERIAL for i.MX6 Hummingboard/Cubox-i
  2022-11-03 15:31           ` Baruch Siach
@ 2022-11-03 15:36             ` Fabio Estevam
  0 siblings, 0 replies; 9+ messages in thread
From: Fabio Estevam @ 2022-11-03 15:36 UTC (permalink / raw)
  To: Baruch Siach; +Cc: u-boot

Hi Baruch,

On Thu, Nov 3, 2022 at 12:33 PM Baruch Siach <baruch@tkos.co.il> wrote:

> Without any u-boot,dm-pre-reloc or u-boot,dm-spl? I don't see any for
> wandboard DT files in current master.

Correct, just passing CONFIG_DM_SERIAL=y boots fine on wandboard.

It does not have a imx6qdl-wandboard-u-boot.dtsi currently, so
u-boot,dm-spl is not being passed.

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

end of thread, other threads:[~2022-11-03 15:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-03 12:22 DM_SERIAL for i.MX6 Hummingboard/Cubox-i Baruch Siach
2022-11-03 12:38 ` Fabio Estevam
2022-11-03 13:57   ` Baruch Siach
2022-11-03 14:15     ` Fabio Estevam
2022-11-03 14:28       ` Fabio Estevam
2022-11-03 15:03         ` Fabio Estevam
2022-11-03 15:31           ` Baruch Siach
2022-11-03 15:36             ` Fabio Estevam
2022-11-03 15:30         ` Baruch Siach

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