On 24/03/2025 00:53, Caleb James DeLisle wrote:I mean I don't know, the person writing the DTS for that SoC needs to know.
YesJust don't use generic fallback.I have so far been unable to find good documentation on writing DT bindings+ compatible:Soc components must have soc-based compatible and then filename matching
+ const: econet,timer-hpt
whatever you use as fallback.
specifically for SoC devices. If you have anything to point me to, I will read it.
If not, even a good example of someone else doing it right is helpful.
Currently, I see qcom,pdc.yaml appears to do what you say, so I in absence
of any other advice, I can try to do what they do.
Ok I watched your "Accepted in Less Than 10 Iterations" lecture (I'm doing my
homework). If I understand this correctly, you prefer that I use something specific
like econet,en751221-timer as the fallback case, so for example on EN751627,
it would be:
compatible = "econet,en751627-timer", "econet,en751221-timer";
The reason why I didn't do this is because this timer seems to show up in a lot ofJust like every other SoC component for every other SoC.
places. Vendor code says that it's older than EN751221, and (if my reading is
correct) it has found it's way into chips branded TrendChip, MediaTek and RalinkAbove do not differ...
as well as EcoNet.
Now that I'll be adding strict checks on the number of register blocks, this way
also has the advantage of allowing a case for users of the timer in SoCs we don't
know about:
// Only valid with 2 register blocks
compatible = "econet,en751627-timer", "econet,timer-hpt";
// Only valid with 1 register block
compatible = "econet,en751612-timer", "econet,timer-hpt";
// No restriction because we don't know how many timers the SoC hasHow can you not know? This is strictly defined on given hardware.
compatible = "econet,timer-hpt";