Devicetree
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: shikra-evk: Add GPIO expanders
@ 2026-09-24 12:33 Komal Bajaj
  2026-09-24 12:41 ` sashiko-bot
  0 siblings, 1 reply; 3+ messages in thread
From: Komal Bajaj @ 2026-09-24 12:33 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Abel Vesa, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Faruque Ansari,
	Komal Bajaj

Add the EVK GPIO expander definitions on the I2C3 bus. Describe the
TCA9538 and TCA9539 expanders used by EVK boards.

Co-developed-by: Faruque Ansari <faruque.ansari@oss.qualcomm.com>
Signed-off-by: Faruque Ansari <faruque.ansari@oss.qualcomm.com>
Signed-off-by: Komal Bajaj <komal.bajaj@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/shikra-evk.dtsi | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/shikra-evk.dtsi b/arch/arm64/boot/dts/qcom/shikra-evk.dtsi
index 0115fc9095b3..04faf09b21ae 100644
--- a/arch/arm64/boot/dts/qcom/shikra-evk.dtsi
+++ b/arch/arm64/boot/dts/qcom/shikra-evk.dtsi
@@ -29,4 +29,32 @@ tpm@0 {
 
 &uart0 {
 	status = "okay";
+
+	expander0: pca953x@38 {
+		compatible = "ti,tca9538";
+		reg = <0x38>;
+		#gpio-cells = <2>;
+		gpio-controller;
+	};
+
+	expander1: pca953x@3c {
+		compatible = "ti,tca9538";
+		reg = <0x3c>;
+		#gpio-cells = <2>;
+		gpio-controller;
+	};
+
+	expander2: pca953x@20 {
+		compatible = "ti,tca9539";
+		reg = <0x20>;
+		#gpio-cells = <2>;
+		gpio-controller;
+	};
+
+	expander3: pca953x@21 {
+		compatible = "ti,tca9539";
+		reg = <0x21>;
+		#gpio-cells = <2>;
+		gpio-controller;
+	};
 };

---
base-commit: 3d7783543c2646af69ad65825e810060494bea21
change-id: 20260924-shikra-gpio-expander-25ff4a29c848

Best regards,
-- 
Komal Bajaj <komal.bajaj@oss.qualcomm.com>


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

* Re: [PATCH] arm64: dts: qcom: shikra-evk: Add GPIO expanders
  2026-09-24 12:33 [PATCH] arm64: dts: qcom: shikra-evk: Add GPIO expanders Komal Bajaj
@ 2026-09-24 12:41 ` sashiko-bot
  2026-09-29  6:27   ` Komal Bajaj
  0 siblings, 1 reply; 3+ messages in thread
From: sashiko-bot @ 2026-09-24 12:41 UTC (permalink / raw)
  To: Komal Bajaj; +Cc: robh, conor+dt, devicetree

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] dts: I2C GPIO expanders placed under UART node
- [Medium] dts: I2C addresses mismatch hardware compatible strings
--

commit 32fcaaddae686bf893114a2f4648aee0e464eb7f
Author: Komal Bajaj <komal.bajaj@oss.qualcomm.com>

arm64: dts: qcom: shikra-evk: Add GPIO expanders

This commit adds definitions for TCA9538 and TCA9539 GPIO expanders used on
the shikra-evk board. It maps them at various I2C addresses.

> diff --git a/arch/arm64/boot/dts/qcom/shikra-evk.dtsi b/arch/arm64/boot/dts/qcom/shikra-evk.dtsi
> index 0115fc9095b3b..04faf09b21ae0 100644
> --- a/arch/arm64/boot/dts/qcom/shikra-evk.dtsi
> +++ b/arch/arm64/boot/dts/qcom/shikra-evk.dtsi
> @@ -29,4 +29,32 @@ tpm@0 {
>  
>  &uart0 {
>  	status = "okay";
> +
> +	expander0: pca953x@38 {

[Severity: High]
Are these I2C GPIO expanders placed under the correct parent node?

Because they are defined as children of uart0, they will likely fail to probe
and cause device tree validation errors since UART controllers do not
instantiate I2C devices. The commit message mentions the I2C3 bus, should
these be placed under a node like &i2c3 instead?

> +		compatible = "ti,tca9538";
> +		reg = <0x38>;

[Severity: Medium]
Does the ti,tca9538 compatible string match the hardware at I2C address 0x38?

The TCA9538 hardware strictly uses addresses 0x70 through 0x73, while
address 0x38 typically corresponds to PCA9554A. Using a mismatched compatible
string might cause failures if chip-specific quirks are needed later.

> +		#gpio-cells = <2>;
> +		gpio-controller;
> +	};
> +
[ ... ]
> +
> +	expander2: pca953x@20 {
> +		compatible = "ti,tca9539";
> +		reg = <0x20>;

[Severity: Medium]
Is ti,tca9539 the correct compatible string for address 0x20?

The TCA9539 hardware strictly uses addresses 0x74 through 0x77, whereas
address 0x20 usually belongs to TCA9535 or PCA9555. Using the wrong compatible
string can inaccurately describe the hardware and lead to issues.

> +		#gpio-cells = <2>;
> +		gpio-controller;
> +	};

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260924-shikra-gpio-expander-v1-1-71929498ea44@oss.qualcomm.com?part=1

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

* Re: [PATCH] arm64: dts: qcom: shikra-evk: Add GPIO expanders
  2026-09-24 12:41 ` sashiko-bot
@ 2026-09-29  6:27   ` Komal Bajaj
  0 siblings, 0 replies; 3+ messages in thread
From: Komal Bajaj @ 2026-09-29  6:27 UTC (permalink / raw)
  To: sashiko-reviews; +Cc: robh, conor+dt, devicetree

On 9/24/2026 6:11 PM, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
> - [High] dts: I2C GPIO expanders placed under UART node
> - [Medium] dts: I2C addresses mismatch hardware compatible strings
> --
>
> commit 32fcaaddae686bf893114a2f4648aee0e464eb7f
> Author: Komal Bajaj <komal.bajaj@oss.qualcomm.com>
>
> arm64: dts: qcom: shikra-evk: Add GPIO expanders
>
> This commit adds definitions for TCA9538 and TCA9539 GPIO expanders used on
> the shikra-evk board. It maps them at various I2C addresses.
>
>> diff --git a/arch/arm64/boot/dts/qcom/shikra-evk.dtsi b/arch/arm64/boot/dts/qcom/shikra-evk.dtsi
>> index 0115fc9095b3b..04faf09b21ae0 100644
>> --- a/arch/arm64/boot/dts/qcom/shikra-evk.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/shikra-evk.dtsi
>> @@ -29,4 +29,32 @@ tpm@0 {
>>   
>>   &uart0 {
>>   	status = "okay";
>> +
>> +	expander0: pca953x@38 {
> [Severity: High]
> Are these I2C GPIO expanders placed under the correct parent node?
>
> Because they are defined as children of uart0, they will likely fail to probe
> and cause device tree validation errors since UART controllers do not
> instantiate I2C devices. The commit message mentions the I2C3 bus, should
> these be placed under a node like &i2c3 instead?

Thanks for spotting this.
GPIO expander nodes are incorrectly placed under uart0. I will move them 
under the appropriate I2C controller in the next revision.

>
>> +		compatible = "ti,tca9538";
>> +		reg = <0x38>;
> [Severity: Medium]
> Does the ti,tca9538 compatible string match the hardware at I2C address 0x38?
>
> The TCA9538 hardware strictly uses addresses 0x70 through 0x73, while
> address 0x38 typically corresponds to PCA9554A. Using a mismatched compatible
> string might cause failures if chip-specific quirks are needed later.

The compatible string is correct and match the hardware used on board. I 
verified this against the board schematics.
The comment appears to be based on TI datasheet address assumptions, 
which are not applicable to this design.
Thus, no change is needed.

>
>> +		#gpio-cells = <2>;
>> +		gpio-controller;
>> +	};
>> +
> [ ... ]
>> +
>> +	expander2: pca953x@20 {
>> +		compatible = "ti,tca9539";
>> +		reg = <0x20>;
> [Severity: Medium]
> Is ti,tca9539 the correct compatible string for address 0x20?
>
> The TCA9539 hardware strictly uses addresses 0x74 through 0x77, whereas
> address 0x20 usually belongs to TCA9535 or PCA9555. Using the wrong compatible
> string can inaccurately describe the hardware and lead to issues.

Same applies here.

Thanks
Komal

>
>> +		#gpio-cells = <2>;
>> +		gpio-controller;
>> +	};


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

end of thread, other threads:[~2026-09-29  6:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-24 12:33 [PATCH] arm64: dts: qcom: shikra-evk: Add GPIO expanders Komal Bajaj
2026-09-24 12:41 ` sashiko-bot
2026-09-29  6:27   ` Komal Bajaj

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