Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp974361imm; Fri, 11 May 2018 09:08:50 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpb2owM7eTcqqoO+CVIurmYsqrgYgsv5JtkxuchwOfz12vJXGRYkzVLOHxwdazcLQV0D8JD X-Received: by 2002:a17:902:6b0c:: with SMTP id o12-v6mr5989906plk.159.1526054930647; Fri, 11 May 2018 09:08:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526054930; cv=none; d=google.com; s=arc-20160816; b=BC7UOjxMMljoAvnEHCieaG+a32Hc7nj+pKV6cYrONLArgZBYMwCz5hVu8SP7A2tB1Q tCXqv7C4mZQp78H52o/dfXS7N0WxhK41yjV0zvi0r1UmyyDYWwTGZn6qaejt1xyk6zIA vI/P7pDC5BQol8Ts5KlDlxKzj8uVOLNxtEkUqg7s6pQMPIlujEzPjD46e4EJvRTi/ygS ouqAlgq68PLRYDzPAcGy7tBx4pUMVHeSfusinp2kwo4BS3n58Qs1OOdICDwgsDdbuCIl 4FzDJoWecnArCDaEW0S1QellHHgEuTQZCocQfU21IzySJDS0otCO1JtwVkPRUqAZd47g wroQ== 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=x2X2aUWT2qwzEcri166/ircgzjg8YEyenSd3sJhjswA=; b=GPRQQU5d8d9YU4nAIfwBSFvITNV53XaZpgpr+5E7uPp1NerldjKOYmwy7/Srwc+ked uf6zo52p7RZ1w1F0ZeD6pjaEbRA4HNu6A92bFiVV8H2mwp0hJLDKHC6FrPAlgTYywNDr eYfXWfRAsjFXe8laGSvTTt+m5UgmJPMiDzxHkAJtS+mqb4gpZ2tiVyHOg2jnAL7yTHp9 4E20hVRkcduYKKAgZdky8sNlvA2AtkHhFgU+CuK92WdCw+WSKtdIp2iNpnFcD+wsgS8D d7DR/V9OFdx9Uu3pN8TR7m8z2O2iQVNkFCoZe6Bs0TJt9jii5FDH2BBrpMvEzTyWExtK aF3w== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3-v6si3562146plv.323.2018.05.11.09.08.35; Fri, 11 May 2018 09:08:50 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751959AbeEKQIU (ORCPT + 99 others); Fri, 11 May 2018 12:08:20 -0400 Received: from mga05.intel.com ([192.55.52.43]:43147 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751489AbeEKQIS (ORCPT ); Fri, 11 May 2018 12:08:18 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 May 2018 09:08:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,389,1520924400"; d="scan'208";a="48503181" Received: from tthayer-hp-z620-workstation.an.intel.com ([10.122.105.144]) by FMSMGA003.fm.intel.com with ESMTP; 11 May 2018 09:08:17 -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: [PATCHv2] arm64: dts: stratix10: Add QSPI support for Stratix10 Date: Fri, 11 May 2018 11:10:52 -0500 Message-Id: <1526055052-11371-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 --- arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 22 ++++++++++++++ .../boot/dts/altera/socfpga_stratix10_socdk.dts | 35 ++++++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi index e6b059378dc0..bac01b0b7907 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,21 @@ 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>; + bus-num = <1>; + + 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..96542150654b 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 = "n25q00aa"; + 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