From patchwork Fri Apr 13 17:27:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10340675 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 8D48360329 for ; Fri, 13 Apr 2018 17:32:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 783E3285E4 for ; Fri, 13 Apr 2018 17:32:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C98928657; Fri, 13 Apr 2018 17:32:52 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 44850285E4 for ; Fri, 13 Apr 2018 17:32:51 +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=DhDeYFSNNJQgPjqMjKKi6FhSX0SE6hYi1SAAIr3VVJA=; b=IWEIq/G/VadnBtD1mbhiYXdCsG gl4laH6OIsk0/kB2+BtQ1fEkkSD2zvJYQNjyLuUCB+A7uAxZb2tQ2jdo9IQJowAbCfp7N6TyQzd3z PbnrPzcHpK6VG77XNgjGQn9dBr236VJyW3MOWFhAETQL+Xnl6JJBm2FPoSuOKuML3NB4ssQYOflcb UY8H7oihum30wVA84V262UlQlfPLPub1cxkuba6kP5I6QjVbfLSaOQyXMTzuxvz3Mksh6W4NHSzha Y5iQs4z6Bf3UPTJQQGB+iX5iZyiyn0nqtNDWg7kDlVRae8OiipUJlWJZdtBsnxR17SGrhJHwM9RF6 RpsO3tiQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f72Yy-0007BT-GH; Fri, 13 Apr 2018 17:32:40 +0000 Received: from mout.kundenserver.de ([212.227.126.133]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f72VF-0003rz-FK; Fri, 13 Apr 2018 17:28:56 +0000 Received: from localhost.localdomain ([95.90.209.130]) by mrelayeu.kundenserver.de (mreue003 [212.227.15.167]) with ESMTPSA (Nemesis) id 0M21dP-1eJ3VS0OMN-00tzZJ; Fri, 13 Apr 2018 19:28:25 +0200 From: Stefan Wahren To: Rob Herring , Mark Rutland , Eric Anholt , Catalin Marinas , Will Deacon Subject: [PATCH 1/9] ARM: dts: bcm283x: Fix PWM pin assignment Date: Fri, 13 Apr 2018 19:27:50 +0200 Message-Id: <1523640478-4448-2-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523640478-4448-1-git-send-email-stefan.wahren@i2se.com> References: <1523640478-4448-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:tbUQCOSfTqYzTdKK/p+CW/BtxZx1+STMp6IS3kqNzpT3tvdLdpG ghP/5K0xe+U1E2eZFO7z/fumrsE98HPtctKt/ntMExIgrzTfvXgldsEC2xML9UWTJYqm2Z2 5uEDau2nBwjFBUQtm0Jg88iqIQ5H5D29I8vOn/5rvUKUlPNFUkDEajVzOCGpdhe1NR+Zc9Q u930QQpHe9icjBWNo2OOg== X-UI-Out-Filterresults: notjunk:1; V01:K0:nLdrZW6uNIA=:w8nFmvffDI7vHHH/ATHhaT M47Wk7u2wZE12Yt7Yl5WUMt3oheLPaUquTM/cUlGjBseJdrvyNGzrSsY00W3OxEtvnIBmgXi+ DTKz43fI5h73y0Pt5i2RtQ53euMBjrGdY7Ksd8ncYfAgT1jJs2Xo0REa5F8qSvH12u5HCfIMj UwtqQ3ddU9jahpM3hK3N6DWBv0yxr3jTSZkClg6qzuAWFSg1IDdWL/HsN66nqgO1/YvFvOU7/ W9GgdrpVUit5/rrb/imrr1jLrHhq1Y0Jm5cmOQUrRubPEDtH0+mbBrHIFo7CC86Je4RcmR8U1 nYSBdOluYuIij676iaAx3xRomu6lDqidvBKIOZInhIeT3Pm1pnei0vAaPrKya7RL3iFaD0Dwt mzcHM3y1BxrmSTDjo99sHhYV4hXjTHyeTOMrrbwoc4q6FzBmx+PLFyTvNBDVtuYe+NkN3rNpN V5qqvxjBtqKgcXaIMzKPk8Tou8/kZHmONpx8Po005ZHfhVul6kHCYRnylbXyBpu5b+mLA7MkS Cy4FnkAQ65vugE9k6JQbT+EZMW4CF/qE5dcNHW5uc0lcOD9NWKykgS32lH+9C0o6cvYAt/ndO f+igFLbIyLDAtSe2+srm2/jmjU1UCPRXi8prK+xeEaZnV0F+WwpPM9VrH22019jGzYI14Rifb 4ZyLjveYGfehZHhW5O4EFKvmVrtOzxjaLi0pQUDaQn+4JDls00zlhuCF3LhaAxLMYzv3G0cnv vXVI43IxdTpQF7S7rv1v0DNj6SmwunqRvGd4zQ== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180413_102849_852696_B4A40C17 X-CRM114-Status: GOOD ( 15.97 ) 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 , Arnd Bergmann , Scott Branden , Ray Jui , Phil Elwell , Alexander Graf , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, 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-Virus-Scanned: ClamAV using ClamSMTP All RPi 1 and 2 boards used the PWM (audio out) on pin 40 and 45. So it was easy to define them in bcm2835-rpi.dtsi. Starting with RPi 3 this wont work anymore, because it uses pin 40 and 41. Furthermore the Zero variants doesn't have audio out. This patch fixes this pin conflict by moving the PWM node to the board-level. Change summary: RPi 3 B: PWM1 45 -> 41 Zero, Zero W: PWM disabled all other: no functional change Reported-by: Baruch Siach 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.dtsi | 6 ------ arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 6 ++++++ arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 6 ++++++ 8 files changed, 42 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts index aa1fc7b..2cd9c5e 100644 --- a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts +++ b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts @@ -101,6 +101,12 @@ hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; +&pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>; + status = "okay"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_gpio14>; diff --git a/arch/arm/boot/dts/bcm2835-rpi-a.dts b/arch/arm/boot/dts/bcm2835-rpi-a.dts index 425f6b0..067d1f0 100644 --- a/arch/arm/boot/dts/bcm2835-rpi-a.dts +++ b/arch/arm/boot/dts/bcm2835-rpi-a.dts @@ -96,6 +96,12 @@ hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>; }; +&pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>; + status = "okay"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_gpio14>; diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts index effa195..cfbdaac 100644 --- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts +++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts @@ -103,6 +103,12 @@ hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; +&pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>; + status = "okay"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_gpio14>; diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts index 772ec3b..5641d16 100644 --- a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts +++ b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts @@ -96,6 +96,12 @@ hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; +&pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>; + status = "okay"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_gpio14>; diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts index 434483d..31ff602 100644 --- a/arch/arm/boot/dts/bcm2835-rpi-b.dts +++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts @@ -91,6 +91,12 @@ hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>; }; +&pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>; + status = "okay"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_gpio14>; diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi index 6c3cfaa..cb2d6d7 100644 --- a/arch/arm/boot/dts/bcm2835-rpi.dtsi +++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi @@ -83,12 +83,6 @@ bus-width = <4>; }; -&pwm { - pinctrl-names = "default"; - pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>; - status = "okay"; -}; - &usb { power-domains = <&power RPI_POWER_DOMAIN_USB>; }; diff --git a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts index 5c339ad..2fef70a 100644 --- a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts +++ b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts @@ -41,6 +41,12 @@ hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; +&pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>; + status = "okay"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_gpio14>; diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts index 0b31d99..cc39b6f 100644 --- a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts +++ b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts @@ -42,6 +42,12 @@ }; }; +&pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio41>; + status = "okay"; +}; + /* uart0 communicates with the BT module */ &uart0 { pinctrl-names = "default";