Re: [PATCH v2 3/6] arm64: dts: imx8mm-venice-gw7901: add #address(size)-cells for gsc@20

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 5, 2024 at 12:17 PM Frank Li <Frank.li@xxxxxxx> wrote:
>
> On Thu, Sep 05, 2024 at 11:56:41AM -0700, Tim Harvey wrote:
> > On Wed, Aug 7, 2024 at 7:54 AM Frank Li <Frank.Li@xxxxxxx> wrote:
> > >
> > > Add #address-cells and #size-cells for gsc@20 to fix below warning:
> > > arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dtb: gsc@20: '#address-cells' is a required propert
> > >
> > > Signed-off-by: Frank Li <Frank.Li@xxxxxxx>
> > > ---
> > >  arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dts | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dts b/arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dts
> > > index 136cb30df03a6..35ae0faa815bc 100644
> > > --- a/arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dts
> > > +++ b/arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dts
> > > @@ -364,6 +364,8 @@ gsc: gsc@20 {
> > >                 interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
> > >                 interrupt-controller;
> > >                 #interrupt-cells = <1>;
> > > +               #address-cells = <1>;
> > > +               #size-cells = <0>;
> > >
> > >                 adc {
> > >                         compatible = "gw,gsc-adc";
> > >
> > > --
> > > 2.34.1
> > >
> > >
> >
> > Hi Frank,
> >
> > I just noticed this patch (along with a few others to
> > imx8m*venice*dts* which undoes what was done in commit 3343ab4cc698
> > "arm64: dts: freescale: imx8m*-venice-*: fix gw,gsc dt-schema
> > warnings" which my commit message states: Fix the dt-schema warnings
> > due to #address-cells/#size-cells being unnecessary when there are no
> > children with reg cells.
> >
> > With your patch applied I now see warnings again:
> > $ touch arch/arm64/boot/dts/freescale/imx8m*venice*.dts*; make dtbs W=1
> >   DTC     arch/arm64/boot/dts/freescale/imx8mm-venice-gw71xx-0x.dtb
> >   DTC     arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx-0x.dtb
> >   DTC     arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx-0x.dtb
> >   DTC     arch/arm64/boot/dts/freescale/imx8mm-venice-gw75xx-0x.dtb
> >   DTC     arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dtb
> > arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dts:361.14-467.4:
> > Warning (avoid_unnecessary_addr_size): /soc@0/bus@30800000/i2c@3
> > 0a20000/gsc@20: unnecessary #address-cells/#size-cells without
> > "ranges", "dma-ranges" or child "reg" property
>
> make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8 CHECK_DTBS=y freescale/imx8mm-venice-gw7901.dtb
> No warning report at my side.
>
> Did you update your dt schema?
>
> pip3 install git+https://github.com/devicetree-org/dt-schema.git@main
>

Frank,

Yes, I've updated my dt-schema with the above command.

So with your patch a make CHECK_DTBS=y produces no warnings but a make W=1 does:
$ touch arch/arm64/boot/dts/freescale/imx8m*venice*.dts*; make
ARCH=arm64 CROSS_COMPILE=aar
ch64-linux-gnu- -j8 CHECK_DTBS=y freescale/imx8mm-venice-gw7901.dtb
  SYNC    include/config/auto.conf.cmd
  SCHEMA  Documentation/devicetree/bindings/processed-schema.json
/usr/src/venice/linux-next/Documentation/devicetree/bindings/input/touchscreen/ti,tsc2005.yaml:
ti,x-plate-ohms: missing type definit
ion
  DTC_CHK arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dtb
$ touch arch/arm64/boot/dts/freescale/imx8m*venice*.dts*; make
ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8 W=1
freescale/imx8mm-venice-gw7901.dtb
  DTC     arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dtb
arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dts:361.14-467.4:
Warning (avoid_unnecessary_addr_size): /soc@0/bus@30800000/i2c@3
0a20000/gsc@20: unnecessary #address-cells/#size-cells without
"ranges", "dma-ranges" or child "reg" property

reverting your patch flips this around:
$ git revert c59339ec2661
$ touch arch/arm64/boot/dts/freescale/imx8m*venice*.dts*; make
ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8 W=1
freescale/imx8mm-venice-gw7901.dtb
  UPD     include/config/kernel.release
  DTC     arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dtb
tharvey@tharvey:/usr/src/venice/linux-next$ touch
arch/arm64/boot/dts/freescale/imx8m*venice*.dts*; make ARCH=arm64
CROSS_COMPILE=aarch64-linux-gnu- -j8 CHECK_DTBS=y
freescale/imx8mm-venice-gw7901.dtb
  DTC_CHK arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dtb
/usr/src/venice/linux-next/arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dtb:
gsc@20: '#address-cells' is a required property
        from schema $id: http://devicetree.org/schemas/mfd/gateworks-gsc.yaml#
/usr/src/venice/linux-next/arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dtb:
gsc@20: '#size-cells' is a required property
        from schema $id: http://devicetree.org/schemas/mfd/gateworks-gsc.yaml#
tharvey@tharvey:/usr/src/venice/linux-next$ touch
arch/arm64/boot/dts/freescale/imx8m*venice*.dts*; make ARCH=arm64
CROSS_COMPILE=aarch64-linux-gnu- -j8 W=1
freescale/imx8mm-venice-gw7901.dtb
  DTC     arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dtb

Maybe the dt experts can tell us what the difference is with
CHECK_DTBS=y vs W=1 and which patch is correct between
c59339ec2661 arm64: dts: imx8mm-venice-gw7901: add
#address(size)-cells for gsc@20
3343ab4cc698 arm64: dts: freescale: imx8m*-venice-*: fix gw,gsc
dt-schema warnings

Best Regards,

Tim





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux