[PATCH] arm64: dts: qcom: sdm845-oneplus: Enable known blocks and add placeholders

David Heidelberg via B4 Relay posted 1 patch 1 month, 3 weeks ago
.../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 28 ++++++++++++++++++++++
1 file changed, 28 insertions(+)
[PATCH] arm64: dts: qcom: sdm845-oneplus: Enable known blocks and add placeholders
Posted by David Heidelberg via B4 Relay 1 month, 3 weeks ago
From: David Heidelberg <david@ixit.cz>

We know these devices are present; most of them are supported by
downstream and are close to the mainline kernels.

This adds placeholders for:
 - front camera (imx371)
 - rear cameras (imx519, imx376k)
 - actuators
 - NFC node on i2c3

This is very handy when rebasing the integration tree with
support for multiple different blocks at the same time.

Signed-off-by: David Heidelberg <david@ixit.cz>
---
 .../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
index db6dd04c51bb5..3e60565d54c08 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
@@ -352,6 +352,26 @@ vreg_s3c_0p6: smps3 {
 	};
 };
 
+&cci {
+	status = "okay";
+};
+
+&cci_i2c0 {
+	/* front sony,imx371 @10 */
+
+	/* rear sony,imx519 @1a */
+
+	/* rear onnn,lc898217xc @72 */
+};
+
+&cci_i2c1 {
+	/* sa,sa3103 @0d */
+
+	/* rear sony,imx376k @10 */
+
+	/* onnn,lc898217xc @74 */
+};
+
 &cdsp_pas {
 	status = "okay";
 	firmware-name = "qcom/sdm845/oneplus6/cdsp.mbn";
@@ -373,6 +393,14 @@ &gpu_zap_shader {
 	firmware-name = "qcom/sdm845/oneplus6/a630_zap.mbn";
 };
 
+&i2c3 {
+	clock-frequency = <400000>;
+
+	status = "okay";
+
+	/* nxp,nxp-nci-i2c @28 */
+};
+
 &i2c10 {
 	status = "okay";
 	clock-frequency = <100000>;

---
base-commit: 563c8dd425b59e44470e28519107b1efc99f4c7b
change-id: 20251123-placeholders-7d65e29648a4

Best regards,
-- 
David Heidelberg <david@ixit.cz>
Re: [PATCH] arm64: dts: qcom: sdm845-oneplus: Enable known blocks and add placeholders
Posted by Konrad Dybcio 1 month, 3 weeks ago
On 12/16/25 9:34 PM, David Heidelberg via B4 Relay wrote:
> From: David Heidelberg <david@ixit.cz>
> 
> We know these devices are present; most of them are supported by
> downstream and are close to the mainline kernels.
> 
> This adds placeholders for:
>  - front camera (imx371)
>  - rear cameras (imx519, imx376k)
>  - actuators
>  - NFC node on i2c3
> 
> This is very handy when rebasing the integration tree with
> support for multiple different blocks at the same time.
> 
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---

[...]

> +&i2c3 {
> +	clock-frequency = <400000>;
> +
> +	status = "okay";
> +
> +	/* nxp,nxp-nci-i2c @28 */

This seems fairly straightforward to enable - could you just
do that instead?

Konrad
Re: [PATCH] arm64: dts: qcom: sdm845-oneplus: Enable known blocks and add placeholders
Posted by David Heidelberg 1 month, 3 weeks ago
On 17/12/2025 13:04, Konrad Dybcio wrote:
> On 12/16/25 9:34 PM, David Heidelberg via B4 Relay wrote:
>> From: David Heidelberg <david@ixit.cz>
>>
>> We know these devices are present; most of them are supported by
>> downstream and are close to the mainline kernels.
>>
>> This adds placeholders for:
>>   - front camera (imx371)
>>   - rear cameras (imx519, imx376k)
>>   - actuators
>>   - NFC node on i2c3
>>
>> This is very handy when rebasing the integration tree with
>> support for multiple different blocks at the same time.
>>
>> Signed-off-by: David Heidelberg <david@ixit.cz>
>> ---
> 
> [...]
> 
>> +&i2c3 {
>> +	clock-frequency = <400000>;
>> +
>> +	status = "okay";
>> +
>> +	/* nxp,nxp-nci-i2c @28 */
> 
> This seems fairly straightforward to enable - could you just
> do that instead?

I have patch for it in-tree, but most likely not correct. See notes in:

https://gitlab.com/sdm845/sdm845-next/-/commit/eeb765bb1166e020a771ed712fec76b56da229ee

For now, I can only confirm the device is on the i2c address.

David>
> Konrad
Re: [PATCH] arm64: dts: qcom: sdm845-oneplus: Enable known blocks and add placeholders
Posted by Konrad Dybcio 1 month, 3 weeks ago
On 12/17/25 4:00 PM, David Heidelberg wrote:
> On 17/12/2025 13:04, Konrad Dybcio wrote:
>> On 12/16/25 9:34 PM, David Heidelberg via B4 Relay wrote:
>>> From: David Heidelberg <david@ixit.cz>
>>>
>>> We know these devices are present; most of them are supported by
>>> downstream and are close to the mainline kernels.
>>>
>>> This adds placeholders for:
>>>   - front camera (imx371)
>>>   - rear cameras (imx519, imx376k)
>>>   - actuators
>>>   - NFC node on i2c3
>>>
>>> This is very handy when rebasing the integration tree with
>>> support for multiple different blocks at the same time.
>>>
>>> Signed-off-by: David Heidelberg <david@ixit.cz>
>>> ---
>>
>> [...]
>>
>>> +&i2c3 {
>>> +    clock-frequency = <400000>;
>>> +
>>> +    status = "okay";
>>> +
>>> +    /* nxp,nxp-nci-i2c @28 */
>>
>> This seems fairly straightforward to enable - could you just
>> do that instead?
> 
> I have patch for it in-tree, but most likely not correct. See notes in:
> 
> https://gitlab.com/sdm845/sdm845-next/-/commit/eeb765bb1166e020a771ed712fec76b56da229ee
> 
> For now, I can only confirm the device is on the i2c address.

Taking a look at just the names of the sdm845-qrd.dtsi/sony modifications for
their sdm845 phones in downstream which I presume have the exact same chip anyway:

notes based on observation and driver (drivers/nfc/nq-nci.c)

        nq@28 {
                compatible = "qcom,nq-nci";
                reg = <0x28>;
                qcom,nq-irq = <&tlmm 63 0x00>; // interrupt, duplicated below
                qcom,nq-ven = <&tlmm 12 0x00>; // voltage enable, ACTIVE_HIGH
                qcom,nq-firm = <&tlmm 62 0x00>; // firmware download, ACTIVE_HIGH
                qcom,nq-clkreq = <&pm8998_gpios 21 0x00>; // clock enable, INPUT
                qcom,nq-esepwr = <&tlmm 116 0x00>; // eSE power enable, ACTIVE_HIGH
                interrupt-parent = <&tlmm>;
                interrupts = <63 0>;
		[... blurb ...]
        };


   pm8998_gpio_21: pm8998_gpio_21 {
                pins = "gpio21";
                function = "normal";
                input-enable;
                bias-pull-down;
                power-source = <1>;
        };


        /* GPIO_62: NFC_DWLD_EN */
        sdm_gpio_62: sdm_gpio_62 {
                mux {
                        pins = "gpio62";
                        function = "gpio";
                };

                config {
                        pins = "gpio62";
                        drive-strength = <2>;
                        bias-disable;
                        output-low;
                };
        };


        /* GPIO_63: NFC_IRQ */
        sdm_gpio_63: sdm_gpio_63 {
                mux {
                        pins = "gpio63";
                        function = "gpio";
                };

                config {
                        pins = "gpio63";
                        drive-strength = <2>;
                        bias-pull-down;
                        input-enable;
                };
        };


        /* GPIO_12 : NFC_VEN */
        sdm_gpio_12: sdm_gpio_12 {
                mux {
                        pins = "gpio12";
                        function = "gpio";
                };

                config {
                        pins = "gpio12";
                        drive-strength = <2>;
                        bias-disable;
                        output-low;
                };
        };

Konrad
Re: [PATCH] arm64: dts: qcom: sdm845-oneplus: Enable known blocks and add placeholders
Posted by David Heidelberg 1 month, 3 weeks ago
On 17/12/2025 16:28, Konrad Dybcio wrote:
> On 12/17/25 4:00 PM, David Heidelberg wrote:
>> On 17/12/2025 13:04, Konrad Dybcio wrote:
>>> On 12/16/25 9:34 PM, David Heidelberg via B4 Relay wrote:
>>>> From: David Heidelberg <david@ixit.cz>
>>>>
>>>> We know these devices are present; most of them are supported by
>>>> downstream and are close to the mainline kernels.
>>>>
>>>> This adds placeholders for:
>>>>    - front camera (imx371)
>>>>    - rear cameras (imx519, imx376k)
>>>>    - actuators
>>>>    - NFC node on i2c3
>>>>
>>>> This is very handy when rebasing the integration tree with
>>>> support for multiple different blocks at the same time.
>>>>
>>>> Signed-off-by: David Heidelberg <david@ixit.cz>
>>>> ---
>>>
>>> [...]
>>>
>>>> +&i2c3 {
>>>> +    clock-frequency = <400000>;
>>>> +
>>>> +    status = "okay";
>>>> +
>>>> +    /* nxp,nxp-nci-i2c @28 */
>>>
>>> This seems fairly straightforward to enable - could you just
>>> do that instead?
>>
>> I have patch for it in-tree, but most likely not correct. See notes in:
>>
>> https://gitlab.com/sdm845/sdm845-next/-/commit/eeb765bb1166e020a771ed712fec76b56da229ee
>>
>> For now, I can only confirm the device is on the i2c address.
> 
> Taking a look at just the names of the sdm845-qrd.dtsi/sony modifications for
> their sdm845 phones in downstream which I presume have the exact same chip anyway:
> 
> notes based on observation and driver (drivers/nfc/nq-nci.c)
> 
>          nq@28 {
>                  compatible = "qcom,nq-nci";
>                  reg = <0x28>;
>                  qcom,nq-irq = <&tlmm 63 0x00>; // interrupt, duplicated below
>                  qcom,nq-ven = <&tlmm 12 0x00>; // voltage enable, ACTIVE_HIGH
>                  qcom,nq-firm = <&tlmm 62 0x00>; // firmware download, ACTIVE_HIGH
>                  qcom,nq-clkreq = <&pm8998_gpios 21 0x00>; // clock enable, INPUT
>                  qcom,nq-esepwr = <&tlmm 116 0x00>; // eSE power enable, ACTIVE_HIGH
>                  interrupt-parent = <&tlmm>;
>                  interrupts = <63 0>;
> 		[... blurb ...]
>          };
> 
> 
>     pm8998_gpio_21: pm8998_gpio_21 {
>                  pins = "gpio21";
>                  function = "normal";
>                  input-enable;
>                  bias-pull-down;
>                  power-source = <1>;
>          };
> 
> 
>          /* GPIO_62: NFC_DWLD_EN */
>          sdm_gpio_62: sdm_gpio_62 {
>                  mux {
>                          pins = "gpio62";
>                          function = "gpio";
>                  };
> 
>                  config {
>                          pins = "gpio62";
>                          drive-strength = <2>;
>                          bias-disable;
>                          output-low;
>                  };
>          };
> 
> 
>          /* GPIO_63: NFC_IRQ */
>          sdm_gpio_63: sdm_gpio_63 {
>                  mux {
>                          pins = "gpio63";
>                          function = "gpio";
>                  };
> 
>                  config {
>                          pins = "gpio63";
>                          drive-strength = <2>;
>                          bias-pull-down;
>                          input-enable;
>                  };
>          };
> 
> 
>          /* GPIO_12 : NFC_VEN */
>          sdm_gpio_12: sdm_gpio_12 {
>                  mux {
>                          pins = "gpio12";
>                          function = "gpio";
>                  };
> 
>                  config {
>                          pins = "gpio12";
>                          drive-strength = <2>;
>                          bias-disable;
>                          output-low;
>                  };
>          };
> 
> Konrad

we have something similar, just different strengths (see below), but I 
would leave this into the point, when someone can properly verify the 
configuration and test it.

David

---

diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi 
b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
index f424ab6706cda..9218b622a0b3e 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
@@ -670,7 +670,19 @@ &i2c3 {

         status = "okay";

-       /* nxp,nxp-nci-i2c @28 */
+       nfc@28 {
+               compatible = "nxp,nxp-nci-i2c";
+               reg = <0x28>;
+
+               interrupt-parent = <&tlmm>;
+               interrupts = <63 IRQ_TYPE_LEVEL_HIGH>;
+
+               enable-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
+               firmware-gpios = <&tlmm 62 GPIO_ACTIVE_HIGH>;
+
+               pinctrl-0 = <&nfc_default>;
+               pinctrl-names = "default";
+       };
  };

  &i2c10 {
@@ -884,6 +896,11 @@ &qupv3_id_0 {
         status = "okay";
  };

+&qup_i2c3_default {
+       drive-strength = <2>;
+       bias-disable;
+};
+
  &qup_i2c10_default {
         drive-strength = <2>;
         bias-disable;
@@ -1389,6 +1406,13 @@ speaker_default: speaker-default-state {
                 bias-pull-up;
                 output-high;
         };
+
+       nfc_default: nfc-default-state {
+               pins = "gpio12", "gpio62", "gpio63";
+               function = "gpio";
+               drive-strength = <6>;
+               bias-pull-up;
+       };
  };

  &venus {




-- 
David Heidelberg

Re: [PATCH] arm64: dts: qcom: sdm845-oneplus: Enable known blocks and add placeholders
Posted by Konrad Dybcio 1 month, 3 weeks ago
On 12/18/25 11:30 PM, David Heidelberg wrote:
> On 17/12/2025 16:28, Konrad Dybcio wrote:
>> On 12/17/25 4:00 PM, David Heidelberg wrote:
>>> On 17/12/2025 13:04, Konrad Dybcio wrote:
>>>> On 12/16/25 9:34 PM, David Heidelberg via B4 Relay wrote:
>>>>> From: David Heidelberg <david@ixit.cz>
>>>>>
>>>>> We know these devices are present; most of them are supported by
>>>>> downstream and are close to the mainline kernels.
>>>>>
>>>>> This adds placeholders for:
>>>>>    - front camera (imx371)
>>>>>    - rear cameras (imx519, imx376k)
>>>>>    - actuators
>>>>>    - NFC node on i2c3
>>>>>
>>>>> This is very handy when rebasing the integration tree with
>>>>> support for multiple different blocks at the same time.
>>>>>
>>>>> Signed-off-by: David Heidelberg <david@ixit.cz>
>>>>> ---
>>>>
>>>> [...]
>>>>
>>>>> +&i2c3 {
>>>>> +    clock-frequency = <400000>;
>>>>> +
>>>>> +    status = "okay";
>>>>> +
>>>>> +    /* nxp,nxp-nci-i2c @28 */
>>>>
>>>> This seems fairly straightforward to enable - could you just
>>>> do that instead?
>>>
>>> I have patch for it in-tree, but most likely not correct. See notes in:
>>>
>>> https://gitlab.com/sdm845/sdm845-next/-/commit/eeb765bb1166e020a771ed712fec76b56da229ee
>>>
>>> For now, I can only confirm the device is on the i2c address.
>>
>> Taking a look at just the names of the sdm845-qrd.dtsi/sony modifications for
>> their sdm845 phones in downstream which I presume have the exact same chip anyway:
>>
>> notes based on observation and driver (drivers/nfc/nq-nci.c)
>>
>>          nq@28 {
>>                  compatible = "qcom,nq-nci";
>>                  reg = <0x28>;
>>                  qcom,nq-irq = <&tlmm 63 0x00>; // interrupt, duplicated below
>>                  qcom,nq-ven = <&tlmm 12 0x00>; // voltage enable, ACTIVE_HIGH
>>                  qcom,nq-firm = <&tlmm 62 0x00>; // firmware download, ACTIVE_HIGH
>>                  qcom,nq-clkreq = <&pm8998_gpios 21 0x00>; // clock enable, INPUT
>>                  qcom,nq-esepwr = <&tlmm 116 0x00>; // eSE power enable, ACTIVE_HIGH
>>                  interrupt-parent = <&tlmm>;
>>                  interrupts = <63 0>;
>>         [... blurb ...]
>>          };
>>
>>
>>     pm8998_gpio_21: pm8998_gpio_21 {
>>                  pins = "gpio21";
>>                  function = "normal";
>>                  input-enable;
>>                  bias-pull-down;
>>                  power-source = <1>;
>>          };
>>
>>
>>          /* GPIO_62: NFC_DWLD_EN */
>>          sdm_gpio_62: sdm_gpio_62 {
>>                  mux {
>>                          pins = "gpio62";
>>                          function = "gpio";
>>                  };
>>
>>                  config {
>>                          pins = "gpio62";
>>                          drive-strength = <2>;
>>                          bias-disable;
>>                          output-low;
>>                  };
>>          };
>>
>>
>>          /* GPIO_63: NFC_IRQ */
>>          sdm_gpio_63: sdm_gpio_63 {
>>                  mux {
>>                          pins = "gpio63";
>>                          function = "gpio";
>>                  };
>>
>>                  config {
>>                          pins = "gpio63";
>>                          drive-strength = <2>;
>>                          bias-pull-down;
>>                          input-enable;
>>                  };
>>          };
>>
>>
>>          /* GPIO_12 : NFC_VEN */
>>          sdm_gpio_12: sdm_gpio_12 {
>>                  mux {
>>                          pins = "gpio12";
>>                          function = "gpio";
>>                  };
>>
>>                  config {
>>                          pins = "gpio12";
>>                          drive-strength = <2>;
>>                          bias-disable;
>>                          output-low;
>>                  };
>>          };
>>
>> Konrad
> 
> we have something similar, just different strengths (see below), but I would leave this into the point, when someone can properly verify the configuration and test it.

You *really* need to configure the PMIC GPIO explicitly

Konrad