Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

Commit

Permalink
arm64: dts: rk3399-pinephone-pro: Add support for powering up the modem
Browse files Browse the repository at this point in the history
Pinephone Pro has the same modem that's already supported by modem-power.
Add support for it do DT.

Signed-off-by: Ondrej Jirman <[email protected]>
  • Loading branch information
Ondrej Jirman committed Feb 9, 2022
1 parent 122a774 commit c057140
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,30 @@
};
};

vcc_4g_5v: vcc-4g-5v {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio1 RK_PC7 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&vcc_4g_5v_en>;
regulator-name = "vcc_4g_5v";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&vcc5v0_sys>;
};

vcc_4g: vcc-4g {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio4 RK_PC7 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&vcc_4g_en>;
regulator-name = "vcc_4g";
regulator-min-microvolt = <3800000>;
regulator-max-microvolt = <3800000>;
vin-supply = <&vcc_sysin>;
};

vcc1v8_codec: vcc1v8-codec-regulator {
compatible = "regulator-fixed";
enable-active-high;
Expand Down Expand Up @@ -937,6 +961,35 @@
};
};

&uart3 {
status = "okay";

modem {
compatible = "quectel,eg25";
char-device-name = "modem-power";

pinctrl-names = "default";
pinctrl-0 = <&modem_control_pins>;

power-supply = <&vcc_4g>;
vbus-supply = <&vcc_4g_5v>;

enable-gpios = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; // W_DISABLE#
reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>;
status-gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;
pwrkey-gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;

host-ready-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>; // apready
wakeup-gpios = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>; // ri

dtr-gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_HIGH>;
cts-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>;
rts-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;

quectel,qdai = "3,0,0,4,0,0,1,1";
};
};

&pmu_io_domains {
pmu1830-supply = <&vcc_1v8>;
status = "okay";
Expand Down Expand Up @@ -997,6 +1050,29 @@
};
};

modem {
vcc_4g_5v_en: vcc-4g-5v-en-pin {
rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
};

vcc_4g_en: vcc-4g-en-pin {
rockchip,pins = <4 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
};

modem_control_pins: modem-control-pins {
rockchip,pins =
<0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
<3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
<3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
<0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,
<0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>,
<0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>,
<0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>,
<3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>,
<3 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
};
};

pmic {
pmic_int_l: pmic-int-l {
rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
Expand Down

0 comments on commit c057140

Please sign in to comment.