This repository has been archived by the owner on Jul 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Home
notro edited this page Feb 25, 2017
·
13 revisions
tinydrm is a DRM helper library for tiny displays.
It provides a foundation for converting the fbtft drivers in drivers/staging/fbtft to DRM.
tinydrm is also backported to 4.9: https://github.com/notro/linux/tree/tinydrm-49 (I dropped suspend/resume since that won't be used on the Pi)
This github repo will contain out-of-tree drivers.
Announcements are made in Issue #2
How do I test tinydrm?
Only two "known" displays are supported so far: Watterott RPi-Display and Adafruit PiTFT 2.8" since they both have a MI0283QT display panel for which there is a driver.
Enable the following kernel config options:
CONFIG_DRM
CONFIG_DRM_TINYDRM
CONFIG_TINYDRM_MI0283QT
This is the Device Tree overlay I use with rpi-display on Raspberry Pi:
/*
* Device Tree overlay for rpi-display by Watterott
*
*/
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2708";
fragment@0 {
target = <&spi0>;
__overlay__ {
status = "okay";
spidev@0{
status = "disabled";
};
spidev@1{
status = "disabled";
};
};
};
fragment@1 {
target = <&gpio>;
__overlay__ {
rpi_display_pins: rpi_display_pins {
brcm,pins = <18 23 24 25>;
brcm,function = <1 1 1 0>; /* out out out in */
};
};
};
fragment@2 {
target = <&spi0>;
__overlay__ {
/* needed to avoid dtc warning */
#address-cells = <1>;
#size-cells = <0>;
rpidisplay: rpi-display@0{
compatible = "multi-inno,mi0283qt";
reg = <0>;
pinctrl-names = "default";
pinctrl-0 = <&rpi_display_pins>;
spi-max-frequency = <32000000>;
rotation = <0>;
reset-gpios = <&gpio 23 0>;
dc-gpios = <&gpio 24 0>;
backlight = <&backlight>;
};
rpi-display-ts@1 {
compatible = "ti,ads7846";
reg = <1>;
spi-max-frequency = <2000000>;
interrupts = <25 2>; /* high-to-low edge triggered */
interrupt-parent = <&gpio>;
pendown-gpio = <&gpio 25 0>;
ti,x-plate-ohms = /bits/ 16 <60>;
ti,pressure-max = /bits/ 16 <255>;
};
};
};
fragment@3 {
target-path = "/soc";
__overlay__ {
backlight: backlight {
compatible = "gpio-backlight";
gpios = <&gpio 18 0>;
};
};
};
__overrides__ {
speed = <&rpidisplay>,"spi-max-frequency:0";
rotation = <&rpidisplay>,"rotation:0";
format = <&rpidisplay>,"format";
};
};