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

dt-bindings: i2c: migrate mt7621 text bindings to YAML

SoC MT7621 I2C bindings used text format, so migrate them to YAML.
There are some additions to the binding that were not in the original
txt file. This binding is used in MT7621 and MT7628a Ralink SoCs. To
properly match both dts nodes in tree we need to add to the schema
'clocks', 'clock-names' and 'reset-names'. Both 'clock-names' and
'reset-names' use 'i2c' as string so maintain that as const in
the schema. Also, Properly update MAINTAINERS file to align the
changes.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220920052050.582321-1-sergio.paracuellos@gmail.com
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Sergio Paracuellos and committed by
Rob Herring
e7c21940 6d83bcf7

+62 -26
-25
Documentation/devicetree/bindings/i2c/i2c-mt7621.txt
··· 1 - MediaTek MT7621/MT7628 I2C master controller 2 - 3 - Required properties: 4 - 5 - - compatible: Should be one of the following: 6 - - "mediatek,mt7621-i2c": for MT7621/MT7628/MT7688 platforms 7 - - #address-cells: should be 1. 8 - - #size-cells: should be 0. 9 - - reg: Address and length of the register set for the device 10 - - resets: phandle to the reset controller asserting this device in 11 - reset 12 - See ../reset/reset.txt for details. 13 - 14 - Optional properties : 15 - 16 - Example: 17 - 18 - i2c: i2c@900 { 19 - compatible = "mediatek,mt7621-i2c"; 20 - reg = <0x900 0x100>; 21 - #address-cells = <1>; 22 - #size-cells = <0>; 23 - resets = <&rstctrl 16>; 24 - reset-names = "i2c"; 25 - };
+61
Documentation/devicetree/bindings/i2c/mediatek,mt7621-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/mediatek,mt7621-i2c.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + maintainers: 8 + - Stefan Roese <sr@denx.de> 9 + 10 + title: Mediatek MT7621/MT7628 I2C master controller 11 + 12 + allOf: 13 + - $ref: /schemas/i2c/i2c-controller.yaml# 14 + 15 + properties: 16 + compatible: 17 + const: mediatek,mt7621-i2c 18 + 19 + reg: 20 + maxItems: 1 21 + 22 + clocks: 23 + maxItems: 1 24 + 25 + clock-names: 26 + const: i2c 27 + 28 + resets: 29 + maxItems: 1 30 + 31 + reset-names: 32 + const: i2c 33 + 34 + required: 35 + - compatible 36 + - reg 37 + - resets 38 + - "#address-cells" 39 + - "#size-cells" 40 + 41 + unevaluatedProperties: false 42 + 43 + examples: 44 + - | 45 + #include <dt-bindings/clock/mt7621-clk.h> 46 + #include <dt-bindings/reset/mt7621-reset.h> 47 + 48 + i2c: i2c@900 { 49 + compatible = "mediatek,mt7621-i2c"; 50 + reg = <0x900 0x100>; 51 + clocks = <&sysc MT7621_CLK_I2C>; 52 + clock-names = "i2c"; 53 + resets = <&sysc MT7621_RST_I2C>; 54 + reset-names = "i2c"; 55 + 56 + #address-cells = <1>; 57 + #size-cells = <0>; 58 + 59 + pinctrl-names = "default"; 60 + pinctrl-0 = <&i2c_pins>; 61 + };
+1 -1
MAINTAINERS
··· 12865 12865 M: Stefan Roese <sr@denx.de> 12866 12866 L: linux-i2c@vger.kernel.org 12867 12867 S: Maintained 12868 - F: Documentation/devicetree/bindings/i2c/i2c-mt7621.txt 12868 + F: Documentation/devicetree/bindings/i2c/mediatek,mt7621-i2c.yaml 12869 12869 F: drivers/i2c/busses/i2c-mt7621.c 12870 12870 12871 12871 MEDIATEK MT7621 PCIE CONTROLLER DRIVER