Re: [PATCH] dt-bindings: thermal: ti,omap-bandgap: Convert to DT schema
From: Rob Herring
Date: Mon Aug 03 2026 - 18:30:40 EST
On Fri, Jul 31, 2026 at 12:42:38AM +0530, Bhargav Joshi wrote:
> Convert Texas Instruments OMAP SCM bandgap from legacy text to DT schema
>
> Add "ti,dra752-bandgap" to compatible which was missing in text binding
> but used and matched by same driver.
>
> Document the "#thermal-sensor-cells" property, which was missing from
> the original text binding but is required in practice by all in-tree
> users via the common thermal-sensor.yaml binding.
>
> Signed-off-by: Bhargav Joshi <j.bhargav.u@xxxxxxxxx>
> ---
> .../bindings/thermal/ti,omap-bandgap.yaml | 227 +++++++++++++++++++++
> .../devicetree/bindings/thermal/ti_soc_thermal.txt | 88 --------
> 2 files changed, 227 insertions(+), 88 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/thermal/ti,omap-bandgap.yaml b/Documentation/devicetree/bindings/thermal/ti,omap-bandgap.yaml
> new file mode 100644
> index 000000000000..5afd10a84f70
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/thermal/ti,omap-bandgap.yaml
> @@ -0,0 +1,227 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/thermal/ti,omap-bandgap.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Texas Instruments OMAP SCM bandgap
> +
> +maintainers:
> + - Eduardo Valentin <edubezval@xxxxxxxxx>
> +
> +description:
> + In the System Control Module, OMAP supplies a voltage reference and a
> + temperature sensor feature that are gathered in the band gap voltage and
> + temperature sensor (VBGAPTS) module. The band gap provides current and
> + voltage reference for its internal circuits and other analog IP blocks. The
> + analog-to-digital converter (ADC) produces an output value that is
> + proportional to the silicon temperature.
> +
> +properties:
> + compatible:
> + enum:
> + - ti,omap34xx-bandgap
> + - ti,omap36xx-bandgap
> + - ti,omap4430-bandgap
> + - ti,omap4460-bandgap
> + - ti,omap4470-bandgap
> + - ti,omap5430-bandgap
> + - ti,dra752-bandgap
> +
> + reg:
> + minItems: 1
> + maxItems: 6
> +
> + interrupts:
> + maxItems: 1
> +
> + gpios:
> + maxItems: 1
> + description:
> + used to inform which GPIO line the tshut signal is routed to. The
> + informed GPIO will be treated as an IRQ;
> +
> + "#thermal-sensor-cells":
> + enum: [0, 1]
> +
> +required:
> + - compatible
> + - reg
> +
> +allOf:
> + - $ref: thermal-sensor.yaml#
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - ti,omap34xx-bandgap
> + - ti,omap36xx-bandgap
> +
> + then:
> + properties:
> + reg:
> + minItems: 1
> + maxItems: 1
> +
> + interrupts: false
> +
> + gpios: false
> +
> + "#thermal-sensor-cells":
> + const: 0
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: ti,omap4430-bandgap
> +
> + then:
> + properties:
> + reg:
> + minItems: 2
> + maxItems: 2
> +
> + interrupts: false
> +
> + "#thermal-sensor-cells":
> + const: 0
> +
> + required:
> + - gpios
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - ti,omap4460-bandgap
> + - ti,omap4470-bandgap
> +
> + then:
> + properties:
> + reg:
> + minItems: 3
> + maxItems: 3
> +
> + interrupts:
> + maxItems: 1
Drop. 1 is already the max.
> +
> + "#thermal-sensor-cells":
> + const: 0
> +
> + required:
> + - interrupts
> + - gpios
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: ti,omap5430-bandgap
> +
> + then:
> + properties:
> + reg:
> + minItems: 4
> + maxItems: 4
> +
> + interrupts:
> + maxItems: 1
Drop. 1 is already the max.
> +
> + gpios: false
> +
> + "#thermal-sensor-cells":
> + const: 1
> +
> + required:
> + - interrupts
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: ti,dra752-bandgap
> +
> + then:
> + properties:
> + reg:
> + minItems: 6
> + maxItems: 6
> +
> + interrupts:
> + maxItems: 1
Drop. 1 is already the max.
> +
> + gpios: false
> +
> + "#thermal-sensor-cells":
> + const: 1
> +
> + required:
> + - interrupts
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + bandgap@48002524 {
> + compatible = "ti,omap34xx-bandgap";
> + reg = <0x48002524 0x4>;
> + #thermal-sensor-cells = <0>;
> + };
> +
> + - |
> + bandgap@48002524 {
> + compatible = "ti,omap36xx-bandgap";
> + reg = <0x48002524 0x4>;
> + #thermal-sensor-cells = <0>;
> + };
> +
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> +
> + bandgap@4a002260 {
> + compatible = "ti,omap4430-bandgap";
> + reg = <0x4a002260 0x4>, <0x4a00232c 0x4>;
> + gpios = <&gpio3 22 GPIO_ACTIVE_HIGH>; /* tshut */
> + #thermal-sensor-cells = <0>;
> + };
> +
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> + #include <dt-bindings/interrupt-controller/irq.h>
> +
> + bandgap@4a002260 {
> + compatible = "ti,omap4460-bandgap";
> + reg = <0x4a002260 0x4>, <0x4a00232c 0x4>, <0x4a002378 0x18>;
> + interrupts = <0 126 IRQ_TYPE_LEVEL_HIGH>; /* talert */
> + gpios = <&gpio3 22 GPIO_ACTIVE_HIGH>; /* tshut */
> + #thermal-sensor-cells = <0>;
> + };
> +
> + - |
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> + #include <dt-bindings/interrupt-controller/irq.h>
> +
> + bandgap@4a0021e0 {
> + compatible = "ti,omap5430-bandgap";
> + reg = <0x4a0021e0 0xc>, <0x4a00232c 0xc>,
> + <0x4a002380 0x2c>, <0x4a0023c0 0x3c>;
> + interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>; /* talert */
> + #thermal-sensor-cells = <1>;
> + };
> +
> + - |
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> + #include <dt-bindings/interrupt-controller/irq.h>
> +
> + bandgap@4a0021e0 {
> + compatible = "ti,dra752-bandgap";
> + reg = <0x4a0021e0 0xc>, <0x4a00232c 0xc>,
> + <0x4a002380 0x2c>, <0x4a0023c0 0x3c>,
> + <0x4a002564 0x8>, <0x4a002574 0x50>;
> + interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>; /* talert */
> + #thermal-sensor-cells = <1>;
> + };
1 or 2 examples is enough. Perhaps the 1st and last to have the simplest
and most complex.