Re: Phandles
Krzysztof Kozlowski <[email protected]> Mon, 13 Apr 2026 09:55:19 +0200
| Newsgroups | org.kernel.vger.devicetree-compiler,org.kernel.vger.linux-devicetree |
|---|---|
| Message-ID | <[email protected]> |
On 13/04/2026 09:10, Kyle Bonnici wrote: > > >> On 13 Apr 2026, at 08:37, Krzysztof Kozlowski <[email protected]> wrote: >> >> On 12/04/2026 18:37, Kyle Bonnici wrote: >>>>>> Case 1: >>>>>> / { >>>>>> node1 { >>>>>> pwms = <1 &pwm0 1 20 PWM_POLARITY_NORMAL>; >>>>>> >>>>>> Here the first cell '1' is not a phandle. >>>>> >>>>> Here the compiler is making an assumption here that all `pwms` properties must be specifier properties and all use `pwm` specifier. >>>> >>>> I think the purpose of 'select: true' is to have the binding always applied: >>>> https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/pwm/pwm-consumer.yaml#L15 >>>> >>> >>> >>> I’m having trouble finding where the Devicetree Specification (v0.4) mandates that all binding systems must extend dt-schema. >>> Since this requirement isn't explicitly in the spec, it follows that the WARNING_PROPERTY_PHANDLE_CELLS validation belongs in dt-validate rather than within dtc itself. >> >> >> So you want to have a property with values not being phandle? The spec >> defines that properties like "pwm" must contain "value of properties >> with a phandle value type". Therefore what does '1' represents in your >> example? > > I am just building and maintaining an LSP to assists Zephyr and Linux developers alike and what is technically > allowed in Zephyr is not allowed in Linux. The issue here is that DTC is warning zephyr users about it. Please wrap your email responses to mailing list style. > I also find my self in the wrong to enforce these types for Zephyr dts usage given all documentation I have seen > so far. To repeat my question: What does '1' stand for? Best regards, Krzysztof