From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E295C432BE for ; Fri, 27 Aug 2021 11:00:24 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C86DC60FDA for ; Fri, 27 Aug 2021 11:00:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C86DC60FDA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2C33F8329C; Fri, 27 Aug 2021 13:00:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Jd3RiRNP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9571C832A0; Fri, 27 Aug 2021 13:00:17 +0200 (CEST) Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 305E983298 for ; Fri, 27 Aug 2021 13:00:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=judge.packham@gmail.com Received: by mail-io1-xd2c.google.com with SMTP id b10so7911032ioq.9 for ; Fri, 27 Aug 2021 04:00:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VMsYGCeCGmlTTxRpuQ/0GSIDwXWEwM+algkGMw/WIEw=; b=Jd3RiRNPPRNaNtSwPyq0zh4sVlguZXGMHWVyMXJefoeP2YFjxcSrAJTc4udAtZYPW5 IYbfmx+3jYb72msR5uAKFRU9+Dt9HZd3L3rr2+vTSuiFYQ13hSo9gKXrMWyrMG/vPB0j rb4F6Io55X0dsK12QTx0K9L5qMLb2ZWfdrXFEN3xJjP4tp8YXcS58if+XaevZnIVWPkH zD16SdFcaMUzK/plmaVKVIBAEO8loGDaPaBzvBMEkXUxu7p3Y3dnyT3W8uNg/HYlsS8O adNKqYoovgs9hnSlBz6zGHvr1zEgEZN04P5TpwlUwcdjzrlfFFXEj48BqTARRprD7New 4jpw== 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; bh=VMsYGCeCGmlTTxRpuQ/0GSIDwXWEwM+algkGMw/WIEw=; b=MJMy75EK3aFqLVfT2cZ7HCEARffX+rrMqGM6MXoCJq1enHOqndNyGjXkwrjfFncKoB fE1ldz08XZtxjCvmStEXUOJ+CNw/MsmUUDTO8fB7o1Yhv8f4EsuUfo1YNcRDU6OP8WEl ZAm/6vmoQaDb9FpcZYES0EqmWxHdmRmO1W0G2zaX55UgHTxHp9yLowPUPLTna5OBwlcv jFzzx2WTJwpwFoHVLICPQ4gI5p659uQG5l9ofIu5EFL/g1QdQAlqvdhoZXFNkEDEweyW VD3SSjbSXAawAhXVbZUmuCOd7IhgoepGcaOrjzeNB+i3xsb2sZH29xcarj7DFBgXYZYR iSig== X-Gm-Message-State: AOAM530FUkLx9MhprVQhxIgWPRYUlxUvpCuyJlshfoJTD+WAnYjHVZG7 e8XTUE6bRmqhFGbsM+WeSrhtdFwJdFHD2zIBtYI= X-Google-Smtp-Source: ABdhPJwtdoc2ddvDAm6zQfh1OKkMGF4X+DxBrjajVFfPGFoOFsqBBrF69pIOh0iKOKau27hxXhjAvYbFMNp+rd3CgKs= X-Received: by 2002:a02:c8cc:: with SMTP id q12mr7616524jao.93.1630062006565; Fri, 27 Aug 2021 04:00:06 -0700 (PDT) MIME-Version: 1.0 References: <20210825134634.3959-1-marek.behun@nic.cz> <20210827033912.74fd4d05@thinkpad> <20210827083213.rl674u2bz7mcl2k5@pali> In-Reply-To: <20210827083213.rl674u2bz7mcl2k5@pali> From: Chris Packham Date: Fri, 27 Aug 2021 22:59:55 +1200 Message-ID: Subject: Re: [PATCH u-boot-marvell 00/29] kwboot higher baudrate To: =?UTF-8?Q?Pali_Roh=C3=A1r?= Cc: =?UTF-8?B?TWFyZWsgQmVow7pu?= , Stefan Roese , u-boot , Baruch Siach , Dennis Gilmore , Mario Six , Jon Nettleton Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Fri, 27 Aug 2021, 8:32 PM Pali Roh=C3=A1r, wrote: > On Friday 27 August 2021 14:45:07 Chris Packham wrote: > > On Fri, Aug 27, 2021 at 1:39 PM Marek Beh=C3=BAn w= rote: > > > > > > On Fri, 27 Aug 2021 13:16:25 +1200 > > > Chris Packham wrote: > > > > > > > On Thu, Aug 26, 2021 at 1:46 AM Marek Beh=C3=BAn > wrote: > > > > > > > > > > Hello Stefan and others, > > > > > > > > > > this series adds support for booting Marvell platforms via UART > (those > > > > > bootable with kwboot) at higher baudrates. > > > > > > > > > > Tested on Turris Omnia up to 5.15 MBd, which is 44x faster than > > > > > 115200 Bd. > > > > > > > > > > The user can direct kwboot to use higher baudrate via the -B > option. > > > > > (BTW this option was there before but did not work with the -b > option.) > > > > > > > > > > Only the payload part of the KWB image is uploaded at this higher > > > > > baudrate. The header part is still uploaded at 115200 Bd, since > the code > > > > > that changes baudrate is injected into header as a binary > extension. > > > > > (The payload part makes up majority of the binary, though. On > Turris > > > > > Omnia the payload currently makes ~87%.) > > > > > > > > > > The series also contains various other fixes, refactors and > improvements > > > > > of the code, upon which the main change is done. > > > > > > > > > > Marek & Pali > > > > > > > > What tree/sha is this series based on. I've tried to apply them out > of > > > > patchwork and it fails at "tools: kwbimage: Simplify iteration over > > > > version 1 optional headers" > > > > > > Applies to master and to u-boot-marvell, but you need the 6 > > > additional patches for kwbimage/kwboot that are on patchwork > > > but not yet applied to u-boot-marvell: > > > https://patchwork.ozlabs.org/project/uboot/list/?series=3D257577 > > > > https://patchwork.ozlabs.org/project/uboot/patch/20210817050320.11983-1-x= ypron.glpk@gmx.de/ > > > > https://patchwork.ozlabs.org/project/uboot/patch/20210817051158.13283-1-x= ypron.glpk@gmx.de/ > > > > > > Also some more fixes were yet needed, which I will sent in v2. > > > > > > To make it simpler for you I pushed v2 into > > > https://gitlab.nic.cz/turris/turris-omnia-uboot > > > branch > > > kwboot-baudrate-improvements > > > > > > > Thanks. I took it for a spin on the x530. In terms of regression > > testing the default behaviour is good. > > > > The higher speed settings weren't so good. I started with 3125000 and > > that doesn't get onto the 2nd part of the download, same for 1152000 > > and 4000000 (I stopped trying higher speeds at that point). Using > > 230400 and 460800 it does make it through the 2nd part of the download > > but when I go back on to the console it appears to be unresponsive. > > > > All of this could be down to the serial hardware in my system (the > > x530 uses a real RS232 interface not a TTL) and I have had problems > > with the MosChip USB-Serial adapter in my test PC in the past. I > > wouldn't reject this series based on me not being able to get it > > working, the important thing for me is the default behaviour at the > > standard baudrate which is good. > > You need to choose speed which is supported by both armada board and > your computer. Armada boards support speeds calculated by formula: > speed =3D TCLK / ( 16 * d ) > where d is 16-bit integer number. So for A385 board with 250 MHz TCLK > you can set speeds from above formula +/- 30%. Tested were: > 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, > 230400, 460800, 500000, 576000, 921600, 1000000, 1152000, 1500000, > 2000000, 2500000, 3125000, 4000000, 5150000. > If you have a board with different TCLK you obviously need to use > different baudrates. > > But it is possible that your computer does not support these speeds. > E.g. more chinese USB TTL adapters have base clock 3 MHz and so they > could not support 3150000 or 2500000 speeds. > > > One usability thing I'd like to see is retaining support for -t (I use > > that quite a lot when recovering a system). Ideally we'd still be able > > to drop into the console at 115200 once the download is complete. > > -t is fully supported, I'm using -t with -B 5150000 and it is working > fine. After successful download, speed on both A38x and host computer is > changed back to the value 115200. > Ah I misread the man page update >