Re: Phandles

Krzysztof Kozlowski <[email protected]> Mon, 13 Apr 2026 11:16:08 +0200
Newsgroups org.kernel.vger.devicetree-compiler,org.kernel.vger.linux-devicetree
Message-ID <[email protected]>
On 13/04/2026 10:40, Kyle Bonnici wrote:
> 
>> Please wrap your email responses to mailing list style.
> 
> Hope I got this part right in this email!
> 
>> To repeat my question:
>> What does '1' stand for?
> 
> ‘1' was just an random value to show the issue. Please note that 
> this issue has more context. This can all be found tin the Zephyr issue 

You cannot have random values. I quoted the DT spec.

> https://github.com/zephyrproject-rtos/zephyr/issues/107066 
> And also on the discord link.

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.

> 
> To summarize, In zephyr the dts is pickled to a header file on
> compile. Zephyr build system uses the bindings to determine types.
> Any property with no type will not be pickled. 

I know, but this is not what you asked, right?

You asked why phandle has to be the first entry in phandle-value type? I
responded that DT spec makes it.

Now to determine that DTC is correct or not correct, we need to
understand what "1" means in this context - is it a valid phandle value?

> 
> `/zephyr,user` node is a convenience node that does not need a binding
> And types are inferred from values not property names.
> 
> The reported issues:
> - Zephyr is inferring a type but the DTC compiler is inferring another
> type and reporting w waring about it in the build output

Are you reporting bug in Zephyr or DTC?

> - Zephyr does not infer types for properties with no bindings, hence 
> If any of mention properties are used and node has no binding for
> that property name, zephyr will ignore this, but the DTC reports a
> warning that contradics Zephyr's implementation.

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.

Best regards,
Krzysztof