From patchwork Tue Feb 13 01:51:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zev Weiss X-Patchwork-Id: 13554394 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 930AFC4829D for ; Tue, 13 Feb 2024 01:52:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=2KyEf/a78Q4FI5EP3WJkXg63eeUE9+6TBCikKGqZ/EA=; b=OBvDDyKcfzaitn WqaE2AnsxRFghLXvsX86Yj+G5XiEenQEwdxuq/oGyXt2y2nqFXl5VIW2rHMVtbNbfqGT/BjeNVXjg AIrUr/0HXn1kvIkka008QiJLmMqjIfsaco9boJbnQyvZEMmjrCeC0TyC82n1JYus1SRi2CERiOB0W YeWSSfLIA+OxJdwn8T6Doeh061W7ZzjWxPcCxDSayjtLcfdnwk7W6WtjYEHCGi6LQ5d3EsTCLJbPK Jf2G+3BQRoGVZc9Iqysde/JqpR1+JmlyyKL4jcdKJp1Nycb/oqKXr+O5AHpnEtM1oMPQFGpq4v5Md 7APRk7HwGvFeXF6A9tFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZhxp-00000007jOC-32NS; Tue, 13 Feb 2024 01:52:01 +0000 Received: from thorn.bewilderbeest.net ([2605:2700:0:5::4713:9cab]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZhxn-00000007jMs-0WzV for linux-arm-kernel@lists.infradead.org; Tue, 13 Feb 2024 01:52:00 +0000 Received: from hatter.bewilderbeest.net (unknown [IPv6:2602:61:712b:6300::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: zev) by thorn.bewilderbeest.net (Postfix) with ESMTPSA id 07BABA15; Mon, 12 Feb 2024 17:51:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bewilderbeest.net; s=thorn; t=1707789115; bh=EU+GYVFoVSrVPFH+I5Rq0CxlWwOPwFjuP4K4HYrpXM4=; h=From:To:Cc:Subject:Date:From; b=cm+vuK/fGnBwBPyf2B1dtsj6Fmbr2traTegxGV8HfYLApU+8uRoVk+CP30oURWfcS LPkpSr8LYDvy8geca9x+pCT47R8ELbeZVUASM2AktntmXpnVDJ1fyg9McwLcVPw7US TavtV6qXQn+rSnvkc32hJBHfDlsT7lnRJXRNgE/4= From: Zev Weiss To: Joel Stanley , Andrew Jeffery , linux-aspeed@lists.ozlabs.org Cc: Zev Weiss , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org Subject: [PATCH] ARM: dts: aspeed: asrock: Add BIOS SPI flash chips Date: Mon, 12 Feb 2024 17:51:36 -0800 Message-ID: <20240213015138.12452-2-zev@bewilderbeest.net> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240212_175159_207051_9711CB50 X-CRM114-Status: GOOD ( 13.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On e3c246d4i, e3c256d4i, romed8hm3, and spc621d8hm3 the host firmware flash is accessible to the BMC via the AST2500 SPI1 interface with an external GPIO-controlled mux switching the flash chip between the host and the BMC. The default state of the mux GPIO leaves it connected to the host, so the BMC's attempt to bind a driver to it during its boot sequence will fail, but a write to a sysfs 'bind' file after toggling the mux GPIO (along with whatever other preparatory steps are required) can later allow it to be attached and accessed by the BMC. It's not an ideal arrangement, but in the absence of DT overlays or any other alternative it is at least a functional one, if somewhat clumsily so. Signed-off-by: Zev Weiss --- Note that this patch is based on Joel's for-next tree, since the e3c256d4i and spc621d8hm3 device-trees haven't been merged in mainline yet. .../boot/dts/aspeed/aspeed-bmc-asrock-e3c246d4i.dts | 12 ++++++++++++ .../boot/dts/aspeed/aspeed-bmc-asrock-e3c256d4i.dts | 12 ++++++++++++ .../boot/dts/aspeed/aspeed-bmc-asrock-romed8hm3.dts | 12 ++++++++++++ .../dts/aspeed/aspeed-bmc-asrock-spc621d8hm3.dts | 12 ++++++++++++ 4 files changed, 48 insertions(+) diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-e3c246d4i.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-e3c246d4i.dts index c4b2efbfdf56..557ce20e305d 100644 --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-e3c246d4i.dts +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-e3c246d4i.dts @@ -68,6 +68,18 @@ flash@0 { }; }; +&spi1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_spi1_default>; + flash@0 { + status = "okay"; + label = "bios"; + m25p,fast-read; + spi-max-frequency = <25000000>; /* 25 MHz */ + }; +}; + &uart5 { status = "okay"; }; diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-e3c256d4i.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-e3c256d4i.dts index 263fcc8106ff..bf752ff8204f 100644 --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-e3c256d4i.dts +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-e3c256d4i.dts @@ -69,6 +69,18 @@ flash@0 { }; }; +&spi1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_spi1_default>; + flash@0 { + status = "okay"; + label = "bios"; + m25p,fast-read; + spi-max-frequency = <25000000>; /* 25 MHz */ + }; +}; + &uart1 { status = "okay"; }; diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-romed8hm3.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-romed8hm3.dts index 4554abf0c7cd..8dff2cbf042b 100644 --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-romed8hm3.dts +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-romed8hm3.dts @@ -56,6 +56,18 @@ flash@0 { }; }; +&spi1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_spi1_default>; + flash@0 { + status = "okay"; + label = "bios"; + m25p,fast-read; + spi-max-frequency = <33000000>; /* 33 MHz */ + }; +}; + &uart5 { status = "okay"; }; diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-spc621d8hm3.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-spc621d8hm3.dts index 555485871e7a..54b40776c7e3 100644 --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-spc621d8hm3.dts +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-spc621d8hm3.dts @@ -66,6 +66,18 @@ flash@0 { }; }; +&spi1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_spi1_default>; + flash@0 { + status = "okay"; + label = "bios"; + m25p,fast-read; + spi-max-frequency = <17000000>; /* 17 MHz */ + }; +}; + &uart5 { status = "okay"; };