All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Anderson <seanga2@gmail.com>
To: Damien Le Moal <Damien.LeMoal@wdc.com>,
	"palmer@dabbelt.com" <palmer@dabbelt.com>
Cc: "linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
	"sboyd@kernel.org" <sboyd@kernel.org>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>
Subject: Re: [PATCH v10 00/23] RISC-V Kendryte K210 support improvements
Date: Sun, 10 Jan 2021 21:34:30 -0500	[thread overview]
Message-ID: <03fb06e8-d587-3cf2-9b66-bf31449e7b8a@gmail.com> (raw)
In-Reply-To: <7e0b4efd305d2c5deeff7dd263234a32aa093f58.camel@wdc.com>

On 1/10/21 8:56 PM, Damien Le Moal wrote:
> On Sat, 2021-01-09 at 09:32 -0800, Palmer Dabbelt wrote:
>> On Sun, 13 Dec 2020 05:50:33 PST (-0800), Damien Le Moal wrote:
>>> This series of patches improves support for boards based on the Canaan
>>> Kendryte K210 RISC-V dual core SoC. Minimal support for this SoC is
>>> already included in the kernel. These patches complete it, enabling
>>> support for most peripherals present on the SoC as well as introducing
>>> device trees for the various K210 boards available on the market today
>>> from SiPeed and Kendryte.
>>
>> Putting everything together like this makes it overly difficult to get things
>> merged: there's some actual fixes, some new arch/riscv stuff, and a handful of
>> drivers.  I know we've been kind of mixing up the SiFive and RISC-V trees, but
>> that's largely because things have been pretty quiet and it's the same people
>> working on everything.  That'll probably change at some point, but it doesn't
>> mean we can just start mixing up everything in here -- even for the SiFive
>> stuff, we usulaly try to do it in the relevant subsystem tree.
> 
> I know that, but for some drivers (e.g. clock), there is overlap that would
> prevent compiling if not all patches go to the same tree. And for people to
> test, if not all drivers are in the same tree, nothing will work (e.g. without
> the pinctrl driver, nothing device will work, even booting will fail). That is
> why I kept sending everything together.
> 
> With what you applied, only the clock driver and the fpioa driver do not really
> belong to the riscv tree. But since you queued the dt-bindings doc patches
> which add the headers for these drivers, it may be necessary to keep them in
> the riscv tree to avoid compilation failures.
> 
> Stephen, Linus, is that OK ?
> 
>>> Pathes 1 to 4 are various fixes for riscv arch code and riscv
>>> dependent devices. Of note here is patch 3 which fix system calls
>>> execution in the no MMU case, and patch 4 which simplifies DTB builtin
>>> handling.
>>
>> The first three are on fixes, but the fourth isn't a fix: it's a fairly
>> significant change to how portable our kernels can be.  The old scheme allows
>> vendors the option of building systems with M-mode compatibility, this new one
>> doesn't.  That said, I don't think anyone is actually going to build systems
>> this way -- we really should have had some sort of mboardid, but that was shot
>> down in favor of some sort of platform thing and it's unlikely we get that far
>> over there.
>>
>> I'm not really sure I'm ready to throw in the towel on binary compatibility
>> between vendors yet, at least in general.  In this specific case it seems fine,
>> though -- accross the board we're just spending way too much time worrying
>> about the small things while we have way bigger problems to deal with.
>> Obviously it would be better if we had some scheme to handle this here, but I'd
>> much rather focus on the basics.
>>
>> I still hope we get to the point where we can have binary compatibility between
>> systems from various vendors, while still having reasonably useful systems.
>> Unfortunately we're quite far away from anything like that, so I'm fine taking
>> this sort of thing as that's as good as we can do for the forseeable future.
> 
> Yes, I agree that working on improving binary portability is very important.
> However, I am not convinced at all that trying to do so using a device-tree
> based environment is viable, or even desired. I think that true portability can
> only be achieved using something like ACPI or equivalent allowing run-time
> device discovery. But that is a discussion for another thread.
> 
>> This is on for-next.
> 
> Thanks.
> 
>>> The following patches 7 to 11 document device tree bindings for the SoC
>>> drivers. The implementation of these drivers is provided in patches 12,
>>> 13 and 14, respectively implementing the SoC clock driver, reset
>>> controller and SOC pin function control.
>>
>> The numbering is off a bit here.  The clock stuff has gone in through that tree
>> and I'm fine  taking the reset controller as that's been reviewed, but I don't
>> see any review on the pinctl driver so I haven't taken that yet.
>>
>> I'm happy to re-send that patch (likely with a more appropriate subject line,
>> as it's a pinctl driver not a riscv patch).
> 
> I rebased the series on the riscv tree fixes+for-next branches and changed the
> subject line of these 2 patches. I am testing that now and will resend soon.
> But so far so good. All is working fine.
> 
>>> Patches 15 to 20 update the existing K210 device tree and add new
>>> device tree files for several K210 based boards: MAIX Bit, MAIXDUINO,
>>> MAIX Dock and MAIX Go boards from SiPeed and the KD233 development
>>> board from Canaan.
>>
>> There are tons of checkpatch warnings in these, mostly related to compat
>> strings that don't have binding definitions.  It looks like there's just a lot
>> of stuff in there that doesn't have any support on the Linux side, my guess
>> would be that the best thing to do is to drop those until they're defined.
> 
> Yes, I am aware of these warnings. Despite that, I kept the undocumented and
> unsupported DT nodes as having the complete device-trees (soc k210.dtsi part
> and boards dts) constitute the best documentation ever for the SoC and the
> boards. Most of this work come from Sean (with some corrections from me) and
> extracted all this information from the almost non-existent documentation
> (basically only board layout doc is available) using mostly only the Kendryte
> SDK is really hard. So despite the warning, I would really prefer that we keep
> the DTs as complete as they are now. This would also allow us to point to
> specific nodes that need support for new developers that want to get involved
> with riscv (mentoring program of the foundation). These boards being extremely
> cheap are the perfect platform for students and hobbyist to get involved.
> 
> So unless you insist, I am going to resend the DTs as-is.

Just a note, everything which isn't supported has been left disabled
(usually implicitly). It could be possible to remove unsupported nodes,
but I would like to keep the Linux and U-Boot device trees in-sync.

--Sean

> 
>>
>>> Finally the last two patches updates the k210 nommu defconfig to include
>>> the newly implemented drivers and provide a new default configuration
>>> file enabling SD card support.
>>
>> I'm also going to just leave these out for now, until we sort out the above
>> issues.  Let me know if you're going to send another patch set, or
> 
> Thanks.
> 


WARNING: multiple messages have this Message-ID (diff)
From: Sean Anderson <seanga2@gmail.com>
To: Damien Le Moal <Damien.LeMoal@wdc.com>,
	"palmer@dabbelt.com" <palmer@dabbelt.com>
Cc: "sboyd@kernel.org" <sboyd@kernel.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>,
	"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>
Subject: Re: [PATCH v10 00/23] RISC-V Kendryte K210 support improvements
Date: Sun, 10 Jan 2021 21:34:30 -0500	[thread overview]
Message-ID: <03fb06e8-d587-3cf2-9b66-bf31449e7b8a@gmail.com> (raw)
In-Reply-To: <7e0b4efd305d2c5deeff7dd263234a32aa093f58.camel@wdc.com>

On 1/10/21 8:56 PM, Damien Le Moal wrote:
> On Sat, 2021-01-09 at 09:32 -0800, Palmer Dabbelt wrote:
>> On Sun, 13 Dec 2020 05:50:33 PST (-0800), Damien Le Moal wrote:
>>> This series of patches improves support for boards based on the Canaan
>>> Kendryte K210 RISC-V dual core SoC. Minimal support for this SoC is
>>> already included in the kernel. These patches complete it, enabling
>>> support for most peripherals present on the SoC as well as introducing
>>> device trees for the various K210 boards available on the market today
>>> from SiPeed and Kendryte.
>>
>> Putting everything together like this makes it overly difficult to get things
>> merged: there's some actual fixes, some new arch/riscv stuff, and a handful of
>> drivers.  I know we've been kind of mixing up the SiFive and RISC-V trees, but
>> that's largely because things have been pretty quiet and it's the same people
>> working on everything.  That'll probably change at some point, but it doesn't
>> mean we can just start mixing up everything in here -- even for the SiFive
>> stuff, we usulaly try to do it in the relevant subsystem tree.
> 
> I know that, but for some drivers (e.g. clock), there is overlap that would
> prevent compiling if not all patches go to the same tree. And for people to
> test, if not all drivers are in the same tree, nothing will work (e.g. without
> the pinctrl driver, nothing device will work, even booting will fail). That is
> why I kept sending everything together.
> 
> With what you applied, only the clock driver and the fpioa driver do not really
> belong to the riscv tree. But since you queued the dt-bindings doc patches
> which add the headers for these drivers, it may be necessary to keep them in
> the riscv tree to avoid compilation failures.
> 
> Stephen, Linus, is that OK ?
> 
>>> Pathes 1 to 4 are various fixes for riscv arch code and riscv
>>> dependent devices. Of note here is patch 3 which fix system calls
>>> execution in the no MMU case, and patch 4 which simplifies DTB builtin
>>> handling.
>>
>> The first three are on fixes, but the fourth isn't a fix: it's a fairly
>> significant change to how portable our kernels can be.  The old scheme allows
>> vendors the option of building systems with M-mode compatibility, this new one
>> doesn't.  That said, I don't think anyone is actually going to build systems
>> this way -- we really should have had some sort of mboardid, but that was shot
>> down in favor of some sort of platform thing and it's unlikely we get that far
>> over there.
>>
>> I'm not really sure I'm ready to throw in the towel on binary compatibility
>> between vendors yet, at least in general.  In this specific case it seems fine,
>> though -- accross the board we're just spending way too much time worrying
>> about the small things while we have way bigger problems to deal with.
>> Obviously it would be better if we had some scheme to handle this here, but I'd
>> much rather focus on the basics.
>>
>> I still hope we get to the point where we can have binary compatibility between
>> systems from various vendors, while still having reasonably useful systems.
>> Unfortunately we're quite far away from anything like that, so I'm fine taking
>> this sort of thing as that's as good as we can do for the forseeable future.
> 
> Yes, I agree that working on improving binary portability is very important.
> However, I am not convinced at all that trying to do so using a device-tree
> based environment is viable, or even desired. I think that true portability can
> only be achieved using something like ACPI or equivalent allowing run-time
> device discovery. But that is a discussion for another thread.
> 
>> This is on for-next.
> 
> Thanks.
> 
>>> The following patches 7 to 11 document device tree bindings for the SoC
>>> drivers. The implementation of these drivers is provided in patches 12,
>>> 13 and 14, respectively implementing the SoC clock driver, reset
>>> controller and SOC pin function control.
>>
>> The numbering is off a bit here.  The clock stuff has gone in through that tree
>> and I'm fine  taking the reset controller as that's been reviewed, but I don't
>> see any review on the pinctl driver so I haven't taken that yet.
>>
>> I'm happy to re-send that patch (likely with a more appropriate subject line,
>> as it's a pinctl driver not a riscv patch).
> 
> I rebased the series on the riscv tree fixes+for-next branches and changed the
> subject line of these 2 patches. I am testing that now and will resend soon.
> But so far so good. All is working fine.
> 
>>> Patches 15 to 20 update the existing K210 device tree and add new
>>> device tree files for several K210 based boards: MAIX Bit, MAIXDUINO,
>>> MAIX Dock and MAIX Go boards from SiPeed and the KD233 development
>>> board from Canaan.
>>
>> There are tons of checkpatch warnings in these, mostly related to compat
>> strings that don't have binding definitions.  It looks like there's just a lot
>> of stuff in there that doesn't have any support on the Linux side, my guess
>> would be that the best thing to do is to drop those until they're defined.
> 
> Yes, I am aware of these warnings. Despite that, I kept the undocumented and
> unsupported DT nodes as having the complete device-trees (soc k210.dtsi part
> and boards dts) constitute the best documentation ever for the SoC and the
> boards. Most of this work come from Sean (with some corrections from me) and
> extracted all this information from the almost non-existent documentation
> (basically only board layout doc is available) using mostly only the Kendryte
> SDK is really hard. So despite the warning, I would really prefer that we keep
> the DTs as complete as they are now. This would also allow us to point to
> specific nodes that need support for new developers that want to get involved
> with riscv (mentoring program of the foundation). These boards being extremely
> cheap are the perfect platform for students and hobbyist to get involved.
> 
> So unless you insist, I am going to resend the DTs as-is.

Just a note, everything which isn't supported has been left disabled
(usually implicitly). It could be possible to remove unsupported nodes,
but I would like to keep the Linux and U-Boot device trees in-sync.

--Sean

> 
>>
>>> Finally the last two patches updates the k210 nommu defconfig to include
>>> the newly implemented drivers and provide a new default configuration
>>> file enabling SD card support.
>>
>> I'm also going to just leave these out for now, until we sort out the above
>> issues.  Let me know if you're going to send another patch set, or
> 
> Thanks.
> 


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2021-01-11  2:35 UTC|newest]

Thread overview: 98+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-13 13:50 [PATCH v10 00/23] RISC-V Kendryte K210 support improvements Damien Le Moal
2020-12-13 13:50 ` Damien Le Moal
2020-12-13 13:50 ` [PATCH v10 01/23] riscv: Fix kernel time_init() Damien Le Moal
2020-12-13 13:50   ` Damien Le Moal
2020-12-13 13:50 ` [PATCH v10 02/23] riscv: Fix sifive serial driver Damien Le Moal
2020-12-13 13:50   ` Damien Le Moal
2020-12-13 13:50 ` [PATCH v10 03/23] riscv: Enable interrupts during syscalls with M-Mode Damien Le Moal
2020-12-13 13:50   ` Damien Le Moal
2020-12-13 13:50 ` [PATCH v10 04/23] riscv: Fix builtin DTB handling Damien Le Moal
2020-12-13 13:50   ` Damien Le Moal
2020-12-13 13:50 ` [PATCH v10 05/23] riscv: Use vendor name for K210 SoC support Damien Le Moal
2020-12-13 13:50   ` Damien Le Moal
2020-12-28 12:03   ` Anup Patel
2020-12-28 12:03     ` Anup Patel
2020-12-13 13:50 ` [PATCH v10 06/23] riscv: Fix Canaan Kendryte K210 device tree Damien Le Moal
2020-12-13 13:50   ` Damien Le Moal
2020-12-28 12:03   ` Anup Patel
2020-12-28 12:03     ` Anup Patel
2020-12-13 13:50 ` [PATCH v10 07/23] riscv: cleanup Canaan Kendryte K210 sysctl driver Damien Le Moal
2020-12-13 13:50   ` Damien Le Moal
2020-12-13 13:50 ` [PATCH v10 08/23] dt-bindings: Add Canaan vendor prefix Damien Le Moal
2020-12-13 13:50   ` Damien Le Moal
2020-12-13 13:50 ` [PATCH v10 09/23] dt-binding: clock: Document canaan,k210-clk bindings Damien Le Moal
2020-12-13 13:50   ` [PATCH v10 09/23] dt-binding: clock: Document canaan, k210-clk bindings Damien Le Moal
2020-12-17  8:09   ` [PATCH v10 09/23] dt-binding: clock: Document canaan,k210-clk bindings Stephen Boyd
2020-12-17  8:09     ` [PATCH v10 09/23] dt-binding: clock: Document canaan, k210-clk bindings Stephen Boyd
2020-12-17  8:13     ` [PATCH v10 09/23] dt-binding: clock: Document canaan,k210-clk bindings Damien Le Moal
2020-12-17  8:13       ` Damien Le Moal
2020-12-17 10:16       ` Stephen Boyd
2020-12-17 10:16         ` [PATCH v10 09/23] dt-binding: clock: Document canaan, k210-clk bindings Stephen Boyd
2020-12-17 10:43         ` [PATCH v10 09/23] dt-binding: clock: Document canaan,k210-clk bindings Damien Le Moal
2020-12-17 10:43           ` Damien Le Moal
2020-12-17 10:49           ` Stephen Boyd
2020-12-17 10:49             ` [PATCH v10 09/23] dt-binding: clock: Document canaan, k210-clk bindings Stephen Boyd
2020-12-17 10:51             ` [PATCH v10 09/23] dt-binding: clock: Document canaan,k210-clk bindings Damien Le Moal
2020-12-17 10:51               ` Damien Le Moal
2020-12-20  5:35               ` Stephen Boyd
2020-12-20  5:35                 ` [PATCH v10 09/23] dt-binding: clock: Document canaan, k210-clk bindings Stephen Boyd
2020-12-20  8:58                 ` [PATCH v10 09/23] dt-binding: clock: Document canaan,k210-clk bindings Damien Le Moal
2020-12-20  8:58                   ` Damien Le Moal
2020-12-17 10:54             ` Damien Le Moal
2020-12-17 10:54               ` Damien Le Moal
2020-12-19 19:44               ` Stephen Boyd
2020-12-19 19:44                 ` [PATCH v10 09/23] dt-binding: clock: Document canaan, k210-clk bindings Stephen Boyd
2020-12-13 13:50 ` [PATCH v10 10/23] dt-bindings: reset: Document canaan,k210-rst bindings Damien Le Moal
2020-12-13 13:50   ` [PATCH v10 10/23] dt-bindings: reset: Document canaan, k210-rst bindings Damien Le Moal
2020-12-13 13:50 ` [PATCH v10 11/23] dt-bindings: pinctrl: Document canaan,k210-fpioa bindings Damien Le Moal
2020-12-13 13:50   ` [PATCH v10 11/23] dt-bindings: pinctrl: Document canaan, k210-fpioa bindings Damien Le Moal
2020-12-13 13:50 ` [PATCH v10 12/23] dt-binding: mfd: Document canaan,k210-sysctl bindings Damien Le Moal
2020-12-13 13:50   ` [PATCH v10 12/23] dt-binding: mfd: Document canaan, k210-sysctl bindings Damien Le Moal
2020-12-15 17:00   ` [PATCH v10 12/23] dt-binding: mfd: Document canaan,k210-sysctl bindings Rob Herring
2020-12-15 17:00     ` Rob Herring
2020-12-13 13:50 ` [PATCH v10 13/23] riscv: Add Canaan Kendryte K210 clock driver Damien Le Moal
2020-12-13 13:50   ` Damien Le Moal
2020-12-13 13:50 ` [PATCH v10 14/23] riscv: Add Canaan Kendryte K210 reset controller Damien Le Moal
2020-12-13 13:50   ` Damien Le Moal
2020-12-13 13:50 ` [PATCH v10 15/23] riscv: Add Canaan Kendryte K210 FPIOA driver Damien Le Moal
2020-12-13 13:50   ` Damien Le Moal
2020-12-13 13:50 ` [PATCH v10 16/23] riscv: Update Canaan Kendryte K210 device tree Damien Le Moal
2020-12-13 13:50   ` Damien Le Moal
2020-12-28 12:07   ` Anup Patel
2020-12-28 12:07     ` Anup Patel
2020-12-13 13:50 ` [PATCH v10 17/23] riscv: Add SiPeed MAIX BiT board " Damien Le Moal
2020-12-13 13:50   ` Damien Le Moal
2020-12-28 12:08   ` Anup Patel
2020-12-28 12:08     ` Anup Patel
2020-12-13 13:50 ` [PATCH v10 18/23] riscv: Add SiPeed MAIX DOCK " Damien Le Moal
2020-12-13 13:50   ` Damien Le Moal
2020-12-28 12:08   ` Anup Patel
2020-12-28 12:08     ` Anup Patel
2020-12-13 13:50 ` [PATCH v10 19/23] riscv: Add SiPeed MAIX GO " Damien Le Moal
2020-12-13 13:50   ` Damien Le Moal
2020-12-28 12:09   ` Anup Patel
2020-12-28 12:09     ` Anup Patel
2020-12-13 13:50 ` [PATCH v10 20/23] riscv: Add SiPeed MAIXDUINO " Damien Le Moal
2020-12-13 13:50   ` Damien Le Moal
2020-12-28 12:10   ` Anup Patel
2020-12-28 12:10     ` Anup Patel
2020-12-13 13:50 ` [PATCH v10 21/23] riscv: Add Kendryte KD233 " Damien Le Moal
2020-12-13 13:50   ` Damien Le Moal
2020-12-28 12:10   ` Anup Patel
2020-12-28 12:10     ` Anup Patel
2020-12-13 13:50 ` [PATCH v10 22/23] riscv: Update Canaan Kendryte K210 defconfig Damien Le Moal
2020-12-13 13:50   ` Damien Le Moal
2020-12-28 12:11   ` Anup Patel
2020-12-28 12:11     ` Anup Patel
2020-12-13 13:50 ` [PATCH v10 23/23] riscv: Add Canaan Kendryte K210 SD card defconfig Damien Le Moal
2020-12-13 13:50   ` Damien Le Moal
2020-12-28 12:12   ` Anup Patel
2020-12-28 12:12     ` Anup Patel
2020-12-15 23:02 ` [PATCH v10 00/23] RISC-V Kendryte K210 support improvements Damien Le Moal
2020-12-15 23:02   ` Damien Le Moal
2021-01-09 17:32 ` Palmer Dabbelt
2021-01-09 17:32   ` Palmer Dabbelt
2021-01-11  1:56   ` Damien Le Moal
2021-01-11  1:56     ` Damien Le Moal
2021-01-11  2:34     ` Sean Anderson [this message]
2021-01-11  2:34       ` Sean Anderson

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=03fb06e8-d587-3cf2-9b66-bf31449e7b8a@gmail.com \
    --to=seanga2@gmail.com \
    --cc=Damien.LeMoal@wdc.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=sboyd@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.