U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: Tony Dinh <mibodhi@gmail.com>, Michael Walle <michael@walle.cc>
Cc: pali@kernel.org, sjg@chromium.org, u-boot@lists.denx.de
Subject: Re: Converting to DM SERIAL for Kirkwood boards
Date: Fri, 16 Dec 2022 07:29:47 +0100	[thread overview]
Message-ID: <28c1f199-2a04-48c2-da06-b83c9b2fb2cb@denx.de> (raw)
In-Reply-To: <CAJaLiFwHCUcfUCXPuyzKa7X6GpHhpJjqBhkmwyc4tq48vzt0oA@mail.gmail.com>

Hi Tony,

On 12/16/22 03:42, Tony Dinh wrote:
> Hi all,
> 
> On Mon, Dec 12, 2022 at 5:18 PM Tony Dinh <mibodhi@gmail.com> wrote:
>>
>> Hi Michael,
>>
>> On Mon, Dec 12, 2022 at 1:03 AM Michael Walle <michael@walle.cc> wrote:
>>>
>>>>> On 12/9/22 04:55, Tony Dinh wrote:
>>>>>> Hi Simon et al,
>>>>>>
>>>>>> (Resend to include u-boot mailing list)
>>>>>>
>>>>>> I'm in the process of converting Kirkwood boards to use DM SERIAL. I
>>>>>> could not seem to get it to work, having tried adding
>>>>>> CONFIG_DM_SERIAL, and also playing with various  related CONFIG
>>>>>> options  (CONFIG_SPECIFY_CONSOLE_INDEX and CONFIG_CONS_INDEX ). From
>>>>>> my reading various board configurations that were already converted to
>>>>>> DM_SERIAL, I'm under the impression that just turning on
>>>>>> CONFIG_DM_SERIAL would work without any other addition.
>>>>>>
>>>>>> The board I'm testing is Zyxel NSA310S Kirkwood 6702 (6192) SoC.
>>>>>>
>>>>>> diff --git a/configs/nsa310s_defconfig b/configs/nsa310s_defconfig
>>>>>> index afa0cad041..e81d1495bd 100644
>>>>>> --- a/configs/nsa310s_defconfig
>>>>>> +++ b/configs/nsa310s_defconfig
>>>>>> @@ -41,7 +41,6 @@ CONFIG_ENV_OVERWRITE=y
>>>>>>    CONFIG_ENV_IS_IN_NAND=y
>>>>>>    CONFIG_SYS_RELOC_GD_ENV_ADDR=y
>>>>>>    CONFIG_NET_RANDOM_ETHADDR=y
>>>>>> -CONFIG_NETCONSOLE=y
>>>>>>    CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
>>>>>>    CONFIG_SATA_MV=y
>>>>>>    CONFIG_SYS_SATA_MAX_DEVICE=1
>>>>>> @@ -53,6 +52,7 @@ CONFIG_MTD_RAW_NAND=y
>>>>>>    CONFIG_PHY_MARVELL=y
>>>>>>    CONFIG_MVGBE=y
>>>>>>    CONFIG_MII=y
>>>>>> +CONFIG_DM_SERIAL=y
>>>>>>    CONFIG_SYS_NS16550=y
>>>>>>    CONFIG_USB=y
>>>>>>    CONFIG_USB_EHCI_HCD=y
>>>>>>
>>>>>> I also added kirkwood-nsa310s-u-boot.dtsi to help in running kwboot.
>>>>>>
>>>>>> &uart0 {
>>>>>> u-boot,dm-pre-reloc;
>>>>>> };
>>>>>>
>>>>>> I've tried kwboot the new u-boot image, and also flashed this image to
>>>>>> NAND, and in both cases, I got a silent serial console. It seems to
>>>>>> hang up right off the bat. Hope you can help by giving me some
>>>>>> pointers on how to debug this.
>>>>>
>>>>> Might be that the alias is missing and / or that the uart DT node is
>>>>> not enabled. Please give this test-only patch a try:
>>>>>
>>>>> diff --git a/arch/arm/dts/kirkwood-nsa310s.dts
>>>>> b/arch/arm/dts/kirkwood-nsa310s.dts
>>>>> index 09ee76c2a2e0..ca7a49af9ba4 100644
>>>>> --- a/arch/arm/dts/kirkwood-nsa310s.dts
>>>>> +++ b/arch/arm/dts/kirkwood-nsa310s.dts
>>>>> @@ -17,6 +17,10 @@
>>>>>           model = "Zyxel NSA310S";
>>>>>           compatible = "zyxel,nsa320s", "marvell,kirkwood-88f6702",
>>>>> "marvell,kirkwood";
>>>>>
>>>>> +       aliases {
>>>>> +               serial0 = &uart0;
>>>>> +       };
>>>>> +
>>>>>           memory {
>>>>>                   device_type = "memory";
>>>>>                   reg = <0x00000000 0x10000000>;
>>>>> @@ -317,3 +321,8 @@
>>>>>    &pcie0 {
>>>>>           status = "okay";
>>>>>    };
>>>>> +
>>>>> +&uart0 {
>>>>> +       status = "okay";
>>>>> +       u-boot,dm-pre-reloc;
>>>>> +};
>>>>
>>>> Thanks for the patch! but the behavior is still the same (silent
>>>> serial console and hung the board).
>>>>
>>>> Thanks,
>>>> Tony
>>>
>>> Maybe this will help:
>>> https://lore.kernel.org/u-boot/20220817193809.1059688-20-michael@walle.cc/
>>>
>>> The lsxl is also a kirkwood based board.
>>>
>>
>> Thanks! indeed that was the malloc problem. This NSA310S board is now
>> working with DM_SERIAL.
>>
>> I will test a few more Kirkwood boards and keep everybody posted.
> 
> Closing the loop on this DM_SERIAL conversion for Kirkwood.
> 
> I've tested DM_SERIAL with Michael's malloc patches on a few other
> Kirkwood boards. They're all working fine with u-boot-2023.01-rc3.

Good to know. I assume that you will post some patches for these
Kirkwood board soon? Or even better, making the necessary changes
for Kirkwood in general in Kconfig (if possible).

Thanks,
Stefan

> NSA310s
> Dreamplug
> Sheevaplug
> GFHome
> Dockstar
> iConnect
> Pogo E02
> Pogo V4 (tested with u-boot-2022.10, since Pogo V4 itself was broken
> in u-boot-2023.01-rc3 for unknown reason).
> 
> All the best,
> Tony

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de

  reply	other threads:[~2022-12-16  6:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAJaLiFxnRPEPv83wasDBeuxzV2o39qF=hvSQvkft14irmH=L9A@mail.gmail.com>
2022-12-09  3:55 ` Converting to DM SERIAL for Kirkwood boards Tony Dinh
2022-12-09  6:56   ` Stefan Roese
2022-12-09 20:45     ` Tony Dinh
2022-12-12  9:03       ` Michael Walle
2022-12-13  1:18         ` Tony Dinh
2022-12-16  2:42           ` Tony Dinh
2022-12-16  6:29             ` Stefan Roese [this message]
2022-12-23  6:34               ` Tony Dinh
2022-12-16  7:56             ` Pali Rohár
2022-12-16 21:49               ` Tony Dinh
2022-12-19  0:17                 ` Tony Dinh
2022-12-19  6:17                   ` Stefan Roese
2022-12-19  7:29                     ` Stefan Roese
2022-12-19 21:22                       ` Tony Dinh
2022-12-20  0:06                         ` Tony Dinh
2022-12-20  1:36                           ` Tony Dinh
2022-12-20  6:20                             ` Stefan Roese
2022-12-20  8:07                               ` Pali Rohár
2022-12-21  9:29                                 ` Stefan Roese
2022-12-21 21:35                                   ` Tony Dinh
2022-12-20  6:10                         ` Stefan Roese

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=28c1f199-2a04-48c2-da06-b83c9b2fb2cb@denx.de \
    --to=sr@denx.de \
    --cc=mibodhi@gmail.com \
    --cc=michael@walle.cc \
    --cc=pali@kernel.org \
    --cc=sjg@chromium.org \
    --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