Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm64: dts: qcom: msm8916/39-samsung-a2015/fortuna/serranove: Add flash LED #317

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#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/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/sound/apq8016-lpass.h>

Expand Down Expand Up @@ -39,6 +40,21 @@
status = "disabled";
};

flash-led-controller {
compatible = "richtek,rt5033-led";
enable-gpios = <&tlmm 34 GPIO_ACTIVE_HIGH>;
flash-gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;

pinctrl-0 = <&camera_flash_default>;
pinctrl-names = "default";

flash_led: led {
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
flash-max-timeout-us = <544000>;
};
};

gpio-keys {
compatible = "gpio-keys";

Expand Down Expand Up @@ -370,6 +386,14 @@
bias-disable;
};

camera_flash_default: camera-flash-default-state {
pins = "gpio34", "gpio36";
function = "gpio";

drive-strength = <2>;
bias-disable;
};

fg_alert_default: fg-alert-default-state {
pins = "gpio121";
function = "gpio";
Expand Down
23 changes: 23 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8916-samsung-gprime-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#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/pinctrl/qcom,pmic-gpio.h>

/ {
Expand All @@ -19,6 +20,21 @@
stdout-path = "serial0";
};

flash-led-controller {
compatible = "richtek,rt5033-led";
enable-gpios = <&tlmm 34 GPIO_ACTIVE_HIGH>;
flash-gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;

pinctrl-0 = <&camera_flash_default>;
pinctrl-names = "default";

flash_led: led {
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
flash-max-timeout-us = <544000>;
};
};

gpio-keys {
compatible = "gpio-keys";

Expand Down Expand Up @@ -406,6 +422,13 @@
function = "gcc_gp2_clk_a";
};

camera_flash_default: camera-flash-default-state {
pins = "gpio34", "gpio36";
function = "gpio";
drive-strength = <2>;
bias-disable;
};

fg_alert_default: fg-alert-default-state {
pins = "gpio121";
function = "gpio";
Expand Down
24 changes: 24 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#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>

/*
* NOTE: The original firmware from Samsung can only boot ARM32 kernels.
Expand Down Expand Up @@ -47,6 +48,21 @@
};
};

flash-led-controller {
compatible = "richtek,rt5033-led";
enable-gpios = <&tlmm 34 GPIO_ACTIVE_HIGH>;
flash-gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;

pinctrl-0 = <&camera_flash_default>;
pinctrl-names = "default";

flash_led: led {
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
flash-max-timeout-us = <544000>;
};
};

gpio-keys {
compatible = "gpio-keys";

Expand Down Expand Up @@ -445,6 +461,14 @@
};

&tlmm {
camera_flash_default: camera-flash-default-state {
pins = "gpio34", "gpio36";
function = "gpio";

drive-strength = <2>;
bias-disable;
};

fg_alert_default: fg-alert-default-state {
pins = "gpio121";
function = "gpio";
Expand Down
23 changes: 23 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#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/sound/apq8016-lpass.h>

/ {
Expand All @@ -33,6 +34,21 @@
};
};

flash-led-controller {
compatible = "richtek,rt5033-led";
enable-gpios = <&tlmm 34 GPIO_ACTIVE_HIGH>;
flash-gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;

pinctrl-0 = <&camera_flash_default>;
pinctrl-names = "default";

flash_led: led {
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
flash-max-timeout-us = <544000>;
};
};

gpio-hall-sensor {
compatible = "gpio-keys";

Expand Down Expand Up @@ -511,6 +527,13 @@
bias-disable;
};

camera_flash_default: camera-flash-default-state {
pins = "gpio34", "gpio36";
function = "gpio";
drive-strength = <2>;
bias-disable;
};

fg_alert_default: fg-alert-default-state {
pins = "gpio121";
function = "gpio";
Expand Down