########################## The Beagleboard XM in 2019 ########################## Firmware Images ############### Full credit to Texas Instruments for keeping this thing going. It was a little hairy for a long while, with Angstrom disappearing, but there are quite modern images for this ancient board available at https://beagleboard.org/latest-images with no muss or fuss. Grab it, unpack it, and go. However... the boot story has changed *dramatically* since the early days, and one of the things that seemingly got lost along the way was support for some of the bbxm-specific LCD backpacks that had been made. Figuring out all the moving pieces was quite the deep dive through Linux's view of hardware. So, here goes. Resurrecting the Beagleboard Toys ULCD ###################################### Amusingly, the device I have next to me at the time of writing must have been a prototype or a pre-production run or something. It calls itself a ``beagleboardtoys.com BBT-ULCD_Lite-001`` revision... blank. That said, this one of two of these I've seen in the wild (the other having been on eBay). Beagleboardtoys is no more (acquired by CircuitCo, in turn apparently in stasis as of 2012ish?), as are many of the related sites from the era. https://elinux.org is full of ancient, dead links. :( . The closest surviving documentation is for a related product, the "ULCD7-Lite". The full schematics are available, and are apparently close enough to the thing in my hand to be viable: https://github.com/CircuitCo/ULCD7-Lite/blob/master/ULCD7-Lite-schematic.pdf. In the ancient days, some part of the BeagleBoard XM's stack understood kernel command line arguments of the form ``buddy=`` and ``buddy2=``, and there were probes in u-boot (e.g. https://github.com/eewiki/u-boot-patches/blob/master/v2013.04/0001-omap3_beagle-uEnv.txt-bootz-n-fixes.patch) Apparently also one was expected to manually configure u-boot, judging by some old forum threads. Anyway, it's all become a mishmash and none of the old support is still around these days, so, time to dig in. Looking at the schematics, we see that there are basically five aspects of this device, from the perspective of the system software (bootloader, kernel, and X). There's the screen itself, the ``TSC2007`` touch screen controller, a ``TLC59108`` LED driver repurposed as a digital output device, and two I2C EEPROMs. Phrased differently, there's the screen, driven over a dedicated digital interface which also includes the "LCD" EEPROM, and three other devices sitting on an I2C bus: * The ``TLC59108`` at address 0x40. * The ``TSC2007`` at address 0x48, with an interrupt pin on GPIO 157. * The "board ID" EEPROM at address 0x51. I chose to make u-boot do the very basic initialization of the ``TLC59108`` status and generally take complete control of the boot process myself. The ``TSC2007`` needs a Device Tree Overlay file to register itself with the kernel; fortunately, modern u-boot understands how to wire this all up before boot, so we don't have to play with the kernel's overlay implementation. Unfortunately, my display's "LCD EEPROM" is not properly populated, so I also use a ``xorg.conf`` file to make it all work out. Let's address each piece in turn. Touch-screen Controller ======================= The ``TSS2007`` DTS can be found :download:`here `. We will tell u-boot to mix this in with our vendor-provided DTB file, but that means it needs to know where to find it. I made the directory ``/boot/dtbs/nwf`` and then ran ``dtc -@ -o /boot/dtbs/nwf/lcd-tsc2007.dtbo lcd-tsc2007.dtso`` to generate the binary form of the overlay. Booting ======= My replacement u-boot boot script is available :download:`here `. This script not only takes over u-boot to boot the machine (with minimal dependencies on everything else TI packaged in this u-boot), it takes it upon itself to initialize the ``TLC59108``. No probing is done to check that the machine is attached to the ``ULCD7``! When changing one's u-boot script, it needs to be re-made into an image that u-boot understands. With ``/boot/uboot`` ``mount``-ed and the script itself in ``/boot/boot.scr.txt``, running ``mkimage -T script -C none -n 'boot script' -d /boot/boot.scr.txt /boot/uboot/boot.scr.uimg`` suffices to get the script to u-boot. Xorg ==== Last, but certainly not least, my ``xorg.conf`` is available :download:`here `. Manual Backlight Control ======================== If you don't mind directly writing to the I2C bus, you can adjust the backlight. Use ``i2cset -y 1 0x40 12 0x20`` to enable backlight control via channel PWM2 and then ``i2cset -y 1 0x40 4 0`` for full-on and ``i2cset -y 1 0x40 4 0xFF`` for full-off.