* [PATCH 06/12] dt-bindings: timer: Add Sophgo sg2042 clint
@ 2023-09-15 7:24 Wang Chen
2023-09-15 7:29 ` Krzysztof Kozlowski
2023-09-15 15:05 ` Rob Herring
0 siblings, 2 replies; 3+ messages in thread
From: Wang Chen @ 2023-09-15 7:24 UTC (permalink / raw)
To: linux-riscv, conor, aou, krzysztof.kozlowski+dt, palmer,
paul.walmsley, robh+dt
Cc: devicetree, linux-kernel, jszhang, guoren, chao.wei,
xiaoguang.xing, Inochi Amaoto
From: Inochi Amaoto <inochiama@outlook.com>
The timer and ipi(mswi) of sg2042 are on different addresses. With the
same compatible string, this will cause a mismatch when is processed by
SBI.
Add two new compatible string formatted like `C9xx-clint-xxx` to identify
the timer and ipi device separately, and do not allow c900-clint as the
fallback to avoid conflict.
Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
---
.../bindings/timer/sifive,clint.yaml | 26 +++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/Documentation/devicetree/bindings/timer/sifive,clint.yaml b/Documentation/devicetree/bindings/timer/sifive,clint.yaml
index a0185e15a42f..2a86b80c3f1e 100644
--- a/Documentation/devicetree/bindings/timer/sifive,clint.yaml
+++ b/Documentation/devicetree/bindings/timer/sifive,clint.yaml
@@ -39,6 +39,14 @@ properties:
- allwinner,sun20i-d1-clint
- thead,th1520-clint
- const: thead,c900-clint
+ - items:
+ - enum:
+ - sophgo,sg2042-clint-mtimer
+ - const: thead,c900-clint-mtimer
+ - items:
+ - enum:
+ - sophgo,sg2042-clint-mswi
+ - const: thead,c900-clint-mswi
- items:
- const: sifive,clint0
- const: riscv,clint0
@@ -74,4 +82,22 @@ examples:
<&cpu4intc 3>, <&cpu4intc 7>;
reg = <0x2000000 0x10000>;
};
+ - |
+ clint-mtimer@ac010000 {
+ compatible = "sophgo,sg2042-clint-mtimer", "thead,c900-clint-mtimer";
+ interrupts-extended = <&cpu1intc 7>,
+ <&cpu2intc 7>,
+ <&cpu3intc 7>,
+ <&cpu4intc 7>;
+ reg = <0xac010000 0x00007ff8>;
+ };
+ - |
+ clint-mswi@94000000 {
+ compatible = "sophgo,sg2042-clint-mswi", "thead,c900-clint-mswi";
+ interrupts-extended = <&cpu1intc 3>,
+ <&cpu2intc 3>,
+ <&cpu3intc 3>,
+ <&cpu4intc 3>;
+ reg = <0x94000000 0x00004000>;
+ };
...
--
2.25.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 06/12] dt-bindings: timer: Add Sophgo sg2042 clint
2023-09-15 7:24 [PATCH 06/12] dt-bindings: timer: Add Sophgo sg2042 clint Wang Chen
@ 2023-09-15 7:29 ` Krzysztof Kozlowski
2023-09-15 15:05 ` Rob Herring
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2023-09-15 7:29 UTC (permalink / raw)
To: Wang Chen, linux-riscv, conor, aou, krzysztof.kozlowski+dt,
palmer, paul.walmsley, robh+dt
Cc: devicetree, linux-kernel, jszhang, guoren, chao.wei,
xiaoguang.xing, Inochi Amaoto
On 15/09/2023 09:24, Wang Chen wrote:
> From: Inochi Amaoto <inochiama@outlook.com>
>
> The timer and ipi(mswi) of sg2042 are on different addresses. With the
> same compatible string, this will cause a mismatch when is processed by
> SBI.
No, same devices (obviously on different addresses) with same
programming interface have *the same compatible*.
>
> Add two new compatible string formatted like `C9xx-clint-xxx` to identify
> the timer and ipi device separately, and do not allow c900-clint as the
> fallback to avoid conflict.
>
> Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
> ---
> .../bindings/timer/sifive,clint.yaml | 26 +++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/timer/sifive,clint.yaml b/Documentation/devicetree/bindings/timer/sifive,clint.yaml
> index a0185e15a42f..2a86b80c3f1e 100644
> --- a/Documentation/devicetree/bindings/timer/sifive,clint.yaml
> +++ b/Documentation/devicetree/bindings/timer/sifive,clint.yaml
> @@ -39,6 +39,14 @@ properties:
> - allwinner,sun20i-d1-clint
> - thead,th1520-clint
> - const: thead,c900-clint
> + - items:
> + - enum:
> + - sophgo,sg2042-clint-mtimer
> + - const: thead,c900-clint-mtimer
> + - items:
> + - enum:
> + - sophgo,sg2042-clint-mswi
> + - const: thead,c900-clint-mswi
> - items:
> - const: sifive,clint0
> - const: riscv,clint0
> @@ -74,4 +82,22 @@ examples:
> <&cpu4intc 3>, <&cpu4intc 7>;
> reg = <0x2000000 0x10000>;
> };
> + - |
> + clint-mtimer@ac010000 {
> + compatible = "sophgo,sg2042-clint-mtimer", "thead,c900-clint-mtimer";
> + interrupts-extended = <&cpu1intc 7>,
> + <&cpu2intc 7>,
> + <&cpu3intc 7>,
> + <&cpu4intc 7>;
> + reg = <0xac010000 0x00007ff8>;
Drop example, not needed.
> + };
> + - |
> + clint-mswi@94000000 {
> + compatible = "sophgo,sg2042-clint-mswi", "thead,c900-clint-mswi";
> + interrupts-extended = <&cpu1intc 3>,
> + <&cpu2intc 3>,
> + <&cpu3intc 3>,
> + <&cpu4intc 3>;
> + reg = <0x94000000 0x00004000>;
Drop example, not needed.
> + };
> ...
Best regards,
Krzysztof
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 06/12] dt-bindings: timer: Add Sophgo sg2042 clint
2023-09-15 7:24 [PATCH 06/12] dt-bindings: timer: Add Sophgo sg2042 clint Wang Chen
2023-09-15 7:29 ` Krzysztof Kozlowski
@ 2023-09-15 15:05 ` Rob Herring
1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2023-09-15 15:05 UTC (permalink / raw)
To: Wang Chen
Cc: linux-riscv, conor, aou, krzysztof.kozlowski+dt, palmer,
paul.walmsley, devicetree, linux-kernel, jszhang, guoren,
chao.wei, xiaoguang.xing, Inochi Amaoto
On Fri, Sep 15, 2023 at 03:24:15PM +0800, Wang Chen wrote:
> From: Inochi Amaoto <inochiama@outlook.com>
>
> The timer and ipi(mswi) of sg2042 are on different addresses. With the
> same compatible string, this will cause a mismatch when is processed by
> SBI.
>
> Add two new compatible string formatted like `C9xx-clint-xxx` to identify
> the timer and ipi device separately, and do not allow c900-clint as the
> fallback to avoid conflict.
>
> Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
Missing your S-o-b as any patch you send should have yours (last).
> ---
> .../bindings/timer/sifive,clint.yaml | 26 +++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/timer/sifive,clint.yaml b/Documentation/devicetree/bindings/timer/sifive,clint.yaml
> index a0185e15a42f..2a86b80c3f1e 100644
> --- a/Documentation/devicetree/bindings/timer/sifive,clint.yaml
> +++ b/Documentation/devicetree/bindings/timer/sifive,clint.yaml
> @@ -39,6 +39,14 @@ properties:
> - allwinner,sun20i-d1-clint
> - thead,th1520-clint
> - const: thead,c900-clint
> + - items:
> + - enum:
> + - sophgo,sg2042-clint-mtimer
> + - const: thead,c900-clint-mtimer
> + - items:
> + - enum:
> + - sophgo,sg2042-clint-mswi
> + - const: thead,c900-clint-mswi
> - items:
> - const: sifive,clint0
> - const: riscv,clint0
> @@ -74,4 +82,22 @@ examples:
> <&cpu4intc 3>, <&cpu4intc 7>;
> reg = <0x2000000 0x10000>;
> };
> + - |
> + clint-mtimer@ac010000 {
> + compatible = "sophgo,sg2042-clint-mtimer", "thead,c900-clint-mtimer";
> + interrupts-extended = <&cpu1intc 7>,
> + <&cpu2intc 7>,
> + <&cpu3intc 7>,
> + <&cpu4intc 7>;
> + reg = <0xac010000 0x00007ff8>;
> + };
> + - |
> + clint-mswi@94000000 {
> + compatible = "sophgo,sg2042-clint-mswi", "thead,c900-clint-mswi";
> + interrupts-extended = <&cpu1intc 3>,
> + <&cpu2intc 3>,
> + <&cpu3intc 3>,
> + <&cpu4intc 3>;
> + reg = <0x94000000 0x00004000>;
> + };
> ...
> --
> 2.25.1
>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-15 15:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-15 7:24 [PATCH 06/12] dt-bindings: timer: Add Sophgo sg2042 clint Wang Chen
2023-09-15 7:29 ` Krzysztof Kozlowski
2023-09-15 15:05 ` Rob Herring
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).