nuttx/boards
Felipe Moura 167dc72839 boards/esp32s3-xiao: wire up Wi-Fi, guarding PM light sleep during radio init
The in-tree esp32s3-xiao board bringup never wires up Wi-Fi at all --
unlike esp32s3-devkit/esp32s3-eye, it has no
`#ifdef CONFIG_ESPRESSIF_WIFI` include of esp32s3_board_wlan.h and no
call to board_wlan_init(). Add both, mirroring those boards' pattern
and placement exactly.

On its own this is not enough for a board that also uses CONFIG_PM:
Wi-Fi's PHY/RF calibration inside board_wlan_init() cannot tolerate
the clock gating of PM_STANDBY (light sleep). If the idle task enters
light sleep while phy_init's calibration is still running -- which the
greedy governor is free to do the moment the CPU goes idle during
driver init -- the calibration hangs forever waiting on a clock that
just stopped. Confirmed on real XIAO ESP32-S3 hardware: with
CONFIG_PM + CONFIG_ESPRESSIF_WIFI both enabled and no guard, boot got
stuck 100% of the time right after the "net80211 rom version" line,
before phy_init ever printed, and never reached NSH -- reproducible
across repeated flashes, 50s+ waits, not even responding to a UART
wakeup keypress (a genuine hang, not quiet sleep).

Fixed by holding a stronger PM lock than PM_STANDBY for the duration
of board_wlan_init(): pm_stay(PM_IDLE_DOMAIN, PM_IDLE) blocks
PM_STANDBY/PM_SLEEP while still allowing normal CPU idle, and
pm_relax() releases it immediately after, restoring whatever floor the
board's own PM policy holds otherwise. Confirmed fixed on the same
hardware: boots clean to NSH with Wi-Fi + PM enabled together, `ps`
shows the wifi/netdev-wlan0 kernel threads running, and `wapi scan`/
`ifup wlan0` work normally.

esp32c3-devkit and esp32c6-devkit also combine CONFIG_PM with Wi-Fi,
but don't need this guard today: both call board_wlan_init() well
before esp_pmconfigure() (which is what actually arms the PM governor)
runs near the end of bringup, so PM isn't active yet during their
Wi-Fi init. This board's PM handling begins earlier in bringup, so the
two can race here.

Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
Assisted-by: Claude:claude-sonnet-5
2026-09-10 10:23:15 +08:00
..
arm libs/libc/elf, binfmt: Describe the GOT by base and size, not by index. 2026-09-08 16:31:16 -03:00
arm64 boards/imx93-evk: disable work queues in bootloader 2026-09-04 23:02:48 +08:00
avr !arch/arm: Use r9 as the PIC base register. 2026-08-06 01:38:23 +08:00
dummy
hc/m9s12 !arch/arm: Use r9 as the PIC base register. 2026-08-06 01:38:23 +08:00
mips arch/mips/jz4780: Add HDMI EDID parsing and dynamic display modes 2026-08-29 11:08:25 -03:00
misoc/lm32/misoc !libc/stream: remove CONFIG_LIBC_LONG_LONG and always support long long 2026-05-19 16:21:28 +08:00
or1k/mor1kx/or1k !arch/arm: Use r9 as the PIC base register. 2026-08-06 01:38:23 +08:00
renesas !arch/arm: Use r9 as the PIC base register. 2026-08-06 01:38:23 +08:00
risc-v arch/risc-v/eic7700x: Add CPU core clock control. 2026-09-07 10:03:33 -03:00
sim/sim/sim arch, boards, cmake: Build C++ ELF modules without __cxa_atexit. 2026-09-04 15:44:24 -03:00
sparc !libc/stream: remove CONFIG_LIBC_LONG_LONG and always support long long 2026-05-19 16:21:28 +08:00
tricore !sched/clock: remove CONFIG_SYSTEM_TIME64 and always use 64-bit time 2026-05-19 16:21:28 +08:00
x86/qemu/qemu-i486 boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
x86_64/qemu/qemu-intel64 fs: rename PSEUDOFS_SOFTLINKS to FS_LINKS 2026-08-27 01:12:33 +08:00
xtensa boards/esp32s3-xiao: wire up Wi-Fi, guarding PM light sleep during radio init 2026-09-10 10:23:15 +08:00
z16/z16f/z16f2800100zcog boards/z16: Replace board_app_initialize 2026-05-02 18:36:46 +08:00
z80 boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
.gitignore
Board.mk !tools/mkpasswd: PBKDF2 host tool and ROMFS passwd build integration 2026-07-21 20:19:14 +08:00
boardctl.c !boards/boardctl: Remove BOARDIOC_INIT 2026-05-26 09:57:29 +08:00
CMakeLists.txt cmake: Use NUTTX(_DIR/_BIN_DIR) instead CMAKE(_SRC_DIR/_BIN_DIR) 2026-08-09 11:13:08 -03:00
dummy.c boards: migrate to SPDX identifier 2024-11-12 22:20:59 +08:00
Kconfig boards/gd32vm55x: Add support to GD32VW553-HMQ 2026-09-03 07:27:43 +02:00
Makefile tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-07-28 21:26:03 -03:00