/* * 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-auo,p215hcn", "panel-dpi"; #address-cells = <1>; #size-cells = <0>; no-hpd; width-mm = <68>; height-mm = <121>; prepare-ms = <100>; enable-ms = <100>; disable-ms = <100>; unprepare-ms = <100>; bpc = <8>; bus-format = <DT_MEDIA_BUS_FMT_RGB888_1X24>; status = "okay"; panel-timing { clock-frequency = <160000000>; hactive = <1920>; vactive = <1080>; hfront-porch = <85>; hsync-len = <10>; hback-porch = <85>; vfront-porch = <20>; vsync-len = <10>; vback-porch = <20>; }; port@0 { reg = <0>; panel_in: endpoint { remote-endpoint = <&bridge_to_panel>; }; }; }; }; }; fragment@1 { target = <&lcdif>; __overlay__ { status = "okay"; max-res = <1920>,<1080>; }; }; fragment@2 { target = <&mipi_dsi>; __overlay__ { status = "okay"; port@1 { mipi_to_bridge: endpoint { remote-endpoint = <&bridge_to_mipi>; attach-bridge; }; }; }; }; fragment@3 { 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@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 = <100>; }; }; }; fragment@5 { target = <&si5351a>; __overlay__ { status = "okay"; /* connect xtal input to 27MHz reference */ clocks = <&osc_27m>; clkout0 { silabs,pll-spread_spectrum-1_5; }; }; }; fragment@6 { 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"; }; }; }; };