#include "cape-sde-display.dtsi"

&dsi_l1_38_0c_0a_dsc_cmd {
	qcom,panel-supply-entries = <&dsi_panel_pwr_supply_L1>;
	qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs";
	qcom,mdss-dsi-bl-min-level = <4>;
	qcom,mdss-dsi-bl-max-level = <2047>;
	qcom,mdss-brightness-max-level = <2047>;
	qcom,mdss-brightness-init-level = <307>;
	qcom,mdss-dsi-bl-inverted-dbv;
	qcom,platform-reset-gpio = <&tlmm 106 0>;
};

&dsi_r66451_amoled_video {
	qcom,panel-supply-entries = <&dsi_panel_pwr_supply_L1>;
	qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs";
	qcom,mdss-dsi-bl-min-level = <1>;
	qcom,mdss-dsi-bl-max-level = <4095>;
	qcom,mdss-brightness-max-level = <255>;
	qcom,mdss-dsi-bl-inverted-dbv;
	qcom,platform-reset-gpio = <&tlmm 106 0>;
};

&sde_dsi_active {
	mux {
		pins = "gpio106";
		function = "gpio";
	};

	config {
		pins = "gpio106";
		drive-strength = <8>;   /* 8 mA */
		bias-disable = <0>;   /* no pull */
	};
};

&sde_dsi_suspend {
	mux {
		pins = "gpio106";
		function = "gpio";
	};

	config {
		pins = "gpio106";
		drive-strength = <2>;   /* 2 mA */
		bias-pull-down;         /* PULL DOWN */
	};
};
&soc {
	display_panel_vddio: display_panel_vddio {
		compatible = "regulator-fixed";
		regulator-name = "display_panel_vddio";
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <1800000>;
		gpio = <&tlmm 74 0>;
		enable-active-high;
		regulator-boot-on;
	};

	display_panel_vddd: display_panel_vddd {
		compatible = "regulator-fixed";
		regulator-name = "display_panel_vddd";
		regulator-min-microvolt = <1500000>;
		regulator-max-microvolt = <1500000>;
		gpio = <&tlmm 64 0>;
		enable-active-high;
		regulator-boot-on;
	};

	display_panel_vci: display_panel_vci {
		compatible = "regulator-fixed";
		regulator-name = "display_panel_vci";
		regulator-min-microvolt = <3000000>;
		regulator-max-microvolt = <3000000>;
		gpio = <&tlmm 75 0>;
		enable-active-high;
		regulator-boot-on;
	};
};

&sde_dsi {
	qcom,dsi-default-panel = <&dsi_r66451_amoled_video>;
	vddd-supply = <&display_panel_vddd>;
	vci-supply = <&display_panel_vci>;
	vddio-supply = <&display_panel_vddio>;
};


&sde_dsi1 {
	status = "disabled";
};

&sde_dp {
	status = "disabled";
};

&pm8350c_rgb {
	status = "disabled";
};

&mdss_mdp {
	connectors = <&sde_dsi &smmu_sde_unsec &smmu_sde_sec &sde_wb &sde_rscc>;
};

&qupv3_se4_spi {
	fts@0 {
		panel = <&dsi_l1_38_0c_0a_dsc_cmd
			&dsi_r66451_amoled_video>;
	};
};

&soc {
	thermal-message {
		board-sensor = "VIRTUAL-SENSOR0";
	};
	thermal_screen: thermal-screen {
		panel = <&dsi_l1_38_0c_0a_dsc_cmd
			&dsi_r66451_amoled_video>;
	};
	charge_screen: charge-screen {
		panel = <&dsi_l1_38_0c_0a_dsc_cmd
			&dsi_r66451_amoled_video>;
	};
};

&spmi_bus {
	qcom,pm8350b@3 {
		qcom,amoled-ecm@f900 {
			display-panels = <&dsi_l1_38_0c_0a_dsc_cmd
					&dsi_r66451_amoled_video>;
		};
	};
};

