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=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 EE86DC4338F for ; Wed, 11 Aug 2021 08:08:37 +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 E38D060E52 for ; Wed, 11 Aug 2021 08:08:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E38D060E52 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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 46B1C82C30; Wed, 11 Aug 2021 10:08:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="q3r/ntDv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1860D82C55; Wed, 11 Aug 2021 10:08:32 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 46EB582C30 for ; Wed, 11 Aug 2021 10:08:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id D9F8A60E52; Wed, 11 Aug 2021 08:08:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628669306; bh=zvK+tBNn9zroYXJ/ocBOtCon6vjt47PGwnvoOLMkVjY=; h=From:To:Cc:Subject:Date:From; b=q3r/ntDvykR7eiGlYdA8zKdWMVf8AkG/T3txFEsVjp+J6tBGg2MYa5TXmVoIS36NG ANU7ND3ATeH5ibMh/lvcSpTrmHzqgoPdUTEZs+FoZV3WgOEtkFPANYrLgbRYFtC/rL RLMrwOiLzWZxE0jvVLJpz+hWZbYbWW0FmHtOM31FrX35iJ7XLMQJKfMFGpFHOpPdb8 aszxZsUF99JKbsuX8kriTVIffrnXZWZDDNFxzRUIkIDQ98WhTdJXRY7Kx6emmLgi5z yxwRBIuS88afzFPeIIVIvT+jZlxSxAfGeUT0Xi+lIY9eo6uBa7D0chSrIdZyRbSoPZ vY2U/fRaG7z4Q== Received: by pali.im (Postfix) id 767437AE; Wed, 11 Aug 2021 10:08:23 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Stefan Roese Cc: u-boot@lists.denx.de, =?UTF-8?q?Marek=20Beh=C3=BAn?= Subject: [PATCH] arm: mvebu: a38x: Define supported UART baudrates Date: Wed, 11 Aug 2021 10:08:04 +0200 Message-Id: <20210811080804.17770-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Define all standard baudrates plus 3 non-standard high speed: 3125000 4000000 5150000 3125000 matches divisor 5 with 250 MHz TCLK and divisor 4 with 200 MHz TCLK. 4000000 is the rounded value for divisor 4 with 250 MHz TCLK (3906250) and divisor 3 with 200 MHz TCLK (4166666). 5150000 is the rounded value (5208333) for divisor 3 with 250 MHz TCLK. Testing showed that rounded value is more stable then exactly calculated. And it is the highest possible baudrate which is stable on A38x platform. Any other baudrate values above 2500000 are unstable, which is reason why e.g. standard value 3000000 is not defined, and it is needed to use non-standard value 3125000. Tested all defined UART baudrates on Turris Omnia (A38x with 250 MHz TCLK). Signed-off-by: Pali Rohár --- include/configs/mv-common.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h index d61c90a43156..53d7acbb1034 100644 --- a/include/configs/mv-common.h +++ b/include/configs/mv-common.h @@ -39,6 +39,15 @@ #define CONFIG_SYS_NS16550_COM1 MV_UART_CONSOLE_BASE #endif +#if defined(CONFIG_ARMADA_38X) && !defined(CONFIG_SYS_BAUDRATE_TABLE) +#define CONFIG_SYS_BAUDRATE_TABLE { 300, 600, 1200, 1800, 2400, 4800, \ + 9600, 19200, 38400, 57600, 115200, \ + 230400, 460800, 500000, 576000, \ + 921600, 1000000, 1152000, 1500000, \ + 2000000, 2500000, 3125000, 4000000, \ + 5150000 } +#endif + /* auto boot */ /* -- 2.20.1