Re: [PATCH v2 2/3] arm64: dts: qcom: Add base QDU1000/QRU1000 DTSIs
From: Melody Olvera
Date: Thu Oct 20 2022 - 14:55:21 EST
On 10/20/2022 10:59 AM, Krzysztof Kozlowski wrote:
> On 20/10/2022 13:18, Stephan Gerhold wrote:
>>> No, it puts attention to the board designer that he needs to provide the
>>> clock in his design.
>>>
>>> We had such talks about other platforms, although I do not have any
>>> recent bookmarks. Something older:
>>>
>>> https://lore.kernel.org/all/3382034.5ADO0F7naY@wuerfel/
>>>
>>> https://lore.kernel.org/linux-samsung-soc/53DAB0A6.9030700@xxxxxxxxx/
>>>
>> If I understand you correctly your argument for having the clock in the
>> board DTS instead of the SoC DTSI is:
>>
>> The SoC DTSI describes the components of the SoC, while the board DTS
>> describes the components of the board (built around the SoC). The clock
>> is part of the board (and not the SoC) and therefore belongs into the
>> board DTS and not the SoC DTSI. Having the SoC/board components clearly
>> separated ensures people writing new board DTS pay attention to
>> everything board-specific.
>>
>> Correct? This sounds reasonable to me.
> Yes.
>
>> However, the main question of my previous mail was: Why do you
>> alternatively recommend to keep the clock defined in the SoC DTSI and to
>> just put the clock-frequency into the board DTS? This sounds like a
>> contradiction of the above to me: the clock is still (partially)
>> described as part of the SoC, even though it belongs to the board.
> The proposal is a trade-off, compromise between code duplication and
> above recommendation of splitting SoC <-> board.
>
> As you said, all boards will provide this clock, so it is reasonable to
> put some pieces of it in the SoC DTSI to avoid duplication. But the
> final piece - what clock is there exactly (model, frequency etc) should
> be put in board DTS to clarify that this comes with board.
>
>> Someone writing a board DTS should not just put attention to the
>> clock-frequency, but also if they have a single fixed-clock or
>> maybe some kind of clock-fixed-factor setup, as I wrote.
> True. If such setup is probably, then my recommendation would be to put
> entire clock to the board.
Going through this thread, this seems to be the conclusion. Will all clock nodes to the
DTS files.
>
> Just note, that even in proposed frequency->board DTS, it is still
> possible to use the clock-fixed-factor.
>
>
Thanks,
Melody