summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/i2c/i2c-pxa.yaml
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2020-06-17 00:33:50 +0200
committerRob Herring <robh@kernel.org>2020-07-13 12:49:22 -0600
commitecb11b2cc30cc8bc222ced20f280a3d0b167e481 (patch)
tree78eaf73fe66c8e3f7a735006187075a3cf8ce6d3 /Documentation/devicetree/bindings/i2c/i2c-pxa.yaml
parentf882846c018263f1e17fe11fd0154115d11255b2 (diff)
dt-bindings: i2c: Convert i2c-pxa to json-schema
A conversion of the i2c-pxa binding to DT schema format using json-schema. This also cleans ups some errors in the binding: The compatible string description suggested that "mmp" in "mrvl,mmp-twsi" is to be substituted with a processor model, which wouldn't be a right thing to do and indeed nobody seems to have been doing that. There also was "Recommended properties" section that included optional as well as mandatory properties. Missing mandatory properties were added to the example. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Link: https://lore.kernel.org/r/20200616223353.993567-3-lkundrak@v3.sk Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'Documentation/devicetree/bindings/i2c/i2c-pxa.yaml')
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-pxa.yaml74
1 files changed, 74 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/i2c/i2c-pxa.yaml b/Documentation/devicetree/bindings/i2c/i2c-pxa.yaml
new file mode 100644
index 000000000000..da6e8bdc4037
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-pxa.yaml
@@ -0,0 +1,74 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/i2c/i2c-pxa.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell MMP I2C controller bindings
+
+maintainers:
+ - Rob Herring <robh+dt@kernel.org>
+
+allOf:
+ - $ref: /schemas/i2c/i2c-controller.yaml#
+ - if:
+ not:
+ required:
+ - mrvl,i2c-polling
+ then:
+ required:
+ - interrupts
+
+properties:
+ compatible:
+ enum:
+ - mrvl,mmp-twsi
+ - mrvl,pxa-i2c
+ - marvell,armada-3700-i2c
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ minItems: 1
+
+ resets:
+ minItems: 1
+
+ mrvl,i2c-polling:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: |
+ Disable interrupt of i2c controller. Polling status register of i2c
+ controller instead.
+
+ mrvl,i2c-fast-mode:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: Enable fast mode of i2c controller.
+
+unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - '#address-cells'
+ - '#size-cells'
+
+examples:
+ - |
+ #include <dt-bindings/clock/marvell,mmp2.h>
+ i2c@d4011000 {
+ compatible = "mrvl,mmp-twsi";
+ reg = <0xd4011000 0x1000>;
+ interrupts = <7>;
+ clocks = <&soc_clocks MMP2_CLK_TWSI1>;
+ mrvl,i2c-fast-mode;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+...