From: Krzysztof Kozlowski <krzk@kernel.org>
To: Caleb James DeLisle <cjd@cjdns.fr>, linux-mips@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
benjamin.larsson@genexis.eu
Subject: Re: [PATCH v1 4/8] dt-bindings: timer: Add EcoNet HPT CPU Timer
Date: Mon, 24 Mar 2025 08:13:41 +0100 [thread overview]
Message-ID: <b3fea7b9-b7ea-4987-9fe7-b0adb9346f07@kernel.org> (raw)
In-Reply-To: <d419bcd2-fa78-4390-88b0-64ed54b87081@cjdns.fr>
On 24/03/2025 00:53, Caleb James DeLisle wrote:
>>>>> + compatible:
>>>>> + const: econet,timer-hpt
>>>> Soc components must have soc-based compatible and then filename matching
>>>> whatever you use as fallback.
>>> I have so far been unable to find good documentation on writing DT bindings
>>> 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.
>> Just don't use generic fallback.
>
>
> 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";
Yes
>
> The reason why I didn't do this is because this timer seems to show up in a lot of
> places. Vendor code says that it's older than EN751221, and (if my reading is
Just like every other SoC component for every other SoC.
> correct) it has found it's way into chips branded TrendChip, MediaTek and Ralink
> 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";
Above do not differ...
>
> // No restriction because we don't know how many timers the SoC has
> compatible = "econet,timer-hpt";
How can you not know? This is strictly defined on given hardware.
>
>
> That said, I'm fine to do it however you want as long as I'm clear on what you're
> asking for and you have all of the context behind my original decision.
Generic compatible as fallback is accepted if you have evidence that it
is the same IP, with same programming interface, across all these SoCs.
Or if its version is discoverable. If you do not know about other SoC
implementations it is rather a proof that above statement cannot be
fulfilled - you just don't know how it is implemented.
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-03-24 7:13 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-21 13:46 [PATCH v1 0/8] Add EcoNet EN751221 MIPS platform support Caleb James DeLisle
2025-03-21 13:46 ` [PATCH v1 1/8] dt-bindings: vendor-prefixes: Add EcoNet Caleb James DeLisle
2025-03-21 13:46 ` [PATCH v1 2/8] dt-bindings: interrupt-controller: Add EcoNet EN751221 INTC Caleb James DeLisle
2025-03-21 15:52 ` Rob Herring (Arm)
2025-03-21 17:19 ` Caleb James DeLisle
2025-03-21 21:17 ` Rob Herring
2025-03-21 23:55 ` Caleb James DeLisle
2025-03-21 13:46 ` [PATCH v1 3/8] irqchip: " Caleb James DeLisle
2025-03-21 20:26 ` Thomas Gleixner
2025-03-21 22:20 ` Caleb James DeLisle
2025-03-22 8:20 ` Thomas Gleixner
2025-03-23 3:06 ` Caleb James DeLisle
2025-03-23 17:56 ` Thomas Gleixner
2025-03-21 13:46 ` [PATCH v1 4/8] dt-bindings: timer: Add EcoNet HPT CPU Timer Caleb James DeLisle
2025-03-21 20:56 ` Krzysztof Kozlowski
2025-03-21 23:21 ` Caleb James DeLisle
2025-03-23 12:39 ` Krzysztof Kozlowski
2025-03-23 23:53 ` Caleb James DeLisle
2025-03-24 7:13 ` Krzysztof Kozlowski [this message]
2025-03-24 12:25 ` Caleb James DeLisle
2025-03-21 13:46 ` [PATCH v1 5/8] clocksource/drivers: Add EcoNet Timer HPT driver Caleb James DeLisle
2025-03-21 13:46 ` [PATCH v1 6/8] dt-bindings: mips: Add EcoNet platform binding Caleb James DeLisle
2025-03-21 20:57 ` Krzysztof Kozlowski
2025-03-21 13:46 ` [PATCH v1 7/8] mips: Add EcoNet MIPS platform support Caleb James DeLisle
2025-03-21 21:00 ` Krzysztof Kozlowski
2025-03-21 23:43 ` Caleb James DeLisle
2025-03-21 13:46 ` [PATCH v1 8/8] MAINTAINERS: Add EcoNet MIPS platform entry Caleb James DeLisle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b3fea7b9-b7ea-4987-9fe7-b0adb9346f07@kernel.org \
--to=krzk@kernel.org \
--cc=benjamin.larsson@genexis.eu \
--cc=cjd@cjdns.fr \
--cc=conor+dt@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=robh@kernel.org \
--cc=tglx@linutronix.de \
--cc=tsbogend@alpha.franken.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).