From patchwork Sat Apr 21 11:28:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10354085 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 2970F60231 for ; Sat, 21 Apr 2018 11:35:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 234A4288FC for ; Sat, 21 Apr 2018 11:35:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1730728915; Sat, 21 Apr 2018 11:35:28 +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 6B5C9288FC for ; Sat, 21 Apr 2018 11:35:25 +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=lc70GlRhKHS1zW04cVtdWmk+jOvNe86HmHrz/PiuwC0=; b=e+krLbNmCC6b3VAh3aPVJ22H6M sO9/3uYjvloq9unLnS7A9METPMSThY/VmUX+xE11/h3EAYFm0B8JZqahMHXKRXcjJVWT74H29VoQm RKTiitGGWPkFaf0ty1uC34jtiu9MAFXxDueYZRes72ddVsGbbFOMkqxeTo+durP8oL0DlxnVoAiUZ R1z8eC0FP8WultNZFQRh6wSaALQCN40PYpJadTO06LPPK05IhLt94z5+EksIuF/FXygkUT2qdaVJN 4HZP+aHgH3KSbtxWg1txjwe72fukiKDOpd7/RgfURw/7EXg99IbeQ59AZ7ZbUhrFpk93cbuomeVOt 3zmh7pvg==; 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 1f9qnV-0005KW-79; Sat, 21 Apr 2018 11:35:17 +0000 Received: from mout.kundenserver.de ([212.227.126.187]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f9qi4-0001PY-Ds; Sat, 21 Apr 2018 11:29:45 +0000 Received: from localhost.localdomain ([95.90.209.130]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MAywa-1fJibn2uUG-00A1k1; Sat, 21 Apr 2018 13:29:15 +0200 From: Stefan Wahren To: Rob Herring , Mark Rutland , Eric Anholt , Catalin Marinas , Will Deacon Subject: [PATCH V2 1/9] ARM: dts: bcm283x: Fix PWM pin assignment Date: Sat, 21 Apr 2018 13:28:34 +0200 Message-Id: <1524310122-9439-2-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524310122-9439-1-git-send-email-stefan.wahren@i2se.com> References: <1524310122-9439-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:c7aARocni3wZkCZx5ER8/mLWoudp0MWtemywuMmTXLlPe1zuQLv /qPD9VZQ8Oq696bEFCp8VRYW3nrh9swVVLnyaqtQYR5NzCCo/+3/+vfGZDrsQ/HmjPDooG0 SOo349noGnE4QQr3JlNu0L5BL+9/AnU0rbvZ8KDopxf4WCo58jQebNRnWIwiA0LNE2tDVUI ZQO2oJYneLbYs7LZTq6Yg== X-UI-Out-Filterresults: notjunk:1; V01:K0:+iOAIvJoFXM=:xLkspvd4RxsbPZsokDu1sZ GJJPJhgs649owzHpEAy7dMRti+wUnuuRaBhY/vP8QNiD3nk10o5GiJJ/LtOmq4lF5qSaxBlYp W7iVJ2K0rgdJAUf6bHfjqmMa60XgZBqxUi5eXZe/URPngNHiT30icMzOb/9LM9mxHBtaUXhQm lkCNKGRG6NLqfuph9slS1tSM8hZETZW/fERbywQIST4iDN2G44Yq/16dNcmfAhW+LLtYETuEA W+sSzRHAvA7OCP78ffxvWhNN990LRQ2wR5C1mNcEsz1B1ZCj2Ul2NFnuCPF3xO3E4LnSC4gnC 4/y5NnyFipXl7JpPb85o63XV26n7049EI53M1JDhpjorzsf7YHAiQ6kbaBaDJW7Jr5qgIlxT+ 2ZakkVX8HuAHsEEaLTNnaWdrRlXU5CbB36ZL1aw+Ty3gLv9FHjkBud6WZO/MR94dTY0MT9n/i 7YGzqLqdP5htsZXi7XbqXEVC5r2Ba8H9CjIwIqSmK9qyNGUB6S9C9tv19MZlpMC8/uyRYYArb IQYGZv1FzjyAK3qS5kco+kLvPi0mj6/Z1aFZxKe/GdQ19mo86adP3bEEZdGkruOyRfCtDFpyb LZZCcaanK0d253A8dpIC+hkZPLZi7h0nUlObYuME3Wk34iYt+CzI9hEJReoHiLyHlHlshlAR9 jRr7WwPAOpCMSltAcn7zgASGqPQ+hEAItPWTcc4TJpTGkHjNjLl0zp3zE9J7b2QQX03qfbH70 v+1vTNukIJodeno9KDhb5CE8YOE5M8zJnxp7EA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180421_042940_792696_1170BD9F X-CRM114-Status: GOOD ( 16.73 ) 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 Reviewed-by: Eric Anholt --- 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";