From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rudraksha Gupta Date: Sat, 12 Sep 2026 19:38:10 -0700 Subject: [PATCH v7 3/3] ARM: dts: qcom: msm8960: expressatt: Add camera flash MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260912-expressatt_camera_flash-v7-3-e1fd2edc8d84@gmail.com> References: <20260912-expressatt_camera_flash-v7-0-e1fd2edc8d84@gmail.com> In-Reply-To: <20260912-expressatt_camera_flash-v7-0-e1fd2edc8d84@gmail.com> To: Lee Jones , Pavel Machek , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, phone-devel@vger.kernel.org, Rudraksha Gupta , David Heidelberg , Konrad Dybcio X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1789267087; l=2821; i=guptarud@gmail.com; s=20240916; h=from:subject:message-id; bh=+XXskm3P7Bxm9qp2AXPxEkCdFfEV4HAGzaJ1hbiZwr0=; b=106LwAaIjdtn/azCBcKQZ93VhbbPAjBtNjvMY43Ki+Pg4aYO6uveCYGx2cnojBLTQk8Ju5gC/ /4uWaSA1WDfCpCIntO0JIya2cuyFpw+ze6rEA/RRfFBnDQkhgZXpHXQ X-Developer-Key: i=guptarud@gmail.com; a=ed25519; pk=ETrudRugWAtOpr0OhRiheQ1lXM4Kk4KGFnBySlKDi2I= X-Endpoint-Received: by B4 Relay for guptarud@gmail.com/20240916 with auth_id=211 List-Id: B4 Relay Submissions Add camera flash support for the Samsung Galaxy Express (expressatt). Downstream references: Link: https://github.com/LineageOS/android_kernel_samsung_d2/blob/stable/cm-12.0-YNG4N/drivers/leds/Makefile#L51 Link: https://github.com/LineageOS/android_kernel_samsung_d2/blob/stable/cm-12.0-YNG4N/arch/arm/mach-msm/board-apexq-camera.c#L591 Assisted-by: Claude:claude-opus-4.6 Reviewed-by: David Heidelberg Reviewed-by: Konrad Dybcio Signed-off-by: Rudraksha Gupta --- .../dts/qcom/qcom-msm8960-samsung-expressatt.dts | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts b/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts index 5a3d88e31cf5..b7218ee1349f 100644 --- a/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts +++ b/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts @@ -1,11 +1,13 @@ // SPDX-License-Identifier: GPL-2.0 #include +#include #include #include "qcom-msm8960.dtsi" #include "pm8921.dtsi" #include #include +#include #include / { @@ -61,6 +63,32 @@ touchkey_enable: touchkey-enable { regulator-boot-on; }; + vreg_flash: regulator-flash { + compatible = "regulator-fixed"; + regulator-name = "VREG_FLASH_3P3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&pm8921_mpps 4 GPIO_ACTIVE_HIGH>; + enable-active-high; + pinctrl-0 = <&flash_led_unlock>; + pinctrl-names = "default"; + }; + + led-controller { + compatible = "richtek,rt8515"; + enf-gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>; + vin-supply = <&vreg_flash>; + richtek,rfs-ohms = <16000>; + pinctrl-0 = <&cam_flash_en>; + pinctrl-names = "default"; + + led { + function = LED_FUNCTION_FLASH; + color = ; + flash-max-timeout-us = <250000>; + }; + }; + i2c-gpio-touchkey { compatible = "i2c-gpio"; #address-cells = <1>; @@ -171,6 +199,13 @@ touchscreen@4a { }; &tlmm { + cam_flash_en: cam-flash-en-state { + pins = "gpio3"; + function = "gpio"; + drive-strength = <16>; + bias-pull-down; + }; + spi1_default: spi1-default-state { mosi-pins { pins = "gpio6"; @@ -571,3 +606,12 @@ magnetometer@2e { /* TODO: Figure out Mount Matrix */ }; }; + +&pm8921_mpps { + flash_led_unlock: flash-led-unlock-state { + pins = "mpp4"; + function = "digital"; + output-low; + power-source = ; + }; +}; -- 2.55.0