* [PATCH] ARM: dts: sun8i-v3s: Add PWM controller and pins definitions
@ 2020-12-17 11:20 Paul Kocialkowski
2020-12-17 16:30 ` Maxime Ripard
0 siblings, 1 reply; 2+ messages in thread
From: Paul Kocialkowski @ 2020-12-17 11:20 UTC (permalink / raw)
To: devicetree, linux-arm-kernel, linux-kernel
Cc: Chen-Yu Tsai, Jernej Skrabec, Maxime Ripard, Paul Kocialkowski
This introduces definitions for the PWM controller found in the V3s,
as well as associated pins. This fashion of the controller has two PWM
outputs and is register-compatible with the A20.
Both PWM outputs were tested on a Lichee Pi Zero with a simple
transistor-LED setup.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
---
arch/arm/boot/dts/sun8i-v3s.dtsi | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi
index a9f5795d4e57..34a4e638c762 100644
--- a/arch/arm/boot/dts/sun8i-v3s.dtsi
+++ b/arch/arm/boot/dts/sun8i-v3s.dtsi
@@ -398,6 +398,16 @@ spi0_pins: spi0-pins {
pins = "PC0", "PC1", "PC2", "PC3";
function = "spi0";
};
+
+ pwm0_pin: pwm0-pin {
+ pins = "PB4";
+ function = "pwm0";
+ };
+
+ pwm1_pin: pwm1-pin {
+ pins = "PB5";
+ function = "pwm1";
+ };
};
timer@1c20c00 {
@@ -416,6 +426,14 @@ wdt0: watchdog@1c20ca0 {
clocks = <&osc24M>;
};
+ pwm: pwm@1c21400 {
+ compatible = "allwinner,sun7i-a20-pwm";
+ reg = <0x01c21400 0xc>;
+ clocks = <&osc24M>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
lradc: lradc@1c22800 {
compatible = "allwinner,sun4i-a10-lradc-keys";
reg = <0x01c22800 0x400>;
--
2.29.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ARM: dts: sun8i-v3s: Add PWM controller and pins definitions
2020-12-17 11:20 [PATCH] ARM: dts: sun8i-v3s: Add PWM controller and pins definitions Paul Kocialkowski
@ 2020-12-17 16:30 ` Maxime Ripard
0 siblings, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2020-12-17 16:30 UTC (permalink / raw)
To: Paul Kocialkowski
Cc: devicetree, Chen-Yu Tsai, Jernej Skrabec, linux-kernel,
linux-arm-kernel
Hi,
On Thu, Dec 17, 2020 at 12:20:31PM +0100, Paul Kocialkowski wrote:
> This introduces definitions for the PWM controller found in the V3s,
> as well as associated pins. This fashion of the controller has two PWM
> outputs and is register-compatible with the A20.
>
> Both PWM outputs were tested on a Lichee Pi Zero with a simple
> transistor-LED setup.
>
> Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
> ---
> arch/arm/boot/dts/sun8i-v3s.dtsi | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi
> index a9f5795d4e57..34a4e638c762 100644
> --- a/arch/arm/boot/dts/sun8i-v3s.dtsi
> +++ b/arch/arm/boot/dts/sun8i-v3s.dtsi
> @@ -398,6 +398,16 @@ spi0_pins: spi0-pins {
> pins = "PC0", "PC1", "PC2", "PC3";
> function = "spi0";
> };
> +
> + pwm0_pin: pwm0-pin {
> + pins = "PB4";
> + function = "pwm0";
> + };
> +
> + pwm1_pin: pwm1-pin {
> + pins = "PB5";
> + function = "pwm1";
> + };
> };
>
> timer@1c20c00 {
> @@ -416,6 +426,14 @@ wdt0: watchdog@1c20ca0 {
> clocks = <&osc24M>;
> };
>
> + pwm: pwm@1c21400 {
> + compatible = "allwinner,sun7i-a20-pwm";
We should have a (documented) v3s compatible there along with the A20
Thanks!
Maxime
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-17 16:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-17 11:20 [PATCH] ARM: dts: sun8i-v3s: Add PWM controller and pins definitions Paul Kocialkowski
2020-12-17 16:30 ` Maxime Ripard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox