diff --git a/arch/arm/boot/dts/exynos4412-n710x.dts b/arch/arm/boot/dts/exynos4412-n710x.dts index 9ae05b0d684c..f5b6ffc92fdd 100644 --- a/arch/arm/boot/dts/exynos4412-n710x.dts +++ b/arch/arm/boot/dts/exynos4412-n710x.dts @@ -38,6 +38,75 @@ &cam_io_reg { status = "okay"; }; + +&dsi_0 { + vddcore-supply = <&ldo8_reg>; + vddio-supply = <&ldo10_reg>; + samsung,burst-clock-frequency = <500000000>; + samsung,esc-clock-frequency = <20000000>; + samsung,pll-clock-frequency = <24000000>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + dsi_out: endpoint@0 { + samsung,burst-clock-frequency = <500000000>; + samsung,esc-clock-frequency = <20000000>; + //status = "disabled"; + remote-endpoint = <&dsi_in_s6evr02>; + status = "okay"; + }; + + }; + + }; + + s6evr02: panel-s6evr02@0 { + compatible = "samsung,s6evr02"; + reg = <0>; + vdd3-supply = <&ldo13_reg>; + vci-supply = <&ldo25_reg>; + reset-gpios = <&gpf2 1 GPIO_ACTIVE_HIGH>; + power-on-delay = <50>; + reset-delay = <100>; + init-delay = <100>; + panel-width-mm = <69>; + panel-height-mm = <123>; + // HIGH means s6evr02 + present-gpios = <&gpf1 0 GPIO_ACTIVE_HIGH>; + //status = "disabled"; + status = "okay"; + + display-timings { + timing0_s6evr02: timing-0 { + clock-frequency = <62614944>; + hactive = <720>; + vactive = <1280>; + hfront-porch = <70>; + hback-porch = <40>; + hsync-len = <3>; + vfront-porch = <13>; + vback-porch = <1>; + vsync-len = <2>; + }; + }; + + port { + dsi_in_s6evr02: endpoint { + //status = "disabled"; + remote-endpoint = <&dsi_out>; + status = "okay"; + }; + }; + }; + +}; + &i2c_3 { samsung,i2c-sda-delay = <100>; samsung,i2c-slave-addr = <0x10>; diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index cfc8d644cedf..bcbb17224e6e 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -468,6 +468,12 @@ config DRM_PANEL_SAMSUNG_S6E8AA0 depends on OF select DRM_MIPI_DSI select VIDEOMODE_HELPERS + +config DRM_PANEL_SAMSUNG_S6EVR02 + tristate "Samsung S6EVR02 DSI video mode panel" + depends on OF + select DRM_MIPI_DSI + select VIDEOMODE_HELPERS config DRM_PANEL_SAMSUNG_SOFEF00 tristate "Samsung sofef00/s6e3fc2x01 OnePlus 6/6T DSI cmd mode panels" diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index bca4cc1f2715..9674876ddcff 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -48,6 +48,7 @@ obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63M0_SPI) += panel-samsung-s6e63m0-spi.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63M0_DSI) += panel-samsung-s6e63m0-dsi.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01) += panel-samsung-s6e88a0-ams452ef01.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0) += panel-samsung-s6e8aa0.o +obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6EVR02) += panel-samsung-s6evr02.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_SOFEF00) += panel-samsung-sofef00.o obj-$(CONFIG_DRM_PANEL_SEIKO_43WVF1G) += panel-seiko-43wvf1g.o obj-$(CONFIG_DRM_PANEL_SHARP_LQ101R1SX01) += panel-sharp-lq101r1sx01.o diff --git a/drivers/gpu/drm/panel/panel-samsung-s6evr02.c b/drivers/gpu/drm/panel/panel-samsung-s6evr02.c new file mode 100644 index 000000000000..f1612a6c262c --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-s6evr02.c @@ -0,0 +1,764 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * MIPI-DSI based S6EVR02 AMOLED LCD 5.5 inch panel driver. + * + * Copyright (c) 2017 Simon Shields, + * + * Based on the s6e8aa0 panel driver, + * Copyright (c) 2013 Samsung Electronics Co., Ltd + * + * Inki Dae, + * Donghwa Lee, + * Joongmock Shin + * Eunchul Kim + * Tomasz Figa + * Andrzej Hajda +*/ + +#include +#include +#include +#include +#include + +#include +#include