Re: [PATCH] dt-bindings: i2c: convert i2c-mt65xx to json-schema

From: AngeloGioacchino Del Regno
Date: Thu Apr 07 2022 - 05:45:53 EST


Il 07/04/22 01:24, Miles Chen ha scritto:
Hi AngeloGioacchino,

Convert I2C binding for MediaTek SoCs to Devicetree schema.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>
---
.../devicetree/bindings/i2c/i2c-mt65xx.txt | 53 --------
.../devicetree/bindings/i2c/i2c-mt65xx.yaml | 118 ++++++++++++++++++
MAINTAINERS | 2 +-
3 files changed, 119 insertions(+), 54 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt
create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml

diff --git a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt
deleted file mode 100644
index 026985b8f61a..000000000000
--- a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt
+++ /dev/null

..snip..

- - clocks: clock name from clock manager
- - clock-names: Must include "main" and "dma", "arb" is for multi-master that
- one bus has more than two i2c controllers, if enable have-pmic need include
- "pmic" extra.

+
+ clocks:
+ minItems: 1
+ items:
+ - description: Main clock for I2C bus
+ - description: Clock for I2C via DMA
+ - description: Bus arbitrator clock
+ - description: Clock for I2C from PMIC
+
+ clock-names:
+ minItems: 1
+ items:
+ - const: main
+ - const: dma
+ - const: arb
+ - const: pmic

I read "clock-names: Must include "main" and "dma"" from i2c-mt65xx.txt.
Does it means that we should have at least 2 clock-names (minItems: 2)?

Thanks,
Miles


Hello Miles,
yes, you're right, I just rechecked the code and this is indeed the case.

Thanks for catching that, will send a v2 shortly.

Regards,
Angelo