Aw: Re: Re: [PATCH 4/4] phy: Realtek Otto Serdes: add devicetree documentation

Krzysztof Kozlowski krzk at kernel.org
Sun Oct 6 03:45:11 PDT 2024


On 06/10/2024 11:54, Markus Stockhausen wrote:
>> Gesendet: Sonntag, 06. Oktober 2024 um 10:18 Uhr
>> Von: "Krzysztof Kozlowski" <krzk at kernel.org>
>> An: "Markus Stockhausen" <Markus.Stockhausen at gmx.de>
>> Cc: linux-phy at lists.infradead.org, chris.packham at alliedtelesis.co.nz
>> Betreff: Re: Aw: Re: [PATCH 4/4] phy: Realtek Otto Serdes: add devicetree documentation
>> On 05/10/2024 12:28, Markus Stockhausen wrote:
>>>> ...
>>>> + cmd-setup:
>>>> + description: |
>>>> + A field of 16 bit values that contain a patch/command sequence to run on the
>>>> + SerDes registers during driver setup.
>>>
>>> None of these fields match DT. Drop all of driver related stuff.
>>
>> Hm, what would be the best way to run magic vendor patch sequences that setup
>> registers and do not pollute driver?
>>
>> These belong to driver. What do you mean "pollute"? The driver is the
>> place for these, not DT!
> 
> Understood. So if I cerate another include - let's say "phy-rtl-otto-serdes-seq" - that
> looks something like the following would be ok? Even with a lot of "magic" inside?
> 
> struct rtsds_sequence rtsds_839x_cmd_init = {
> 	{ _MASK_, 0x00, 0x08, 0x00, 0x5800, 0xffff },
> 	{ _MASK_, 0x00, 0x08, 0x01, 0x4000, 0xffff },
> 	{ _MASK_, 0x00, 0x08, 0x02, 0x5400, 0xffff },
> 	{ _MASK_, 0x00, 0x08, 0x03, 0x0000, 0xffff },
> 	{ _MASK_, 0x00, 0x08, 0x06, 0x4000, 0xffff },
>  	...
> };

You should not have data definitions in the headers. Look at other phys,
look at I2C camera sensors how they do it.

Best regards,
Krzysztof




More information about the linux-phy mailing list