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

Commit da108881 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ARM: dts: msm: Add support for USB host mode on apq8017"

parents dd0d174a 14d5e92b
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
USB2533 flex Hub

usb2533 HUB supports flex mode which allows swapping of upstream port with
one of the downstream port using I2C commands. This driver enables/disables
flex mode based on the USB mode (host/device).

Required properties :
- compatible : Must be "qcom,usb2533-flex-hub"
- reg: 7bit I2C slave address
- <supply-name>-supply: handle to the regulator device tree node.
        "supply-name" is "vbus" regulator to drive peripheral Vbus
	line in host mode.

Optional properties:
- qcom,hub-reset-gpio : This corresponds to GPIO that is used to drive USB HUB
  reset pin.
- qcom,usbeth-reset-gpio : This corresponds to GPIO that is used to drive
  reset of any other downstream device connected to HUB.
  GPIO flag represents whether ENB pin is active-high(0) or active-low(1).

Example :
	usb2533@2d {
		compatible = "qcom,usb2533-flex-hub";
		reg = <0x2d>;
		vbus-supply = <&usbeth_vbus_vreg>;
		pinctrl-names = "default";
		pinctrl-0 = <&usb2533_hub_reset>;
		qcom,hub-reset-gpio = <&tlmm 100 0>;
		qcom,usbeth-reset-gpio = <&ioexp_gpios 5 0>;
	};
+8 −12
Original line number Diff line number Diff line
@@ -36,25 +36,17 @@
	};

	usb_detect {
		compatible = "qcom,gpio-usbdetect";
		interrupt-names = "vbus_det_irq";
		interrupt-parent = <&tlmm>;
		interrupts = <130 0>;
		pinctrl-names = "default";
		pinctrl-0 = <&vbus_low_as_host>;
		qcom,gpio-mode-sel = <&tlmm 130 0>;
		qcom,notify-host-mode;
		status = "ok";
	};
};

&usb_otg {
	qcom,vbus-low-as-hostmode;
	vbus_otg-supply = <0>;
};

&i2c_2 {
	pericom-type-c@1d {
		status = "disabled";
&i2c_4 {
	usb2533@2c {
		status = "ok";
	};
};

@@ -76,6 +68,10 @@
		pinctrl-0 = <&adv7533_int_active>;
		pinctrl-1 = <&adv7533_int_suspend>;
	};

	pericom-type-c@1d {
		status = "disabled";
	};
};

&mdss_dsi {
+15 −0
Original line number Diff line number Diff line
@@ -78,6 +78,21 @@
	gpio_keys {
		/delete-node/ home;
	};

	usb_detect {
		status = "ok";
	};
};

&usb_otg {
	vbus_otg-supply = <0>;
	qcom,vbus-low-as-hostmode;
};

&i2c_4 {
	usb2533@2c {
		status = "ok";
	};
};

&i2c_2 {
+39 −0
Original line number Diff line number Diff line
@@ -66,6 +66,34 @@
		qcom,dig-vtg-min = <1800000>;
		qcom,dig-vtg-max = <1800000>;
	};

	usb_detect {
		compatible = "qcom,gpio-usbdetect";
		interrupt-names = "vbus_det_irq";
		interrupt-parent = <&tlmm>;
		interrupts = <130 0>;
		pinctrl-names = "default";
		pinctrl-0 = <&usb_mode_select>;
		qcom,gpio-mode-sel = <&tlmm 130 0>;
		qcom,notify-host-mode;
		status = "disabled";
	};

	usbhub_vbus_vreg: usbhub_vbus_vreg {
		compatible = "regulator-fixed";
		regulator-name = "usbhub_vbus_vreg";
		gpio = <&ioexp_gpios 3 0>;
		enable-active-high;
		vin-supply = <&pm8917_l6>;
	};

	usbeth_vbus_vreg: usbeth_vbus_vreg {
		compatible = "regulator-fixed";
		regulator-name = "usbeth_vbus_vreg";
		gpio = <&ioexp_gpios 7 0>;
		enable-active-high;
		vin-supply = <&usbhub_vbus_vreg>;
	};
};

&spi_3 { /* BLSP1 QUP3 */
@@ -277,6 +305,17 @@
		sx150x,polarity = <0x0>;
		sx150x,gpio_base = <200>;
	};
	/* usb2533 flex hub */
	usb2533@2c {
		status = "disabled";
		compatible = "qcom,usb2533-flex-hub";
		reg = <0x2d>;
		vbus-supply = <&usbeth_vbus_vreg>;
		pinctrl-names = "default";
		pinctrl-0 = <&usb2533_hub_reset>;
		qcom,hub-reset-gpio = <&tlmm 100 0>;
		qcom,usbeth-reset-gpio = <&ioexp_gpios 5 0>;
	};
};

/* KS8851 eth over spi */
+14 −1
Original line number Diff line number Diff line
@@ -1610,7 +1610,7 @@
			};
		};

		vbus_low_as_host: vbus_low_as_host {
		usb_mode_select: usb_mode_select {
			mux {
				pins = "gpio130";
				function = "gpio";
@@ -1623,5 +1623,18 @@
				input-enable;
			};
		};

		usb2533_hub_reset: usb2533_hub_reset {
			mux {
				pins = "gpio100";
				function = "gpio";
			};

			config {
				pins = "gpio100";
				drive-strength = <2>;
				output-low;
			};
		};
	};
};
Loading