Skip to contentSkip to conversation

ARM: dts: imx6sl-tolino-shine2hd: Add backlight

PATCH Applied Andreas Kemnade 2 participants 4 messages Oct 19, 2022 – Oct 29, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover ARM: dts: imx6sl-tolino-shine2hd: Add backlight

Add a backlight here, it is a bit special situation. The vendor system has an option to add some extra brightness together with a big warning that power consumption is increased. Not sure, where it should fit, but since the backlight is probably made of leds, this might be the most convenient place.

Andreas Kemnade (2):
ARM: dts: imx6sl-tolino-shine2hd: Add backlight
ARM: dts: imx6sl-tolino-shine2hd: Add backlight boost

 arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts | 30 +++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)
Signature · 1 line
2.30.2
#1 lore raw

PATCH 1/2 ARM: dts: imx6sl-tolino-shine2hd: Add backlight

Add backlight for Tolino Shine2 HD. It uses the PWM of the embedded controller.

---
 arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts | 21 ++++++++++++++++++++
 1 file changed, 21 insertions(+)
arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts +21 -0
index 663ee9df79e6..ea0ce59aa4f1 100644
@@ -18,6 +18,21 @@ / {
 	model = "Tolino Shine 2 HD";
 	compatible = "kobo,tolino-shine2hd", "fsl,imx6sl";
 
+	backlight {
+		compatible = "pwm-backlight";
+		pwms = <&ec 0 50000>;
+		power-supply = <&backlight_regulator>;
+	};
+
+	backlight_regulator: regulator-backlight {
+		compatible = "regulator-fixed";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_backlight_power>;
+		regulator-name = "backlight";
+		gpio = <&gpio2 10 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
 	chosen {
 		stdout-path = &uart1;
 	};
@@ -299,6 +314,12 @@ &iomuxc {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_hog>;
 
+	pinctrl_backlight_power: backlight-powergrp {
+		fsl,pins = <
+			MX6SL_PAD_EPDC_PWRCTRL3__GPIO2_IO10 0x10059
+		>;
+	};
+
 	pinctrl_gpio_keys: gpio-keysgrp {
 		fsl,pins = <
 			MX6SL_PAD_SD1_DAT1__GPIO5_IO08  0x17059
Signature · 1 line
2.30.2
#2 lore raw

PATCH 2/2 ARM: dts: imx6sl-tolino-shine2hd: Add backlight boost

In reply to Andreas Kemnade

Vendor system has a separate checkbox for increasing brightness of the backlight combined with a big warning that power consumption will greatly increase. With that checkbox enabled there is a greater range in which backlight brightness can be adjusted
Add a switch to achieve the same, since the backlight is actually LED, this seems to be the most appopiate place to add it. Nothing fits perfectly.

---
 arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts +8 -1
index ea0ce59aa4f1..da1399057634 100644
@@ -80,6 +80,12 @@ led-0 {
 			gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "timer";
 		};
+
+		led-1 {
+			label = "tolinoshine2hd:white:backlightboost";
+			gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "off";
+		};
 	};
 
 	memory@80000000 {
@@ -404,7 +410,8 @@ MX6SL_PAD_REF_CLK_32K__I2C3_SDA  0x4001f8b1
 
 	pinctrl_led: ledgrp {
 		fsl,pins = <
-			MX6SL_PAD_SD1_DAT2__GPIO5_IO13 0x17059
+			MX6SL_PAD_SD1_DAT2__GPIO5_IO13    0x17059
+			MX6SL_PAD_EPDC_SDCE2__GPIO1_IO29  0x17059
 		>;
 	};
 
Signature · 1 line
2.30.2
Applied
#3 lore raw
In reply to Andreas Kemnade
Quoted 9 lines · Andreas Kemnade

Add a backlight here, it is a bit special situation. The vendor system has an option to add some extra brightness together with a big warning that power consumption is increased. Not sure, where it should fit, but since the backlight is probably made of leds, this might be the most convenient place.

Andreas Kemnade (2):
ARM: dts: imx6sl-tolino-shine2hd: Add backlight
ARM: dts: imx6sl-tolino-shine2hd: Add backlight boost

Applied both, thanks!