From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.yoctoproject.org (mail.yoctoproject.org [198.145.29.25]) by mx.groups.io with SMTP id smtpd.web09.4449.1617785705357956823 for ; Wed, 07 Apr 2021 01:55:05 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@blade-group.com header.s=google header.b=oCmgglaZ; spf=softfail (domain: blade-group.com, ip: 198.145.29.25, mailfrom: yann.dirson@blade-group.com) Received: from mail-vs1-f54.google.com (mail-vs1-f54.google.com [209.85.217.54]) by mail.yoctoproject.org (Postfix) with ESMTPS id 2B0AD38C04F7 for ; Wed, 7 Apr 2021 08:55:04 +0000 (UTC) Received: by mail-vs1-f54.google.com with SMTP id d65so5164049vsd.6 for ; Wed, 07 Apr 2021 01:55:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blade-group.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=0cgMM1dvSbjWk5hC7f4/15Rig4eP2/kI1Kr5Wy/xR+k=; b=oCmgglaZwCFL5KW6u4NEn+ypnYTLF1JU4NOrnBY4p35YBOTnrjp+X4k9OA9DX9vLCs oJS2r+PgJgCgQkhUDvMLVfFomJPNn4cMA8OwquEDgmmBFz7qXUZJd3HfAwWhGxAttW7T 83rxsWVrHqMysx12oyXD9A4o2DXs7tw8Z+7/VSOSKFpoyEiZv3I3huk6fOajcrVSXph9 w9ZVRiv+mNL2TN9fQOJX5wgHEHQK8GEI6RMDNMM8btVTzwqTN1pBrWc7UacSRZJAq/xh 4Ul/nxhDiyKRuhaAm0YopzkDkGWjcLi1H/sbGDmOALWKCmFcemBadDfKnCMXBWFfw+5N G+FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=0cgMM1dvSbjWk5hC7f4/15Rig4eP2/kI1Kr5Wy/xR+k=; b=YRDfLoB69l1wVg1UuqqudMfp7UedUtKd1W+4OHEoTpbotVXRYOA1+S6OYHEwngwi7o QhVlsRfGNzKEb+qnjKGRWNxJetOlsezm0fReWcadN+mwaQIqOZBjvYqJFkuCjyiBxDmU LTFDe/8HxgJwchq4GhszAmRRpa3zKcbsw3SJ6HQrj0swmYtHPL4vwU9bcx+f3jS8akb/ pmKxtHwk+iD8sdswkuBvWIaaICfN42/d1cnbvt4ShlcbVLpUWZdyxZDyES8BdxRSvYVj Wx0+gBjO8VsXeQ3nuvTBgo0t6pA6/WLAMuzhVDXDbQTAg+7n5AgM/h3zlfjvA3gyAiYI Gm1Q== X-Gm-Message-State: AOAM531nYqkW7DVf9df3QR4OSZofSMR079atImyS9ZN+LCgYXYQupdpv kPVbHNMVxI5TIn2Bs7atNG59hgaqu2XxXBvKwjkjAA== X-Google-Smtp-Source: ABdhPJzanj6FyjxihntefPsnUspldajg5Nc9xPdWOZ2yYGKE4IoIIWq7HBm0vkQyWlcn/sb7WsUPxJ4wPcW8tdt8X5U= X-Received: by 2002:a67:ebc7:: with SMTP id y7mr1148154vso.41.1617785702958; Wed, 07 Apr 2021 01:55:02 -0700 (PDT) MIME-Version: 1.0 References: <20210406234700.2493404-1-yann@blade-group.com> In-Reply-To: From: "Yann Dirson" Date: Wed, 7 Apr 2021 10:54:52 +0200 Message-ID: Subject: Re: [yocto] [meta-rockchip][PATCH] trusted-firmware-a: use 1500000 baud for serial console To: Zoran Stojsavljevic Cc: Yocto Project , Trevor Woerner , Yann Dirson Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Le mer. 7 avr. 2021 =C3=A0 06:07, Zoran Stojsavljevic a =C3=A9crit : > > > +-#define RK3399_BAUDRATE 115200 > > ++#define RK3399_BAUDRATE 1500000 > > + #define RK3399_UART_CLOCK 24000000 > > Interesting... For years (a few decades) everybody has used 115200 as > the standard setup for UART, as global definition. Sure it is awkward when all tools have come to default to 115200, but then is the situation so different form when we transitionned from, say, 9600 ? > Why suddenly somebody changed the UART baud rate to be non-standard? > From the speed point of view??? > > Don't think so. Hopefully someone from Rockchip will answer :) > Should U-Boot be adjusted to the standard baud rate of 115200 for RK3399= ? When working on this platform everyone now has his tools setup for 1500000= , because that's the vendor BSP settings. Would we have good technical reas= ons to switch back ? > > My two cent addendum/thinking, > Zee > _______ > > > On Wed, Apr 7, 2021 at 1:47 AM Yann Dirson = wrote: > > > > From: Yann Dirson > > > > TF-A runs between two u-boot stages which both uses 1500000 baud, it > > just makes no sense to use the same UART at a different rate. > > > > Here is a sample session with the successive stages, with TF-A artific= ially > > separated for emphasis: > > > > [20210406-175438.135934] U-Boot TPL 2021.01 (Jan 11 2021 - 18:11:43) > > [20210406-175438.135956] Channel 0: DDR3, 933MHz > > [20210406-175438.236974] BW=3D32 Col=3D10 Bk=3D8 CS0 Row=3D15 CS=3D1 = Die BW=3D16 Size=3D1024MB > > [20210406-175438.237000] Channel 1: DDR3, 933MHz > > [20210406-175438.237004] BW=3D32 Col=3D10 Bk=3D8 CS0 Row=3D15 CS=3D1 = Die BW=3D16 Size=3D1024MB > > [20210406-175438.237008] 256B stride > > [20210406-175438.237012] Trying to boot from BOOTROM > > [20210406-175438.237015] Returning to boot ROM... > > [20210406-175438.237018] > > [20210406-175438.573394] U-Boot SPL 2021.01 (Jan 11 2021 - 18:11:43 += 0000) > > [20210406-175438.573431] Trying to boot from MMC1 > > > > [20210406-175438.589254] NOTICE: BL31: v2.3():v2.3-dirty > > [20210406-175440.534055] NOTICE: BL31: Built : 15:56:43, Apr 20 2020 > > > > [20210406-175441.393423] U-Boot 2021.01 (Jan 11 2021 - 18:11:43 +0000= ) > > [20210406-175441.393429] > > [20210406-175441.393433] SoC: Rockchip rk3399 > > > > Signed-off-by: Yann Dirson > > --- > > .../files/serial-console-baudrate.patch | 35 ++++++++++++++++++= + > > .../trusted-firmware-a_%.bbappend | 5 +++ > > 2 files changed, 40 insertions(+) > > create mode 100644 recipes-bsp/trusted-firmware-a/files/serial-consol= e-baudrate.patch > > > > diff --git a/recipes-bsp/trusted-firmware-a/files/serial-console-baudr= ate.patch b/recipes-bsp/trusted-firmware-a/files/serial-console-baudrate.pa= tch > > new file mode 100644 > > index 0000000..10b5a2b > > --- /dev/null > > +++ b/recipes-bsp/trusted-firmware-a/files/serial-console-baudrate.pat= ch > > @@ -0,0 +1,35 @@ > > +From 840d6b6420e1fd8cdf6e4de7fa58a6f8de151622 Mon Sep 17 00:00:00 200= 1 > > +From: Yann Dirson > > +Date: Tue, 6 Apr 2021 17:28:45 +0200 > > +Subject: [PATCH] Set serial console baudrate back to 1500000. > > + > > +TF-A runs between two u-boot stages which both uses 1500000 baud, it > > +just makes no sense to use the same UART at a different rate. > > + > > +This effectively reverts part of 0c05748bdebfad9fa43a80962186438bb8fb= ce62. > > +Main reason for that change stated in https://developer.trustedfirmwa= re.org/T762 > > +is ChromeOS compatibility. > > + > > +Looks like this patch may become unnecessary in the future, when > > +u-boot and TF-A get to communicate this value. > > + > > +--- > > + plat/rockchip/rk3399/rk3399_def.h | 2 +- > > + 1 file changed, 1 insertion(+), 1 deletion(-) > > + > > +diff --git a/plat/rockchip/rk3399/rk3399_def.h b/plat/rockchip/rk3399= /rk3399_def.h > > +index ba83242eb..8d6ecfbe6 100644 > > +--- a/plat/rockchip/rk3399/rk3399_def.h > > ++++ b/plat/rockchip/rk3399/rk3399_def.h > > +@@ -17,7 +17,7 @@ > > + /*******************************************************************= ******* > > + * UART related constants > > + *******************************************************************= *******/ > > +-#define RK3399_BAUDRATE 115200 > > ++#define RK3399_BAUDRATE 1500000 > > + #define RK3399_UART_CLOCK 24000000 > > + > > + /*******************************************************************= *********** > > +-- > > +2.30.2 > > + > > diff --git a/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbapp= end b/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend > > index 442dee8..1942c17 100644 > > --- a/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend > > +++ b/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend > > @@ -4,3 +4,8 @@ DEPENDS_append_rk3399 =3D " virtual/arm-none-eabi-gcc-= native" > > > > COMPATIBLE_MACHINE_append_rk3399 =3D "|rk3399" > > COMPATIBLE_MACHINE_append_rk3328 =3D "|rk3328" > > + > > +FILESEXTRAPATHS_prepend :=3D "${THISDIR}/files:" > > +SRC_URI +=3D "\ > > + file://serial-console-baudrate.patch \ > > +" > > -- > > 2.30.2 > > > > > >=20 > > --=20 Yann Dirson Blade / Shadow -- http://shadow.tech