dt-bindings: Convert mux bindings to schema
Subsystems (14)
Rob Herring
maintainerv2 cover dt-bindings: Convert mux bindings to schema
This series converts the mux-controller and some i2c mux bindings to DT schema. This was a rabbit hole of trying to fix undocumented (by schema) compatibles (enabled by setting DT_CHECKER_FLAGS=-m). So this is mux bindings, and then a few others that are used in the mux binding examples.
I ended up converting the MDIO mux bindings[1], and Jonathan did the IIO mux[2]. (Thanks!)
Rob
[1] https://lore.kernel.org/r/[email protected]/
[2] https://lore.kernel.org/r/[email protected]/
Rob Herring (6):
dt-bindings: mfd: ti,j721e-system-controller: Fix mux node errors
dt-bindings: rtc: nxp,pcf8563: Convert to DT schema
dt-bindings: mux: Convert mux controller bindings to schema
dt-bindings: i2c: Convert i2c-mux bindings to DT schema
dt-bindings: i2c: i2c-mux-pca954x: Convert to DT schema
dt-bindings: i2c: maxim,max9286: Use the i2c-mux.yaml schema
.../bindings/i2c/i2c-demux-pinctrl.txt | 2 +- .../devicetree/bindings/i2c/i2c-mux-gpio.txt | 4 +- .../devicetree/bindings/i2c/i2c-mux-gpmux.txt | 99 ---------- .../bindings/i2c/i2c-mux-gpmux.yaml | 124 ++++++++++++ .../bindings/i2c/i2c-mux-ltc4306.txt | 4 +- .../bindings/i2c/i2c-mux-pca954x.txt | 74 ------- .../bindings/i2c/i2c-mux-pca954x.yaml | 110 +++++++++++ .../bindings/i2c/i2c-mux-pinctrl.txt | 4 +- .../devicetree/bindings/i2c/i2c-mux-reg.txt | 4 +- .../devicetree/bindings/i2c/i2c-mux.txt | 73 ------- .../devicetree/bindings/i2c/i2c-mux.yaml | 87 +++++++++ .../iio/multiplexer/io-channel-mux.txt | 2 +- .../bindings/media/i2c/maxim,max9286.yaml | 23 +-- .../mfd/ti,j721e-system-controller.yaml | 19 +- .../devicetree/bindings/mtd/ti,am654-hbmc.txt | 2 +- .../devicetree/bindings/mux/adi,adg792a.txt | 2 +- .../devicetree/bindings/mux/adi,adgs1408.txt | 2 +- .../devicetree/bindings/mux/gpio-mux.txt | 69 ------- .../devicetree/bindings/mux/gpio-mux.yaml | 92 +++++++++ .../devicetree/bindings/mux/mux-consumer.yaml | 46 +++++ .../bindings/mux/mux-controller.txt | 157 --------------- .../bindings/mux/mux-controller.yaml | 182 ++++++++++++++++++ .../devicetree/bindings/mux/reg-mux.txt | 129 ------------- .../devicetree/bindings/mux/reg-mux.yaml | 143 ++++++++++++++ .../bindings/net/mdio-mux-multiplexer.txt | 2 +- .../devicetree/bindings/rtc/nxp,pcf8563.yaml | 56 ++++++ .../devicetree/bindings/rtc/pcf8563.txt | 29 --- 27 files changed, 870 insertions(+), 670 deletions(-) delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux-gpmux.txt create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux-gpmux.yaml delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.txt create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux.txt create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux.yaml delete mode 100644 Documentation/devicetree/bindings/mux/gpio-mux.txt create mode 100644 Documentation/devicetree/bindings/mux/gpio-mux.yaml create mode 100644 Documentation/devicetree/bindings/mux/mux-consumer.yaml delete mode 100644 Documentation/devicetree/bindings/mux/mux-controller.txt create mode 100644 Documentation/devicetree/bindings/mux/mux-controller.yaml delete mode 100644 Documentation/devicetree/bindings/mux/reg-mux.txt create mode 100644 Documentation/devicetree/bindings/mux/reg-mux.yaml create mode 100644 Documentation/devicetree/bindings/rtc/nxp,pcf8563.yaml delete mode 100644 Documentation/devicetree/bindings/rtc/pcf8563.txt
Signature · 1 line
2.27.0
Rob Herring
maintainerPATCH v2 1/6 dt-bindings: mfd: ti,j721e-system-controller: Fix mux node errors
The ti,j721e-system-controller binding does not follow the standard mux controller node name 'mux-controller' and the example is incomplete. Fix these to avoid schema errors before the mux controller binding is converted to schema.
--- .../mfd/ti,j721e-system-controller.yaml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml +13 -6
@@ -43,12 +43,10 @@ properties: patternProperties: # Optional children - "^serdes-ln-ctrl@[0-9a-f]+$": + "^mux-controller@[0-9a-f]+$": type: object - description: | - This is the SERDES lane control mux. It should follow the bindings - specified in - Documentation/devicetree/bindings/mux/reg-mux.txt + description: + This is the SERDES lane control mux. required: - compatible
@@ -68,9 +66,18 @@ examples: #size-cells = <1>; ranges; - serdes_ln_ctrl: serdes-ln-ctrl@4080 { + serdes_ln_ctrl: mux-controller@4080 { compatible = "mmio-mux"; reg = <0x00004080 0x50>; + + #mux-control-cells = <1>; + mux-reg-masks = + <0x4080 0x3>, <0x4084 0x3>, /* SERDES0 lane0/1 select */ + <0x4090 0x3>, <0x4094 0x3>, /* SERDES1 lane0/1 select */ + <0x40a0 0x3>, <0x40a4 0x3>, /* SERDES2 lane0/1 select */ + <0x40b0 0x3>, <0x40b4 0x3>, /* SERDES3 lane0/1 select */ + <0x40c0 0x3>, <0x40c4 0x3>, <0x40c8 0x3>, <0x40cc 0x3>; + /* SERDES4 lane0/1/2/3 select */ }; }; ...
Signature · 1 line
2.27.0
Rob Herring
maintainerPATCH v2 2/6 dt-bindings: rtc: nxp,pcf8563: Convert to DT schema
In reply to Rob HerringConvert the Philips PCF8563/Epson RTC8564 binding to DT schema format.
Add 'interrupts' and 'wakeup-source' as this device has an interrupt which was not documented, but in use. Add 'start-year' as well.
---
v2:
- Add reference to rtc.yaml and wakeup-source and start-year properties
--- .../devicetree/bindings/rtc/nxp,pcf8563.yaml | 56 +++++++++++++++++++ .../devicetree/bindings/rtc/pcf8563.txt | 29 ---------- 2 files changed, 56 insertions(+), 29 deletions(-) create mode 100644 Documentation/devicetree/bindings/rtc/nxp,pcf8563.yaml delete mode 100644 Documentation/devicetree/bindings/rtc/pcf8563.txt
Documentation/devicetree/bindings/rtc/nxp,pcf8563.yaml new file +56 -0
@@ -0,0 +1,56 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/rtc/nxp,pcf8563.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Philips PCF8563/Epson RTC8564 Real Time Clock + +maintainers: + - Alexandre Belloni <[email protected]> + +allOf: + - $ref: rtc.yaml# + +properties: + compatible: + enum: + - epson,rtc8564 + - microcrystal,rv8564 + - nxp,pcf8563 + - nxp,pca8565 + + reg: + maxItems: 1 + + "#clock-cells": + const: 0 + + clock-output-names: + maxItems: 1 + + interrupts: + maxItems: 1 + + start-year: true + wakeup-source: true + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + rtc@51 { + compatible = "nxp,pcf8563"; + reg = <0x51>; + #clock-cells = <0>; + }; + }; +...
Documentation/devicetree/bindings/rtc/pcf8563.txt deleted +0 -29
@@ -1,29 +0,0 @@ -* Philips PCF8563/Epson RTC8564 Real Time Clock - -Philips PCF8563/Epson RTC8564 Real Time Clock - -Required properties: -- compatible: Should contain "nxp,pcf8563", - "epson,rtc8564" or - "microcrystal,rv8564" or - "nxp,pca8565" -- reg: I2C address for chip. - -Optional property: -- #clock-cells: Should be 0. -- clock-output-names: - overwrite the default clock name "pcf8563-clkout" - -Example: - -pcf8563: pcf8563@51 { - compatible = "nxp,pcf8563"; - reg = <0x51>; - #clock-cells = <0>; -}; - -device { -... - clocks = <&pcf8563>; -... -};
Signature · 1 line
2.27.0
Rob Herring
maintainerPATCH v2 3/6 dt-bindings: mux: Convert mux controller bindings to schema
In reply to Rob HerringConvert the mux controller bindings to DT schema.
--- .../devicetree/bindings/i2c/i2c-mux-gpmux.txt | 2 +- .../bindings/i2c/i2c-mux-pca954x.txt | 2 +- .../iio/multiplexer/io-channel-mux.txt | 2 +- .../devicetree/bindings/mtd/ti,am654-hbmc.txt | 2 +- .../devicetree/bindings/mux/adi,adg792a.txt | 2 +- .../devicetree/bindings/mux/adi,adgs1408.txt | 2 +- .../devicetree/bindings/mux/gpio-mux.txt | 69 ------- .../devicetree/bindings/mux/gpio-mux.yaml | 92 +++++++++ .../devicetree/bindings/mux/mux-consumer.yaml | 46 +++++ .../bindings/mux/mux-controller.txt | 157 --------------- .../bindings/mux/mux-controller.yaml | 182 ++++++++++++++++++ .../devicetree/bindings/mux/reg-mux.txt | 129 ------------- .../devicetree/bindings/mux/reg-mux.yaml | 143 ++++++++++++++ .../bindings/net/mdio-mux-multiplexer.txt | 2 +- 14 files changed, 470 insertions(+), 362 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mux/gpio-mux.txt create mode 100644 Documentation/devicetree/bindings/mux/gpio-mux.yaml create mode 100644 Documentation/devicetree/bindings/mux/mux-consumer.yaml delete mode 100644 Documentation/devicetree/bindings/mux/mux-controller.txt create mode 100644 Documentation/devicetree/bindings/mux/mux-controller.yaml delete mode 100644 Documentation/devicetree/bindings/mux/reg-mux.txt create mode 100644 Documentation/devicetree/bindings/mux/reg-mux.yaml
Documentation/devicetree/bindings/i2c/i2c-mux-gpmux.txt +1 -1
@@ -25,7 +25,7 @@ Required properties: mux. * Standard I2C mux properties. See i2c-mux.txt in this directory. * I2C child bus nodes. See i2c-mux.txt in this directory. The sub-bus number - is also the mux-controller state described in ../mux/mux-controller.txt + is also the mux-controller state described in ../mux/mux-controller.yaml Optional properties: - mux-locked: If present, explicitly allow unrelated I2C transactions on the
Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.txt +1 -1
@@ -26,7 +26,7 @@ Optional Properties: - reset-gpios: Reference to the GPIO connected to the reset input. - idle-state: if present, overrides i2c-mux-idle-disconnect, - Please refer to Documentation/devicetree/bindings/mux/mux-controller.txt + Please refer to Documentation/devicetree/bindings/mux/mux-controller.yaml - i2c-mux-idle-disconnect: Boolean; if defined, forces mux to disconnect all children in idle state. This is necessary for example, if there are several multiplexers on the bus and the devices behind them use same I2C addresses.
Documentation/devicetree/bindings/iio/multiplexer/io-channel-mux.txt +1 -1
@@ -17,7 +17,7 @@ For each non-empty string in the channels property, an io-channel will be created. The number of this io-channel is the same as the index into the list of strings in the channels property, and also matches the mux controller state. The mux controller state is described in -../mux/mux-controller.txt +../mux/mux-controller.yaml Example: mux: mux-controller {
Documentation/devicetree/bindings/mtd/ti,am654-hbmc.txt +1 -1
@@ -13,7 +13,7 @@ Optional properties: - mux-controls : phandle to the multiplexer that controls selection of HBMC vs OSPI inside Flash SubSystem (FSS). Default is OSPI, if property is absent. - See Documentation/devicetree/bindings/mux/reg-mux.txt + See Documentation/devicetree/bindings/mux/reg-mux.yaml for mmio-mux binding details Example:
Documentation/devicetree/bindings/mux/adi,adg792a.txt +1 -1
@@ -5,7 +5,7 @@ Required properties: - #mux-control-cells : <0> if parallel (the three muxes are bound together with a single mux controller controlling all three muxes), or <1> if not (one mux controller for each mux). -* Standard mux-controller bindings as described in mux-controller.txt +* Standard mux-controller bindings as described in mux-controller.yaml Optional properties for ADG792G: - gpio-controller : if present, #gpio-cells below is required.
Documentation/devicetree/bindings/mux/adi,adgs1408.txt +1 -1
@@ -4,7 +4,7 @@ Required properties: - compatible : Should be one of * "adi,adgs1408" * "adi,adgs1409" -* Standard mux-controller bindings as described in mux-controller.txt +* Standard mux-controller bindings as described in mux-controller.yaml Optional properties for ADGS1408/1409: - gpio-controller : if present, #gpio-cells is required.
Documentation/devicetree/bindings/mux/gpio-mux.txt deleted +0 -69
69 lines not on this page · raw message
Documentation/devicetree/bindings/mux/gpio-mux.yaml new file +92 -0
92 lines not on this page · raw message
Documentation/devicetree/bindings/mux/mux-consumer.yaml new file +46 -0
46 lines not on this page · raw message
Documentation/devicetree/bindings/mux/mux-controller.txt deleted +0 -157
157 lines not on this page · raw message
Documentation/devicetree/bindings/mux/mux-controller.yaml new file +182 -0
182 lines not on this page · raw message
Documentation/devicetree/bindings/mux/reg-mux.txt deleted +0 -129
129 lines not on this page · raw message
Documentation/devicetree/bindings/mux/reg-mux.yaml new file +143 -0
143 lines not on this page · raw message
Documentation/devicetree/bindings/net/mdio-mux-multiplexer.txt +1 -1
@@ -14,7 +14,7 @@ each child node of mdio bus multiplexer consumer device represent a mdio bus. for more information please refer -Documentation/devicetree/bindings/mux/mux-controller.txt +Documentation/devicetree/bindings/mux/mux-controller.yaml and Documentation/devicetree/bindings/net/mdio-mux.txt Example:
Signature · 1 line
2.27.0
Rob Herring
maintainerPATCH v2 4/6 dt-bindings: i2c: Convert i2c-mux bindings to DT schema
In reply to Rob HerringAs some of the example I2C devices don't have schemas yet, change them to ones that do.
---
v2:
- Comment and bullet list cleanups
--- .../bindings/i2c/i2c-demux-pinctrl.txt | 2 +- .../devicetree/bindings/i2c/i2c-mux-gpio.txt | 4 +- .../devicetree/bindings/i2c/i2c-mux-gpmux.txt | 99 -------------- .../bindings/i2c/i2c-mux-gpmux.yaml | 124 ++++++++++++++++++ .../bindings/i2c/i2c-mux-ltc4306.txt | 4 +- .../bindings/i2c/i2c-mux-pinctrl.txt | 4 +- .../devicetree/bindings/i2c/i2c-mux-reg.txt | 4 +- .../devicetree/bindings/i2c/i2c-mux.txt | 73 ----------- .../devicetree/bindings/i2c/i2c-mux.yaml | 87 ++++++++++++ 9 files changed, 220 insertions(+), 181 deletions(-) delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux-gpmux.txt create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux-gpmux.yaml delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux.txt create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux.yaml
Documentation/devicetree/bindings/i2c/i2c-demux-pinctrl.txt +1 -1
@@ -27,7 +27,7 @@ Required properties: - i2c-bus-name: The name of this bus. Also needed as pinctrl-name for the I2C parents. -Furthermore, I2C mux properties and child nodes. See i2c-mux.txt in this +Furthermore, I2C mux properties and child nodes. See i2c-mux.yaml in this directory. Example:
Documentation/devicetree/bindings/i2c/i2c-mux-gpio.txt +2 -2
@@ -22,8 +22,8 @@ Required properties: - i2c-parent: The phandle of the I2C bus that this multiplexer's master-side port is connected to. - mux-gpios: list of gpios used to control the muxer -* Standard I2C mux properties. See i2c-mux.txt in this directory. -* I2C child bus nodes. See i2c-mux.txt in this directory. +* Standard I2C mux properties. See i2c-mux.yaml in this directory. +* I2C child bus nodes. See i2c-mux.yaml in this directory. Optional properties: - idle-state: value to set the muxer to when idle. When no value is
Documentation/devicetree/bindings/i2c/i2c-mux-gpmux.txt deleted +0 -99
99 lines not on this page · raw message
Documentation/devicetree/bindings/i2c/i2c-mux-gpmux.yaml new file +124 -0
124 lines not on this page · raw message
Documentation/devicetree/bindings/i2c/i2c-mux-ltc4306.txt +2 -2
@@ -8,8 +8,8 @@ Required Properties: The following required properties are defined externally: - - Standard I2C mux properties. See i2c-mux.txt in this directory. - - I2C child bus nodes. See i2c-mux.txt in this directory. + - Standard I2C mux properties. See i2c-mux.yaml in this directory. + - I2C child bus nodes. See i2c-mux.yaml in this directory. Optional Properties:
Documentation/devicetree/bindings/i2c/i2c-mux-pinctrl.txt +2 -2
@@ -28,9 +28,9 @@ Also required are: * Standard pinctrl properties that specify the pin mux state for each child bus. See ../pinctrl/pinctrl-bindings.txt. -* Standard I2C mux properties. See i2c-mux.txt in this directory. +* Standard I2C mux properties. See i2c-mux.yaml in this directory. -* I2C child bus nodes. See i2c-mux.txt in this directory. +* I2C child bus nodes. See i2c-mux.yaml in this directory. For each named state defined in the pinctrl-names property, an I2C child bus will be created. I2C child bus numbers are assigned based on the index into
Documentation/devicetree/bindings/i2c/i2c-mux-reg.txt +2 -2
@@ -7,8 +7,8 @@ Required properties: - compatible: i2c-mux-reg - i2c-parent: The phandle of the I2C bus that this multiplexer's master-side port is connected to. -* Standard I2C mux properties. See i2c-mux.txt in this directory. -* I2C child bus nodes. See i2c-mux.txt in this directory. +* Standard I2C mux properties. See i2c-mux.yaml in this directory. +* I2C child bus nodes. See i2c-mux.yaml in this directory. Optional properties: - reg: this pair of <offset size> specifies the register to control the mux.
Documentation/devicetree/bindings/i2c/i2c-mux.txt deleted +0 -73
73 lines not on this page · raw message
Documentation/devicetree/bindings/i2c/i2c-mux.yaml new file +87 -0
87 lines not on this page · raw message
Signature · 1 line
2.27.0
Rob Herring
maintainerPATCH v2 6/6 dt-bindings: i2c: maxim,max9286: Use the i2c-mux.yaml schema
In reply to Rob HerringUse the i2c-mux.yaml schema in the maxim,max9286 binding schema. With this, several properties can be dropped as they are defined in i2c-mux.yaml already.
--- .../bindings/media/i2c/maxim,max9286.yaml | 23 +++---------------- 1 file changed, 3 insertions(+), 20 deletions(-)
Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml +3 -20
@@ -111,17 +111,10 @@ properties: i2c-mux: type: object + $ref: /schemas/i2c/i2c-mux.yaml# + unevaluatedProperties: false description: | - Each GMSL link is modelled as a child bus of an i2c bus - multiplexer/switch, in accordance with bindings described in - Documentation/devicetree/bindings/i2c/i2c-mux.txt. - - properties: - '#address-cells': - const: 1 - - '#size-cells': - const: 0 + Each GMSL link is modelled as a child bus of an i2c bus multiplexer/switch. patternProperties: "^i2c@[0-3]$":
@@ -133,12 +126,6 @@ properties: channels. properties: - '#address-cells': - const: 1 - - '#size-cells': - const: 0 - reg: description: The index of the GMSL channel. maxItems: 1
@@ -173,10 +160,6 @@ properties: additionalProperties: false - additionalProperties: false - - additionalProperties: false - required: - compatible - reg
Signature · 1 line
2.27.0
Rob Herring
maintainerPATCH v2 5/6 dt-bindings: i2c: i2c-mux-pca954x: Convert to DT schema
In reply to Rob HerringConvert the i2c-mux-pca954x binding to DT schema format.
Add the missing compatible for 'nxp,pca9645' which is already in use.
---
v2:
- Add 'nxp,pca9645'
- Fix compatible sorting
--- .../bindings/i2c/i2c-mux-pca954x.txt | 74 ------------ .../bindings/i2c/i2c-mux-pca954x.yaml | 110 ++++++++++++++++++ 2 files changed, 110 insertions(+), 74 deletions(-) delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.txt create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml
Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.txt deleted +0 -74
@@ -1,74 +0,0 @@ -* NXP PCA954x I2C bus switch - -The driver supports NXP PCA954x and PCA984x I2C mux/switch devices. - -Required Properties: - - - compatible: Must contain one of the following. - "nxp,pca9540", - "nxp,pca9542", - "nxp,pca9543", - "nxp,pca9544", - "nxp,pca9545", - "nxp,pca9546", "nxp,pca9846", - "nxp,pca9547", "nxp,pca9847", - "nxp,pca9548", "nxp,pca9848", - "nxp,pca9849" - - - reg: The I2C address of the device. - - The following required properties are defined externally: - - - Standard I2C mux properties. See i2c-mux.txt in this directory. - - I2C child bus nodes. See i2c-mux.txt in this directory. - -Optional Properties: - - - reset-gpios: Reference to the GPIO connected to the reset input. - - idle-state: if present, overrides i2c-mux-idle-disconnect, - Please refer to Documentation/devicetree/bindings/mux/mux-controller.yaml - - i2c-mux-idle-disconnect: Boolean; if defined, forces mux to disconnect all - children in idle state. This is necessary for example, if there are several - multiplexers on the bus and the devices behind them use same I2C addresses. - - interrupts: Interrupt mapping for IRQ. - - interrupt-controller: Marks the device node as an interrupt controller. - - #interrupt-cells : Should be two. - - first cell is the pin number - - second cell is used to specify flags. - See also Documentation/devicetree/bindings/interrupt-controller/interrupts.txt - -Example: - - i2c-switch@74 { - compatible = "nxp,pca9548"; - #address-cells = <1>; - #size-cells = <0>; - reg = <0x74>; - - interrupt-parent = <&ipic>; - interrupts = <17 IRQ_TYPE_LEVEL_LOW>; - interrupt-controller; - #interrupt-cells = <2>; - - i2c@2 { - #address-cells = <1>; - #size-cells = <0>; - reg = <2>; - - eeprom@54 { - compatible = "atmel,24c08"; - reg = <0x54>; - }; - }; - - i2c@4 { - #address-cells = <1>; - #size-cells = <0>; - reg = <4>; - - rtc@51 { - compatible = "nxp,pcf8563"; - reg = <0x51>; - }; - }; - };
Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml new file +110 -0
110 lines not on this page · raw message
Signature · 1 line
2.27.0
Re: [PATCH v2 2/6] dt-bindings: rtc: nxp,pcf8563: Convert to DT schema
In reply to Rob HerringQuoted 8 lines · Rob Herring
Convert the Philips PCF8563/Epson RTC8564 binding to DT schema format.
Add 'interrupts' and 'wakeup-source' as this device has an interrupt which was not documented, but in use. Add 'start-year' as well.
Cc Alexandre Belloni <[email protected]>Reviewed-by Laurent Pinchart <[email protected]>Signed-off-by Rob Herring <[email protected]>
Quoted 110 lines
---
v2:
- Add reference tortc.yamland wakeup-source and start-year properties--- .../devicetree/bindings/rtc/nxp,pcf8563.yaml | 56 +++++++++++++++++++ .../devicetree/bindings/rtc/pcf8563.txt | 29 ---------- 2 files changed, 56 insertions(+), 29 deletions(-) create mode 100644 Documentation/devicetree/bindings/rtc/nxp,pcf8563.yaml delete mode 100644 Documentation/devicetree/bindings/rtc/pcf8563.txtDocumentation/devicetree/bindings/rtc/nxp,pcf8563.yaml new file +56
-0@@ -0,0 +1,56 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/rtc/nxp,pcf8563.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Philips PCF8563/Epson RTC8564 Real Time Clock + +maintainers: + - Alexandre Belloni <[email protected]> + +allOf: + - $ref: rtc.yaml# + +properties: + compatible: + enum: + - epson,rtc8564 + - microcrystal,rv8564 + - nxp,pcf8563 + - nxp,pca8565 + + reg: + maxItems: 1 + + "#clock-cells": + const: 0 + + clock-output-names: + maxItems: 1 + + interrupts: + maxItems: 1 + + start-year: true + wakeup-source: true + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + rtc@51 { + compatible = "nxp,pcf8563"; + reg = <0x51>; + #clock-cells = <0>; + }; + }; +...Documentation/devicetree/bindings/rtc/pcf8563.txt deleted +0
-29@@ -1,29 +0,0 @@ -* Philips PCF8563/Epson RTC8564 Real Time Clock - -Philips PCF8563/Epson RTC8564 Real Time Clock - -Required properties: -- compatible: Should contain "nxp,pcf8563", - "epson,rtc8564" or - "microcrystal,rv8564" or - "nxp,pca8565" -- reg: I2C address for chip. - -Optional property: -- #clock-cells: Should be 0. -- clock-output-names: - overwrite the default clock name "pcf8563-clkout" - -Example: - -pcf8563: pcf8563@51 { - compatible = "nxp,pcf8563"; - reg = <0x51>; - #clock-cells = <0>; -}; - -device { -... - clocks = <&pcf8563>; -... -};Signature · 1 line
2.27.0
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 5 lines · Rob Herring
This series converts the mux-controller and some i2c mux bindings to DT schema. This was a rabbit hole of trying to fix undocumented (by schema) compatibles (enabled by setting DT_CHECKER_FLAGS=-m). So this is mux bindings, and then a few others that are used in the mux binding examples.
So, I assume this should all go via your tree? That would be fine with me. Maybe Peter has some more comments, but for the procedure, here is my ack for the I2C parts of this series:
Peter Rosin
Acked-byQuoted 10 lines · Wolfram Sang
Quoted 5 lines · Rob Herring
This series converts the mux-controller and some i2c mux bindings to DT schema. This was a rabbit hole of trying to fix undocumented (by schema) compatibles (enabled by setting DT_CHECKER_FLAGS=-m). So this is mux bindings, and then a few others that are used in the mux binding examples.
So, I assume this should all go via your tree? That would be fine with me. Maybe Peter has some more comments, but for the procedure, here is my ack for the I2C parts of this series:
Hi Rob,
Thanks for converting these!
I can't call what I have done a review, because the details escape me, and I don't have time to spend at the moment. However, from where I'm looking, it all looks splendid. Ignorance is bliss! So, for patches 3-5 (where I'm the maintainer) you have my
Interesting times, being a maintainer of things I don't understand. I need to fix that...
The main worry I have is the comment from Laurent about the intermediate "i2c-mux" node, which also applies to i2c-gate which has been converted to yaml before and to i2c-arb which is still in .txt format. I don't remember exactly what the issue was that made me add the optional level, but hopefully it is as you say, and that it is only MFD-type devices that need them and that those can specify the intermediate level themselves. My vision was to always have the intermediate level, since I thought the bindings looked clearer that way. But that's just a personal opinion, and it doesn't really matter...
However, I also worry that the information needed by future authors of MFD bindings is lost and that they will have no readily available source of the information that the intermediate nodes should be called i2c-mux, i2c-arb or i2c-gate. The info was removed in the i2c-gate.txt -> .yaml conversion. But that problem is not present in this series, since the info is preserved in i2c-mux.txt -> .yaml conversion.
So, please go ahead with this series. Thanks again!
Cheers,
Peter
Re: [PATCH v2 1/6] dt-bindings: mfd: ti,j721e-system-controller: Fix mux node errors
In reply to Rob HerringQuoted 11 lines · Rob Herring
The ti,j721e-system-controller binding does not follow the standard mux controller node name 'mux-controller' and the example is incomplete. Fix these to avoid schema errors before the mux controller binding is converted to schema.
Cc Lee Jones <[email protected]>Cc Kishon Vijay Abraham I <[email protected]>Signed-off-by Rob Herring <[email protected]>--- .../mfd/ti,j721e-system-controller.yaml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-)
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog