From patchwork Fri Feb 19 11:58:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guodong Xu X-Patchwork-Id: 8360031 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 9E5E2C0554 for ; Fri, 19 Feb 2016 12:02:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B9462203C0 for ; Fri, 19 Feb 2016 12:02:16 +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 5A80C2041B for ; Fri, 19 Feb 2016 12:02:15 +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 1aWjjg-0007E9-2D; Fri, 19 Feb 2016 12:00:36 +0000 Received: from mail-pa0-x22f.google.com ([2607:f8b0:400e:c03::22f]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aWjjH-0005Mm-AB for linux-arm-kernel@lists.infradead.org; Fri, 19 Feb 2016 12:00:13 +0000 Received: by mail-pa0-x22f.google.com with SMTP id fl4so49473417pad.0 for ; Fri, 19 Feb 2016 03:59:51 -0800 (PST) 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=3KfQ+OArvsigq+c5NGM9RY2FjkLPtp62AllqHkY2u9U=; b=J9FlHPPMV1UAwNk/Zz+0ll4vmU7fy1a+gBXQM+BdTbZU29UIQ+K60+ARq2/1KtWuAN tUFepzKF8i5MwEJurT4YjjlCllOpNZmVXk1hddOqCiEOFaJU53BaJKuCRkx6U52028Ee 2nIyP/RE0ASPK3WqDMmpzMeb+4cbVeVuSsGpA= 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=3KfQ+OArvsigq+c5NGM9RY2FjkLPtp62AllqHkY2u9U=; b=CLn81N5VoYYbd/2gRgHIeYl6EtheGWpOxy2vbnzR2Kmw/3k4vGKYtb0NTCcsVB1TFH sxd6jh9i5Bxl4G/l4FYUwthvyb9V/WPVEpaOJugF3aq3zLlrarZ0spLEmbwfeDt71zwX mgAAz/IqBfXK9BgIRMN4vMZl7U9Ify2MK5IuXNQQhhLnXFQNA4YVIYT4cY2UyfPDyu2V y2QTYfbSJ1Ss2fGs2GEkG3uK612UPoctjQpPJWRg9gQdDd9ErcHzr3L8C4JFyAHAUJMw KonFfqKnInAbvpW5u3hdYG2lP6jNze8BzjjLDDNka/5QHLLDJY1zqBHTjV5dqWCbfyax ixtg== X-Gm-Message-State: AG10YOQSugHhnsx/UMQNUChFWCMD26b/ow/h5V69NJQTDevpXE+WJio1nDFLLfca2IpltbER X-Received: by 10.66.225.177 with SMTP id rl17mr17549647pac.46.1455883190591; Fri, 19 Feb 2016 03:59:50 -0800 (PST) Received: from docularxu-ThinkPad-T440p.219.146.1.66 ([60.206.230.40]) by smtp.gmail.com with ESMTPSA id r80sm17411710pfi.9.2016.02.19.03.59.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Feb 2016 03:59:49 -0800 (PST) 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, xuyiping@hisilicon.com, bintian.wang@huawei.com, haojian.zhuang@linaro.org Subject: [PATCH V5 3/3] arm64: dts: add Hi6220 spi configuration nodes Date: Fri, 19 Feb 2016 19:58:27 +0800 Message-Id: <1455883107-8411-4-git-send-email-guodong.xu@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455883107-8411-1-git-send-email-guodong.xu@linaro.org> References: <1455883107-8411-1-git-send-email-guodong.xu@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160219_040011_488040_F5E8D31C X-CRM114-Status: GOOD ( 11.02 ) 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: dan.zhao@hisilicon.com, devicetree@vger.kernel.org, w.f@huawei.com, linux-kernel@vger.kernel.org, kong.kongxinwei@hisilicon.com, zhongkaihua@huawei.com, linux-arm-kernel@lists.infradead.org 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.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 Signed-off-by: Zhong Kaihua Signed-off-by: Wei Xu --- arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 1 + arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 15 +++++++++++++++ arch/arm64/boot/dts/hisilicon/hikey-pinctrl.dtsi | 21 +++++++++++++++++++++ 3 files changed, 37 insertions(+) diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts index 985a2ad..5c9ee31 100644 --- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts @@ -20,6 +20,7 @@ serial1 = &uart1; /* BT UART */ serial2 = &uart2; /* LS Expansion UART0 */ serial3 = &uart3; /* LS Expansion UART1 */ + spi0 = &spi_0; }; chosen { diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi index e96cc3c..dcca83b 100644 --- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi @@ -585,5 +585,20 @@ clock-names = "apb_pclk"; status = "ok"; }; + + spi_0: 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 = "ok"; + }; }; }; 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 {