From patchwork Mon Jan 4 10:36:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 7946901 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 69C9E9F1CC for ; Mon, 4 Jan 2016 10:37:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9174A2035B for ; Mon, 4 Jan 2016 10:37:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9F6CE20357 for ; Mon, 4 Jan 2016 10:37:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751308AbcADKhJ (ORCPT ); Mon, 4 Jan 2016 05:37:09 -0500 Received: from kirsty.vergenet.net ([202.4.237.240]:59365 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751188AbcADKhI (ORCPT ); Mon, 4 Jan 2016 05:37:08 -0500 Received: from penelope.kanocho.kobe.vergenet.net (pa49-181-174-125.pa.nsw.optusnet.com.au [49.181.174.125]) by kirsty.vergenet.net (Postfix) with ESMTPSA id 14B1625B799; Mon, 4 Jan 2016 21:37:07 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verge.net.au; s=mail; t=1451903827; bh=2Ax72UZ/kbIvkVReciEs/2DQ0gtMF/DeClC48FqGE+8=; h=From:To:Cc:Subject:Date:From; b=O0B4HqR3g9BoHyLnZOjVaUg6dRJMEcZMFqg8qQQkEfZfrMladXKZ8arISqcAaxrsI OnYppJL/6pl2SSVr/xwjpVwV/YWxWsyw05qB8InJGVVD1g5UrVRs3j2hXXkl5OsAyS bQf0ZjvfZCeXqR75HLXRJvMsDbWDOz0TsSsTl7Is= Received: by penelope.kanocho.kobe.vergenet.net (Postfix, from userid 7100) id 9B61866AD4; Mon, 4 Jan 2016 21:37:06 +1100 (AEDT) From: Simon Horman To: linux-sh@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Magnus Damm , Simon Horman , Vladimir Barinov , Sergei Shtylyov , Geert Uytterhoeven Subject: [PATCH v2] ARM: shmobile: alt: Add QSPI device to DT Date: Mon, 4 Jan 2016 21:36:59 +1100 Message-Id: <1451903819-19218-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,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Cc: Geert Uytterhoeven Signed-off-by: Simon Horman Acked-by: Geert Uytterhoeven --- v2 * Added compatible = "fixed-partitions"; * Update partitioning scheme to reflect ALT_MiniMonitor_Manual(SPI_Boot)_Rev0.01_e.pdf * Tested on top of renesas-devel-20151228-v4.4-rc7 Read /dev/mtd0 with 512K blocks at 6.5Mb/s --- arch/arm/boot/dts/r8a7794-alt.dts | 46 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/arch/arm/boot/dts/r8a7794-alt.dts b/arch/arm/boot/dts/r8a7794-alt.dts index 2394e4883786..773f304d1142 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,42 @@ 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 { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "loader"; + reg = <0x00000000 0x00040000>; + read-only; + }; + partition@40000 { + label = "system"; + reg = <0x00040000 0x00040000>; + read-only; + }; + partition@80000 { + label = "user"; + reg = <0x00080000 0x03f80000>; + }; + }; + }; +};