lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240630-generous-carnation-c534f5d84a8a@spud>
Date: Sun, 30 Jun 2024 14:51:57 +0100
From: Conor Dooley <conor@...nel.org>
To: Kanak Shilledar <kanakshilledar@...il.com>
Cc: kanakshilledar111@...tonmail.com, Serge Semin <fancer.lancer@...il.com>,
	Mark Brown <broonie@...nel.org>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Jisheng Zhang <jszhang@...nel.org>, Guo Ren <guoren@...nel.org>,
	Fu Wei <wefu@...hat.com>, Paul Walmsley <paul.walmsley@...ive.com>,
	Palmer Dabbelt <palmer@...belt.com>,
	Albert Ou <aou@...s.berkeley.edu>, linux-spi@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-riscv@...ts.infradead.org
Subject: Re: [PATCH] arch: riscv: thead: implement basic spi

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@...il.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.

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ