|
发表于 2020-8-11 18:04:33
6541 浏览 0 回复
61 62 65android9.0 gps有源天线修改
index fd5c225..208765c 100755
--- a/kernel-4.9/arch/arm64/boot/dts/mediatek/k62v1_64_bsp.dts
+++ b/kernel-4.9/arch/arm64/boot/dts/mediatek/k62v1_64_bsp.dts
@@ -240,14 +240,31 @@
output-low;
};
};
+
+ gpspow_pins_oh: gpspow@3 {
+ pins_cmd_dat {
+ pinmux = <PINMUX_GPIO75__FUNC_GPIO75>;
+ slew-rate = <1>;
+ output-high;
+ };
+ };
+ gpspow_pins_ol: gpspow@4 {
+ pins_cmd_dat {
+ pinmux = <PINMUX_GPIO75__FUNC_GPIO75>;
+ slew-rate = <1>;
+ output-low;
+ };
+ };
};
&consys {
pinctrl-names = "default", "gps_lna_state_init",
- "gps_lna_state_oh", "gps_lna_state_ol";
+ "gps_lna_state_oh", "gps_lna_state_ol","gps_pow_state_oh","gps_pow_state_ol";
pinctrl-0 = <&consys_pins_default>;
pinctrl-1 = <&gpslna_pins_init>;
pinctrl-2 = <&gpslna_pins_oh>;
pinctrl-3 = <&gpslna_pins_ol>;
+ pinctrl-4 = <&gpspow_pins_oh>;
+ pinctrl-5 = <&gpspow_pins_ol>;
status = "okay";
};
--- a/vendor/mediatek/kernel_modules/connectivity/common/common_main/platform/wmt_plat_alps.c
+++ b/vendor/mediatek/kernel_modules/connectivity/common/common_main/platform/wmt_plat_alps.c
@@ -1357,6 +1357,8 @@ static INT32 wmt_plat_soc_gps_lna_ctrl(ENUM_PIN_STATE state)
struct pinctrl_state *gps_lna_init;
struct pinctrl_state *gps_lna_oh;
struct pinctrl_state *gps_lna_ol;
+ struct pinctrl_state *gps_pow_oh;
+ struct pinctrl_state *gps_pow_ol;
struct pinctrl *consys_pinctrl;
WMT_PLAT_PR_DBG("ENTER++\n");
@@ -1384,18 +1386,33 @@ static INT32 wmt_plat_soc_gps_lna_ctrl(ENUM_PIN_STATE state)
return 0;
}
+ gps_pow_oh = pinctrl_lookup_state(consys_pinctrl, "gps_pow_state_oh");
+ if (IS_ERR(gps_pow_oh)) {
+ WMT_PLAT_PR_ERR("Cannot find gps pow pin oh state!\n");
+ return 0;
+ }
+
+ gps_pow_ol = pinctrl_lookup_state(consys_pinctrl, "gps_pow_state_ol");
+ if (IS_ERR(gps_pow_ol)) {
+ WMT_PLAT_PR_ERR("Cannot find gps pow pin ol state!\n");
+ return 0;
+ }
+
switch (state) {
case PIN_STA_INIT:
case PIN_STA_DEINIT:
pinctrl_select_state(consys_pinctrl, gps_lna_init);
+ pinctrl_select_state(consys_pinctrl, gps_pow_ol);
WMT_PLAT_PR_DBG("set gps lna to init\n");
break;
case PIN_STA_OUT_H:
pinctrl_select_state(consys_pinctrl, gps_lna_oh);
+ pinctrl_select_state(consys_pinctrl, gps_pow_oh);
WMT_PLAT_PR_DBG("set gps lna to oh\n");
break;
case PIN_STA_OUT_L:
pinctrl_select_state(consys_pinctrl, gps_lna_ol);
+ pinctrl_select_state(consys_pinctrl, gps_pow_ol);
WMT_PLAT_PR_DBG("set gps lna to ol\n");
break;
default:
|
|
|
|
|
|
|
登录或注册
|