From 9a0acba08961380dd43f37b68eda47c91ba0688d Mon Sep 17 00:00:00 2001 From: Garrett lindquist Date: Tue, 10 Nov 2026 17:32:57 -0700 Subject: [PATCH 1/3] dt-bindings: leds: ti,lm3644: describe the external strobe GPIO Some boards connect the LM3644's external STROBE input to a GPIO. Torch-only operation must keep this active-high input low rather than leave it available to another consumer while HWEN is asserted. Describe an optional strobe-gpios property so the torch driver can own and hold that line inactive. Existing boards without the property keep their current behavior. Assisted-by: LLM Signed-off-by: Garrett lindquist --- Documentation/devicetree/bindings/leds/ti,lm3644.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/leds/ti,lm3644.yaml b/Documentation/devicetree/bindings/leds/ti,lm3644.yaml index 4e0c612dc2..9e9c5c8fd1 100644 --- a/Documentation/devicetree/bindings/leds/ti,lm3644.yaml +++ b/Documentation/devicetree/bindings/leds/ti,lm3644.yaml @@ -27,6 +27,12 @@ properties: maxItems: 1 description: GPIO connected to the HWEN pin. + strobe-gpios: + maxItems: 1 + description: | + GPIO connected to the active-high STROBE pin. When supplied, the + torch-only driver holds it low to prevent external flash triggering. + led: type: object $ref: common.yaml# From 8b46a93182b46598f2af70e4bc7eda19638ea79e Mon Sep 17 00:00:00 2001 From: Garrett lindquist Date: Tue, 10 Nov 2026 17:32:57 -0700 Subject: [PATCH 2/3] leds: lm3644: hold the optional external strobe inactive Oriole's camera wiring includes a separate external strobe GPIO. The existing torch bring-up controller holds it low, but the native driver only owns HWEN. Moving the board description into the native device tree must preserve that ownership without the separate controller. Request the optional strobe GPIO as an inactive output before requesting HWEN or identifying the chip. Abort probe on a GPIO acquisition error. Device-managed ownership keeps strobe inactive throughout the device's lifetime and releases HWEN before strobe during probe unwind or removal. Boards without strobe-gpios retain the existing torch behavior. Build-tested with W=1, full Image/modules linking and modpost. The changed driver also links against the retained Oriole integration SDK. The new strobe ownership has not been exercised on hardware. Assisted-by: LLM Signed-off-by: Garrett lindquist --- drivers/leds/flash/leds-lm3644.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/leds/flash/leds-lm3644.c b/drivers/leds/flash/leds-lm3644.c index a370a90d73..a7b51ca55f 100644 --- a/drivers/leds/flash/leds-lm3644.c +++ b/drivers/leds/flash/leds-lm3644.c @@ -5,8 +5,9 @@ * The chip sits in shutdown while its HWEN pin is low. This driver raises * HWEN only while the torch is lit, so every switch-on starts from the * register reset values, and it never enters flash (strobe) mode: no flash - * timeout or strobe pin is involved. Brightness steps are the chip's torch - * current codes, capped by the board's led-max-microamp. + * timeout is involved. An optional external strobe GPIO is held inactive. + * Brightness steps are the chip's torch current codes, capped by the + * board's led-max-microamp. */ #include @@ -218,6 +219,7 @@ static void lm3644_shutdown(void *data) static int lm3644_probe(struct i2c_client *client) { struct led_init_data init_data = {}; + struct gpio_desc *strobe; struct device *dev = &client->dev; struct fwnode_handle *child; u32 sources[2], max_ua, max_code; @@ -238,6 +240,11 @@ static int lm3644_probe(struct i2c_client *client) if (IS_ERR(lm->regmap)) return PTR_ERR(lm->regmap); + /* Keep external flash triggering inactive before raising HWEN. */ + strobe = devm_gpiod_get_optional(dev, "strobe", GPIOD_OUT_LOW); + if (IS_ERR(strobe)) + return dev_err_probe(dev, PTR_ERR(strobe), "strobe GPIO\n"); + lm->hwen = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW); if (IS_ERR(lm->hwen)) return dev_err_probe(dev, PTR_ERR(lm->hwen), "HWEN GPIO\n"); From c5b75bd6cd6d412c6f6526af771c46da52f5d92f Mon Sep 17 00:00:00 2001 From: Garrett lindquist Date: Tue, 10 Nov 2026 17:32:57 -0700 Subject: [PATCH 3/3] arm64: dts: exynos: google: gs101-oriole: add disabled rear torch Describe Oriole's LM3644 on HSI2C7 at 0x63, with HWEN on gpp23-6 and the external strobe on gpp27-0, following Google's GPL camera device tree: https://android.googlesource.com/kernel/devices/google/raviole/+/81506b991a5385be6c59ee27df4dda2b1379c507/dts/gs101-oriole-camera.dtsi Keep USI7, HSI2C7 and the LED controller disabled pending qualification of the native GPIO ownership on the current kernel. Use 100 kHz bus timing, one current sink, a conservative 6000 microamp limit and default off. The existing I2C pin group uses only gpp14-0/1. The existing qualified controller and native LED driver produced visible rear light at brightness 1 during a three-second test and returned to verified HWEN-low. That path uses separate strobe ownership and does not qualify the new strobe-gpios property or enable these nodes by default. The disabled DTB and an enable-only test overlay pass schema validation. Assisted-by: LLM Signed-off-by: Garrett lindquist --- .../boot/dts/exynos/google/gs101-oriole.dts | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/gs101-oriole.dts b/arch/arm64/boot/dts/exynos/google/gs101-oriole.dts index 6b204aa530..d8ff3a5609 100644 --- a/arch/arm64/boot/dts/exynos/google/gs101-oriole.dts +++ b/arch/arm64/boot/dts/exynos/google/gs101-oriole.dts @@ -8,6 +8,7 @@ /dts-v1/; +#include #include #include "gs101-pixel-common.dtsi" @@ -107,3 +108,35 @@ samsung,pin-drv = ; }; }; + +/* + * Rear flash wiring from Google's GPL gs101-oriole-camera.dtsi. Keep the + * external strobe low; torch only, one sink with a conservative 6 mA cap. + * Enable only after a guarded qualification on the matching kernel. + */ +&usi7 { + samsung,mode = ; + samsung,clkreq-on; + status = "disabled"; +}; + +&hsi2c_7 { + clock-frequency = <100000>; + status = "disabled"; + + led-controller@63 { + compatible = "ti,lm3644"; + reg = <0x63>; + enable-gpios = <&gpp23 6 GPIO_ACTIVE_HIGH>; + strobe-gpios = <&gpp27 0 GPIO_ACTIVE_HIGH>; + status = "disabled"; + + led { + function = LED_FUNCTION_TORCH; + color = ; + led-sources = <1>; + led-max-microamp = <6000>; + default-state = "off"; + }; + }; +};