Skip to contentSkip to conversation

dt-bindings: i2c: imx: hardware do not restrict clock-frequency to only 100 and 400 kHz

PATCH Applied David Heidelberg 3 participants 3 messages Oct 29, 2021 – Nov 8, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: i2c: imx: hardware do not restrict clock-frequency to only 100 and 400 kHz

clock-frequency is only restricted by the upper limit of 400 kHz.

Found with:

$ DT_SCHEMA_FILES=Documentation/devicetree/bindings/i2c/i2c-imx.yaml make dtbs_check
...
arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dt.yaml: i2c@30a20000: clock-frequency:0:0: 387000 is not one of [100000, 400000]
	From schema: linux/Documentation/devicetree/bindings/i2c/i2c-imx.yaml
...
Fixes 4bdc44347299 ("dt-bindings: i2c: Convert imx i2c to json-schema")
---
 Documentation/devicetree/bindings/i2c/i2c-imx.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/i2c/i2c-imx.yaml +3 -1
index 3592d49235e0..c167958ae2a9 100644
@@ -57,7 +57,9 @@ properties:
     const: ipg
 
   clock-frequency:
-    enum: [ 100000, 400000 ]
+    minimum: 1
+    default: 100000
+    maximum: 400000
 
   dmas:
     items:
Signature · 1 line
2.33.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · David Heidelberg

clock-frequency is only restricted by the upper limit of 400 kHz.

Found with:

$ DT_SCHEMA_FILES=Documentation/devicetree/bindings/i2c/i2c-imx.yaml make dtbs_check
...
arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dt.yaml: i2c@30a20000: clock-frequency:0:0: 387000 is not one of [100000, 400000]
	From schema: linux/Documentation/devicetree/bindings/i2c/i2c-imx.yaml
...
Fixes 4bdc44347299 ("dt-bindings: i2c: Convert imx i2c to json-schema")

Thank you!

Quoted 23 lines
---
 Documentation/devicetree/bindings/i2c/i2c-imx.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/i2c/i2c-imx.yaml +3 -1
index 3592d49235e0..c167958ae2a9 100644
@@ -57,7 +57,9 @@ properties:
     const: ipg
 
   clock-frequency:
-    enum: [ 100000, 400000 ]
+    minimum: 1
+    default: 100000
+    maximum: 400000
 
   dmas:
     items:
Signature · 1 line
2.33.0
Signature · 4 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
maintainer Applied
#2 lore raw
In reply to David Heidelberg
Quoted 9 lines · David Heidelberg

clock-frequency is only restricted by the upper limit of 400 kHz.

Found with:

$ DT_SCHEMA_FILES=Documentation/devicetree/bindings/i2c/i2c-imx.yaml make dtbs_check
...
arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dt.yaml: i2c@30a20000: clock-frequency:0:0: 387000 is not one of [100000, 400000]
	From schema: linux/Documentation/devicetree/bindings/i2c/i2c-imx.yaml
...
Quoted 6 lines
Fixes 4bdc44347299 ("dt-bindings: i2c: Convert imx i2c to json-schema")
---
 Documentation/devicetree/bindings/i2c/i2c-imx.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Applied, thanks!