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

Commit 89a7f049 authored by Sriharsha Allenki's avatar Sriharsha Allenki Committed by Gerrit - the friendly Code Review server
Browse files

ARM: dts: msm: Enable power delivery on Holi

Add DT nodes to enable power delivery feature on Holi.
This also enables the dynamic detection of cable connect
and disconnect and also enables to switch between host mode
and device mode by passing the pdphy node as extcon node
to USB node.
While at it add eud node as extcon as well to support spoof
disconnect feature as well.

Change-Id: Iaf6c961b5ba5cfb52445af19876c3359daabf46c
parent a5346e17
Loading
Loading
Loading
Loading
+50 −0
Original line number Diff line number Diff line
@@ -243,3 +243,53 @@
		panel = <&dsi_rm69299_visionox_amoled_video>;
	};
};

&pm7250b_charger {
	smb5_vbus: qcom,smb5-vbus {
		regulator-name = "smb5-vbus";
	};

	smb5_vconn: qcom,smb5-vconn {
		regulator-name = "smb5-vconn";
	};
};

&pm7250b_pdphy {
	vdd-pdphy-supply = <&L3A>;
	vbus-supply = <&smb5_vbus>;
	vconn-supply = <&smb5_vconn>;

	#io-channel-cells = <1>;
	io-channels = <&pm7250b_charger PSY_IIO_PD_ACTIVE>,
		      <&pm7250b_charger PSY_IIO_TYPEC_CC_ORIENTATION>,
		      <&pm7250b_charger PSY_IIO_CONNECTOR_TYPE>,
		      <&pm7250b_charger PSY_IIO_TYPEC_POWER_ROLE>,
		      <&pm7250b_charger PSY_IIO_PD_USB_SUSPEND_SUPPORTED>,
		      <&pm7250b_charger PSY_IIO_TYPEC_SRC_RP>,
		      <&pm7250b_charger PSY_IIO_PD_IN_HARD_RESET>,
		      <&pm7250b_charger PSY_IIO_PD_CURRENT_MAX>,
		      <&pm7250b_charger PSY_IIO_PR_SWAP>,
		      <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MIN>,
		      <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MAX>,
		      <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>,
		      <&pm7250b_charger PSY_IIO_TYPEC_MODE>,
		      <&pm7250b_charger PSY_IIO_PE_START>;
	io-channel-names = "pd_active",
			   "typec_cc_orientation",
			   "connector_type",
			   "typec_power_role",
			   "pd_usb_suspend_supported",
			   "typec_src_rp",
			   "pd_in_hard_reset",
			   "pr_current_max",
			   "pr_swap",
			   "pd_voltage_min",
			   "pd_voltage_max",
			   "real_type",
			   "typec_mode",
			   "pe_start";
};

&usb0 {
	extcon = <&pm7250b_pdphy>, <&eud>;
};
+50 −0
Original line number Diff line number Diff line
@@ -234,3 +234,53 @@
};

#include "camera/holi-camera-sensor-cdp.dtsi"

&pm7250b_charger {
	smb5_vbus: qcom,smb5-vbus {
		regulator-name = "smb5-vbus";
	};

	smb5_vconn: qcom,smb5-vconn {
		regulator-name = "smb5-vconn";
	};
};

&pm7250b_pdphy {
	vdd-pdphy-supply = <&L3A>;
	vbus-supply = <&smb5_vbus>;
	vconn-supply = <&smb5_vconn>;

	#io-channel-cells = <1>;
	io-channels = <&pm7250b_charger PSY_IIO_PD_ACTIVE>,
		      <&pm7250b_charger PSY_IIO_TYPEC_CC_ORIENTATION>,
		      <&pm7250b_charger PSY_IIO_CONNECTOR_TYPE>,
		      <&pm7250b_charger PSY_IIO_TYPEC_POWER_ROLE>,
		      <&pm7250b_charger PSY_IIO_PD_USB_SUSPEND_SUPPORTED>,
		      <&pm7250b_charger PSY_IIO_TYPEC_SRC_RP>,
		      <&pm7250b_charger PSY_IIO_PD_IN_HARD_RESET>,
		      <&pm7250b_charger PSY_IIO_PD_CURRENT_MAX>,
		      <&pm7250b_charger PSY_IIO_PR_SWAP>,
		      <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MIN>,
		      <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MAX>,
		      <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>,
		      <&pm7250b_charger PSY_IIO_TYPEC_MODE>,
		      <&pm7250b_charger PSY_IIO_PE_START>;
	io-channel-names = "pd_active",
			   "typec_cc_orientation",
			   "connector_type",
			   "typec_power_role",
			   "pd_usb_suspend_supported",
			   "typec_src_rp",
			   "pd_in_hard_reset",
			   "pr_current_max",
			   "pr_swap",
			   "pd_voltage_min",
			   "pd_voltage_max",
			   "real_type",
			   "typec_mode",
			   "pe_start";
};

&usb0 {
	extcon = <&pm7250b_pdphy>, <&eud>;
};
+50 −0
Original line number Diff line number Diff line
@@ -199,3 +199,53 @@
&pm6150a_amoled {
	status = "ok";
};

&pm7250b_charger {
	smb5_vbus: qcom,smb5-vbus {
		regulator-name = "smb5-vbus";
	};

	smb5_vconn: qcom,smb5-vconn {
		regulator-name = "smb5-vconn";
	};
};

&pm7250b_pdphy {
	vdd-pdphy-supply = <&L3A>;
	vbus-supply = <&smb5_vbus>;
	vconn-supply = <&smb5_vconn>;

	#io-channel-cells = <1>;
	io-channels = <&pm7250b_charger PSY_IIO_PD_ACTIVE>,
		      <&pm7250b_charger PSY_IIO_TYPEC_CC_ORIENTATION>,
		      <&pm7250b_charger PSY_IIO_CONNECTOR_TYPE>,
		      <&pm7250b_charger PSY_IIO_TYPEC_POWER_ROLE>,
		      <&pm7250b_charger PSY_IIO_PD_USB_SUSPEND_SUPPORTED>,
		      <&pm7250b_charger PSY_IIO_TYPEC_SRC_RP>,
		      <&pm7250b_charger PSY_IIO_PD_IN_HARD_RESET>,
		      <&pm7250b_charger PSY_IIO_PD_CURRENT_MAX>,
		      <&pm7250b_charger PSY_IIO_PR_SWAP>,
		      <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MIN>,
		      <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MAX>,
		      <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>,
		      <&pm7250b_charger PSY_IIO_TYPEC_MODE>,
		      <&pm7250b_charger PSY_IIO_PE_START>;
	io-channel-names = "pd_active",
			   "typec_cc_orientation",
			   "connector_type",
			   "typec_power_role",
			   "pd_usb_suspend_supported",
			   "typec_src_rp",
			   "pd_in_hard_reset",
			   "pr_current_max",
			   "pr_swap",
			   "pd_voltage_min",
			   "pd_voltage_max",
			   "real_type",
			   "typec_mode",
			   "pe_start";
};

&usb0 {
	extcon = <&pm7250b_pdphy>, <&eud>;
};
+50 −0
Original line number Diff line number Diff line
@@ -253,3 +253,53 @@
};

#include "camera/holi-camera-sensor-mtp.dtsi"

&pm7250b_charger {
	smb5_vbus: qcom,smb5-vbus {
		regulator-name = "smb5-vbus";
	};

	smb5_vconn: qcom,smb5-vconn {
		regulator-name = "smb5-vconn";
	};
};

&pm7250b_pdphy {
	vdd-pdphy-supply = <&L3A>;
	vbus-supply = <&smb5_vbus>;
	vconn-supply = <&smb5_vconn>;

	#io-channel-cells = <1>;
	io-channels = <&pm7250b_charger PSY_IIO_PD_ACTIVE>,
		      <&pm7250b_charger PSY_IIO_TYPEC_CC_ORIENTATION>,
		      <&pm7250b_charger PSY_IIO_CONNECTOR_TYPE>,
		      <&pm7250b_charger PSY_IIO_TYPEC_POWER_ROLE>,
		      <&pm7250b_charger PSY_IIO_PD_USB_SUSPEND_SUPPORTED>,
		      <&pm7250b_charger PSY_IIO_TYPEC_SRC_RP>,
		      <&pm7250b_charger PSY_IIO_PD_IN_HARD_RESET>,
		      <&pm7250b_charger PSY_IIO_PD_CURRENT_MAX>,
		      <&pm7250b_charger PSY_IIO_PR_SWAP>,
		      <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MIN>,
		      <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MAX>,
		      <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>,
		      <&pm7250b_charger PSY_IIO_TYPEC_MODE>,
		      <&pm7250b_charger PSY_IIO_PE_START>;
	io-channel-names = "pd_active",
			   "typec_cc_orientation",
			   "connector_type",
			   "typec_power_role",
			   "pd_usb_suspend_supported",
			   "typec_src_rp",
			   "pd_in_hard_reset",
			   "pr_current_max",
			   "pr_swap",
			   "pd_voltage_min",
			   "pd_voltage_max",
			   "real_type",
			   "typec_mode",
			   "pe_start";
};

&usb0 {
	extcon = <&pm7250b_pdphy>, <&eud>;
};
+50 −0
Original line number Diff line number Diff line
@@ -328,3 +328,53 @@
	qcom,bass-enable;
	qcom,use-cp-iin-sns;
};

&pm7250b_charger {
	smb5_vbus: qcom,smb5-vbus {
		regulator-name = "smb5-vbus";
	};

	smb5_vconn: qcom,smb5-vconn {
		regulator-name = "smb5-vconn";
	};
};

&pm7250b_pdphy {
	vdd-pdphy-supply = <&L3A>;
	vbus-supply = <&smb5_vbus>;
	vconn-supply = <&smb5_vconn>;

	#io-channel-cells = <1>;
	io-channels = <&pm7250b_charger PSY_IIO_PD_ACTIVE>,
		      <&pm7250b_charger PSY_IIO_TYPEC_CC_ORIENTATION>,
		      <&pm7250b_charger PSY_IIO_CONNECTOR_TYPE>,
		      <&pm7250b_charger PSY_IIO_TYPEC_POWER_ROLE>,
		      <&pm7250b_charger PSY_IIO_PD_USB_SUSPEND_SUPPORTED>,
		      <&pm7250b_charger PSY_IIO_TYPEC_SRC_RP>,
		      <&pm7250b_charger PSY_IIO_PD_IN_HARD_RESET>,
		      <&pm7250b_charger PSY_IIO_PD_CURRENT_MAX>,
		      <&pm7250b_charger PSY_IIO_PR_SWAP>,
		      <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MIN>,
		      <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MAX>,
		      <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>,
		      <&pm7250b_charger PSY_IIO_TYPEC_MODE>,
		      <&pm7250b_charger PSY_IIO_PE_START>;
	io-channel-names = "pd_active",
			   "typec_cc_orientation",
			   "connector_type",
			   "typec_power_role",
			   "pd_usb_suspend_supported",
			   "typec_src_rp",
			   "pd_in_hard_reset",
			   "pr_current_max",
			   "pr_swap",
			   "pd_voltage_min",
			   "pd_voltage_max",
			   "real_type",
			   "typec_mode",
			   "pe_start";
};

&usb0 {
	extcon = <&pm7250b_pdphy>, <&eud>;
};
Loading