From patchwork Tue Nov 22 16:13:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 83437 Delivered-To: patch@linaro.org Received: by 10.182.1.168 with SMTP id 8csp2234139obn; Tue, 22 Nov 2016 08:18:51 -0800 (PST) X-Received: by 10.98.218.87 with SMTP id w23mr26156889pfl.85.1479831531604; Tue, 22 Nov 2016 08:18:51 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id r7si513613ple.282.2016.11.22.08.18.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Nov 2016 08:18:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c9Dkc-0001Di-DF; Tue, 22 Nov 2016 16:16:54 +0000 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c9DiE-00075E-V1 for linux-arm-kernel@lists.infradead.org; Tue, 22 Nov 2016 16:14:29 +0000 Received: by mail-wm0-x231.google.com with SMTP id a197so33095991wmd.0 for ; Tue, 22 Nov 2016 08:14:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/p0VAj859t0KbuoXoB0Jzi4xQ+ITXl6tqlEvl0TkHVM=; b=A/oaaeZbbFWc4/8DODOWcZ31jKpfvxhViXb4IWzGo70EOWekoyaI95sVuR4mNu9NCt CF0P8O3NRstHvdV3xnKjtnW6nGMOgkDObe018ah6BEcT6ZgWWx3LGXFZWdCFWTYh6M96 mzl1VE9OBbdqRk5UXAt6+tEwbDonuYLUXQIdU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/p0VAj859t0KbuoXoB0Jzi4xQ+ITXl6tqlEvl0TkHVM=; b=IRPwi7TODr9L+7mv4j3Rjzzh7JtzgHS50UWSmgftvLsmPCHFPDY/tguScYax0M39Nj bsIs5Z2wEAZPc6CBXBHseDuYYFseJeMGEN759m2QqX4hIPEOn2UMMh7uOi5AOI83XPE5 MNe+r0SuomZ/qX4J7LlB6vFe1Xbt7e4QZWaEoh4XTAE24H9BpV1RbsmpyPzyLGCPcDSF 2TOj+ing1E3Nt8P17qjgU5u3mSh1L56IxiNBa5FAaSJOFm1H98Cf0ICUte0jL7zcFbtP 9JUc0Gmt/qw3PeNoGJ5sp2txEt5qA8eoIPNS1vScTswUb5p9SU5jgPmalxve+2e3vmGY gXGQ== X-Gm-Message-State: AKaTC00IX5K+TSITbd1fPNWHcF53pzDfkEfiz2Y1yPBtWf4lKLaKXio60SaHGWqxcjlEzEK8 X-Received: by 10.194.28.10 with SMTP id x10mr15290593wjg.157.1479831244923; Tue, 22 Nov 2016 08:14:04 -0800 (PST) Received: from lmenx321.st.com. ([80.215.80.240]) by smtp.gmail.com with ESMTPSA id v202sm3729369wmv.8.2016.11.22.08.14.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Nov 2016 08:14:04 -0800 (PST) From: Benjamin Gaignard X-Google-Original-From: Benjamin Gaignard To: lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, alexandre.torgue@st.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, thierry.reding@gmail.com, linux-pwm@vger.kernel.org, jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 7/7] add stm32 multi-functions timer driver in DT Date: Tue, 22 Nov 2016 17:13:27 +0100 Message-Id: <1479831207-32699-8-git-send-email-benjamin.gaignard@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1479831207-32699-1-git-send-email-benjamin.gaignard@st.com> References: <1479831207-32699-1-git-send-email-benjamin.gaignard@st.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161122_081427_357556_FA983169 X-CRM114-Status: UNSURE ( 9.25 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:231 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linaro-kernel@lists.linaro.org, Benjamin Gaignard , linus.walleij@linaro.org, arnaud.pouliquen@st.com, gerald.baeza@st.com, fabrice.gasnier@st.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Add timers MFD and childs into DT for stm32f4. Define and enable pwm1 and pwm3 for stm32f469 discovery board Signed-off-by: Benjamin Gaignard --- arch/arm/boot/dts/stm32f429.dtsi | 246 ++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/stm32f469-disco.dts | 29 ++++ 2 files changed, 275 insertions(+) -- 1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/boot/dts/stm32f429.dtsi b/arch/arm/boot/dts/stm32f429.dtsi index bca491d..28a0fe9 100644 --- a/arch/arm/boot/dts/stm32f429.dtsi +++ b/arch/arm/boot/dts/stm32f429.dtsi @@ -355,6 +355,21 @@ slew-rate = <2>; }; }; + + pwm1_pins: pwm@1 { + pins { + pinmux = , + , + ; + }; + }; + + pwm3_pins: pwm@3 { + pins { + pinmux = , + ; + }; + }; }; rcc: rcc@40023810 { @@ -426,6 +441,237 @@ interrupts = <80>; clocks = <&rcc 0 38>; }; + + mfd_timer1: mfdtimer1@40010000 { + compatible = "st,stm32-mfd-timer1"; + reg = <0x40010000 0x400>; + clocks = <&rcc 0 160>; + clock-names = "mfd_timer_clk"; + interrupts = <27>; + status = "disabled"; + + pwm1: pwm1@40010000 { + compatible = "st,stm32-pwm1"; + status = "disabled"; + }; + + iiotimer1: iiotimer1@40010000 { + compatible = "st,stm32-iio-timer1"; + status = "disabled"; + }; + }; + + mfd_timer2: mfdtimer2@40000000 { + compatible = "st,stm32-mfd-timer2"; + reg = <0x40000000 0x400>; + clocks = <&rcc 0 128>; + clock-names = "mfd_timer_clk"; + interrupts = <28>; + status = "disabled"; + + pwm2: pwm2@40000000 { + compatible = "st,stm32-pwm2"; + status = "disabled"; + }; + iiotimer2: iiotimer2@40000000 { + compatible = "st,stm32-iio-timer2"; + status = "disabled"; + }; + }; + + mfd_timer3: mfdtimer3@40000400 { + compatible = "st,stm32-mfd-timer3"; + reg = <0x40000400 0x400>; + clocks = <&rcc 0 129>; + clock-names = "mfd_timer_clk"; + interrupts = <29>; + status = "disabled"; + + pwm3: pwm3@40000400 { + compatible = "st,stm32-pwm3"; + status = "disabled"; + }; + iiotimer3: iiotimer3@40000400 { + compatible = "st,stm32-iio-timer3"; + status = "disabled"; + }; + }; + + mfd_timer4: mfdtimer4@40000800 { + compatible = "st,stm32-mfd-timer4"; + reg = <0x40000800 0x400>; + clocks = <&rcc 0 130>; + clock-names = "mfd_timer_clk"; + interrupts = <30>; + status = "disabled"; + + pwm4: pwm4@40000800 { + compatible = "st,stm32-pwm4"; + status = "disabled"; + }; + iiotimer4: iiotimer4@40000800 { + compatible = "st,stm32-iio-timer4"; + status = "disabled"; + }; + }; + + mfd_timer5: mfdtimer5@40000C00 { + compatible = "st,stm32-mfd-timer5"; + reg = <0x40000C00 0x400>; + clocks = <&rcc 0 131>; + clock-names = "mfd_timer_clk"; + interrupts = <50>; + status = "disabled"; + + pwm5: pwm5@40000C00 { + compatible = "st,stm32-pwm5"; + status = "disabled"; + }; + iiotimer5: iiotimer5@40000800 { + compatible = "st,stm32-iio-timer5"; + status = "disabled"; + }; + }; + + mfd_timer6: mfdtimer6@40001000 { + compatible = "st,stm32-mfd-timer6"; + reg = <0x40001000 0x400>; + clocks = <&rcc 0 132>; + clock-names = "mfd_timer_clk"; + interrupts = <54>; + status = "disabled"; + + iiotimer6: iiotimer6@40001000 { + compatible = "st,stm32-iio-timer6"; + status = "disabled"; + }; + }; + + mfd_timer7: mfdtimer7@40001400 { + compatible = "st,stm32-mfd-timer7"; + reg = <0x40001400 0x400>; + clocks = <&rcc 0 133>; + clock-names = "mfd_timer_clk"; + interrupts = <55>; + status = "disabled"; + + iiotimer7: iiotimer7@40001400 { + compatible = "st,stm32-iio-timer7"; + status = "disabled"; + }; + }; + + mfd_timer8: mfdtimer8@40010400 { + compatible = "st,stm32-mfd-timer8"; + reg = <0x40010400 0x400>; + clocks = <&rcc 0 161>; + clock-names = "mfd_timer_clk"; + interrupts = <46>; + status = "disabled"; + + pwm8: pwm8@40010400 { + compatible = "st,stm32-pwm8"; + status = "disabled"; + }; + + iiotimer8: iiotimer7@40010400 { + compatible = "st,stm32-iio-timer8"; + status = "disabled"; + }; + }; + + mfd_timer9: mfdtimer9@40014000 { + compatible = "st,stm32-mfd-timer9"; + reg = <0x40014000 0x400>; + clocks = <&rcc 0 176>; + clock-names = "mfd_timer_clk"; + interrupts = <24>; + status = "disabled"; + + pwm9: pwm9@40014000 { + compatible = "st,stm32-pwm9"; + status = "disabled"; + }; + + iiotimer9: iiotimer9@40014000 { + compatible = "st,stm32-iio-timer9"; + status = "disabled"; + }; + }; + + mfd_timer10: mfdtimer10@40014400 { + compatible = "st,stm32-mfd-timer10"; + reg = <0x40014400 0x400>; + clocks = <&rcc 0 177>; + clock-names = "mfd_timer_clk"; + interrupts = <25>; + status = "disabled"; + + pwm10: pwm10@40014400 { + compatible = "st,stm32-pwm10"; + status = "disabled"; + }; + }; + + mfd_timer11: mfdtimer11@40014800 { + compatible = "st,stm32-mfd-timer11"; + reg = <0x40014800 0x400>; + clocks = <&rcc 0 178>; + clock-names = "mfd_timer_clk"; + interrupts = <26>; + status = "disabled"; + + pwm11: pwm11@40014800 { + compatible = "st,stm32-pwm11"; + status = "disabled"; + }; + }; + + mfd_timer12: mfdtimer12@40001800 { + compatible = "st,stm32-mfd-timer12"; + reg = <0x40001800 0x400>; + clocks = <&rcc 0 134>; + clock-names = "mfd_timer_clk"; + interrupts = <43>; + status = "disabled"; + + pwm12: pwm12@40001800 { + compatible = "st,stm32-pwm12"; + status = "disabled"; + }; + iiotimer12: iiotimer12@40001800 { + compatible = "st,stm32-iio-timer12"; + status = "disabled"; + }; + }; + + mfd_timer13: mfdtimer13@40001C00 { + compatible = "st,stm32-mfd-timer13"; + reg = <0x40001C00 0x400>; + clocks = <&rcc 0 135>; + clock-names = "mfd_timer_clk"; + interrupts = <44>; + status = "disabled"; + + pwm13: pwm13@40001C00 { + compatible = "st,stm32-pwm13"; + status = "disabled"; + }; + }; + + mfd_timer14: mfdtimer14@40002000 { + compatible = "st,stm32-mfd-timer14"; + reg = <0x40002000 0x400>; + clocks = <&rcc 0 136>; + clock-names = "mfd_timer_clk"; + interrupts = <45>; + status = "disabled"; + + pwm14: pwm14@40002000 { + compatible = "st,stm32-pwm14"; + status = "disabled"; + }; + }; }; }; diff --git a/arch/arm/boot/dts/stm32f469-disco.dts b/arch/arm/boot/dts/stm32f469-disco.dts index 8a163d7..a8f1788 100644 --- a/arch/arm/boot/dts/stm32f469-disco.dts +++ b/arch/arm/boot/dts/stm32f469-disco.dts @@ -81,3 +81,32 @@ &usart3 { status = "okay"; }; + +&mfd_timer1 { + status = "okay"; +}; + +&pwm1 { + pinctrl-0 = <&pwm1_pins>; + pinctrl-names = "default"; + st,breakinput-polarity = <0>; + status = "okay"; +}; + +&iiotimer1 { + status = "okay"; +}; + +&mfd_timer3 { + status = "okay"; +}; + +&pwm3 { + pinctrl-0 = <&pwm3_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&iiotimer3 { + status = "okay"; +};