All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harald Geyer <harald@ccbib.org>
To: Maxime Ripard <maxime.ripard@bootlin.com>, Chen-Yu Tsai <wens@csie.org>
Cc: Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Andre Przywara <andre.przywara@arm.com>,
	Icenowy Zheng <icenowy@aosc.io>,
	info@olimex.com, Harald Geyer <harald@ccbib.org>
Subject: [PATCHv2 4/5] arm64: dts: allwinner: a64: Add pwm device
Date: Thu, 15 Mar 2018 16:25:09 +0000	[thread overview]
Message-ID: <20180315162510.11669-5-harald@ccbib.org> (raw)
In-Reply-To: <20180315162510.11669-1-harald@ccbib.org>

This device is compatible with A13, so no new driver is needed.
A new compatible string is reserved in the binding documentation, to be
used together with the proper fall back. Tested on Teres-I.

Signed-off-by: Harald Geyer <harald@ccbib.org>
---
changes since v1:
 * add and use an A64 specific compatible string
 * claim the full memory range

I saw that Andre Przywara has been working on A64 pwm too and has
submitted some patches a few days ago. I think his patches are functionally
equivalent to this one here, but clean up things a bit and additionally
add support for r_pwm and thus are preferable. See:

https://groups.google.com/forum/#!topic/linux-sunxi/hQFeteP591k

I'm including my patch here mostly to have a consistent series for others
to test. OTOH you might merge the device tree changes here and pick up
the cleanup patches from him. Either way should work fine.

 Documentation/devicetree/bindings/pwm/pwm-sun4i.txt |  1 +
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi       | 14 ++++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/Documentation/devicetree/bindings/pwm/pwm-sun4i.txt b/Documentation/devicetree/bindings/pwm/pwm-sun4i.txt
index 51ff54c8b8ef..5986a3b2a504 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-sun4i.txt
+++ b/Documentation/devicetree/bindings/pwm/pwm-sun4i.txt
@@ -5,6 +5,7 @@ Required properties:
     - "allwinner,sun4i-a10-pwm"
     - "allwinner,sun5i-a10s-pwm"
     - "allwinner,sun5i-a13-pwm"
+    - "allwinner,sun50i-a64-pwm","allwinner,sun5i-a13-pwm"
     - "allwinner,sun7i-a20-pwm"
     - "allwinner,sun8i-h3-pwm"
   - reg: physical base address and length of the controller's registers
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 1b2ef28c42bd..7e72eadd07b1 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -364,6 +364,11 @@
 				bias-pull-up;
 			};
 
+			pwm_pin: pwm_pin {
+				pins = "PD22";
+				function = "pwm";
+			};
+
 			rmii_pins: rmii_pins {
 				pins = "PD10", "PD11", "PD13", "PD14", "PD17",
 				       "PD18", "PD19", "PD20", "PD22", "PD23";
@@ -629,6 +634,15 @@
 			#interrupt-cells = <3>;
 		};
 
+		pwm: pwm@1c21400 {
+			compatible = "allwinner,sun50i-a64-pwm",
+				     "allwinner,sun5i-a13-pwm";
+			reg = <0x01c21400 0x400>;
+			clocks = <&osc24M>;
+			#pwm-cells = <3>;
+			status = "disabled";
+		};
+
 		rtc: rtc@1f00000 {
 			compatible = "allwinner,sun6i-a31-rtc";
 			reg = <0x01f00000 0x54>;
-- 
2.11.0

WARNING: multiple messages have this Message-ID (diff)
From: harald@ccbib.org (Harald Geyer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv2 4/5] arm64: dts: allwinner: a64: Add pwm device
Date: Thu, 15 Mar 2018 16:25:09 +0000	[thread overview]
Message-ID: <20180315162510.11669-5-harald@ccbib.org> (raw)
In-Reply-To: <20180315162510.11669-1-harald@ccbib.org>

This device is compatible with A13, so no new driver is needed.
A new compatible string is reserved in the binding documentation, to be
used together with the proper fall back. Tested on Teres-I.

Signed-off-by: Harald Geyer <harald@ccbib.org>
---
changes since v1:
 * add and use an A64 specific compatible string
 * claim the full memory range

I saw that Andre Przywara has been working on A64 pwm too and has
submitted some patches a few days ago. I think his patches are functionally
equivalent to this one here, but clean up things a bit and additionally
add support for r_pwm and thus are preferable. See:

https://groups.google.com/forum/#!topic/linux-sunxi/hQFeteP591k

I'm including my patch here mostly to have a consistent series for others
to test. OTOH you might merge the device tree changes here and pick up
the cleanup patches from him. Either way should work fine.

 Documentation/devicetree/bindings/pwm/pwm-sun4i.txt |  1 +
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi       | 14 ++++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/Documentation/devicetree/bindings/pwm/pwm-sun4i.txt b/Documentation/devicetree/bindings/pwm/pwm-sun4i.txt
index 51ff54c8b8ef..5986a3b2a504 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-sun4i.txt
+++ b/Documentation/devicetree/bindings/pwm/pwm-sun4i.txt
@@ -5,6 +5,7 @@ Required properties:
     - "allwinner,sun4i-a10-pwm"
     - "allwinner,sun5i-a10s-pwm"
     - "allwinner,sun5i-a13-pwm"
+    - "allwinner,sun50i-a64-pwm","allwinner,sun5i-a13-pwm"
     - "allwinner,sun7i-a20-pwm"
     - "allwinner,sun8i-h3-pwm"
   - reg: physical base address and length of the controller's registers
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 1b2ef28c42bd..7e72eadd07b1 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -364,6 +364,11 @@
 				bias-pull-up;
 			};
 
+			pwm_pin: pwm_pin {
+				pins = "PD22";
+				function = "pwm";
+			};
+
 			rmii_pins: rmii_pins {
 				pins = "PD10", "PD11", "PD13", "PD14", "PD17",
 				       "PD18", "PD19", "PD20", "PD22", "PD23";
@@ -629,6 +634,15 @@
 			#interrupt-cells = <3>;
 		};
 
+		pwm: pwm at 1c21400 {
+			compatible = "allwinner,sun50i-a64-pwm",
+				     "allwinner,sun5i-a13-pwm";
+			reg = <0x01c21400 0x400>;
+			clocks = <&osc24M>;
+			#pwm-cells = <3>;
+			status = "disabled";
+		};
+
 		rtc: rtc at 1f00000 {
 			compatible = "allwinner,sun6i-a31-rtc";
 			reg = <0x01f00000 0x54>;
-- 
2.11.0

  parent reply	other threads:[~2018-03-15 16:26 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-15 16:25 [PATCHv2 0/5] arm64: allwinner: Add support for TERES-I laptop Harald Geyer
2018-03-15 16:25 ` Harald Geyer
2018-03-15 16:25 ` [PATCHv2 1/5] arm64: dts: allwinner: a64: Add i2c0 pins Harald Geyer
2018-03-15 16:25   ` Harald Geyer
2018-03-15 16:25 ` [PATCHv2 2/5] arm64: dts: allwinner: a64: Add watchdog Harald Geyer
2018-03-15 16:25   ` Harald Geyer
2018-03-18 12:52   ` Rob Herring
2018-03-18 12:52     ` Rob Herring
2018-03-18 12:52     ` Rob Herring
2018-03-15 16:25 ` [PATCHv2 3/5] arm64: dts: allwinner: a64: add simplefb for A64 SoC Harald Geyer
2018-03-15 16:25   ` Harald Geyer
2018-03-15 16:25 ` Harald Geyer [this message]
2018-03-15 16:25   ` [PATCHv2 4/5] arm64: dts: allwinner: a64: Add pwm device Harald Geyer
2018-03-18 12:52   ` Rob Herring
2018-03-18 12:52     ` Rob Herring
2018-03-18 13:51     ` André Przywara
2018-03-18 13:51       ` André Przywara
2018-03-15 16:25 ` [PATCHv2 5/5] arm64: allwinner: a64: Add support for TERES-I laptop Harald Geyer
2018-03-15 16:25   ` Harald Geyer
2018-03-16  6:37   ` afzal mohammed
2018-03-16  6:37     ` afzal mohammed
2018-03-16 17:50     ` afzal mohammed
2018-03-16 17:50       ` afzal mohammed
2018-03-18 20:22   ` Maxime Ripard
2018-03-18 20:22     ` Maxime Ripard
2018-03-19  7:17     ` afzal mohammed
2018-03-19  7:17       ` afzal mohammed
2018-03-19 21:27       ` Maxime Ripard
2018-03-19 21:27         ` Maxime Ripard
2018-03-19 21:27         ` Maxime Ripard
2018-03-19 15:27     ` Harald Geyer
2018-03-19 15:27       ` Harald Geyer
2018-03-20 14:13       ` Maxime Ripard
2018-03-20 14:13         ` Maxime Ripard
2018-03-20 17:09         ` Andre Przywara
2018-03-20 17:09           ` Andre Przywara
2018-03-22 17:59           ` Maxime Ripard
2018-03-22 17:59             ` Maxime Ripard
2018-06-22 16:27   ` Icenowy Zheng
2018-06-22 16:27     ` Icenowy Zheng
2018-06-24 16:34     ` Harald Geyer
2018-06-24 16:34       ` Harald Geyer
2018-06-25  7:43       ` Arend van Spriel
2018-06-25  7:43         ` Arend van Spriel
2018-06-25  7:47         ` Icenowy Zheng
2018-06-25  7:47           ` Icenowy Zheng
2018-06-25  8:13           ` Arend van Spriel
2018-06-25  8:13             ` Arend van Spriel
2018-06-25 10:42             ` Icenowy Zheng
2018-06-25 10:42               ` Icenowy Zheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180315162510.11669-5-harald@ccbib.org \
    --to=harald@ccbib.org \
    --cc=andre.przywara@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=icenowy@aosc.io \
    --cc=info@olimex.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=robh+dt@kernel.org \
    --cc=wens@csie.org \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.