On Sat, Feb 17, 2018 at 7:06 PM, David Lechner <[email protected]> wrote:
> Hi Drew,
>
> I haven't used it with a BeagleBone. Creating a device tree overlay should
> be easy though.
>
> If you want to use the backlight, you need to create a node at the root
> level like this:
>
>
> backlight: backlight {
> compatible = "gpio-backlight";
> gpios = <&gpio 44 GPIO_ACTIVE_HIGH>;
> };
>
> Then add a child node to the SPI device for the display kind of like this:
>
> &spi1 {
> status = "okay";
> pinctrl-0 = <&ev3_lcd_pins>;
> pinctrl-names = "default";
>
> display@0{
> status = "okay";
> compatible = "jianda,jd-t18003-t01", "sitronix,st7735r";
> reg = <0>;
> spi-max-frequency = <32000000>;
> dc-gpios = <&gpio 43 GPIO_ACTIVE_HIGH>;
> reset-gpios = <&gpio 80 GPIO_ACTIVE_HIGH>;
> backlight = &backlight;
> rotation = <270>;
> };
> };
>
> Obviously you will need to change some things and put it in DT overlay
> format, but it should get you pointed in the right direction.
Thanks for the insights, David.
For comparison, this is how I load fbtft for this 1.8" Adafruit ST7735R TFT LCD:
sudo modprobe fbtft_device busnum=1 name=adafruit18 gpios=dc:48,reset:60
I can then use fbi to display an image on the display.
For TinyDRM, I have now added the display node from your example to
BB-SPIDEV1-00A0.dts:
+
+ display@0{
+ status = "okay";
+ compatible = "jianda,jd-t18003-t01",
"sitronix,st7735r";
+ reg = <0>;
+ spi-max-frequency = <16000000>;
+ /*
https://elinux.org/Beagleboard:Cape_Expansion_Headers */
+ dc-gpios = <&gpio1 28 0>; /* dc:48
P9.15 GPIO1_16 */
+ reset-gpios = <&gpio1 16 0>; /*
reset:60 P9.12 GPIO1_28 */
+ rotation = <270>;
+ };
+
I then added that overlay to /boot/uEnv.txt:
uname_r=4.16.0-rc2-bone3
enable_uboot_overlays=1
uboot_overlay_addr4=/lib/firmware/BB-SPIDEV1-00A0.dtbo
disable_uboot_overlay_emmc=1
disable_uboot_overlay_video=1
disable_uboot_overlay_audio=1
disable_uboot_overlay_wireless=1
disable_uboot_overlay_adc=1
cmdline=coherent_pool=1M net.ifnames=0 quiet
I now see this in dmesg after booting up:
[ 0.980709] omap2_mcspi 481a0000.spi: chipselect 0 already in use
[ 0.986882] spi_master spi1: spi_device register error
/ocp/spi@481a0000/channel@0
[ 0.994544] spi_master spi1: Failed to create SPI device for
/ocp/spi@481a0000/channel@0
[ 21.028802] [drm] Initialized st7735r 1.0.0 20171128 for spi1.0 on minor 0
[ 22.568816] random: crng init done
[ 22.902358] Console: switching to colour frame buffer device 20x16
[ 22.902817] st7735r spi1.0: fb0: frame buffer device
I was quite excited to see it get this far. However, I've been unable
to get anything to appear on the LCD.
Here is some basic exploration I've done:
debian@beaglebone:~/libdrm$ find /dev/dri/
/dev/dri/
/dev/dri/card0
debian@beaglebone:~/libdrm$ sudo fbi -d /dev/dri/card0 -i
using "DejaVu Sans Mono-16", pixelsize=16.67
file=/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
ioctl VT_GETSTATE: Inappropriate ioctl for device (not a linux console?)
debian@beaglebone:~$ ls -ltar /dev/fb*
crw-rw---- 1 root video 29, 0 Feb 20 07:27 /dev/fb0
I do see many lines like this in dmesg:
[ 1260.017213] [drm:mipi_dbi_fb_dirty [mipi_dbi]] Flushing [FB:34]
x1=144, x2=152, y1=72, y2=80
[ 1260.017247] [drm:mipi_dbi_typec3_command [mipi_dbi]] cmd=2a, par=00 90 00 97
[ 1260.017325] [drm:mipi_dbi_typec3_command [mipi_dbi]] cmd=2b, par=00 48 00 4f
[ 1260.017359] [drm:mipi_dbi_typec3_command [mipi_dbi]] cmd=2c, len=128
More information in this gist where I am keeping notes:
https://gist.github.com/pdp7/b1cc9b5a25a0c25153b24e0e75964db0
Any suggestions on how I should troubleshoot this display?
Thanks,
Drew
--
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/CAPgEAj4EXgPG1dxP%2BSOYG0tU82HzGf1%2BmBbfvRYrnu9gjsrGNg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.