Skip to content

Instantly share code, notes, and snippets.

@jadonk jadonk/README.md
Last active Sep 19, 2017

Embed
What would you like to do?

Test initially with:

sudo modprobe fbtft_device name=adafruit28 busnum=2 cs=1 rotate=90 gpios=reset:86,dc:45

Build the overlay:

dtc -W no-unit_address_vs_reg -@ -I dts -O dtb -o /lib/firmware/am335x-spilcd-adafruit28.dtbo am335x-spilcd-adafruit28.dts
/*
* Copyright (C) 2017 Jason Kridner, Texas Instruments Incorporated
*
* 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,am335x-bone", "ti,am335x-pocketbeagle";
fragment@0 {
target = <&spi1>;
__overlay__ {
status = "okay";
spidev@0{
status = "disabled";
};
spidev@1{
status = "disabled";
};
};
};
fragment@1 {
target = <&spi0>;
__overlay__ {
/* needed to avoid dtc warning */
#address-cells = <1>;
#size-cells = <0>;
adafruit28: adafruit28@0{
compatible = "ilitek,ili9341";
reg = <0>;
buswidth = <8>;
reset-gpios = <&gpio2 22 0>;
dc-gpios = <&gpio2 1 0>;
debug = <0>;
spi-max-frequency = <32000000>;
rotate = <270>;
/* bgr; */
fps = <30>;
};
};
};
__overrides__ {
speed = <&rpidisplay>,"spi-max-frequency:0";
rotate = <&rpidisplay>,"rotate:0";
fps = <&rpidisplay>,"fps:0";
debug = <&rpidisplay>,"debug:0";
};
};
/dts-v1/;
#include "am335x-XXX-common.dtsi"
#include "am335x-peripheral-spi0.dtsi"
&spi1 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
adafruit28: adafruit28@1{
compatible = "ilitek,ili9341";
reg = <1>;
buswidth = <8>;
reset-gpios = <&gpio2 22 0>;
dc-gpios = <&gpio1 13 0>;
debug = <1>;
spi-max-frequency = <32000000>;
rotate = <90>;
/* bgr; */
fps = <30>;
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.