ARM: dts: sun5i: Add PWM controller node for A13 / A10s
Subsystems (3)
PATCH v3 1/4 ARM: dts: sun5i: Add PWM controller node for A13 / A10s
Add dts nodes for the PWM controller on the A13 / A10s.
---
Changes in v3:
-Use a separate compatible string for a10s and a13
--- arch/arm/boot/dts/sun5i-a10s.dtsi | 8 ++++++++ arch/arm/boot/dts/sun5i-a13.dtsi | 10 ++++++++++ 2 files changed, 18 insertions(+)
arch/arm/boot/dts/sun5i-a10s.dtsi +8 -0
@@ -165,6 +165,14 @@ #size-cells = <0>; }; + pwm: pwm at 01c20e00 { + compatible = "allwinner,sun5i-a10s-pwm"; + reg = <0x01c20e00 0xc>; + clocks = <&osc24M>; + #pwm-cells = <3>; + status = "disabled"; + }; + uart0: serial at 01c28000 { compatible = "snps,dw-apb-uart"; reg = <0x01c28000 0x400>;
arch/arm/boot/dts/sun5i-a13.dtsi +10 -0
@@ -150,6 +150,16 @@ "apb1_uart3"; }; }; + + soc at 01c00000 { + pwm: pwm at 01c20e00 { + compatible = "allwinner,sun5i-a13-pwm"; + reg = <0x01c20e00 0xc>; + clocks = <&osc24M>; + #pwm-cells = <3>; + status = "disabled"; + }; + }; }; &cpu0 {
Signature · 1 line
2.5.0
PATCH v3 2/4 ARM: dts: sun5i: Add PWM channel 0 pinmux setting for A13/A10s
Add a pinmux setting for the first pwm channel. This is often used for backlight dimming on tablets.
--- arch/arm/boot/dts/sun5i.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/boot/dts/sun5i.dtsi +7 -0
@@ -529,6 +529,13 @@ allwinner,drive = <SUN4I_PINCTRL_30_MA>; allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; }; + + pwm0_pins: pwm0 { + allwinner,pins = "PB2"; + allwinner,function = "pwm"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; }; timer at 01c20c00 {
Signature · 1 line
2.5.0
Maxime Ripard
AppliedPATCH v3 2/4 ARM: dts: sun5i: Add PWM channel 0 pinmux setting for A13/A10s
Quoted 4 lines · Hans de Goede
Add a pinmux setting for the first pwm channel. This is often used for backlight dimming on tablets.
Signed-off-by Hans de Goede <[email protected]>
Applied, thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151012/31e4a6a0/attachment.sig>
PATCH v3 3/4 ARM: dts: sunxi: Enable PWM controller on Q8 format tablets
In reply to Hans de GoedeFrom: Chen-Yu Tsai <[email protected]>
Q8 format tablets use channel 0 of the PWM controller for backlight dimming.
---
Changes in v2:
-Enable the pwm controller in sunxi-q8-common.dtsi rather then in
sun8i-q8-common.dtsi
--- arch/arm/boot/dts/sunxi-q8-common.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/boot/dts/sunxi-q8-common.dtsi +6 -0
@@ -75,3 +75,9 @@ voltage = <400000>; }; }; + +&pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm0_pins>; + status = "okay"; +};
Signature · 1 line
2.5.0
Maxime Ripard
AppliedPATCH v3 3/4 ARM: dts: sunxi: Enable PWM controller on Q8 format tablets
Quoted 6 lines · Hans de Goede
From: Chen-Yu Tsai <[email protected]>
Q8 format tablets use channel 0 of the PWM controller for backlight dimming.
Signed-off-by Chen-Yu Tsai <[email protected]>Signed-off-by Hans de Goede <[email protected]>
Applied, thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151012/37deca62/attachment.sig>
PATCH v3 4/4 ARM: dts: sun5i: Add backlight node to sun5i-q8-common.dtsi
In reply to Hans de GoedeAll A13 based q8 formfactor tablets use the same backlight setup, add a backlight devicetree node for controlling the backlight on these devices.
---
Changes in v2:
-Drop the comment about DCDC1SW, the axp209 used on A13 boards does not
have a DCDC1SW
--- arch/arm/boot/dts/sun5i-q8-common.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm/boot/dts/sun5i-q8-common.dtsi +10 -0
@@ -41,11 +41,21 @@ */ #include "sunxi-q8-common.dtsi" +#include <dt-bindings/pwm/pwm.h> + / { aliases { serial0 = &uart1; }; + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; + default-brightness-level = <8>; + /* TODO: backlight uses axp gpio1 as enable pin */ + }; + chosen { stdout-path = "serial0:115200n8"; };
Signature · 1 line
2.5.0
Maxime Ripard
AppliedPATCH v3 4/4 ARM: dts: sun5i: Add backlight node to sun5i-q8-common.dtsi
Quoted 4 lines · Hans de Goede
All A13 based q8 formfactor tablets use the same backlight setup, add a backlight devicetree node for controlling the backlight on these devices.
Signed-off-by Hans de Goede <[email protected]>
Applied, thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151012/606920a4/attachment.sig>
Maxime Ripard
AppliedPATCH v3 1/4 ARM: dts: sun5i: Add PWM controller node for A13 / A10s
In reply to Hans de GoedeQuoted 3 lines · Hans de Goede
Add dts nodes for the PWM controller on the A13 / A10s.
Signed-off-by Hans de Goede <[email protected]>
Applied, thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151012/2a56728e/attachment-0001.sig>