1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <baseboard/gpio.h>
4 #include <baseboard/variants.h>
5 #include <console/console.h>
8 #define RW350R_RST_DELAY_MS 20
9 #define RW350R_PERST_DELAY_MS 30
11 static const struct pad_config rw350r_en_pad
[] = {
12 /* H23 : LTE_PWR_OFF_EN */
13 PAD_CFG_GPO(GPP_H23
, 1, DEEP
),
15 static const struct pad_config rw350r_rst_pad
[] = {
16 /* F12 : WWAN_RST_L */
17 PAD_CFG_GPO_LOCK(GPP_F12
, 1, LOCK_CONFIG
),
19 static const struct pad_config rw350r_perst_pad
[] = {
20 /* F13 : PLTRST_WWAN# */
21 PAD_CFG_GPO(GPP_F13
, 1, DEEP
),
24 void variant_init(void)
27 * RW350R power on seuqence:
28 * De-assert WWAN_EN -> 20ms -> de-assert WWAN_RST -> 30ms ->
29 * de-assert WWAN_PERST
31 gpio_configure_pads(rw350r_en_pad
, ARRAY_SIZE(rw350r_en_pad
));
32 mdelay(RW350R_RST_DELAY_MS
);
33 gpio_configure_pads(rw350r_rst_pad
, ARRAY_SIZE(rw350r_rst_pad
));
34 mdelay(RW350R_PERST_DELAY_MS
);
35 gpio_configure_pads(rw350r_perst_pad
, ARRAY_SIZE(rw350r_perst_pad
));