Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2752253pxa; Tue, 25 Aug 2020 02:10:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwabXniIX4qR+WAYVQ55/ykvvnenMdTcCf9MZP9Rq0AhBx9g4CnRLEB+1Apsm7EDUqdOqmh X-Received: by 2002:a17:906:7b83:: with SMTP id s3mr9363242ejo.2.1598346612636; Tue, 25 Aug 2020 02:10:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598346612; cv=none; d=google.com; s=arc-20160816; b=U78moi9TbLboUCm8spZaEoPwqurnv4fZ620rqOxAOwmrdowRSIeZDdjvIzG2BqtTgE 8+jHSOx2dGjNScx+HLPkKIcsT7x/9CAKFrPaaaR+0W3vMklLRLAJrSNJXLpj3pNqoqm9 Pevuh3QdHhH0EZwZ8ib/qzouynPM7n30VGkTP90w6dympjsQc0nOxrnzjTCK9XSbYAdc z6fX+x96e0z4MyX7AykMOsQq6eQkyMyIf/yPvhk1nEhSzL2NDRgS28VSzzphPai+eVCP 3UAAyrFxLTu6nYq1Ax7iw+C5ElNxM6Uhk/1WCc1prltzSKEBCQbLKBKFCcUmtGWP7NyU XqHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=ew1twa03VNclMJDDta/5vN3SoKTQonxvjLWPCnZO6io=; b=iIdk1u4rvjnv3Hu4C5ckH7znTTOzXDCRpvVKV5qu4iciuZji3Jp2lTJkWUWP9qm67Q EWenZ9NbVPqaB1hPhkt17y3z9vmsBc0n9r+9AsTfaLLwNACqEgdfJyKebDrcU0zdl2P4 xkvbNv/KRv+eaAZn522w/DldKHruKBFyOxlsgvn/kYgKe/yOF2Mm96kMi1/+yGGqbie9 /vpizdvCMmhLqT/YcLIU30qqSSn5NAxpmf93dRgyrF5b6ByXBAgnvxGCvTGu9y6ib1RD 7c2L14l23HWVvrD1mMcJCnuWeHpYDXk9eiI0DaybgktlukujLP3mIK1AY8WiStYbUESt EIIg== 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 c11si8875615edy.260.2020.08.25.02.09.49; Tue, 25 Aug 2020 02:10:12 -0700 (PDT) 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 S1728975AbgHYIyq (ORCPT + 99 others); Tue, 25 Aug 2020 04:54:46 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:16524 "EHLO relmlie6.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725916AbgHYIyp (ORCPT ); Tue, 25 Aug 2020 04:54:45 -0400 X-IronPort-AV: E=Sophos;i="5.76,351,1592838000"; d="scan'208";a="55250272" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 25 Aug 2020 17:54:42 +0900 Received: from localhost.localdomain (unknown [10.226.36.204]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 254EC4261C31; Tue, 25 Aug 2020 17:54:40 +0900 (JST) From: Lad Prabhakar To: Geert Uytterhoeven , Magnus Damm , Rob Herring Cc: linux-renesas-soc@vger.kernel.or, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Prabhakar , Lad Prabhakar Subject: [PATCH v2] ARM: dts: r8a7742-iwg21m: Add SPI NOR support Date: Tue, 25 Aug 2020 09:54:35 +0100 Message-Id: <20200825085435.8744-1-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for the SPI NOR device used to boot up the system to the System on Module DT. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson --- Hi all, This patch is part of series [1], since rest of the patches have been acked I am just resending patch 3/3 from the series. [1] https://patchwork.kernel.org/project/linux-renesas-soc/list/?series=333197 v1->v2 * Dropped #address-cells/#size-cells from flash node. * Added partitions for flash node. --- arch/arm/boot/dts/r8a7742-iwg21m.dtsi | 51 +++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/arch/arm/boot/dts/r8a7742-iwg21m.dtsi b/arch/arm/boot/dts/r8a7742-iwg21m.dtsi index 0f26807f92b8..5621c9ed698f 100644 --- a/arch/arm/boot/dts/r8a7742-iwg21m.dtsi +++ b/arch/arm/boot/dts/r8a7742-iwg21m.dtsi @@ -35,6 +35,16 @@ clock-frequency = <20000000>; }; +&gpio0 { + /* GP0_18 set low to select QSPI. Doing so will disable VIN2 */ + qspi_en { + gpio-hog; + gpios = <18 GPIO_ACTIVE_HIGH>; + output-low; + line-name = "QSPI_EN"; + }; +}; + &i2c0 { pinctrl-0 = <&i2c0_pins>; pinctrl-names = "default"; @@ -70,4 +80,45 @@ groups = "mmc1_data4", "mmc1_ctrl"; function = "mmc1"; }; + + qspi_pins: qspi { + groups = "qspi_ctrl", "qspi_data2"; + function = "qspi"; + }; +}; + +&qspi { + pinctrl-0 = <&qspi_pins>; + pinctrl-names = "default"; + + status = "okay"; + + flash: flash@0 { + compatible = "sst,sst25vf016b", "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + m25p,fast-read; + spi-cpol; + spi-cpha; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "bootloader"; + reg = <0x00000000 0x000c0000>; + read-only; + }; + partition@c0000 { + label = "env"; + reg = <0x000c0000 0x00002000>; + }; + partition@c2000 { + label = "user"; + reg = <0x000c2000 0x0013e000>; + }; + }; + }; }; -- 2.17.1