summaryrefslogtreecommitdiffstats
path: root/arch/arm64/boot/dts/amlogic/meson-khadas-vim3-ts050.dtso
blob: a41b4e619580f784ccdb0448e38c83de4829d860 (plain)
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright (c) 2019 BayLibre, SAS
 * Author: Neil Armstrong <narmstrong@baylibre.com>
 */

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/clock/g12a-clkc.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/amlogic,meson-g12a-gpio-intc.h>

/dts-v1/;
/plugin/;

/*
 * Enable Khadas TS050 DSI Panel + Touch Controller
 * on Khadas VIM3 (A311D) and VIM3L (S905D3)
 */

&{/} {
	panel_backlight: backlight {
		compatible = "pwm-backlight";
		pwms = <&pwm_AO_cd 0 25000 0>;
		brightness-levels = <0 255>;
		num-interpolated-steps = <255>;
		default-brightness-level = <200>;
	};
};

&i2c3 {
	#address-cells = <1>;
	#size-cells = <0>;
	pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
	pinctrl-names = "default";
	status = "okay";

	touch-controller@38 {
		compatible = "edt,edt-ft5206";
		reg = <0x38>;
		interrupt-parent = <&gpio_intc>;
		interrupts = <IRQID_GPIOA_5 IRQ_TYPE_EDGE_FALLING>;
		reset-gpios = <&gpio_expander 6 GPIO_ACTIVE_LOW>;
		touchscreen-size-x = <1080>;
		touchscreen-size-y = <1920>;
		status = "okay";
	};
};

&mipi_dsi {
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";

	assigned-clocks = <&clkc CLKID_GP0_PLL>,
			  <&clkc CLKID_MIPI_DSI_PXCLK_SEL>,
			  <&clkc CLKID_MIPI_DSI_PXCLK>,
			  <&clkc CLKID_CTS_ENCL_SEL>,
			  <&clkc CLKID_VCLK2_SEL>;
	assigned-clock-parents = <0>,
				 <&clkc CLKID_GP0_PLL>,
				 <0>,
				 <&clkc CLKID_VCLK2_DIV1>,
				 <&clkc CLKID_GP0_PLL>;
	assigned-clock-rates = <960000000>,
			       <0>,
			       <960000000>,
			       <0>,
			       <0>;

	panel@0 {
		compatible = "khadas,ts050";
		reset-gpios = <&gpio_expander 0 GPIO_ACTIVE_LOW>;
		enable-gpios = <&gpio_expander 1 GPIO_ACTIVE_HIGH>;
		power-supply = <&vcc_3v3>;
		backlight = <&panel_backlight>;
		reg = <0>;

		port {
			mipi_in_panel: endpoint {
				remote-endpoint = <&mipi_out_panel>;
			};
		};
	};

	ports {
		#address-cells = <1>;
		#size-cells = <0>;

		port@1 {
			mipi_out_panel: endpoint {
				remote-endpoint = <&mipi_in_panel>;
			};
		};
	};
};

&mipi_analog_dphy {
	status = "okay";
};

&mipi_dphy {
	status = "okay";
};

&pwm_AO_cd {
	pinctrl-0 = <&pwm_ao_c_6_pins>, <&pwm_ao_d_e_pins>;
};