From 138d2ed10163e6e91bd03ce0ea221d8a4e5221a4 Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Wed, 8 Jul 2020 01:00:48 +0200 Subject: [PATCH 102/351] arm64: dts: sun50i-a64-pinephone: Add modem power manager Pinephone has a EG25-G modem that needs a special powerup/powerdown sequence. Add a power manager to manage the modem power. Signed-off-by: Ondrej Jirman --- .../allwinner/sun50i-a64-pinephone-1.0.dts | 22 ++++++++++++++++++ .../allwinner/sun50i-a64-pinephone-1.1.dts | 23 +++++++++++++++++++ .../allwinner/sun50i-a64-pinephone-1.2.dts | 23 +++++++++++++++++++ 3 files changed, 68 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts index 22e714692506..b027d09e8f87 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts @@ -78,6 +78,28 @@ ®_drivevbus { status = "okay"; }; +&uart3 { + modem { + compatible = "quectel,eg25"; + char-device-name = "modem-power"; + + power-supply = <®_vbat_bb>; /* PL7 */ + + enable-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */ + reset-gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */ + pwrkey-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */ + + sleep-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ + wakeup-gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* PB2-RI */ + + cts-gpios = <&pio 3 5 GPIO_ACTIVE_HIGH>; /* PD5-CTS */ + dtr-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6-DTR */ + rts-gpios = <&pio 3 4 GPIO_ACTIVE_HIGH>; /* PD4-RTS */ + + quectel,qdai = "1,0,0,2,0,1,1,1"; + }; +}; + &usbphy { usb-role-switch; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts index 0458535fccd6..c91fd16bfe8a 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts @@ -97,6 +97,29 @@ ®_drivevbus { status = "okay"; }; +&uart3 { + modem { + compatible = "quectel,eg25"; + char-device-name = "modem-power"; + + power-supply = <®_vbat_bb>; /* PL7 */ + + enable-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */ + reset-gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */ + status-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */ + status-pwrkey-multiplexed; /* status acts as pwrkey */ + + sleep-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ + wakeup-gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* PB2-RI */ + + dtr-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6-DTR */ + cts-gpios = <&pio 3 5 GPIO_ACTIVE_HIGH>; /* PD5-CTS */ + rts-gpios = <&pio 3 4 GPIO_ACTIVE_HIGH>; /* PD4-RTS */ + + quectel,qdai = "1,0,0,2,0,1,1,1"; + }; +}; + &usbphy { usb-role-switch; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts index 7f2aca77c6bd..49fcf0f3a8e2 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts @@ -81,6 +81,29 @@ ®_anx1v0 { enable-active-high; }; +&uart3 { + modem { + compatible = "quectel,eg25"; + char-device-name = "modem-power"; + + power-supply = <®_vbat_bb>; /* PL7 */ + + enable-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */ + reset-gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */ + status-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ + pwrkey-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */ + + host-ready-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ + wakeup-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6-RI */ + + dtr-gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* PB2-DTR */ + cts-gpios = <&pio 3 5 GPIO_ACTIVE_HIGH>; /* PD5-CTS */ + rts-gpios = <&pio 3 4 GPIO_ACTIVE_HIGH>; /* PD4-RTS */ + + quectel,qdai = "1,0,0,2,0,1,1,1"; + }; +}; + &usbphy { usb-role-switch; -- 2.34.0