Last active
April 8, 2021 01:58
-
-
Save olehs/1cd3e5ddf45066380df68a70d6f8462a to your computer and use it in GitHub Desktop.
Orange Pi PC Waveshare 35a LCD Device Tree Overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/dts-v1/; | |
/plugin/; | |
/ { | |
compatible = "allwinner,sun8i-h3"; | |
fragment@0 { | |
target = <&spi0>; | |
__overlay__ { | |
status = "okay"; | |
}; | |
}; | |
fragment@1 { | |
target = <&pio>; | |
__overlay__ { | |
tft35a_pins: tft35a_pins { | |
allwinner,pins = "PC7", "PA2"; | |
allwinner,function = "gpio_out"; | |
}; | |
ads7846_pins: ads7846_pins { | |
pins= "PA1"; | |
function = "irq"; | |
}; | |
}; | |
}; | |
fragment@2 { | |
target = <&spi0>; | |
__overlay__ { | |
#address-cells = <1>; | |
#size-cells = <0>; | |
tft35a: tft35a@0 { | |
compatible = "ilitek,ili9486"; | |
reg = <0>; | |
status = "okay"; | |
pinctrl-names = "default"; | |
pinctrl-0 = <&tft35a_pins>; | |
spi-max-frequency = <16000000>; | |
txbuflen = <32768>; | |
rotate = <90>; | |
bgr = <0>; | |
fps = <25>; | |
buswidth = <8>; | |
regwidth = <16>; | |
reset-gpios = <&pio 0 2 0>; /* PC7 */ | |
dc-gpios = <&pio 0 71 0>; /* PA2*/ | |
debug = <1>; | |
init = <0x10000b0 0x00 | |
0x1000011 | |
0x20000ff | |
0x100003a 0x55 | |
0x1000036 0x28 | |
0x10000c2 0x44 | |
0x10000c5 0x00 0x00 0x00 0x00 | |
0x10000e0 0x0f 0x1f 0x1c 0x0c 0x0f 0x08 0x48 0x98 0x37 0x0a 0x13 0x04 0x11 0x0d 0x00 | |
0x10000e1 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00 | |
0x10000e2 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00 | |
/* piscreen -> waveshare35a */ | |
0x1000036 0x28 | |
0x1000011 | |
0x1000029>; | |
}; | |
tft35a_ts: tft35a-ts@1 { | |
compatible = "ti,ads7846"; | |
reg = <1>; | |
status = "okay"; | |
pinctrl-names = "default"; | |
pinctrl-0 = <&ads7846_pins>; | |
spi-max-frequency = <2000000>; | |
interrupts = <0 1 2>; /* PA1 IRQ_TYPE_EDGE_FALLING */ | |
interrupt-parent = <&pio>; | |
pendown-gpio = <&pio 0 1 0>; /* PA1 */ | |
ti,x-min = /bits/ 16 <0>; | |
ti,y-min = /bits/ 16 <0>; | |
ti,x-max = /bits/ 16 <0x0FFF>; | |
ti,y-max = /bits/ 16 <0x0FFF>; | |
ti,pressure-min = /bits/ 16 <0>; | |
ti,pressure-max = /bits/ 16 <0xFFFF>; | |
ti,x-plate-ohms = /bits/ 16 <400>; | |
}; | |
}; | |
}; | |
__overrides__ { | |
speed = <&tft35a>,"spi-max-frquency:0"; | |
txbuflen = <&tft35a>,"txbuflen:0"; | |
rotate = <&tft35a>,"rotate:0"; | |
fps = <&tft35a>,"fps:0"; | |
bgr = <&tft35a>,"bgr:0"; | |
debug = <&tft35a>,"debug:0"; | |
swapxy = <&tft35a_ts>,"ti,swap-xy?"; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment