On Mon, Dec 11, 2023 at 01:59:43PM +0100, Geert Uytterhoeven wrote: > Hi Rob, > > When running "make dtbs_check" on a DTB in the Renesas BSP, I ran into > the following backtrace: > > Traceback (most recent call last): > File "dt-validate", line 8, in <module> > sys.exit(main()) > File "dt-schema/dtschema/dtb_validate.py", line 144, in main > sg.check_dtb(filename) > File "dt-schema/dtschema/dtb_validate.py", line 87, in check_dtb > dt = self.validator.decode_dtb(f.read()) > File "dt-schema/dtschema/validator.py", line 491, in decode_dtb > return [dtschema.dtb.fdt_unflatten(self, dtb)] > File "dt-schema/dtschema/dtb.py", line 483, in fdt_unflatten > fixup_gpios(dt) > File "dt-schema/dtschema/dtb.py", line 373, in fixup_gpios > fixup_gpios(v) > File "dt-schema/dtschema/dtb.py", line 373, in fixup_gpios > fixup_gpios(v) > File "dt-schema/dtschema/dtb.py", line 373, in fixup_gpios > fixup_gpios(v) > File "dt-schema/dtschema/dtb.py", line 378, in fixup_gpios > val = v[0] > TypeError: 'bool' object is not subscriptable > > Turns out the issue is triggered by the presence of a (non-documented) > boolean "no-use-gpio" property. > > Apparently anything that matches "*-gpio" is treated as having a list of > GPIO specifiers, causing a crash if that does not turn out to be true... > While the introduction of a "no-use-gpio" boolean property might not > survive public review, it would be good if the tooling wouldn't crash > on it. Seems like good discouragement on using unreviewed properties. ;) I'll make a fix. In the future, use anything but devicetree@vger for this kind of issue. GH issue, devicetree-spec@vger, IRC are easier for me to see. Rob