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

Commit 4806317b authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ARM: msm: dts: Enable PD2.0 only as source for SDM660"

parents d855ca7b dcd5d850
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ Optional properties:
			capabilities in voltage (millivolts) and current
			(milliamps) pairs.
- qcom,no-usb3-dp-concurrency: If present, usb3 and dp concurrency is not supported.
- qcom,pd-20-source-only: If present, only PD2.0 is supported as source.

Example:
	qcom,qpnp-pdphy@1700 {
+1 −0
Original line number Diff line number Diff line
@@ -366,6 +366,7 @@
			qcom,default-sink-caps = <5000 3000>, /* 5V @ 3A */
						 <9000 3000>; /* 9V @ 3A */
			qcom,no-usb3-dp-concurrency;
			qcom,pd-20-source-only;
		};

		pm660_adc_tm: vadc@3400 {
+13 −2
Original line number Diff line number Diff line
@@ -417,6 +417,7 @@ struct usbpd {
	bool			peer_pr_swap;
	bool			peer_dr_swap;
	bool			no_usb3dp_concurrency;
	bool			pd20_source_only;

	u32			sink_caps[7];
	int			num_sink_caps;
@@ -1400,6 +1401,9 @@ static void usbpd_set_state(struct usbpd *pd, enum usbpd_state next_state)
			 * support up to PD 3.0; if peer is 2.0
			 * phy_msg_received() will handle the downgrade.
			 */
			if (pd->pd20_source_only)
				pd->spec_rev = USBPD_REV_20;
			else
				pd->spec_rev = USBPD_REV_30;

			if (pd->pd_phy_opened) {
@@ -2700,6 +2704,9 @@ static void usbpd_sm(struct work_struct *w)
		 * Emarker may have negotiated down to rev 2.0.
		 * Reset to 3.0 to begin SOP communication with sink
		 */
		if (pd->pd20_source_only)
			pd->spec_rev = USBPD_REV_20;
		else
			pd->spec_rev = USBPD_REV_30;

		pd->current_state = PE_SRC_SEND_CAPABILITIES;
@@ -4647,6 +4654,10 @@ struct usbpd *usbpd_create(struct device *parent)

	if (device_property_read_bool(parent, "qcom,no-usb3-dp-concurrency"))
		pd->no_usb3dp_concurrency = true;

	if (device_property_read_bool(parent, "qcom,pd-20-source-only"))
		pd->pd20_source_only = true;

	/*
	 * Register the Android dual-role class (/sys/class/dual_role_usb/).
	 * The first instance should be named "otg_default" as that's what