From: NekoRouter Date: Sun, 11 Jun 2023 04:00:04 +0000 (+0800) Subject: Add MIPI panel driver, MIPI panel and touch controller Kconfig, New devicetree file X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d753a8dfc9f9755dbba17dac05af1252fb910d6;p=platform%2Fkernel%2Flinux-thead.git Add MIPI panel driver, MIPI panel and touch controller Kconfig, New devicetree file (cherry picked from commit 99a459c9f7964f8963d5d30d67cadace3bb18654) Signed-off-by: Jaehoon Chung --- diff --git a/.github/workflows/kernel.yml b/.github/workflows/kernel.yml index 8b4dba466765..981c1b29b69e 100644 --- a/.github/workflows/kernel.yml +++ b/.github/workflows/kernel.yml @@ -88,7 +88,7 @@ jobs: sudo cp -v ${{ matrix.board }}-kernel-commitid ${GITHUB_WORKSPACE}/rootfs/boot/ # Install DTB - sudo cp -v arch/riscv/boot/dts/thead/{light-lpi4a.dtb,light-lpi4a-16gb.dtb,light-beagle.dtb} ${GITHUB_WORKSPACE}/rootfs/boot/ + sudo cp -v arch/riscv/boot/dts/thead/{light-lpi4a.dtb,light-lpi4a-16gb.dtb,light-lpi4a-dsi0-hdmi.dtb,light-beagle.dtb} ${GITHUB_WORKSPACE}/rootfs/boot/ ls -al ${GITHUB_WORKSPACE}/rootfs/ popd diff --git a/arch/riscv/boot/dts/thead/Makefile b/arch/riscv/boot/dts/thead/Makefile index 0b3db193e225..f5ead3e5ccdb 100644 --- a/arch/riscv/boot/dts/thead/Makefile +++ b/arch/riscv/boot/dts/thead/Makefile @@ -34,7 +34,7 @@ dtb-$(CONFIG_SOC_THEAD) += light-a-val-full.dtb dtb-$(CONFIG_SOC_THEAD) += light-ant-ref.dtb dtb-$(CONFIG_SOC_THEAD) += light-ant-discrete.dtb dtb-$(CONFIG_SOC_THEAD) += light-beagle.dtb -dtb-$(CONFIG_SOC_THEAD) += light-lpi4a.dtb light-lpi4a-ddr2G.dtb light-lpi4a-16gb.dtb +dtb-$(CONFIG_SOC_THEAD) += light-lpi4a.dtb light-lpi4a-ddr2G.dtb light-lpi4a-16gb.dtb light-lpi4a-dsi0-hdmi.dtb dtb-$(CONFIG_SOC_THEAD) += light-lpi4a-cluster.dtb light-lpi4a-cluster-16gb.dtb dtb-$(CONFIG_SOC_THEAD) += light-a-ref.dtb light-a-ref-dsi0.dtb light-a-ref-dsi0-hdmi.dtb dtb-$(CONFIG_SOC_THEAD) += light-b-ref.dtb diff --git a/arch/riscv/boot/dts/thead/light-lpi4a-dsi0-hdmi.dts b/arch/riscv/boot/dts/thead/light-lpi4a-dsi0-hdmi.dts new file mode 100644 index 000000000000..f19ad896eb8f --- /dev/null +++ b/arch/riscv/boot/dts/thead/light-lpi4a-dsi0-hdmi.dts @@ -0,0 +1,131 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2022 Alibaba Group Holding Limited. + */ + +#include "light-lpi4a-ref.dts" + +/ { + model = "T-HEAD Light Lichee Pi 4A configuration for 8GB DDR board"; + compatible = "thead,light-val", "thead,light-lpi4a", "thead,light"; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x00000000 0x2 0x00000000>; + }; +}; + +&cmamem { + alloc-ranges = <0x1 0xe4000000 0 0x14000000>; // [0x1E400_0000 ~ 0x1F800_0000] +}; + +&pwm { + status = "okay"; +}; + +&qspi0 { + status = "okay"; +}; + +&qspi1 { + status = "okay"; +}; + +&i2c3 { + touch@14 { + #gpio-cells = <2>; + compatible = "goodix,gt9271"; + reg = <0x14>; + interrupt-parent = <&ao_gpio_porta>; + interrupts = <3 0>; + irq-gpios = <&ao_gpio_porta 3 0>; + reset-gpios = <&pcal6408ahk_d 0 0>; + AVDD28-supply = <®_tp_pwr_en>; + touchscreen-size-x = <800>; + touchscreen-size-y = <1280>; + tp-size = <9271>; + status = "okay"; + }; +}; + +&dpu_enc0 { + status = "okay"; + + ports { + /* output */ + port@1 { + reg = <1>; + + enc0_out: endpoint { + remote-endpoint = <&dsi0_in>; + }; + }; + }; +}; + +&dpu_enc1 { + ports { + /delete-node/ port@0; + }; +}; + +&dpu { + status = "okay"; +}; + +&dsi0 { + status = "okay"; +}; + +&dhost_0 { + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + dsi0_in: endpoint { + remote-endpoint = <&enc0_out>; + }; + }; + + port@1 { + reg = <1>; + + dsi0_out: endpoint { + remote-endpoint = <&panel0_in>; + }; + }; + }; + + panel0@0 { + compatible = "chongzhou,cz101b4001", "jadard,jd9365da-h3"; + reg = <0>; + backlight = <&lcd0_backlight>; + reset-gpio = <&pcal6408ahk_d 7 0>; /* active low */ + hsvcc-supply = <&soc_vdd18_lcd0_en_reg>; + vspn3v3-supply = <&soc_vdd33_lcd0_en_reg>; + + port { + panel0_in: endpoint { + remote-endpoint = <&dsi0_out>; + }; + }; + }; +}; + +&disp1_out { + remote-endpoint = <&hdmi_tx_in>; +}; + +&hdmi_tx { + status = "okay"; + + port@0 { + /* input */ + hdmi_tx_in: endpoint { + remote-endpoint = <&disp1_out>; + }; + }; +}; diff --git a/arch/riscv/configs/revyos_defconfig b/arch/riscv/configs/revyos_defconfig index 20ac6139be08..57fd55163701 100644 --- a/arch/riscv/configs/revyos_defconfig +++ b/arch/riscv/configs/revyos_defconfig @@ -170,6 +170,7 @@ CONFIG_KEYBOARD_GPIO=y # CONFIG_INPUT_MOUSE is not set CONFIG_INPUT_TOUCHSCREEN=y CONFIG_TOUCHSCREEN_GOODIX=y +CONFIG_TOUCHSCREEN_GT9XX=y CONFIG_INPUT_MISC=y CONFIG_INPUT_UINPUT=y CONFIG_SERIAL_8250=y @@ -262,6 +263,7 @@ CONFIG_DRM_PANEL_SIMPLE=y CONFIG_DRM_PANEL_ILITEK_ILI9881C=y CONFIG_DRM_PANEL_ILI9881D=y CONFIG_DRM_PANEL_HX8394=y +CONFIG_DRM_PANEL_JADARD_JD9365DA_H3=y CONFIG_DRM_VERISILICON=y CONFIG_DRM_POWERVR_ROGUE=m CONFIG_BACKLIGHT_CLASS_DEVICE=y diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index fd21cbc12eab..81eff64bf596 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -519,4 +519,13 @@ config DRM_PANEL_HX8394 Say Y if you want to enable support for panels based on the HX8394 controller. +config DRM_PANEL_JADARD_JD9365DA_H3 + tristate "Jadard JD9365DA-H3 WXGA DSI panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for Jadard JD9365DA-H3 + WXGA MIPI DSI panel. The panel support TFT dot matrix LCD with + 800RGBx1280 dots at maximum. endmenu diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index bac2f1568232..2adef3068d8a 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -55,3 +55,4 @@ obj-$(CONFIG_DRM_PANEL_VISIONOX_RM69299) += panel-visionox-rm69299.o obj-$(CONFIG_DRM_PANEL_XINPENG_XPP055C272) += panel-xinpeng-xpp055c272.o obj-$(CONFIG_DRM_PANEL_ILI9881D) += panel-ili9881d.o obj-$(CONFIG_DRM_PANEL_HX8394) += panel-himax8394.o +obj-$(CONFIG_DRM_PANEL_JADARD_JD9365DA_H3) += panel-jadard-jd9365da-h3.o diff --git a/drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c b/drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c new file mode 100644 index 000000000000..1e4dd015635a --- /dev/null +++ b/drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c @@ -0,0 +1,356 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (c) 2019 Radxa Limited + * Copyright (c) 2022 Edgeble AI Technologies Pvt. Ltd. + * + * Author: + * - Jagan Teki + * - Stephen Chen + */ + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include