From patchwork Thu Jan 6 03:08:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 1575927 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=ibr7J9Cw; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JTrtG398Wz9sPC for ; Thu, 6 Jan 2022 14:09:26 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7D56283084; Thu, 6 Jan 2022 04:09:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (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=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ibr7J9Cw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1C70083082; Thu, 6 Jan 2022 04:09:21 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) (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 069EF83084 for ; Thu, 6 Jan 2022 04:09:17 +0100 (CET) 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-pj1-x1033.google.com with SMTP id g11-20020a17090a7d0b00b001b2c12c7273so4260792pjl.0 for ; Wed, 05 Jan 2022 19:09:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6N2bV+MEkwOcHmbLm4L4Xm/t8/AggLCXGXGtqPizKHs=; b=ibr7J9CwJ9rruauM2heeI918EZFAalMKusrw4emM2l29+fWYWr+MljmjNqB7kAoG5j 0FhtCcIjF26OcJ5n1F13d3GBf6N6SuXt6hTAc6l0V/MKnTqgqxEmIpWteONeRBkhxNx6 0eYk4J082FI5I0EKEJXu+wgQmFGEFYk3OJ08O6b4zOiFpafaRLG6kXi+k5tqdDaReuXY TqmURHug6tCySndForr1WCILm8/6pB2am6md81/0lNdV6A/pbllOVE4UQzXU33+l2NSy zjIUfxyDqmilJ+3ztAcc9qRM/J7r6eGmx1MI86rw/9cfRmSMzhyJBSYy2QRKzJDidC+U HBkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6N2bV+MEkwOcHmbLm4L4Xm/t8/AggLCXGXGtqPizKHs=; b=R0EYchVa89DVZlvRUwFLTw8xsVN7zaUnUAjRucrKzS7teboct4++GrYR0AYgmxNbOd 3VNyvg3terp3prSrvvxsXwQVsR349zeXA5rHCUd64O42oMZEP99RrAowKMHTlxXIQyb2 zPnguBUxJHXv2/YxopbsMDeWJsdWCvdV3/+G21gOAD39AmWUcopy/xB4rdHKwnb9Qlsh ZJ8lnyX5iTn1wPWhbYPezHOYUnC9Q4Aj0FoCyC493bEF0ntn5pXKBaqLh1qBQeSl6qfR 1frZ/6aqr9YbD0wo+VOJEa8SrV9frUA8ZXKnDijRp4uKonJ5ZORP0JakCm6TWl7aJhVz DEtw== X-Gm-Message-State: AOAM532F5aWxZbfwgaedBFmUsAM4iLanny6ksZl3mPKgoA6K1tChGvYM 9VvSezGs2SHbn1e/pT0B9uGBvV+H0Qk= X-Google-Smtp-Source: ABdhPJx2ioRgbOQRzEtgnbEh6pmuR15gIjijXRK0VZ+oBQhyX8WdzWCz/DmZgryd96n4ObjNZj39ZA== X-Received: by 2002:a17:903:284:b0:149:cda1:6ff3 with SMTP id j4-20020a170903028400b00149cda16ff3mr6210667plr.28.1641438556146; Wed, 05 Jan 2022 19:09:16 -0800 (PST) Received: from chrisp-dl.atlnz.lc ([2001:df5:b000:22:9214:3000:ca04:aa3c]) by smtp.gmail.com with ESMTPSA id x2sm352235pgo.2.2022.01.05.19.09.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jan 2022 19:09:15 -0800 (PST) From: Chris Packham To: u-boot@lists.denx.de Cc: Chris Packham , Chris Packham , =?utf-8?q?Marek_Beh?= =?utf-8?q?=C3=BAn?= , Stefan Roese , Tom Rini Subject: [PATCH 2/2] ARM: mvebu: x530: Add option for ECC Date: Thu, 6 Jan 2022 16:08:57 +1300 Message-Id: <20220106030857.1410516-2-judge.packham@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220106030857.1410516-1-judge.packham@gmail.com> References: <20220106030857.1410516-1-judge.packham@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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 Some older x530 boards have layout issues that cause problems for DDR. These are usually seen as training failures but can also cause problems after training has completed. Add an option to enable ECC leaving the default as N which will work with both old and new boards. Signed-off-by: Chris Packham Reviewed-by: Stefan Roese --- arch/arm/mach-mvebu/Kconfig | 1 + board/alliedtelesis/x530/Kconfig | 20 ++++++++++++++++++++ board/alliedtelesis/x530/x530.c | 8 +++++++- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 board/alliedtelesis/x530/Kconfig diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index d23cc0c760f1..7388ade98d52 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -341,5 +341,6 @@ config SECURED_MODE_CSK_INDEX source "board/solidrun/clearfog/Kconfig" source "board/kobol/helios4/Kconfig" +source "board/alliedtelesis/x530/Kconfig" endif diff --git a/board/alliedtelesis/x530/Kconfig b/board/alliedtelesis/x530/Kconfig new file mode 100644 index 000000000000..5c1ae36aebaa --- /dev/null +++ b/board/alliedtelesis/x530/Kconfig @@ -0,0 +1,20 @@ +menu "x530 configuration" + depends on TARGET_X530 + +config X530_ECC + bool "Enable DDR3 ECC" + help + Some of the older x530 board have layout issues which cause problems + for the DDR which usually exhibit as DDR training failures or + problems accessing DDR after training. + + The known affected boards are: + + * 844-001897-00 (x530-28GTXm, x530-28GPXm, GS980MX/28PSm) + * 844-001948-00 (GS980MX/28) + * 844-002008-00 (x530L-52GTX, x530L-52GPX) + * 844-001974-00 (x530-52GTXm, x530-52GPXm, GS980MX/52PSm) + + If you have a newer board you can set Y here, otherwise say N. + +endmenu diff --git a/board/alliedtelesis/x530/x530.c b/board/alliedtelesis/x530/x530.c index 866b6e68cc16..de20684f4353 100644 --- a/board/alliedtelesis/x530/x530.c +++ b/board/alliedtelesis/x530/x530.c @@ -45,6 +45,12 @@ int hws_board_topology_load(struct serdes_map **serdes_map_array, u8 *count) return 0; } +#if CONFIG_IS_ENABLED(X530_ECC) + #define BUS_MASK BUS_MASK_32BIT_ECC +#else + #define BUS_MASK BUS_MASK_32BIT +#endif + /* * Define the DDR layout / topology here in the board file. This will * be used by the DDR3 init code in the SPL U-Boot version to configure @@ -66,7 +72,7 @@ static struct mv_ddr_topology_map board_topology_map = { 0, 0, /* cas_l cas_wl */ MV_DDR_TEMP_LOW, /* temperature */ MV_DDR_TIM_2T} }, /* timing */ - BUS_MASK_32BIT_ECC, /* subphys mask */ + BUS_MASK, /* subphys mask */ MV_DDR_CFG_DEFAULT, /* ddr configuration data source */ NOT_COMBINED, /* ddr twin-die combined */ { {0} }, /* raw spd data */