Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: i2c: mv64xxx: Add YAML schemas

Switch the DT binding to a YAML schema to enable the DT validation.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

authored by

Maxime Ripard and committed by
Wolfram Sang
f8bbde72 bbddb0fc

+124 -64
-64
Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
··· 1 - 2 - * Marvell MV64XXX I2C controller 3 - 4 - Required properties : 5 - 6 - - reg : Offset and length of the register set for the device 7 - - compatible : Should be either: 8 - - "allwinner,sun4i-a10-i2c" 9 - - "allwinner,sun6i-a31-i2c" 10 - - "marvell,mv64xxx-i2c" 11 - - "marvell,mv78230-i2c" 12 - - "marvell,mv78230-a0-i2c" 13 - * Note: Only use "marvell,mv78230-a0-i2c" for a 14 - very rare, initial version of the SoC which 15 - had broken offload support. Linux 16 - auto-detects this and sets it appropriately. 17 - - interrupts : The interrupt number 18 - 19 - Optional properties : 20 - 21 - - clock-frequency : Desired I2C bus clock frequency in Hz. If not set the 22 - default frequency is 100kHz 23 - 24 - - resets : phandle to the parent reset controller. Mandatory 25 - whenever you're using the "allwinner,sun6i-a31-i2c" 26 - compatible. 27 - 28 - - clocks: : pointers to the reference clocks for this device, the 29 - first one is the one used for the clock on the i2c bus, 30 - the second one is the clock used to acces the registers 31 - of the controller 32 - 33 - - clock-names : names of used clocks, mandatory if the second clock is 34 - used, the name must be "core", and "reg" (the latter is 35 - only for Armada 7K/8K). 36 - 37 - Examples: 38 - 39 - i2c@11000 { 40 - compatible = "marvell,mv64xxx-i2c"; 41 - reg = <0x11000 0x20>; 42 - interrupts = <29>; 43 - clock-frequency = <100000>; 44 - }; 45 - 46 - For the Armada XP: 47 - 48 - i2c@11000 { 49 - compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c"; 50 - reg = <0x11000 0x100>; 51 - interrupts = <29>; 52 - clock-frequency = <100000>; 53 - }; 54 - 55 - For the Armada 7040: 56 - 57 - i2c@701000 { 58 - compatible = "marvell,mv78230-i2c"; 59 - reg = <0x701000 0x20>; 60 - interrupts = <29>; 61 - clock-frequency = <100000>; 62 - clock-names = "core", "reg"; 63 - clocks = <&core_clock>, <&reg_clock>; 64 - };
+124
Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/i2c/marvell,mv64xxx-i2c.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Marvell MV64XXX I2C Controller Device Tree Bindings 8 + 9 + maintainers: 10 + - Gregory CLEMENT <gregory.clement@bootlin.com> 11 + 12 + properties: 13 + compatible: 14 + oneOf: 15 + - const: allwinner,sun4i-a10-i2c 16 + - items: 17 + - const: allwinner,sun7i-a20-i2c 18 + - const: allwinner,sun4i-a10-i2c 19 + - const: allwinner,sun6i-a31-i2c 20 + - items: 21 + - const: allwinner,sun8i-a23-i2c 22 + - const: allwinner,sun6i-a31-i2c 23 + - items: 24 + - const: allwinner,sun8i-a83t-i2c 25 + - const: allwinner,sun6i-a31-i2c 26 + - items: 27 + - const: allwinner,sun50i-a64-i2c 28 + - const: allwinner,sun6i-a31-i2c 29 + 30 + - const: marvell,mv64xxx-i2c 31 + - const: marvell,mv78230-i2c 32 + - const: marvell,mv78230-a0-i2c 33 + 34 + description: 35 + Only use "marvell,mv78230-a0-i2c" for a very rare, initial 36 + version of the SoC which had broken offload support. Linux 37 + auto-detects this and sets it appropriately. 38 + 39 + reg: 40 + maxItems: 1 41 + 42 + interrupts: 43 + maxItems: 1 44 + 45 + clocks: 46 + minItems: 1 47 + maxItems: 2 48 + items: 49 + - description: Reference clock for the I2C bus 50 + - description: Bus clock (Only for Armada 7K/8K) 51 + 52 + clock-names: 53 + minItems: 1 54 + maxItems: 2 55 + items: 56 + - const: core 57 + - const: reg 58 + description: 59 + Mandatory if two clocks are used (only for Armada 7k and 8k). 60 + 61 + resets: 62 + maxItems: 1 63 + 64 + required: 65 + - compatible 66 + - reg 67 + - interrupts 68 + 69 + allOf: 70 + - $ref: /schemas/i2c/i2c-controller.yaml# 71 + - if: 72 + properties: 73 + compatible: 74 + contains: 75 + enum: 76 + - allwinner,sun4i-a10-i2c 77 + - allwinner,sun6i-a31-i2c 78 + 79 + then: 80 + required: 81 + - clocks 82 + 83 + - if: 84 + properties: 85 + compatible: 86 + contains: 87 + const: allwinner,sun6i-a31-i2c 88 + 89 + then: 90 + required: 91 + - resets 92 + 93 + # FIXME: We should set it, but it would report all the generic 94 + # properties as additional properties. 95 + # additionalProperties: false 96 + 97 + examples: 98 + - | 99 + i2c@11000 { 100 + compatible = "marvell,mv64xxx-i2c"; 101 + reg = <0x11000 0x20>; 102 + interrupts = <29>; 103 + clock-frequency = <100000>; 104 + }; 105 + 106 + - | 107 + i2c@11000 { 108 + compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c"; 109 + reg = <0x11000 0x100>; 110 + interrupts = <29>; 111 + clock-frequency = <100000>; 112 + }; 113 + 114 + - | 115 + i2c@701000 { 116 + compatible = "marvell,mv78230-i2c"; 117 + reg = <0x701000 0x20>; 118 + interrupts = <29>; 119 + clock-frequency = <100000>; 120 + clock-names = "core", "reg"; 121 + clocks = <&core_clock>, <&reg_clock>; 122 + }; 123 + 124 + ...