Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8635960b authored by Padmanabhan Komanduru's avatar Padmanabhan Komanduru Committed by Matt Wagantall
Browse files

msm: mdss: refactor MDSS DSI driver



Current DSI driver implementation treats the two DSI controllers
as separate devices. However, some use cases might require the
two DSI devices to be aware of the global configuration of the
display interfaces. For instance, the panel/board configuration
might require both the DSI controllers to work in tandem and
drive a split DSI panel or else drive two different panels
independently. Add a root DSI node in MDSS dtsi and the two
DSI controller nodes as the child nodes. Refactor the DSI
panel related dtsi files and DSI drivers to support this new
design. The DSI root node contains the global information needed
for the DSI controllers like the DSI h/w configuration needed to
drive the panel(s), the DSI register space ranges etc.

Change-Id: I3661adf9ce2ecbef83ae3267e4aae18e0f0c8d04
Signed-off-by: default avatarPadmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: default avatarSiddhartha Agrawal <agrawals@codeaurora.org>
parent 1397f46f
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -85,9 +85,6 @@ Optional properties:
					screen using the qcom,memblock-reserve binding
					for the framebuffer device attached to the panel.
- qcom,cmd-sync-wait-broadcast:		Boolean used to broadcast dcs command to panels.
- qcom,cmd-sync-wait-trigger:		Boolean used to identify the which panel in a dual-dsi
					configuration will be used to trigger the DCS commands.
					This flag should be set only for one of the two panels.
- qcom,mdss-dsi-fbc-enable:		Boolean used to enable frame buffer compression mode.
- qcom,mdss-dsi-fbc-slice-height:	Slice height(in lines) of compressed block.
					Expressed as power of 2. To set as 128 lines,
@@ -429,7 +426,6 @@ Example:
		qcom,mdss-dsi-pixel-packing = <0>;
		qcom,mdss-dsi-panel-destination = "display_1";
		qcom,cmd-sync-wait-broadcast;
		qcom,cmd-sync-wait-trigger;
		qcom,mdss-dsi-fbc-enable;
		qcom,mdss-dsi-fbc-slice-height = <5>;
		qcom,mdss-dsi-fbc-2d-pred-mode;
+122 −94
Original line number Diff line number Diff line
Qualcomm mdss-dsi-ctrl
Qualcomm mdss-dsi

mdss-dsi-ctrl is a dsi controller device which supports host controllers that
are compatable with MIPI display serial interface specification.
mdss-dsi is the master DSI device which supports multiple DSI host controllers that
are compatible with MIPI display serial interface specification.

Required properties:
- compatible:				Must be "qcom,mdss-dsi"
- hw-config:				Specifies the DSI host setup configuration
					"hw-config" = "single_dsi"
					"hw-config" = "dual_dsi"
					"hw-config" = "split_dsi"
- ranges:				The standard property which specifies the child address
					space, parent address space and the length.

mdss-dsi-ctrl is a dsi controller device which is treated as a subnode of the mdss-dsi device.

Required properties:
- compatible:				Must be "qcom,mdss-dsi-ctrl"
@@ -79,7 +90,17 @@ Optional properties:
					"lane_map_3210" = <3 2 1 0>

Example:
        mdss_dsi0: qcom,mdss_dsi@fd922800 {
	mdss_dsi: qcom,mdss_dsi@0 {
		compatible = "qcom,mdss-dsi";
		hw-config = "single_dsi";
		#address-cells = <1>;
		#size-cells = <1>;
		reg = <0x1a98000 0x1a98000 0x25c
		      0x1a98500 0x1a98500 0x280
		      0x1a98780 0x1a98780 0x30
		      0x193e000 0x193e000 0x30>;

		mdss_dsi0: mdss_dsi_ctrl0@fd922800 {
			compatible = "qcom,mdss-dsi-ctrl";
			label = "MDSS DSI CTRL->0";
			cell-index = <0>;
@@ -87,25 +108,31 @@ Example:
				<0xfd922b00 0x2b0>,
				<0xfd998780 0x30>,
				<0xfd828000 0x108>;
		reg-names = "dsi_ctrl", "dsi_phy", "dsi_phy_regulator", "mmss_misc_phys";
			reg-names = "dsi_ctrl", "dsi_phy",
				"dsi_phy_regulator", "mmss_misc_phys";

			vdd-supply = <&pm8226_l15>;
			vddio-supply = <&pm8226_l8>;
			vdda-supply = <&pm8226_l4>;
			vcca-supply = <&pm8226_l28>;
			qcom,mdss-fb-map = <&mdss_fb0>;
			qcom,mdss-mdp = <&mdss_mdp>;

			qcom,dsi-pref-prim-pan = <&dsi_tosh_720_vid>;

			qcom,platform-strength-ctrl = [ff 06];
			qcom,platform-bist-ctrl = [00 00 b1 ff 00 00];
		qcom,regulator-ldo-mode;
			qcom,platform-regulator-settings = [07 09 03 00 20 00 01];
			qcom,platform-lane-config = [00 00 00 00 00 00 00 01 97
				00 00 00 00 05 00 00 01 97
				00 00 00 00 0a 00 00 01 97
				00 00 00 00 0f 00 00 01 97
				00 c0 00 00 00 00 00 01 bb];

			qcom,mmss-ulp-clamp-ctrl-offset = <0x20>;
			qcom,mmss-phyreset-ctrl-offset = <0x24>;
		qcom,mdss-fb-map = <&mdss_fb0>;
		qcom,mdss-mdp = <&mdss_mdp>;
			qcom,regulator-ldo-mode;

			pinctrl-names = "mdss_default", "mdss_sleep";
			pinctrl-0 = <&mdss_dsi_active>;
			pinctrl-1 = <&mdss_dsi_suspend>;
@@ -174,3 +201,4 @@ Example:
			};

	        };
	};
+2 −4
Original line number Diff line number Diff line
@@ -11,11 +11,9 @@
 */

&mdss_mdp {
	dsi_dual_jdi_4k_nofbc_video_0: qcom,dsi_jdi_4k_nofbc_video_0 {
		qcom,mdss-dsi-panel-name = "JDI 4K no FBC Dual 0 video mode dsi panel";
		qcom,mdss-dsi-panel-controller = <&mdss_dsi0>;
	dsi_dual_jdi_4k_nofbc_video: qcom,dsi_jdi_4k_nofbc_video {
		qcom,mdss-dsi-panel-name = "JDI 4K no FBC Dual video mode dsi panel";
		qcom,mdss-dsi-panel-type = "dsi_video_mode";
		qcom,mdss-dsi-panel-destination = "display_1";
		qcom,mdss-dsi-panel-framerate = <40>;
		qcom,mdss-dsi-virtual-channel-id = <0>;
		qcom,mdss-dsi-stream = <0>;
+34 −16
Original line number Diff line number Diff line
/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -11,12 +11,11 @@
 */

&mdss_mdp {
	dsi_dual_jdi_4k_nofbc_video_1: qcom,dsi_jdi_4k_nofbc_video_1 {
		qcom,mdss-dsi-panel-name = "JDI 4K no FBC Dual 1 video mode dsi panel";
		qcom,mdss-dsi-panel-controller = <&mdss_dsi1>;
	dsi_dual_jdi_4k_video: qcom,dsi_jdi_4k_video {
		qcom,mdss-dsi-panel-name = "JDI 4K Dual video mode dsi panel";
		qcom,mdss-dsi-panel-type = "dsi_video_mode";
		qcom,mdss-dsi-panel-framerate = <40>;
		qcom,mdss-dsi-panel-destination = "display_2";
		qcom,mdss-dsi-panel-framerate = <60>;
		qcom,mdss-dsi-panel-clockrate = <849520000>;
		qcom,mdss-dsi-virtual-channel-id = <0>;
		qcom,mdss-dsi-stream = <0>;
		qcom,mdss-dsi-panel-width = <1920>;
@@ -40,31 +39,50 @@
		qcom,mdss-dsi-bllp-eof-power-mode;
		qcom,mdss-dsi-bllp-power-mode;
		qcom,cmd-sync-wait-broadcast;
		qcom,cmd-sync-wait-trigger;
		qcom,mdss-dsi-lane-0-state;
		qcom,mdss-dsi-lane-1-state;
		qcom,mdss-dsi-lane-2-state;
		qcom,mdss-dsi-lane-3-state;
		qcom,mdss-dsi-panel-timings = [3e 38 26 00 68 6e 2a 3c 2c 03
									04 00];
		qcom,mdss-dsi-t-clk-post = <0x0d>;
		qcom,mdss-dsi-t-clk-pre = <0x3e>;
		qcom,mdss-dsi-t-clk-post = <0x03>;
		qcom,mdss-dsi-t-clk-pre = <0x27>;
		qcom,mdss-dsi-bl-max-level = <4095>;
		qcom,mdss-dsi-dma-trigger = "trigger_sw";
		qcom,mdss-dsi-mdp-trigger = "none";
		qcom,mdss-dsi-on-command = [23 01 00 00 0a 00 02 b0 04
				29 01 00 00 0a 00 08 b3 14 08 00 00 00 00 00
				23 01 00 00 0a 00 02 d6 01];

		qcom,mdss-dsi-post-panel-on-command = [15 01 00 00 0a 00 02 51 FF
		qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_pwm";
		qcom,mdss-dsi-on-command = [15 01 00 00 0a 00 02 51 FF
					15 01 00 00 0a 00 02 53 24
					05 01 00 00 c9 00 01 11
					05 01 00 00 50 00 01 29];
					05 01 00 00 78 00 01 11
					/* beginning of additional sequence */
					/* Manufacturer Command Access Protect */
					23 01 00 00 50 00 02 B0 04
					/* Qualcomm's IP control */
					29 01 00 00 0a 00 07 ED 80 00 34 5B 04 B0
					/* Manufacturer Command Access Protect */
					23 01 00 00 50 00 02 B0 03
					05 01 00 00 10 00 01 29];
					/* Set display on, wait 16ms */
		qcom,mdss-dsi-on-command-state = "dsi_hs_mode";
		qcom,mdss-dsi-off-command = [05 01 00 00 32 00 02 28 00
					05 01 00 00 78 00 02 10 00];
		qcom,mdss-dsi-off-command-state = "dsi_hs_mode";
		qcom,mdss-dsi-reset-sequence = <1 200>, <0 200>, <1 200>;

		qcom,mdss-dsi-fbc-enable;
		qcom,mdss-dsi-fbc-bpp = <12>;
		qcom,mdss-dsi-fbc-packing = <1>;
		qcom,mdss-dsi-fbc-quant-error;
		qcom,mdss-dsi-fbc-bias = <2>;
		qcom,mdss-dsi-fbc-vlc-mode;
		qcom,mdss-dsi-fbc-bflc-mode;
		qcom,mdss-dsi-fbc-lossy-mode-idx = <3>;
		qcom,mdss-dsi-fbc-pat-mode;
		qcom,mdss-dsi-fbc-budget-ctrl = <5>;
		qcom,mdss-dsi-fbc-block-budget = <91>;
		qcom,mdss-dsi-fbc-h-line-budget = <1200>;
		qcom,mdss-dsi-fbc-lossless-threshold = <0x200>;
		qcom,mdss-dsi-fbc-lossy-threshold = <192>;
		qcom,mdss-dsi-fbc-rgb-threshold = <4>;
	};
};
+2 −4
Original line number Diff line number Diff line
@@ -11,11 +11,9 @@
 */

&mdss_mdp {
	dsi_dual_jdi_cmd_1: qcom,mdss_dsi_jdi_qhd_dualmipi1_cmd{
		qcom,mdss-dsi-panel-name = "Dual 1 cmd mode dsi panel";
		qcom,mdss-dsi-panel-controller = <&mdss_dsi1>;
	dsi_dual_jdi_cmd: qcom,mdss_dsi_jdi_qhd_dualmipi_cmd{
		qcom,mdss-dsi-panel-name = "Dual cmd mode dsi panel";
		qcom,mdss-dsi-panel-type = "dsi_cmd_mode";
		qcom,mdss-dsi-panel-destination = "display_2";
		qcom,mdss-dsi-panel-framerate = <60>;
		qcom,mdss-dsi-virtual-channel-id = <0>;
		qcom,mdss-dsi-stream = <0>;
Loading