linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Kanak Shilledar <kanakshilledar@gmail.com>
Cc: kanakshilledar111@protonmail.com,
	Serge Semin <fancer.lancer@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jisheng Zhang <jszhang@kernel.org>, Guo Ren <guoren@kernel.org>,
	Fu Wei <wefu@redhat.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org
Subject: Re: [PATCH] arch: riscv: thead: implement basic spi
Date: Sun, 30 Jun 2024 14:51:57 +0100	[thread overview]
Message-ID: <20240630-generous-carnation-c534f5d84a8a@spud> (raw)
In-Reply-To: <20240630063845.116307-1-kanakshilledar@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1826 bytes --]

On Sun, Jun 30, 2024 at 12:08:20PM +0530, Kanak Shilledar wrote:
> implemented basic spi support for TH1520 SoC.
> created a fixed clock and a simple spi0 node.
> updated the matching binding to include thead,th1520-spi as compatible.
> added a spidev device in devicetree which will utilise the spi0 node.
> this is usually reserved for a SPI NOR flash which is left unpopulated
> underneath the carrier board. I performed a SPI self loop test using
> tools/spi/spidev_test.c and tried sending `\xDE\xAD\xBE\xEF` and verified
> it is being received correctly. i updated the of_device_id struct in
> drivers/spi/spi-dw-mmio.c to include "thead,th1520-spi" as the compatible.
> this patch also adds basic spi support on beaglev ahead which shares the
> same TH1520 SoC. i have only tested on LicheePi 4A.
> 
> Signed-off-by: Kanak Shilledar <kanakshilledar@gmail.com>
> ---
>  .../devicetree/bindings/spi/snps,dw-apb-ssi.yaml |  4 ++++
>  .../boot/dts/thead/th1520-beaglev-ahead.dts      |  9 +++++++++
>  .../boot/dts/thead/th1520-lichee-module-4a.dtsi  |  4 ++++
>  .../riscv/boot/dts/thead/th1520-lichee-pi-4a.dts | 10 ++++++++++
>  arch/riscv/boot/dts/thead/th1520.dtsi            | 16 ++++++++++++++++
>  drivers/spi/spi-dw-mmio.c                        |  1 +

This needs to be 3 different patches - one for the binding, one for the
driver and a final one for the dts files.

> +
> +&spi0 {
> +	status = "okay";
> +	spidev@0 {

"spidev" is not a type of device, the nodename should match the type.

> +		compatible = "rohm,dh2228fv";
> +		reg = <0>;
> +		spi-max-frequency = <500000>;
> +	};
> +};

I'll put money on you not having a dh2228fv on this board. Document what
you actually have on it please, not what allows you to probe the spidev
driver in linux.

Thanks,
Conor.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2024-06-30 13:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-30  6:38 [PATCH] arch: riscv: thead: implement basic spi Kanak Shilledar
2024-06-30 13:51 ` Conor Dooley [this message]
2024-07-01  9:13   ` Kanak Shilledar
2024-07-01  9:33     ` Conor Dooley
2024-07-01  9:36       ` Kanak Shilledar

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=20240630-generous-carnation-c534f5d84a8a@spud \
    --to=conor@kernel.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=fancer.lancer@gmail.com \
    --cc=guoren@kernel.org \
    --cc=jszhang@kernel.org \
    --cc=kanakshilledar111@protonmail.com \
    --cc=kanakshilledar@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh@kernel.org \
    --cc=wefu@redhat.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 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).