/* * Copyright 2017 NXP * * 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> #include <dt-bindings/display/media-bus-format.h> /dts-v1/; /plugin/; / { compatible = "fsl,imx8mn-evk","seco,seco-imx8mn-c72", "fsl,imx8mn", "fsl,imx8mm-evk","seco,seco-imx8mm-c72", "fsl,imx8mm"; /* __________________________________________________________________________ * | | * | DSI-to-LVDS | * |__________________________________________________________________________| */ fragment@panel { target-path = "/"; __overlay__ { panel_lvds: lvds_panel { compatible = "seco-innolux,G156HCE-L01", "panel-dpi"; #address-cells = <1>; #size-cells = <0>; no-hpd; width-mm = <344>; height-mm = <194>; prepare-ms = <1>; enable-ms = <450>; disable-ms = <200>; unprepare-ms = <10>; bpc = <8>; bus-format = <DT_MEDIA_BUS_FMT_RGB888_1X24>; status = "okay"; panel-timing { clock-frequency = <120000000>; hactive = <0x780>; vactive = <0x438>; hfront-porch = <80>; hsync-len = <20>; hback-porch = <80>; vfront-porch = <3>; vsync-len = <4>; vback-porch = <3>; de-active = <1>; }; port@0 { reg = <0>; panel_in: endpoint { remote-endpoint = <&bridge_to_panel>; }; }; }; }; }; fragment@lcdif { target = <&lcdif>; __overlay__ { status = "okay"; max-res = <1920>,<1080>; }; }; fragment@dsi { target = <&mipi_dsi>; __overlay__ { status = "okay"; port@1 { mipi_to_bridge: endpoint { remote-endpoint = <&bridge_to_mipi>; attach-bridge; }; }; }; }; fragment@bridge { target = <&adv_bridge>; __overlay__ { #address-cells = <1>; #size-cells = <0>; lvds,datamap = "jeida"; lvds,dual-channel; lvds,channel-swap; lvds,preserve-dsi-timings; //lvds,test-mode; /*include/drm/drm_mipi_dsi.h*/ dsi,mode-flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | MIPI_DSI_MODE_LPM)>; clocks = <&si5351a 0>; 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_in>; }; }; }; }; fragment@backlighrt { 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 = <100>; }; }; }; fragment@clock { target = <&si5351a>; __overlay__ { status = "okay"; /* connect xtal input to 27MHz reference */ clocks = <&osc_27m>; clkout0 { silabs,pll-spread_spectrum-1_5; }; }; }; fragment@regs { target = <®fixed>; __overlay__ { reg_panel_en: reg_panelen { compatible = "regulator-fixed"; regulator-name = "PANL_EN"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>; enable-active-high; regulator-always-on; status = "okay"; }; reg_lcd0_bkl_en: regulator-lcd0-bkl-en { compatible = "regulator-fixed"; regulator-name = "lcd0_bkl_en"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; gpio = <&gpio1 0 0>; enable-active-high; regulator-always-on; status = "okay"; }; }; }; };