diff --git a/common/gpio.h b/common/gpio.h index b2f67f8ba3..89cdedd66c 100644 --- a/common/gpio.h +++ b/common/gpio.h @@ -5,7 +5,7 @@ #define GPIO_HUB_RST_N 30 #define GPIO_UBLOX_RST_N 32 #define GPIO_UBLOX_SAFEBOOT_N 33 - #define GPIO_UBLOX_PWR_EN 34 + #define GPIO_GNSS_PWR_EN 34 /* SCHEMATIC LABEL: GPIO_UBLOX_PWR_EN */ #define GPIO_STM_RST_N 124 #define GPIO_STM_BOOT0 134 #define GPIO_BMX_ACCEL_INT 21 @@ -17,7 +17,7 @@ #define GPIO_HUB_RST_N 0 #define GPIO_UBLOX_RST_N 0 #define GPIO_UBLOX_SAFEBOOT_N 0 - #define GPIO_UBLOX_PWR_EN 0 + #define GPIO_GNSS_PWR_EN 0 /* SCHEMATIC LABEL: GPIO_UBLOX_PWR_EN */ #define GPIO_STM_RST_N 0 #define GPIO_STM_BOOT0 0 #define GPIO_BMX_ACCEL_INT 0 diff --git a/system/hardware/tici/pins.py b/system/hardware/tici/pins.py index 5ac0158082..4388351e1f 100644 --- a/system/hardware/tici/pins.py +++ b/system/hardware/tici/pins.py @@ -6,7 +6,7 @@ class GPIO: HUB_RST_N = 30 UBLOX_RST_N = 32 UBLOX_SAFEBOOT_N = 33 - UBLOX_PWR_EN = 34 + GNSS_PWR_EN = 34 # SCHEMATIC LABEL: GPIO_UBLOX_PWR_EN STM_RST_N = 124 STM_BOOT0 = 134 diff --git a/system/hardware/tici/power_draw_test.py b/system/hardware/tici/power_draw_test.py index 28113ad073..a0520638b7 100755 --- a/system/hardware/tici/power_draw_test.py +++ b/system/hardware/tici/power_draw_test.py @@ -53,7 +53,7 @@ if __name__ == "__main__": t.set_screen_brightness(0) gpio_init(GPIO.STM_RST_N, True) gpio_init(GPIO.HUB_RST_N, True) - gpio_init(GPIO.UBLOX_PWR_EN, True) + gpio_init(GPIO.GNSS_PWR_EN, True) gpio_init(GPIO.LTE_RST_N, True) gpio_init(GPIO.LTE_PWRKEY, True) gpio_init(GPIO.CAM0_AVDD_EN, True) @@ -65,7 +65,7 @@ if __name__ == "__main__": os.system("sudo su -c 'echo 0 > /sys/kernel/debug/regulator/camera_rear_ldo/enable'") # cam 1v2 off gpio_set(GPIO.CAM0_AVDD_EN, False) # cam 2v8 off gpio_set(GPIO.LTE_RST_N, True) # quectel off - gpio_set(GPIO.UBLOX_PWR_EN, False) # gps off + gpio_set(GPIO.GNSS_PWR_EN, False) # gps off gpio_set(GPIO.STM_RST_N, True) # panda off gpio_set(GPIO.HUB_RST_N, False) # hub off # cameras in reset @@ -92,7 +92,7 @@ if __name__ == "__main__": gpio_set(GPIO.STM_RST_N, False) time.sleep(5) print("panda: ", read_power_avg()) - gpio_set(GPIO.UBLOX_PWR_EN, True) + gpio_set(GPIO.GNSS_PWR_EN, True) time.sleep(5) print("gps: ", read_power_avg()) gpio_set(GPIO.LTE_RST_N, False) diff --git a/system/sensord/pigeond.py b/system/sensord/pigeond.py index a2b6b08de0..fc5c05e64f 100755 --- a/system/sensord/pigeond.py +++ b/system/sensord/pigeond.py @@ -27,11 +27,11 @@ UBLOX_ASSIST_ACK = b"\xb5\x62\x13\x60\x08\x00" def set_power(enabled: bool) -> None: gpio_init(GPIO.UBLOX_SAFEBOOT_N, True) - gpio_init(GPIO.UBLOX_PWR_EN, True) + gpio_init(GPIO.GNSS_PWR_EN, True) gpio_init(GPIO.UBLOX_RST_N, True) gpio_set(GPIO.UBLOX_SAFEBOOT_N, True) - gpio_set(GPIO.UBLOX_PWR_EN, enabled) + gpio_set(GPIO.GNSS_PWR_EN, enabled) gpio_set(GPIO.UBLOX_RST_N, enabled) def add_ubx_checksum(msg: bytes) -> bytes: diff --git a/system/sensord/rawgps/rawgpsd.py b/system/sensord/rawgps/rawgpsd.py index bb228812dc..e710a16920 100755 --- a/system/sensord/rawgps/rawgpsd.py +++ b/system/sensord/rawgps/rawgpsd.py @@ -271,7 +271,7 @@ def main() -> NoReturn: def cleanup(sig, frame): cloudlog.warning("caught sig disabling quectel gps") - gpio_set(GPIO.UBLOX_PWR_EN, False) + gpio_set(GPIO.GNSS_PWR_EN, False) teardown_quectel(diag) cloudlog.warning("quectel cleanup done") @@ -289,8 +289,8 @@ def main() -> NoReturn: want_assistance = not r current_gps_time = utc_to_gpst(GPSTime.from_datetime(datetime.utcnow())) cloudlog.warning("quectel setup done") - gpio_init(GPIO.UBLOX_PWR_EN, True) - gpio_set(GPIO.UBLOX_PWR_EN, True) + gpio_init(GPIO.GNSS_PWR_EN, True) + gpio_set(GPIO.GNSS_PWR_EN, True) pm = messaging.PubMaster(['qcomGnss', 'gpsLocation']) diff --git a/system/sensord/tests/test_pigeond.py b/system/sensord/tests/test_pigeond.py index d7c7567e4f..90cbf06340 100755 --- a/system/sensord/tests/test_pigeond.py +++ b/system/sensord/tests/test_pigeond.py @@ -56,7 +56,7 @@ class TestPigeond(unittest.TestCase): managed_processes['pigeond'].stop() assert gpio_read(GPIO.UBLOX_RST_N) == 0 - assert gpio_read(GPIO.UBLOX_PWR_EN) == 0 + assert gpio_read(GPIO.GNSS_PWR_EN) == 0 if __name__ == "__main__":