Re: [PATCH v3 02/13] spi: dt-bindings: cdns,qspi-nor: add PHY tuning pattern partition property
From: Krzysztof Kozlowski
Date: Mon Jun 01 2026 - 07:27:33 EST
On 01/06/2026 10:26, Santhosh Kumar K wrote:
> Hello Krzysztof,
>
> On 30/05/26 14:22, Krzysztof Kozlowski wrote:
>> On Wed, May 27, 2026 at 11:25:16PM +0530, Santhosh Kumar K wrote:
>>> PHY tuning requires a known data pattern to be readable from flash.
>>> When no partition is explicitly identified, the controller must search
>>> all available partitions to locate the pattern by label, which adds
>>> overhead and relies on label naming conventions outside the
>>> controller's control.
>>>
>>> Add cdns,phy-pattern-partition, a phandle property that allows the DT
>>> author to directly reference the flash partition holding the PHY tuning
>>> pattern. The controller uses this partition during calibration, avoiding
>>> the partition search entirely.
>>>
>>> Signed-off-by: Santhosh Kumar K <s-k6@xxxxxx>
>>> ---
>>> .../bindings/spi/cdns,qspi-nor-peripheral-props.yaml | 8 ++++++++
>>> 1 file changed, 8 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/spi/cdns,qspi-nor-peripheral-props.yaml b/Documentation/devicetree/bindings/spi/cdns,qspi-nor-peripheral-props.yaml
>>> index 510b82c177c0..0ffcdf5b00d0 100644
>>> --- a/Documentation/devicetree/bindings/spi/cdns,qspi-nor-peripheral-props.yaml
>>> +++ b/Documentation/devicetree/bindings/spi/cdns,qspi-nor-peripheral-props.yaml
>>> @@ -39,4 +39,12 @@ properties:
>>> Delay in nanoseconds between setting qspi_n_ss_out low and
>>> first bit transfer.
>>>
>>> + cdns,phy-pattern-partition:
>>> + $ref: /schemas/types.yaml#/definitions/phandle
>>> + description:
>>> + Phandle to the flash partition containing the PHY tuning pattern.
>>> + When present, the controller uses this partition to locate the
>>> + pattern data during PHY tuning instead of searching all partitions
>>> + by label.
>>> +
>>
>> This should be used in any of applicable examples.
>
> Please refer to the DT changes included in the repository linked in the
> cover letter, which should provide a clearer picture of how this
> property is intended to be used. [0]
>
> I'll also add a DT binding example in the next version to make the usage
> more explicit.
Why do you new a new example? Why existing examples are not applicable?
>
>>
>> I also have doubts that this is per-device property. Your commit msg
>> suggests it is per controller.
>
> This is a per-device property. It is consumed by the controller driver
> only to locate and retrieve the offset of the PHY pattern partition
So with two devices on a bus, you need two separate partitions for tuning?
Best regards,
Krzysztof