From fe9d56c1618608c6f0bb6088c80695c8748f7b37 Mon Sep 17 00:00:00 2001 From: Joris van Rantwijk Date: Fri, 4 Oct 2024 17:14:47 +0200 Subject: [PATCH] Add SPI devices in devicetree --- sw/devicetree/redpitaya_puzzlefw.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sw/devicetree/redpitaya_puzzlefw.dts b/sw/devicetree/redpitaya_puzzlefw.dts index 83b5415..2966586 100644 --- a/sw/devicetree/redpitaya_puzzlefw.dts +++ b/sw/devicetree/redpitaya_puzzlefw.dts @@ -169,6 +169,21 @@ status = "okay"; is-decoded-cs = <0>; num-cs = <3>; + + // The SPI ports of both ADC chips on the Red Pitaya 4-input board + // are connected, via the FPGA, to the PS SPI0 master. + adca@0 { + // We use a fake compatible string to work around + // a limitation in the Linux spidev driver. + compatible = "rohm,dh2228fv"; + reg = <0>; + spi-max-frequency = <4000000>; + }; + adcb@1 { + compatible = "rohm,dh2228fv"; + reg = <1>; + spi-max-frequency = <4000000>; + }; }; &spi1 {