xref: /freebsd/sys/contrib/device-tree/src/arm64/amlogic/meson-khadas-vim3-ts050.dtso (revision 7d0873ebb83b19ba1e8a89e679470d885efe12e3)
1*7d0873ebSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2*7d0873ebSEmmanuel Vadot/*
3*7d0873ebSEmmanuel Vadot * Copyright (c) 2019 BayLibre, SAS
4*7d0873ebSEmmanuel Vadot * Author: Neil Armstrong <narmstrong@baylibre.com>
5*7d0873ebSEmmanuel Vadot */
6*7d0873ebSEmmanuel Vadot
7*7d0873ebSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
8*7d0873ebSEmmanuel Vadot#include <dt-bindings/clock/g12a-clkc.h>
9*7d0873ebSEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h>
10*7d0873ebSEmmanuel Vadot#include <dt-bindings/interrupt-controller/arm-gic.h>
11*7d0873ebSEmmanuel Vadot#include <dt-bindings/interrupt-controller/amlogic,meson-g12a-gpio-intc.h>
12*7d0873ebSEmmanuel Vadot
13*7d0873ebSEmmanuel Vadot/dts-v1/;
14*7d0873ebSEmmanuel Vadot/plugin/;
15*7d0873ebSEmmanuel Vadot
16*7d0873ebSEmmanuel Vadot/*
17*7d0873ebSEmmanuel Vadot * Enable Khadas TS050 DSI Panel + Touch Controller
18*7d0873ebSEmmanuel Vadot * on Khadas VIM3 (A311D) and VIM3L (S905D3)
19*7d0873ebSEmmanuel Vadot */
20*7d0873ebSEmmanuel Vadot
21*7d0873ebSEmmanuel Vadot&{/} {
22*7d0873ebSEmmanuel Vadot	panel_backlight: backlight {
23*7d0873ebSEmmanuel Vadot		compatible = "pwm-backlight";
24*7d0873ebSEmmanuel Vadot		pwms = <&pwm_AO_cd 0 25000 0>;
25*7d0873ebSEmmanuel Vadot		brightness-levels = <0 255>;
26*7d0873ebSEmmanuel Vadot		num-interpolated-steps = <255>;
27*7d0873ebSEmmanuel Vadot		default-brightness-level = <200>;
28*7d0873ebSEmmanuel Vadot	};
29*7d0873ebSEmmanuel Vadot};
30*7d0873ebSEmmanuel Vadot
31*7d0873ebSEmmanuel Vadot&i2c3 {
32*7d0873ebSEmmanuel Vadot	#address-cells = <1>;
33*7d0873ebSEmmanuel Vadot	#size-cells = <0>;
34*7d0873ebSEmmanuel Vadot	pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
35*7d0873ebSEmmanuel Vadot	pinctrl-names = "default";
36*7d0873ebSEmmanuel Vadot	status = "okay";
37*7d0873ebSEmmanuel Vadot
38*7d0873ebSEmmanuel Vadot	touch-controller@38 {
39*7d0873ebSEmmanuel Vadot		compatible = "edt,edt-ft5206";
40*7d0873ebSEmmanuel Vadot		reg = <0x38>;
41*7d0873ebSEmmanuel Vadot		interrupt-parent = <&gpio_intc>;
42*7d0873ebSEmmanuel Vadot		interrupts = <IRQID_GPIOA_5 IRQ_TYPE_EDGE_FALLING>;
43*7d0873ebSEmmanuel Vadot		reset-gpios = <&gpio_expander 6 GPIO_ACTIVE_LOW>;
44*7d0873ebSEmmanuel Vadot		touchscreen-size-x = <1080>;
45*7d0873ebSEmmanuel Vadot		touchscreen-size-y = <1920>;
46*7d0873ebSEmmanuel Vadot		status = "okay";
47*7d0873ebSEmmanuel Vadot	};
48*7d0873ebSEmmanuel Vadot};
49*7d0873ebSEmmanuel Vadot
50*7d0873ebSEmmanuel Vadot&mipi_dsi {
51*7d0873ebSEmmanuel Vadot	#address-cells = <1>;
52*7d0873ebSEmmanuel Vadot	#size-cells = <0>;
53*7d0873ebSEmmanuel Vadot	status = "okay";
54*7d0873ebSEmmanuel Vadot
55*7d0873ebSEmmanuel Vadot	assigned-clocks = <&clkc CLKID_GP0_PLL>,
56*7d0873ebSEmmanuel Vadot			  <&clkc CLKID_MIPI_DSI_PXCLK_SEL>,
57*7d0873ebSEmmanuel Vadot			  <&clkc CLKID_MIPI_DSI_PXCLK>,
58*7d0873ebSEmmanuel Vadot			  <&clkc CLKID_CTS_ENCL_SEL>,
59*7d0873ebSEmmanuel Vadot			  <&clkc CLKID_VCLK2_SEL>;
60*7d0873ebSEmmanuel Vadot	assigned-clock-parents = <0>,
61*7d0873ebSEmmanuel Vadot				 <&clkc CLKID_GP0_PLL>,
62*7d0873ebSEmmanuel Vadot				 <0>,
63*7d0873ebSEmmanuel Vadot				 <&clkc CLKID_VCLK2_DIV1>,
64*7d0873ebSEmmanuel Vadot				 <&clkc CLKID_GP0_PLL>;
65*7d0873ebSEmmanuel Vadot	assigned-clock-rates = <960000000>,
66*7d0873ebSEmmanuel Vadot			       <0>,
67*7d0873ebSEmmanuel Vadot			       <960000000>,
68*7d0873ebSEmmanuel Vadot			       <0>,
69*7d0873ebSEmmanuel Vadot			       <0>;
70*7d0873ebSEmmanuel Vadot
71*7d0873ebSEmmanuel Vadot	panel@0 {
72*7d0873ebSEmmanuel Vadot		compatible = "khadas,ts050";
73*7d0873ebSEmmanuel Vadot		reset-gpios = <&gpio_expander 0 GPIO_ACTIVE_LOW>;
74*7d0873ebSEmmanuel Vadot		enable-gpios = <&gpio_expander 1 GPIO_ACTIVE_HIGH>;
75*7d0873ebSEmmanuel Vadot		power-supply = <&vcc_3v3>;
76*7d0873ebSEmmanuel Vadot		backlight = <&panel_backlight>;
77*7d0873ebSEmmanuel Vadot		reg = <0>;
78*7d0873ebSEmmanuel Vadot
79*7d0873ebSEmmanuel Vadot		port {
80*7d0873ebSEmmanuel Vadot			mipi_in_panel: endpoint {
81*7d0873ebSEmmanuel Vadot				remote-endpoint = <&mipi_out_panel>;
82*7d0873ebSEmmanuel Vadot			};
83*7d0873ebSEmmanuel Vadot		};
84*7d0873ebSEmmanuel Vadot	};
85*7d0873ebSEmmanuel Vadot
86*7d0873ebSEmmanuel Vadot	ports {
87*7d0873ebSEmmanuel Vadot		#address-cells = <1>;
88*7d0873ebSEmmanuel Vadot		#size-cells = <0>;
89*7d0873ebSEmmanuel Vadot
90*7d0873ebSEmmanuel Vadot		port@1 {
91*7d0873ebSEmmanuel Vadot			mipi_out_panel: endpoint {
92*7d0873ebSEmmanuel Vadot				remote-endpoint = <&mipi_in_panel>;
93*7d0873ebSEmmanuel Vadot			};
94*7d0873ebSEmmanuel Vadot		};
95*7d0873ebSEmmanuel Vadot	};
96*7d0873ebSEmmanuel Vadot};
97*7d0873ebSEmmanuel Vadot
98*7d0873ebSEmmanuel Vadot&mipi_analog_dphy {
99*7d0873ebSEmmanuel Vadot	status = "okay";
100*7d0873ebSEmmanuel Vadot};
101*7d0873ebSEmmanuel Vadot
102*7d0873ebSEmmanuel Vadot&mipi_dphy {
103*7d0873ebSEmmanuel Vadot	status = "okay";
104*7d0873ebSEmmanuel Vadot};
105*7d0873ebSEmmanuel Vadot
106*7d0873ebSEmmanuel Vadot&pwm_AO_cd {
107*7d0873ebSEmmanuel Vadot	pinctrl-0 = <&pwm_ao_c_6_pins>, <&pwm_ao_d_e_pins>;
108*7d0873ebSEmmanuel Vadot};
109