Skip to content

Commit

Permalink
arm64: dts: qcom: msm8916-motorola-osprey: Add backlight control
Browse files Browse the repository at this point in the history
Based on motorola-surnia, the only changes being:
 - Using LED2 instead of LED1 for the led driver
 - Using GPIO 113 for the backlight reset

Signed-off-by: Bogdan Ionescu <[email protected]>
  • Loading branch information
BogdanTheGeek committed Mar 8, 2023
1 parent 2d03368 commit 4882044
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8916-motorola-osprey.dts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/leds/leds-bd65b60.h>

/ {
model = "Motorola Moto G 2015 (osprey)";
Expand Down Expand Up @@ -80,6 +82,12 @@
startup-delay-us = <300>;
vin-supply = <&pm8916_l16>;
};

backlight: backlight {
compatible = "led-backlight";
leds = <&backlight_led>;
default-brightness-level = <192>;
};
};

&blsp_i2c1 {
Expand Down Expand Up @@ -125,6 +133,21 @@
regulator-active-discharge = <1>;
};
};

led-controler@64 {
compatible = "rohm,bd65b60";
reg = <0x64>;
pinctrl-0 = <&backlight_reset_default>;
pinctrl-names = "default";

backlight_led: led {
function = LED_FUNCTION_BACKLIGHT;
color = <LED_COLOR_ID_WHITE>;
rohm,enable-outputs = <BD65B60_ENABLE_LED2>;
default-state = "keep";
linux,default-trigger = "backlight";
};
};
};

&blsp_i2c2 {
Expand Down Expand Up @@ -172,6 +195,7 @@
compatible = "motorola,osprey-panel";
reg = <0>;

backlight = <&backlight>;
vsp-supply = <&reg_lcd_pos>;
vsn-supply = <&reg_lcd_neg>;
vddio-supply = <&reg_panel_vddio>;
Expand Down Expand Up @@ -370,6 +394,14 @@
bias-pull-up;
};

backlight_reset_default: backlight-reset-default-state {
pins = "gpio113";
function = "gpio";
drive-strength = <2>;
bias-pull-down;
output-high;
};

gpio_keys_default: gpio-keys-default-state {
pins = "gpio107";
function = "gpio";
Expand Down

0 comments on commit 4882044

Please sign in to comment.