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 22:36:58 -0400	[thread overview]
Message-ID: <6d4919a2-d647-7df8-bb42-4ddd3ca1b194@gmail.com> (raw)
In-Reply-To: <be88f6b1-6607-96ba-440f-67410a6c662a@denx.de>

On 3/21/20 9:51 PM, Marek Vasut wrote:
> On 3/5/20 8:19 PM, Sean Anderson wrote:
>> Some devices have different layouts for the fields in CTRL0 (e.g. the
>> Kendryte K210). Allow this layout to be configurable from the device tree.
>> The documentation has been taken from Linux.
>>
>> Signed-off-by: Sean Anderson <seanga2@gmail.com>
>> Reviewed-by: Simon Glass <sjg@chromium.org>
> 
> Can't you just have different compatible string for each SoC and derive
> the various fields based on that compatible string, instead of
> describing all the register bitfields in DT ?
> 
> What does Linux do ?
> 

Linux only supports socfpga boards. I don't know if there is any
rhyme/reason to the shifting around of these fields. It is possible to
add several compatible strings like "kendryte,k210-spi3". 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. 

--Sean

  reply	other threads:[~2020-03-22  2:36 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 [this message]
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
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=6d4919a2-d647-7df8-bb42-4ddd3ca1b194@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