linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Kendryte Linux Support
@ 2020-01-19  7:40 Sean Anderson
  0 siblings, 0 replies; only message in thread
From: Sean Anderson @ 2020-01-19  7:40 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-riscv

Hi Christoph,

I saw you were working on adding Kendryte K210 support to linux [1]. I
have been working on adding K210 support to U-Boot [2,3]. I've looked
over your commits, and I have a few questions (and comments) regarding
some of your decisions, primaryly with regard to the device tree you
added.

First, you consistently refer to the CPU which Kendryte is producing as
the "KD210," and not the "K210." I have been unable to find any
references to this name outside of the linux kernel. The only other
reference I can find is to the KD233, which is a development board for
the K210. All first- and third-party materials I could find referred to
the CPU as the K210. Could you explain your reasoning behind referring
to it as the KD210?

I think timebase-frequency should be <7800000>. This is because the
timer advances at a rate equal to 1/50th of the CPU clock [4].

In my device tree [5], I have tried to document the cache sizes for each
CPU. Some preliminary testing suggests that they have a cache-line of 32
bytes; however, I have been unable to determine this conclusively, so I
went with a conservative estimate of 64 bytes.

For the plic, I noticed that you have it set up to handle several
reserved interrupts (14-20 and 33). I don't see those mentioned anywhere
in the kendryte standalone sdk. Did you encounter those interrupts when
testing? To me, it seems like this device should be handling external
interrupts (8, 9, and 11).

I don't think the current binding for the sysctl device would be easy to
extend when more drivers are added. There are several different
registers which all have different functions. In particular, the current
binding would make the addition of a reset controller driver more
complex. I would prefer a top-level "sysctl" device with several
sub-devices each implementing one specific function. For an example,
have a look at [6].

--Sean

[1] <http://git.infradead.org/users/hch/riscv.git/shortlog/refs/heads/kendryte-support>
[2] <https://github.com/Forty-Bot/u-boot/>
[3] <https://patchwork.ozlabs.org/project/uboot/list/?series=153419>
[4] <https://github.com/kendryte/kendryte-standalone-sdk/blob/e93950eff9763fd7f464c1e0e3df8aba08ccef8c/lib/drivers/clint.c#L63>
[5] <https://github.com/Forty-Bot/u-boot/blob/master/arch/riscv/dts/k210.dtsi>
[6] <https://github.com/Forty-Bot/u-boot/blob/571ff39868c61b925d2c27d1d6919257cf8f3004/arch/riscv/dts/k210.dtsi#L369>



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-01-19  7:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-19  7:40 Kendryte Linux Support Sean Anderson

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).