Skip to content

Commit

Permalink
dts: motorola-surnia enable backlight
Browse files Browse the repository at this point in the history
Enabling backlight support for motorola-surnia.
Can be applied to motorala-ospray and motorola-styx, but not tested.

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

/ {
model = "Motorola Moto E 2015 LTE (surnia)";
Expand Down Expand Up @@ -57,6 +59,31 @@
pinctrl-1 = <&usb_id_sleep>;
pinctrl-names = "default", "sleep";
};

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

&blsp_i2c1 {
status = "okay";

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

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

&blsp_i2c2 {
Expand Down Expand Up @@ -124,7 +151,7 @@
panel@0 {
compatible = "motorola,surnia-panel";
reg = <0>;

backlight = <&backlight_dsi>;
power-supply = <&pm8916_l17>;
reset-gpios = <&msmgpio 78 GPIO_ACTIVE_LOW>;

Expand Down Expand Up @@ -320,6 +347,14 @@
bias-pull-up;
};

backlight_reset_default: backlight-reset-default-state {
pins = "gpio36";
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 cf00732

Please sign in to comment.