From 4fd14a49545159e281d7da4ef3727eaac9bc9710 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Tue, 4 Apr 2017 09:22:25 -0700 Subject: [PATCH 1/5] ARM: dts: omap4-droid4: Fix interrupt triggering for cpcap The CPCAP PMIC interrupt is level high sensitive despite it being requested as edge high triggered in the Motorola Linux kernel. Note that also the related driver change is needed posted as "mfd: cpcap: Fix interrupt to use level interrupt". Fixes: 56e1d40d3bea ("mfd: cpcap: Add minimal support") Cc: Charles Keepax Cc: Marcel Partap Cc: Michael Scott Cc: Sebastian Reichel Signed-off-by: Tony Lindgren --- arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi b/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi index 49b76aa16e5f..d5c364ba57c6 100644 --- a/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi +++ b/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi @@ -11,7 +11,7 @@ cpcap: pmic@0 { compatible = "motorola,cpcap", "st,6556002"; reg = <0>; /* cs0 */ interrupt-parent = <&gpio1>; - interrupts = <7 IRQ_TYPE_EDGE_RISING>; + interrupts = <7 IRQ_TYPE_LEVEL_HIGH>; interrupt-controller; #interrupt-cells = <2>; #address-cells = <1>; From 22d653429e4c275be357eef5acbeb6572cf007db Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Tue, 4 Apr 2017 09:22:30 -0700 Subject: [PATCH 2/5] ARM: dts: omap4-droid4: Stop disabling SRAM and GPMC I disabled SRAM and GPMC originally when seeing errors with omap_barriers_init(). But that is no longer happening probably because the memory range is now properly configured to 1021 MB instead of 1024 MB. So let's enable SRAM and GPMC so we get omap_barriers_init() working and can idle the GPMC. Cc: Marcel Partap Cc: Michael Scott Cc: Sebastian Reichel Signed-off-by: Tony Lindgren --- arch/arm/boot/dts/omap4-droid4-xt894.dts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/arch/arm/boot/dts/omap4-droid4-xt894.dts b/arch/arm/boot/dts/omap4-droid4-xt894.dts index f27966e3cbc0..89eb607f4a9e 100644 --- a/arch/arm/boot/dts/omap4-droid4-xt894.dts +++ b/arch/arm/boot/dts/omap4-droid4-xt894.dts @@ -24,8 +24,7 @@ aliases { /* * We seem to have only 1021 MB accessible, 1021 - 1022 is locked, - * then 1023 - 1024 seems to contain mbm. For SRAM, see the notes - * below about SRAM and L3_ICLK2 being unused by default, + * then 1023 - 1024 seems to contain mbm. */ memory { device_type = "memory"; @@ -176,11 +175,6 @@ lcd0_in: endpoint { }; }; -/* L3_2 interconnect is unused, SRAM, GPMC and L3_ICLK2 disabled */ -&gpmc { - status = "disabled"; -}; - &hdmi { status = "okay"; pinctrl-0 = <&dss_hdmi_pins>; @@ -356,11 +350,6 @@ tsp@4a { }; }; -/* L3_2 interconnect is unused, SRAM, GPMC and L3_ICLK2 disabled */ -&ocmcram { - status = "disabled"; -}; - &omap4_pmx_core { /* hdmi_hpd.gpio_63 */ From 94b9a8a6fdc9b320d286b2ba0d4075bc31d9f415 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Sun, 9 Apr 2017 16:20:29 -0700 Subject: [PATCH 3/5] ARM: dts: omap4-droid4: Add CPCAP PMIC ADC configuration Add CPCAP PMIC ADC configuration. Cc: devicetree@vger.kernel.org Cc: Marcel Partap Cc: Michael Scott Reviewed-by: Sebastian Reichel Tested-by: Sebastian Reichel Signed-off-by: Tony Lindgren --- arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi b/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi index d5c364ba57c6..1aa85d8999d7 100644 --- a/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi +++ b/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi @@ -19,6 +19,13 @@ cpcap: pmic@0 { 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"; From 8a1a6259657e319eec0311789de10336dcb8e5de Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Sun, 9 Apr 2017 16:21:59 -0700 Subject: [PATCH 4/5] ARM: dts: omap4-droid4: Add CPCAP PMIC battery charger configuration Add CPCAP PMIC battery charger configuration. Cc: devicetree@vger.kernel.org Cc: Marcel Partap Cc: Michael Scott Reviewed-by: Sebastian Reichel Tested-by: Sebastian Reichel Signed-off-by: Tony Lindgren --- .../arm/boot/dts/motorola-cpcap-mapphone.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi b/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi index 1aa85d8999d7..e57e38613695 100644 --- a/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi +++ b/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi @@ -26,6 +26,25 @@ cpcap_adc: adc { #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"; From 8434fbefc63790ee928d04cad0458508eaa39ffd Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Sun, 9 Apr 2017 16:22:08 -0700 Subject: [PATCH 5/5] ARM: dts: omap4-droid4: Add CPCAP PMIC OTG PHY configuration Add CPCAP PMIC OTG PHY configuration. Cc: devicetree@vger.kernel.org Cc: Marcel Partap Cc: Michael Scott Reviewed-by: Sebastian Reichel Tested-by: Sebastian Reichel Signed-off-by: Tony Lindgren --- .../arm/boot/dts/motorola-cpcap-mapphone.dtsi | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi b/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi index e57e38613695..f5aeb3959afd 100644 --- a/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi +++ b/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi @@ -65,6 +65,29 @@ power_button: button { 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>;