Converting to DM SERIAL for Kirkwood boards

Stefan Roese sr at denx.de
Fri Dec 9 07:56:42 CET 2022


Hi Tony,

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,
Stefan


More information about the U-Boot mailing list