* [PATCH 0/2] dt-bindings: thermal: st,thermal-spear1340: convert to dtschema
@ 2026-03-23 13:38 Gopi Krishna Menon
2026-03-23 13:38 ` [PATCH 1/2] " Gopi Krishna Menon
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Gopi Krishna Menon @ 2026-03-23 13:38 UTC (permalink / raw)
To: rafael, daniel.lezcano, rui.zhang, lukasz.luba, robh, krzk+dt,
vireshk, conor+dt
Cc: Gopi Krishna Menon, linux-pm, devicetree, linux-kernel,
linux-arm-kernel, soc, daniel.baluta, simona.toaca, d-gole,
m-chawdhry
This patch series converts SPEAr Thermal Sensor bindings to DT schema
and renames thermal_flags property in spear13xx.dtsi to
st,thermal-flags to fix the unevaluated property warning in
st/spear1340-evb.dts.
Note:
* This patch is part of the GSoC2026 application process for device tree bindings conversions
* https://github.com/LinuxFoundationGSoC/ProjectIdeas/wiki/GSoC-2026-Device-Tree-Bindings
Gopi Krishna Menon (2):
dt-bindings: thermal: st,thermal-spear1340: convert to dtschema
ARM: dts: st: spear: fix dtbs warning on spear thermal sensor
.../bindings/thermal/spear-thermal.txt | 14 --------
.../thermal/st,thermal-spear1340.yaml | 36 +++++++++++++++++++
arch/arm/boot/dts/st/spear13xx.dtsi | 2 +-
3 files changed, 37 insertions(+), 15 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/thermal/spear-thermal.txt
create mode 100644 Documentation/devicetree/bindings/thermal/st,thermal-spear1340.yaml
--
2.52.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/2] dt-bindings: thermal: st,thermal-spear1340: convert to dtschema
2026-03-23 13:38 [PATCH 0/2] dt-bindings: thermal: st,thermal-spear1340: convert to dtschema Gopi Krishna Menon
@ 2026-03-23 13:38 ` Gopi Krishna Menon
2026-03-24 9:30 ` Krzysztof Kozlowski
2026-03-23 13:38 ` [PATCH 2/2] ARM: dts: st: spear: fix dtbs warning on spear thermal sensor Gopi Krishna Menon
2026-03-24 4:07 ` [PATCH 0/2] dt-bindings: thermal: st,thermal-spear1340: convert to dtschema Viresh Kumar
2 siblings, 1 reply; 12+ messages in thread
From: Gopi Krishna Menon @ 2026-03-23 13:38 UTC (permalink / raw)
To: rafael, daniel.lezcano, rui.zhang, lukasz.luba, robh, krzk+dt,
vireshk, conor+dt
Cc: Gopi Krishna Menon, linux-pm, devicetree, linux-kernel,
linux-arm-kernel, soc, daniel.baluta, simona.toaca, d-gole,
m-chawdhry
Convert the SPEAr Thermal Sensor bindings to DT schema.
Signed-off-by: Gopi Krishna Menon <krishnagopi487@gmail.com>
---
Note:
* This patch is part of the GSoC2026 application process for device tree bindings conversions
* https://github.com/LinuxFoundationGSoC/ProjectIdeas/wiki/GSoC-2026-Device-Tree-Bindings
.../bindings/thermal/spear-thermal.txt | 14 --------
.../thermal/st,thermal-spear1340.yaml | 36 +++++++++++++++++++
2 files changed, 36 insertions(+), 14 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/thermal/spear-thermal.txt
create mode 100644 Documentation/devicetree/bindings/thermal/st,thermal-spear1340.yaml
diff --git a/Documentation/devicetree/bindings/thermal/spear-thermal.txt b/Documentation/devicetree/bindings/thermal/spear-thermal.txt
deleted file mode 100644
index 93e3b67c102d..000000000000
--- a/Documentation/devicetree/bindings/thermal/spear-thermal.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-* SPEAr Thermal
-
-Required properties:
-- compatible : "st,thermal-spear1340"
-- reg : Address range of the thermal registers
-- st,thermal-flags: flags used to enable thermal sensor
-
-Example:
-
- thermal@fc000000 {
- compatible = "st,thermal-spear1340";
- reg = <0xfc000000 0x1000>;
- st,thermal-flags = <0x7000>;
- };
diff --git a/Documentation/devicetree/bindings/thermal/st,thermal-spear1340.yaml b/Documentation/devicetree/bindings/thermal/st,thermal-spear1340.yaml
new file mode 100644
index 000000000000..125632163911
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/st,thermal-spear1340.yaml
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/thermal/st,thermal-spear1340.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: SPEAr Thermal Sensor
+
+maintainers:
+ - Viresh Kumar <vireshk@kernel.org>
+
+properties:
+ compatible:
+ const: st,thermal-spear1340
+
+ reg:
+ maxItems: 1
+
+ st,thermal-flags:
+ description: flags used to enable thermal sensor
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+required:
+ - compatible
+ - reg
+ - st,thermal-flags
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ thermal@fc000000 {
+ compatible = "st,thermal-spear1340";
+ reg = <0xfc000000 0x1000>;
+ st,thermal-flags = <0x7000>;
+ };
--
2.52.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/2] ARM: dts: st: spear: fix dtbs warning on spear thermal sensor
2026-03-23 13:38 [PATCH 0/2] dt-bindings: thermal: st,thermal-spear1340: convert to dtschema Gopi Krishna Menon
2026-03-23 13:38 ` [PATCH 1/2] " Gopi Krishna Menon
@ 2026-03-23 13:38 ` Gopi Krishna Menon
2026-03-24 9:26 ` Krzysztof Kozlowski
2026-03-24 4:07 ` [PATCH 0/2] dt-bindings: thermal: st,thermal-spear1340: convert to dtschema Viresh Kumar
2 siblings, 1 reply; 12+ messages in thread
From: Gopi Krishna Menon @ 2026-03-23 13:38 UTC (permalink / raw)
To: rafael, daniel.lezcano, rui.zhang, lukasz.luba, robh, krzk+dt,
vireshk, conor+dt
Cc: Gopi Krishna Menon, linux-pm, devicetree, linux-kernel,
linux-arm-kernel, soc, daniel.baluta, simona.toaca, d-gole,
m-chawdhry
Running DTBS checks on st/spear1340-evb.dtb results in the following
warning:
thermal@e07008c4 (st,thermal-spear1340): Unevaluated properties are not allowed ('thermal_flags' was unexpected)
from schema $id: http://devicetree.org/schemas/thermal/st,thermal-spear1340.yaml
Rename thermal_flags to st,thermal-flags to fix the warning.
Signed-off-by: Gopi Krishna Menon <krishnagopi487@gmail.com>
---
Note:
* This patch is part of the GSoC2026 application process for device tree bindings conversions
* https://github.com/LinuxFoundationGSoC/ProjectIdeas/wiki/GSoC-2026-Device-Tree-Bindings
arch/arm/boot/dts/st/spear13xx.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/st/spear13xx.dtsi b/arch/arm/boot/dts/st/spear13xx.dtsi
index 159e941708ca..97357680dd51 100644
--- a/arch/arm/boot/dts/st/spear13xx.dtsi
+++ b/arch/arm/boot/dts/st/spear13xx.dtsi
@@ -332,7 +332,7 @@ wdt@ec800620 {
thermal@e07008c4 {
compatible = "st,thermal-spear1340";
reg = <0xe07008c4 0x4>;
- thermal_flags = <0x7000>;
+ st,thermal-flags = <0x7000>;
};
};
};
--
2.52.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] dt-bindings: thermal: st,thermal-spear1340: convert to dtschema
2026-03-23 13:38 [PATCH 0/2] dt-bindings: thermal: st,thermal-spear1340: convert to dtschema Gopi Krishna Menon
2026-03-23 13:38 ` [PATCH 1/2] " Gopi Krishna Menon
2026-03-23 13:38 ` [PATCH 2/2] ARM: dts: st: spear: fix dtbs warning on spear thermal sensor Gopi Krishna Menon
@ 2026-03-24 4:07 ` Viresh Kumar
2 siblings, 0 replies; 12+ messages in thread
From: Viresh Kumar @ 2026-03-24 4:07 UTC (permalink / raw)
To: Gopi Krishna Menon
Cc: rafael, daniel.lezcano, rui.zhang, lukasz.luba, robh, krzk+dt,
vireshk, conor+dt, linux-pm, devicetree, linux-kernel,
linux-arm-kernel, soc, daniel.baluta, simona.toaca, d-gole,
m-chawdhry
On 23-03-26, 19:08, Gopi Krishna Menon wrote:
> This patch series converts SPEAr Thermal Sensor bindings to DT schema
> and renames thermal_flags property in spear13xx.dtsi to
> st,thermal-flags to fix the unevaluated property warning in
> st/spear1340-evb.dts.
>
> Note:
> * This patch is part of the GSoC2026 application process for device tree bindings conversions
> * https://github.com/LinuxFoundationGSoC/ProjectIdeas/wiki/GSoC-2026-Device-Tree-Bindings
>
>
> Gopi Krishna Menon (2):
> dt-bindings: thermal: st,thermal-spear1340: convert to dtschema
> ARM: dts: st: spear: fix dtbs warning on spear thermal sensor
>
> .../bindings/thermal/spear-thermal.txt | 14 --------
> .../thermal/st,thermal-spear1340.yaml | 36 +++++++++++++++++++
> arch/arm/boot/dts/st/spear13xx.dtsi | 2 +-
> 3 files changed, 37 insertions(+), 15 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/thermal/spear-thermal.txt
> create mode 100644 Documentation/devicetree/bindings/thermal/st,thermal-spear1340.yaml
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] ARM: dts: st: spear: fix dtbs warning on spear thermal sensor
2026-03-23 13:38 ` [PATCH 2/2] ARM: dts: st: spear: fix dtbs warning on spear thermal sensor Gopi Krishna Menon
@ 2026-03-24 9:26 ` Krzysztof Kozlowski
2026-03-24 9:27 ` Krzysztof Kozlowski
2026-03-24 10:00 ` Daniel Baluta
0 siblings, 2 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-24 9:26 UTC (permalink / raw)
To: Gopi Krishna Menon
Cc: rafael, daniel.lezcano, rui.zhang, lukasz.luba, robh, krzk+dt,
vireshk, conor+dt, linux-pm, devicetree, linux-kernel,
linux-arm-kernel, soc, daniel.baluta, simona.toaca, d-gole,
m-chawdhry
On Mon, Mar 23, 2026 at 07:08:09PM +0530, Gopi Krishna Menon wrote:
> Running DTBS checks on st/spear1340-evb.dtb results in the following
> warning:
>
> thermal@e07008c4 (st,thermal-spear1340): Unevaluated properties are not allowed ('thermal_flags' was unexpected)
> from schema $id: http://devicetree.org/schemas/thermal/st,thermal-spear1340.yaml
How is it possible if there is no such file?
Did you just add new warning in patch #1 and then claim in patch #2 that
you fix it?
You completely miss the point why this change is needed: how could the
DTS work before? It could not. And that should be your justification for
the patch, with explanation why it could not work.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] ARM: dts: st: spear: fix dtbs warning on spear thermal sensor
2026-03-24 9:26 ` Krzysztof Kozlowski
@ 2026-03-24 9:27 ` Krzysztof Kozlowski
2026-03-24 10:00 ` Daniel Baluta
1 sibling, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-24 9:27 UTC (permalink / raw)
To: Gopi Krishna Menon
Cc: rafael, daniel.lezcano, rui.zhang, lukasz.luba, robh, krzk+dt,
vireshk, conor+dt, linux-pm, devicetree, linux-kernel,
linux-arm-kernel, soc, daniel.baluta, simona.toaca, d-gole,
m-chawdhry
On 24/03/2026 10:26, Krzysztof Kozlowski wrote:
> On Mon, Mar 23, 2026 at 07:08:09PM +0530, Gopi Krishna Menon wrote:
>> Running DTBS checks on st/spear1340-evb.dtb results in the following
>> warning:
>>
>> thermal@e07008c4 (st,thermal-spear1340): Unevaluated properties are not allowed ('thermal_flags' was unexpected)
>> from schema $id: http://devicetree.org/schemas/thermal/st,thermal-spear1340.yaml
>
> How is it possible if there is no such file?
>
> Did you just add new warning in patch #1 and then claim in patch #2 that
> you fix it?
>
> You completely miss the point why this change is needed: how could the
> DTS work before? It could not. And that should be your justification for
> the patch, with explanation why it could not work.
... or you would notice that code was working and this part is just
redundant. Then fix would be completely different, though.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] dt-bindings: thermal: st,thermal-spear1340: convert to dtschema
2026-03-23 13:38 ` [PATCH 1/2] " Gopi Krishna Menon
@ 2026-03-24 9:30 ` Krzysztof Kozlowski
2026-03-27 8:06 ` Krzysztof Kozlowski
0 siblings, 1 reply; 12+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-24 9:30 UTC (permalink / raw)
To: Gopi Krishna Menon
Cc: rafael, daniel.lezcano, rui.zhang, lukasz.luba, robh, krzk+dt,
vireshk, conor+dt, linux-pm, devicetree, linux-kernel,
linux-arm-kernel, soc, daniel.baluta, simona.toaca, d-gole,
m-chawdhry
On Mon, Mar 23, 2026 at 07:08:08PM +0530, Gopi Krishna Menon wrote:
> +properties:
> + compatible:
> + const: st,thermal-spear1340
> +
> + reg:
> + maxItems: 1
> +
> + st,thermal-flags:
> + description: flags used to enable thermal sensor
> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> +required:
> + - compatible
> + - reg
> + - st,thermal-flags
> +
> +unevaluatedProperties: false
additionalProperties: true
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] ARM: dts: st: spear: fix dtbs warning on spear thermal sensor
2026-03-24 9:26 ` Krzysztof Kozlowski
2026-03-24 9:27 ` Krzysztof Kozlowski
@ 2026-03-24 10:00 ` Daniel Baluta
2026-03-24 10:01 ` Krzysztof Kozlowski
1 sibling, 1 reply; 12+ messages in thread
From: Daniel Baluta @ 2026-03-24 10:00 UTC (permalink / raw)
To: Krzysztof Kozlowski, Gopi Krishna Menon
Cc: rafael, daniel.lezcano, rui.zhang, lukasz.luba, robh, krzk+dt,
vireshk, conor+dt, linux-pm, devicetree, linux-kernel,
linux-arm-kernel, soc, simona.toaca, d-gole, m-chawdhry
On 3/24/26 11:26, Krzysztof Kozlowski wrote:
> On Mon, Mar 23, 2026 at 07:08:09PM +0530, Gopi Krishna Menon wrote:
>> Running DTBS checks on st/spear1340-evb.dtb results in the following
>> warning:
>>
>> thermal@e07008c4 (st,thermal-spear1340): Unevaluated properties are not allowed ('thermal_flags' was unexpected)
>> from schema $id: http://devicetree.org/schemas/thermal/st,thermal-spear1340.yaml
> How is it possible if there is no such file?
>
> Did you just add new warning in patch #1 and then claim in patch #2 that
> you fix it?
>
> You completely miss the point why this change is needed: how could the
> DTS work before? It could not. And that should be your justification for
> the patch, with explanation why it could not work.
Correct me if I'm wrong but I think there was a hidden bug here
drivers/thermal/spear_thermal.c:spear_thermal_probe:
if (!np || !of_property_read_u32(np, "st,thermal-flags", &val)) {
» » dev_err(&pdev->dev, "Failed: DT Pdata not passed\n");
» » return -EINVAL;
» }
So, the driver was checking for the correct property as pointed by
bindings/thermal/spear-thermal.txt but the dts was using the wrong
property name: arch/arm/boot/dts/st/spear13xx.dtsi » » » thermal@e07008c4 { » » » » compatible = "st,thermal-spear1340"; » » » » reg = <0xe07008c4 0x4>; » » » » thermal_flags = <0x7000>; » » » }; And because this check is wrong:
if (!np || !of_property_read_u32(np, "st,thermal-flags", &val)) {
people really didn't notice it.
The check should be:
if (!np || of_property_read_u32(np, "st,thermal-flags", &val)) {
» » dev_err(&pdev->dev, "Failed: DT Pdata not passed\n");
» » return -EINVAL;
» }
So, this actual patch has uncovered a bug!
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] ARM: dts: st: spear: fix dtbs warning on spear thermal sensor
2026-03-24 10:00 ` Daniel Baluta
@ 2026-03-24 10:01 ` Krzysztof Kozlowski
2026-03-24 13:30 ` Gopi Krishna Menon
0 siblings, 1 reply; 12+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-24 10:01 UTC (permalink / raw)
To: Daniel Baluta, Gopi Krishna Menon
Cc: rafael, daniel.lezcano, rui.zhang, lukasz.luba, robh, krzk+dt,
vireshk, conor+dt, linux-pm, devicetree, linux-kernel,
linux-arm-kernel, soc, simona.toaca, d-gole, m-chawdhry
On 24/03/2026 11:00, Daniel Baluta wrote:
> On 3/24/26 11:26, Krzysztof Kozlowski wrote:
>> On Mon, Mar 23, 2026 at 07:08:09PM +0530, Gopi Krishna Menon wrote:
>>> Running DTBS checks on st/spear1340-evb.dtb results in the following
>>> warning:
>>>
>>> thermal@e07008c4 (st,thermal-spear1340): Unevaluated properties are not allowed ('thermal_flags' was unexpected)
>>> from schema $id: http://devicetree.org/schemas/thermal/st,thermal-spear1340.yaml
>> How is it possible if there is no such file?
>>
>> Did you just add new warning in patch #1 and then claim in patch #2 that
>> you fix it?
>>
>> You completely miss the point why this change is needed: how could the
>> DTS work before? It could not. And that should be your justification for
>> the patch, with explanation why it could not work.
>
> Correct me if I'm wrong but I think there was a hidden bug here
>
> drivers/thermal/spear_thermal.c:spear_thermal_probe:
>
> if (!np || !of_property_read_u32(np, "st,thermal-flags", &val)) {
> » » dev_err(&pdev->dev, "Failed: DT Pdata not passed\n");
> » » return -EINVAL;
> » }
>
> So, the driver was checking for the correct property as pointed by
Yes
>
> bindings/thermal/spear-thermal.txt but the dts was using the wrong
No, DTS had two properties - correct one and incorrect.
>
> property name: arch/arm/boot/dts/st/spear13xx.dtsi » » » thermal@e07008c4 { » » » » compatible = "st,thermal-spear1340"; » » » » reg = <0xe07008c4 0x4>; » » » » thermal_flags = <0x7000>; » » » }; And because this check is wrong:
>
> if (!np || !of_property_read_u32(np, "st,thermal-flags", &val)) {
>
> people really didn't notice it.
>
> The check should be:
>
> if (!np || of_property_read_u32(np, "st,thermal-flags", &val)) {
> » » dev_err(&pdev->dev, "Failed: DT Pdata not passed\n");
> » » return -EINVAL;
> » }
>
> So, this actual patch has uncovered a bug!
Yes. Driver also has bug, so probably was never working. The point is
whatever commit is doing, the dtbs_check warning is not the
justification, because it was introduced by this patchset.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] ARM: dts: st: spear: fix dtbs warning on spear thermal sensor
2026-03-24 10:01 ` Krzysztof Kozlowski
@ 2026-03-24 13:30 ` Gopi Krishna Menon
2026-03-24 13:34 ` Gopi Krishna Menon
0 siblings, 1 reply; 12+ messages in thread
From: Gopi Krishna Menon @ 2026-03-24 13:30 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Daniel Baluta, rafael, daniel.lezcano, rui.zhang, lukasz.luba,
robh, krzk+dt, vireshk, conor+dt, linux-pm, devicetree,
linux-kernel, linux-arm-kernel, soc, simona.toaca, d-gole,
m-chawdhry
On Tue, Mar 24, 2026 at 11:01:05AM +0100, Krzysztof Kozlowski wrote:
> On 24/03/2026 11:00, Daniel Baluta wrote:
> > On 3/24/26 11:26, Krzysztof Kozlowski wrote:
> >> On Mon, Mar 23, 2026 at 07:08:09PM +0530, Gopi Krishna Menon wrote:
> >>> Running DTBS checks on st/spear1340-evb.dtb results in the following
> >>> warning:
> >>>
> >>> thermal@e07008c4 (st,thermal-spear1340): Unevaluated properties are not allowed ('thermal_flags' was unexpected)
> >>> from schema $id: http://devicetree.org/schemas/thermal/st,thermal-spear1340.yaml
> >> How is it possible if there is no such file?
> >>
> >> Did you just add new warning in patch #1 and then claim in patch #2 that
> >> you fix it?
> >>
> >> You completely miss the point why this change is needed: how could the
> >> DTS work before? It could not. And that should be your justification for
> >> the patch, with explanation why it could not work.
> >
> > Correct me if I'm wrong but I think there was a hidden bug here
> >
> > drivers/thermal/spear_thermal.c:spear_thermal_probe:
> >
> > if (!np || !of_property_read_u32(np, "st,thermal-flags", &val)) {
> > » » dev_err(&pdev->dev, "Failed: DT Pdata not passed\n");
> > » » return -EINVAL;
> > » }
> >
> > So, the driver was checking for the correct property as pointed by
>
> Yes
>
> >
> > bindings/thermal/spear-thermal.txt but the dts was using the wrong
>
> No, DTS had two properties - correct one and incorrect.
>
Yup, spear13xx is included by spear1310.dtsi and spear1340.dtsi both of
which have st,thermal-flags correctly defined. When working on this
patch, after converting the binding, I ran dtbs check and upon seeing
dtbs warning immediately fixed it thinking it was complaining because
st,thermal-flags (thermal_flags) was written incorrectly. (Which is not
incorrect as st,thermal-flags was there in the final node but there was one
additional property named thermal_flags as well which is not allowed as
UnevaluatedProperty is set to false).
Also I dont think we have to override the st,thermal-flags property in
spear1310.dtsi as the flags value is same in spear13xx.dtsi and
spear1310.dtsi (0x7000).
> >
> > property name: arch/arm/boot/dts/st/spear13xx.dtsi » » » thermal@e07008c4 { » » » » compatible = "st,thermal-spear1340"; » » » » reg = <0xe07008c4 0x4>; » » » » thermal_flags = <0x7000>; » » » }; And because this check is wrong:
> >
> > if (!np || !of_property_read_u32(np, "st,thermal-flags", &val)) {
> >
> > people really didn't notice it.
> >
> > The check should be:
> >
> > if (!np || of_property_read_u32(np, "st,thermal-flags", &val)) {
> > » » dev_err(&pdev->dev, "Failed: DT Pdata not passed\n");
> > » » return -EINVAL;
> > » }
> >
> > So, this actual patch has uncovered a bug!
>
> Yes. Driver also has bug, so probably was never working. The point is
> whatever commit is doing, the dtbs_check warning is not the
> justification, because it was introduced by this patchset.
>
Please correct me if I am wrong Krzysztof but should i send a seperate patch
fixing the thermal_flags property (Not connected to these converted
bindings)?.
Also, is it necessary to set additionalProperties to true? I am not able to
figure out if that is needed.
> Best regards,
> Krzysztof
Thanks,
Gopi Krishna Menon
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] ARM: dts: st: spear: fix dtbs warning on spear thermal sensor
2026-03-24 13:30 ` Gopi Krishna Menon
@ 2026-03-24 13:34 ` Gopi Krishna Menon
0 siblings, 0 replies; 12+ messages in thread
From: Gopi Krishna Menon @ 2026-03-24 13:34 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Daniel Baluta, rafael, daniel.lezcano, rui.zhang, lukasz.luba,
robh, krzk+dt, vireshk, conor+dt, linux-pm, devicetree,
linux-kernel, linux-arm-kernel, soc, simona.toaca, d-gole,
m-chawdhry
On Tue, Mar 24, 2026 at 07:00:49PM +0530, Gopi Krishna Menon wrote:
> On Tue, Mar 24, 2026 at 11:01:05AM +0100, Krzysztof Kozlowski wrote:
>
> > On 24/03/2026 11:00, Daniel Baluta wrote:
> > > On 3/24/26 11:26, Krzysztof Kozlowski wrote:
> > >> On Mon, Mar 23, 2026 at 07:08:09PM +0530, Gopi Krishna Menon wrote:
> > >>> Running DTBS checks on st/spear1340-evb.dtb results in the following
> > >>> warning:
> > >>>
> > >>> thermal@e07008c4 (st,thermal-spear1340): Unevaluated properties are not allowed ('thermal_flags' was unexpected)
> > >>> from schema $id: http://devicetree.org/schemas/thermal/st,thermal-spear1340.yaml
> > >> How is it possible if there is no such file?
> > >>
> > >> Did you just add new warning in patch #1 and then claim in patch #2 that
> > >> you fix it?
> > >>
> > >> You completely miss the point why this change is needed: how could the
> > >> DTS work before? It could not. And that should be your justification for
> > >> the patch, with explanation why it could not work.
> > >
> > > Correct me if I'm wrong but I think there was a hidden bug here
> > >
> > > drivers/thermal/spear_thermal.c:spear_thermal_probe:
> > >
> > > if (!np || !of_property_read_u32(np, "st,thermal-flags", &val)) {
> > > » » dev_err(&pdev->dev, "Failed: DT Pdata not passed\n");
> > > » » return -EINVAL;
> > > » }
> > >
> > > So, the driver was checking for the correct property as pointed by
> >
> > Yes
> >
> > >
> > > bindings/thermal/spear-thermal.txt but the dts was using the wrong
> >
> > No, DTS had two properties - correct one and incorrect.
> >
>
> Yup, spear13xx is included by spear1310.dtsi and spear1340.dtsi both of
> which have st,thermal-flags correctly defined. When working on this
> patch, after converting the binding, I ran dtbs check and upon seeing
> dtbs warning immediately fixed it thinking it was complaining because
> st,thermal-flags (thermal_flags) was written incorrectly. (Which is not
> incorrect as st,thermal-flags was there in the final node but there was one
I meant 'incorrect' here not 'not incorrect'
> additional property named thermal_flags as well which is not allowed as
> UnevaluatedProperty is set to false).
>
> Also I dont think we have to override the st,thermal-flags property in
> spear1310.dtsi as the flags value is same in spear13xx.dtsi and
> spear1310.dtsi (0x7000).
>
> > >
> > > property name: arch/arm/boot/dts/st/spear13xx.dtsi » » » thermal@e07008c4 { » » » » compatible = "st,thermal-spear1340"; » » » » reg = <0xe07008c4 0x4>; » » » » thermal_flags = <0x7000>; » » » }; And because this check is wrong:
> > >
> > > if (!np || !of_property_read_u32(np, "st,thermal-flags", &val)) {
> > >
> > > people really didn't notice it.
> > >
> > > The check should be:
> > >
> > > if (!np || of_property_read_u32(np, "st,thermal-flags", &val)) {
> > > » » dev_err(&pdev->dev, "Failed: DT Pdata not passed\n");
> > > » » return -EINVAL;
> > > » }
> > >
> > > So, this actual patch has uncovered a bug!
> >
> > Yes. Driver also has bug, so probably was never working. The point is
> > whatever commit is doing, the dtbs_check warning is not the
> > justification, because it was introduced by this patchset.
> >
>
> Please correct me if I am wrong Krzysztof but should i send a seperate patch
> fixing the thermal_flags property (Not connected to these converted
> bindings)?.
>
> Also, is it necessary to set additionalProperties to true? I am not able to
> figure out if that is needed.
>
> > Best regards,
> > Krzysztof
>
> Thanks,
> Gopi Krishna Menon
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] dt-bindings: thermal: st,thermal-spear1340: convert to dtschema
2026-03-24 9:30 ` Krzysztof Kozlowski
@ 2026-03-27 8:06 ` Krzysztof Kozlowski
0 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-27 8:06 UTC (permalink / raw)
To: Gopi Krishna Menon
Cc: rafael, daniel.lezcano, rui.zhang, lukasz.luba, robh, krzk+dt,
vireshk, conor+dt, linux-pm, devicetree, linux-kernel,
linux-arm-kernel, soc, daniel.baluta, simona.toaca, d-gole,
m-chawdhry
On 24/03/2026 10:30, Krzysztof Kozlowski wrote:
> On Mon, Mar 23, 2026 at 07:08:08PM +0530, Gopi Krishna Menon wrote:
>> +properties:
>> + compatible:
>> + const: st,thermal-spear1340
>> +
>> + reg:
>> + maxItems: 1
>> +
>> + st,thermal-flags:
>> + description: flags used to enable thermal sensor
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> +
>> +required:
>> + - compatible
>> + - reg
>> + - st,thermal-flags
>> +
>> +unevaluatedProperties: false
>
> additionalProperties: true
Thanks for pinging me on IRC about this - it should be:
additionalProperties: false
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2026-03-27 8:06 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-23 13:38 [PATCH 0/2] dt-bindings: thermal: st,thermal-spear1340: convert to dtschema Gopi Krishna Menon
2026-03-23 13:38 ` [PATCH 1/2] " Gopi Krishna Menon
2026-03-24 9:30 ` Krzysztof Kozlowski
2026-03-27 8:06 ` Krzysztof Kozlowski
2026-03-23 13:38 ` [PATCH 2/2] ARM: dts: st: spear: fix dtbs warning on spear thermal sensor Gopi Krishna Menon
2026-03-24 9:26 ` Krzysztof Kozlowski
2026-03-24 9:27 ` Krzysztof Kozlowski
2026-03-24 10:00 ` Daniel Baluta
2026-03-24 10:01 ` Krzysztof Kozlowski
2026-03-24 13:30 ` Gopi Krishna Menon
2026-03-24 13:34 ` Gopi Krishna Menon
2026-03-24 4:07 ` [PATCH 0/2] dt-bindings: thermal: st,thermal-spear1340: convert to dtschema Viresh Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox