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

BeagleBone Black

fdaluisio edited this page Dec 21, 2013 · 10 revisions

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

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

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 fail Pixels missing
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

piwik

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
Clone this wiki locally