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

dt-bindings: i2c: sun6i-p2wi: 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>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

authored by

Maxime Ripard and committed by
Wolfram Sang
bbddb0fc d04913ec

+65 -41
+65
Documentation/devicetree/bindings/i2c/allwinner,sun6i-a31-p2wi.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/i2c/allwinner,sun6i-a31-p2wi.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Allwinner A31 P2WI (Push/Pull 2 Wires Interface) Device Tree Bindings 8 + 9 + maintainers: 10 + - Chen-Yu Tsai <wens@csie.org> 11 + - Maxime Ripard <maxime.ripard@bootlin.com> 12 + 13 + allOf: 14 + - $ref: /schemas/i2c/i2c-controller.yaml# 15 + 16 + properties: 17 + compatible: 18 + const: allwinner,sun6i-a31-p2wi 19 + 20 + reg: 21 + maxItems: 1 22 + 23 + interrupts: 24 + maxItems: 1 25 + 26 + clocks: 27 + maxItems: 1 28 + 29 + resets: 30 + maxItems: 1 31 + 32 + clock-frequency: 33 + minimum: 1 34 + maximum: 6000000 35 + 36 + required: 37 + - compatible 38 + - reg 39 + - interrupts 40 + - clocks 41 + - resets 42 + 43 + # FIXME: We should set it, but it would report all the generic 44 + # properties as additional properties. 45 + # additionalProperties: false 46 + 47 + examples: 48 + - | 49 + i2c@1f03400 { 50 + compatible = "allwinner,sun6i-a31-p2wi"; 51 + reg = <0x01f03400 0x400>; 52 + interrupts = <0 39 4>; 53 + clocks = <&apb0_gates 3>; 54 + clock-frequency = <6000000>; 55 + resets = <&apb0_rst 3>; 56 + #address-cells = <1>; 57 + #size-cells = <0>; 58 + 59 + axp221: pmic@68 { 60 + compatible = "x-powers,axp221"; 61 + reg = <0x68>; 62 + }; 63 + }; 64 + 65 + ...
-41
Documentation/devicetree/bindings/i2c/i2c-sun6i-p2wi.txt
··· 1 - 2 - * Allwinner P2WI (Push/Pull 2 Wire Interface) controller 3 - 4 - Required properties : 5 - 6 - - reg : Offset and length of the register set for the device. 7 - - compatible : Should one of the following: 8 - - "allwinner,sun6i-a31-p2wi" 9 - - interrupts : The interrupt line connected to the P2WI peripheral. 10 - - clocks : The gate clk connected to the P2WI peripheral. 11 - - resets : The reset line connected to the P2WI peripheral. 12 - 13 - Optional properties : 14 - 15 - - clock-frequency : Desired P2WI bus clock frequency in Hz. If not set the 16 - default frequency is 100kHz 17 - 18 - A P2WI may contain one child node encoding a P2WI slave device. 19 - 20 - Slave device properties: 21 - Required properties: 22 - - reg : the I2C slave address used during the initialization 23 - process to switch from I2C to P2WI mode 24 - 25 - Example: 26 - 27 - p2wi@1f03400 { 28 - compatible = "allwinner,sun6i-a31-p2wi"; 29 - reg = <0x01f03400 0x400>; 30 - interrupts = <0 39 4>; 31 - clocks = <&apb0_gates 3>; 32 - clock-frequency = <6000000>; 33 - resets = <&apb0_rst 3>; 34 - 35 - axp221: pmic@68 { 36 - compatible = "x-powers,axp221"; 37 - reg = <0x68>; 38 - 39 - /* ... */ 40 - }; 41 - };