ViezeVingertjes opened a new pull request, #22396:
URL: https://github.com/apache/nuttx/pull/22396

   ## Summary
   
   **boards/esp32s3: Add Waveshare ESP32-S3-Touch-AMOLED-2.16 board.**
   
   Add initial support for the Waveshare ESP32-S3-Touch-AMOLED-2.16, an
   ESP32-S3R8 board with 16MB flash, 8MB octal PSRAM, a 2.16" 480x480
   QSPI AMOLED with touch, AXP2101 PMIC, QMI8658 IMU, PCF85063 RTC,
   ES8311/ES7210 audio and a microSD slot.
   
   This first step brings up the board itself:
   * USB Serial/JTAG console (the board has no USB-UART bridge).
   * BOOT (GPIO0), IO18 (GPIO18) and PWR (AXP2101 PWRON mirrored on
     GPIO16, active high) keys through the buttons lower half.
   * Shared I2C0 bus on GPIO15/GPIO14 for all on-board peripherals.
   * Make and CMake build support.
   * Configurations: nsh, i2c, psram and buttons.
   * Board documentation with pin mapping and I2C address map.
   
   Display, touch, PMIC, RTC, IMU, audio and SD card support follow in
   separate changes.
   
   Tested on hardware: NSH over USB Serial/JTAG, i2c scan finds all six
   on-board devices, PSRAM adds 8MB to the heap.
   
   **boards/esp32s3-touch-amoled-216: Add QMI8658 IMU support.**
   
   Register the on-board QMI8658 6-axis IMU (I2C0, address 0x6B) through
   the common ESP32-S3 QMI8658 board helper, which exposes it as the uORB
   topics sensor_accel0 and sensor_gyro0.
   
   Add a qmi8658 configuration with uorb_listener and document it.
   
   Tested on hardware with uorb_listener: accelerometer reads ~1 g on Z
   with the board flat, gyroscope and temperature report sane values.
   
   **boards/esp32s3-touch-amoled-216: Add microSD card support.**
   
   The microSD slot is wired to SPI3 (GPIO2 SCLK, GPIO1 MOSI, GPIO3 MISO,
   GPIO41 CS) and has no card detect switch.
   
   * Add the SPI3 status hook, reporting the card as always present.
   * Bind the slot to /dev/mmcsd0 with the common MMC/SD-over-SPI helper.
   * Add an sdmmc configuration with FAT and document it.
   
   Tested on hardware with a 4GB card: mount, file write/read, 1MB dd
   write at ~1.3MB/s, delete, umount.
   
   **boards/esp32s3-touch-amoled-216: Add Wi-Fi configuration.**
   
   Add a wifi configuration based on the ESP32-S3 DevKit one: Wi-Fi
   station with the wapi tool, DHCP client, ping and iperf, and SPI flash
   storage (SPIFFS) for the wapi configuration.  Document it.
   
   Tested on hardware: wlan0 comes up and "wapi scan wlan0" lists the
   surrounding access points.
   
   ## Impact
   
   * Is new feature added? Is existing feature changed? YES: new board with 
nsh, i2c, psram, buttons, qmi8658, sdmmc and wifi configurations.
   * Impact on user (will user need to adapt to change)? NO
   * Impact on build (will build process change)? NO
   * Impact on hardware (will arch(s) / board(s) / driver(s) change)? NO
   * Impact on documentation (is update required / provided)? YES: board 
documentation.
   * Impact on security (any sort of implications)? NO
   * Impact on compatibility (backward/forward/interoperability)? NO
   * Anything else to consider or add? Display, touch, PMIC, RTC and audio 
follow in a separate PR once their drivers are merged.
   
   ## Testing
   
   I confirm that changes are verified on local setup and works as intended:
   * Build Host(s): Linux x86_64, xtensa-esp-elf GCC 15.2.0 
(esp-15.2.0_20251204), riscv32-esp-elf GCC 15.2.0 for the ESP32-C3 build.
   * Target(s): Waveshare ESP32-S3-Touch-AMOLED-2.16 (ESP32-S3R8, 16 MB flash, 
8 MB PSRAM).
   * The exact branch (current master + this PR, with current nuttx-apps 
master) flashed and run on the board for every configuration: nsh, i2c scan, 
PSRAM heap, IMU, microSD and Wi-Fi scan; keys tested with the same board code.
   
   Builds (each on current master plus this PR only):
   
   * PASS pr/waveshare-amoled-216 nsh esp32s3-touch-amoled-216:nsh (warnings: 0)
   * PASS pr/waveshare-amoled-216 i2c esp32s3-touch-amoled-216:i2c (warnings: 0)
   * PASS pr/waveshare-amoled-216 psram esp32s3-touch-amoled-216:psram 
(warnings: 0)
   * PASS pr/waveshare-amoled-216 buttons esp32s3-touch-amoled-216:buttons 
(warnings: 0)
   * PASS pr/waveshare-amoled-216 qmi8658 esp32s3-touch-amoled-216:qmi8658 
(warnings: 0)
   * PASS pr/waveshare-amoled-216 sdmmc esp32s3-touch-amoled-216:sdmmc 
(warnings: 0)
   * PASS pr/waveshare-amoled-216 wifi esp32s3-touch-amoled-216:wifi (warnings: 
0)
   * PASS pr/waveshare-amoled-216 cmake esp32s3-touch-amoled-216:nsh (warnings: 
0)
   * PASS pr/waveshare-amoled-216 cmake esp32s3-touch-amoled-216:i2c (warnings: 
0)
   
   Testing logs before change:
   
   ```
   n/a (new board)
   ```
   
   Testing logs after change:
   
   ```
   ### nsh
   nsh> uname -a
   NuttX 13.1.1-RC0 049cf8fa22 Nov 26 2026 12:51:21 xtensa 
esp32s3-touch-amoled-216
   nsh> free
         total       used       free    maxused    maxfree  nused  nfree name
        389632      22288     367344      22656     367232     61      3 Umem
   
   ### i2c (all six on-board devices)
   nsh> i2c dev 0x08 0x77
   NOTE: Some devices may not appear with this scan.
   You may also try a scan with the -z flag to discover more devices using a 
zero-byte write request.
        0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
   00:                         -- -- -- -- -- -- -- -- 
   10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- -- 
   20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
   30: -- -- -- -- 34 -- -- -- -- -- -- -- -- -- -- -- 
   40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
   50: -- 51 -- -- -- -- -- -- -- -- 5a -- -- -- -- -- 
   60: -- -- -- -- -- -- -- -- -- -- -- 6b -- -- -- -- 
   70: -- -- -- -- -- -- -- --                         
   nsh> 
   
   ### psram
   nsh> free
         total       used       free    maxused    maxfree  nused  nfree name
       8776460      22316    8754144      22696    8388592     63      4 Umem
   nsh> 
   
   ### qmi8658
   nsh> uorb_listener -n 2 sensor_accel0
   Monitor objects num:1
   object_name:sensor_accel, object_instance:0
   
sensor_accel(now:6650000):timestamp:6650000,x:0.008545,y:-0.070068,z:0.997803,temperature:35.332031
   
sensor_accel(now:7660000):timestamp:7660000,x:0.003418,y:-0.066772,z:0.989014,temperature:35.320312
   Object name:sensor_accel0, received:2
   Total number of received Message:2/2
   nsh> uorb_listener -n 2 sensor_gyro0
   Monitor objects num:1
   object_name:sensor_gyro, object_instance:0
   
sensor_gyro(now:8760000):timestamp:8760000,x:-1.531250,y:2.812500,z:0.125000,temperature:35.320312
   
sensor_gyro(now:9770000):timestamp:9770000,x:-0.625000,y:3.468750,z:0.937500,temperature:35.320312
   Object name:sensor_gyro0, received:2
   Total number of received Message:2/2
   nsh> 
   
   ### sdmmc
   nsh> mount -t vfat /dev/mmcsd0 /mnt
   nsh> echo hello-from-nuttx > /mnt/nxtest.txt
   nsh> cat /mnt/nxtest.txt
   hello-from-nuttx
   nsh> dd if=/dev/zero of=/mnt/big.bin bs=4096 count=256
   1048576 bytes (256 blocks) copied, 860000 usec, 1190 KB/s
   nsh> ls -l /mnt
   /mnt:
    -rwxrwxrwx          17 nxtest.txt
    -rwxrwxrwx     1048576 big.bin
   nsh> rm /mnt/nxtest.txt
   nsh> rm /mnt/big.bin
   nsh> ls -l /mnt
   /mnt:
   nsh> umount /mnt
   nsh> 
   
   ### wifi (network names and MAC addresses redacted)
   nsh> ifconfig
   wlan0        Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx at UP mtu 1500
        inet addr:10.0.0.2 DRaddr:10.0.0.1 Mask:255.255.255.0
   nsh> wapi scan wlan0
   bssid / frequency / signal level / encode / ssid
   xx:xx:xx:xx:xx:xx    2412    -89     0800    <ssid redacted>
   xx:xx:xx:xx:xx:xx    2412    -83     0800    <ssid redacted>
   xx:xx:xx:xx:xx:xx    2437    -81     0800    <ssid redacted>
   xx:xx:xx:xx:xx:xx    2462    -74     0800    <ssid redacted>
   xx:xx:xx:xx:xx:xx    2462    -71     0800    <ssid redacted>
   xx:xx:xx:xx:xx:xx    2462    -65     0800    <ssid redacted>
   nsh> 
   
   ### buttons (BOOT, IO18, PWR pressed once each; same board code, captured on 
the integration branch)
   
   nsh> buttons 6
   buttons_main: Starting the button_daemon
   buttons_main: button_daemon started
   button_daemon: Running
   nsh> button_daemon: Opening /dev/buttons
   button_daemon: Supported BUTTONs 0x07
   BOOT was pressed
   BOOT was released
   IO18 was pressed
   IO18 was released
   PWR was pressed
   PWR was released
   ```
   
   ## PR verification Self-Check
   
   * [x] This PR introduces only one functional change.
   * [x] I have updated all required description fields above.
   * [x] My PR adheres to Contributing Guidelines and Documentation (git commit 
title and message, coding standard, etc).
   * [ ] My PR is still work in progress (not ready for review).
   * [x] My PR is ready for review and can be safely merged into a codebase.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to