From bcbebd252712b9c49d0221c58c87ad48c97d1da8 Mon Sep 17 00:00:00 2001 From: Jack Knightly Date: Fri, 14 Oct 2022 20:59:44 +0200 Subject: [PATCH 09/13] samsung-t0lte: add leds Adds flash/torch LED for samsung-t0lte AND notification LED to t0lte and other midas devices (samsung-m0, samsung-m3). --- arch/arm/boot/dts/exynos4412-midas.dtsi | 37 ++++++++++++++++++++++++- arch/arm/boot/dts/exynos4412-n710x.dts | 15 ++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/exynos4412-midas.dtsi b/arch/arm/boot/dts/exynos4412-midas.dtsi index 3167c51b6296..5d24b08d99d4 100644 --- a/arch/arm/boot/dts/exynos4412-midas.dtsi +++ b/arch/arm/boot/dts/exynos4412-midas.dtsi @@ -18,6 +18,7 @@ #include #include #include "exynos-pinctrl.h" +#include / { compatible = "samsung,midas", "samsung,exynos4412", "samsung,exynos4"; @@ -25,6 +26,7 @@ / { aliases { i2c11 = &i2c_max77693; i2c12 = &i2c_max77693_fuel; + i2c13 = &i2c_an30259a; }; chosen { @@ -171,7 +173,7 @@ i2c_max77693: i2c-gpio-1 { #address-cells = <1>; #size-cells = <0>; - pmic@66 { + max77693_pmic: pmic@66 { compatible = "maxim,max77693"; interrupt-parent = <&gpx1>; interrupts = <5 IRQ_TYPE_LEVEL_LOW>; @@ -251,6 +253,39 @@ touchkey@20 { }; }; + i2c_an30259a: i2c-gpio-5 { + compatible = "i2c-gpio"; + gpios = <&gpf2 7 GPIO_ACTIVE_HIGH>, <&gpf2 6 GPIO_ACTIVE_HIGH>; + i2c-gpio,delay-us = <2>; + #address-cells = <1>; + #size-cells = <0>; + + led-controller@30 { + compatible = "panasonic,an30259a"; + reg = <0x30>; + #address-cells = <1>; + #size-cells = <0>; + + led@1 { + reg = <1>; + function = LED_FUNCTION_STATUS; + color = ; + }; + + led@2 { + reg = <2>; + function = LED_FUNCTION_STATUS; + color = ; + }; + + led@3 { + reg = <3>; + function = LED_FUNCTION_STATUS; + color = ; + }; + }; + }; + i2c-mhl { compatible = "i2c-gpio"; sda-gpios = <&gpf0 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; diff --git a/arch/arm/boot/dts/exynos4412-n710x.dts b/arch/arm/boot/dts/exynos4412-n710x.dts index da0e475b1063..739aa0080e3f 100644 --- a/arch/arm/boot/dts/exynos4412-n710x.dts +++ b/arch/arm/boot/dts/exynos4412-n710x.dts @@ -138,6 +138,21 @@ &ldo25_reg { regulator-max-microvolt = <3000000>; }; +&max77693_pmic { + led { + compatible = "maxim,max77693-led"; + maxim,boost-mode = ; + maxim,boost-mvout = <5000>; + camera-flash { + label = "white:flash"; + led-sources = <0>, <1>; + led-max-microamp = <140625>; + flash-max-microamp = <500000>; + flash-max-timeout-us = <500000>; + }; + }; +}; + &s5c73m3 { standby-gpios = <&gpm0 6 GPIO_ACTIVE_LOW>; /* ISP_STANDBY */ vdda-supply = <&cam_vdda_reg>; -- 2.38.0