From b7069dc37605333d43377b90876b0dcf45e762e1 Mon Sep 17 00:00:00 2001 From: dechao_gong Date: Thu, 8 Oct 2026 18:52:07 +0800 Subject: [PATCH] Documentation/rtl8730e: document the I2C master buses Add a Features bullet and an "i2c" configuration section to the RTL8730E EVB board page describing I2C0-2 as /dev/i2c0-2, the pads the board table registers and the i2ctool scan command, following the pke8721daf board format. Note the two pad constraints that are specific to this chip: a pad reaches exactly one I2C controller (unlike the GPIO and UART crossbars), and the pads inside the analogue audio ranges are driven by the codec and cannot carry I2C. Signed-off-by: dechao_gong Assisted-by: Claude --- .../rtl8730e/boards/rtl8730e_evb/index.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Documentation/platforms/arm/rtl8730e/boards/rtl8730e_evb/index.rst b/Documentation/platforms/arm/rtl8730e/boards/rtl8730e_evb/index.rst index 45a6bc3b2f7..12924514dbd 100644 --- a/Documentation/platforms/arm/rtl8730e/boards/rtl8730e_evb/index.rst +++ b/Documentation/platforms/arm/rtl8730e/boards/rtl8730e_evb/index.rst @@ -38,6 +38,8 @@ Supported in this NuttX port: * General-purpose UARTs exposed as ``/dev/ttySN`` serial devices, driven through the SDK fwlib ROM layer (the LOG-UART owns the console and ``/dev/ttyS0``) +* I2C master buses exposed as ``/dev/i2cN`` character devices, driven in + polling mode through the SDK fwlib register layer * littlefs persistent storage mounted at ``/data`` (a dedicated SPI NOR flash partition), backing the Wi-Fi key-value store * Wi-Fi station and SoftAP through the ``wapi`` tool @@ -98,6 +100,23 @@ The line format can be changed at runtime through ``tcsetattr()`` (the config enables ``CONFIG_SERIAL_TERMIOS``). UART3 is reserved for Bluetooth and is not exposed by the driver. +i2c +--- + +Minimal NSH with the I2C master driver and the ``i2ctool`` (``system/i2c``) +enabled (no Wi-Fi). The board registers its I2C controllers from a table (see +``boards/arm/rtl8730e/rtl8730e_evb/src/rtl8730e_i2c.c``): I2C0 at +``/dev/i2c0`` on PA10/PA9, I2C1 at ``/dev/i2c1`` on PA4/PA3 and I2C2 at +``/dev/i2c2`` on PB11/PB10 (SCL/SDA). Edit that table -- controller and +SCL/SDA pads -- to match a board's wiring; the pads use the same +``AMEBA_PA()`` / ``AMEBA_PB()`` encoding as the GPIO table and are muxed to +the I2C function through the SDK ROM. Unlike the GPIO and UART crossbars, a +pad reaches exactly one I2C controller, and pads the audio codec drives +cannot be used. The I2C bus is open-drain, so fit external pull-ups on +SCL/SDA. Probe a bus with the tool:: + + nsh> i2c dev -b 0 0x03 0x77 # scan /dev/i2c0 for devices + Wi-Fi =====