From b3e969cae2f321bce439637757debf4617b58438 Mon Sep 17 00:00:00 2001
From: Valentin Raevsky <valentin@compulab.co.il>
Date: Mon, 22 Aug 2016 16:09:56 +0300
Subject: ARM: i.MX6: dts: refactoring hdmi, mipi configuration

Refactoring hdmi, mipi configuration for eval board.
Take hdmi, mipi frame buffer configuration out into separate files.
Add Quad and DL configuration options.

Signed-off-by: Valentin Raevsky <valentin@compulab.co.il>
---
 arch/arm/boot/dts/imx6dl-sbc-fx6-hdmi.dts  | 24 ++++++++++++++++++++
 arch/arm/boot/dts/imx6dl-sbc-fx6-mipi.dts  | 24 ++++++++++++++++++++
 arch/arm/boot/dts/imx6q-sbc-fx6-hdmi.dts   | 11 +---------
 arch/arm/boot/dts/imx6q-sbc-fx6-mipi.dts   | 22 +------------------
 arch/arm/boot/dts/imx6qdl-cm-fx6-hdmi.dtsi |  9 ++++++++
 arch/arm/boot/dts/imx6qdl-cm-fx6-mipi.dtsi | 35 ++++++++++++++++++++++++++++++
 6 files changed, 94 insertions(+), 31 deletions(-)
 create mode 100644 arch/arm/boot/dts/imx6dl-sbc-fx6-hdmi.dts
 create mode 100644 arch/arm/boot/dts/imx6dl-sbc-fx6-mipi.dts
 create mode 100644 arch/arm/boot/dts/imx6qdl-cm-fx6-hdmi.dtsi
 create mode 100644 arch/arm/boot/dts/imx6qdl-cm-fx6-mipi.dtsi

diff --git a/arch/arm/boot/dts/imx6dl-sbc-fx6-hdmi.dts b/arch/arm/boot/dts/imx6dl-sbc-fx6-hdmi.dts
new file mode 100644
index 0000000..2d31883
--- /dev/null
+++ b/arch/arm/boot/dts/imx6dl-sbc-fx6-hdmi.dts
@@ -0,0 +1,24 @@
+/*
+* Copyright 2015 CompuLab Ltd.
+*
+* Author: Valentin Raevsky <valentin@compulab.co.il>
+*
+* The code contained herein is licensed under the GNU General Public
+* License. You may obtain a copy of the GNU General Public License
+* Version 2 or later at the following locations:
+*
+* http://www.opensource.org/licenses/gpl-license.html
+* http://www.gnu.org/copyleft/gpl.html
+*/
+
+/dts-v1/;
+#include "imx6dl.dtsi"
+#include "imx6qdl-cm-fx6.dtsi"
+#include "imx6qdl-sb-fx6x.dtsi"
+#include "imx6qdl-sb-fx6.dtsi"
+#include "imx6qdl-cm-fx6-hdmi.dtsi"
+
+/ {
+	model = "CompuLab CM-FX6 on SBC-FX6";
+	compatible = "compulab,cm-fx6", "compulab,sbc-fx6", "fsl,imx6dl";
+};
diff --git a/arch/arm/boot/dts/imx6dl-sbc-fx6-mipi.dts b/arch/arm/boot/dts/imx6dl-sbc-fx6-mipi.dts
new file mode 100644
index 0000000..3617c14
--- /dev/null
+++ b/arch/arm/boot/dts/imx6dl-sbc-fx6-mipi.dts
@@ -0,0 +1,24 @@
+/*
+* Copyright 2015 CompuLab Ltd.
+*
+* Author: Valentin Raevsky <valentin@compulab.co.il>
+*
+* The code contained herein is licensed under the GNU General Public
+* License. You may obtain a copy of the GNU General Public License
+* Version 2 or later at the following locations:
+*
+* http://www.opensource.org/licenses/gpl-license.html
+* http://www.gnu.org/copyleft/gpl.html
+*/
+
+/dts-v1/;
+#include "imx6dl.dtsi"
+#include "imx6qdl-cm-fx6.dtsi"
+#include "imx6qdl-sb-fx6x.dtsi"
+#include "imx6qdl-sb-fx6.dtsi"
+#include "imx6qdl-cm-fx6-mipi.dtsi"
+
+/ {
+	model = "CompuLab CM-FX6 on SBC-FX6";
+	compatible = "compulab,cm-fx6", "compulab,sbc-fx6", "fsl,imx6dl";
+};
diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6-hdmi.dts b/arch/arm/boot/dts/imx6q-sbc-fx6-hdmi.dts
index eff992a..309fd1c 100644
--- a/arch/arm/boot/dts/imx6q-sbc-fx6-hdmi.dts
+++ b/arch/arm/boot/dts/imx6q-sbc-fx6-hdmi.dts
@@ -16,18 +16,9 @@
 #include "imx6q-cm-fx6.dtsi"
 #include "imx6qdl-sb-fx6x.dtsi"
 #include "imx6qdl-sb-fx6.dtsi"
+#include "imx6qdl-cm-fx6-hdmi.dtsi"
 
 / {
 	model = "CompuLab CM-FX6 on SBC-FX6";
 	compatible = "compulab,cm-fx6", "compulab,sbc-fx6", "fsl,imx6q";
 };
-
-&mxcfb1 {
-	mode_str ="1920x1080M@60";
-	disp_dev = "hdmi";
-};
-
-&mxcfb2 {
-	mode_str ="KD050C-WVGA";
-	disp_dev = "lcd";
-};
diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6-mipi.dts b/arch/arm/boot/dts/imx6q-sbc-fx6-mipi.dts
index c591819..fb13ef3 100644
--- a/arch/arm/boot/dts/imx6q-sbc-fx6-mipi.dts
+++ b/arch/arm/boot/dts/imx6q-sbc-fx6-mipi.dts
@@ -16,29 +16,9 @@
 #include "imx6q-cm-fx6.dtsi"
 #include "imx6qdl-sb-fx6x.dtsi"
 #include "imx6qdl-sb-fx6.dtsi"
+#include "imx6qdl-cm-fx6-mipi.dtsi"
 
 / {
 	model = "CompuLab CM-FX6 on SBC-FX6";
 	compatible = "compulab,cm-fx6", "compulab,sbc-fx6", "fsl,imx6q";
 };
-
-&ipu1di0_disp {
-	status = "disabled";
-};
-
-&mipi_dsi {
-	dev_id = <0>;
-	disp_id = <0>;
-	lcd_panel = "TRULY-WVGA";
-	depends = &pca9555;
-	disp-power-on-supply = <&reg_mipi_dsi_pwr_on_mode>;
-	resets = <&mipi_dsi_reset>;
-	status = "okay";
-};
-
-&mxcfb1 {
-	mode_str ="TRULY-WVGA";
-	disp_dev = "mipi_dsi";
-	depends = &mipi_dsi;
-	status = "okay";
-};
diff --git a/arch/arm/boot/dts/imx6qdl-cm-fx6-hdmi.dtsi b/arch/arm/boot/dts/imx6qdl-cm-fx6-hdmi.dtsi
new file mode 100644
index 0000000..47f8ab6
--- /dev/null
+++ b/arch/arm/boot/dts/imx6qdl-cm-fx6-hdmi.dtsi
@@ -0,0 +1,9 @@
+&mxcfb1 {
+	mode_str ="1920x1080M@60";
+	disp_dev = "hdmi";
+};
+
+&mxcfb2 {
+	mode_str ="KD050C-WVGA";
+	disp_dev = "lcd";
+};
diff --git a/arch/arm/boot/dts/imx6qdl-cm-fx6-mipi.dtsi b/arch/arm/boot/dts/imx6qdl-cm-fx6-mipi.dtsi
new file mode 100644
index 0000000..9f9a9c9
--- /dev/null
+++ b/arch/arm/boot/dts/imx6qdl-cm-fx6-mipi.dtsi
@@ -0,0 +1,35 @@
+&ipu1di0_disp {
+	status = "disabled";
+};
+
+&mipi_dsi {
+	dev_id = <0>;
+	disp_id = <0>;
+	lcd_panel = "TRULY-WVGA";
+	depends = &pca9555;
+	disp-power-on-supply = <&reg_mipi_dsi_pwr_on_mode>;
+	resets = <&mipi_dsi_reset>;
+	status = "okay";
+};
+
+&mxcfb1 {
+	mode_str ="TRULY-WVGA";
+	disp_dev = "mipi_dsi";
+	depends = &mipi_dsi;
+	status = "okay";
+};
+
+&mxcfb2 {
+	depends = &mipi_dsi;
+	status = "okay";
+};
+
+&mxcfb3 {
+	depends = &mipi_dsi;
+	status = "okay";
+};
+
+&mxcfb4 {
+	depends = &mipi_dsi;
+	status = "okay";
+};
-- 
1.9.1

