From patchwork Sun Apr 9 18:09:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ralph Sennhauser X-Patchwork-Id: 9671709 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 7428660365 for ; Sun, 9 Apr 2017 18:10:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B20B27F94 for ; Sun, 9 Apr 2017 18:10:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F7B727FA6; Sun, 9 Apr 2017 18:10:49 +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_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM 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 BB69C27F94 for ; Sun, 9 Apr 2017 18:10:48 +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=mGbBHnjH2iMwscPA9EdS0VQdm6jjViFlOiYC7znKV+0=; b=D0uYLhGqYHSzlNp1Gs5rbX6Wgy nrTGZ31j2zGsFZ1o4Z5+3s6lKck2UFw/7B6aGjdz/zzFTh0pjukOs6OzgwD+7K6It76ZMnzu6TCmw o265mV0Ttzp951ZIE+lyCXAlw3AuWILoLp0sUKub08dJmLz/qjW0fxxIVW6lUcJvPAMUrVCCrU939 dRwy3x4dmcZ55vE9gJ8NFtmOuOaVLVV7ZYSVsDBVU2E1/S35x6plP/uYZczsXy2iEGoGW7aWTjLXx kWCv34YxNqLwkkdtrw58OWINsbWlpugFVV6HI6VtK/gel0gbtJcmCY63FBE5DIGAdBUWJ9sJ/WpEq AYz21Syg==; 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 1cxHIV-0003M6-B4; Sun, 09 Apr 2017 18:10:47 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cxHHr-0001GS-QQ for linux-arm-kernel@lists.infradead.org; Sun, 09 Apr 2017 18:10:13 +0000 Received: by mail-wm0-x241.google.com with SMTP id q125so6156701wmd.3 for ; Sun, 09 Apr 2017 11:09:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XLRrgvpXvQoAFSDAIj+QIYx+z+vreN6y2RUqd51+NLQ=; b=bKXdtnbpCwChK11hloyE2vHXkGw4C9A/WtqkPIU0UikYHzUr+IzWC7gJjurLCfjLxe yDJrLvPHp1sac4SGL57Tyyb/OLFnnplEtc7QsQHrT2c/XvCTZD9ssB98AAhD9+sEurmk W3JG0WaYckFNYm1luyAcJfpQ6CnZolP63NkM3buhKguFENSwJqtvfFNbKnR31DKJ+f6O B0yd1XK9f/LKNii1Di7K4Z3Hkzb0E1k0RF/R1YSE01kKjyszGyTlrF2V2U/zsbqkd7iU dEw6Y/RyVr1RrByPzP5gZ58/cEoRXofv7sGdrdxySX+1te3jJCHPZdK+1Lil7aCnZFQ9 yq3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=XLRrgvpXvQoAFSDAIj+QIYx+z+vreN6y2RUqd51+NLQ=; b=FynqtHl3RQdMivZ4QGlFWEI6ZdJawCUSxKWo7vrGMNirJhOnFqVPj83O1HZUR9Q/rp lNg4wYtVjUAjDn/we1O2StpwbjgDPw3Shfq7ZalQts3jfJj0/mcGyOulCpvVmH0G3o6j +A4BARPtRi5PzKDj93yoD8QuYTix4WMPzaJoD3b3M7TKsw39hbMN9dGFyKUtxvzbuPHy APPAbR/1qSiCWTxUXXph601UxDUU1BRQ7OvrBrULtJi4lEfo6D3HGHZid7D8KyeYjBNk Kp3mh3bShMVZEp7+7XFD+y7dKhpZCv3L6oogX8iBLxnU6B4rt7Oel6dcd3OeC93KJqXy mGCw== X-Gm-Message-State: AN3rC/4RKEYMSRq87QmVz836uMT5u0nP7U1UeOA72oLHBOapiZFJRnMDtKH0yYgk9aFrAQ== X-Received: by 10.28.65.65 with SMTP id o62mr6501736wma.14.1491761385555; Sun, 09 Apr 2017 11:09:45 -0700 (PDT) Received: from localhost.lan ([37.209.189.139]) by smtp.googlemail.com with ESMTPSA id b66sm14366139wrd.29.2017.04.09.11.09.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 09 Apr 2017 11:09:44 -0700 (PDT) From: Ralph Sennhauser To: Thierry Reding Subject: [PATCH v5 2/4] ARM: dts: mvebu: Add PWM properties to .dtsi files Date: Sun, 9 Apr 2017 20:09:28 +0200 Message-Id: <20170409180931.4884-3-ralph.sennhauser@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170409180931.4884-1-ralph.sennhauser@gmail.com> References: <20170409180931.4884-1-ralph.sennhauser@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170409_111008_329613_C30BD3B2 X-CRM114-Status: GOOD ( 11.65 ) 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: Mark Rutland , Andrew Lunn , Jason Cooper , Alexandre Courbot , Linus Walleij , Russell King , linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, Gregory Clement , devicetree@vger.kernel.org, Rob Herring , linux-gpio@vger.kernel.org, Ralph Sennhauser , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth 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 From: Andrew Lunn Add properties to the GPIO nodes to allow them to be also used as PWM lines. Signed-off-by: Andrew Lunn URL: https://patchwork.ozlabs.org/patch/427294/ [Ralph Sennhauser: Add new compatible string marvell,armada-370-xp-gpio] Signed-off-by: Ralph Sennhauser Tested-by: Andrew Lunn --- arch/arm/boot/dts/armada-370.dtsi | 19 ++++++++++++++----- arch/arm/boot/dts/armada-xp-mv78230.dtsi | 16 ++++++++++++---- arch/arm/boot/dts/armada-xp-mv78260.dtsi | 19 ++++++++++++++----- arch/arm/boot/dts/armada-xp-mv78460.dtsi | 19 ++++++++++++++----- 4 files changed, 54 insertions(+), 19 deletions(-) diff --git a/arch/arm/boot/dts/armada-370.dtsi b/arch/arm/boot/dts/armada-370.dtsi index cc011c8..5e815cc 100644 --- a/arch/arm/boot/dts/armada-370.dtsi +++ b/arch/arm/boot/dts/armada-370.dtsi @@ -137,29 +137,38 @@ }; gpio0: gpio@18100 { - compatible = "marvell,orion-gpio"; - reg = <0x18100 0x40>; + compatible = "marvell,armada-370-xp-gpio", + "marvell,orion-gpio"; + reg = <0x18100 0x40>, <0x181c0 0x08>; + reg-names = "gpio", "pwm"; ngpios = <32>; gpio-controller; #gpio-cells = <2>; + #pwm-cells = <2>; interrupt-controller; #interrupt-cells = <2>; interrupts = <82>, <83>, <84>, <85>; + clocks = <&coreclk 0>; }; gpio1: gpio@18140 { - compatible = "marvell,orion-gpio"; - reg = <0x18140 0x40>; + compatible = "marvell,armada-370-xp-gpio", + "marvell,orion-gpio"; + reg = <0x18140 0x40>, <0x181c8 0x08>; + reg-names = "gpio", "pwm"; ngpios = <32>; gpio-controller; #gpio-cells = <2>; + #pwm-cells = <2>; interrupt-controller; #interrupt-cells = <2>; interrupts = <87>, <88>, <89>, <90>; + clocks = <&coreclk 0>; }; gpio2: gpio@18180 { - compatible = "marvell,orion-gpio"; + compatible = "marvell,armada-370-xp-gpio", + "marvell,orion-gpio"; reg = <0x18180 0x40>; ngpios = <2>; gpio-controller; diff --git a/arch/arm/boot/dts/armada-xp-mv78230.dtsi b/arch/arm/boot/dts/armada-xp-mv78230.dtsi index 07c5090..f77168c9 100644 --- a/arch/arm/boot/dts/armada-xp-mv78230.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi @@ -202,25 +202,33 @@ internal-regs { gpio0: gpio@18100 { - compatible = "marvell,orion-gpio"; - reg = <0x18100 0x40>; + compatible = "marvell,armada-370-xp-gpio", + "marvell,orion-gpio"; + reg = <0x18100 0x40>, <0x181c0 0x08>; + reg-names = "gpio", "pwm"; ngpios = <32>; gpio-controller; #gpio-cells = <2>; + #pwm-cells = <2>; interrupt-controller; #interrupt-cells = <2>; interrupts = <82>, <83>, <84>, <85>; + clocks = <&coreclk 0>; }; gpio1: gpio@18140 { - compatible = "marvell,orion-gpio"; - reg = <0x18140 0x40>; + compatible = "marvell,armada-370-xp-gpio", + "marvell,orion-gpio"; + reg = <0x18140 0x40>, <0x181c8 0x08>; + reg-names = "gpio", "pwm"; ngpios = <17>; gpio-controller; #gpio-cells = <2>; + #pwm-cells = <2>; interrupt-controller; #interrupt-cells = <2>; interrupts = <87>, <88>, <89>; + clocks = <&coreclk 0>; }; }; }; diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi index 64e936a..0ecfaf4 100644 --- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi @@ -285,29 +285,38 @@ internal-regs { gpio0: gpio@18100 { - compatible = "marvell,orion-gpio"; - reg = <0x18100 0x40>; + compatible = "marvell,armada-370-xp-gpio", + "marvell,orion-gpio"; + reg = <0x18100 0x40>, <0x181c0 0x08>; + reg-names = "gpio", "pwm"; ngpios = <32>; gpio-controller; #gpio-cells = <2>; + #pwm-cells = <2>; interrupt-controller; #interrupt-cells = <2>; interrupts = <82>, <83>, <84>, <85>; + clocks = <&coreclk 0>; }; gpio1: gpio@18140 { - compatible = "marvell,orion-gpio"; - reg = <0x18140 0x40>; + compatible = "marvell,armada-370-xp-gpio", + "marvell,orion-gpio"; + reg = <0x18140 0x40>, <0x181c8 0x08>; + reg-names = "gpio", "pwm"; ngpios = <32>; gpio-controller; #gpio-cells = <2>; + #pwm-cells = <2>; interrupt-controller; #interrupt-cells = <2>; interrupts = <87>, <88>, <89>, <90>; + clocks = <&coreclk 0>; }; gpio2: gpio@18180 { - compatible = "marvell,orion-gpio"; + compatible = "marvell,armada-370-xp-gpio", + "marvell,orion-gpio"; reg = <0x18180 0x40>; ngpios = <3>; gpio-controller; diff --git a/arch/arm/boot/dts/armada-xp-mv78460.dtsi b/arch/arm/boot/dts/armada-xp-mv78460.dtsi index d1383dd..670ece4c 100644 --- a/arch/arm/boot/dts/armada-xp-mv78460.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78460.dtsi @@ -323,29 +323,38 @@ internal-regs { gpio0: gpio@18100 { - compatible = "marvell,orion-gpio"; - reg = <0x18100 0x40>; + compatible = "marvell,armada-370-xp-gpio", + "marvell,orion-gpio"; + reg = <0x18100 0x40>, <0x181c0 0x08>; + reg-names = "gpio", "pwm"; ngpios = <32>; gpio-controller; #gpio-cells = <2>; + #pwm-cells = <2>; interrupt-controller; #interrupt-cells = <2>; interrupts = <82>, <83>, <84>, <85>; + clocks = <&coreclk 0>; }; gpio1: gpio@18140 { - compatible = "marvell,orion-gpio"; - reg = <0x18140 0x40>; + compatible = "marvell,armada-370-xp-gpio", + "marvell,orion-gpio"; + reg = <0x18140 0x40>, <0x181c8 0x08>; + reg-names = "gpio", "pwm"; ngpios = <32>; gpio-controller; #gpio-cells = <2>; + #pwm-cells = <2>; interrupt-controller; #interrupt-cells = <2>; interrupts = <87>, <88>, <89>, <90>; + clocks = <&coreclk 0>; }; gpio2: gpio@18180 { - compatible = "marvell,orion-gpio"; + compatible = "marvell,armada-370-xp-gpio", + "marvell,orion-gpio"; reg = <0x18180 0x40>; ngpios = <3>; gpio-controller;