From patchwork Thu Jan 28 08:43:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caesar Wang X-Patchwork-Id: 8147841 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 C84629F440 for ; Thu, 28 Jan 2016 08:51:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EA25D20221 for ; Thu, 28 Jan 2016 08:51:04 +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 240B420218 for ; Thu, 28 Jan 2016 08:51:04 +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 1aOiGK-0007tA-58; Thu, 28 Jan 2016 08:49:08 +0000 Received: from mail-pf0-f193.google.com ([209.85.192.193]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aOiCn-0003ch-Tl; Thu, 28 Jan 2016 08:45:32 +0000 Received: by mail-pf0-f193.google.com with SMTP id n128so1729224pfn.3; Thu, 28 Jan 2016 00:45:09 -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=DFb5NE22pq+cWAMWgwLUA7GgedfJx6W0zk6/wZU1GAQ=; b=Yc9RW7BgpIwSHBKqUIKNAOeoYg+213Lc/nfSnCgH7/wlgOfywypbnobRdaoPBNnGB4 +rkvVmQvRtffRWVNok0I2pBH4G/TFUXCQAg2WORzfQccOmu8ImTQoPTDUQRUDqz+Ztyv RHNOuAOLhpzxFef260c2LH6wFt2RYI5FDjmKGuAIl5l5v9kh81IPnx5X3zZZg9CoM22O 20xwbQTv5c8R0NH1EXSiS/qNhPOuXkjE4FouQzmCXNcmzvn2725Hhbae7lKBq2v2gPiH PD2AMQYxZIMiRAe/0Kovevko+RPOPJ1d2iOmE0gn8g+Zl30S3TvhO0DU0OYh7MNCi4S2 4ung== X-Gm-Message-State: AG10YOTHp5QwIsOSejj1ImnUvaJVXS0kcltfW2pvgtyUFb0VB9b/dxA4yqMUiJAYKxsUQg== X-Received: by 10.98.10.81 with SMTP id s78mr2801220pfi.119.1453970709462; Thu, 28 Jan 2016 00:45:09 -0800 (PST) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id t67sm14422515pfa.14.2016.01.28.00.45.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Jan 2016 00:45:08 -0800 (PST) From: Caesar Wang To: Heiko Stuebner , linux-kernel@vger.kernel.org Subject: [PATCH v4 9/9] ARM: dts: rockchip: support the spi for rk3036 Date: Thu, 28 Jan 2016 16:43:38 +0800 Message-Id: <1453970618-4383-10-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1453970618-4383-1-git-send-email-wxt@rock-chips.com> References: <1453970618-4383-1-git-send-email-wxt@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160128_004530_151038_D13A6780 X-CRM114-Status: GOOD ( 11.78 ) X-Spam-Score: -2.4 (--) 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: Mark Rutland , devicetree@vger.kernel.org, Russell King , hl@rock-chips.com, Pawel Moll , Ian Campbell , sonnyrao@chromium.org, jeffy.chen@rock-chips.com, Rob Herring , linux-rockchip@lists.infradead.org, Kumar Gala , linux-arm-kernel@lists.infradead.org, keescook@google.com, cf@rock-chips.com, jay.xu@rock-chips.com, leozwang@google.com, 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.2 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 You have to use the 4 bus to work if someone wants to support the spi devices, since the the pin is re-used by data[5-8] and spi. If support the spi making the happy work, that will waste the emmc performance. Moment, the kylin hasn't the spi devices to work, so maybe we need wait the new required to enable in kylin board. Anyway, the spi should be needed land in rk3036 dts. Signed-off-by: Caesar Wang --- Changes in v4: - Add this patch included in kylin series patches. arch/arm/boot/dts/rk3036.dtsi | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/arch/arm/boot/dts/rk3036.dtsi b/arch/arm/boot/dts/rk3036.dtsi index 532f232..40a5017 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,23 @@ status = "disabled"; }; + spi: spi@20074000 { + compatible = "rockchip,rockchip-spi"; + reg = <0x20074000 0x1000>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&spi_txd &spi_rxd &spi_clk &spi_cs0 &spi_cs1>; + num-cs = <2>; + clocks =<&cru PCLK_SPI>, <&cru SCLK_SPI>; + clock-names = "apb-pclk","spi_pclk"; + dmas = <&pdma 8>, <&pdma 9>; + #dma-cells = <2>; + dma-names = "tx", "rx"; + status = "disabled"; + }; + pinctrl: pinctrl { compatible = "rockchip,rk3036-pinctrl"; rockchip,grf = <&grf>; @@ -723,5 +741,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:spi0-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>; + + }; + }; }; };