Skip to content

Commit d131c48

Browse files
committed
drm: panel: Yousee YX070AMSHA01 panel driver
1 parent c9cdb3a commit d131c48

10 files changed

Lines changed: 834 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
27+
required:
28+
- compatible
29+
- reg
30+
- reset-gpios
31+
- vcc-lcd-supply
32+
33+
additionalProperties: false

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
346346
vc4-kms-dsi-waveshare-800x480.dtbo \
347347
vc4-kms-dsi-waveshare-panel.dtbo \
348348
vc4-kms-dsi-waveshare-panel-v2.dtbo \
349+
vc4-kms-dsi-yousee-yx070amsha01.dtbo \
349350
vc4-kms-kippah-7inch.dtbo \
350351
vc4-kms-v3d.dtbo \
351352
vc4-kms-v3d-pi4.dtbo \
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
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-gpios = <&display_mcu 1 GPIO_ACTIVE_LOW>; /* LCD_RST */
63+
vcc-lcd-supply = <&lcd_reg>;
64+
65+
port {
66+
panel_in: endpoint {
67+
remote-endpoint = <&dsi_out>;
68+
};
69+
};
70+
};
71+
};
72+
};
73+
74+
fragment@2 {
75+
target = <&i2c0if>;
76+
__overlay__ {
77+
status = "okay";
78+
};
79+
};
80+
81+
fragment@3 {
82+
target = <&i2c0mux>;
83+
__overlay__ {
84+
status = "okay";
85+
};
86+
};
87+
88+
fragment@4 {
89+
target-path = "/";
90+
__overlay__ {
91+
lcd_reg: lcd_reg@0 {
92+
reg = <0>;
93+
compatible = "regulator-fixed";
94+
regulator-name = "lcd_reg";
95+
gpio = <&display_mcu 0 GPIO_ACTIVE_HIGH>;
96+
enable-active-high;
97+
};
98+
99+
touch_reg: touch_reg@1 {
100+
reg = <1>;
101+
compatible = "regulator-fixed";
102+
regulator-name = "touch_reg_1";
103+
gpio = <&display_mcu 4 GPIO_ACTIVE_HIGH>;
104+
startup-delay-us = <50000>;
105+
enable-active-high;
106+
};
107+
};
108+
};
109+
110+
fragment@10 {
111+
target = <&ft3519>;
112+
__dormant__ {
113+
touchscreen-inverted-x;
114+
};
115+
};
116+
117+
fragment@11 {
118+
target = <&ft3519>;
119+
__dormant__ {
120+
touchscreen-inverted-y;
121+
};
122+
};
123+
124+
__overrides__ {
125+
dsi0 = <&dsi_frag>, "target:0=",<&dsi0>,
126+
<&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
127+
<&touch_reg>, "reg:0=0",
128+
<&touch_reg>, "regulator-name=touch_reg_0";
129+
invx = <0>, "-10";
130+
invy = <0>, "-11";
131+
sizex = <&ft3519>,"touchscreen-size-x:0";
132+
sizey = <&ft3519>,"touchscreen-size-y:0";
133+
swapxy = <&ft3519>,"touchscreen-swapped-x-y?";
134+
disable_touch = <&ft3519>, "status=disabled";
135+
};
136+
};

drivers/gpu/drm/panel/Kconfig

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

728+
config DRM_PANEL_YOUSEE_YX070AMSHA01
729+
tristate "Yousee YX070AMSHA01 panel"
730+
depends on OF
731+
depends on DRM_MIPI_DSI
732+
depends on BACKLIGHT_CLASS_DEVICE
733+
help
734+
Say Y here if you want to enable support for Yousee YX070AMSHA01
735+
1920x1080 panel.
736+
728737
config DRM_PANEL_SAMSUNG_AMS581VF01
729738
tristate "Samsung AMS581VF01 panel"
730739
depends on OF

drivers/gpu/drm/panel/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM69380) += panel-raydium-rm69380.o
7272
obj-$(CONFIG_DRM_PANEL_RENESAS_R61307) += panel-renesas-r61307.o
7373
obj-$(CONFIG_DRM_PANEL_RENESAS_R69328) += panel-renesas-r69328.o
7474
obj-$(CONFIG_DRM_PANEL_RONBO_RB070D30) += panel-ronbo-rb070d30.o
75+
obj-$(CONFIG_DRM_PANEL_YOUSEE_YX070AMSHA01) += panel-yousee-yx070amsha01.o
7576
obj-$(CONFIG_DRM_PANEL_SAMSUNG_AMS581VF01) += panel-samsung-ams581vf01.o
7677
obj-$(CONFIG_DRM_PANEL_SAMSUNG_AMS639RQ08) += panel-samsung-ams639rq08.o
7778
obj-$(CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20) += panel-samsung-atna33xc20.o

0 commit comments

Comments
 (0)