diff mbox series

ARM: dts: motorola-mapphone: Add mdm6600 sleep pins

Message ID 20230911035828.36984-1-tony@atomide.com
State New
Headers show
Series ARM: dts: motorola-mapphone: Add mdm6600 sleep pins | expand

Commit Message

Tony Lindgren Sept. 11, 2023, 3:58 a.m. UTC
The sleep pins never got added earlier probably because the driver was not
behaving correctly with the sleep pins. We need the sleep pins to prevent
the modem from waking up on it's own if the reset pin glitches in deeper
SoC idle states.

Cc: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Cc: Merlijn Wajer <merlijn@wizzup.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 .../dts/ti/omap/motorola-mapphone-common.dtsi | 20 ++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

Comments

Sebastian Reichel Sept. 12, 2023, 3:18 p.m. UTC | #1
Hi,

On Mon, Sep 11, 2023 at 06:58:28AM +0300, Tony Lindgren wrote:
> The sleep pins never got added earlier probably because the driver was not
> behaving correctly with the sleep pins. We need the sleep pins to prevent
> the modem from waking up on it's own if the reset pin glitches in deeper
> SoC idle states.
> 
> Cc: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
> Cc: Merlijn Wajer <merlijn@wizzup.org>
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: Sebastian Reichel <sre@kernel.org>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>

-- Sebastian

>  .../dts/ti/omap/motorola-mapphone-common.dtsi | 20 ++++++++++++++++++-
>  1 file changed, 19 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/ti/omap/motorola-mapphone-common.dtsi b/arch/arm/boot/dts/ti/omap/motorola-mapphone-common.dtsi
> --- a/arch/arm/boot/dts/ti/omap/motorola-mapphone-common.dtsi
> +++ b/arch/arm/boot/dts/ti/omap/motorola-mapphone-common.dtsi
> @@ -67,7 +67,8 @@ hdmi_regulator: regulator-hdmi {
>  	fsusb1_phy: usb-phy@1 {
>  		compatible = "motorola,mapphone-mdm6600";
>  		pinctrl-0 = <&usb_mdm6600_pins>;
> -		pinctrl-names = "default";
> +		pinctrl-1 = <&usb_mdm6600_sleep_pins>;
> +		pinctrl-names = "default", "sleep";
>  		enable-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>;     /* gpio_95 */
>  		power-gpios = <&gpio2 22 GPIO_ACTIVE_HIGH>;	/* gpio_54 */
>  		reset-gpios = <&gpio2 17 GPIO_ACTIVE_HIGH>;	/* gpio_49 */
> @@ -476,6 +477,23 @@ OMAP4_IOPAD(0x142, PIN_OUTPUT | MUX_MODE3)
>  		>;
>  	};
>  
> +	/* Modem sleep pins to keep gpio_49 high with internal pull */
> +	usb_mdm6600_sleep_pins: usb-mdm6600-sleep-pins {
> +		pinctrl-single,pins = <
> +		OMAP4_IOPAD(0x0d8, PIN_INPUT | MUX_MODE3)
> +		OMAP4_IOPAD(0x07c, PIN_OUTPUT | MUX_MODE3)
> +		OMAP4_IOPAD(0x072, PIN_INPUT_PULLUP | MUX_MODE7) /* Keep gpio_49 reset high */
> +		OMAP4_IOPAD(0x14e, PIN_OUTPUT | MUX_MODE3)
> +		OMAP4_IOPAD(0x150, PIN_OFF_OUTPUT_LOW | PIN_INPUT | MUX_MODE3)
> +		OMAP4_IOPAD(0x07e, PIN_INPUT | MUX_MODE3)
> +		OMAP4_IOPAD(0x07a, PIN_INPUT | MUX_MODE3)
> +		OMAP4_IOPAD(0x078, PIN_INPUT | MUX_MODE3)
> +		OMAP4_IOPAD(0x094, PIN_OUTPUT | MUX_MODE3)
> +		OMAP4_IOPAD(0x096, PIN_OUTPUT | MUX_MODE3)
> +		OMAP4_IOPAD(0x142, PIN_OUTPUT | MUX_MODE3)
> +		>;
> +	};
> +
>  	usb_ulpi_pins: usb-ulpi-pins {
>  		pinctrl-single,pins = <
>  		OMAP4_IOPAD(0x196, MUX_MODE7)
> -- 
> 2.42.0
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/ti/omap/motorola-mapphone-common.dtsi b/arch/arm/boot/dts/ti/omap/motorola-mapphone-common.dtsi
--- a/arch/arm/boot/dts/ti/omap/motorola-mapphone-common.dtsi
+++ b/arch/arm/boot/dts/ti/omap/motorola-mapphone-common.dtsi
@@ -67,7 +67,8 @@  hdmi_regulator: regulator-hdmi {
 	fsusb1_phy: usb-phy@1 {
 		compatible = "motorola,mapphone-mdm6600";
 		pinctrl-0 = <&usb_mdm6600_pins>;
-		pinctrl-names = "default";
+		pinctrl-1 = <&usb_mdm6600_sleep_pins>;
+		pinctrl-names = "default", "sleep";
 		enable-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>;     /* gpio_95 */
 		power-gpios = <&gpio2 22 GPIO_ACTIVE_HIGH>;	/* gpio_54 */
 		reset-gpios = <&gpio2 17 GPIO_ACTIVE_HIGH>;	/* gpio_49 */
@@ -476,6 +477,23 @@  OMAP4_IOPAD(0x142, PIN_OUTPUT | MUX_MODE3)
 		>;
 	};
 
+	/* Modem sleep pins to keep gpio_49 high with internal pull */
+	usb_mdm6600_sleep_pins: usb-mdm6600-sleep-pins {
+		pinctrl-single,pins = <
+		OMAP4_IOPAD(0x0d8, PIN_INPUT | MUX_MODE3)
+		OMAP4_IOPAD(0x07c, PIN_OUTPUT | MUX_MODE3)
+		OMAP4_IOPAD(0x072, PIN_INPUT_PULLUP | MUX_MODE7) /* Keep gpio_49 reset high */
+		OMAP4_IOPAD(0x14e, PIN_OUTPUT | MUX_MODE3)
+		OMAP4_IOPAD(0x150, PIN_OFF_OUTPUT_LOW | PIN_INPUT | MUX_MODE3)
+		OMAP4_IOPAD(0x07e, PIN_INPUT | MUX_MODE3)
+		OMAP4_IOPAD(0x07a, PIN_INPUT | MUX_MODE3)
+		OMAP4_IOPAD(0x078, PIN_INPUT | MUX_MODE3)
+		OMAP4_IOPAD(0x094, PIN_OUTPUT | MUX_MODE3)
+		OMAP4_IOPAD(0x096, PIN_OUTPUT | MUX_MODE3)
+		OMAP4_IOPAD(0x142, PIN_OUTPUT | MUX_MODE3)
+		>;
+	};
+
 	usb_ulpi_pins: usb-ulpi-pins {
 		pinctrl-single,pins = <
 		OMAP4_IOPAD(0x196, MUX_MODE7)