From patchwork Tue Feb 2 03:40:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caesar Wang X-Patchwork-Id: 8186681 Return-Path: X-Original-To: patchwork-linux-arm@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 5187D9F4DD for ; Tue, 2 Feb 2016 03:43:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7CAA12026D for ; Tue, 2 Feb 2016 03:43:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AAAA820270 for ; Tue, 2 Feb 2016 03:43:54 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aQRrM-0002qA-6M; Tue, 02 Feb 2016 03:42:32 +0000 Received: from mail-pa0-f66.google.com ([209.85.220.66]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aQRqu-0002ZV-87; Tue, 02 Feb 2016 03:42:05 +0000 Received: by mail-pa0-f66.google.com with SMTP id ho8so802896pac.3; Mon, 01 Feb 2016 19:41:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=rZvKvHPLTusuE98Sj9+EGhBjg1muMCvFnsguJb05kLc=; b=eS8V/ulEwUtNworLUg/QogtMofAuFk6dUbFwC3tamDtuzqiEQtm5oSek8tC7cJpOth c845DGAOkJmoV2Im629zlc9l/R3B2eaYu9qu1jIETx4Lp+AME5ZMCd8hhxUEWLPQwbMl tto2DPU1FHIO0O2zpGcBH1mnPXkIHJE3DH32PC7B+ZiWeY84wZ7k5WNrN5afPMlLWZwJ tat0Wrd3s14i/BK5TNfQjXnkaQmV8+HqnuJrS7Vbk6X//H0PdI/LT2y6QKHkZPDJV2Ml n5p+wqKCVtCHu76k0O6o2vUxC3YpH7iItdfr1pL2i2i8rzdOQsBRjo/UxJotlYlMRORh XThg== X-Gm-Message-State: AG10YOQKIQESe+lOtY411LURF8Ft4ESRYVk8luPtQQMmRcVuOgSnmGguSmu74dpbYae0kA== X-Received: by 10.66.147.165 with SMTP id tl5mr24174062pab.88.1454384503480; Mon, 01 Feb 2016 19:41:43 -0800 (PST) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id e14sm46632152pap.24.2016.02.01.19.41.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Feb 2016 19:41:42 -0800 (PST) From: Caesar Wang To: heiko@sntech.de Subject: [PATCH v5 8/8] ARM: dts: rockchip: support the spi for rk3036 Date: Tue, 2 Feb 2016 11:40:53 +0800 Message-Id: <1454384453-7127-4-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454384453-7127-1-git-send-email-wxt@rock-chips.com> References: <1454384032-6794-1-git-send-email-wxt@rock-chips.com> <1454384453-7127-1-git-send-email-wxt@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160201_194204_497722_856DA743 X-CRM114-Status: GOOD ( 10.34 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, jeffy.chen@rock-chips.com, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, leozwang@google.com, keescook@google.com, linux-arm-kernel@lists.infradead.org, Caesar Wang MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 This patch adds the needed spi node for rk3036 dts. We have to use the 4 bus emmc to work if someone want to support the spi devices, since the pins are re-used by emmc data[5-8] and spi. In some caseswe need to support the spi devices, that will waste the emmc performance. Moment, the kylin/evb hasn't the spi devices to work, so maybe we need wait the new required to enable in kylin/evb board. Anyway, the spi should be needed land in rk3036 dts. Signed-off-by: Caesar Wang --- Changes in v5: - Remove the unused, as Heiko comments on https://patchwork.kernel.org/patch/8147761/ - Modify the commit. Changes in v4: - Add this patch included in kylin series patches. arch/arm/boot/dts/rk3036.dtsi | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/arch/arm/boot/dts/rk3036.dtsi b/arch/arm/boot/dts/rk3036.dtsi index 532f232..30bb316 100644 --- a/arch/arm/boot/dts/rk3036.dtsi +++ b/arch/arm/boot/dts/rk3036.dtsi @@ -60,6 +60,7 @@ serial0 = &uart0; serial1 = &uart1; serial2 = &uart2; + spi = &spi; }; memory { @@ -485,6 +486,21 @@ status = "disabled"; }; + spi: spi@20074000 { + compatible = "rockchip,rockchip-spi"; + reg = <0x20074000 0x1000>; + interrupts = ; + clocks =<&cru PCLK_SPI>, <&cru SCLK_SPI>; + clock-names = "apb-pclk","spi_pclk"; + dmas = <&pdma 8>, <&pdma 9>; + dma-names = "tx", "rx"; + pinctrl-names = "default"; + pinctrl-0 = <&spi_txd &spi_rxd &spi_clk &spi_cs0>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + pinctrl: pinctrl { compatible = "rockchip,rk3036-pinctrl"; rockchip,grf = <&grf>; @@ -723,5 +739,29 @@ }; /* no rts / cts for uart2 */ }; + + spi { + spi_txd:spi-txd { + rockchip,pins = <1 29 RK_FUNC_3 &pcfg_pull_default>; + }; + + spi_rxd:spi-rxd { + rockchip,pins = <1 28 RK_FUNC_3 &pcfg_pull_default>; + }; + + spi_clk:spi-clk { + rockchip,pins = <2 0 RK_FUNC_2 &pcfg_pull_default>; + }; + + spi_cs0:spi-cs0 { + rockchip,pins = <1 30 RK_FUNC_3 &pcfg_pull_default>; + + }; + + spi_cs1:spi-cs1 { + rockchip,pins = <1 31 RK_FUNC_3 &pcfg_pull_default>; + + }; + }; }; };