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

dt-bindings: i2c: brcm,bcm2835-i2c: convert to YAML schema

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

Signed-off-by: David Heidelberg <david@ixit.cz>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>

authored by

David Heidelberg and committed by
Wolfram Sang
92ae3162 15f0ae7a

+54 -22
-22
Documentation/devicetree/bindings/i2c/brcm,bcm2835-i2c.txt
··· 1 - Broadcom BCM2835 I2C controller 2 - 3 - Required properties: 4 - - compatible : Should be one of: 5 - "brcm,bcm2711-i2c" 6 - "brcm,bcm2835-i2c" 7 - - reg: Should contain register location and length. 8 - - interrupts: Should contain interrupt. 9 - - clocks : The clock feeding the I2C controller. 10 - 11 - Recommended properties: 12 - - clock-frequency : desired I2C bus clock frequency in Hz. 13 - 14 - Example: 15 - 16 - i2c@7e205000 { 17 - compatible = "brcm,bcm2835-i2c"; 18 - reg = <0x7e205000 0x1000>; 19 - interrupts = <2 21>; 20 - clocks = <&clk_i2c>; 21 - clock-frequency = <100000>; 22 - };
+54
Documentation/devicetree/bindings/i2c/brcm,bcm2835-i2c.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/i2c/brcm,bcm2835-i2c.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Broadcom BCM2835 I2C controller 8 + 9 + maintainers: 10 + - Stephen Warren <swarren@wwwdotorg.org> 11 + 12 + allOf: 13 + - $ref: /schemas/i2c/i2c-controller.yaml# 14 + 15 + properties: 16 + compatible: 17 + oneOf: 18 + - enum: 19 + - brcm,bcm2835-i2c 20 + - items: 21 + - const: brcm,bcm2711-i2c 22 + - const: brcm,bcm2835-i2c 23 + 24 + reg: 25 + maxItems: 1 26 + 27 + interrupts: 28 + maxItems: 1 29 + 30 + clock-names: 31 + maxItems: 1 32 + 33 + clocks: 34 + maxItems: 1 35 + 36 + clock-frequency: true 37 + 38 + required: 39 + - compatible 40 + - reg 41 + - interrupts 42 + - clocks 43 + 44 + unevaluatedProperties: false 45 + 46 + examples: 47 + - | 48 + i2c@7e205000 { 49 + compatible = "brcm,bcm2835-i2c"; 50 + reg = <0x7e205000 0x1000>; 51 + interrupts = <2 21>; 52 + clocks = <&clk_i2c>; 53 + clock-frequency = <100000>; 54 + };