Re: [PATCH 1/2] dt-bindings: watchdog: Add NXP Software Watchdog Timer

From: Daniel Lezcano
Date: Tue Apr 01 2025 - 04:46:32 EST


On 31/03/2025 13:42, Krzysztof Kozlowski wrote:
On 31/03/2025 09:57, Daniel Lezcano wrote:
On 29/03/2025 06:04, Krzysztof Kozlowski wrote:
On 28/03/2025 16:15, Daniel Lezcano wrote:
+description:
+ The System Timer Module supports commonly required system and
+ application software timing functions. STM includes a 32-bit
+ count-up timer and four 32-bit compare channels with a separate
+ interrupt source for each channel. The timer is driven by the STM
+
+allOf:
+ - $ref: watchdog.yaml#
+
+properties:
+ compatible:
+ enum:
+ - nxp,s32g-wdt
This wasn't tested, so limited review - this also has wrong compatible,
There is no such soc as s32g in the kernel. If that's a new soc, come
with proper top-level bindings and some explanation, because I am sure
previously we talked with NXP that this is not s32g but something else.

If I refer to Documentation/devicetree/bindings/arm/fsl.yaml

We found the entries:

- description: S32G2 based Boards
items:
- enum:
- nxp,s32g274a-evb
- nxp,s32g274a-rdb2
- const: nxp,s32g2

- description: S32G3 based Boards
items:
- enum:
- nxp,s32g399a-rdb3
- const: nxp,s32g3

I guess it should nxp,s32g2-wdt and nxp,s32g3-wdt

Yes, with one being the fallback.

Like that ?

properties:
compatible:
oneOf:
- const: nxp,s32g2-wdt
- items:
- const: nxp,s32g3-wdt
- const: nxp,s32g2-wdt

Why a fallback is needed for this case ? It is exactly the same hardware for s32g2 and s32g3. Could it be:

properties:
compatible:
oneOf:
- const: nxp,s32g2-wdt
- const: nxp,s32g3-wdt

?

--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog