mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 1/2] arm64: dts: qcom: sm8250-xiaomi-elish: Add pm8008 PMIC
@ 2026-06-22 18:46 Xin Xu
  2026-06-22 18:52 ` [PATCH v2 2/2] arm64: dts: qcom: sm8250-xiaomi-elish: add ov8856 front camera Xin Xu
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Xin Xu @ 2026-06-22 18:46 UTC (permalink / raw)
  To: konrad.dybcio, andersson, konradybcio
  Cc: linux-arm-msm, devicetree, linux-kernel, Xin Xu

Add the pm8008 PMIC node on i2c15 with seven LDOs,
using GPIO84 as interrupt and GPIO76 as reset.

Signed-off-by: Xin Xu <xxsemail@qq.com>
---
Changes in v2:
  - Fix coding style (blank line, interrupts-extended, property order,
    drop output-high)
  - Correct voltage constraints for ldo1 and ldo2

 .../dts/qcom/sm8250-xiaomi-elish-common.dtsi  | 93 +++++++++++++++++++
 1 file changed, 93 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index 51b57c697a75..c514478cba4f 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -571,6 +571,82 @@ fuel-gauge@55 {
 	};
 };
 
+&i2c15 {
+	clock-frequency = <400000>;
+
+	status = "okay";
+
+	pm8008: pmic@8 {
+		compatible = "qcom,pm8008";
+		reg = <0x8>;
+
+		interrupts-extended = <&tlmm 84 IRQ_TYPE_EDGE_RISING>;
+		reset-gpios = <&tlmm 76 GPIO_ACTIVE_LOW>;
+
+		vdd-l1-l2-supply = <&vreg_s8c_1p35>;
+		vdd-l3-l4-supply = <&vreg_bob>;
+		vdd-l5-supply = <&vreg_bob>;
+		vdd-l6-supply = <&vreg_bob>;
+		vdd-l7-supply = <&vreg_bob>;
+
+		pinctrl-0 = <&pm8008_default>;
+		pinctrl-names = "default";
+
+		gpio-controller;
+		#gpio-cells = <2>;
+		gpio-ranges = <&pm8008 0 0 2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+
+		#thermal-sensor-cells = <0>;
+
+		regulators {
+			vreg_l1p: ldo1 {
+				regulator-name = "vreg_l1p";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <1200000>;
+			};
+
+			vreg_l2p: ldo2 {
+				regulator-name = "vreg_l2p";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <1200000>;
+			};
+
+			vreg_l3p: ldo3 {
+				regulator-name = "vreg_l3p";
+				regulator-min-microvolt = <2800000>;
+				regulator-max-microvolt = <2800000>;
+			};
+
+			vreg_l4p: ldo4 {
+				regulator-name = "vreg_l4p";
+				regulator-min-microvolt = <2800000>;
+				regulator-max-microvolt = <2800000>;
+			};
+
+			vreg_l5p: ldo5 {
+				regulator-name = "vreg_l5p";
+				regulator-min-microvolt = <2800000>;
+				regulator-max-microvolt = <2800000>;
+			};
+
+			vreg_l6p: ldo6 {
+				regulator-name = "vreg_l6p";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+			};
+
+			vreg_l7p: ldo7 {
+				regulator-name = "vreg_l7p";
+				regulator-min-microvolt = <2800000>;
+				regulator-max-microvolt = <2900000>;
+			};
+		};
+	};
+};
+
 &i2c11 {
 	clock-frequency = <400000>;
 	status = "okay";
@@ -801,6 +877,23 @@ bt_en_state: bt-default-state {
 		bias-pull-up;
 	};
 
+	pm8008_default: pm8008-default-state {
+		int-pins {
+			pins = "gpio84";
+			function = "gpio";
+			bias-disable;
+			drive-strength = <2>;
+			input-enable;
+		};
+
+		reset-pins {
+			pins = "gpio76";
+			function = "gpio";
+			bias-pull-up;
+			drive-strength = <2>;
+		};
+	};
+
 	wlan_en_state: wlan-default-state {
 		pins = "gpio20";
 		function = "gpio";
-- 
2.53.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 2/2] arm64: dts: qcom: sm8250-xiaomi-elish: add ov8856 front camera
  2026-06-22 18:46 [PATCH v2 1/2] arm64: dts: qcom: sm8250-xiaomi-elish: Add pm8008 PMIC Xin Xu
@ 2026-06-22 18:52 ` Xin Xu
  2026-06-24 11:56   ` Konrad Dybcio
  2026-06-24 11:57 ` [PATCH v2 1/2] arm64: dts: qcom: sm8250-xiaomi-elish: Add pm8008 PMIC Konrad Dybcio
  2026-06-24 12:00 ` Konrad Dybcio
  2 siblings, 1 reply; 7+ messages in thread
From: Xin Xu @ 2026-06-22 18:52 UTC (permalink / raw)
  To: konrad.dybcio, andersson, konradybcio
  Cc: linux-arm-msm, devicetree, linux-kernel, Xin Xu

Add the ov8856 front camera, connected on CCI1 to CSIPHY4 and
powered by pm8008 LDOs and other supplies.

Signed-off-by: Xin Xu <xxsemail@qq.com>
---
Changes in v2:
  - Fix coding style (property order)

 .../dts/qcom/sm8250-xiaomi-elish-common.dtsi  | 70 +++++++++++++++++++
 1 file changed, 70 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index c514478cba4f..262cb9f29ebc 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -4,6 +4,7 @@
  */
 
 #include <dt-bindings/arm/qcom,ids.h>
+#include <dt-bindings/media/video-interfaces.h>
 #include <dt-bindings/phy/phy.h>
 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
 #include <dt-bindings/usb/pd.h>
@@ -531,6 +532,61 @@ vreg_l7f_1p8: ldo7 {
 	};
 };
 
+&camss {
+	status = "okay";
+
+	vdda-phy-supply = <&vreg_l5a_0p88>;
+	vdda-pll-supply = <&vreg_l9a_1p2>;
+
+	ports {
+		port@4 {
+			csiphy4_ep: endpoint {
+				clock-lanes = <7>;
+				data-lanes = <0 1>;
+				bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>;
+				remote-endpoint = <&ov8856_front_ep>;
+			};
+		};
+	};
+};
+
+&cci1 {
+	status = "okay";
+};
+
+&cci1_i2c1 {
+	camera_front: camera@10 {
+		compatible = "ovti,ov8856";
+		reg = <0x10>;
+
+		avdd-supply = <&vreg_l5p>;
+		dovdd-supply = <&vreg_l1c_1p8>;
+		dvdd-supply = <&vreg_l1p>;
+
+		clocks = <&camcc CAM_CC_MCLK3_CLK>;
+		clock-names = "xvclk";
+		assigned-clocks = <&camcc CAM_CC_MCLK3_CLK>;
+		assigned-clock-rates = <19200000>;
+
+		reset-gpios = <&tlmm 109 GPIO_ACTIVE_LOW>;
+
+		pinctrl-0 = <&mclk3_active &camera_front_active>;
+		pinctrl-names = "default";
+
+		orientation = <0>; /* Front facing */
+		rotation = <270>;
+
+		port {
+			ov8856_front_ep: endpoint {
+				data-lanes = <1 2>;
+				link-frequencies = /bits/ 64
+					<720000000 360000000>;
+				remote-endpoint = <&csiphy4_ep>;
+			};
+		};
+	};
+};
+
 &cdsp {
 	firmware-name = "qcom/sm8250/xiaomi/elish/cdsp.mbn";
 	status = "okay";
@@ -877,6 +933,20 @@ bt_en_state: bt-default-state {
 		bias-pull-up;
 	};
 
+	camera_front_active: camera-front-active-state {
+		pins = "gpio109";
+		function = "gpio";
+		bias-disable;
+		drive-strength = <2>;
+	};
+
+	mclk3_active: mclk3-active-state {
+		pins = "gpio97";
+		function = "cam_mclk";
+		bias-disable;
+		drive-strength = <4>;
+	};
+
 	pm8008_default: pm8008-default-state {
 		int-pins {
 			pins = "gpio84";
-- 
2.53.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] arm64: dts: qcom: sm8250-xiaomi-elish: add ov8856 front camera
  2026-06-22 18:52 ` [PATCH v2 2/2] arm64: dts: qcom: sm8250-xiaomi-elish: add ov8856 front camera Xin Xu
@ 2026-06-24 11:56   ` Konrad Dybcio
  2026-06-25 11:30     ` Xin Xu
  0 siblings, 1 reply; 7+ messages in thread
From: Konrad Dybcio @ 2026-06-24 11:56 UTC (permalink / raw)
  To: Xin Xu, andersson, konradybcio; +Cc: linux-arm-msm, devicetree, linux-kernel

On 6/22/26 8:52 PM, Xin Xu wrote:
> Add the ov8856 front camera, connected on CCI1 to CSIPHY4 and
> powered by pm8008 LDOs and other supplies.
> 
> Signed-off-by: Xin Xu <xxsemail@qq.com>
> ---

[...]

>  &cdsp {
>  	firmware-name = "qcom/sm8250/xiaomi/elish/cdsp.mbn";
>  	status = "okay";
> @@ -877,6 +933,20 @@ bt_en_state: bt-default-state {
>  		bias-pull-up;
>  	};
>  
> +	camera_front_active: camera-front-active-state {
> +		pins = "gpio109";
> +		function = "gpio";
> +		bias-disable;
> +		drive-strength = <2>;
> +	};
> +
> +	mclk3_active: mclk3-active-state {
> +		pins = "gpio97";
> +		function = "cam_mclk";
> +		bias-disable;
> +		drive-strength = <4>;
> +	};

nit: other nodes have drive-strength before bias-disable

Also let's move the mclk pin state definition to sm8250, it's not
specific to this board

Konrad

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] arm64: dts: qcom: sm8250-xiaomi-elish: Add pm8008 PMIC
  2026-06-22 18:46 [PATCH v2 1/2] arm64: dts: qcom: sm8250-xiaomi-elish: Add pm8008 PMIC Xin Xu
  2026-06-22 18:52 ` [PATCH v2 2/2] arm64: dts: qcom: sm8250-xiaomi-elish: add ov8856 front camera Xin Xu
@ 2026-06-24 11:57 ` Konrad Dybcio
  2026-06-24 12:00 ` Konrad Dybcio
  2 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2026-06-24 11:57 UTC (permalink / raw)
  To: Xin Xu, andersson, konradybcio; +Cc: linux-arm-msm, devicetree, linux-kernel

On 6/22/26 8:46 PM, Xin Xu wrote:
> Add the pm8008 PMIC node on i2c15 with seven LDOs,
> using GPIO84 as interrupt and GPIO76 as reset.
> 
> Signed-off-by: Xin Xu <xxsemail@qq.com>
> ---

[...]

> +	pm8008_default: pm8008-default-state {
> +		int-pins {
> +			pins = "gpio84";
> +			function = "gpio";
> +			bias-disable;
> +			drive-strength = <2>;
> +			input-enable;
> +		};
> +
> +		reset-pins {
> +			pins = "gpio76";
> +			function = "gpio";
> +			bias-pull-up;
> +			drive-strength = <2>;

nit: bias properties after drive-strength (I now noticed that 8250 dtsi
has it ""wrong"", we'll mass-touch it up once we have a tool for that..
sorry for the trouble)

otherwise

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] arm64: dts: qcom: sm8250-xiaomi-elish: Add pm8008 PMIC
  2026-06-22 18:46 [PATCH v2 1/2] arm64: dts: qcom: sm8250-xiaomi-elish: Add pm8008 PMIC Xin Xu
  2026-06-22 18:52 ` [PATCH v2 2/2] arm64: dts: qcom: sm8250-xiaomi-elish: add ov8856 front camera Xin Xu
  2026-06-24 11:57 ` [PATCH v2 1/2] arm64: dts: qcom: sm8250-xiaomi-elish: Add pm8008 PMIC Konrad Dybcio
@ 2026-06-24 12:00 ` Konrad Dybcio
  2026-06-25 10:37   ` Xin Xu
  2 siblings, 1 reply; 7+ messages in thread
From: Konrad Dybcio @ 2026-06-24 12:00 UTC (permalink / raw)
  To: Xin Xu, andersson, konradybcio; +Cc: linux-arm-msm, devicetree, linux-kernel

On 6/22/26 8:46 PM, Xin Xu wrote:
> Add the pm8008 PMIC node on i2c15 with seven LDOs,
> using GPIO84 as interrupt and GPIO76 as reset.
> 
> Signed-off-by: Xin Xu <xxsemail@qq.com>
> ---

[...]


> +	pm8008_default: pm8008-default-state {
> +		int-pins {
> +			pins = "gpio84";
> +			function = "gpio";
> +			bias-disable;
> +			drive-strength = <2>;
> +			input-enable;
> +		};

arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dtb: pinctrl@f100000 (qcom,sm8250-pinctrl): pm8008-default-state: 'oneOf' conditional failed, one must be fixed:
        'function' is a required property
        'pins' is a required property
        Unevaluated properties are not allowed ('int-pins', 'reset-pins' were unexpected)
        False schema does not allow True
        from schema $id: http://devicetree.org/schemas/pinctrl/qcom,sm8250-pinctrl.yaml

Please drop input-enable, it's not a thing on TLMM pins

Konrad

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] arm64: dts: qcom: sm8250-xiaomi-elish: Add pm8008 PMIC
  2026-06-24 12:00 ` Konrad Dybcio
@ 2026-06-25 10:37   ` Xin Xu
  0 siblings, 0 replies; 7+ messages in thread
From: Xin Xu @ 2026-06-25 10:37 UTC (permalink / raw)
  To: konrad.dybcio
  Cc: andersson, devicetree, konradybcio, linux-arm-msm, linux-kernel,
	xxsemail

On Wed, 2026-06-24 at 13:57 +0200, Konrad Dybcio wrote:
> On 6/22/26 8:46 PM, Xin Xu wrote:
> > Add the pm8008 PMIC node on i2c15 with seven LDOs,
> > using GPIO84 as interrupt and GPIO76 as reset.
> > 
> > Signed-off-by: Xin Xu <xxsemail@qq.com>
> > ---
> 
> [...]
> 
> > +	pm8008_default: pm8008-default-state {
> > +		int-pins {
> > +			pins = "gpio84";
> > +			function = "gpio";
> > +			bias-disable;
> > +			drive-strength = <2>;
> > +			input-enable;
> > +		};
> > +
> > +		reset-pins {
> > +			pins = "gpio76";
> > +			function = "gpio";
> > +			bias-pull-up;
> > +			drive-strength = <2>;
> 
> nit: bias properties after drive-strength (I now noticed that 8250
> dtsi
> has it ""wrong"", we'll mass-touch it up once we have a tool for
> that..
> sorry for the trouble)
> 
> otherwise
> 
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> 
> Konrad

On Wed, 2026-06-24 at 14:00 +0200, Konrad Dybcio wrote:
> On 6/22/26 8:46 PM, Xin Xu wrote:
> > Add the pm8008 PMIC node on i2c15 with seven LDOs,
> > using GPIO84 as interrupt and GPIO76 as reset.
> > 
> > Signed-off-by: Xin Xu <xxsemail@qq.com>
> > ---
> 
> [...]
> 
> 
> > +	pm8008_default: pm8008-default-state {
> > +		int-pins {
> > +			pins = "gpio84";
> > +			function = "gpio";
> > +			bias-disable;
> > +			drive-strength = <2>;
> > +			input-enable;
> > +		};
> 
> arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dtb: pinctrl@f100000
> (qcom,sm8250-pinctrl): pm8008-default-state: 'oneOf' conditional
> failed, one must be fixed:
>         'function' is a required property
>         'pins' is a required property
>         Unevaluated properties are not allowed ('int-pins', 'reset-
> pins' were unexpected)
>         False schema does not allow True
>         from schema $id:
> http://devicetree.org/schemas/pinctrl/qcom,sm8250-pinctrl.yaml
> 
> Please drop input-enable, it's not a thing on TLMM pins
> 
> Konrad

Thank you for the review and the Reviewed-by tag!

I will fix these coding style issues (splitting the pinctrl nodes,
dropping input-enable, and reordering the bias properties) in the next
version.

Best regards,
Xin Xu


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] arm64: dts: qcom: sm8250-xiaomi-elish: add ov8856 front camera
  2026-06-24 11:56   ` Konrad Dybcio
@ 2026-06-25 11:30     ` Xin Xu
  0 siblings, 0 replies; 7+ messages in thread
From: Xin Xu @ 2026-06-25 11:30 UTC (permalink / raw)
  To: konrad.dybcio
  Cc: andersson, devicetree, konradybcio, linux-arm-msm, linux-kernel,
	xxsemail

On Wed, 2026-06-24 at 13:56 +0200, Konrad Dybcio wrote:
> On 6/22/26 8:52 PM, Xin Xu wrote:
> > Add the ov8856 front camera, connected on CCI1 to CSIPHY4 and
> > powered by pm8008 LDOs and other supplies.
> > 
> > Signed-off-by: Xin Xu <xxsemail@qq.com>
> > ---
> 
> [...]
> 
> >  &cdsp {
> >  	firmware-name = "qcom/sm8250/xiaomi/elish/cdsp.mbn";
> >  	status = "okay";
> > @@ -877,6 +933,20 @@ bt_en_state: bt-default-state {
> >  		bias-pull-up;
> >  	};
> >  
> > +	camera_front_active: camera-front-active-state {
> > +		pins = "gpio109";
> > +		function = "gpio";
> > +		bias-disable;
> > +		drive-strength = <2>;
> > +	};
> > +
> > +	mclk3_active: mclk3-active-state {
> > +		pins = "gpio97";
> > +		function = "cam_mclk";
> > +		bias-disable;
> > +		drive-strength = <4>;
> > +	};
> 
> nit: other nodes have drive-strength before bias-disable
> 
> Also let's move the mclk pin state definition to sm8250, it's not
> specific to this board
> 
> Konrad

I will fix the coding style issues in the next patch.
Also, in the next version of the series, the mclk pin state
will be applied to sm8250.dtsi in a separate patch.

Best regards,
Xin Xu


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-06-25 11:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-22 18:46 [PATCH v2 1/2] arm64: dts: qcom: sm8250-xiaomi-elish: Add pm8008 PMIC Xin Xu
2026-06-22 18:52 ` [PATCH v2 2/2] arm64: dts: qcom: sm8250-xiaomi-elish: add ov8856 front camera Xin Xu
2026-06-24 11:56   ` Konrad Dybcio
2026-06-25 11:30     ` Xin Xu
2026-06-24 11:57 ` [PATCH v2 1/2] arm64: dts: qcom: sm8250-xiaomi-elish: Add pm8008 PMIC Konrad Dybcio
2026-06-24 12:00 ` Konrad Dybcio
2026-06-25 10:37   ` Xin Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox