Hi Geert, Am 04.11.24 um 17:56 schrieb Geert Uytterhoeven: > Hi Josua, > > On Wed, Oct 30, 2024 at 1:18 PM Josua Mayer <josua@xxxxxxxxxxxxx> wrote: >> Am 28.10.24 um 19:44 schrieb Vignesh Raghavendra: >>> On 28/10/24 22:49, Josua Mayer wrote: >>>> Am 28.10.24 um 16:31 schrieb Vignesh Raghavendra: >>>>> On 25/10/24 19:27, Geert Uytterhoeven wrote: >>>>>> On Mon, Feb 19, 2024 at 4:05 PM Josua Mayer <josua@xxxxxxxxxxxxx> wrote: >>>>>>> HummingBoard-T features two M.2 connectors labeled "M1" and "M2". >>>>>>> The single SerDes lane of the SoC can be routed to either M1 pci-e >>>>>>> signals, or M2 usb-3 signals by a gpio-controlled mux. >>>>>>> >>>>>>> Add overlays for each configuration. >>>>>>> >>>>>>> Signed-off-by: Josua Mayer <josua@xxxxxxxxxxxxx> >>>>>>> --- /dev/null >>>>>>> +++ b/arch/arm64/boot/dts/ti/k3-am642-hummingboard-t-usb3.dtso >>>>>>> +&usbss0 { >>>>>>> + /delete-property/ ti,usb2-only; >>>>>> /delete-property/ (and /delete-node/) to delete something in the base DTS >>>>>> does not work. >>>> My understanding is that flags are equivalent to boolean, i.e: >>>> >>>> ti,usb2-only = <true>; >>>> ti,usb2-only; >>>> >>>> are equivalent. >>>> >>>> If so, can we assign <false> within the overlay? >> Is there any chance of reassigning <false> and making an argument >> that this should be fixed? > In theory, it can be done, if (1) all code that checks boolean > properties would use of_property_read_bool() instead of > of_property_present(), and (2) of_property_read_bool() would be changed > to actually read the boolean value instead of just checking for the > presence of the property. And of course we have to do that in all > software that uses DT (i.e. not just Linux). > See [1][2][3] below for caveats. Thank you for all those pointers! > > Using a similar solution for /delete-node/ is more complex, but still > feasible, by setting its "status" property to "disabled" . I think > that can be made to work if all DT core code that looks up nodes would > just ignore any node that has a disabled status. Agreed! > I.e. callers would > no longer see disabled nodes at all. > >> I find it frustrating that overlays can't override boolean properties, >> and for consistency reasons I would otherwise change both >> pcie and usb3 overlays to standalone dts. > OK. Setting a property = "false" would be quite preferential in my opinion, over dropping the overlays. Unfortunately I am preoccupied, and can't submit tested patches within current merge window. I will draft a minimal untested patch, and submit it to the list, to get some comments. For next window I could prepare a tested version. > > [1] The example in Documentation/devicetree/bindings/sound/rt5651.txt has: > > realtek,dmic-en = "true"; > realtek,in2-diff = "false"; > > Obviously the second line doesn't really work with the current > code, but fortunately there are no actual users of that (in > upstream DTS). > Note: "realtek,in2-diff" is a typo for "realtek,in2-differential". > > [2] The example in Documentation/devicetree/bindings/sound/pcm3060.txt has: > > ti,out-single-ended = "true"; > > Again, this is an open invitation for replacing "true" by "false". > Fortunately there are no such users (in upstream DTS). > > [3] arch/arm/boot/dts/ti/omap/am335x-baltos.dtsi has: > > gpmc,device-nand = "true"; > > But "gpmc,device-nand" does not exist. Oh, it is under removal: > https://lore.kernel.org/all/20241009-gpmc-omap-dtbx-v2-2-fc68124a090a@xxxxxxxxxx/ > > > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds