[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdWY0J7uooeRbUGwjkeCLd2UVyN9dtDWUkg5pJ3sAULdsQ@mail.gmail.com>
Date: Mon, 4 Nov 2024 16:56:14 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Josua Mayer <josua@...id-run.com>
Cc: Vignesh Raghavendra <vigneshr@...com>, Nishanth Menon <nm@...com>, Tero Kristo <kristo@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Conor Dooley <conor+dt@...nel.org>,
Yazan Shhady <yazan.shhady@...id-run.com>,
"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v7 4/4] arm64: dts: ti: hummingboard-t: add overlays for
m.2 pci-e and usb-3
Hi Josua,
On Wed, Oct 30, 2024 at 1:18 PM Josua Mayer <josua@...id-run.com> 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@...id-run.com> 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@...id-run.com>
> >>>>> --- /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.
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. 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.
[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@kernel.org/
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
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
Powered by blists - more mailing lists