All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] DM-SERIAL-SPL on MX6
@ 2018-06-07  6:55 Hannes Schmelzer
  2018-06-07  7:14 ` Jagan Teki
  0 siblings, 1 reply; 9+ messages in thread
From: Hannes Schmelzer @ 2018-06-07  6:55 UTC (permalink / raw)
  To: u-boot

hi,

i'm actually trying to convert my i.mx6 boards to DM, many things are 
already doing well.
But I've trouble getting the console (UART) runnin SPL.

The "preloader_console_init" is called very early in board_init_f, i 
guess that DM isn't ready at this point.

has anyone experience in this?

cheers,
Hannes

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

* [U-Boot] DM-SERIAL-SPL on MX6
  2018-06-07  6:55 [U-Boot] DM-SERIAL-SPL on MX6 Hannes Schmelzer
@ 2018-06-07  7:14 ` Jagan Teki
  2018-06-07  7:50   ` Sébastien Szymanski
  0 siblings, 1 reply; 9+ messages in thread
From: Jagan Teki @ 2018-06-07  7:14 UTC (permalink / raw)
  To: u-boot

+ Add few imx maintainers

On Thu, Jun 7, 2018 at 12:25 PM, Hannes Schmelzer
<hannes@schmelzer.or.at> wrote:
> hi,
>
> i'm actually trying to convert my i.mx6 boards to DM, many things are
> already doing well.
> But I've trouble getting the console (UART) runnin SPL.
>
> The "preloader_console_init" is called very early in board_init_f, i guess
> that DM isn't ready at this point.
>
> has anyone experience in this?

Yes I've faced the same, look like DEBUG Uart doesn't support low
level init. Peng or someone can explain more.

Jagan.

-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

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

* [U-Boot] DM-SERIAL-SPL on MX6
  2018-06-07  7:14 ` Jagan Teki
@ 2018-06-07  7:50   ` Sébastien Szymanski
  2018-06-07  8:35     ` Hannes Schmelzer
  0 siblings, 1 reply; 9+ messages in thread
From: Sébastien Szymanski @ 2018-06-07  7:50 UTC (permalink / raw)
  To: u-boot

Hi,

On 06/07/2018 09:14 AM, Jagan Teki wrote:
> + Add few imx maintainers
> 
> On Thu, Jun 7, 2018 at 12:25 PM, Hannes Schmelzer
> <hannes@schmelzer.or.at> wrote:
>> hi,
>>
>> i'm actually trying to convert my i.mx6 boards to DM, many things are
>> already doing well.
>> But I've trouble getting the console (UART) runnin SPL.
>>
>> The "preloader_console_init" is called very early in board_init_f, i guess
>> that DM isn't ready at this point.
>>
>> has anyone experience in this?
> 
> Yes I've faced the same, look like DEBUG Uart doesn't support low
> level init. Peng or someone can explain more.

When converting the OPOS6UL to DM, I had to move the
preloader_console_init call into the spl_board_init function.

Regards,

> 
> Jagan.
> 


-- 
Sébastien Szymanski
Software engineer, Armadeus Systems
Tel: +33 (0)9 72 29 41 44
Fax: +33 (0)9 72 28 79 26

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

* [U-Boot] DM-SERIAL-SPL on MX6
  2018-06-07  7:50   ` Sébastien Szymanski
@ 2018-06-07  8:35     ` Hannes Schmelzer
  2018-06-07  9:18       ` Sébastien Szymanski
  0 siblings, 1 reply; 9+ messages in thread
From: Hannes Schmelzer @ 2018-06-07  8:35 UTC (permalink / raw)
  To: u-boot

On 06/07/2018 09:50 AM, Sébastien Szymanski wrote:
> Hi,
Hi Sébastien,
>
> On 06/07/2018 09:14 AM, Jagan Teki wrote:
>> + Add few imx maintainers
>>
>> On Thu, Jun 7, 2018 at 12:25 PM, Hannes Schmelzer
>> <hannes@schmelzer.or.at> wrote:
>>> hi,
>>>
>>> i'm actually trying to convert my i.mx6 boards to DM, many things are
>>> already doing well.
>>> But I've trouble getting the console (UART) runnin SPL.
>>>
>>> The "preloader_console_init" is called very early in board_init_f, i guess
>>> that DM isn't ready at this point.
>>>
>>> has anyone experience in this?
>> Yes I've faced the same, look like DEBUG Uart doesn't support low
>> level init. Peng or someone can explain more.
> When converting the OPOS6UL to DM, I had to move the
> preloader_console_init call into the spl_board_init function.
thanks for this hint, i also tried this. But unfortunately without success.
But it is good to know that this way on your side works.

what i've done to try make it work:

add to my dts:
     chosen {
         stdout-path = &uart1;
     };

&uart1 {
     u-boot,dm-spl;
     u-boot,dm-preloc;
     status = "okay";
};

so the device should be present during spl stage and console should be 
set to it.

# Serial drivers
#
CONFIG_BAUDRATE=115200
CONFIG_SERIAL_PRESENT=y
CONFIG_SPL_SERIAL_PRESENT=y
CONFIG_DM_SERIAL=y
CONFIG_SPL_DM_SERIAL=y
CONFIG_MXC_UART=y

maybe i'm still missing something.

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

* [U-Boot] DM-SERIAL-SPL on MX6
  2018-06-07  8:35     ` Hannes Schmelzer
@ 2018-06-07  9:18       ` Sébastien Szymanski
  2018-06-07  9:40         ` Hannes Schmelzer
  2018-06-07 11:05         ` Hannes Schmelzer
  0 siblings, 2 replies; 9+ messages in thread
From: Sébastien Szymanski @ 2018-06-07  9:18 UTC (permalink / raw)
  To: u-boot

On 06/07/2018 10:35 AM, Hannes Schmelzer wrote:
> On 06/07/2018 09:50 AM, Sébastien Szymanski wrote:
>> Hi,
> Hi Sébastien,
>>
>> On 06/07/2018 09:14 AM, Jagan Teki wrote:
>>> + Add few imx maintainers
>>>
>>> On Thu, Jun 7, 2018 at 12:25 PM, Hannes Schmelzer
>>> <hannes@schmelzer.or.at> wrote:
>>>> hi,
>>>>
>>>> i'm actually trying to convert my i.mx6 boards to DM, many things are
>>>> already doing well.
>>>> But I've trouble getting the console (UART) runnin SPL.
>>>>
>>>> The "preloader_console_init" is called very early in board_init_f, i
>>>> guess
>>>> that DM isn't ready at this point.
>>>>
>>>> has anyone experience in this?
>>> Yes I've faced the same, look like DEBUG Uart doesn't support low
>>> level init. Peng or someone can explain more.
>> When converting the OPOS6UL to DM, I had to move the
>> preloader_console_init call into the spl_board_init function.
> thanks for this hint, i also tried this. But unfortunately without success.
> But it is good to know that this way on your side works.
> 
> what i've done to try make it work:
> 
> add to my dts:
>     chosen {
>         stdout-path = &uart1;
>     };
> 
> &uart1 {
>     u-boot,dm-spl;
>     u-boot,dm-preloc;
>     status = "okay";
> };

Don't you need pins muxing properties in uart1 ( pinctrl-names /
pinctrl-0 ) ?

> 
> so the device should be present during spl stage and console should be
> set to it.
> 
> # Serial drivers
> #
> CONFIG_BAUDRATE=115200
> CONFIG_SERIAL_PRESENT=y
> CONFIG_SPL_SERIAL_PRESENT=y
> CONFIG_DM_SERIAL=y
> CONFIG_SPL_DM_SERIAL=y
> CONFIG_MXC_UART=y
> 
> maybe i'm still missing something.
> 


-- 
Sébastien Szymanski
Software engineer, Armadeus Systems
Tel: +33 (0)9 72 29 41 44
Fax: +33 (0)9 72 28 79 26

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

* [U-Boot] DM-SERIAL-SPL on MX6
  2018-06-07  9:18       ` Sébastien Szymanski
@ 2018-06-07  9:40         ` Hannes Schmelzer
  2018-06-07 11:05         ` Hannes Schmelzer
  1 sibling, 0 replies; 9+ messages in thread
From: Hannes Schmelzer @ 2018-06-07  9:40 UTC (permalink / raw)
  To: u-boot

HI
>> thanks for this hint, i also tried this. But unfortunately without success.
>> But it is good to know that this way on your side works.
>>
>> what i've done to try make it work:
>>
>> add to my dts:
>>      chosen {
>>          stdout-path = &uart1;
>>      };
>>
>> &uart1 {
>>      u-boot,dm-spl;
>>      u-boot,dm-preloc;
>>      status = "okay";
>> };
> Don't you need pins muxing properties in uart1 ( pinctrl-names /
> pinctrl-0 ) ?
No, pinmux is done with:

static iomux_v3_cfg_t const board_pads_spl[] = {
     /* UART#1 PADS */
     MUXDESC(PAD_CSI0_DAT10__UART1_TX_DATA,    UART_PAD_CTRL),
     MUXDESC(PAD_CSI0_DAT11__UART1_RX_DATA,    UART_PAD_CTRL),
}

SETUP_IOMUX_PADS(board_pads_spl);

SPL console output is fine working once DM_SERIAL for SPL is disabled.
But with this option enabled i get no output during spl stage.
Once the full u-boot payload is loaded the console works with DM as 
excpected.

In:    serial at 02020000
Out:   serial at 02020000
Err:   serial at 02020000

=> dm tree
  Class      Probed  Driver      Name
----------------------------------------
  root       [ + ]   root_drive  root_driver
  simple_bus [ + ]   generic_si  |-- soc
  simple_bus [ + ]   generic_si  |   |-- aips-bus at 02000000
  simple_bus [ + ]   generic_si  |   |   |-- spba-bus at 02000000
  spi        [ + ]   mxc_spi     |   |   |   |-- ecspi at 02008000
  spi_flash  [ + ]   spi_flash_  |   |   |   |   `-- spi_flash at 0:1
  serial     [ + ]   serial_mxc  |   |   |   `-- serial at 02020000

>> so the device should be present during spl stage and console should be
>> set to it.
>>
>> # Serial drivers
>> #
>> CONFIG_BAUDRATE=115200
>> CONFIG_SERIAL_PRESENT=y
>> CONFIG_SPL_SERIAL_PRESENT=y
>> CONFIG_DM_SERIAL=y
>> CONFIG_SPL_DM_SERIAL=y
>> CONFIG_MXC_UART=y
>>
>> maybe i'm still missing something.
>>
>
cheers,
Hannes

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

* [U-Boot] DM-SERIAL-SPL on MX6
  2018-06-07  9:18       ` Sébastien Szymanski
  2018-06-07  9:40         ` Hannes Schmelzer
@ 2018-06-07 11:05         ` Hannes Schmelzer
  2018-06-18 12:26           ` Jagan Teki
  1 sibling, 1 reply; 9+ messages in thread
From: Hannes Schmelzer @ 2018-06-07 11:05 UTC (permalink / raw)
  To: u-boot


>>>>> i'm actually trying to convert my i.mx6 boards to DM, many things are
>>>>> already doing well.
>>>>> But I've trouble getting the console (UART) runnin SPL.
>>>>>
>>>>> The "preloader_console_init" is called very early in board_init_f, i
>>>>> guess
>>>>> that DM isn't ready at this point.
>>>>>
>>>>> has anyone experience in this?
>>>> Yes I've faced the same, look like DEBUG Uart doesn't support low
>>>> level init. Peng or someone can explain more.
>>> When converting the OPOS6UL to DM, I had to move the
>>> preloader_console_init call into the spl_board_init function.
>> thanks for this hint, i also tried this. But unfortunately without success.
>> But it is good to know that this way on your side works.
>>
>> what i've done to try make it work:
>>
>> add to my dts:
>>      chosen {
>>          stdout-path = &uart1;
>>      };
>>
>> &uart1 {
>>      u-boot,dm-spl;
>>      u-boot,dm-preloc;
>>      status = "okay";
>> };
> Don't you need pins muxing properties in uart1 ( pinctrl-names /
> pinctrl-0 ) ?
>
>> so the device should be present during spl stage and console should be
>> set to it.
>>
>> # Serial drivers
>> #
>> CONFIG_BAUDRATE=115200
>> CONFIG_SERIAL_PRESENT=y
>> CONFIG_SPL_SERIAL_PRESENT=y
>> CONFIG_DM_SERIAL=y
>> CONFIG_SPL_DM_SERIAL=y
>> CONFIG_MXC_UART=y
>>
>> maybe i'm still missing something.
Finally converting the tips from Sebastian in addition with converting 
"CONFIG_SPL_BOARD_INIT" to Kconfig did the trick.
Don't know why there is a difference, but doesn't matter since defining 
such stuff in board-config-header is deprecated.

many thanks to all.
cheers,
Hannes

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

* [U-Boot] DM-SERIAL-SPL on MX6
  2018-06-07 11:05         ` Hannes Schmelzer
@ 2018-06-18 12:26           ` Jagan Teki
  2018-06-18 13:14             ` Hannes Schmelzer
  0 siblings, 1 reply; 9+ messages in thread
From: Jagan Teki @ 2018-06-18 12:26 UTC (permalink / raw)
  To: u-boot

On Thu, Jun 7, 2018 at 4:35 PM, Hannes Schmelzer <hannes@schmelzer.or.at> wrote:
>
>>>>>> i'm actually trying to convert my i.mx6 boards to DM, many things are
>>>>>> already doing well.
>>>>>> But I've trouble getting the console (UART) runnin SPL.
>>>>>>
>>>>>> The "preloader_console_init" is called very early in board_init_f, i
>>>>>> guess
>>>>>> that DM isn't ready at this point.
>>>>>>
>>>>>> has anyone experience in this?
>>>>>
>>>>> Yes I've faced the same, look like DEBUG Uart doesn't support low
>>>>> level init. Peng or someone can explain more.
>>>>
>>>> When converting the OPOS6UL to DM, I had to move the
>>>> preloader_console_init call into the spl_board_init function.
>>>
>>> thanks for this hint, i also tried this. But unfortunately without
>>> success.
>>> But it is good to know that this way on your side works.
>>>
>>> what i've done to try make it work:
>>>
>>> add to my dts:
>>>      chosen {
>>>          stdout-path = &uart1;
>>>      };
>>>
>>> &uart1 {
>>>      u-boot,dm-spl;
>>>      u-boot,dm-preloc;
>>>      status = "okay";
>>> };
>>
>> Don't you need pins muxing properties in uart1 ( pinctrl-names /
>> pinctrl-0 ) ?
>>
>>> so the device should be present during spl stage and console should be
>>> set to it.
>>>
>>> # Serial drivers
>>> #
>>> CONFIG_BAUDRATE=115200
>>> CONFIG_SERIAL_PRESENT=y
>>> CONFIG_SPL_SERIAL_PRESENT=y
>>> CONFIG_DM_SERIAL=y
>>> CONFIG_SPL_DM_SERIAL=y
>>> CONFIG_MXC_UART=y
>>>
>>> maybe i'm still missing something.
>
> Finally converting the tips from Sebastian in addition with converting
> "CONFIG_SPL_BOARD_INIT" to Kconfig did the trick.
> Don't know why there is a difference, but doesn't matter since defining such
> stuff in board-config-header is deprecated.

imx6ul seems working for me with DM_SERIAL, i.MX6QDL has still not
getting console.

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

* [U-Boot] DM-SERIAL-SPL on MX6
  2018-06-18 12:26           ` Jagan Teki
@ 2018-06-18 13:14             ` Hannes Schmelzer
  0 siblings, 0 replies; 9+ messages in thread
From: Hannes Schmelzer @ 2018-06-18 13:14 UTC (permalink / raw)
  To: u-boot

Hi Jagan,

maybe you want compare your board to my "brppt2" within my dev-branch:

https://github.com/oe5hpm/u-boot/tree/bur-next-ppt50dm

Once i've finished clean integration into tree i want to get it mainline.

cheers,
Hannes

On 06/18/2018 02:26 PM, Jagan Teki wrote:
> On Thu, Jun 7, 2018 at 4:35 PM, Hannes Schmelzer <hannes@schmelzer.or.at> wrote:
>>>>>>> i'm actually trying to convert my i.mx6 boards to DM, many things are
>>>>>>> already doing well.
>>>>>>> But I've trouble getting the console (UART) runnin SPL.
>>>>>>>
>>>>>>> The "preloader_console_init" is called very early in board_init_f, i
>>>>>>> guess
>>>>>>> that DM isn't ready at this point.
>>>>>>>
>>>>>>> has anyone experience in this?
>>>>>> Yes I've faced the same, look like DEBUG Uart doesn't support low
>>>>>> level init. Peng or someone can explain more.
>>>>> When converting the OPOS6UL to DM, I had to move the
>>>>> preloader_console_init call into the spl_board_init function.
>>>> thanks for this hint, i also tried this. But unfortunately without
>>>> success.
>>>> But it is good to know that this way on your side works.
>>>>
>>>> what i've done to try make it work:
>>>>
>>>> add to my dts:
>>>>       chosen {
>>>>           stdout-path = &uart1;
>>>>       };
>>>>
>>>> &uart1 {
>>>>       u-boot,dm-spl;
>>>>       u-boot,dm-preloc;
>>>>       status = "okay";
>>>> };
>>> Don't you need pins muxing properties in uart1 ( pinctrl-names /
>>> pinctrl-0 ) ?
>>>
>>>> so the device should be present during spl stage and console should be
>>>> set to it.
>>>>
>>>> # Serial drivers
>>>> #
>>>> CONFIG_BAUDRATE=115200
>>>> CONFIG_SERIAL_PRESENT=y
>>>> CONFIG_SPL_SERIAL_PRESENT=y
>>>> CONFIG_DM_SERIAL=y
>>>> CONFIG_SPL_DM_SERIAL=y
>>>> CONFIG_MXC_UART=y
>>>>
>>>> maybe i'm still missing something.
>> Finally converting the tips from Sebastian in addition with converting
>> "CONFIG_SPL_BOARD_INIT" to Kconfig did the trick.
>> Don't know why there is a difference, but doesn't matter since defining such
>> stuff in board-config-header is deprecated.
> imx6ul seems working for me with DM_SERIAL, i.MX6QDL has still not
> getting console.
>
>

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

end of thread, other threads:[~2018-06-18 13:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-07  6:55 [U-Boot] DM-SERIAL-SPL on MX6 Hannes Schmelzer
2018-06-07  7:14 ` Jagan Teki
2018-06-07  7:50   ` Sébastien Szymanski
2018-06-07  8:35     ` Hannes Schmelzer
2018-06-07  9:18       ` Sébastien Szymanski
2018-06-07  9:40         ` Hannes Schmelzer
2018-06-07 11:05         ` Hannes Schmelzer
2018-06-18 12:26           ` Jagan Teki
2018-06-18 13:14             ` Hannes Schmelzer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.