From patchwork Sun Jul 30 17:10:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 9870631 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 D38A7603B4 for ; Sun, 30 Jul 2017 17:24:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCDA3283FF for ; Sun, 30 Jul 2017 17:24:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A75C62841E; Sun, 30 Jul 2017 17:24: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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham 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 20BCF2841D for ; Sun, 30 Jul 2017 17:24:06 +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=qcCbFnMcMBqDvN25gaSAulef6e fQOS8D6G4z/lh8TRtk7xZ5/OLe3/YQ1j/mjPzoEG3ysh1L/csXQiiPCndV1TOwqHiOc+isTX6700g XlYePI1G0VZ6Z/5xeR4qjYydnU5yOVC2kYUlKYn/CU1t/Okbn8Hf+arNEi0xQA2a5oL4/FvQN6oX0 0d+zB8vnnXjGHqB0H3sa7QJgAgQ7wQ5vMz4Yji9CHBPjHv7e25TRLPlteGQ5sHVtX7XqqYtb142m+ Z/R7k1DZcOSxf/xzSgihKa4yNWUyaWWK+4YWfZOYRL/A3AcyB1SrGxIMQHVs0k/uxVliuaFy/hGSW zkoCV1yw==; 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 1dbrw2-0004jQ-PP; Sun, 30 Jul 2017 17:23:22 +0000 Received: from mout.kundenserver.de ([217.72.192.74]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dbrkS-0007wf-LY; Sun, 30 Jul 2017 17:11:26 +0000 Received: from localhost.localdomain ([95.90.209.10]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.183]) with ESMTPSA (Nemesis) id 0MN4ps-1dVG1v1YEq-006dxx; Sun, 30 Jul 2017 19:10:47 +0200 From: Stefan Wahren To: Eric Anholt , Rob Herring , Mark Rutland Subject: [PATCH V2 1/3] ARM: bcm283x: Define UART pinmuxing on board level Date: Sun, 30 Jul 2017 19:10:32 +0200 Message-Id: <1501434634-2325-2-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1501434634-2325-1-git-send-email-stefan.wahren@i2se.com> References: <1501434634-2325-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K0:YqXJ6F7nmREqAouB9U9F6B5/eiUymK1FSUqWyclQKYgwCgYvKLK Xc70aQaDGjmC23M/cRVZCfUbxonC1Hm2vVd94veFXTXHac6A8qgA5waiokQkmHghLTAxM9F EoqPbeZ0aOBBWLxvi8M3b2Ov5MROcCuBJPt20dTMVoirzM7R0MypPa9yUg2+zJFcY1COKTW Vcn93Bym/aVP/ce9ybW0w== X-UI-Out-Filterresults: notjunk:1; V01:K0:cK9+r5N/pW0=:drkxudiU/IgqvSR18KmVRs 1BlMZzJVYGOL36unGdJjdsvRs6LhuIJUFFq0VZMOCLy6ad33mYZO6rYdCohgwgZSEfeJ+oF0O TESwehxpk/Aas2Kl0Fvb0G36fyBrPFP5FnJZfigawL/8qVDZ2lrfYz+vxhrCo8jT8+3UTtKzH Gbk+TW3rn9g1mLs7fXl3UaDda87wlLDlt1GuEqPeXD+xhbm8rfS0FnNwMDr3xJBjwnE+bZ4Cr 5dEAAHPHEF1koLD0IaUzqG3f28bYbkqn3vDjy0BzT/dqVOeT7TT1UsgE/XEZFSddQLyg8+R7i sXHmN/JGKteHPf+tEIbGYXhA/pRtMwR7D8cFAHqNrR4Ra5gZiEAAxe+VyoFxcdFE5ObdqfXWK UnJwLpsAmvMh26+uIQznRsxonTWicDPxVz0Xt2ruqtwTPYi5RyxWv8KCPAwvzfO2c/LNZbzQ9 0T6y1Wg4OGJhDp+rLIrbS4UWJgFaNj74FaLq4/F+76EXVHguHcV3XasBVcaN9TQIw9TPayMWN xLU5o0LwcdAJeohmRqHYkn3DIdPykLuLxgSySwU50ap14uKMZBJq33NXmOGCS6jMxlgOZF/ra aATqrm+bOMyYuosYQqM86xTJfb27hIvl6iEPsvoosKLrPY+59YCYsTWwELkyJMkkOo7dtFvwT 6qYr7rr4/m8EflttepFk6J9OR9Gn+rgNJ1VbejY+VsBIFt5VNeJJuDH/Nyd+sJnK9skmkwmFf 2NlcO4PqpiiW6vhMxmcg8SkPBWQ8fY8WoWsbUw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170730_101125_093599_9567EE1E X-CRM114-Status: UNSURE ( 9.89 ) X-CRM114-Notice: Please train this message. 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"; };