Skip to content
Snippets Groups Projects
Commit 8c0ed762 authored by Gianfranco Mariotti's avatar Gianfranco Mariotti
Browse files

[C61] add eDP sn65dsi86 support

* enabled at u-boot: seco_config tool
parent 997a9a22
No related branches found
No related tags found
No related merge requests found
...@@ -34,6 +34,7 @@ dtbo-$(CONFIG_ARCH_MXC) += \ ...@@ -34,6 +34,7 @@ dtbo-$(CONFIG_ARCH_MXC) += \
seco-imx8mm-c61-port2-gpios.dtbo\ seco-imx8mm-c61-port2-gpios.dtbo\
seco-imx8mm-c61-port2-rs232.dtbo\ seco-imx8mm-c61-port2-rs232.dtbo\
seco-imx8mm-c61-port2-rs485.dtbo\ seco-imx8mm-c61-port2-rs485.dtbo\
seco-imx8mm-c61-video-sn65dsi86.dtbo\
seco-imx8mp-d18-hdmi.dtbo\ seco-imx8mp-d18-hdmi.dtbo\
seco-imx8mp-d18-edp.dtbo\ seco-imx8mp-d18-edp.dtbo\
seco-imx8mp-d18-lvds-fhd.dtbo\ seco-imx8mp-d18-lvds-fhd.dtbo\
......
/*
* 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>
#include <dt-bindings/display/media-bus-format.h>
/dts-v1/;
/plugin/;
/ {
compatible = "fsl,imx8mm-evk", "seco,imx8mm-c61", "fsl,imx8mm";
/* __________________________________________________________________________
* | |
* | DSI-to-eDP |
* |__________________________________________________________________________|
*/
fragment@regulators {
target-path = "/";
__overlay__ {
reg_bkl_on: bklon {
compatible = "regulator-fixed";
regulator-name = "BKL ON";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&gpio4 4 GPIO_ACTIVE_HIGH>;
off-on-delay = <20000>;
startup-delay-us = <1000>;
enable-active-high;
regulator-boot-on;
regulator-always-on;
};
reg_panel_on: panelon {
compatible = "regulator-fixed";
regulator-name = "PANEL ON";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&gpio4 5 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-boot-on;
regulator-always-on;
};
};
};
fragment@backlight {
target-path = "/";
__overlay__ {
backlight@0 {
compatible = "pwm-backlight";
pwms = <&pwm1 0 5000000 0>; // 200Hz
brightness-levels = <0 100>;
num-interpolated-steps = <100>;
default-brightness-level = <80>;
enable-gpios = <&pca6416_20 9 GPIO_ACTIVE_HIGH>;
};
};
};
fragment@panel {
target-path = "/";
__overlay__ {
panel_edp: edp_panel {
compatible = "seco-boe,ev156fhm", "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 = <164000000>;
hactive = <1920>;
vactive = <1080>;
hfront-porch = <48>;
hback-porch = <142>;
hsync-len = <32>;
vfront-porch = <3>;
vback-porch = <11>;
vsync-len = <6>;
};
port@0 {
reg = <0>;
panel_edp_in: endpoint@0 {
remote-endpoint = <&bridge_to_panel>;
};
};
};
};
};
fragment@lcdif {
target = <&lcdif>;
__overlay__ {
status = "okay";
};
};
fragment@mipi_dsi {
target = <&mipi_dsi>;
__overlay__ {
status = "okay";
port@1 {
mipi_to_bridge: endpoint {
remote-endpoint = <&bridge_to_mipi>;
attach-bridge;
};
};
};
};
fragment@edp_bridge {
target = <&i2c4>;
__overlay__ {
edp_bridge: sn65dsi86@2d {
compatible = "seco,sn65dsi86";
reg = <0x2d>;
#address-cells = <1>;
#size-cells = <0>;
pd-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
bkl-gpios = <&pca6416_20 5 GPIO_ACTIVE_HIGH>;
vcc-supply = <&reg_bkl_on>;
clocks = <&osc_27m>;
dsi,max-lanes = <4>;
dsi,max-rate = <2500>;
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 = <&gpio4 27 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>;
};
};
};
};
};
};
...@@ -82,6 +82,13 @@ ...@@ -82,6 +82,13 @@
clock-output-names = "osc_20m"; clock-output-names = "osc_20m";
}; };
osc_27m: clock-osc-27m {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <27000000>;
clock-output-names = "osc_27m";
};
reg_usdhc1_vmmc: sd1_regulator { reg_usdhc1_vmmc: sd1_regulator {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
regulator-name = "WLAN_EN"; regulator-name = "WLAN_EN";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment