Re: [PATCH V2 2/2] spi: dual and quad support(device tree)

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

 




Hi, Tomasz

2013/8/31 Tomasz Figa <tomasz.figa@xxxxxxxxx>:
> Hi,
>
> [Ccing DT binding maintainers]
>
> On Tuesday 27 of August 2013 08:50:03 wangyuhang wrote:
>> Add spi-tmax-nbits and spi-rmax-nbits for spi slave node.
>> Modify the related dt document(spi-bus.txt)
>>  spi-tmax-nbits:Max number of bits slave will use for MOSI(writting)
>>  spi-rmax-nbits:Max number of bits slave will use for MISO(reading)
>> Support for spi-tx/rmax-nbits in SPI framework has been picked[1].
>> [1]: http://comments.gmane.org/gmane.linux.kernel.spi.devel/14420
>> Commit Id:f477b7fb13df2b843997559ff34e87d054ba6538
>>
>> Signed-off-by: wangyuhang <wangyuhang2014@xxxxxxxxx>
>> ---
>>  Documentation/devicetree/bindings/spi/spi-bus.txt |   16
>> ++++++++++++++++ 1 file changed, 16 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt
>> b/Documentation/devicetree/bindings/spi/spi-bus.txt index
>> 296015e..211336c 100644
>> --- a/Documentation/devicetree/bindings/spi/spi-bus.txt
>> +++ b/Documentation/devicetree/bindings/spi/spi-bus.txt
>> @@ -55,6 +55,22 @@ contain the following properties.
>>               chip select active high
>>  - spi-3wire       - (optional) Empty property indicating device
>> requires 3-wire mode.
>> +- spi-tmax-nbits  - (optional) Max number of bits slave will use for
>> +                 MOSI(writting)
>> +- spi-rmax-nbits  - (optional) Max number of bits slave will use for
>> +                 MISO(reading)
>
> May I ask for more human-readable names, please?
>
> If we look around, there are already devices using bus-width property, so
> for consistency we could use tx-bus-width and rx-bus-width here or even a
> single bus-width property taking two cells, first tx and second rx?
>
Yes, you are right. bus_width is really more widely used. So I will correct it.

> Let's hear others' opinion on this as well.
>
> Also the properties should be telling information about hardware, so
> probably in this case the meaning would be the number of wires that are
> physically wired on the board.
>
>> +
>
> One or two sentences about what this dual/quad thing is about would be
> nice here, e.g.
>
>         Some SPI controllers and devices support Dual and/or Quad SPI
>         mode, which is [...]. It allows [...], etc.
>
OK, Thanks.

>> +So if for example the slave has 4 wires for writting and 2 wires for
>> reading, +and the spi-tx/rx-nbits property should be set as follows:
>> +
>> +spi-tmax-nbits = <4>;
>> +spi-rmax-nbits = <2>;
>> +
>> +Now the value that spi-tmax-nbits and spi-rmax-nbits can receive is
>> only +1(single), 2(dual) and 4(quad). If you don't set spi-tmax-nbits
>> or spi-rmax-nbits, +spi_device mode will be set in single(1 wire) as
>> default. Another point, if +property:spi-3wire is set, spi-t/rmax-nbits
>> is forbidden to set to <2 or 4>, +otherwise, an errro will return.
>
> typo: errro
>
> Also an error or "returning an error" is an OS specific term. This
> statement should rather be something along
>
>         Dual/Quad mode is not allowed when 3-wire mode is used.
>
Got it, Thanks a lot.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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