ADAFRUIT 2.4" LCD on SPI0

I have an ADAFRUIT 3.4" LCD display that works on SPI1 using [1]. When switching it to SPI0 and [2] I get the following error.

[ +0.064441] omap2_mcspi 48030000.spi: chipselect 0 already in use
[ +0.006268] spi_master spi0: spi_device register error /ocp/spi@48030000/channel@0
[ +0.007651] spi_master spi0: Failed to create SPI device for /ocp/spi@48030000/channel@0

Any ideas what’s up? The backlight works, but the LCD doesn’t display anything.

[1] bb.org-overlays/BB-LCD-ADAFRUIT-24-SPI1-00A0.dts at master · beagleboard/bb.org-overlays · GitHub

[2] bb.org-overlays/BB-LCD-ADAFRUIT-24-SPI0-00A0.dts at master · beagleboard/bb.org-overlays · GitHub

sudo /opt/scripts/tools/version.sh
[sudo] password for debian:
git:/opt/scripts/:[ef16ffa8c27225005cc2b2c974a83da3dee6c1ef]
eeprom:[A335BNLT0A5A1513BBBK3586]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Buster IoT Image 2020-08-31]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2019.04-00002-gc9b3922522]:[location: dd MBR]
UBOOT: Booted Device-Tree:[am335x-boneblack-uboot-univ.dts]
UBOOT: Loaded Overlay:[AM335X-PRU-RPROC-4-19-TI-00A0]
UBOOT: Loaded Overlay:[BB-ADC-00A0]
UBOOT: Loaded Overlay:[BB-BONE-eMMC1-01-00A0]
UBOOT: Loaded Overlay:[BB-LCD-ADAFRUIT-24-SPI0-00A0]
kernel:[4.19.94-ti-r50]
nodejs:[v10.21.0]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr4=BB-LCD-ADAFRUIT-24-SPI0-00A0.dtbo]
uboot_overlay_options:[disable_uboot_overlay_video=1]
uboot_overlay_options:[uboot_overlay_pru=AM335X-PRU-RPROC-4-19-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade ]
pkg:[bb-cape-overlays]:[4.14.20200814.0-0~buster+20200814]
pkg:[bb-wl18xx-firmware]:[1.20200813.1-0~buster+20200813]
pkg:[kmod]:[26-1]
pkg:[librobotcontrol]:[1.0.5-git20200715.0-0~buster+20200716]
pkg:[firmware-ti-connectivity]:[20190717-2rcnee1~buster+20200305]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal input bluetooth netdev i2c gpio admin spi iio docker tisdk weston-launch xenomai cloud9ide pwm eqep remoteproc]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet]
dmesg | grep remote
[ 64.629243] remoteproc remoteproc0: wkup_m3 is available
[ 64.647970] remoteproc remoteproc0: powering up wkup_m3
[ 64.648005] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217168
[ 64.648293] remoteproc remoteproc0: remote processor wkup_m3 is now up
[ 66.850264] remoteproc remoteproc1: 4a334000.pru is available
[ 66.866379] remoteproc remoteproc2: 4a338000.pru is available
dmesg | grep pru
[ 66.850264] remoteproc remoteproc1: 4a334000.pru is available
[ 66.851362] pru-rproc 4a334000.pru: PRU rproc node pru@4a334000 probed successfully
[ 66.866379] remoteproc remoteproc2: 4a338000.pru is available
[ 66.866574] pru-rproc 4a338000.pru: PRU rproc node pru@4a338000 probed successfully
dmesg | grep pinctrl-single
[ 0.926234] pinctrl-single 44e10800.pinmux: 142 pins, size 568
dmesg | grep gpio-of-helper
[ 0.939877] gpio-of-helper ocp:cape-universal: ready
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
END

It turns out P9_19 and P9_20 default to i2c. I changed the .dts file to set them to gpio and the display works on SPI0.

–Mark