All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <Damien.LeMoal@wdc.com>
To: Palmer Dabbelt <palmer@dabbelt.com>
Cc: "linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>,
	"seanga2@gmail.com" <seanga2@gmail.com>
Subject: Re: [PATCH v11 03/10] riscv: Update Canaan Kendryte K210 device tree
Date: Fri, 15 Jan 2021 00:33:15 +0000	[thread overview]
Message-ID: <BL0PR04MB651404813AAFE779EB2972A6E7A70@BL0PR04MB6514.namprd04.prod.outlook.com> (raw)
In-Reply-To: mhng-b30be63a-5293-4d18-85cb-fb2c62b3188e@palmerdabbelt-glaptop

On 2021/01/15 8:32, Palmer Dabbelt wrote:
> On Mon, 11 Jan 2021 16:58:41 PST (-0800), Damien Le Moal wrote:
>> Update the Canaan Kendryte K210 base device tree k210.dtsi to define
>> all peripherals of the SoC, their clocks and reset lines. The device
>> tree file k210.dts is renamed to k210_generic.dts and becomes the
>> default value selection of the SOC_CANAAN_K210_DTB_BUILTIN_SOURCE
>> configuration option. No device beside the serial console is defined by
>> this device tree. This makes this generic device tree suitable for use
>> with a builtin initramfs with all known K210 based boards.
>>
>> These changes result in the K210_CLK_ACLK clock ID to be unused and
>> removed from the dt-bindings k210-clk.h header file.
>>
>> Most updates to the k210.dtsi file come from Sean Anderson's work on
>> U-Boot support for the K210.
>>
>> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
>> Reviewed-by: Anup Patel <anup@brainfault.org>
>> ---
>>  arch/riscv/Kconfig.socs                     |   2 +-
>>  arch/riscv/boot/dts/canaan/k210.dts         |  23 -
>>  arch/riscv/boot/dts/canaan/k210.dtsi        | 551 +++++++++++++++++++-
>>  arch/riscv/boot/dts/canaan/k210_generic.dts |  46 ++
>>  include/dt-bindings/clock/k210-clk.h        |   1 -
>>  5 files changed, 573 insertions(+), 50 deletions(-)
>>  delete mode 100644 arch/riscv/boot/dts/canaan/k210.dts
>>  create mode 100644 arch/riscv/boot/dts/canaan/k210_generic.dts
> 
> [Snipping this to the relevant bits, in case you missed it before.]
> 
>> @@ -81,40 +107,515 @@ in0: oscillator {
>>  	soc {
>>  		#address-cells = <1>;
>>  		#size-cells = <1>;
>> -		compatible = "kendryte,k210-soc", "simple-bus";
>> +		compatible = "canaan,k210-soc", "simple-bus";
>>  		ranges;
>>  		interrupt-parent = <&plic0>;
>>
>> -		sysctl: sysctl@50440000 {
>> -			compatible = "kendryte,k210-sysctl", "simple-mfd";
>> -			reg = <0x50440000 0x1000>;
>> -			#clock-cells = <1>;
>> +		debug0: debug@0 {
>> +			compatible = "canaan,k210-debug", "riscv,debug";
> 
> I'm still getting lots of warnings about undocumented DT compatible strings
> from checpatch.  Some of them might be in flight, but I don't see many of them
> (including both of these debug ones) having been defined anywhere.  We went
> through a whole process to sort out the SiFive DT naming conventions, I don't
> want to just circumvent that for the Canaan stuff by merging it as-is.
> 

As mentioned in my previous reply about this, I am aware of the warnings and I
am ignoring them. The reason is that I really would like to keep the DTs as-is,
describing all pieces of the SoC, even the nodes that do not have Linux support
yet. Doing so, we end up with what amounts to the best public documentation ever
 for this SoC and the boards as what is available publicly from the SoC and
boards vendors is not great (that is an understatement). All this information
was extracted from the Kendryte SDK and from board design CAD prints (available
from https://dl.sipeed.com/MAIX). Sean did most of that for the MAIX Bit board
and I added other boards and some corrections. I really do not wish anybody to
have to do this again to figure out the memory mapping, clocks, reset lines, and
pinctrl mapping. That was hard and painful.

Having these unsupported DT nodes around will also allow us to point to them for
people who want to start getting involved with risc-v & Linux and want a project
to start with. I see these boards as cheap hardware for hobbyist and educational
tools rather than production hardware. I am having a blast building a biped
walking robot with a MAIX Bit as the controller right now...

So unless you keep insisting, I would like to keep the DTs as they are. The
naming convention of all nodes in the DT is fine and follows the
"vendor,soc-function" pattern. All unsupported nodes are also marked with
"status = disabled;" so they do not cause any problem.

Thoughts ?

-- 
Damien Le Moal
Western Digital Research

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

  parent reply	other threads:[~2021-01-15  0:33 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-12  0:58 [PATCH v11 00/10] RISC-V Kendryte K210 support improvements Damien Le Moal
2021-01-12  0:58 ` [PATCH v11 01/10] clk: Add RISC-V Canaan Kendryte K210 clock driver Damien Le Moal
2021-01-12  0:58 ` [PATCH v11 02/10] pinctrl: Add RISC-V Canaan Kendryte K210 FPIOA driver Damien Le Moal
2021-01-14 23:32   ` Palmer Dabbelt
2021-01-15  0:17     ` Damien Le Moal
2021-01-15  0:39       ` Sean Anderson
2021-01-12  0:58 ` [PATCH v11 03/10] riscv: Update Canaan Kendryte K210 device tree Damien Le Moal
2021-01-14 23:32   ` Palmer Dabbelt
     [not found]     ` <9d32abd1-ffb4-a887-a40d-fc173a371d23@gmail.com>
2021-01-15  0:06       ` Sean Anderson
2021-01-15  0:35         ` Sean Anderson
2021-01-15  1:03           ` Damien Le Moal
2021-01-15  1:14             ` Sean Anderson
2021-01-15  1:18               ` Damien Le Moal
2021-01-15  0:33     ` Damien Le Moal [this message]
2021-01-15  5:56     ` Damien Le Moal
2021-01-12  0:58 ` [PATCH v11 04/10] riscv: Add SiPeed MAIX BiT board " Damien Le Moal
2021-01-12  0:58 ` [PATCH v11 05/10] riscv: Add SiPeed MAIX DOCK " Damien Le Moal
2021-01-12  0:58 ` [PATCH v11 06/10] riscv: Add SiPeed MAIX GO " Damien Le Moal
2021-01-12  0:58 ` [PATCH v11 07/10] riscv: Add SiPeed MAIXDUINO " Damien Le Moal
2021-01-12  0:58 ` [PATCH v11 08/10] riscv: Add Kendryte KD233 " Damien Le Moal
2021-01-12  0:58 ` [PATCH v11 09/10] riscv: Update Canaan Kendryte K210 defconfig Damien Le Moal
2021-01-12  0:58 ` [PATCH v11 10/10] riscv: Add Canaan Kendryte K210 SD card defconfig Damien Le Moal
2021-01-12  1:07 ` [PATCH v11 00/10] RISC-V Kendryte K210 support improvements Damien Le Moal
2021-01-12  1:07   ` Damien Le Moal

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=BL0PR04MB651404813AAFE779EB2972A6E7A70@BL0PR04MB6514.namprd04.prod.outlook.com \
    --to=damien.lemoal@wdc.com \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=seanga2@gmail.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 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.