diff mbox series

dt-bindings: watchdog: fsl-imx-wdt: Add missing 'big-endian' property

Message ID 20240806103819.10890-1-animeshagarwal28@gmail.com
State New
Headers show
Series dt-bindings: watchdog: fsl-imx-wdt: Add missing 'big-endian' property | expand

Commit Message

Animesh Agarwal Aug. 6, 2024, 10:38 a.m. UTC
Add missing big-endian property in watchdog/fsl-imx-wdt.yaml schema.
This fixes dtbs_check errors.

Cc: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>
---
There are 12 similar errors related to this missing property from
different blobs.

./arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dtb: watchdog@2ad0000:
Unevaluated properties are not allowed ('big-endian' was unexpected)from
schema $id: http://devicetree.org/schemas/watchdog/fsl-imx-wdt.yaml#
---
 Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.yaml | 2 ++
 1 file changed, 2 insertions(+)

Comments

Frank Li Aug. 14, 2024, 3:37 p.m. UTC | #1
On Tue, Aug 06, 2024 at 09:44:16AM -0700, Guenter Roeck wrote:
> On 8/6/24 08:49, Frank Li wrote:
> > On Tue, Aug 06, 2024 at 12:43:07PM +0200, Krzysztof Kozlowski wrote:
> > > On 06/08/2024 12:38, Animesh Agarwal wrote:
> > > > Add missing big-endian property in watchdog/fsl-imx-wdt.yaml schema.
> > > > This fixes dtbs_check errors.
> > > >
> > > > Cc: Daniel Baluta <daniel.baluta@nxp.com>
> > > > Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>
> > > > ---
> > > > There are 12 similar errors related to this missing property from
> > > > different blobs.
> > > >
> > > > ./arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dtb: watchdog@2ad0000:
> > > > Unevaluated properties are not allowed ('big-endian' was unexpected)from
> > > > schema $id: http://devicetree.org/schemas/watchdog/fsl-imx-wdt.yaml#
> > > > ---
> > >
> > > Not sure if this is correct. I mean, technically it is, but Frank Li was
> > > removing big-endian properties so please choose consistent approach.
> >
> > drivers/watchdog/imx2_wdt.c never parser big-endian. I suggest remove
> > big-endian in dts file. I suggest keep big-endian only if it really used.
> >

After Alexander Stein point out, check spec, and dump watch dog reset value
at ls1043a platform.

0x02A80000:  00 30 00 00 00 10 00 04 00 01 00 00 00 00 00 0

It is big-endian. imx2_wdt.c use regmap which call regmap_get_val_endian()
to handle endian.

So this change is corret.

Reviewed-by: Frank Li <Frank.Li@nxp.com>

>
> Agreed.
>
> Guenter
>
Fabio Estevam Aug. 14, 2024, 4:27 p.m. UTC | #2
On Wed, Aug 14, 2024 at 12:37 PM Frank Li <Frank.li@nxp.com> wrote:

> After Alexander Stein point out, check spec, and dump watch dog reset value
> at ls1043a platform.
>
> 0x02A80000:  00 30 00 00 00 10 00 04 00 01 00 00 00 00 00 0
>
> It is big-endian. imx2_wdt.c use regmap which call regmap_get_val_endian()
> to handle endian.
>
> So this change is corret.
>
> Reviewed-by: Frank Li <Frank.Li@nxp.com>

Shouldn't 'big-endian: true' be conditionally enabled only for the
Layerscape platforms?
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.yaml b/Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.yaml
index 36b836d0620c..24d47b1701a7 100644
--- a/Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.yaml
@@ -48,6 +48,8 @@  properties:
   clocks:
     maxItems: 1
 
+  big-endian: true
+
   fsl,ext-reset-output:
     $ref: /schemas/types.yaml#/definitions/flag
     description: |