Hi all! I'm hoping someone can point me in the right direction here. I haven't been able to find noob-friendly docs on using device tree overlays. Most of the docs for bbb refer to the capemanager which I now know is no longer used.
I'd like to get this TFT <https://learn.adafruit.com/adafruit-2-dot-8-color-tft-touchscreen-breakout-v2> display working with the pocketbeagle using fbtft <https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/tree/drivers/staging/fbtft?h=staging-testing>. I wasn't able to get either of these examples working: https://gist.github.com/jadonk/1b6a3c17059fe5a1977f3d1e5d12f916 https://gist.github.com/jadonk/fe636e79c691525ab2960bf5dd7956cf I hooked everything up except the buttons as in the first link. Loading the fbtft module: sudo rmmod fbtft_device fb_ili9341 fbtft sudo modprobe fbtft_device name=adafruit28 busnum=2 cs=1 rotate=90 gpios=dc:45,reset:86 Produces this in dmesg [ 195.378472] fbtft: module is from the staging directory, the quality is unknown, you have been warned. [ 195.394949] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned. [ 195.398240] spidev spi1.0: spidev spi1.0 24000kHz 8 bits mode=0x00 [ 195.398267] spidev spi2.0: spidev spi2.0 24000kHz 8 bits mode=0x00 [ 195.398280] spidev spi2.1: spidev spi2.1 24000kHz 8 bits mode=0x00 [ 195.398504] spidev spi2.1: Deleting spi2.1 [ 195.399531] fbtft_device: GPIOS used by 'adafruit28': [ 195.399546] fbtft_device: 'reset' = GPIO86 [ 195.399554] fbtft_device: 'dc' = GPIO45 [ 195.399568] spidev spi1.0: spidev spi1.0 24000kHz 8 bits mode=0x00 [ 195.399580] spidev spi2.0: spidev spi2.0 24000kHz 8 bits mode=0x00 [ 195.399591] spi spi2.1: fb_ili9341 spi2.1 32000kHz 8 bits mode=0x00 [ 195.447747] fb_ili9341: module is from the staging directory, the quality is unknown, you have been warned. [ 195.454803] fb_ili9341 spi2.1: fbtft_request_gpios: gpio_request_one('reset'=86) failed with -16 [ 195.463981] fb_ili9341: probe of spi2.1 failed with error -16 I guess that makes sense, the gpios are being used by the 'enable_uboot_cape_universal=1' in /boot/uEnv.txt. Not sure that statement even makes sense. I'm guessing I need an dts overlay to set the reset and dc pins to be used with the display. I tried compiling the dts in the first gist <https://gist.githubusercontent.com/jadonk/1b6a3c17059fe5a1977f3d1e5d12f916/raw/463317783f8f24702bdf85682dac312c2f9086a6/am335x-pocketbeagle-simplegaming.dts> (without modification) without success: $ cd ~ $ dtc -W no-unit_address_vs_reg -@ -I dts -O dtb -o /lib/firmware/am335x-pocketbeagle-simplegaming.dtbo am335x-pocketbeagle-simplegaming.dts Error: am335x-pocketbeagle-simplegaming.dts:3.1-9 syntax error FATAL ERROR: Unable to parse input tree Then I tried the dts in the second gist <https://gist.githubusercontent.com/jadonk/fe636e79c691525ab2960bf5dd7956cf/raw/9a01d0c06f31f31727e72ec6210c6764abec63b6/am335x-spilcd-adafruit28.dts>. There are two and I have no idea which is needed. The README.md provided a command to compile so I'll go with that. $ cd ~ $ sudo dtc -W no-unit_address_vs_reg -@ -I dts -O dtb -o /lib/firmware/am335x-spilcd-adafruit28.dtbo am335x-spilcd-adafruit28.dts That seems to work. Things seem to be correct for my display in that dts file. Next I edit /boot/uEnv.txt and set this: ###Custom Cape dtb_overlay=/lib/firmware/am335x-spilcd-adafruit28.dtbo I'm not sure if that is correct and can't find any docs on where uboot expects files to be. Seems like it could go on any of these lines: ###Overide capes with eeprom #uboot_overlay_addr0=/lib/firmware/<file0>.dtbo #uboot_overlay_addr1=/lib/firmware/<file1>.dtbo #uboot_overlay_addr2=/lib/firmware/<file2>.dtbo #uboot_overlay_addr3=/lib/firmware/<file3>.dtbo ### ###Additional custom capes #uboot_overlay_addr4=/lib/firmware/<file4>.dtbo #uboot_overlay_addr5=/lib/firmware/<file5>.dtbo #uboot_overlay_addr6=/lib/firmware/<file6>.dtbo #uboot_overlay_addr7=/lib/firmware/<file7>.dtbo ### ###Custom Cape dtb_overlay=/lib/firmware/am335x-spilcd-adafruit28.dtbo Some guidance on the uEnv.txt would be very helpful. So anyway I reboot but uboot is not happy. Here is the full output from the serial console: U-Boot SPL 2017.09-00002-g0f3f1c7907 (Oct 09 2017 - 15:30:22) Trying to boot from MMC1 U-Boot 2017.09-00002-g0f3f1c7907 (Oct 09 2017 - 15:30:22 -0500), Build: jenkins-github_Bootloader-Builder-607 CPU : AM335X-GP rev 2.1 I2C: ready DRAM: 512 MiB No match for driver 'omap_hsmmc' No match for driver 'omap_hsmmc' Some drivers were not found Reset Source: Power-on reset has occurred. MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 Using default environment Model: BeagleBoard.org PocketBeagle <ethaddr> not set. Validating first E-fuse MAC Net: No ethernet found. Press SPACE to abort autoboot in 2 seconds board_name=[A335PBGL] ... switch to partitions #0, OK mmc0 is current device SD/MMC found on device 0 ** Bad device 0:2 0x82000000 ** ** Bad device 0:2 0x82000000 ** switch to partitions #0, OK mmc0 is current device Scanning mmc 0:1... gpio: pin 56 (gpio 56) value is 0 gpio: pin 55 (gpio 55) value is 0 gpio: pin 54 (gpio 54) value is 0 gpio: pin 53 (gpio 53) value is 1 switch to partitions #0, OK mmc0 is current device gpio: pin 54 (gpio 54) value is 1 Checking for: /uEnv.txt ... Checking for: /boot.scr ... Checking for: /boot/boot.scr ... Checking for: /boot/uEnv.txt ... gpio: pin 55 (gpio 55) value is 1 2070 bytes read in 46 ms (43.9 KiB/s) Loaded environment from /boot/uEnv.txt Checking if uname_r is set in /boot/uEnv.txt... gpio: pin 56 (gpio 56) value is 1 Running uname_boot ... loading /boot/vmlinuz-4.4.110-ti-r142 ... 8900056 bytes read in 612 ms (13.9 MiB/s) loading /boot/dtbs/4.4.110-ti-r142/am335x-pocketbeagle.dtb ... 130113 bytes read in 126 ms (1007.8 KiB/s) uboot_overlays: [fdt_buffer=0x60000] ... uboot_overlays: loading /lib/firmware/AM335X-PRU-RPROC-4-4-TI-00A0.dtbo ... 2402 bytes read in 634 ms (2.9 KiB/s) uboot_overlays: [dtb_overlay=/lib/firmware/am335x-spilcd-adafruit28.dtbo] ... uboot_overlays: loading /lib/firmware/am335x-spilcd-adafruit28.dtbo ... 1299 bytes read in 356 ms (2.9 KiB/s) fdt_overlay_apply(): FDT_ERR_NOTFOUND loading /boot/initrd.img-4.4.110-ti-r142 ... 5839816 bytes read in 421 ms (13.2 MiB/s) debug: [console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet] ... debug: [bootz 0x82000000 0x88080000:591bc8 88000000] ... ERROR: Did not find a cmdline Flattened Device Tree Could not find a valid device tree ** Invalid partition 2 ** ** Invalid partition 3 ** ** Invalid partition 4 ** ** Invalid partition 5 ** ** Invalid partition 6 ** ** Invalid partition 7 ** Card did not respond to voltage select! mmc_init: -95, time 13 gpio: pin 56 (gpio 56) value is 0 gpio: pin 55 (gpio 55) value is 0 gpio: pin 54 (gpio 54) value is 0 gpio: pin 53 (gpio 53) value is 1 Card did not respond to voltage select! mmc_init: -95, time 13 gpio: pin 54 (gpio 54) value is 1 Card did not respond to voltage select! mmc_init: -95, time 12 ** Bad device mmc 1 ** Checking for: /uEnv.txt ... Card did not respond to voltage select! mmc_init: -95, time 12 ** Bad device mmc 1 ** Checking for: /boot.scr ... Card did not respond to voltage select! mmc_init: -95, time 13 ** Bad device mmc 1 ** Checking for: /boot/boot.scr ... Card did not respond to voltage select! mmc_init: -95, time 12 ** Bad device mmc 1 ** Checking for: /boot/uEnv.txt ... Card did not respond to voltage select! mmc_init: -95, time 13 ** Bad device mmc 1 ** Card did not respond to voltage select! mmc_init: -95, time 13 ** Bad device mmc 1 ** Card did not respond to voltage select! mmc_init: -95, time 13 ** Bad device mmc 1 ** Card did not respond to voltage select! mmc_init: -95, time 12 ** Bad device mmc 1 ** Card did not respond to voltage select! mmc_init: -95, time 13 ** Bad device mmc 1 ** Card did not respond to voltage select! mmc_init: -95, time 13 ** Bad device mmc 1 ** Card did not respond to voltage select! mmc_init: -95, time 13 ** Bad device mmc 1 ** starting USB... USB0: scanning bus 0 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found No ethernet found. missing environment variable: pxeuuid Retrieving file: pxelinux.cfg/C0A80102 No ethernet found. Retrieving file: pxelinux.cfg/C0A8010 No ethernet found. Retrieving file: pxelinux.cfg/C0A801 No ethernet found. Retrieving file: pxelinux.cfg/C0A80 No ethernet found. Retrieving file: pxelinux.cfg/C0A8 No ethernet found. Retrieving file: pxelinux.cfg/C0A No ethernet found. Retrieving file: pxelinux.cfg/C0 No ethernet found. Retrieving file: pxelinux.cfg/C No ethernet found. Retrieving file: pxelinux.cfg/default-arm-am33xx No ethernet found. Retrieving file: pxelinux.cfg/default-arm No ethernet found. Retrieving file: pxelinux.cfg/default No ethernet found. Config file not found No ethernet found. No ethernet found. => For reference yesterday I ran: cd /opt/scripts/tools && git pull sudo su ./update_kernel.sh And now my kernel is: $ uname -a Linux beaglebone 4.4.110-ti-r142 #1 SMP Mon Jan 8 19:06:43 UTC 2018 armv7l GNU/Linux Can anyone point out what I'm doing wrong? I'd love to get this screen working. Thanks for your time! -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/9e3a483b-a7a3-4261-887e-fd29a3566a51%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
