-
Notifications
You must be signed in to change notification settings - Fork 0
/
bpi-m1p-lcd.dts
81 lines (69 loc) · 1.87 KB
/
bpi-m1p-lcd.dts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
//
// Copyright (C) 2017 Chen-Yu Tsai <[email protected]>
//
// Bananapi 800x480 7" RGB LCD panel attached on LCD FPC connector.
#ifdef __DTO_TEST__
#include <arm/sun7i-a20-bananapi-m1-plus.dts>
#else
/dts-v1/;
/plugin/;
#endif
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pwm/pwm.h>
&{/} {
lcd_backlight: lcd-backlight {
compatible = "pwm-backlight";
pwms = <&pwm 0 20000 PWM_POLARITY_INVERTED>; /* 50 kHz */
enable-gpios = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */
brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
default-brightness-level = <8>;
};
lcd_panel: lcd-panel {
compatible = "bananapi,s070wv20-ct16", "simple-panel";
power-supply = <®_vcc5v0>; /* Actually driven from IPSOUT */
/* This doesn't do anything for this particular connector */
enable-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
backlight = <&lcd_backlight>;
port {
lcd_panel_input: endpoint {
remote-endpoint = <&tcon0_out_lcd>;
};
};
};
};
&i2c3 {
status = "okay";
touchscreen@38 {
compatible = "edt,edt-ft5306", "edt,edt-ft5x06";
reg = <0x38>;
interrupt-parent = <&pio>;
interrupts = <7 7 IRQ_TYPE_EDGE_FALLING>; /* PH7 */
reset-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */
};
};
&pio {
lcd0_rgb888_pins: lcd0-rgb888-pins {
pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7",
"PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14",
"PD15", "PD16", "PD17", "PD18", "PD19", "PD20", "PD21",
"PD22", "PD23", "PD24", "PD25", "PD26", "PD27";
function = "lcd0";
};
};
&pwm {
pinctrl-names = "default";
pinctrl-0 = <&pwm0_pin>;
status = "okay";
};
&tcon0 {
pinctrl-names = "default";
pinctrl-0 = <&lcd0_rgb888_pins>;
};
&tcon0_out {
tcon0_out_lcd: endpoint@0 {
reg = <0>;
remote-endpoint = <&lcd_panel_input>;
};
};