Re: [PATCH] arch: riscv: thead: implement basic spi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> ---
>  .../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: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux