diff options
| -rw-r--r-- | firmware/drivers/tuner/si4700.c | 3 | ||||
| -rw-r--r-- | firmware/target/arm/imx233/power-imx233.c | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/firmware/drivers/tuner/si4700.c b/firmware/drivers/tuner/si4700.c index 917f628..6966891 100644 --- a/firmware/drivers/tuner/si4700.c +++ b/firmware/drivers/tuner/si4700.c @@ -30,7 +30,8 @@ #include "fmradio_i2c.h" /* physical interface driver */ #include "rds.h" -#if defined(SANSA_CLIP) || defined(SANSA_E200V2) || defined(SANSA_FUZE) || defined(SANSA_C200V2) +#if defined(SANSA_CLIP) || defined(SANSA_E200V2) || defined(SANSA_FUZE) || defined(SANSA_C200V2) \ + || defined(SANSA_FUZEPLUS) /* some models use the internal 32 kHz oscillator which needs special attention during initialisation, power-up and power-down. */ #define SI4700_USE_INTERNAL_OSCILLATOR diff --git a/firmware/target/arm/imx233/power-imx233.c b/firmware/target/arm/imx233/power-imx233.c index 479cba4..0b395b3 100644 --- a/firmware/target/arm/imx233/power-imx233.c +++ b/firmware/target/arm/imx233/power-imx233.c @@ -26,6 +26,7 @@ #include "usb.h" #include "system-target.h" #include "power-imx233.h" +#include "pinctrl-imx233.h" struct current_step_bit_t { @@ -110,6 +111,12 @@ void power_off(void) { /* wait a bit, useful for the user to stop touching anything */ sleep(HZ / 2); +#ifdef SANSA_FUZEPLUS + /* This pin seems to be important to shutdown the hardware properly */ + imx233_set_pin_function(0, 9, PINCTRL_FUNCTION_GPIO); + imx233_enable_gpio_output(0, 9, true); + imx233_set_gpio_output(0, 9, true); +#endif /* power down */ HW_POWER_RESET = HW_POWER_RESET__UNLOCK | HW_POWER_RESET__PWD; while(1); |