Skip to contentSkip to conversation

Add initial dual front camera and rear flash support for Pixel 3 / 3 XL

PATCH Superseded David Heidelberg 4 participants 8 messages Jul 19 – Jul 23

Subsystems (3)

v4 of 11 Superseded Latest is v11 →

lore
Share & tools
lore
#0 lore raw

v4 cover Add initial dual front camera and rear flash support for Pixel 3 / 3 XL

Describe the dual front-facing IMX355 sensors (standard and wide) and enable the PMI8998 flash LED with hardware-accurate limits.

This brings up the basic camera topology and flash support in DT.

---
Changes in v4:
- Use 24 MHz ext clock for the cameras, as the downstream does, since
the upstream driver can now support it.
- Added additional LED, as the phone contains two separately controlled white LEDs flash (upper and bottom, in one module).
- Increase flash-max-microamp, as I took wrong "flash" from the
downstream sources and dropped Dmitry R-b.
- Address formatting issues. (Konrad)
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Dropped cam_vio label. (Dmitry)
- Move the MCLK2 pinctrl from cameras to common camss. (Dmitry)
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- leds.h include escaped the initial submission. Fixed.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
David Heidelberg (2):
arm64: dts: qcom: sdm845-google: Add dual front IMX355 cameras
arm64: dts: qcom: sdm845-google: Enable PMI8998 camera flash LEDs

 arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi | 207 ++++++++++++++++++++-
 1 file changed, 206 insertions(+), 1 deletion(-)

---
base-commit: 0718283ab28bc3907e10b61a6b4be6fefa1cbb2f
change-id: 20260315-pixel3-camera-a9989bf589ee

Best regards,

Signature · 1 line
David Heidelberg <[email protected]>
#1 lore raw

PATCH v4 1/2 arm64: dts: qcom: sdm845-google: Add dual front IMX355 cameras

The Pixel 3 features two front-facing Sony IMX355 sensors with different focal lengths (standard and wide-angle).

Both sensors are connected via CSIPHY1 and controlled over CCI I2C1, using MCLK2 as the clock source. Describe the camera nodes and associated resources in the device tree.

This enables support for the dual front camera configuration.

---
 arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi | 182 ++++++++++++++++++++-
 1 file changed, 181 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi +181 -1
index 9368fd6b87515..ad6f61b3baa21 100644
@@ -1,16 +1,17 @@
 // SPDX-License-Identifier: GPL-2.0-only
 
 /dts-v1/;
 
 #include <dt-bindings/arm/qcom,ids.h>
 #include <dt-bindings/dma/qcom-gpi.h>
 #include <dt-bindings/input/linux-event-codes.h>
 #include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/media/video-interfaces.h>
 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
 
 #include "sdm845.dtsi"
 #include "pm8998.dtsi"
 #include "pmi8998.dtsi"
 
 /delete-node/ &mpss_region;
 /delete-node/ &venus_mem;
@@ -127,16 +128,48 @@ vreg_s4a_1p8: regulator-vreg-s4a-1p8 {
 		regulator-min-microvolt = <1800000>;
 		regulator-max-microvolt = <1800000>;
 		regulator-always-on;
 		regulator-boot-on;
 
 		vin-supply = <&vph_pwr>;
 	};
 
+	camera_front_avdd: front-cam-avdd-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "front_cam_avdd";
+
+		regulator-min-microvolt = <2800000>;
+		regulator-max-microvolt = <2800000>;
+
+		gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+
+		pinctrl-0 = <&cam_front_avdd_default_pin>;
+		pinctrl-names = "default";
+
+		vin-supply = <&vreg_bob>;
+	};
+
+	camera_front_aux_avdd: front-cam-aux-avdd-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "front_cam_aux_avdd";
+
+		regulator-min-microvolt = <2800000>;
+		regulator-max-microvolt = <2800000>;
+
+		gpios = <&tlmm 14 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+
+		pinctrl-0 = <&cam_front_aux_avdd_default_pin>;
+		pinctrl-names = "default";
+
+		vin-supply = <&vreg_bob>;
+	};
+
 	wcn3990-pmu {
 		compatible = "qcom,wcn3990-pmu";
 
 		vddio-supply = <&vreg_s4a_1p8>;
 		vddxo-supply = <&vreg_l7a_1p8>;
 		vddrf-supply = <&vreg_l17a_1p3>;
 		vddch0-supply = <&vreg_l25a_3p3>;
 
@@ -209,16 +242,19 @@ vreg_s5a_2p04: smps5 {
 			regulator-max-microvolt = <2040000>;
 		};
 
 		vreg_s7a_1p025: smps7 {
 			regulator-min-microvolt = <900000>;
 			regulator-max-microvolt = <1028000>;
 		};
 
+		vdda_mipi_csi0_0p9:
+		vdda_mipi_csi1_0p9:
+		vdda_mipi_csi2_0p9:
 		vdda_mipi_dsi0_pll:
 		vreg_l1a_0p875: ldo1 {
 			regulator-min-microvolt = <880000>;
 			regulator-max-microvolt = <880000>;
 			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
 			regulator-boot-on;
 		};
 
@@ -283,16 +319,22 @@ vreg_l20a_2p95: ldo20 {
 		};
 
 		vreg_l21a_2p95: ldo21 {
 			regulator-min-microvolt = <2960000>;
 			regulator-max-microvolt = <2968000>;
 			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
 		};
 
+		vreg_l22a_3p3: ldo22 {
+			regulator-min-microvolt = <2864000>;
+			regulator-max-microvolt = <2864000>;
+			regulator-boot-on;
+		};
+
 		vreg_l24a_3p075: ldo24 {
 			regulator-min-microvolt = <3088000>;
 			regulator-max-microvolt = <3088000>;
 			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
 		};
 
 		vreg_l25a_3p3: ldo25 {
 			regulator-min-microvolt = <3300000>;
@@ -314,16 +356,21 @@ vreg_l28a_3p0: ldo28 {
 			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
 			regulator-boot-on;
 			/*
 			 * We can't properly bring the panel back if it gets turned off
 			 * so keep it's regulators always on for now.
 			 */
 			regulator-always-on;
 		};
+
+		vreg_lvs1_1p8: lvs1 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+		};
 	};
 
 	regulators-1 {
 		compatible = "qcom,pmi8998-rpmh-regulators";
 		qcom,pmic-id = "b";
 
 		vdd-bob-supply = <&vph_pwr>;
 
@@ -346,24 +393,129 @@ regulators-2 {
 
 		vreg_s3c_0p6: smps3 {
 			regulator-min-microvolt = <600000>;
 			regulator-max-microvolt = <600000>;
 		};
 	};
 };
 
+&camss {
+	vdda-phy-supply = <&vreg_l1a_0p875>;
+	vdda-pll-supply = <&vreg_l26a_1p2>;
+
+	vdda-csi0-supply = <&vdda_mipi_csi0_0p9>;
+	vdda-csi1-supply = <&vdda_mipi_csi1_0p9>;
+	vdda-csi2-supply = <&vdda_mipi_csi2_0p9>;
+
+	/*
+	 * MCLK2 (GPIO15) is shared between both front camera sensors.
+	 * The clock is generated by CAMSS, therefore the pin is
+	 * configured here rather than in individual sensor nodes.
+	 */
+	pinctrl-0 = <&cam_mclk2_default>;
+	pinctrl-names = "default";
+
+	status = "okay";
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@1 {
+			reg = <1>;
+
+			camss_endpoint1: endpoint {
+				bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>;
+				data-lanes = <0 1 2 3>;
+				remote-endpoint = <&cam_aux_front_endpoint>;
+			};
+		};
+
+		port@2 {
+			reg = <2>;
+
+			camss_endpoint2: endpoint {
+				bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>;
+				data-lanes = <0 1 2 3>;
+				remote-endpoint = <&cam_front_endpoint>;
+			};
+		};
+	};
+};
+
+&cci0_sleep {
+	/* bus has external pull-up, don't pull down */
+	bias-disable;
+};
+
 &cci {
 	status = "okay";
 };
 
 &cci_i2c1 {
 	/* actuator @0c */
 
-	/* front camera, imx355 @1a */
+	front_cam: camera@10 {
+		compatible = "sony,imx355";
+		reg = <0x10>;
+
+		clocks = <&clock_camcc CAM_CC_MCLK2_CLK>;
+		assigned-clocks = <&clock_camcc CAM_CC_MCLK2_CLK>;
+		assigned-clock-rates = <24000000>;
+
+		reset-gpios = <&tlmm 21 GPIO_ACTIVE_LOW>;
+
+		avdd-supply = <&camera_front_avdd>;
+		dvdd-supply = <&vreg_s3a_1p35>;
+		dovdd-supply = <&vreg_lvs1_1p8>;
+
+		pinctrl-0 = <&cam_front_reset_default_pin>;
+		pinctrl-names = "default";
+
+		rotation = <270>;
+		orientation = <0>;
+
+		port {
+			cam_front_endpoint: endpoint {
+				data-lanes = <1 2 3 4>;
+				link-frequencies = /bits/ 64 <360000000>;
+				remote-endpoint = <&camss_endpoint2>;
+			};
+		};
+	};
+
+	front_aux_cam: camera@1a {
+		compatible = "sony,imx355";
+		reg = <0x1a>;
+
+		clocks = <&clock_camcc CAM_CC_MCLK2_CLK>;
+		assigned-clocks = <&clock_camcc CAM_CC_MCLK2_CLK>;
+		assigned-clock-rates = <24000000>;
+
+		reset-gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
+
+		avdd-supply = <&camera_front_aux_avdd>;
+		dvdd-supply = <&vreg_s3a_1p35>;
+		dovdd-supply = <&vreg_lvs1_1p8>;
+
+		pinctrl-0 = <&cam_front_aux_reset_default_pin>;
+		pinctrl-names = "default";
+
+		rotation = <270>;
+		orientation = <0>;
+
+		port {
+			cam_aux_front_endpoint: endpoint {
+				data-lanes = <1 2 3 4>;
+				link-frequencies = /bits/ 64 <360000000>;
+				remote-endpoint = <&camss_endpoint1>;
+			};
+		};
+	};
 
 	/* eeprom @50, at24 driver says 8K */
 };
 
 &cdsp_pas {
 	firmware-name = "qcom/sdm845/Google/blueline/cdsp.mbn";
 
 	status = "okay";
@@ -485,16 +637,44 @@ nfc_int_default: nfc-int-default-state {
 
 	nfc_enable_default: nfc-enable-default-state {
 		pins = "gpio25", "gpio79";
 		function = "gpio";
 		drive-strength = <2>;
 		bias-pull-down;
 	};
 
+	cam_front_avdd_default_pin: cam-avdd-default-pins {
+		pins = "gpio8";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+	};
+
+	cam_front_aux_reset_default_pin: cam-front-aux-reset-default-pins {
+		pins = "gpio9";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+	};
+
+	cam_front_aux_avdd_default_pin: cam-avdd-aux-default-pins {
+		pins = "gpio14";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+	};
+
+	cam_front_reset_default_pin: cam-front-reset-default-pins {
+		pins = "gpio21";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+	};
+
 	touchscreen_reset: ts-reset-state {
 		pins = "gpio99";
 		function = "gpio";
 		drive-strength = <8>;
 		bias-pull-up;
 	};
 
 	touchscreen_pins: ts-pins-gpio-state {
Signature · 1 line
2.53.0
#2 lore raw

Re: [PATCH v4 1/2] arm64: dts: qcom: sdm845-google: Add dual front IMX355 cameras

Thank you for your contribution! Sashiko AI review found 5 potential issue(s) to consider: - [High] Hardware Pin Configuration Error overriding `cci0_sleep` instead of `cci1_sleep`, causing power…

Thank you for your contribution! Sashiko AI review found 5 potential issue(s) to consider:
- [High] Hardware Pin Configuration Error overriding cci0_sleep instead of cci1_sleep, causing power drainage.
- [High] Placing the MCLK2 pinctrl configuration in the &camss node creates a severe probe ordering race condition.
- [Medium] Mismatch between the commit message asserting both sensors share CSIPHY1 and the Device Tree mapping them to separate PHYs.
- [Medium] The vreg_l22a_3p3 regulator is defined with a voltage of 2.864V instead of 3.3V and causes a continuous power leak.
- [Low] Addition of undocumented and unsupported vdda-csiX-supply properties in the CAMSS node.
--

--- Patch [1]: [PATCH v4 1/2] arm64: dts: qcom: sdm845-google: Add dual front IMX355 cameras --- commit 24802f71e3152de09fabf33fc17c82719cd2b67b
Author: David Heidelberg <[email protected]>

arm64: dts: qcom: sdm845-google: Add dual front IMX355 cameras

This commit adds device tree nodes for the Pixel 3's dual front-facing Sony IMX355 sensors. It describes the camera nodes, MCLK2 clock source, CCI I2C1 bus connections, and associated regulators.

Quoted 4 lines

The Pixel 3 features two front-facing Sony IMX355 sensors with different focal lengths (standard and wide-angle).

Both sensors are connected via CSIPHY1 and controlled over CCI I2C1,

[Severity: Medium]
Is this commit message description accurate?

The device tree maps the endpoints to port@1 (CSIPHY1) and port@2 (CSIPHY2). Because both sensors request 4 data lanes (data-lanes = <1 2 3 4>), is it possible for them to concurrently share a single 4-lane CSIPHY without a hardware multiplexer?

Could the commit message be updated to reflect the actual hardware connectivity shown in the device tree?

Quoted 3 lines
arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi +0 -0

[ ... ]

arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi vreg_l21a_2p95: ldo21 { · line 332

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi +6 -0
@@ -288,6 +324,12 @@ vreg_l21a_2p95: ldo21 {
 			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
 		};
 
+		vreg_l22a_3p3: ldo22 {
+			regulator-min-microvolt = <2864000>;
+			regulator-max-microvolt = <2864000>;
+			regulator-boot-on;
+		};
+

[Severity: Medium]
Does this regulator configuration inadvertently cause a continuous power leak?

The label indicates 3.3V, but the voltage is constrained to 2.864V. Also, this regulator does not appear to be used by any device node in the device tree, yet it is marked with regulator-boot-on. Should this unused, boot-on regulator be removed to prevent battery drain?

[ ... ]

arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi regulators-2 { · line 407

Quoted 7 lines
arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi +7 -0
+&camss {
+	vdda-phy-supply = <&vreg_l1a_0p875>;
+	vdda-pll-supply = <&vreg_l26a_1p2>;
+
+	vdda-csi0-supply = <&vdda_mipi_csi0_0p9>;
+	vdda-csi1-supply = <&vdda_mipi_csi1_0p9>;
+	vdda-csi2-supply = <&vdda_mipi_csi2_0p9>;

[Severity: Low]
Will adding these properties cause dtbs_check validation errors?

The upstream qcom,sdm845-camss.yaml devicetree binding explicitly specifies
additionalProperties: false and only supports vdda-phy-supply and vdda-pll-supply. Are these undocumented vdda-csiX-supply properties ignored by the Linux camss driver?

arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi regulators-2 { · line 416

Quoted 9 lines
arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi +9 -0
+
+	/*
+	 * MCLK2 (GPIO15) is shared between both front camera sensors.
+	 * The clock is generated by CAMSS, therefore the pin is
+	 * configured here rather than in individual sensor nodes.
+	 */
+	pinctrl-0 = <&cam_mclk2_default>;
+	pinctrl-names = "default";
+

[Severity: High]
Does placing the MCLK2 pinctrl configuration in the &camss node create a probe ordering race condition?

The comment states the clock is generated by CAMSS, but the clock is actually generated by camcc. Since the sensors rely on camcc and the I2C controller, they may probe before the camss node is initialized.

If the sensors attempt an initial I2C read before camss probes, the MCLK2 pinmux will not be applied to GPIO15, causing the clock signal to be missing and the probe to intermittently fail. Should this pinctrl be managed elsewhere to guarantee availability during sensor probe?

[ ... ]

arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi regulators-2 { · line 449

Quoted 5 lines

+&cci0_sleep {

arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi +4 -0
+	/* bus has external pull-up, don't pull down */
+	bias-disable;
+};
+

[Severity: High]
Is this bias-disable override applied to the correct I2C bus?

The front cameras are connected to the cci_i2c1 bus. However, this override is applied to the &cci0_sleep pinctrl node (which controls cci_i2c0 pins), instead of the required &cci1_sleep node (which controls cci_i2c1 pins).

Will this leave the cci_i2c1 bus with its default bias-pull-down in sleep mode, drawing current through the external pull-up and draining the battery?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#3 lore raw

Re: [PATCH v4 1/2] arm64: dts: qcom: sdm845-google: Add dual front IMX355 cameras

In reply to David Heidelberg

arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi vreg_l20a_2p95: ldo20 { · line 331

Quoted 5 lines · On 19/07/2026 18:01, David Heidelberg via B4 Relay wrote:
arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi +5 -0
+		vreg_l22a_3p3: ldo22 {
+			regulator-min-microvolt = <2864000>;
+			regulator-max-microvolt = <2864000>;
+			regulator-boot-on;
+		};

What's rail regulator used for ?

---
bod

#4 lore raw

Re: [PATCH v4 1/2] arm64: dts: qcom: sdm845-google: Add dual front IMX355 cameras

Quoted 8 lines · Bryan O'Donoghue
Quoted 5 lines · On 19/07/2026 18:01, David Heidelberg via B4 Relay wrote:

+        vreg_l22a_3p3: ldo22 {
+            regulator-min-microvolt = <2864000>;
+            regulator-max-microvolt = <2864000>;
+            regulator-boot-on;
+        };

What's rail regulator used for ?

This one should be used for the actuator, but this got dropped in follow up series. [1]

David

[1] https://lore.kernel.org/all/[email protected]/>

Quoted 2 lines

---
bod

#5 lore raw

PATCH v4 2/2 arm64: dts: qcom: sdm845-google: Enable PMI8998 camera flash LEDs

In reply to David Heidelberg

Enable the PMI8998 flash LED block and describe two white flash LEDs used for the rear camera.

Configure the LED in flash mode with hardware limits matching the original device configuration, including maximum current and timeout.

In contrary to downstream, we can control both LEDs separately.

---
 arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi | 25 ++++++++++++++++++++++
 1 file changed, 25 insertions(+)
arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi +25 -0
index ad6f61b3baa21..0ce48c4647f17 100644
@@ -1,16 +1,17 @@
 // SPDX-License-Identifier: GPL-2.0-only
 
 /dts-v1/;
 
 #include <dt-bindings/arm/qcom,ids.h>
 #include <dt-bindings/dma/qcom-gpi.h>
 #include <dt-bindings/input/linux-event-codes.h>
 #include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/media/video-interfaces.h>
 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
 
 #include "sdm845.dtsi"
 #include "pm8998.dtsi"
 #include "pmi8998.dtsi"
 
 /delete-node/ &mpss_region;
@@ -601,16 +602,40 @@ &pm8998_resin {
 };
 
 &pmi8998_charger {
 	monitored-battery = <&battery>;
 
 	status = "okay";
 };
 
+&pmi8998_flash {
+	status = "okay";
+
+	/* upper part */
+	led-0 {
+		function = LED_FUNCTION_FLASH;
+		color = <LED_COLOR_ID_WHITE>;
+		led-sources = <1>;
+		led-max-microamp = <500000>;
+		flash-max-microamp = <1500000>;
+		flash-max-timeout-us = <1280000>;
+	};
+
+	/* bottom part */
+	led-1 {
+		function = LED_FUNCTION_FLASH;
+		color = <LED_COLOR_ID_WHITE>;
+		led-sources = <2>;
+		led-max-microamp = <500000>;
+		flash-max-microamp = <1500000>;
+		flash-max-timeout-us = <1280000>;
+	};
+};
+
 &qupv3_id_0 {
 	status = "okay";
 };
 
 &qupv3_id_1 {
 	status = "okay";
 };
 
Signature · 1 line
2.53.0
#6 lore raw

Re: [PATCH v4 2/2] arm64: dts: qcom: sdm845-google: Enable PMI8998 camera flash LEDs

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] Missing `function-enumerator` property causes LED sysfs name collision, leading to non-standard…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Missing function-enumerator property causes LED sysfs name collision, leading to non-standard fallback naming. --

--- Patch [2]: [PATCH v4 2/2] arm64: dts: qcom: sdm845-google: Enable PMI8998 camera flash LEDs --- commit b5868918114efddab825d07ade0f191b5b3123e1
Author: David Heidelberg <[email protected]>

arm64: dts: qcom: sdm845-google: Enable PMI8998 camera flash LEDs

This commit enables the PMI8998 flash LED block and describes two white flash LEDs used for the rear camera. The LEDs are configured in flash mode with hardware limits matching the original device configuration.

Quoted 3 lines
arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi +0 -0

[ ... ]

Quoted 7 lines

+&pmi8998_flash {

arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi +6 -0
+	status = "okay";
+
+	/* upper part */
+	led-0 {
+		function = LED_FUNCTION_FLASH;
+		color = <LED_COLOR_ID_WHITE>;

arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi &pm8998_resin { · line 626

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi +10 -0
+		led-sources = <1>;
+		led-max-microamp = <500000>;
+		flash-max-microamp = <1500000>;
+		flash-max-timeout-us = <1280000>;
+	};
+
+	/* bottom part */
+	led-1 {
+		function = LED_FUNCTION_FLASH;
+		color = <LED_COLOR_ID_WHITE>;

[Severity: Medium]
Does this missing function-enumerator property cause a sysfs name collision?

Since both led-0 and led-1 share the identical color (LED_COLOR_ID_WHITE) and function (LED_FUNCTION_FLASH), they both evaluate to the base name white:flash.

Without a function-enumerator, the LED core's led_classdev_register_ext() detects a collision on the second LED and falls back to appending an underscore and a counter. This results in the sysfs nodes white:flash and white:flash_1 instead of the modern standard LED naming convention (white:flash-0 and white:flash-1) which user-space managers rely on for consistent hardware discovery.

Could we add function-enumerator = <0>; to led-0 and function-enumerator = <1>; to led-1 to ensure standard naming?

Quoted 6 lines
arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi +6 -0
+		led-sources = <2>;
+		led-max-microamp = <500000>;
+		flash-max-microamp = <1500000>;
+		flash-max-timeout-us = <1280000>;
+	};
+};
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
Reviewed-by on v4 2/2
#7 lore raw

Re: [PATCH v4 2/2] arm64: dts: qcom: sdm845-google: Enable PMI8998 camera flash LEDs

In reply to David Heidelberg
Quoted 8 lines · On Sun, Jul 19, 2026 at 07:02:00PM +0200, David Heidelberg via B4 Relay wrote:

From: David Heidelberg <[email protected]>

Enable the PMI8998 flash LED block and describe two white flash LEDs used for the rear camera.

Configure the LED in flash mode with hardware limits matching the original device configuration, including maximum current and timeout.

Quoted 7 lines

In contrary to downstream, we can control both LEDs separately.

---
 arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi | 25 ++++++++++++++++++++++
 1 file changed, 25 insertions(+)
Signature · 2 lines
With best wishes
Dmitry