Skip to contentSkip to conversation

Configure CPCAP PMIC ADC, charger and OTG for droid 4

PATCH In review Tony Lindgren 2 participants 7 messages Mar 17, 2017 – Mar 22, 2017 4 messages not in the archive Device tree bindings

lore
Share & tools
lore
#0 lore raw

cover Configure CPCAP PMIC ADC, charger and OTG for droid 4

Hi all,

These patches configure ADC, battery charger and USB OTG for droid 4.

To test, you'll need current Linux next and the following sets of patches:

- [PATCH v2] genirq: Add support for nested shared IRQs
- [PATCH 0/4] Regmap IRQ fix and related changes CPCAP
- [PATCH] iio: adc: cpcap: Add minimal support for CPCAP PMIC ADC
- [PATCH] power: supply: cpcap-charger: Add minimal CPCAP PMIC battery charger
- [PATCH] phy: cpcap-usb: Add CPCAP PMIC USB support

Regards,

Tony

Tony Lindgren (3):
ARM: dts: omap4-droid4: Add CPCAP PMIC ADC configuration
ARM: dts: omap4-droid4: Add CPCAP PMIC battery charger configuration
ARM: dts: omap4-droid4: Add CPCAP PMIC OTG PHY configuration

 arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 49 ++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)
Signature · 5 lines
2.11.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20170317041012.26800-1-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org

#2 lore raw

PATCH 1/3 ARM: dts: omap4-droid4: Add CPCAP PMIC ADC configuration

Add CPCAP PMIC ADC configuration.

Cc Marcel Partap <[email protected]>
Cc Michael Scott <[email protected]>
Cc Sebastian Reichel <[email protected]>
---
 arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi +7 -0
@@ -19,6 +19,13 @@
 		spi-max-frequency = <3000000>;
 		spi-cs-high;
 
+		cpcap_adc: adc {
+			compatible = "motorola,mapphone-cpcap-adc";
+			interrupts-extended = <&cpcap 8 0>;
+			interrupt-names = "adcdone";
+			#io-channel-cells = <1>;
+		};
+
 		cpcap_regulator: regulator {
 			compatible = "motorola,mapphone-cpcap-regulator";
 
Signature · 5 lines
2.11.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20170317041012.26800-2-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org

Reviewed-by Tested-by
#4 lore raw

Re: [PATCH 1/3] ARM: dts: omap4-droid4: Add CPCAP PMIC ADC configuration

Hi,

Quoted 7 lines · Tony Lindgren

Add CPCAP PMIC ADC configuration.

Cc Marcel Partap <[email protected]>
Cc Michael Scott <[email protected]>
Cc Sebastian Reichel <[email protected]>
Quoted 23 lines
---
 arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi +7 -0
@@ -19,6 +19,13 @@
 		spi-max-frequency = <3000000>;
 		spi-cs-high;
 
+		cpcap_adc: adc {
+			compatible = "motorola,mapphone-cpcap-adc";
+			interrupts-extended = <&cpcap 8 0>;
+			interrupt-names = "adcdone";
+			#io-channel-cells = <1>;
+		};
+
 		cpcap_regulator: regulator {
 			compatible = "motorola,mapphone-cpcap-regulator";
 
Signature · 1 line
2.11.1
#5 lore raw

PATCH 2/3 ARM: dts: omap4-droid4: Add CPCAP PMIC battery charger configuration

In reply to a message not in the archive

Add CPCAP PMIC battery charger configuration.

Cc Marcel Partap <[email protected]>
Cc Michael Scott <[email protected]>
Cc Sebastian Reichel <[email protected]>
---
 arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi +19 -0
@@ -26,6 +26,25 @@
 			#io-channel-cells = <1>;
 		};
 
+		cpcap_charger: charger {
+			compatible = "motorola,mapphone-cpcap-charger";
+			interrupts-extended = <
+				&cpcap 13 0 &cpcap 12 0 &cpcap 29 0 &cpcap 28 0
+				&cpcap 22 0 &cpcap 20 0 &cpcap 19 0 &cpcap 54 0
+			>;
+			interrupt-names =
+				"chrg_det", "rvrs_chrg", "chrg_se1b", "se0conn",
+				"rvrs_mode", "chrgcurr1", "vbusvld", "battdetb";
+			mode-gpios = <&gpio3 29 GPIO_ACTIVE_LOW
+				      &gpio3 23 GPIO_ACTIVE_LOW>;
+			io-channels = <&cpcap_adc 0 &cpcap_adc 1
+				       &cpcap_adc 2 &cpcap_adc 5
+				       &cpcap_adc 6>;
+			io-channel-names = "battdetb", "battp",
+					   "vbus", "chg_isense",
+					   "batti";
+		};
+
 		cpcap_regulator: regulator {
 			compatible = "motorola,mapphone-cpcap-regulator";
 
Signature · 5 lines
2.11.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20170317041012.26800-3-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org

Reviewed-by Tested-by
#7 lore raw

Re: [PATCH 2/3] ARM: dts: omap4-droid4: Add CPCAP PMIC battery charger configuration

Hi,

Quoted 7 lines · Tony Lindgren

Add CPCAP PMIC battery charger configuration.

Cc Marcel Partap <[email protected]>
Cc Michael Scott <[email protected]>
Cc Sebastian Reichel <[email protected]>
Quoted 35 lines
---
 arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi +19 -0
@@ -26,6 +26,25 @@
 			#io-channel-cells = <1>;
 		};
 
+		cpcap_charger: charger {
+			compatible = "motorola,mapphone-cpcap-charger";
+			interrupts-extended = <
+				&cpcap 13 0 &cpcap 12 0 &cpcap 29 0 &cpcap 28 0
+				&cpcap 22 0 &cpcap 20 0 &cpcap 19 0 &cpcap 54 0
+			>;
+			interrupt-names =
+				"chrg_det", "rvrs_chrg", "chrg_se1b", "se0conn",
+				"rvrs_mode", "chrgcurr1", "vbusvld", "battdetb";
+			mode-gpios = <&gpio3 29 GPIO_ACTIVE_LOW
+				      &gpio3 23 GPIO_ACTIVE_LOW>;
+			io-channels = <&cpcap_adc 0 &cpcap_adc 1
+				       &cpcap_adc 2 &cpcap_adc 5
+				       &cpcap_adc 6>;
+			io-channel-names = "battdetb", "battp",
+					   "vbus", "chg_isense",
+					   "batti";
+		};
+
 		cpcap_regulator: regulator {
 			compatible = "motorola,mapphone-cpcap-regulator";
 
Signature · 1 line
2.11.1
#8 lore raw

PATCH 3/3 ARM: dts: omap4-droid4: Add CPCAP PMIC OTG PHY configuration

In reply to a message not in the archive

Add CPCAP PMIC OTG PHY configuration.

Cc Marcel Partap <[email protected]>
Cc Michael Scott <[email protected]>
Cc Sebastian Reichel <[email protected]>
---
 arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi +23 -0
@@ -65,6 +65,29 @@
 			interrupts = <23 IRQ_TYPE_NONE>;
 		};
 
+		cpcap_usb2_phy: phy {
+			compatible = "motorola,mapphone-cpcap-usb-phy";
+			pinctrl-0 = <&usb_gpio_mux_sel1 &usb_gpio_mux_sel2>;
+			pinctrl-1 = <&usb_ulpi_pins>;
+			pinctrl-2 = <&usb_utmi_pins>;
+			pinctrl-3 = <&uart3_pins>;
+			pinctrl-names = "default", "ulpi", "utmi", "uart";
+			#phy-cells = <0>;
+			interrupts-extended = <
+				&cpcap 15 0 &cpcap 14 0 &cpcap 28 0 &cpcap 19 0
+				&cpcap 18 0 &cpcap 17 0 &cpcap 16 0 &cpcap 49 0
+				&cpcap 48 1
+			>;
+			interrupt-names =
+				"id_ground", "id_float", "se0conn", "vbusvld",
+				"sessvld", "sessend", "se1", "dm", "dp";
+			mode-gpios = <&gpio2 28 GPIO_ACTIVE_HIGH
+				      &gpio1 0 GPIO_ACTIVE_HIGH>;
+			io-channels = <&cpcap_adc 2>, <&cpcap_adc 7>;
+			io-channel-names = "vbus", "id";
+			vusb-supply = <&vusb>;
+		};
+
 		led_red: led-red {
 			compatible = "motorola,cpcap-led-red";
 			vdd-supply = <&sw5>;
Signature · 5 lines
2.11.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20170317041012.26800-4-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org

Reviewed-by Tested-by
#10 lore raw

Re: [PATCH 3/3] ARM: dts: omap4-droid4: Add CPCAP PMIC OTG PHY configuration

Hi,

Quoted 7 lines · Tony Lindgren

Add CPCAP PMIC OTG PHY configuration.

Cc Marcel Partap <[email protected]>
Cc Michael Scott <[email protected]>
Cc Sebastian Reichel <[email protected]>

-- Sebastian

Quoted 39 lines
---
 arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi +23 -0
@@ -65,6 +65,29 @@
 			interrupts = <23 IRQ_TYPE_NONE>;
 		};
 
+		cpcap_usb2_phy: phy {
+			compatible = "motorola,mapphone-cpcap-usb-phy";
+			pinctrl-0 = <&usb_gpio_mux_sel1 &usb_gpio_mux_sel2>;
+			pinctrl-1 = <&usb_ulpi_pins>;
+			pinctrl-2 = <&usb_utmi_pins>;
+			pinctrl-3 = <&uart3_pins>;
+			pinctrl-names = "default", "ulpi", "utmi", "uart";
+			#phy-cells = <0>;
+			interrupts-extended = <
+				&cpcap 15 0 &cpcap 14 0 &cpcap 28 0 &cpcap 19 0
+				&cpcap 18 0 &cpcap 17 0 &cpcap 16 0 &cpcap 49 0
+				&cpcap 48 1
+			>;
+			interrupt-names =
+				"id_ground", "id_float", "se0conn", "vbusvld",
+				"sessvld", "sessend", "se1", "dm", "dp";
+			mode-gpios = <&gpio2 28 GPIO_ACTIVE_HIGH
+				      &gpio1 0 GPIO_ACTIVE_HIGH>;
+			io-channels = <&cpcap_adc 2>, <&cpcap_adc 7>;
+			io-channel-names = "vbus", "id";
+			vusb-supply = <&vusb>;
+		};
+
 		led_red: led-red {
 			compatible = "motorola,cpcap-led-red";
 			vdd-supply = <&sw5>;
Signature · 1 line
2.11.1