From patchwork Mon Nov 30 06:13:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 7721331 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0F814BEEE1 for ; Mon, 30 Nov 2015 06:13:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3967120648 for ; Mon, 30 Nov 2015 06:13:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3A50A20641 for ; Mon, 30 Nov 2015 06:13:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752668AbbK3GNS (ORCPT ); Mon, 30 Nov 2015 01:13:18 -0500 Received: from kirsty.vergenet.net ([202.4.237.240]:53346 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751861AbbK3GNS (ORCPT ); Mon, 30 Nov 2015 01:13:18 -0500 Received: from reginn.isobedori.kobe.vergenet.net (p5254-ipbfp1403kobeminato.hyogo.ocn.ne.jp [114.152.48.254]) by kirsty.vergenet.net (Postfix) with ESMTPA id B6DA425B781; Mon, 30 Nov 2015 17:13:15 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verge.net.au; s=mail; t=1448863995; bh=61k52LMn33CfZ/i+2IzyBL/b8/1f2X2UxGwhP/2OCFk=; h=From:To:Cc:Subject:Date:From; b=caF1VxaFVZAGQWd7bhLKi5qVTN2Zwjnh+1+ETGbAd4uY2G/7HJSA9r1WsBiC8LmM4 CIvnNyfA7WvtPrqfkTt4SVcRWIIEm9NsDLAibQRtIP7NxLR0pPk2Swd8huzklXG+sr tlwm3vzWEJj1taHSDxs0dVDI/Sc68kjFgP9u05jQ= Received: by reginn.isobedori.kobe.vergenet.net (Postfix, from userid 7100) id 8905294083A; Mon, 30 Nov 2015 15:13:15 +0900 (JST) From: Simon Horman To: linux-sh@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Magnus Damm , Simon Horman , Vladimir Barinov , Sergei Shtylyov Subject: [PATCH] ARM: shmobile: alt: Add QSPI device to DT Date: Mon, 30 Nov 2015 15:13:10 +0900 Message-Id: <1448863990-16276-1-git-send-email-horms+renesas@verge.net.au> X-Mailer: git-send-email 2.1.4 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Enable the QSPI controller in the alt device tree. Based similar work for the silk board by by Vladimir Barinov and Sergei Shtylyov. Cc: Vladimir Barinov Cc: Sergei Shtylyov Signed-off-by: Simon Horman Acked-by: Geert Uytterhoeven --- Testedon top of renesas-devel-20151126-v4.4-rc2. Read /dev/mtd0 with 512K blocks at 6.5Mb/s --- arch/arm/boot/dts/r8a7794-alt.dts | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/arch/arm/boot/dts/r8a7794-alt.dts b/arch/arm/boot/dts/r8a7794-alt.dts index 767d9224d6cc..0dae87639328 100644 --- a/arch/arm/boot/dts/r8a7794-alt.dts +++ b/arch/arm/boot/dts/r8a7794-alt.dts @@ -138,6 +138,13 @@ status = "okay"; }; +&pfc { + qspi_pins: spi0 { + renesas,groups = "qspi_ctrl", "qspi_data4"; + renesas,function = "qspi"; + }; +}; + ðer { pinctrl-0 = <ðer_pins &phy1_pins>; pinctrl-names = "default"; @@ -197,3 +204,41 @@ status = "okay"; }; + +&qspi { + pinctrl-0 = <&qspi_pins>; + pinctrl-names = "default"; + + status = "okay"; + + flash@0 { + compatible = "spansion,s25fl512s", "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <30000000>; + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; + spi-cpol; + spi-cpha; + m25p,fast-read; + + partitions { + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "loader"; + reg = <0x00000000 0x00040000>; + read-only; + }; + partition@40000 { + label = "user"; + reg = <0x00040000 0x00400000>; + read-only; + }; + partition@440000 { + label = "flash"; + reg = <0x00440000 0x03bc0000>; + }; + }; + }; +};