brcm2708-gpu-fw: update to latest version
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.4 / 0421-spi-bcm2835-Disable-forced-software-CS.patch
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
5
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
8 overlay.
9
10 See: https://github.com/raspberrypi/linux/issues/1547
11
12 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
13 ---
14 arch/arm/boot/dts/bcm2708_common.dtsi | 2 +-
15 drivers/spi/spi-bcm2835.c | 2 ++
16 2 files changed, 3 insertions(+), 1 deletion(-)
17
18 --- a/arch/arm/boot/dts/bcm2708_common.dtsi
19 +++ b/arch/arm/boot/dts/bcm2708_common.dtsi
20 @@ -183,7 +183,7 @@
21 * add more gpios if necessary as <&gpio 6 1>
22 * (but do not forget to make them output!)
23 */
24 - cs-gpios = <0>, <0>;
25 + cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
26 };
27
28 i2c0: i2c@7e205000 {
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_
32 return -EINVAL;
33 }
34
35 +#if 0
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
41 */
42 gpio_set_value(spi->cs_gpio, (spi->mode & SPI_CS_HIGH) ? 0 : 1);
43 +#endif
44
45 return 0;
46 }