From patchwork Tue Apr 12 23:55:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guodong Xu X-Patchwork-Id: 8817541 Return-Path: X-Original-To: patchwork-linux-arm@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 20FC3C0553 for ; Wed, 13 Apr 2016 00:00:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 32E4D202D1 for ; Tue, 12 Apr 2016 23:59:59 +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 3C39620160 for ; Tue, 12 Apr 2016 23:59:58 +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 1aq8CV-0001eM-J7; Tue, 12 Apr 2016 23:58:31 +0000 Received: from mail-pf0-x22a.google.com ([2607:f8b0:400e:c00::22a]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aq8CE-0001EK-9a for linux-arm-kernel@lists.infradead.org; Tue, 12 Apr 2016 23:58:17 +0000 Received: by mail-pf0-x22a.google.com with SMTP id 184so22946822pff.0 for ; Tue, 12 Apr 2016 16:57:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AimKb2kGKvuh4P0SAukjVFflV/nJNnonpWkFJJbx74w=; b=RDtf+mx0J974DAkZlBIJC0T/Im8YSjNJx4Cf/sjq26g7oxY9xULzV1w2HVZK2bNxN7 r/NOfFolf8jo2ACOuW0MwaZtVzBMaBEHeQbHdcKr3KeNUePJckwZbNMTlZ2L0IQgIlMU FzWUXplKwfSXM0hI9E3WfZh1nIypOIMNRDvC8= 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=AimKb2kGKvuh4P0SAukjVFflV/nJNnonpWkFJJbx74w=; b=SL0wHa/BEdd6MLot8UDp+w820OmiXOvkiXxFoJQ4SjGOgbZlm8ZRXq88aUSW0PbQdb fHge7VKy/c9027zQNoMeJrUguo/G/Vkg9DEslp/vVqKLGicqikrpJDjkqce+0/6vijIE J6/UPVRAR5PdMtzuJs1RXBekNVnqsZgt+C8Us3R1TxICod0LwWhsE5vDDI2eKVnzWtYm 1e4Li5G86LwwQn0CdDLvOh0YxBgr/GDZYx7g+22jOln6bwtYXqY1SzkwzOdhq2MIW3t2 +iRbWBtPkLIkJJgZa9iSfOspvcW2Wm1xdb9sXeFZ5HQDdnMtd1e4/9qn70SNRBHW2lYI g/Ow== X-Gm-Message-State: AOPr4FWCJtcGlA92YwCKhJURgdS53QO4qXyyXhafjEC3tFWDIAYJG0ssM05OkNw8fdcxHxQE X-Received: by 10.98.72.213 with SMTP id q82mr8558751pfi.164.1460505473729; Tue, 12 Apr 2016 16:57:53 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.226]) by smtp.gmail.com with ESMTPSA id i1sm46165795pfj.17.2016.04.12.16.57.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Apr 2016 16:57:53 -0700 (PDT) From: Guodong Xu To: xuwei5@hisilicon.com, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, catalin.marinas@arm.com, will.deacon@arm.com, haojian.zhuang@linaro.org, linus.walleij@linaro.org, tony@atomide.com Subject: [PATCH v4 06/16] arm64: dts: add Hi6220 spi configuration nodes Date: Wed, 13 Apr 2016 07:55:42 +0800 Message-Id: <1460505352-13157-7-git-send-email-guodong.xu@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460505352-13157-1-git-send-email-guodong.xu@linaro.org> References: <1460505352-13157-1-git-send-email-guodong.xu@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160412_165814_692216_1EB26B2F X-CRM114-Status: GOOD ( 11.45 ) X-Spam-Score: -2.7 (--) 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, Zhong Kaihua , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Guodong Xu 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=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,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 From: Zhong Kaihua Add Hi6220 spi configuration nodes. Disable by default in hi6220.dtsi and enable it in board dts for usage of 96boards LS mezzanine board. Signed-off-by: Zhong Kaihua Signed-off-by: Guodong Xu Signed-off-by: Wei Xu Reviewed-by: Rob Herring --- arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 6 ++++++ arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 15 +++++++++++++++ arch/arm64/boot/dts/hisilicon/hikey-pinctrl.dtsi | 21 +++++++++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts index 3d9e8b2..7545e36 100644 --- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts @@ -40,6 +40,12 @@ <0x00000000 0x06e00000 0x00000000 0x0060f000>, <0x00000000 0x07410000 0x00000000 0x36bf0000>; }; + + soc { + spi0: spi@f7106000 { + status = "ok"; + }; + }; }; &uart2 { diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi index df56571..7bcfffe 100644 --- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi @@ -567,5 +567,20 @@ clocks = <&ao_ctrl 2>; clock-names = "apb_pclk"; }; + + spi0: spi@f7106000 { + compatible = "arm,pl022", "arm,primecell"; + reg = <0x0 0xf7106000 0x0 0x1000>; + interrupts = <0 50 4>; + bus-id = <0>; + enable-dma = <0>; + clocks = <&sys_ctrl HI6220_SPI_CLK>; + clock-names = "apb_pclk"; + pinctrl-names = "default"; + pinctrl-0 = <&spi0_pmx_func &spi0_cfg_func>; + num-cs = <1>; + cs-gpios = <&gpio6 2 0>; + status = "disabled"; + }; }; }; diff --git a/arch/arm64/boot/dts/hisilicon/hikey-pinctrl.dtsi b/arch/arm64/boot/dts/hisilicon/hikey-pinctrl.dtsi index 28806df..0916e84 100644 --- a/arch/arm64/boot/dts/hisilicon/hikey-pinctrl.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hikey-pinctrl.dtsi @@ -221,6 +221,15 @@ 0xfc MUX_M0 /* I2C2_SDA (IOMG063) */ >; }; + + spi0_pmx_func: spi0_pmx_func { + pinctrl-single,pins = < + 0x1a0 MUX_M1 /* SPI0_DI (IOMG104) */ + 0x1a4 MUX_M1 /* SPI0_DO (IOMG105) */ + 0x1a8 MUX_M1 /* SPI0_CS_N (IOMG106) */ + 0x1ac MUX_M1 /* SPI0_CLK (IOMG107) */ + >; + }; }; pmx1: pinmux@f7010800 { @@ -625,6 +634,18 @@ pinctrl-single,bias-pullup = ; pinctrl-single,drive-strength = ; }; + + spi0_cfg_func: spi0_cfg_func { + pinctrl-single,pins = < + 0x1b0 0x0 /* SPI0_DI (IOCFG108) */ + 0x1b4 0x0 /* SPI0_DO (IOCFG109) */ + 0x1b8 0x0 /* SPI0_CS_N (IOCFG110) */ + 0x1bc 0x0 /* SPI0_CLK (IOCFG111) */ + >; + pinctrl-single,bias-pulldown = ; + pinctrl-single,bias-pullup = ; + pinctrl-single,drive-strength = ; + }; }; pmx2: pinmux@f8001800 {