1 From e95bf039347d97f57e7045d7cd2d1f7e4daed1c6 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Fri, 1 Jul 2016 22:09:24 +0100
4 Subject: [PATCH 421/423] spi-bcm2835: Disable forced software CS
6 Select software CS in bcm2708_common.dtsi, and disable the automatic
7 conversion in the driver to allow hardware CS to be re-enabled with an
10 See: https://github.com/raspberrypi/linux/issues/1547
12 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
14 arch/arm/boot/dts/bcm2708_common.dtsi | 2 +-
15 drivers/spi/spi-bcm2835.c | 2 ++
16 2 files changed, 3 insertions(+), 1 deletion(-)
18 --- a/arch/arm/boot/dts/bcm2708_common.dtsi
19 +++ b/arch/arm/boot/dts/bcm2708_common.dtsi
21 * add more gpios if necessary as <&gpio 6 1>
22 * (but do not forget to make them output!)
24 - cs-gpios = <0>, <0>;
25 + cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
29 --- a/drivers/spi/spi-bcm2835.c
30 +++ b/drivers/spi/spi-bcm2835.c
31 @@ -707,6 +707,7 @@ static int bcm2835_spi_setup(struct spi_
36 /* now translate native cs to GPIO */
37 /* first look for chip select pins in the devices pin groups */
38 for (pingroup_index = 0;
39 @@ -761,6 +762,7 @@ static int bcm2835_spi_setup(struct spi_
40 * so we are setting it here explicitly
42 gpio_set_value(spi->cs_gpio, (spi->mode & SPI_CS_HIGH) ? 0 : 1);