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

Commit b7bbb31c authored by Xipeng Gu's avatar Xipeng Gu
Browse files

ARM: dts: msm: Enable RM69090 truly cmd mode panel support



Add changes to:
    1.add ldos for dsi and panel,configure PMIC gpio 12 as a fixed
    regulator and add it as panel power supply.
    2.add panel properties for RM69090 truly command mode panel.

Change-Id: I7c035bc4cd99f443373a4d5bc30df964146f68de
Signed-off-by: default avatarXipeng Gu <guxipeng@codeaurora.org>
parent c1b341d7
Loading
Loading
Loading
Loading
+87 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2019, 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
 * only version 2 as published by the Free Software Foundation.
 *
 * 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.
 */

&mdss_mdp {
	dsi_truly_rm69090_qvga_cmd: qcom,mdss_dsi_truly_rm69090_qvga_cmd {
		qcom,mdss-dsi-panel-name = "rm69090 qvga cmd mode dsi panel";
		qcom,mdss-dsi-panel-controller = <&mdss_dsi0>;
		qcom,mdss-dsi-panel-type = "dsi_cmd_mode";
		qcom,mdss-dsi-panel-destination = "display_1";
		qcom,mdss-dsi-panel-framerate = <60>;
		qcom,mdss-dsi-virtual-channel-id = <0>;
		qcom,mdss-dsi-stream = <0>;
		qcom,mdss-dsi-panel-width = <368>;
		qcom,mdss-dsi-panel-height = <448>;
		qcom,mdss-dsi-h-front-porch = <40>;
		qcom,mdss-dsi-h-back-porch = <20>;
		qcom,mdss-dsi-h-pulse-width = <2>;
		qcom,mdss-dsi-h-sync-skew = <0>;
		qcom,mdss-dsi-v-back-porch = <8>;
		qcom,mdss-dsi-v-front-porch = <6>;
		qcom,mdss-dsi-v-pulse-width = <2>;
		qcom,mdss-dsi-h-left-border = <0>;
		qcom,mdss-dsi-h-right-border = <0>;
		qcom,mdss-dsi-v-top-border = <0>;
		qcom,mdss-dsi-v-bottom-border = <0>;
		qcom,mdss-dsi-bpp = <24>;
		qcom,mdss-dsi-color-order = "rgb_swap_rgb";
		qcom,mdss-dsi-underflow-color = <0xff>;
		qcom,mdss-dsi-border-color = <0>;
		qcom,mdss-dsi-pixel-packing = "tight";
		qcom,mdss-dsi-pixel-alignment = <0>;
		qcom,mdss-dsi-on-command = [
			15 01 00 00 00 00 02 FE 00
			15 01 00 00 00 00 02 35 00
			15 01 00 00 00 00 02 51 80
			39 01 00 00 00 00 05 2A 00 10 01 7F
			39 01 00 00 00 00 05 2B 00 00 01 BF
			05 01 00 00 78 00 02 11 00
			05 01 00 00 40 00 02 29 00
			];
		qcom,mdss-dsi-off-command = [
			05 01 00 00 28 00 02 28 00
			05 01 00 00 78 00 02 10 00
			15 01 00 00 00 00 02 4F 01
			];
		qcom,mdss-dsi-on-command-state = "dsi_lp_mode";
		qcom,mdss-dsi-off-command-state = "dsi_hs_mode";
		qcom,mdss-dsi-idle-on-command = [
			05 01 00 00 00 00 01 39   /* Idle-Mode On */
			];
		qcom,mdss-dsi-idle-off-command = [
			05 01 00 00 00 00 01 38   /* Idle-Mode Off */
			];
		qcom,mdss-dsi-idle-on-command-state = "dsi_hs_mode";
		qcom,mdss-dsi-idle-off-command-state = "dsi_lp_mode";
		qcom,mdss-dsi-h-sync-pulse = <1>;
		qcom,mdss-dsi-traffic-mode = "burst_mode";
		qcom,mdss-dsi-lane-map = "lane_map_0123";
		qcom,mdss-dsi-bllp-eof-power-mode;
		qcom,mdss-dsi-bllp-power-mode;
		qcom,mdss-dsi-lane-0-state;
		qcom,mdss-dsi-te-pin-select = <1>;
		qcom,mdss-dsi-te-dcs-command = <1>;
		qcom,mdss-dsi-te-check-enable;
		qcom,mdss-dsi-te-using-te-pin;
		qcom,mdss-dsi-panel-timings = [7d 25 1d 00 37 33
			22 27 1e 03 04 00];
		qcom,mdss-dsi-t-clk-post = <0x09>;
		qcom,mdss-dsi-t-clk-pre = <0x2c>;
		qcom,mdss-dsi-bl-min-level = <1>;
		qcom,mdss-dsi-bl-max-level = <255>;
		qcom,mdss-dsi-dma-trigger = "trigger_sw";
		qcom,mdss-dsi-mdp-trigger = "none";
		qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs";
		qcom,mdss-dsi-reset-sequence = <1 1>, <0 12>, <1 12>;
	};
};
+9 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
 */

#include "dsi-panel-edo-rm67162-qvga-cmd.dtsi"
#include "dsi-panel-truly-rm69090-qvga-cmd.dtsi"

&soc {
	dsi_pm660_panel_pwr_supply: dsi_pm660_panel_pwr_supply {
@@ -83,3 +84,11 @@
	qcom,partial-update-enabled;
	qcom,panel-roi-alignment = <2 2 4 2 320 2>;
};

&dsi_truly_rm69090_qvga_cmd {
	/delete-property/ qcom,mdss-dsi-panel-timings;
	qcom,mdss-dsi-panel-timings-phy-12nm = [04 04 01 08 00 03 01 0D];
	qcom,panel-supply-entries = <&dsi_pm660_panel_pwr_supply>;
	qcom,esd-check-enabled;
	qcom,mdss-dsi-panel-status-check-mode = "te_signal_check";
};
+29 −0
Original line number Diff line number Diff line
@@ -39,3 +39,32 @@
&sdhc_2 {
	cd-gpios = <&tlmm 67 0x1>;
};

&mdss_dsi {
	vddio-supply = <&L12A>; /* 1.8v */
};

&mdss_dsi0_pll {
	vddio-supply = <&L12A>; /* 1.8V */
};

&mdss_dsi1_pll {
	vddio-supply = <&L12A>; /* 1.8V */
};

&mdss_dsi0 {
	/delete-property/ qcom,platform-enable-gpio;
	vdd-supply = <&vreg_d322_vdd>; /* 2.8v  */
	qcom,dsi-pref-prim-pan = <&dsi_truly_rm69090_qvga_cmd>;
};

&pm660_gpios {
	gpio@cb00 {
		status = "ok";
		qcom,mode = <1>;
		qcom,vin-sel = <0>;
		qcom,src-sel = <0>;
		qcom,master-en = <1>;
		qcom,out-strength = <2>;
	};
};
+17 −3
Original line number Diff line number Diff line
@@ -370,9 +370,23 @@

/* over-write the PM660 GPIO mappings for 429w */
&pm660_gpios {
	interrupts  = <0x0 0xc3 0 IRQ_TYPE_NONE>;
	interrupt-names = "pm660_gpio4";
	qcom,gpios-disallowed = <1 2 3 5 6 7 8 9 10 11 12 13>;
	interrupts  = <0x0 0xc3 0 IRQ_TYPE_NONE>,
		      <0x0 0xcb 0 IRQ_TYPE_NONE>;
	interrupt-names = "pm660_gpio4", "pm660_gpio12";
	qcom,gpios-disallowed = <1 2 3 5 6 7 8 9 10 11 13>;
};

/* pm660 gpio pinctrl configuration */
&pm660_gpios {
	/* GPIO 12 (DISPLAY_AVDD_EN) */
	vreg_d322 {
		vreg_regulator_d322: vreg_regulator-d322 {
			pins = "gpio12";
			function = "normal";
			output-enable;
			qcom,drive-strength = <2>;
		};
	};
};

&pm660_vadc {
+12 −0
Original line number Diff line number Diff line
@@ -358,4 +358,16 @@
		regulator-min-microvolt = <2950000>;
		regulator-max-microvolt = <2950000>;
	};

	vreg_d322_vdd: d322-vdd-fixed-regulator {
		compatible = "regulator-fixed";
		regulator-name = "d322_vreg";
		regulator-min-microvolt = <2800000>;
		regulator-max-microvolt = <2800000>;
		startup-delay-us = <400>;
		enable-active-high;
		gpio = <&pm660_gpios 12 0>;
		status = "okay";
		regulator-boot-on;
	};
};