diff --git a/arch/arm64/boot/dts/seco/overlays/Makefile b/arch/arm64/boot/dts/seco/overlays/Makefile index e257e3573c42f0197b641ce382392f4d38e37a76..34de6ccbe9131448b2463a1c317e6f5746240b78 100644 --- a/arch/arm64/boot/dts/seco/overlays/Makefile +++ b/arch/arm64/boot/dts/seco/overlays/Makefile @@ -5,6 +5,7 @@ dtbo-$(CONFIG_ARCH_MXC) += \ seco-imx8mp-d18-edp.dtbo\ seco-imx8mp-d18-lvds-fhd.dtbo\ seco-imx8mp-d18-lvds-wvga.dtbo\ + seco-imx8mp-d18-edp-lvds-wvga.dtbo\ seco-imx8mp-d18-hdmi-edp.dtbo\ seco-imx8mp-d18-hdmi-lvds-fhd.dtbo\ seco-imx8mp-d18-audio-btsco.dtbo diff --git a/arch/arm64/boot/dts/seco/overlays/seco-imx8mp-d18-edp-lvds-wvga-overlay.dts b/arch/arm64/boot/dts/seco/overlays/seco-imx8mp-d18-edp-lvds-wvga-overlay.dts new file mode 100644 index 0000000000000000000000000000000000000000..940d4cc58e20f48d75a694ac9af2be49074824db --- /dev/null +++ b/arch/arm64/boot/dts/seco/overlays/seco-imx8mp-d18-edp-lvds-wvga-overlay.dts @@ -0,0 +1,243 @@ +/* + * Copyright 2021 SECO + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <dt-bindings/drm_mipi_dsi.h> +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/irq.h> + +/dts-v1/; +/plugin/; + +/ { + compatible = "fsl,imx8mp-evk", "seco,imx8mp-d18", "fsl,imx8mp"; + +/* __________________________________________________________________________ + * | | + * | DSI-to-eDP | + * |__________________________________________________________________________| + */ + + fragment@0 { + target-path = "/"; + __overlay__ { + panel_edp: edp_panel { + compatible = "boe,ev156fhm-d18"; + #address-cells = <1>; + #size-cells = <0>; + no-hpd; + + status = "okay"; + + port@0 { + reg = <0>; + panel_edp_in: endpoint@0 { + remote-endpoint = <&bridge_to_panel>; + }; + }; + }; + }; + }; + + fragment@1 { + target = <&lcdif1>; + __overlay__ { + status = "okay"; + }; + }; + + fragment@2 { + target = <&mipi_dsi>; + __overlay__ { + status = "okay"; + + port@1 { + mipi_to_bridge: endpoint { + remote-endpoint = <&bridge_to_mipi>; + attach-bridge; + }; + }; + }; + }; + + fragment@3 { + target = <&edp_bridge>; + __overlay__ { + compatible = "seco,sn65dsi86"; + #address-cells = <1>; + #size-cells = <0>; + pd-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; + bkl-gpios= <&gpio1 6 GPIO_ACTIVE_HIGH>; + lcd-gpios = <&gpio4 21 GPIO_ACTIVE_HIGH>; + adi,dsi-lanes = <4>; + dsi,mode-flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | MIPI_DSI_MODE_LPM)>; + bkl_on_off_delay_range_us = <0 6000>; + lcd_on_off_delay_range_us = <0 200000>; + + edp_irq-gpios = <&gpio1 15 IRQ_TYPE_EDGE_FALLING>; + read-dp-rate-from-panel; + enable-hpd; + + si-result = <0xb0 0x41>, + <0xb1 0x72>, + <0xb2 0xa4>, + <0xb3 0xc6>, + <0xb4 0xc6>, + <0xb5 0x32>, + <0xb6 0x74>, + <0xb8 0x33>, + <0xb9 0x75>, + <0xbc 0x34>; + + status = "okay"; + + port@0 { + reg = <0>; + bridge_to_mipi: endpoint { + remote-endpoint = <&mipi_to_bridge>; + }; + }; + port@1 { + reg = <1>; + bridge_to_panel: endpoint { + remote-endpoint = <&panel_edp_in>; + }; + }; + }; + }; + + fragment@4 { + target-path = "/"; + __overlay__ { + lcd0_backlight { + compatible = "pwm-backlight"; + pwms = <&pwm1 0 100000>; + status = "okay"; + + brightness-levels = <0 100>; + num-interpolated-steps = <100>; + default-brightness-level = <80>; + }; + }; + }; + + +/* __________________________________________________________________________ + * | | + * | LVDS | + * |__________________________________________________________________________| + */ + + fragment@5 { + target-path = "/"; + __overlay__ { + panel_lvds_wvga: lvds_panel_wvga { + #address-cells = <1>; + #size-cells = <0>; + compatible = "seco,seco-800x480"; + status = "okay"; + + port { + panel_lvds_wvga_in: endpoint { + remote-endpoint = <&lvds_wvga_out>; + }; + }; + }; + }; + }; + + fragment@6 { + target = <&ldb>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + lvds-channel@1 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + /delete-node/ port@1; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + lvds_wvga_out: endpoint { + remote-endpoint = <&panel_lvds_wvga_in>; + }; + }; + }; + }; + }; + + fragment@7 { + target = <&lcdif2>; + __overlay__ { + status = "okay"; + }; + }; + + fragment@8 { + target = <&ldb_phy>; + __overlay__ { + status = "okay"; + }; + }; + + fragment@9 { + target-path = "/"; + __overlay__ { + reg_lcd1_vdd_en: regulator-lcd1-vdd-en { + compatible = "regulator-fixed"; + regulator-name = "lcd1_vdd_en"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&pca6416 7 0>; + enable-active-high; + regulator-always-on; + regulator-boot-on; + status = "okay"; + }; + + reg_lcd1_bkl_en: regulator-lcd1-bkl-en { + compatible = "regulator-fixed"; + regulator-name = "lcd1_bkl_en"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&pca6416 6 0>; + enable-active-high; + regulator-always-on; + regulator-boot-on; + status = "okay"; + }; + }; + }; + + fragment@10 { + target-path = "/"; + __overlay__ { + lcd1_backlight { + compatible = "pwm-backlight"; + pwms = <&pwm4 0 100000>; + status = "okay"; + + brightness-levels = <0 100>; + num-interpolated-steps = <100>; + default-brightness-level = <80>; + }; + }; + }; + +};