public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: i2c: nxp,pca9564: convert to DT schema
@ 2026-04-08  8:23 Akhila YS
  2026-04-09  8:26 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 4+ messages in thread
From: Akhila YS @ 2026-04-08  8:23 UTC (permalink / raw)
  To: Andi Shyti, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Peter Rosin
  Cc: linux-i2c, devicetree, linux-kernel, Akhila YS

Convert NXP PCA PCA9564/PCA9665 I2C controller to YAML format.

Signed-off-by: Akhila YS <akhilayalmati@gmail.com>
---
 .../devicetree/bindings/i2c/i2c-pca-platform.txt   | 27 ----------
 .../devicetree/bindings/i2c/nxp,pca9564.yaml       | 60 ++++++++++++++++++++++
 2 files changed, 60 insertions(+), 27 deletions(-)

diff --git a/Documentation/devicetree/bindings/i2c/i2c-pca-platform.txt b/Documentation/devicetree/bindings/i2c/i2c-pca-platform.txt
deleted file mode 100644
index 73a693d66ef7..000000000000
--- a/Documentation/devicetree/bindings/i2c/i2c-pca-platform.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-* NXP PCA PCA9564/PCA9665 I2C controller
-
-The PCA9564/PCA9665 serves as an interface between most standard
-parallel-bus microcontrollers/microprocessors and the serial I2C-bus
-and allows the parallel bus system to communicate bi-directionally
-with the I2C-bus.
-
-Required properties :
-
- - reg : Offset and length of the register set for the device
- - compatible : one of "nxp,pca9564" or "nxp,pca9665"
-
-Optional properties
- - interrupts : the interrupt number
- - reset-gpios : gpio specifier for gpio connected to RESET_N pin. As the line
-   is active low, it should be marked GPIO_ACTIVE_LOW.
- - clock-frequency : I2C bus frequency.
-
-Example:
-	i2c0: i2c@80000 {
-		compatible = "nxp,pca9564";
-		#address-cells = <1>;
-		#size-cells = <0>;
-		reg = <0x80000 0x4>;
-		reset-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
-		clock-frequency = <100000>;
-	};
diff --git a/Documentation/devicetree/bindings/i2c/nxp,pca9564.yaml b/Documentation/devicetree/bindings/i2c/nxp,pca9564.yaml
new file mode 100644
index 000000000000..5d5653255b91
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/nxp,pca9564.yaml
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/i2c/nxp,pca9564.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP PCA9564 / PCA9665 I2C Controller
+
+maintainers:
+  - Peter Rosin <peda@axentia.se>
+
+description:
+  The PCA9564/PCA9665 serves as an interface between standard
+  parallel-bus microcontrollers/microprocessors and the serial I2C bus.
+  It enables bidirectional communication between the parallel bus
+  system and the I2C bus.
+
+properties:
+  compatible:
+    enum:
+      - nxp,pca9564
+      - nxp,pca9665
+
+  reg:
+    maxItems: 1
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+  interrupts:
+    maxItems: 1
+
+  reset-gpios:
+    maxItems: 1
+
+  clock-frequency:
+    default: 100000
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    i2c@80000 {
+        compatible = "nxp,pca9564";
+        #address-cells = <1>;
+        #size-cells = <0>;
+        reg = <0x80000 0x4>;
+        reset-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
+        clock-frequency = <100000>;
+    };
+...

---
base-commit: d4906ae14a5f136ceb671bb14cedbf13fa560da6
change-id: 20260407-i2c-nxp-29f251ad86b0

Best regards,
--  
Akhila YS <akhilayalmati@gmail.com>


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

* Re: [PATCH] dt-bindings: i2c: nxp,pca9564: convert to DT schema
  2026-04-08  8:23 [PATCH] dt-bindings: i2c: nxp,pca9564: convert to DT schema Akhila YS
@ 2026-04-09  8:26 ` Krzysztof Kozlowski
  2026-04-09 15:02   ` Akhila YS
  0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2026-04-09  8:26 UTC (permalink / raw)
  To: Akhila YS
  Cc: Andi Shyti, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Peter Rosin, linux-i2c, devicetree, linux-kernel

On Wed, Apr 08, 2026 at 08:23:31AM +0000, Akhila YS wrote:
> Convert NXP PCA PCA9564/PCA9665 I2C controller to YAML format.

DT schema, not YAML format. Look at your subject.

...

> +  reg:
> +    maxItems: 1
> +
> +  "#address-cells":
> +    const: 1
> +
> +  "#size-cells":
> +    const: 0
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  reset-gpios:
> +    maxItems: 1
> +
> +  clock-frequency:
> +    default: 100000
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false

And if you tested any DTS with this, you would see this cannot work.
Look at other bindings - you miss ref to i2c-controller and
unevaluatedProps. But the problem is that you are doing something which
would never work, so I have doubts that you know what you are doing. One
thing is to make a mistake, other thing is to post something can never
work thus putting quite noticeable requirements on review.

Please first learn how DTS and DT bindings work, before you post new
patches.

Best regards,
Krzysztof


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

* Re: [PATCH] dt-bindings: i2c: nxp,pca9564: convert to DT schema
  2026-04-09  8:26 ` Krzysztof Kozlowski
@ 2026-04-09 15:02   ` Akhila YS
  2026-04-09 16:21     ` Akhila YS
  0 siblings, 1 reply; 4+ messages in thread
From: Akhila YS @ 2026-04-09 15:02 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andi Shyti, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Peter Rosin, linux-i2c, devicetree, linux-kernel


On 09-04-2026 13:56, Krzysztof Kozlowski wrote:
> On Wed, Apr 08, 2026 at 08:23:31AM +0000, Akhila YS wrote:
>> Convert NXP PCA PCA9564/PCA9665 I2C controller to YAML format.
> DT schema, not YAML format. Look at your subject.


Okay, i will change it.

>
> ...
>
>> +  reg:
>> +    maxItems: 1
>> +
>> +  "#address-cells":
>> +    const: 1
>> +
>> +  "#size-cells":
>> +    const: 0
>> +
>> +  interrupts:
>> +    maxItems: 1
>> +
>> +  reset-gpios:
>> +    maxItems: 1
>> +
>> +  clock-frequency:
>> +    default: 100000
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +
>> +additionalProperties: false
> And if you tested any DTS with this, you would see this cannot work.
> Look at other bindings - you miss ref to i2c-controller and
> unevaluatedProps. But the problem is that you are doing something which
> would never work, so I have doubts that you know what you are doing. One
> thing is to make a mistake, other thing is to post something can never
> work thus putting quite noticeable requirements on review.


You are right, i missed referencing the common i2c controller schema and
did not handle unevaluated properties correctly,which makes binding invalid.

>
> Please first learn how DTS and DT bindings work, before you post new
> patches.


Thank you for the review, i will work on it.

> Best regards,
> Krzysztof
>
-- 
Best Regards,
Akhila.


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

* Re: [PATCH] dt-bindings: i2c: nxp,pca9564: convert to DT schema
  2026-04-09 15:02   ` Akhila YS
@ 2026-04-09 16:21     ` Akhila YS
  0 siblings, 0 replies; 4+ messages in thread
From: Akhila YS @ 2026-04-09 16:21 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andi Shyti, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Peter Rosin, linux-i2c, devicetree, linux-kernel


On 09-04-2026 20:32, Akhila YS wrote:
> On 09-04-2026 13:56, Krzysztof Kozlowski wrote:
>> On Wed, Apr 08, 2026 at 08:23:31AM +0000, Akhila YS wrote:
>>> Convert NXP PCA PCA9564/PCA9665 I2C controller to YAML format.
>> DT schema, not YAML format. Look at your subject.
>
> Okay, i will change it.
>
>> ...
>>
>>> +  reg:
>>> +    maxItems: 1
>>> +
>>> +  "#address-cells":
>>> +    const: 1
>>> +
>>> +  "#size-cells":
>>> +    const: 0
>>> +
>>> +  interrupts:
>>> +    maxItems: 1
>>> +
>>> +  reset-gpios:
>>> +    maxItems: 1
>>> +
>>> +  clock-frequency:
>>> +    default: 100000
>>> +
>>> +required:
>>> +  - compatible
>>> +  - reg
>>> +
>>> +additionalProperties: false
>> And if you tested any DTS with this, you would see this cannot work.
>> Look at other bindings - you miss ref to i2c-controller and
>> unevaluatedProps. But the problem is that you are doing something which
>> would never work, so I have doubts that you know what you are doing. One
>> thing is to make a mistake, other thing is to post something can never
>> work thus putting quite noticeable requirements on review.
>
> You are right, i missed referencing the common i2c controller schema and
> did not handle unevaluated properties correctly,which makes binding invalid.


There is no file named i2c-controller.yaml to take ref to this yaml. I
tried testing the yaml file with the dts in my local machine and its
working as expected.

I even checked the status in patchwork and there it was marked as
successful.

>
>> Please first learn how DTS and DT bindings work, before you post new
>> patches.
>
> Thank you for the review, i will work on it.
>
>> Best regards,
>> Krzysztof
>>
-- 
Best Regards,
Akhila.


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

end of thread, other threads:[~2026-04-09 16:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-08  8:23 [PATCH] dt-bindings: i2c: nxp,pca9564: convert to DT schema Akhila YS
2026-04-09  8:26 ` Krzysztof Kozlowski
2026-04-09 15:02   ` Akhila YS
2026-04-09 16:21     ` Akhila YS

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