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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 3DDA0C43334 for ; Fri, 1 Jul 2022 09:42:33 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E9D9A84433; Fri, 1 Jul 2022 11:42:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=kaod.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id A083384433; Fri, 1 Jul 2022 11:42:29 +0200 (CEST) Received: from 7.mo548.mail-out.ovh.net (7.mo548.mail-out.ovh.net [46.105.33.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 62B2684440 for ; Fri, 1 Jul 2022 11:42:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=kaod.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=clg@kaod.org Received: from mxplan5.mail.ovh.net (unknown [10.109.138.238]) by mo548.mail-out.ovh.net (Postfix) with ESMTPS id 8ED012109D; Fri, 1 Jul 2022 09:42:25 +0000 (UTC) Received: from kaod.org (37.59.142.106) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.9; Fri, 1 Jul 2022 11:42:24 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-106R006d6310b0f-2d18-4292-9991-b0e30eb100cf, 4AFA7A5FE9B5479AF1021A557A7101AB3AA64E21) smtp.auth=clg@kaod.org X-OVh-ClientIp: 82.64.250.170 Message-ID: <7568cb37-5189-3057-a575-563affdbd20d@kaod.org> Date: Fri, 1 Jul 2022 11:42:24 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [v4 06/12] arm: dts: aspeed: Update SPI flash node settings Content-Language: en-US To: Chin-Ting Kuo , , , , , , , , , , Joel Stanley References: <20220524055650.1115899-1-chin-ting_kuo@aspeedtech.com> <20220524055650.1115899-7-chin-ting_kuo@aspeedtech.com> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= In-Reply-To: <20220524055650.1115899-7-chin-ting_kuo@aspeedtech.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [37.59.142.106] X-ClientProxiedBy: DAG1EX1.mxp5.local (172.16.2.1) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: 9e1d7ea6-bcd3-4e62-8509-4886dc0000c4 X-Ovh-Tracer-Id: 13943425921364102133 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrudehfedgvddtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfhisehtjeertddtfeejnecuhfhrohhmpeevrogurhhitggpnfgvpgfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhephffhleegueektdetffdvffeuieeugfekkeelheelteeftdfgtefffeehueegleehnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrddutdeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhnsggprhgtphhtthhopedupdhrtghpthhtohepjhhovghlsehjmhhsrdhiugdrrghupdfovfetjfhoshhtpehmohehgeek X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean On 5/24/22 07:56, Chin-Ting Kuo wrote: > For both AST2500 and AST2600, there are three > SPI controllers, FMC(Firmware Memory Controller), > SPI1 and SPI2. The clock source is HCLK. Following > is the basic information for ASPEED SPI controller. > > AST2500: > - FMC: > CS number: 3 > controller reg: 0x1e620000 - 0x1e62ffff > decoded address: 0x20000000 - 0x2fffffff > > - SPI1: > CS number: 2 > controller reg: 0x1e630000 - 0x1e630fff > decoded address: 0x30000000 - 0x37ffffff > > - SPI2: > CS number: 2 > controller reg: 0x1e631000 - 0x1e631fff > decoded address: 0x38000000 - 0x3fffffff > > AST2600: > - FMC: > CS number: 3 > controller reg: 0x1e620000 - 0x1e62ffff > decoded address: 0x20000000 - 0x2fffffff > > - SPI1: > CS number: 2 > controller reg: 0x1e630000 - 0x1e630fff > decoded address: 0x30000000 - 0x3fffffff > > - SPI2: > CS number: 3 > controller reg: 0x1e631000 - 0x1e631fff > decoded address: 0x50000000 - 0x5fffffff > > Signed-off-by: Chin-Ting Kuo I might be wrong for the comment I did on 'num-cs' in the patch adding the driver. Joel, what's your opinion ? Hard coded in the driver or a property in the DT ? Thanks, C. > --- > arch/arm/dts/ast2500-evb.dts | 33 +++++++++++++++++++++++++++++++++ > arch/arm/dts/ast2500.dtsi | 23 ++++++++++++++++------- > arch/arm/dts/ast2600-evb.dts | 8 -------- > arch/arm/dts/ast2600.dtsi | 34 +++++++++++++++++++--------------- > 4 files changed, 68 insertions(+), 30 deletions(-) > > diff --git a/arch/arm/dts/ast2500-evb.dts b/arch/arm/dts/ast2500-evb.dts > index 4796ed445f..c6b7675902 100644 > --- a/arch/arm/dts/ast2500-evb.dts > +++ b/arch/arm/dts/ast2500-evb.dts > @@ -73,3 +73,36 @@ > pinctrl-names = "default"; > pinctrl-0 = <&pinctrl_sd2_default>; > }; > + > +&fmc { > + status = "okay"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_fwspics1_default>; > + > + flash@0 { > + status = "okay"; > + spi-max-frequency = <50000000>; > + spi-tx-bus-width = <2>; > + spi-rx-bus-width = <2>; > + }; > + > + flash@1 { > + status = "okay"; > + spi-max-frequency = <50000000>; > + spi-tx-bus-width = <2>; > + spi-rx-bus-width = <2>; > + }; > +}; > + > +&spi1 { > + status = "okay"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_spi1cs1_default>; > + > + flash@0 { > + status = "okay"; > + spi-max-frequency = <50000000>; > + spi-tx-bus-width = <2>; > + spi-rx-bus-width = <2>; > + }; > +}; > diff --git a/arch/arm/dts/ast2500.dtsi b/arch/arm/dts/ast2500.dtsi > index ee66ef6704..d78a53aeb7 100644 > --- a/arch/arm/dts/ast2500.dtsi > +++ b/arch/arm/dts/ast2500.dtsi > @@ -57,23 +57,26 @@ > ranges; > > fmc: flash-controller@1e620000 { > - reg = < 0x1e620000 0xc4 > - 0x20000000 0x10000000 >; > + reg = <0x1e620000 0xc4>, <0x20000000 0x10000000>; > #address-cells = <1>; > #size-cells = <0>; > compatible = "aspeed,ast2500-fmc"; > + clocks = <&scu ASPEED_CLK_AHB>; > + num-cs = <3>; > status = "disabled"; > - interrupts = <19>; > + > flash@0 { > reg = < 0 >; > compatible = "jedec,spi-nor"; > status = "disabled"; > }; > + > flash@1 { > reg = < 1 >; > compatible = "jedec,spi-nor"; > status = "disabled"; > }; > + > flash@2 { > reg = < 2 >; > compatible = "jedec,spi-nor"; > @@ -82,17 +85,20 @@ > }; > > spi1: flash-controller@1e630000 { > - reg = < 0x1e630000 0xc4 > - 0x30000000 0x08000000 >; > + reg = <0x1e630000 0xc4>, <0x30000000 0x08000000>; > #address-cells = <1>; > #size-cells = <0>; > compatible = "aspeed,ast2500-spi"; > + clocks = <&scu ASPEED_CLK_AHB>; > + num-cs = <2>; > status = "disabled"; > + > flash@0 { > reg = < 0 >; > compatible = "jedec,spi-nor"; > status = "disabled"; > }; > + > flash@1 { > reg = < 1 >; > compatible = "jedec,spi-nor"; > @@ -101,17 +107,20 @@ > }; > > spi2: flash-controller@1e631000 { > - reg = < 0x1e631000 0xc4 > - 0x38000000 0x08000000 >; > + reg = <0x1e631000 0xc4>, <0x38000000 0x08000000>; > #address-cells = <1>; > #size-cells = <0>; > compatible = "aspeed,ast2500-spi"; > + clocks = <&scu ASPEED_CLK_AHB>; > + num-cs = <2>; > status = "disabled"; > + > flash@0 { > reg = < 0 >; > compatible = "jedec,spi-nor"; > status = "disabled"; > }; > + > flash@1 { > reg = < 1 >; > compatible = "jedec,spi-nor"; > diff --git a/arch/arm/dts/ast2600-evb.dts b/arch/arm/dts/ast2600-evb.dts > index 0d65054313..c1965e9093 100644 > --- a/arch/arm/dts/ast2600-evb.dts > +++ b/arch/arm/dts/ast2600-evb.dts > @@ -72,12 +72,10 @@ > > &fmc { > status = "okay"; > - > pinctrl-names = "default"; > pinctrl-0 = <&pinctrl_fmcquad_default>; > > flash@0 { > - compatible = "spi-flash", "sst,w25q256"; > status = "okay"; > spi-max-frequency = <50000000>; > spi-tx-bus-width = <4>; > @@ -85,7 +83,6 @@ > }; > > flash@1 { > - compatible = "spi-flash", "sst,w25q256"; > status = "okay"; > spi-max-frequency = <50000000>; > spi-tx-bus-width = <4>; > @@ -93,7 +90,6 @@ > }; > > flash@2 { > - compatible = "spi-flash", "sst,w25q256"; > status = "okay"; > spi-max-frequency = <50000000>; > spi-tx-bus-width = <4>; > @@ -103,14 +99,12 @@ > > &spi1 { > status = "okay"; > - > pinctrl-names = "default"; > pinctrl-0 = <&pinctrl_spi1_default &pinctrl_spi1abr_default > &pinctrl_spi1cs1_default &pinctrl_spi1wp_default > &pinctrl_spi1wp_default &pinctrl_spi1quad_default>; > > flash@0 { > - compatible = "spi-flash", "sst,w25q256"; > status = "okay"; > spi-max-frequency = <50000000>; > spi-tx-bus-width = <4>; > @@ -120,13 +114,11 @@ > > &spi2 { > status = "okay"; > - > pinctrl-names = "default"; > pinctrl-0 = <&pinctrl_spi2_default &pinctrl_spi2cs1_default > &pinctrl_spi2cs2_default &pinctrl_spi2quad_default>; > > flash@0 { > - compatible = "spi-flash", "sst,w25q256"; > status = "okay"; > spi-max-frequency = <50000000>; > spi-tx-bus-width = <4>; > diff --git a/arch/arm/dts/ast2600.dtsi b/arch/arm/dts/ast2600.dtsi > index 64074309b7..dd36f55f20 100644 > --- a/arch/arm/dts/ast2600.dtsi > +++ b/arch/arm/dts/ast2600.dtsi > @@ -129,74 +129,78 @@ > }; > > fmc: flash-controller@1e620000 { > - reg = < 0x1e620000 0xc4 > - 0x20000000 0x10000000 >; > + reg = <0x1e620000 0xc4>, <0x20000000 0x10000000>; > #address-cells = <1>; > #size-cells = <0>; > compatible = "aspeed,ast2600-fmc"; > status = "disabled"; > - interrupts = ; > clocks = <&scu ASPEED_CLK_AHB>; > num-cs = <3>; > + > flash@0 { > - reg = < 0 >; > + reg = <0>; > compatible = "jedec,spi-nor"; > status = "disabled"; > }; > + > flash@1 { > - reg = < 1 >; > + reg = <1>; > compatible = "jedec,spi-nor"; > status = "disabled"; > }; > + > flash@2 { > - reg = < 2 >; > + reg = <2>; > compatible = "jedec,spi-nor"; > status = "disabled"; > }; > }; > > spi1: flash-controller@1e630000 { > - reg = < 0x1e630000 0xc4 > - 0x30000000 0x08000000 >; > + reg = <0x1e630000 0xc4>, <0x30000000 0x10000000>; > #address-cells = <1>; > #size-cells = <0>; > compatible = "aspeed,ast2600-spi"; > clocks = <&scu ASPEED_CLK_AHB>; > num-cs = <2>; > status = "disabled"; > + > flash@0 { > - reg = < 0 >; > + reg = <0>; > compatible = "jedec,spi-nor"; > status = "disabled"; > }; > + > flash@1 { > - reg = < 1 >; > + reg = <1>; > compatible = "jedec,spi-nor"; > status = "disabled"; > }; > }; > > spi2: flash-controller@1e631000 { > - reg = < 0x1e631000 0xc4 > - 0x50000000 0x08000000 >; > + reg = <0x1e631000 0xc4>, <0x50000000 0x10000000>; > #address-cells = <1>; > #size-cells = <0>; > compatible = "aspeed,ast2600-spi"; > clocks = <&scu ASPEED_CLK_AHB>; > num-cs = <3>; > status = "disabled"; > + > flash@0 { > - reg = < 0 >; > + reg = <0>; > compatible = "jedec,spi-nor"; > status = "disabled"; > }; > + > flash@1 { > - reg = < 1 >; > + reg = <1>; > compatible = "jedec,spi-nor"; > status = "disabled"; > }; > + > flash@2 { > - reg = < 2 >; > + reg = <2>; > compatible = "jedec,spi-nor"; > status = "disabled"; > };