From patchwork Thu Jul 20 19:37:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 9855625 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F3914602BA for ; Thu, 20 Jul 2017 19:38:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E48B2285DC for ; Thu, 20 Jul 2017 19:38:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D9414285ED; Thu, 20 Jul 2017 19:38:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 42B15285DC for ; Thu, 20 Jul 2017 19:38:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=7BFc8AtGc3NV/K0lGcc0seVb2zd1+0oyNeU6KVhK6A0=; b=MHMLQYoEtoP6c1di3V8uLW48TR 2hiz4pz5wCmvYKUhGLfqvR/cbaOIfYxzkvTSEf+5pXdWI8YVeds0e9trWayVoXbLSZKBulGj8qrFZ b6CkzeJ5FIJJZreZtOBqmHeygZtdGtuXVvfivzjhXaF4PUSM4brCo9KzhY1cJji9d2xkuVZiuxUjK bC70LkRW4/U/akXpbkOnmKD5+7nmf2jTrooVLunP/f0OUPwfC78uU2bcOdgZ2kV1V/IFxgAjd3R3u bJzYwNcfceF0DBF16kqvJrgBpQGNHl6o3HLRr5aQB9SqkCRrVHBW1ZX7fDf4fulccbRh09iluqUTe 7NZZDS1A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dYHGu-0000AO-PP; Thu, 20 Jul 2017 19:38:04 +0000 Received: from mout.kundenserver.de ([212.227.126.133]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dYHGp-00007t-Q6; Thu, 20 Jul 2017 19:38:02 +0000 Received: from localhost.localdomain ([95.90.209.44]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.167]) with ESMTPSA (Nemesis) id 0Ldwwm-1dxllq0XPg-00pxru; Thu, 20 Jul 2017 21:37:26 +0200 From: Stefan Wahren To: Eric Anholt , Rob Herring , Mark Rutland Subject: [PATCH 1/3] ARM: bcm283x: Define UART pinmuxing on board level Date: Thu, 20 Jul 2017 21:37:07 +0200 Message-Id: <1500579429-9101-2-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500579429-9101-1-git-send-email-stefan.wahren@i2se.com> References: <1500579429-9101-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K0:UG32TcGgw0YCq5LhHNZV08B/eyryJC2CoE2JXv2X1THA8zCYw88 B92pxqEZbXMC2SAP7n4kDJENBal2KXUhKFj5Z27WIXuXm1ViE9/FJ8e5pcEywP++SV+nByM C65+K/suIh9yRWp7EErfSrA9YTKYK8+a+sCUL8lA+Wifsw74nODW9K+QHWxKCzfpSf3Jdcx jnODUnnctfgDgKGr7c/jQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:xi92/0+/hbQ=:tUL3V6Fq46kcSXniVQOZex YGaaV/8CTJbgvRU1JIliE9rTKxwiotJBv6u6PaZ7Ep6uwQch94xFfK/wpA7tBM87HCy1q0NN1 SgQM08jTs7D9S6fYTlOk2kqEheOpmS8IT86den7WtYv950zaizP6YT3IQ9M+kVTYRy2AZXsKr 82RbnW4afDZSgjL3Bg2rkNOlktjVspMpmL7i4cq08al7+AebFQyYf5v1vs9St92Bp5+y0nQ9T 4sJvi6dGdNPZu89FW+mNFUU1eeq1duyB3i1F1iQQhEMQSHd8LnJrOcfwG9qoW+rAAu84MYHZC Mvw6L71NSgNF4/FGWIOo5N2VaCpns7+T0u0IhBrL8SNeM2gxDdWv3MH7SwG4rg801yqJBmZJn XTZwpcMUc0rsIj8YMBN3mfflQmbedDIM0l41e58t7fhgJJjePdsJDiz8ZqlJGMI4qsHIZ4UXD OZ70Why8Q3dmIn1yAYTX1MsiofyT+IqtZEfi0MsWnAsReDRXLif6mb0OSsCoMu8YE/zOZ4yUi zv3I/RdwBB1ZDtU82NcaipGqTmMsEhbdUDooD9a3Ga7zCjshRGS+FnQER9STcQjBB66z0nITH lxsr1pSYr4bqmJJsf6xAV9x3cvbGK6TQ/Dj1fXpjnxTjfb1yjF7nqx0DSTFUwiu93fce5w4Ez G/5ZziH6Yyu0AMMZ2bWidHzSzhKm+NWN0H7KhwFajaHgkuTcyGyZemTlVTDTFHHobcpc1b1Iy NYDcsSQ7lZp1TzUX3e9Fpa7klvmECECiPIm4Fw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170720_123800_189506_3755B55E X-CRM114-Status: GOOD ( 10.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Wahren , devicetree@vger.kernel.org, Florian Fainelli , Scott Branden , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Gerd Hoffmann MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Until RPI 3 and Zero W the pl011 (uart0) was always on pin 14/15. So in order to take care of them and other boards in the future, we need to define UART pinmuxing on board level. This work based on Eric Anholt's patch "ARM: bcm2385: Don't force pl011 onto pins 14/15." and Fabian Vogt's patch "ARM64: dts: bcm2837: assign uart0 to BT and uart1 to pin headers". Signed-off-by: Stefan Wahren --- arch/arm/boot/dts/bcm2835-rpi-a-plus.dts | 6 ++++++ arch/arm/boot/dts/bcm2835-rpi-a.dts | 6 ++++++ arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 6 ++++++ arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 6 ++++++ arch/arm/boot/dts/bcm2835-rpi-b.dts | 6 ++++++ arch/arm/boot/dts/bcm2835-rpi-zero.dts | 6 ++++++ arch/arm/boot/dts/bcm2835-rpi.dtsi | 2 +- arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 6 ++++++ arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 10 ++++++++++ 9 files changed, 53 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts index d070454..9f86649 100644 --- a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts +++ b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts @@ -99,3 +99,9 @@ &hdmi { hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_gpio14>; + status = "okay"; +}; diff --git a/arch/arm/boot/dts/bcm2835-rpi-a.dts b/arch/arm/boot/dts/bcm2835-rpi-a.dts index 46d078e..4b1af06 100644 --- a/arch/arm/boot/dts/bcm2835-rpi-a.dts +++ b/arch/arm/boot/dts/bcm2835-rpi-a.dts @@ -94,3 +94,9 @@ &hdmi { hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>; }; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_gpio14>; + status = "okay"; +}; diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts index 432088e..a846f1e 100644 --- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts +++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts @@ -101,3 +101,9 @@ &hdmi { hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_gpio14>; + status = "okay"; +}; diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts index 4133bc2..e860964 100644 --- a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts +++ b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts @@ -94,3 +94,9 @@ &hdmi { hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_gpio14>; + status = "okay"; +}; diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts index 4d56fe3..5d77f3f 100644 --- a/arch/arm/boot/dts/bcm2835-rpi-b.dts +++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts @@ -89,3 +89,9 @@ &hdmi { hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>; }; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_gpio14>; + status = "okay"; +}; diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero.dts b/arch/arm/boot/dts/bcm2835-rpi-zero.dts index 79a20d5..7036240 100644 --- a/arch/arm/boot/dts/bcm2835-rpi-zero.dts +++ b/arch/arm/boot/dts/bcm2835-rpi-zero.dts @@ -103,3 +103,9 @@ &hdmi { hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_gpio14>; + status = "okay"; +}; diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi index e55b362..e36c392 100644 --- a/arch/arm/boot/dts/bcm2835-rpi.dtsi +++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi @@ -39,7 +39,7 @@ }; alt0: alt0 { - brcm,pins = <4 5 7 8 9 10 11 14 15>; + brcm,pins = <4 5 7 8 9 10 11>; brcm,function = ; }; }; diff --git a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts index bf19e8c..e8de414 100644 --- a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts +++ b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts @@ -39,3 +39,9 @@ &hdmi { hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_gpio14>; + status = "okay"; +}; diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts index 972f14d..20725ca 100644 --- a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts +++ b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts @@ -19,7 +19,17 @@ }; }; +/* uart0 communicates with the BT module */ +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_gpio32 &gpclk2_gpio43>; + status = "okay"; +}; + +/* uart1 is mapped to the pin header */ &uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_gpio14>; status = "okay"; };