Skip to content

Commit 45b81e9

Browse files
committed
drm: panel: Yousee YX070AMSHA01 panel driver
1 parent ed6ca5b commit 45b81e9

File tree

10 files changed

+2769
-0
lines changed

10 files changed

+2769
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# SPDX-License-Identifier: (GPL-2.0+ OR X11)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/display/panel/yousee,yx070amsha01.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Yousee YX070AMSHA01 DSI Display Panel
8+
9+
maintainers:
10+
- Luke Howard <[email protected]>
11+
12+
properties:
13+
compatible:
14+
const: yousee,yx070amsha01
15+
16+
reg:
17+
maxItems: 1
18+
19+
reset-gpios:
20+
description: GPIO used for the reset pin
21+
maxItems: 1
22+
23+
vcc-lcd-supply:
24+
description: Power regulator
25+
26+
backlight:
27+
description: Backlight used by the panel
28+
$ref: /schemas/types.yaml#/definitions/phandle
29+
30+
required:
31+
- compatible
32+
- reg
33+
- reset-gpios
34+
- vcc-lcd-supply
35+
36+
additionalProperties: false

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
337337
vc4-kms-dsi-waveshare-800x480.dtbo \
338338
vc4-kms-dsi-waveshare-panel.dtbo \
339339
vc4-kms-dsi-waveshare-panel-v2.dtbo \
340+
vc4-kms-dsi-yousee-yx070amsha01.dtbo \
340341
vc4-kms-kippah-7inch.dtbo \
341342
vc4-kms-v3d.dtbo \
342343
vc4-kms-v3d-pi4.dtbo \
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
/*
2+
* vc4-kms-dsi-yousee-yx070amsha01-overlay.dts
3+
*
4+
* Yousee YX070AMSHA01 touchscreen display panel
5+
*/
6+
7+
/dts-v1/;
8+
/plugin/;
9+
10+
#include <dt-bindings/gpio/gpio.h>
11+
12+
/*
13+
* Note: the ft3519 driver can also take a reset-gpio (active low, i.e.
14+
* it sets the value to zero to bring the value high). So we could likely
15+
* do away with touch_reg.
16+
*/
17+
18+
/ {
19+
compatible = "brcm,bcm2835";
20+
21+
i2c_frag: fragment@0 {
22+
target = <&i2c_csi_dsi>;
23+
__overlay__ {
24+
#address-cells = <1>;
25+
#size-cells = <0>;
26+
status = "okay";
27+
28+
display_mcu: display_mcu@45 {
29+
compatible = "padl,xebra-touchscreen-panel-regulator";
30+
reg = <0x45>;
31+
gpio-controller;
32+
#gpio-cells = <2>;
33+
};
34+
35+
ft3519: ft3519@38 {
36+
compatible = "focaltech,ft3519";
37+
reg = <0x38>;
38+
touchscreen-size-x = <1080>;
39+
touchscreen-size-y = <1920>;
40+
touchscreen-x-mm = <87>;
41+
touchscreen-y-mm = <155>;
42+
};
43+
};
44+
};
45+
46+
dsi_frag: fragment@1 {
47+
target = <&dsi1>;
48+
__overlay__ {
49+
#address-cells = <1>;
50+
#size-cells = <0>;
51+
status = "okay";
52+
53+
port {
54+
dsi_out: endpoint {
55+
remote-endpoint = <&panel_in>;
56+
};
57+
};
58+
59+
dsi_panel: dsi_panel@0 {
60+
reg = <0>;
61+
compatible = "yousee,yx070amsha01";
62+
reset-gpio = <&display_mcu 1 GPIO_ACTIVE_HIGH>; /* LCD_RST */
63+
64+
port {
65+
panel_in: endpoint {
66+
remote-endpoint = <&dsi_out>;
67+
};
68+
};
69+
};
70+
};
71+
};
72+
73+
fragment@2 {
74+
target = <&i2c0if>;
75+
__overlay__ {
76+
status = "okay";
77+
};
78+
};
79+
80+
fragment@3 {
81+
target = <&i2c0mux>;
82+
__overlay__ {
83+
status = "okay";
84+
};
85+
};
86+
87+
fragment@4 {
88+
target-path = "/";
89+
__overlay__ {
90+
touch_reg: touch_reg@1 {
91+
reg = <1>;
92+
compatible = "regulator-fixed";
93+
regulator-name = "touch_reg_1";
94+
gpio = <&display_mcu 4 GPIO_ACTIVE_HIGH>;
95+
startup-delay-us = <50000>;
96+
enable-active-high;
97+
};
98+
};
99+
};
100+
101+
fragment@10 {
102+
target = <&ft3519>;
103+
__dormant__ {
104+
touchscreen-inverted-x;
105+
};
106+
};
107+
108+
fragment@11 {
109+
target = <&ft3519>;
110+
__dormant__ {
111+
touchscreen-inverted-y;
112+
};
113+
};
114+
115+
__overrides__ {
116+
dsi0 = <&dsi_frag>, "target:0=",<&dsi0>,
117+
<&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
118+
<&touch_reg>, "reg:0=0",
119+
<&touch_reg>, "regulator-name=touch_reg_0";
120+
invx = <0>, "-10";
121+
invy = <0>, "-11";
122+
sizex = <&ft3519>,"touchscreen-size-x:0";
123+
sizey = <&ft3519>,"touchscreen-size-y:0";
124+
swapxy = <&ft3519>,"touchscreen-swapped-x-y?";
125+
disable_touch = <&ft3519>, "status=disabled";
126+
};
127+
};

drivers/gpu/drm/panel/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,15 @@ config DRM_PANEL_RONBO_RB070D30
625625
Say Y here if you want to enable support for Ronbo Electronics
626626
RB070D30 1024x600 DSI panel.
627627

628+
config DRM_PANEL_YOUSEE_YX070AMSHA01
629+
tristate "Yousee YX070AMSHA01 panel"
630+
depends on OF
631+
depends on DRM_MIPI_DSI
632+
depends on BACKLIGHT_CLASS_DEVICE
633+
help
634+
Say Y here if you want to enable support for Yousee YX070AMSHA01
635+
1920x1080 panel.
636+
628637
config DRM_PANEL_SAMSUNG_AMS581VF01
629638
tristate "Samsung AMS581VF01 panel"
630639
depends on OF

drivers/gpu/drm/panel/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM68200) += panel-raydium-rm68200.o
6363
obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM692E5) += panel-raydium-rm692e5.o
6464
obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM69380) += panel-raydium-rm69380.o
6565
obj-$(CONFIG_DRM_PANEL_RONBO_RB070D30) += panel-ronbo-rb070d30.o
66+
obj-$(CONFIG_DRM_PANEL_YOUSEE_YX070AMSHA01) += panel-yousee-yx070amsha01.o
6667
obj-$(CONFIG_DRM_PANEL_SAMSUNG_AMS581VF01) += panel-samsung-ams581vf01.o
6768
obj-$(CONFIG_DRM_PANEL_SAMSUNG_AMS639RQ08) += panel-samsung-ams639rq08.o
6869
obj-$(CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20) += panel-samsung-atna33xc20.o

0 commit comments

Comments
 (0)