Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1189754imm; Tue, 15 May 2018 15:25:29 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqm6GuNDWpU345w41kh2xWBOIgO5kUz+1N/6eRjiOpt2NaFPacUo0/A6JHPnZAs2P3yjwSr X-Received: by 2002:a17:902:4464:: with SMTP id k91-v6mr15962833pld.219.1526423129817; Tue, 15 May 2018 15:25:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526423129; cv=none; d=google.com; s=arc-20160816; b=r/Oyfq9W0OOB4fDsP9obtOQFkbpzOZenUrw27AygcJBXzdYzpUBeE7P1+XmLDyGyKR oW8NO8SoObAKgRLdPwqUIBKlcW2GGZvKpt07wlXtGe+LJS+hN0+TKzHHjrPgt608c3Bm Z662WKuF5SuEXx/bjRuTmOJs1I18MLDQkDS/ngFgNqX/7IqfEXb8YkoWeH2+SlwxdDjH 6tiiHJueaA5DQ2O5uLT5RvdZlh8pFFgIsWGOhwDHy6CPiEpTlOQ/3U2pIbegle8NDcHU y0hpTGwkli0kb6YhvnNQxf9cSa6rQ9CS4dFBbOL9sO2jCjOurp7CUFza6r6km2SOdNgK NAYg== 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 :arc-authentication-results; bh=zVmJR2Nb0Ec1x5Gi04gMn2kBW/cg1f29KTXylul0uyM=; b=qe1J+NUBdD2e/ikwp6PdbUx3KdDU5KbabwKdVjkp8tkKx/4K6+JlVHS/Wee+CEcNAZ T74DpuEx8kjYUxO/MVFsufhgc9MgXbvRBKHNAq9LBgYw0LxSboP7xBa5fQ2vXJ/Nc1fp oocuo1zRB7xurnzbBMS0Kym/AK0b8bXkzKHA+lyI5hKkJGZDjgEO7bkTkLFdTT+d2n6y ZUun3iqVK76QjidZJZXhMTn4KAc0UU7ka8eCeIL0CiTfIGahnH9HknIlC0ZL9lyUNkpE 0W2DICFKn9lJ0BTXQYFbmJK/rFujl+WSo7zW9xNrZ3kFYvsNRiiR2HcRTNGhF57qbyvD 6TmA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o76-v6si1081955pfj.118.2018.05.15.15.25.15; Tue, 15 May 2018 15:25:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752565AbeEOWXu (ORCPT + 99 others); Tue, 15 May 2018 18:23:50 -0400 Received: from mga11.intel.com ([192.55.52.93]:15193 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751853AbeEOWXt (ORCPT ); Tue, 15 May 2018 18:23:49 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 May 2018 15:23:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,404,1520924400"; d="scan'208";a="39610189" Received: from tthayer-hp-z620-workstation.an.intel.com ([10.122.105.144]) by fmsmga007.fm.intel.com with ESMTP; 15 May 2018 15:23:48 -0700 From: thor.thayer@linux.intel.com To: dinguyen@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com Cc: catalin.marinas@arm.com, will.deacon@arm.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Thor Thayer Subject: [PATCHv3] arm64: dts: stratix10: Add QSPI support for Stratix10 Date: Tue, 15 May 2018 17:26:27 -0500 Message-Id: <1526423187-27521-1-git-send-email-thor.thayer@linux.intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thor Thayer Add qspi_clock The qspi_clk frequency is updated by U-Boot before starting Linux. Add QSPI interface node. Add QSPI flash memory child node. Setup the QSPI memory in 2 partitions. Signed-off-by: Thor Thayer --- v2 s/_/-/ in qspi-clk rename flash node. use partition child node notation v3 remove unused bus-num node use device id from table (n25q00a) --- arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 21 +++++++++++++ .../boot/dts/altera/socfpga_stratix10_socdk.dts | 35 ++++++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi index e6b059378dc0..d8c94d5ff4b4 100644 --- a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi +++ b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi @@ -119,6 +119,12 @@ #clock-cells = <0>; compatible = "fixed-clock"; }; + + qspi_clk: qspi-clk { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <200000000>; + }; }; gmac0: ethernet@ff800000 { @@ -466,5 +472,20 @@ interrupts = <16 4>, <48 4>; }; }; + + qspi: spi@ff8d2000 { + compatible = "cdns,qspi-nor"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0xff8d2000 0x100>, + <0xff900000 0x100000>; + interrupts = <0 3 4>; + cdns,fifo-depth = <128>; + cdns,fifo-width = <4>; + cdns,trigger-address = <0x00000000>; + clocks = <&qspi_clk>; + + status = "disabled"; + }; }; }; diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts b/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts index f9b1ef12db48..6edc4fa9fd42 100644 --- a/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts +++ b/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts @@ -147,3 +147,38 @@ reg = <0x68>; }; }; + +&qspi { + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "n25q00a"; + reg = <0>; + spi-max-frequency = <50000000>; + + m25p,fast-read; + cdns,page-size = <256>; + cdns,block-size = <16>; + cdns,read-delay = <1>; + cdns,tshsl-ns = <50>; + cdns,tsd2d-ns = <50>; + cdns,tchsh-ns = <4>; + cdns,tslch-ns = <4>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + qspi_boot: partition@0 { + label = "Boot and fpga data"; + reg = <0x0 0x4000000>; + }; + + qspi_rootfs: partition@4000000 { + label = "Root Filesystem - JFFS2"; + reg = <0x4000000 0x4000000>; + }; + }; + }; +}; -- 2.7.4