summaryrefslogtreecommitdiff
path: root/arch/arm/boot/dts/sun8i-q8-common.dtsi
diff options
context:
space:
mode:
authorChen-Yu Tsai <wens@csie.org>2015-09-20 15:30:50 +0300
committerMaxime Ripard <maxime.ripard@free-electrons.com>2015-09-27 11:21:32 +0300
commitf5f1c2cbe8785c212794067ce57aeb6439be7ac1 (patch)
tree465bb72468befc126ce4b3c50384ad02470cfd5d /arch/arm/boot/dts/sun8i-q8-common.dtsi
parent36034fc1957d55837189075076a502051784a805 (diff)
downloadlinux-f5f1c2cbe8785c212794067ce57aeb6439be7ac1.tar.xz
ARM: dts: sun8i: Add pwm-backlight device for A23/A33 Q8 format tablets
The LCD backlight on the A23/A33 Q8 format tablets is enabled with a GPIO controlled regulator, and brightness controlled with the SoC's PWM controller. The backlight is powered from the AXP223 PMIC's DC1SW output, which is not supported yet. A proper bootloader is required to enable it. The brightness levels are arbitrary. The FEX files do not have such information. As such, actual brightness levels may differ from device to device. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Diffstat (limited to 'arch/arm/boot/dts/sun8i-q8-common.dtsi')
-rw-r--r--arch/arm/boot/dts/sun8i-q8-common.dtsi20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/sun8i-q8-common.dtsi b/arch/arm/boot/dts/sun8i-q8-common.dtsi
index 6f8a8bb4e9bb..f34273602f64 100644
--- a/arch/arm/boot/dts/sun8i-q8-common.dtsi
+++ b/arch/arm/boot/dts/sun8i-q8-common.dtsi
@@ -41,11 +41,24 @@
*/
#include "sunxi-q8-common.dtsi"
+#include <dt-bindings/pwm/pwm.h>
+
/ {
aliases {
serial0 = &r_uart;
};
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ pinctrl-names = "default";
+ pinctrl-0 = <&bl_en_pin_q8>;
+ pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
+ brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
+ default-brightness-level = <8>;
+ enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
+ /* backlight is powered by AXP223 DC1SW */
+ };
+
chosen {
stdout-path = "serial0:115200n8";
};
@@ -62,6 +75,13 @@
};
&pio {
+ bl_en_pin_q8: bl_en_pin@0 {
+ allwinner,pins = "PH6";
+ allwinner,function = "gpio_in";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
+
mmc0_cd_pin_q8: mmc0_cd_pin@0 {
allwinner,pins = "PB4";
allwinner,function = "gpio_in";