[PATCH 18/18] arm64: apple: Add initial Mac Mini 2020 (M1) devicetree
Hector Martin
marcan at marcan.st
Wed Feb 10 06:43:37 EST 2021
On 10/02/2021 20.34, Tony Lindgren wrote:
> * Hector Martin <marcan at marcan.st> [210210 11:14]:
>> That means it'll end up like this (so that we can have more than one
>> fixed-clock):
>>
>> clocks {
>> #address-cells = <1>;
>> #size-cells = <0>;
>>
>> clk123: clock at 0 {
>> ...
>> reg = <0>
>> }
>>
>> clk456: clock at 1 {
>> ...
>> reg = <1>
>> }
>> }
>>
>> Correct?
>
> Yeah, just don't use an imaginary dummy index for the reg. Use a real
> register offset from a clock controller instance base, and a register
> bit offset too if needed.
I mean for fixed input clocks without any particular numbering, or for
temporary fake clocks while we figure out the clock controller. Once a
real clock controller is involved, if there are hardware indexes
involved that are consistent then of course I'll use those in some way
that makes sense.
The purpose of the clock in this particular case is just to make the
uart driver work, since it wants to know its reference clock; there is
work to be done here to figure out the real clock tree (e.g. we don't
even know yet if the uart supports alternate clocks, that's tricky to
test until we have some form of I/O other than uart!).
> Doing it right will save you tons of time later on ;)
Absolutely, I'm just pointing out that instances of it being done right
are in short supply right now :-) (which makes it tricky for people like
me, trying to put this together for a new soc, to guess what the right
approach is by looking at existing examples)
--
Hector Martin (marcan at marcan.st)
Public Key: https://mrcn.st/pub
More information about the linux-arm-kernel
mailing list