Instead of having an optional rockchip,grf property, forbid using it on
platforms without registers in a GRF being needed for thermal monitoring
and make it mandatory on the platforms actually needing it.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
.../devicetree/bindings/thermal/rockchip-thermal.yaml | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml b/Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml
index 573f447cc26ed7100638277598b0e745d436fd01..9fa5c4c49d76e3a689f31797875124e7fb30d3df 100644
--- a/Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml
+++ b/Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml
@@ -119,6 +119,21 @@ required:
- resets
allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - rockchip,px30-tsadc
+ - rockchip,rk3366-tsadc
+ - rockchip,rk3399-tsadc
+ - rockchip,rk3568-tsadc
+ then:
+ required:
+ - rockchip,grf
+ else:
+ properties:
+ rockchip,grf: false
- if:
not:
properties:
--
2.50.1
Hello Sebastian, On 2025-08-20 19:40, Sebastian Reichel wrote: > Instead of having an optional rockchip,grf property, forbid using it on > platforms without registers in a GRF being needed for thermal > monitoring > and make it mandatory on the platforms actually needing it. > > Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> > --- > .../devicetree/bindings/thermal/rockchip-thermal.yaml | 15 > +++++++++++++++ > 1 file changed, 15 insertions(+) Thanks for the patch! It matches what's already presented in your patch 2/3, so it's looking good to me. Please feel free to include Reviewed-by: Dragan Simic <dsimic@manjaro.org> > diff --git > a/Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml > b/Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml > index > 573f447cc26ed7100638277598b0e745d436fd01..9fa5c4c49d76e3a689f31797875124e7fb30d3df > 100644 > --- a/Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml > +++ b/Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml > @@ -119,6 +119,21 @@ required: > - resets > > allOf: > + - if: > + properties: > + compatible: > + contains: > + enum: > + - rockchip,px30-tsadc > + - rockchip,rk3366-tsadc > + - rockchip,rk3399-tsadc > + - rockchip,rk3568-tsadc > + then: > + required: > + - rockchip,grf > + else: > + properties: > + rockchip,grf: false > - if: > not: > properties:
On Wed, Aug 20, 2025 at 07:40:49PM +0200, Sebastian Reichel wrote: > Instead of having an optional rockchip,grf property, forbid using it on > platforms without registers in a GRF being needed for thermal monitoring > and make it mandatory on the platforms actually needing it. I am assuming that "needing it" means that it was actually mandatory but the binding was just missing the required required entry. If so Acked-by: Conor Dooley <conor.dooley@microchip.com> > > Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> > --- > .../devicetree/bindings/thermal/rockchip-thermal.yaml | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml b/Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml > index 573f447cc26ed7100638277598b0e745d436fd01..9fa5c4c49d76e3a689f31797875124e7fb30d3df 100644 > --- a/Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml > +++ b/Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml > @@ -119,6 +119,21 @@ required: > - resets > > allOf: > + - if: > + properties: > + compatible: > + contains: > + enum: > + - rockchip,px30-tsadc > + - rockchip,rk3366-tsadc > + - rockchip,rk3399-tsadc > + - rockchip,rk3568-tsadc > + then: > + required: > + - rockchip,grf > + else: > + properties: > + rockchip,grf: false > - if: > not: > properties: > > -- > 2.50.1 >
Hi, On Wed, Aug 20, 2025 at 08:48:23PM +0100, Conor Dooley wrote: > On Wed, Aug 20, 2025 at 07:40:49PM +0200, Sebastian Reichel wrote: > > Instead of having an optional rockchip,grf property, forbid using it on > > platforms without registers in a GRF being needed for thermal monitoring > > and make it mandatory on the platforms actually needing it. > > I am assuming that "needing it" means that it was actually mandatory but > the binding was just missing the required required entry. If so > Acked-by: Conor Dooley <conor.dooley@microchip.com> I just noticed, that I never replied: The GRF configuration is required for proper functionality as far as I can tell. Technically it might be skipped, if the bootloader already configured the registers correctly. but I don't think this is something anyone wants to rely on and with the same argument we could describe almost any resource as optional :) The upstream kernel DT always had the GRF specified for these platforms (and thus most likely has never been tested without it). Greetings, -- Sebastian > > > > > Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> > > --- > > .../devicetree/bindings/thermal/rockchip-thermal.yaml | 15 +++++++++++++++ > > 1 file changed, 15 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml b/Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml > > index 573f447cc26ed7100638277598b0e745d436fd01..9fa5c4c49d76e3a689f31797875124e7fb30d3df 100644 > > --- a/Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml > > +++ b/Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml > > @@ -119,6 +119,21 @@ required: > > - resets > > > > allOf: > > + - if: > > + properties: > > + compatible: > > + contains: > > + enum: > > + - rockchip,px30-tsadc > > + - rockchip,rk3366-tsadc > > + - rockchip,rk3399-tsadc > > + - rockchip,rk3568-tsadc > > + then: > > + required: > > + - rockchip,grf > > + else: > > + properties: > > + rockchip,grf: false > > - if: > > not: > > properties: > > > > -- > > 2.50.1 > >
On Fri, Sep 19, 2025 at 08:35:12PM +0200, Sebastian Reichel wrote: > Hi, > > On Wed, Aug 20, 2025 at 08:48:23PM +0100, Conor Dooley wrote: > > On Wed, Aug 20, 2025 at 07:40:49PM +0200, Sebastian Reichel wrote: > > > Instead of having an optional rockchip,grf property, forbid using it on > > > platforms without registers in a GRF being needed for thermal monitoring > > > and make it mandatory on the platforms actually needing it. > > > > I am assuming that "needing it" means that it was actually mandatory but > > the binding was just missing the required required entry. If so > > Acked-by: Conor Dooley <conor.dooley@microchip.com> > > I just noticed, that I never replied: The GRF configuration is > required for proper functionality as far as I can tell. Technically > it might be skipped, if the bootloader already configured the > registers correctly. but I don't think this is something anyone wants > to rely on and with the same argument we could describe almost any > resource as optional :) The upstream kernel DT always had the GRF > specified for these platforms (and thus most likely has never been > tested without it). Acked-by: Conor Dooley <conor.dooley@microchip.com> (ik I gave it already, but for clarity)
© 2016 - 2025 Red Hat, Inc.