From: Krzysztof Kozlowski <krzk@kernel.org>
To: Kyle Bonnici <kylebonnici@hotmail.com>
Cc: Herve Codina <herve.codina@bootlin.com>,
"devicetree-compiler@vger.kernel.org"
<devicetree-compiler@vger.kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: Phandles
Date: Mon, 13 Apr 2026 11:57:53 +0200 [thread overview]
Message-ID: <c0b93231-9337-42f9-83c3-e657e5f017ec@kernel.org> (raw)
In-Reply-To: <DB5F7CA0-08E8-4CF5-9815-598002AF471F@hotmail.com>
On 13/04/2026 11:50, Kyle Bonnici wrote:
>
>> You cannot have random values. I quoted the DT spec.
>
> Where in the DTS 0.4 spec are property names such as pwms, clocks
> etc… mandated to be of format <phandle cell …>?
Ah, true, this is not expressed but DT spec defines types for only a few
cases.
>
>> Well, we don't use discord but IRC... but that github issue also uses
>> "pwms = <1 &pwm0 1 20 PWM_POLARITY_NORMAL>;"
>>
>> So again - what is "1"?
>>
>> I am asking because if you use incorrect value as phandle value, then
>> DTC warning is obviously expected and nothing to fix here.
>
> The warning is only valid if ‘1’ is expected to be a phandle which is what I am
> Arguing the spec does not mandate this.
The "&foo" used in the property defines that it is phandle, no?
>
>> You asked why phandle has to be the first entry in phandle-value type? I
>> responded that DT spec makes it.
>
> Which section in DTS 0.4 spec?
2.2.4.2. Property Values
"That number is used for the value of properties with a phandle value type.
The properties having phandle value must have proper, well, value :)
>
>> We discuss DTC here, yes? Whether it has or has not a bug? Please help
>> me to understand the topic. Why would we care about Zephyr's
>> implementation? It's Zephyr's problem and I am not a Zephyr developer. I
>> am not saying that it is not important, just saying that I am not the
>> audience to discuss it.
>
> I am arguing that the DTC Spec 0.4 does NOT mandate any of these any of these
> “cooling_device”, “dmas”, “hwlocks”, “io_channels”, “iommus”, “mboxes”,
> “msi_parent”, “mux_controls”, “phys”, “power_domains”, “pwms”, “resets”,
> “clocks”, “sound_dai” and “thermal_sensors”
> must follow <phandle cell …>.
>
> This is only mandated by the dt-schema as far as I understand, that is a used by
> Linux, but not Zephyr and the DTC Making the assumption that this is true for
> all systems
No, dtschema is irrelevant here and DTC was validating it since 2017, so
years before dtschema.
DT spec indeed does not mandate it as pwms, but replacing that check in
DTC with something only validating phandles would not solve your
problem. Your 'pwm' is a phandle-value type, because you use phandle
there, and still is has wrong value.
Best regards,
Krzysztof
next prev parent reply other threads:[~2026-04-13 9:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <BB363BC4-B813-4D03-8737-587DF7425908@hotmail.com>
[not found] ` <20260412145144.4737fde6@bootlin.com>
[not found] ` <D22046DB-95B3-431E-8E80-0BA806811D01@hotmail.com>
2026-04-12 15:40 ` Phandles Herve Codina
2026-04-12 16:37 ` Phandles Kyle Bonnici
2026-04-13 6:37 ` Phandles Krzysztof Kozlowski
2026-04-13 7:10 ` Phandles Kyle Bonnici
2026-04-13 7:55 ` Phandles Krzysztof Kozlowski
2026-04-13 8:40 ` Phandles Kyle Bonnici
2026-04-13 9:16 ` Phandles Krzysztof Kozlowski
2026-04-13 9:50 ` Phandles Kyle Bonnici
2026-04-13 9:57 ` Krzysztof Kozlowski [this message]
2026-04-13 20:25 ` Phandles Kyle Bonnici
2026-04-14 15:24 ` Phandles Rob Herring
2026-04-14 19:31 ` Phandles Kyle Bonnici
2026-04-13 6:33 ` Phandles Krzysztof Kozlowski
2026-04-13 10:30 ` Phandles Herve Codina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c0b93231-9337-42f9-83c3-e657e5f017ec@kernel.org \
--to=krzk@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree-compiler@vger.kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=herve.codina@bootlin.com \
--cc=krzk+dt@kernel.org \
--cc=kylebonnici@hotmail.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox