[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdW_aTKtrUnGqf3DB=fr0ZxTsjoEjMmwSpPqhwjs-Tz7ig@mail.gmail.com>
Date: Mon, 6 Jul 2020 17:10:25 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Adrian Fiergolski <adrian.fiergolski@...tree3d.com>
Cc: Lukas Wunner <lukas@...ner.de>, Mark Brown <broonie@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
linux-spi <linux-spi@...r.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/2] dt-bindings: Add documentation for SPI daisy chain driver.
Hi Adrian,
On Mon, Jul 6, 2020 at 11:23 AM Adrian Fiergolski
<adrian.fiergolski@...tree3d.com> wrote:
> Add documentation for SPI daisy chain driver.
>
> Signed-off-by: Adrian Fiergolski <adrian.fiergolski@...tree3d.com>
Thanks for your patch!
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/spi/spi-daisy_chain.txt
> @@ -0,0 +1,56 @@
> +spi-daisy_chain : The driver handling SPI daisy chains.
> +-----------------------------------------------------------
> +
> +Required properties:
> +- compatible : Should be "spi,daisy_chain"
> +- reg : Chip select assigned to the chain
> +
> + For the SPI devices on a common SPI chain - nodes of daisy_chain):
> +- spi-daisy-chain-len : Length (in bytes) of the SPI transfer,
> + when the SPI device is part of a device chain.
> +- spi-daisy-chain-noop : Byte string of no-operation command which should
> + be send when device is not addressed during the
> + given SPI transfer
The above two properties are device-specific, and the same for all
devices of the same type, thus leading to duplication.
Hence I think this should not be specified in DT, but instead handled
by the driver. I.e. for Linux, you would retrieve this from struct
spi_device, as filled in by the slave driver.
> +
> +Optional properties:
> + (for the SPI devices on a common SPI chain (nodes of daisy_chain):
> +- spi-daisy-chain-bits_per_word : no-operation transfers involve
> + one or more words; word sizes like
> + eight or 12 bits are common.
> + In-memory wordsizes are powers of two
> + bytes (e.g. 20 bit samples use 32 bits).
> + If not defined, it is assumed to be 8.
Same here.
> +Example:
> +
> + daisy_chain0: daisy_chain@0 {
> + compatible = "spi,daisy_chain";
> + spi-max-frequency = <10000000>;
> + reg = <0>;
> +
> + dac0: ltc2632@0 {
> + compatible = "lltc,ltc2634-l12";
> + spi-daisy-chain-len = <4>;
> + spi-daisy-chain-noop = [00 F0 00 00];
> + };
> + dac1: ltc2632@1 {
> + compatible = "lltc,ltc2634-l12";
> + spi-daisy-chain-len = <4>;
> + spi-daisy-chain-noop = [00 F0 00 00];
> + };
> + dac2: ltc2632@2 {
> + compatible = "lltc,ltc2634-l12";
> + spi-daisy-chain-len = <4>;
> + spi-daisy-chain-noop = [00 F0 00 00];
> + };
> + };
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists