Wiring up an ili9341 2.4" TFT LCD display to the Black

I’m trying to drive a ili9341 display via the frame buffer, but have hit a snag. There are a number of gpio pins I want to use the are already exported.

bone$ cd /sys/class/gpio/
/sys/class/gpio /sys/devices/platform/ocp
bone$ ls
export gpio116 gpio22 gpio35 gpio46 gpio62 gpio70 gpio78 gpio89
gpio10 gpio117 gpio23 gpio36 gpio47 gpio63 gpio71 gpio79 gpio9
gpio11 gpio12 gpio3 gpio37 gpio48 gpio65 gpio72 gpio8 gpiochip0
gpio110 gpio13 gpio30 gpio38 gpio49 gpio66 gpio73 gpio80 gpiochip32
gpio111 gpio14 gpio31 gpio39 gpio5 gpio67 gpio74 gpio81 gpiochip64
gpio113 gpio15 gpio32 gpio4 gpio50 gpio68 gpio75 gpio86 gpiochip96
gpio114 gpio2 gpio33 gpio44 gpio51 gpio69 gpio76 gpio87 unexport
gpio115 gpio20 gpio34 gpio45 gpio60 gpio7 gpio77 gpio88

I can’t unexport them.

bone$ echo 115 > unexport
-bash: echo: write error: Invalid argument

How do I reclaim these?


bone$ sudo /opt/scripts/tools/version.sh
dogtag:[BeagleBoard.org Debian Image 2018-07-29]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2018.03-00002-gac9cce7c6a]:[location: dd MBR]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade ]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal i2c bluetooth netdev cloud9ide gpio pwm eqep admin spi tisdk weston-launch xenomai]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet]
dmesg | grep pinctrl-single
[ 1.046339] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
dmesg | grep gpio-of-helper
[ 1.057509] gpio-of-helper ocp:cape-universal: ready

Robert Nelson has answered my question. There are a number of pins already used on the BeagleBone Green Wireless that can’t otherwise be used.

I’ve made a list of them[1].


[1] EBC Exercise 10b Green Wireless Pins Used - eLinux.org

We should add a few details,

P8_11, P8_16, and P8_15 can be recovered, by sticking the wl1835 wifi
module in 1-bit mode vs 4-bit mode..

sudo rm /lib/firmware/BB-BBGW-WL1835-00A0.dtbo
sudo cp /lib/firmware/BB-BBGW-WL1835-1BIT-00A0.dtbo

P8_12 = WL1835: mmc2_dat0
P8_18 = WL1835: mmc2_clk

P8_14 = WL1835: Wireless enabled
P8_17 = WL1835: Wireless IRQ

P9_12 = WL1835: Bluetooth enabled

P8_26, P9_30 are "gpio hogged" at startup, not user changeable.

P9_28, P9_29, and P9_31 are used by audio, which isn't actually used,
but tied up..

@mark, random thought, do you want to try booting with
P9_28/P9_29/P9_31 removed from bbgw..

for example..



Okay, wifi/bluetooth correctly came up on restart and cold boot with
those pins removed from the overlay.

Give them a try with a spi device connected up. If they work without
breaking the wl1835, we will just nuke those 3 audio pins..


I’ve updated the page[1], but didn’t know what to say about recovering
P8_12, P8_18, P8_1,4, P8_17 and P9_12.

Do you have to edit the device tree?


[1] EBC Exercise 10b Green Wireless Pins Used - eLinux.org

How do I removed the audio pins so I can test it?