This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 0be19937ba1ca2cdd85d999f3fd3530080c1c810 Author: dechao_gong <[email protected]> AuthorDate: Wed Aug 12 15:19:22 2026 +0800 Documentation/rtl8721dx,rtl8721f: document the I2C driver The I2C master driver support for the RTL8721Dx (pke8721daf) and RTL8721F (rtl8721f_evb) boards was merged without the matching board documentation. Add the missing I2C entry to each board's Features list and an "i2c" configuration section describing the /dev/i2cN devices, the board pin table, and the i2ctool usage, mirroring the existing gpio/uart sections. Signed-off-by: dechao_gong <[email protected]> Assisted-by: Claude <[email protected]> --- .../platforms/arm/rtl8721dx/boards/pke8721daf/index.rst | 16 ++++++++++++++++ .../platforms/arm/rtl8721f/boards/rtl8721f_evb/index.rst | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/Documentation/platforms/arm/rtl8721dx/boards/pke8721daf/index.rst b/Documentation/platforms/arm/rtl8721dx/boards/pke8721daf/index.rst index 42a13955a48..1bbd3cf5c3d 100644 --- a/Documentation/platforms/arm/rtl8721dx/boards/pke8721daf/index.rst +++ b/Documentation/platforms/arm/rtl8721dx/boards/pke8721daf/index.rst @@ -37,6 +37,8 @@ Supported in this NuttX port: interrupt), driven directly on the SDK fwlib register layer * General-purpose UARTs exposed as ``/dev/ttySN`` serial devices, driven directly on the SDK fwlib register layer +* I2C master buses exposed as ``/dev/i2cN`` character devices, driven directly + on the SDK fwlib register layer Buttons and LEDs ================ @@ -100,6 +102,20 @@ The line format can be changed at runtime through ``tcsetattr()`` (the config enables ``CONFIG_SERIAL_TERMIOS``). UART2 is shared with 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/rtl8721dx/pke8721daf/src/rtl8721dx_i2c.c``): I2C0 at ``/dev/i2c0`` +on PB20/PB21 and I2C1 at ``/dev/i2c1`` on PB18/PB19. 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. 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 ===== diff --git a/Documentation/platforms/arm/rtl8721f/boards/rtl8721f_evb/index.rst b/Documentation/platforms/arm/rtl8721f/boards/rtl8721f_evb/index.rst index b00cb6c40e7..5c8703388c5 100644 --- a/Documentation/platforms/arm/rtl8721f/boards/rtl8721f_evb/index.rst +++ b/Documentation/platforms/arm/rtl8721f/boards/rtl8721f_evb/index.rst @@ -36,6 +36,8 @@ Supported in this NuttX port: interrupt), driven directly on the SDK fwlib register layer * General-purpose UARTs exposed as ``/dev/ttySN`` serial devices, driven directly on the SDK fwlib register layer +* I2C master buses exposed as ``/dev/i2cN`` character devices, driven directly + on the SDK fwlib register layer Buttons and LEDs ================ @@ -91,6 +93,20 @@ The line format can be changed at runtime through ``tcsetattr()`` (the config enables ``CONFIG_SERIAL_TERMIOS``). UART3 is shared with 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/rtl8721f/rtl8721f_evb/src/rtl8721f_i2c.c``): I2C0 at ``/dev/i2c0`` +on PA22/PA23 and I2C1 at ``/dev/i2c1`` on PA24/PA25. 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. 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 + nsh ---
