Commit 63c88ddd authored by Guido Gunther's avatar Guido Gunther

arm64: dts: imx8mq-librem5: Enable lm3560 LED

This enables torch and flash. We use the chips
default values as max for the moment. This can
be tweaked furthers as needed.

A single pinctrl group is enough and we can drop the regulator
since it's in fact a GPIO tied directly to the lm3560.

Maximum led current is derived from experiments on dogwood.
Signed-off-by: Guido Gunther's avatarGuido Günther <agx@sigxcpu.org>
parent 3cebe41a
Pipeline #59258 passed with stage
in 78 minutes and 9 seconds
......@@ -6,6 +6,7 @@
/dts-v1/;
#include "dt-bindings/input/input.h"
#include "dt-bindings/leds/common.h"
#include "dt-bindings/pwm/pwm.h"
#include "dt-bindings/usb/pd.h"
#include "imx8mq.dtsi"
......@@ -108,7 +109,7 @@ blue {
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_flash>, <&pinctrl_hub_nreset>,
pinctrl-0 = <&pinctrl_hub_nreset>,
<&pinctrl_sd_pwr>, <&pinctrl_charger>
#ifndef USB_REGULATOR
, <&pinctrl_hub_pwr>
......@@ -117,7 +118,6 @@ leds {
#ifdef GPIO_CONTROL
, <&pinctrl_smc>,
<&pinctrl_gnss>,
<&pinctrl_flash_pwr>,
<&pinctrl_wwan_pwr>, <&pinctrl_wifi_pwr>,
<&pinctrl_wwan>,
<&pinctrl_camera_pwr>,
......@@ -143,13 +143,6 @@ chg-otg-en {
default-state = "off";
};
flash-strobe {
label = "flash_strobe";
gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
default-state = "off";
linux,default-trigger = "flash";
};
hub-nreset {
label = "hub_nreset";
gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
......@@ -169,12 +162,6 @@ bt-reg-on {
default-state = "on";
};
flash-en {
label = "flash_en";
gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
gnss-nreset {
label = "gnss_nreset";
gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
......@@ -251,18 +238,6 @@ reg_sd: regulator-sd {
gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
reg_flash: regulator-flash {
compatible = "regulator-fixed";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_flash_pwr>;
regulator-name = "FLASH_EN";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&gpio1 23 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
#endif
reg_audio_pwr_en: regulator-audio-pwr-en {
......@@ -1021,17 +996,12 @@ MX8MQ_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0x1f
>;
};
pinctrl_flash_pwr: flashpwrgrp {
fsl,pins = <
/* FLASH_EN */
MX8MQ_IOMUXC_ENET_TXC_GPIO1_IO23 0x83
>;
};
pinctrl_flash: flashgrp {
fsl,pins = <
/* FLASH_STROBE */
MX8MQ_IOMUXC_ENET_TD0_GPIO1_IO21 0x83
/* FLASH_EN */
MX8MQ_IOMUXC_ENET_TXC_GPIO1_IO23 0x83
>;
};
......@@ -1291,24 +1261,25 @@ reg_lcd_avee: outn {
};
flash@53 {
compatible = "lm3560";
reg = <0x53>; /* A6 ?? */
compatible = "ti,lm3560";
pinctrl-0 = <&pinctrl_flash>;
pinctrl-names = "default";
#address-cells = <1>;
#size-cells = <0>;
flash@0 {
reg = <0x0>;
flash-timeout-us = <150000>;
flash-max-microamp = <320000>;
led-max-microamp = <60000>;
label = "lm3560:flash";
};
reg = <0x53>;
enable-gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
/* TODO */
//strobe-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
vin-supply = <&reg_vsys_3v4>;
torch@1 {
reg = <0x1>;
led-max-microamp = <10000>;
label = "lm3560:torch";
torch: led@0 {
reg = <1>;
function = LED_FUNCTION_TORCH;
color = <LED_COLOR_ID_WHITE>;
led-max-microamp = <93750>;
flash-max-microamp = <875000>;
flash-max-timeout-us = <1024000>;
};
};
proximity: prox@60 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment