arm64: dts: mediatek: mt6795-xperia-m5: Add display backlight support
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Fri, 21 Jul 2023 08:28:21 +0000 (10:28 +0200)
committerMatthias Brugger <matthias.bgg@gmail.com>
Wed, 18 Oct 2023 07:47:28 +0000 (09:47 +0200)
Add the relevant nodes for display backlight on Sony Xperia M5: this
needs both the SoC PWM IP and MT6332 PMIC LED strings.

Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230721082822.680010-3-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts

index b5746e6d0b15a5d6d59be2217225f3ad4fd03237..ecdf00707a44a9519698a73aa60b7f7d224547b0 100644 (file)
                serial1 = &uart1;
        };
 
+       backlight_lcd0: backlight {
+               compatible = "led-backlight";
+               leds = <&disp_led_pwm>, <&pmic_bl_led>;
+
+               default-brightness-level = <300>;
+       };
+
+       led-controller-display {
+               compatible = "pwm-leds";
+
+               disp_led_pwm: led-0 {
+                       label = "backlight-pwm";
+                       pwms = <&pwm0 0 500000>;
+                       max-brightness = <1024>;
+               };
+       };
+
        memory@40000000 {
                device_type = "memory";
                reg = <0 0x40000000 0 0x1e800000>;
         * an interrupt on the companion, so we use the MT6332 IRQ GPIO.
         */
        interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>;
+
+       mt6332-led {
+               compatible = "mediatek,mt6332-led";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               pmic_bl_led: led@0 {
+                       reg = <0>;
+                       label = "backlight-pmic";
+               };
+       };
+};
+
+&pwm0 {
+       status = "okay";
 };
 
 &uart0 {