[PATCH] SPI: BCM2835: enable support of 3-wire mode
kernel at martin.sperl.org
Thu Mar 19 23:17:42 PDT 2015
> On 20.03.2015, at 06:12, Stephen Warren <swarren at wwwdotorg.org> wrote:
> I can see how that tells the HW which direction to transfer data in
> 3WIRE mode, but how does the HW know whether it's in 3WIRE mode or has
> separate RX/TX lines?
The HW assumes with this flag that MISO (=RX) sits on the same physical
line as MOSI (=TX). This flag essentially just changes directions of
the TX GPIO pin from out to in and samples the level on the TX pin.
Without this patch what you would need to do to make such a device
work is connecting RX with TX and that with the MIMO pin of the final
device (maybe add a pullup). This flag is essentially just a shortcut.
Note that the SPI-framework does the testing so that either RX or TX
can be set in SPI-3WIRE mode (not both).
More information about the linux-rpi-kernel