public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Sean Anderson <seanga2@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH v1 2/8] spi: dw: Add device tree properties for fields in CTRL0
Date: Sat, 21 Mar 2020 23:33:38 -0400	[thread overview]
Message-ID: <bf9b2194-37c2-1ce0-cedd-d4048d8a79f7@gmail.com> (raw)
In-Reply-To: <7c54ed0d-258a-b060-d3bf-8e641f68f705@denx.de>

On 3/21/20 11:13 PM, Marek Vasut wrote:
> On 3/22/20 4:08 AM, Sean Anderson wrote:
>> On 3/21/20 11:04 PM, Marek Vasut wrote:
>>> Could be a different revision of the IP. This is usually handled by
>>> using SoC-specific compatible strings, see e.g. Linux
>>> Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml
>>>
>>> You don't want to encode register layout in the DT.
>>
>> Ok, then I think adding compatible strings would be the cleanest.
>>
>>>
>>>> It is possible to
>>>> add several compatible strings like "kendryte,k210-spi3".
>>>
>>> Why ?
>>
>> See below.
>>
>>>
>>>> I chose this
>>>> method because the bitfields are different for spi0 and spi1, spi2, and
>>>> spi3. If there are other incompatibilities discovered, then it may make
>>>> more sense to use different strings. Another option could have been to
>>>> use the DW_SPI_VERSION field to detect different controllers, but it is
>>>> the same among all the controllers on the K210. 
>>>
>>> The controllers on the same SoC have different register layout ?
>>>
>>
>> Yup!
>>
>> Don't ask me why.
> 
> Now that is truly an odd design. Is there a datasheet for this SoC ?

Nope. Everything has been done referencing their sdk.

In hindsight, porting this board was a poor decision because of all the
hoops I've had to jump through due to the absence of documentation.
Unfortunately, it's probably the only budget risc-v board with S-mode
until the end of the year or so.

> You might be able to somehow enumerate those controllers in DT and
> derive their layout from that enumeration or somesuch I think.

So like derive it from the sequence number? I'd rather do this in a more
standard way, if possible.

--Sean

  reply	other threads:[~2020-03-22  3:33 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05 19:19 [PATCH v1 0/8] riscv: Add SPI support for Kendryte K210 Sean Anderson
2020-03-05 19:19 ` [PATCH v1 1/8] doc: Fix typo in FIT documentation Sean Anderson
2020-03-22  1:52   ` Marek Vasut
2020-03-23 13:58     ` Tom Rini
2020-03-05 19:19 ` [PATCH v1 2/8] spi: dw: Add device tree properties for fields in CTRL0 Sean Anderson
2020-03-22  1:51   ` Marek Vasut
2020-03-22  2:36     ` Sean Anderson
2020-03-22  3:04       ` Marek Vasut
2020-03-22  3:08         ` Sean Anderson
2020-03-22  3:13           ` Marek Vasut
2020-03-22  3:33             ` Sean Anderson [this message]
2020-03-22  4:22               ` Marek Vasut
2020-03-05 19:19 ` [PATCH v1 3/8] spi: dw: Rename "cs-gpio" to "cs-gpios" Sean Anderson
2020-04-02 12:17   ` Jagan Teki
2020-04-02 12:33     ` Sean Anderson
2020-03-05 19:19 ` [PATCH v1 4/8] spi: dw: Use generic function to read reg address Sean Anderson
2020-04-02 12:24   ` Jagan Teki
2020-04-02 12:32     ` Sean Anderson
2020-03-05 19:19 ` [PATCH v1 5/8] spi: dw: Speed up transfer loops Sean Anderson
2020-03-22  1:49   ` Marek Vasut
2020-03-22  3:54     ` Sean Anderson
2020-03-05 19:19 ` [PATCH v1 6/8] spi: dw: Add mem_ops Sean Anderson
2020-03-05 22:15   ` Eugeniy Paltsev
2020-03-06  0:48     ` Sean Anderson
2020-03-06 17:03       ` Eugeniy Paltsev
2020-03-06 20:36         ` Sean Anderson
2020-03-06 21:20         ` Sean Anderson
2020-03-12 16:01           ` Eugeniy Paltsev
2020-03-05 19:19 ` [PATCH v1 7/8] riscv: Add device tree bindings for SPI Sean Anderson
2020-03-22  1:55   ` Marek Vasut
2020-03-22  2:39     ` Sean Anderson
2020-03-05 19:19 ` [PATCH v1 8/8] riscv: Add support for SPI on Kendryte K210 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=bf9b2194-37c2-1ce0-cedd-d4048d8a79f7@gmail.com \
    --to=seanga2@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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