Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3122015pxx; Sun, 1 Nov 2020 23:55:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJynBR79FwJZUXeriaHx42WI/N46JGWv/pzhuP9qr/MyI+A7F+pm3Ne5lCfAZFoAlEilO0Hb X-Received: by 2002:a17:906:3a97:: with SMTP id y23mr14180392ejd.250.1604303703984; Sun, 01 Nov 2020 23:55:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604303703; cv=none; d=google.com; s=arc-20160816; b=Ij9wKDVaO/gNK3/XE5WFhr24zF/SoRap5ww520o42dwvsGUyfCt2dcdVBJVvnMk1b0 MlkNLVfILr/MQvTwtq+0d43XhSoq6xuVl5w1LYBgMvarasS5O8zKqRHY9iMArIaoSeTH mQCMQS2S4AnwUYDeQOdcPM7/Gptl7HhygyGxa/oCN9kGe0pmegryDAQnRL3NH9d1nLH/ m5o5mn16btqLjKjoEKoHaLwUP6xZjinYZrfe83FiEJXFlhqL8HPrvHPNffxAS04WimIg 6dNkapO1JCb9gPsSlgQbL/skjTM+D5uQtCSjmEYnQQ3kApehtt/+CWSOP72r9jKfPXro MPdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=RbYrofakhkx0meciFfEf/oJVWJiOkpxLKdV5wV/9oBI=; b=qZR4Adljp+o4BFhBdot+rmmJH6nsE4Ng+HFvLP4GBVURoIPjPs6i6m9GX0VmbhGG/A aLwQ2rbcwHwSd4n3IRnKvUv3b72oW9h7GUyZhifYNjNIzd1Qap7iVmBaXDqzh+GbZYCs Lwp1oS1/mGxTm2TTFNZFOzg4wolSM9XL1Ro66AdSod5yffcWPvmburVPxALa3Hb/SRVh VsY8YdGb/ti9g6LvXUZK5zeokp3L8Vh4StPOt0A6wloX5eiYSeD+X+AIl37a2LcEhI96 PaRQQn5I8hY+j2iAIOSu0fBz8LlNC54tMw+iS+21ATLd/CYiszcaOewUVrVT3qLAvemq fcng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l13si11693204ejg.519.2020.11.01.23.54.41; Sun, 01 Nov 2020 23:55:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728035AbgKBHxC (ORCPT + 99 others); Mon, 2 Nov 2020 02:53:02 -0500 Received: from twspam01.aspeedtech.com ([211.20.114.71]:18016 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726819AbgKBHxC (ORCPT ); Mon, 2 Nov 2020 02:53:02 -0500 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 0A27mtgn046598; Mon, 2 Nov 2020 15:48:55 +0800 (GMT-8) (envelope-from chin-ting_kuo@aspeedtech.com) Received: from localhost.localdomain (192.168.10.9) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 2 Nov 2020 15:52:23 +0800 From: Chin-Ting Kuo To: , , , , , , , , , CC: Subject: [PATCH 2/4] ARM: dts: aspeed: ast2600: Update FMC/SPI controller setting for spi-aspeed.c Date: Mon, 2 Nov 2020 15:52:11 +0800 Message-ID: <20201102075213.32404-3-chin-ting_kuo@aspeedtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201102075213.32404-1-chin-ting_kuo@aspeedtech.com> References: <20201102075213.32404-1-chin-ting_kuo@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.168.10.9] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 0A27mtgn046598 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org - Adjust the value format of "reg" property: Instead of platform_get_resource(), platform_get_resource_byname() function can be used for more human-readable. - Add "num-cs" property for FMC/SPI controller: Each ASPEED FMC/SPI memory controller can support more than a chip select. By "num-cs" property, FMC/SPI controller driver can know how many chip select related registers should be initialized at the probe stage. Besdies, with this property, driver can avoid accessing chip select which CS number is larger than the maximum one supported by the controller. Signed-off-by: Chin-Ting Kuo --- arch/arm/boot/dts/aspeed-g6.dtsi | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi index b58220a49cbd..8a5c798db54e 100644 --- a/arch/arm/boot/dts/aspeed-g6.dtsi +++ b/arch/arm/boot/dts/aspeed-g6.dtsi @@ -89,14 +89,16 @@ }; fmc: spi@1e620000 { - reg = < 0x1e620000 0xc4 - 0x20000000 0x10000000 >; + reg = <0x1e620000 0xc4>, + <0x20000000 0x10000000>; + reg-names = "spi_ctrl_reg", "spi_mmap"; #address-cells = <1>; #size-cells = <0>; compatible = "aspeed,ast2600-fmc"; clocks = <&syscon ASPEED_CLK_AHB>; status = "disabled"; interrupts = ; + num-cs = <3>; flash@0 { reg = < 0 >; compatible = "jedec,spi-nor"; @@ -118,12 +120,14 @@ }; spi1: spi@1e630000 { - reg = < 0x1e630000 0xc4 - 0x30000000 0x10000000 >; + reg = <0x1e630000 0xc4>, + <0x30000000 0x10000000>; + reg-names = "spi_ctrl_reg", "spi_mmap"; #address-cells = <1>; #size-cells = <0>; compatible = "aspeed,ast2600-spi"; clocks = <&syscon ASPEED_CLK_AHB>; + num-cs = <2>; status = "disabled"; flash@0 { reg = < 0 >; @@ -140,12 +144,14 @@ }; spi2: spi@1e631000 { - reg = < 0x1e631000 0xc4 - 0x50000000 0x10000000 >; + reg = < 0x1e631000 0xc4>, + <0x50000000 0x10000000>; + reg-names = "spi_ctrl_reg", "spi_mmap"; #address-cells = <1>; #size-cells = <0>; compatible = "aspeed,ast2600-spi"; clocks = <&syscon ASPEED_CLK_AHB>; + num-cs = <3>; status = "disabled"; flash@0 { reg = < 0 >; -- 2.17.1