u-boot/drivers
Rasmus Villemoes 10a6aa963c spi: mpc8xxx_spi.c: fix cs activate/deactivate
Somewhere between v2020.04 and v2020.07 the mpc8xxx_spi driver broke,
I'm guessing due to this hunk

@@ -559,6 +560,8 @@ int dm_gpio_set_dir_flags(struct gpio_desc *desc, ulong flags)
        if (ret)
                return ret;

+       /* combine the requested flags (for IN/OUT) and the descriptor flags */
+       flags |= desc->flags;
        ret = _dm_gpio_set_dir_flags(desc, flags);

from commit 695e5fd546 ("gpio: update dir_flags management"). But
the blame is mostly on the driver itself which seems rather confused:
The chip select gpios are requested with GPIOD_ACTIVE_LOW, but then in
each activate/deactivate, dm_gpio_set_dir_flags() is called with
merely GPIOD_IS_OUT, and then the driver call set_value(0) for
activate.

That used to work, but with the above hunk, the ACTIVE_LOW setting
from the request becomes persistent, so the gpio driver ends up being
asked to set the value to 1 in mpc8xxx_spi_cs_activate().

So drop the dm_gpio_set_dir_flags() calls in the activate/deactivate
functions, and use a value of 1 to mean "logically enabled".

Ideally, I think we should also drop the GPIOD_ACTIVE_LOW from the
request and make it up to the list of gpio cs in DT to indicate
whether that CS is enabled when driven low (as is of course usually
the case), but that requires changing
arch/powerpc/dts/gdsys/gazerbeam-base.dtsi among others, and I don't
have that hardware to test on. I have, however, tested our
own (mpc8309-based) hardware with this change, and I have also tested
that removing the GPIOD_ACTIVE_LOW from the request and updating our
DT as

-                       gpios = <&spisel 0 0>;
+                       gpios = <&spisel 0 GPIO_ACTIVE_LOW>;

still works.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2020-09-22 11:05:32 -04:00
..
adc adc: Drop dm.h header file 2020-08-03 22:19:54 -04:00
ata Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell 2020-08-25 13:38:29 -04:00
axi common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
bios_emulator common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
block xen: pvblock: Add initial support for para-virtualized block driver 2020-08-14 15:18:30 -04:00
board common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
bootcount bootcount_ext: Add Ext4 build dependency 2020-06-02 17:27:04 -04:00
bus bus: uniphier-system-bus: move hardware init from board files 2020-07-11 21:30:21 +09:00
button dm: button: add a driver for button driven by gpio 2020-07-28 19:30:39 -06:00
cache common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
clk clk: mt7622: add needed clocks for ssusb-node 2020-08-24 14:11:31 -04:00
core dm: core: Add API to read PCI bus-range property 2020-08-25 05:41:09 +02:00
cpu cpu: Convert the methods to use a const udevice * 2020-07-25 14:46:57 -06:00
crypto crypto/fsl: add RNG support 2020-07-27 14:16:29 +05:30
ddr imx8m: ddrphy_utils: Improve coding style 2020-07-27 14:02:28 +02:00
demo common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
dfu dfu: fix dfu tftp on sandbox 2020-09-01 14:47:43 +02:00
dma treewide: convert devfdt_get_addr() to dev_read_addr() 2020-07-25 14:46:57 -06:00
fastboot fastboot: getvar: fix partition-size return value 2020-09-01 14:47:43 +02:00
firmware firmware: ti_sci: Drop unused structure ti_sci_rm_type_map 2020-08-31 14:39:39 +05:30
fpga xilinx: zynqmp: synchronize firmware call return payload 2020-08-20 09:49:20 +02:00
gpio treewide: convert devfdt_get_addr_ptr() to dev_read_addr_ptr() 2020-08-22 08:53:37 -06:00
hwspinlock common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
i2c Link failure with CONFIG_SPL and CONFIG_I2C_MUX_PCA954x 2020-08-25 06:25:42 +02:00
input treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
led led: led_cortina: Add CAxxx LED support 2020-08-07 22:31:32 -04:00
mailbox xilinx: zynqmp: fix incorrect map not align with IPI HW 2020-08-20 09:49:20 +02:00
memory memory: stm32-fmc2-ebi: add STM32 FMC2 EBI controller driver 2020-08-13 09:53:34 +02:00
misc i2c: eeprom: Use reg property instead of offset and size 2020-08-20 09:49:20 +02:00
mmc mmc: fsl_esdhc_imx: check the clock stable status after config the clock rate. 2020-09-17 14:41:07 +02:00
mtd mtd: nand: Fix nand write error with bad block addresses above 32-bit 2020-09-11 17:13:56 -04:00
net bcmgenet: Add support for rgmii-rxid 2020-09-08 16:43:48 +02:00
nvme nvme: Invalidate dcache before submitting admin cmd 2020-06-23 14:43:23 -04:00
pch common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pci PCI: mediatek: Release the resource when PCIe enable port fail 2020-09-10 15:32:09 -04:00
pci_endpoint Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq 2020-07-27 15:18:15 -04:00
phy phy: marvell: a3700: add sata comphy on lane 2 with invert option 2020-09-04 14:02:00 +02:00
pinctrl x86: pinctrl: Fix 'relatove' typo 2020-09-01 17:00:27 +08:00
power power: Tidy up inclusion of regulator_common.h 2020-08-03 22:19:54 -04:00
pwm treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
qe treewide: convert bd_t to struct bd_info by coccinelle 2020-07-17 09:30:13 -04:00
ram ram: sifive: Fix compiler warnings for 32-bit 2020-08-25 09:33:16 +08:00
remoteproc common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
reset treewide: convert devfdt_get_addr_ptr() to dev_read_addr_ptr() 2020-08-22 08:53:37 -06:00
rng rng: stm32mp1: use log() instead of printf() 2020-09-18 22:23:58 +02:00
rtc treewide: convert devfdt_get_addr() to dev_read_addr() 2020-07-25 14:46:57 -06:00
scsi common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
serial serial: sh: Improve FIFO empty check on RX 2020-09-01 14:46:41 +02:00
smem common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
soc soc: soc_ti_k3: Add device identification for J7200 SoC 2020-08-11 20:34:46 +05:30
sound sound: Add an ACPI driver for Maxim MAX98357ac 2020-07-17 14:32:24 +08:00
spi spi: mpc8xxx_spi.c: fix cs activate/deactivate 2020-09-22 11:05:32 -04:00
spmi treewide: convert devfdt_get_addr() to dev_read_addr() 2020-07-25 14:46:57 -06:00
sysreset treewide: convert devfdt_get_addr_ptr() to dev_read_addr_ptr() 2020-08-22 08:53:37 -06:00
tee drivers: tee: broadcom: add optee based bnxt fw load driver 2020-07-29 10:37:11 -04:00
thermal thermal: imx_scu_thermal: prevent boot hang with zero pdata 2020-05-22 13:29:25 +02:00
timer treewide: convert devfdt_get_addr_ptr() to dev_read_addr_ptr() 2020-08-22 08:53:37 -06:00
tpm drivers: rename drivers to match compatible string 2020-07-09 18:57:22 -06:00
ufs ufs: Drop dm.h header file 2020-08-03 22:19:54 -04:00
usb fastboot: Fix fastboot reboot fail by changing functions order 2020-09-01 14:47:43 +02:00
video Convert CONFIG_SPLASH_SCREEN et al to Kconfig 2020-08-23 13:43:10 -04:00
virtio virtio_blk: set log2blksz correctly 2020-08-24 14:11:31 -04:00
w1 treewide: convert devfdt_get_addr() to dev_read_addr() 2020-07-25 14:46:57 -06:00
w1-eeprom common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
watchdog watchdog: Add reset support for OcteonTX / TX2 2020-08-25 08:01:16 +02:00
xen xen: Code style conformity 2020-08-24 14:11:31 -04:00
Kconfig xen: pvblock: Add initial support for para-virtualized block driver 2020-08-14 15:18:30 -04:00
Makefile xen: Port Xen hypervisor related code from mini-os 2020-08-14 15:18:30 -04:00