Skip to content

Commit 2a885ba

Browse files
committed
arm64: meson: khadas-vim3l: add TS050 DSI panel overlay
This add dtbo overlay to support the Khadas TS050 panel on the Khadas VIM3 & VIM3L boards. Link: https://lore.kernel.org/r/20240403-amlogic-v6-4-upstream-dsi-ccf-vim3-v12-6-99ecdfdc87fc@linaro.org Signed-off-by: Neil Armstrong <[email protected]>
1 parent 6f1c2a1 commit 2a885ba

File tree

2 files changed

+112
-0
lines changed

2 files changed

+112
-0
lines changed

arch/arm64/boot/dts/amlogic/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb
1616
dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb
1717
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-bananapi-m2s.dtb
1818
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
19+
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3-ts050.dtb
1920
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-bananapi-cm4-cm4io.dtb
2021
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gsking-x.dtb
2122
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb
@@ -76,6 +77,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-sm1-bananapi-m2-pro.dtb
7677
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-bananapi-m5.dtb
7778
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-h96-max.dtb
7879
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-khadas-vim3l.dtb
80+
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-khadas-vim3l-ts050.dtb
7981
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-s905d3-libretech-cc.dtb
8082
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-c4.dtb
8183
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-hc4.dtb
@@ -86,3 +88,5 @@ dtb-$(CONFIG_ARCH_MESON) += meson-sm1-x96-air.dtb
8688
# Overlays
8789
meson-g12a-fbx8am-brcm-dtbs := meson-g12a-fbx8am.dtb meson-g12a-fbx8am-brcm.dtbo
8890
meson-g12a-fbx8am-realtek-dtbs := meson-g12a-fbx8am.dtb meson-g12a-fbx8am-realtek.dtbo
91+
meson-g12b-a311d-khadas-vim3-ts050-dtbs := meson-g12b-a311d-khadas-vim3.dtb meson-khadas-vim3-ts050.dtbo
92+
meson-sm1-khadas-vim3l-ts050-dtbs := meson-sm1-khadas-vim3l.dtb meson-khadas-vim3-ts050.dtbo
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2+
/*
3+
* Copyright (c) 2019 BayLibre, SAS
4+
* Author: Neil Armstrong <[email protected]>
5+
*/
6+
7+
#include <dt-bindings/gpio/gpio.h>
8+
#include <dt-bindings/clock/g12a-clkc.h>
9+
#include <dt-bindings/interrupt-controller/irq.h>
10+
#include <dt-bindings/interrupt-controller/arm-gic.h>
11+
#include <dt-bindings/interrupt-controller/amlogic,meson-g12a-gpio-intc.h>
12+
13+
/dts-v1/;
14+
/plugin/;
15+
16+
/*
17+
* Enable Khadas TS050 DSI Panel + Touch Controller
18+
* on Khadas VIM3 (A311D) and VIM3L (S905D3)
19+
*/
20+
21+
&{/} {
22+
panel_backlight: backlight {
23+
compatible = "pwm-backlight";
24+
pwms = <&pwm_AO_cd 0 25000 0>;
25+
brightness-levels = <0 255>;
26+
num-interpolated-steps = <255>;
27+
default-brightness-level = <200>;
28+
};
29+
};
30+
31+
&i2c3 {
32+
#address-cells = <1>;
33+
#size-cells = <0>;
34+
pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
35+
pinctrl-names = "default";
36+
status = "okay";
37+
38+
touch-controller@38 {
39+
compatible = "edt,edt-ft5206";
40+
reg = <0x38>;
41+
interrupt-parent = <&gpio_intc>;
42+
interrupts = <IRQID_GPIOA_5 IRQ_TYPE_EDGE_FALLING>;
43+
reset-gpios = <&gpio_expander 6 GPIO_ACTIVE_LOW>;
44+
touchscreen-size-x = <1080>;
45+
touchscreen-size-y = <1920>;
46+
status = "okay";
47+
};
48+
};
49+
50+
&mipi_dsi {
51+
#address-cells = <1>;
52+
#size-cells = <0>;
53+
status = "okay";
54+
55+
assigned-clocks = <&clkc CLKID_GP0_PLL>,
56+
<&clkc CLKID_MIPI_DSI_PXCLK_SEL>,
57+
<&clkc CLKID_MIPI_DSI_PXCLK>,
58+
<&clkc CLKID_CTS_ENCL_SEL>,
59+
<&clkc CLKID_VCLK2_SEL>;
60+
assigned-clock-parents = <0>,
61+
<&clkc CLKID_GP0_PLL>,
62+
<0>,
63+
<&clkc CLKID_VCLK2_DIV1>,
64+
<&clkc CLKID_GP0_PLL>;
65+
assigned-clock-rates = <960000000>,
66+
<0>,
67+
<960000000>,
68+
<0>,
69+
<0>;
70+
71+
panel@0 {
72+
compatible = "khadas,ts050";
73+
reset-gpios = <&gpio_expander 0 GPIO_ACTIVE_LOW>;
74+
enable-gpios = <&gpio_expander 1 GPIO_ACTIVE_HIGH>;
75+
power-supply = <&vcc_3v3>;
76+
backlight = <&panel_backlight>;
77+
reg = <0>;
78+
79+
port {
80+
mipi_in_panel: endpoint {
81+
remote-endpoint = <&mipi_out_panel>;
82+
};
83+
};
84+
};
85+
86+
ports {
87+
#address-cells = <1>;
88+
#size-cells = <0>;
89+
90+
port@1 {
91+
mipi_out_panel: endpoint {
92+
remote-endpoint = <&mipi_in_panel>;
93+
};
94+
};
95+
};
96+
};
97+
98+
&mipi_analog_dphy {
99+
status = "okay";
100+
};
101+
102+
&mipi_dphy {
103+
status = "okay";
104+
};
105+
106+
&pwm_AO_cd {
107+
pinctrl-0 = <&pwm_ao_c_6_pins>, <&pwm_ao_d_e_pins>;
108+
};

0 commit comments

Comments
 (0)