dt-bindings: mfd: Convert Allwinner GPADC bindings to a schema
Subsystems (5)
PATCH 1/5 dt-bindings: mfd: Convert Allwinner GPADC bindings to a schema
From: Maxime Ripard <[email protected]>
The Allwinner SoCs have an embedded GPADC that is doing thermal reading as well, supported in Linux, with a matching Device Tree binding.
Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas.
--- .../iio/adc/allwinner,sun8i-a33-ths.yaml | 43 +++++++++++ .../bindings/mfd/allwinner,sun4i-a10-ts.yaml | 76 +++++++++++++++++++ .../devicetree/bindings/mfd/sun4i-gpadc.txt | 59 -------------- 3 files changed, 119 insertions(+), 59 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/adc/allwinner,sun8i-a33-ths.yaml create mode 100644 Documentation/devicetree/bindings/mfd/allwinner,sun4i-a10-ts.yaml delete mode 100644 Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt
Documentation/devicetree/bindings/iio/adc/allwinner,sun8i-a33-ths.yaml new file +43 -0
@@ -0,0 +1,43 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/allwinner,sun8i-a33-ths.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Allwinner A33 Thermal Sensor Device Tree Bindings + +maintainers: + - Chen-Yu Tsai <[email protected]> + - Maxime Ripard <[email protected]> + +properties: + "#io-channel-cells": + const: 0 + + "#thermal-sensor-cells": + const: 0 + + compatible: + const: allwinner,sun8i-a33-ths + + reg: + maxItems: 1 + +required: + - "#io-channel-cells" + - "#thermal-sensor-cells" + - compatible + - reg + +additionalProperties: false + +examples: + - | + ths: ths@1c25000 { + compatible = "allwinner,sun8i-a33-ths"; + reg = <0x01c25000 0x100>; + #thermal-sensor-cells = <0>; + #io-channel-cells = <0>; + }; + +...
Documentation/devicetree/bindings/mfd/allwinner,sun4i-a10-ts.yaml new file +76 -0
76 lines not on this page · raw message
Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt deleted +0 -59
59 lines not on this page · raw message
Signature · 1 line
2.21.0
PATCH 2/5 dt-bindings: watchdog: Convert Allwinner watchdog to a schema
From: Maxime Ripard <[email protected]>
The Allwinner SoCs have a watchdog supported in Linux, with a matching Device Tree binding.
Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas.
--- .../watchdog/allwinner,sun4i-a10-wdt.yaml | 50 +++++++++++++++++++ .../bindings/watchdog/sunxi-wdt.txt | 22 -------- 2 files changed, 50 insertions(+), 22 deletions(-) create mode 100644 Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml delete mode 100644 Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml new file +50 -0
@@ -0,0 +1,50 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/watchdog/allwinner,sun4i-a10-wdt.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Allwinner A10 Watchdog Device Tree Bindings + +maintainers: + - Chen-Yu Tsai <[email protected]> + - Maxime Ripard <[email protected]> + +properties: + compatible: + oneOf: + - const: allwinner,sun4i-a10-wdt + - const: allwinner,sun6i-a31-wdt + - items: + - const: allwinner,sun50i-a64-wdt + - const: allwinner,sun6i-a31-wdt + - items: + - const: allwinner,sun50i-h6-wdt + - const: allwinner,sun6i-a31-wdt + - items: + - const: allwinner,suniv-f1c100s-wdt + - const: allwinner,sun4i-a10-wdt + + reg: + maxItems: 1 + + timeout-sec: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Contains the watchdog timeout in seconds. + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + wdt: watchdog@1c20c90 { + compatible = "allwinner,sun4i-a10-wdt"; + reg = <0x01c20c90 0x10>; + timeout-sec = <10>; + }; + +...
Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt deleted +0 -22
@@ -1,22 +0,0 @@ -Allwinner SoCs Watchdog timer - -Required properties: - -- compatible : should be one of - "allwinner,sun4i-a10-wdt" - "allwinner,sun6i-a31-wdt" - "allwinner,sun50i-a64-wdt","allwinner,sun6i-a31-wdt" - "allwinner,sun50i-h6-wdt","allwinner,sun6i-a31-wdt" - "allwinner,suniv-f1c100s-wdt", "allwinner,sun4i-a10-wdt" -- reg : Specifies base physical address and size of the registers. - -Optional properties: -- timeout-sec : Contains the watchdog timeout in seconds - -Example: - -wdt: watchdog@1c20c90 { - compatible = "allwinner,sun4i-a10-wdt"; - reg = <0x01c20c90 0x10>; - timeout-sec = <10>; -};
Signature · 1 line
2.21.0
Re: [PATCH 2/5] dt-bindings: watchdog: Convert Allwinner watchdog to a schema
Quoted 47 lines · Maxime Ripard
From: Maxime Ripard <[email protected]>
The Allwinner SoCs have a watchdog supported in Linux, with a matching Device Tree binding.
Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas.
Signed-off-by Maxime Ripard <[email protected]>--- .../watchdog/allwinner,sun4i-a10-wdt.yaml | 50 +++++++++++++++++++ .../bindings/watchdog/sunxi-wdt.txt | 22 -------- 2 files changed, 50 insertions(+), 22 deletions(-) create mode 100644 Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml delete mode 100644 Documentation/devicetree/bindings/watchdog/sunxi-wdt.txtDocumentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml new file +24
-0@@ -0,0 +1,50 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/watchdog/allwinner,sun4i-a10-wdt.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Allwinner A10 Watchdog Device Tree Bindings + +maintainers: + - Chen-Yu Tsai <[email protected]> + - Maxime Ripard <[email protected]> + +properties: + compatible: + oneOf: + - const: allwinner,sun4i-a10-wdt + - const: allwinner,sun6i-a31-wdt + - items: + - const: allwinner,sun50i-a64-wdt + - const: allwinner,sun6i-a31-wdt + - items: + - const: allwinner,sun50i-h6-wdt + - const: allwinner,sun6i-a31-wdt + - items:
Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml line 34
Quoted 10 lines
Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml new file +10
-0+ - const: allwinner,suniv-f1c100s-wdt + - const: allwinner,sun4i-a10-wdt + + reg: + maxItems: 1 + + timeout-sec: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Contains the watchdog timeout in seconds.
Can you do a common watchdog schema to include with this and the node name at least.
Rob
PATCH 3/5 dt-bindings: watchdog: sun4i: Add the watchdog interrupts
In reply to Maxime RipardFrom: Maxime Ripard <[email protected]>
The Allwinner watchdog has an interrupt, either shared or dedicated depending on the SoC, that has been described in some DT, but not all of them.
The binding is also completely missing that description. Let's add that property to be consistent.
--- .../bindings/watchdog/allwinner,sun4i-a10-wdt.yaml | 5 +++++ 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml +5 -0
@@ -28,6 +28,9 @@ properties: reg: maxItems: 1 + interrupts: + maxItems: 1 + timeout-sec: $ref: /schemas/types.yaml#/definitions/uint32 description:
@@ -36,6 +39,7 @@ properties: required: - compatible - reg + - interrupts additionalProperties: false
@@ -44,6 +48,7 @@ examples: wdt: watchdog@1c20c90 { compatible = "allwinner,sun4i-a10-wdt"; reg = <0x01c20c90 0x10>; + interrupts = <24>; timeout-sec = <10>; };
Signature · 1 line
2.21.0
Re: [PATCH 3/5] dt-bindings: watchdog: sun4i: Add the watchdog interrupts
Quoted 9 lines · Maxime Ripard
From: Maxime Ripard <[email protected]>
The Allwinner watchdog has an interrupt, either shared or dedicated depending on the SoC, that has been described in some DT, but not all of them.
The binding is also completely missing that description. Let's add that property to be consistent.
I'm fine with fixing errors like this in the conversion patch.
Quoted 4 lines
Signed-off-by Maxime Ripard <[email protected]>--- .../bindings/watchdog/allwinner,sun4i-a10-wdt.yaml | 5 +++++ 1 file changed, 5 insertions(+)
Either way:
PATCH 4/5 ARM: dts: sun8i: a83t: Remove the watchdog clock
In reply to Maxime RipardFrom: Maxime Ripard <[email protected]>
The watchdog binding doesn't define a clock, and it indeed looks like there's no explicit clock feeding it.
Let's remove it from our DT.
--- arch/arm/boot/dts/sun8i-a83t.dtsi | 1 - 1 file changed, 1 deletion(-)
arch/arm/boot/dts/sun8i-a83t.dtsi +0 -1
@@ -817,7 +817,6 @@ compatible = "allwinner,sun6i-a31-wdt"; reg = <0x01c20ca0 0x20>; interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&osc24M>; }; spdif: spdif@1c21000 {
Signature · 1 line
2.21.0
Re: [PATCH 4/5] ARM: dts: sun8i: a83t: Remove the watchdog clock
Quoted 5 lines · Maxime Ripard
From: Maxime Ripard <[email protected]>
The watchdog binding doesn't define a clock, and it indeed looks like there's no explicit clock feeding it.
The diagram on page 133 of the manual shows OSC24M / 750 feeding the watchdog.
Other manuals, such as the A10 one, mention:
Watchdog clock source is OSC24M. if the OSC24M is turned off, the watchdog will not work.
So in fact it does use a clock signal. It's just that we've been lazy, since the clock rate is fixed and is always on.
ChenYu
Quoted 22 lines
Let's remove it from our DT.
Signed-off-by Maxime Ripard <[email protected]>--- arch/arm/boot/dts/sun8i-a83t.dtsi | 1 - 1 file changed, 1 deletion(-)arch/arm/boot/dts/sun8i-a83t.dtsi +0
-2@@ -817,7 +817,6 @@ compatible = "allwinner,sun6i-a31-wdt"; reg = <0x01c20ca0 0x20>; interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&osc24M>; }; spdif: spdif@1c21000 { --2.21.0
PATCH 5/5 ARM: dts: sunxi: Add missing watchdog interrupts
In reply to Maxime RipardFrom: Maxime Ripard <[email protected]>
The watchdog has an interrupt on all our SoCs, but it wasn't always listed. Add it to the devicetree where it's missing.
--- arch/arm/boot/dts/sun4i-a10.dtsi | 1 + arch/arm/boot/dts/sun5i.dtsi | 1 + arch/arm/boot/dts/sun6i-a31.dtsi | 1 + arch/arm/boot/dts/sun7i-a20.dtsi | 1 + arch/arm/boot/dts/sun8i-r40.dtsi | 1 + 5 files changed, 5 insertions(+)
arch/arm/boot/dts/sun4i-a10.dtsi +1 -0
@@ -815,6 +815,7 @@ wdt: watchdog@1c20c90 { compatible = "allwinner,sun4i-a10-wdt"; reg = <0x01c20c90 0x10>; + interrupts = <24>; }; rtc: rtc@1c20d00 {
arch/arm/boot/dts/sun5i.dtsi +1 -0
@@ -600,6 +600,7 @@ wdt: watchdog@1c20c90 { compatible = "allwinner,sun4i-a10-wdt"; reg = <0x01c20c90 0x10>; + interrupts = <24>; }; ir0: ir@1c21800 {
arch/arm/boot/dts/sun6i-a31.dtsi +1 -0
@@ -744,6 +744,7 @@ wdt1: watchdog@1c20ca0 { compatible = "allwinner,sun6i-a31-wdt"; reg = <0x01c20ca0 0x20>; + interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>; }; spdif: spdif@1c21000 {
arch/arm/boot/dts/sun7i-a20.dtsi +1 -0
@@ -1115,6 +1115,7 @@ wdt: watchdog@1c20c90 { compatible = "allwinner,sun4i-a10-wdt"; reg = <0x01c20c90 0x10>; + interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; }; rtc: rtc@1c20d00 {
arch/arm/boot/dts/sun8i-r40.dtsi +1 -0
@@ -404,6 +404,7 @@ wdt: watchdog@1c20c90 { compatible = "allwinner,sun4i-a10-wdt"; reg = <0x01c20c90 0x10>; + interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; }; uart0: serial@1c28000 {
Signature · 1 line
2.21.0
Re: [PATCH 5/5] ARM: dts: sunxi: Add missing watchdog interrupts
Quoted 7 lines · Maxime Ripard
From: Maxime Ripard <[email protected]>
The watchdog has an interrupt on all our SoCs, but it wasn't always listed. Add it to the devicetree where it's missing.
Signed-off-by Maxime Ripard <[email protected]>
On a separate note, the A31 has four watchdogs in the timer block, and one interrupt for each watchdog. Should we expand the node to encompass all of them, or add separate nodes for each additional one?
Thanks
Re: [PATCH 5/5] ARM: dts: sunxi: Add missing watchdog interrupts
Quoted 7 lines · Chen-Yu Tsai
Quoted 6 lines · Maxime Ripard
From: Maxime Ripard <[email protected]>
The watchdog has an interrupt on all our SoCs, but it wasn't always listed. Add it to the devicetree where it's missing.
Quoted 7 lines
Quoted 1 line
Signed-off-by Maxime Ripard <[email protected]>Acked-by Chen-Yu Tsai <[email protected]>On a separate note, the A31 has four watchdogs in the timer block, and one interrupt for each watchdog. Should we expand the node to encompass all of them, or add separate nodes for each additional one?
Yep, I guess that's the idea considering the register range.
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Quoted 10 lines · Maxime Ripard
From: Maxime Ripard <[email protected]>
The Allwinner SoCs have an embedded GPADC that is doing thermal reading as well, supported in Linux, with a matching Device Tree binding.
Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas.
Signed-off-by Maxime Ripard <[email protected]>
Quoted 8 lines
--- .../iio/adc/allwinner,sun8i-a33-ths.yaml | 43 +++++++++++ .../bindings/mfd/allwinner,sun4i-a10-ts.yaml | 76 +++++++++++++++++++ .../devicetree/bindings/mfd/sun4i-gpadc.txt | 59 -------------- 3 files changed, 119 insertions(+), 59 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/adc/allwinner,sun8i-a33-ths.yaml create mode 100644 Documentation/devicetree/bindings/mfd/allwinner,sun4i-a10-ts.yaml delete mode 100644 Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt
Maxime Ripard
AppliedQuoted 20 lines · Rob Herring
Quoted 10 lines · Maxime Ripard
From: Maxime Ripard <[email protected]>
The Allwinner SoCs have an embedded GPADC that is doing thermal reading as well, supported in Linux, with a matching Device Tree binding.
Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas.
Signed-off-by Maxime Ripard <[email protected]>Quoted 8 lines
--- .../iio/adc/allwinner,sun8i-a33-ths.yaml | 43 +++++++++++ .../bindings/mfd/allwinner,sun4i-a10-ts.yaml | 76 +++++++++++++++++++ .../devicetree/bindings/mfd/sun4i-gpadc.txt | 59 -------------- 3 files changed, 119 insertions(+), 59 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/adc/allwinner,sun8i-a33-ths.yaml create mode 100644 Documentation/devicetree/bindings/mfd/allwinner,sun4i-a10-ts.yaml delete mode 100644 Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt
Quoted 1 line
Reviewed-by Rob Herring <[email protected]>
Applied, thanks
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel