Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

BeagleBone Black

notro edited this page Jan 8, 2014 · 10 revisions

Please update this list if you have one of these displays working on the BBB. Add a section if you have made a DTS file.

I have started to test the drivers with the BeagleBone Black.

The list will be updated as I work my way through it.

Update: I had some strange problems when I did this testing. This could be because I was powering the BBB through my laptop USB port (max. 500mA). I haven't had time to test with a better power supply.

Device Driver State Notes
flexfb flexfb
flexpfb flexfb
adafruit13m fb_ssd1306 fail Distorted.
adafruit18 fb_st7735r
adafruit18_green fb_st7735r
adafruit22a fb_ili9340
adafruit22 fb_hx8340bn ok
hy28a fb_ili9320 Reported working
freetronicsoled128 fb_ssd1351
itdb28 fb_ili9325
itdb28_spi fb_ili9325 ok
mi0283qt-2 fb_hx8347d
mi0283qt-9a fb_ili9341 ok
nokia3310 fb_pcd8544
pioled fb_ssd1351
sainsmart18 fb_st7735r ok
sainsmart32_spi fb_ssd1289
sainsmart32 fb_ssd1289
ssd1331 fb_ssd1331

Fasttrack

Apart from building the kernel, this is what I had to do to get the drivers working.

Disable HDMI and enable SPI

# cat /sys/devices/bone_capemgr.*/slots
 0: 54:PF---
 1: 55:PF---
 2: 56:PF---
 3: 57:PF---
 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
 5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
mount /dev/mmcblk0p1 /media/BEAGLE_BONE

Edit /media/BEAGLE_BONE/uEnv.txt

optargs=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN capemgr.enable_partno=BB-SPI1
reboot
# cat /sys/devices/bone_capemgr.*/slots
 0: 54:PF---
 1: 55:PF---
 2: 56:PF---
 3: 57:PF---
 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
 5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
 6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN
 7: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-SPI1

GPIO

I have all my displays on breakout boards which connect to the Pi via a flat cable.
This is the mapping I have used from the P1 connector on the Pi to the BBB:

Raspi       Beagle Bone Black
GPIO      GPIO   Header     pins
----------------------------------
27

25         51    P9.16       19
24         50    P9.14       18
23         49    P9.23       17
22         48    P9.15       16

18         60    P9.12       30
17

Check that these pins are in GPIO mode (no need to do any pinmuxing):

# Make sure mode is gpio: xxxxxxx7
cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pins | grep " 16 \| 17 \| 18 \| 19 \| 30 "

Info about BBB and GPIO:

Create the DeviceTree for MI0283QT-9A

Tested on a up-to-date Angstrom distro with kernel 3.8.13.
After compiling the kernel module you have to set the DeviceTree for your display device. Save the following file as BB-LCDWATTEROTT-00A0.dts on beaglebone black.

/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */
/dts-v1/;
/plugin/;

/ {
	compatible = "ti,beaglebone", "ti,beaglebone-black";

	/* identification */
	part-number = "BB-LCDWATTEROTT";
	version = "00A0";

	/* state the resources this cape uses */
	exclusive-use =
		/* the pin header uses */
		"P9.31",	/* spi1_sclk */
		"P9.29",	/* spi1_d0 */
		"P9.30",	/* spi1_d1 */
		"P9.28",	/* spi1_cs0 */
		"P9.42",	/* spi1_cs1 */
		"P9.15",	/* gpio1_16 - reset */
		"P9.23",	/* gpio1_17 - led */
		/* the hardware ip uses */
		"spi1",
		"gpio1_16",
		"gpio1_17";

	fragment@0 {
		target = <&am33xx_pinmux>;
		__overlay__ {
			/* default state has all gpios released and mode set to uart1 */
			bb_spi1_pins: pinmux_bb_spi1_pins {
				pinctrl-single,pins = <
					0x190 0x33	/* mcasp0_aclkx.spi1_sclk, INPUT_PULLUP | MODE3 */
					0x194 0x33	/* mcasp0_fsx.spi1_d0, INPUT_PULLUP | MODE3 */
					0x198 0x13	/* mcasp0_axr0.spi1_d1, OUTPUT_PULLUP | MODE3 */
					0x19c 0x13	/* mcasp0_ahclkr.spi1_cs0, OUTPUT_PULLUP | MODE3 */
					//0x164 0x12	/* eCAP0_in_PWM0_out.spi1_cs1 OUTPUT_PULLUP | MODE2 */
				>;
			};
		};
	};

	fragment@1 {
		target = <&spi1>;	/* spi1 is numbered correctly */
		__overlay__ {
			status = "okay";
			pinctrl-names = "default";
			pinctrl-0 = <&bb_spi1_pins>;

			#address-cells = <1>;
			#size-cells = <0>;

			channel@0 {
				#address-cells = <1>;
				#size-cells = <0>;

				compatible = "spidev";

				reg = <0>;
				spi-max-frequency = <32000000>;
				spi-cpha;
			};


			channel@1 {
				#address-cells = <1>;
				#size-cells = <0>;

				compatible = "spidev";

				reg = <1>;
				spi-max-frequency = <32000000>;
			};
		};
	};

	fragment@2 {
		target = <&am33xx_pinmux>;
		__overlay__ {
		status = "okay";
		lcd_ctrl_pinmux: lcd_ctrl_pins {
				pinctrl-single,pins = <
					0x040 0x17 	/* gpio1_16  OUTPUT_PULLUP | MODE7 */
                                        0x044 0x17 	/* gpio1_17  OUTPUT_PULLUP | MODE7 */
					>;
			};
		};
	};

	
	fragment@3 {
		target = <&ocp>;
		__overlay__ {
		test_helper: helper {
				compatible = "bone-pinmux-helper";
				pinctrl-names = "default";
				pinctrl-0 = <&lcd_ctrl_pinmux>;
				status = "okay";
			};
		};
	};
};

Then run:

dtc -O dtb -o BB-LCDWATTEROTT-00A0.dtbo -b 0 -@ BB-LCDWATTEROTT-00A0.dts
cp BB-LCDWATTEROTT-00A0.dtbo /lib/firmware/

Enable the driver

Edit uEnv.txt for disable HDMI cape on boot. Add capemgr.disable option to optargs.

mount /dev/mmcblk0p1 /media/card
cat /media/card/uEnv.txt
optargs=text quiet capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN

then you can reboot. After that you can start the display:

echo BB-LCDWATTEROTT > /sys/devices/bone_capemgr.9/slots
modprobe fbtft_device name=mi0283qt-9a busnum=1 gpios=reset:48,led:49

Optionally you can disable the blank console on tty1 with this command:

echo -ne "\033[9;0]" > /dev/tty1

piwik

Clone this wiki locally