From: Conor Dooley <conor@kernel.org>
To: Inochi Amaoto <inochiama@outlook.com>
Cc: Conor Dooley <conor.dooley@microchip.com>,
Anup Patel <apatel@ventanamicro.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
aou@eecs.berkeley.edu, chao.wei@sophgo.com,
evicetree@vger.kernel.org, emil.renner.berthing@canonical.com,
guoren@kernel.org, jszhang@kernel.org,
krzysztof.kozlowski+dt@linaro.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org, palmer@dabbelt.com,
paul.walmsley@sifive.com, robh+dt@kernel.org,
xiaoguang.xing@sophgo.com, Chen Wang <wangchen20@iscas.ac.cn>
Subject: Re: [PATCH v2 06/11] dt-bindings: timer: Add Sophgo sg2042 clint
Date: Wed, 20 Sep 2023 14:03:01 +0100 [thread overview]
Message-ID: <20230920-53a04651c08acb0796dc63b4@fedora> (raw)
In-Reply-To: <IA1PR20MB495313B7E9B2FC529BE0BB2ABBF9A@IA1PR20MB4953.namprd20.prod.outlook.com>
[-- Attachment #1.1: Type: text/plain, Size: 4045 bytes --]
On Wed, Sep 20, 2023 at 07:24:21PM +0800, Inochi Amaoto wrote:
> >
> >Yo,
> >
> >On Wed, Sep 20, 2023 at 05:08:41PM +0800, Inochi Amaoto wrote:
> >>> On Wed, Sep 20, 2023 at 02:39:39PM +0800, Chen Wang wrote:
> >>>> From: Inochi Amaoto <inochiama@outlook.com>
> >>>>
> >>>> 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>
> >>>> Signed-off-by: Chen Wang <wangchen20@iscas.ac.cn>
> >>>
> >>> Have you ignored Krzysztof's comments on this? I don't see a response or
> >>> a reaction to his comments about the compatibles on the last version.
> >>> Additionally, where is the user for these? I don't see any drivers that
> >>> actually make use of these.
> >>>
> >>
> >> Sorry for late reply and wrong message-id.
> >>
> >> The clint is parsed by sbi.
> >
> >That needs to go in the commit message.
>
> Yes, it will.
Thanks.
> >> As use the same compatible, the opensbi will
> >> parse the device twice. This will cause a fault.
> >
> >Then only have one compatible with 2 register ranges? Then your SBI
> >implementation can use those two register ranges to find out the base
> >address for the mtimer bits and for the mswi bits.
> >I don't understand why this cannot be done, could you please explain.
>
> That is a good idea, but now SBI use the second register ranges as
> mtimecmp address for aclint. And there is a aclint-mswi in the SBI.
> Maybe a change is needed?
Yeah, I don't think the model for this in OpenSBI at the moment (and
since I checked, in QEMU too) is correct. I think we should re-do things
correctly and it'd be great if things didn't get merged to those
projects that end up being objected to by dt-binding people.
I've started keeping a closer eye on QEMU recently in that regard, but I
am not super attentive. I'll try to be better at that going forward!
>
> >I also don't see anything in the opensbi repo right now that is using
> >these (nor could I easily see any patches for opensbi adding this).
> >Is there another SBI implementation that you are using that I can take
> >a look at to try and understand this better?
> >
>
> This will be sumbit in a short time.
> Now we only use it is sophgo vendor SBI, which url is [1].
>
> [1] https://github.com/sophgo/opensbi
Thanks.
> >>> Why do you need to have 2 compatibles (and therefore 2 devices) for the
> >>> clint? I thought the clint was a single device, of which the mtimer and
> >>> mswi bits were just "features"? Having split register ranges isn't a
> >>> reason to have two compatibles, so I must be missing something here...
> >
> >> Sorry for late reply, The clint consists of mtimer and ipi devices, which
> >> is defined in [1].
> >
> >Yes, I have looked at the spec. I went to check it again before replying
> >here in case there was something immediately obvious that I was missing.
> >
>
> I think nothing missed.
>
> >> This standard shows clint(or the aclint) has two device,
> >
> >The wording used here doesn't really matter. It's one interrupt
> >controller that does mtimer and mswi.
> >
> >> but not one. In another word, there is no need to defined mtimer and ipi
> >> device on the same base address.
> >
> >There's also no need to have two compatibles for the same interrupt
> >controller, so I do not get this reasoning. What actually _requires_
> >them to be split?
> >
>
> Yes, it is one, but can be mapped into different address. So I think we
> need two.
Not two compatibles though, just two memory addresses that you need to
locate (or maybe even 3, for SSWI?)
>
> >> So we need two compatibles to allow sbi to identify them correctly.
> >
> >Why is it not sufficient to identify the individual memory regions?
> >
>
> FYI, Anup. As I have no idea for aclint implementation.
>
> >Thanks,
> >Conor.
> >
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 161 bytes --]
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2023-09-20 13:03 UTC|newest]
Thread overview: 88+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-20 6:33 [PATCH v2 00/11] Add Milk-V Pioneer RISC-V board support Chen Wang
2023-09-20 6:34 ` [PATCH v2 01/11] riscv: Add SOPHGO SOC family Kconfig support Chen Wang
2023-09-20 7:34 ` Guo Ren
2023-09-20 8:21 ` Conor Dooley
2023-09-20 6:37 ` [PATCH v2 02/11] dt-bindings: vendor-prefixes: add milkv/sophgo Chen Wang
2023-09-20 7:38 ` Guo Ren
2023-09-20 8:22 ` Conor Dooley
2023-09-20 9:14 ` Chen Wang
2023-09-20 6:37 ` [PATCH v2 03/11] dt-bindings: riscv: add sophgo sg2042 bindings Chen Wang
2023-09-20 7:43 ` Guo Ren
2023-09-20 8:28 ` Conor Dooley
2023-09-21 10:21 ` Chen Wang
2023-09-21 12:18 ` Conor Dooley
2023-09-21 13:40 ` Chen Wang
2023-09-21 13:51 ` Chen Wang
2023-09-21 14:00 ` Conor Dooley
2023-09-22 1:48 ` Chen Wang
2023-09-20 11:55 ` Krzysztof Kozlowski
2023-09-20 12:03 ` 汪辰
2023-09-21 0:48 ` Jisheng Zhang
2023-09-20 6:38 ` [PATCH v2 04/11] dt-bindings: riscv: Add T-HEAD C920 compatibles Chen Wang
2023-09-20 7:44 ` Guo Ren
2023-09-20 8:37 ` Conor Dooley
2023-09-20 6:39 ` [PATCH v2 05/11] dt-bindings: interrupt-controller: Add SOPHGO's SG2042 PLIC Chen Wang
2023-09-20 7:45 ` Guo Ren
2023-09-20 8:57 ` Conor Dooley
2023-09-20 6:39 ` [PATCH v2 06/11] dt-bindings: timer: Add Sophgo sg2042 clint Chen Wang
2023-09-20 8:12 ` Guo Ren
2023-09-20 8:50 ` Conor Dooley
2023-09-20 9:08 ` Inochi Amaoto
2023-09-20 9:53 ` Conor Dooley
2023-09-20 11:24 ` Inochi Amaoto
2023-09-20 13:03 ` Conor Dooley [this message]
2023-09-21 0:43 ` Inochi Amaoto
2023-09-21 8:05 ` Conor Dooley
2023-09-21 8:18 ` Inochi Amaoto
2023-09-21 8:52 ` Conor Dooley
2023-09-21 9:44 ` Inochi Amaoto
2023-09-20 11:57 ` Krzysztof Kozlowski
2023-09-20 12:15 ` Inochi Amaoto
2023-09-20 12:30 ` Krzysztof Kozlowski
2023-09-20 12:40 ` Inochi Amaoto
2023-09-20 12:58 ` Conor Dooley
2023-09-20 13:09 ` Krzysztof Kozlowski
2023-09-20 14:38 ` Anup Patel
2023-09-20 14:51 ` Conor Dooley
2023-09-20 22:20 ` Inochi Amaoto
2023-09-22 5:16 ` Inochi Amaoto
2023-09-22 7:43 ` Conor Dooley
2023-09-22 8:18 ` Inochi Amaoto
2023-09-20 6:39 ` [PATCH v2 07/11] dt-bindings: serial: snps-dw-apb-uart: Add Sophgo SG2042 uarts Chen Wang
2023-09-20 7:51 ` Guo Ren
2023-09-20 8:37 ` Conor Dooley
2023-09-20 6:40 ` [PATCH v2 08/11] serial: 8250_dw: Add Sophgo SG2042 support Chen Wang
2023-09-20 7:53 ` Guo Ren
2023-09-20 8:05 ` Chen Wang
2023-09-20 8:08 ` Guo Ren
2023-09-22 9:41 ` Ben Dooks
2023-09-22 10:40 ` Emil Renner Berthing
2023-09-22 11:39 ` Chen Wang
2023-09-26 7:38 ` Chen Wang
2023-09-20 6:40 ` [PATCH v2 09/11] riscv: dts: add initial SOPHGO SG2042 SoC device tree Chen Wang
2023-09-20 8:04 ` Guo Ren
2023-09-20 8:57 ` Conor Dooley
2023-09-20 9:07 ` [PATCH v2 06/11] dt-bindings: timer: Add Sophgo sg2042 clint Inochi Amaoto
2023-09-21 9:56 ` [PATCH v2 09/11] riscv: dts: add initial SOPHGO SG2042 SoC device tree Chen Wang
2023-09-21 10:15 ` Conor Dooley
2023-09-21 10:27 ` Chen Wang
2023-09-21 12:06 ` Conor Dooley
2023-09-20 11:32 ` Emil Renner Berthing
2023-09-20 12:09 ` 汪辰
2023-09-20 12:32 ` Emil Renner Berthing
2023-09-20 12:37 ` 汪辰
2023-09-20 15:19 ` Palmer Dabbelt
2023-09-20 15:31 ` Conor Dooley
2023-09-20 6:40 ` [PATCH v2 10/11] riscv: dts: sophgo: add Milk-V Pioneer board " Chen Wang
2023-09-20 8:05 ` Guo Ren
2023-09-20 8:16 ` Conor Dooley
2023-09-20 11:59 ` Krzysztof Kozlowski
2023-09-20 6:41 ` [PATCH v2 11/11] riscv: defconfig: enable SOPHGO SoC Chen Wang
2023-09-20 8:06 ` Guo Ren
2023-09-20 8:58 ` Conor Dooley
2023-09-20 10:01 ` [PATCH v2 00/11] Add Milk-V Pioneer RISC-V board support Conor Dooley
2023-09-22 10:24 ` Chen Wang
2023-09-22 10:50 ` Conor Dooley
2023-09-22 11:28 ` Chen Wang
2023-09-20 15:22 ` Palmer Dabbelt
2023-09-26 10:29 ` Chen Wang
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=20230920-53a04651c08acb0796dc63b4@fedora \
--to=conor@kernel.org \
--cc=aou@eecs.berkeley.edu \
--cc=apatel@ventanamicro.com \
--cc=chao.wei@sophgo.com \
--cc=conor.dooley@microchip.com \
--cc=emil.renner.berthing@canonical.com \
--cc=evicetree@vger.kernel.org \
--cc=guoren@kernel.org \
--cc=inochiama@outlook.com \
--cc=jszhang@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh+dt@kernel.org \
--cc=wangchen20@iscas.ac.cn \
--cc=xiaoguang.xing@sophgo.com \
/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