This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 1ab2e0ef7ecc44e29822b5ba6136b938485b8767
Author: Hoa Bui <[email protected]>
AuthorDate: Fri Nov 20 03:46:09 2026 +0000

    Documentation/arm/rzv2h: Document GPT PWM support
    
    Document the GPT PWM driver, its pin assignments and the pwm
    configuration for the Renesas RZV2H-EVK and RZV2H-RDK.
    
    Signed-off-by: Hoa Bui <[email protected]>
---
 .../platforms/arm/rzv2h/boards/rzv2h-evk/index.rst | 83 ++++++++++++++++++++++
 .../platforms/arm/rzv2h/boards/rzv2h-rdk/index.rst | 53 ++++++++++++++
 Documentation/platforms/arm/rzv2h/index.rst        | 13 ++++
 3 files changed, 149 insertions(+)

diff --git a/Documentation/platforms/arm/rzv2h/boards/rzv2h-evk/index.rst 
b/Documentation/platforms/arm/rzv2h/boards/rzv2h-evk/index.rst
index cb43c4fb16a..59053f7e2e4 100644
--- a/Documentation/platforms/arm/rzv2h/boards/rzv2h-evk/index.rst
+++ b/Documentation/platforms/arm/rzv2h/boards/rzv2h-evk/index.rst
@@ -602,6 +602,89 @@ RIIC I2C, with the SCI I2C bus number::
    nsh> i2c set -b 17 -a 0x50 -r 0x10 0x5a
    nsh> i2c reset -b 17
 
+PWM
+===
+
+The RZV2H-EVK exposes GPT-based PWM output on channels 0 through 15.
+
+Pin Assignments
+---------------
+
+Each GPT channel is routed to the following board pin.
+
+.. list-table::
+   :header-rows: 1
+
+   * - Channel
+     - Pin
+   * - GPT0
+     - ``P7_0``
+   * - GPT1
+     - ``P8_0``
+   * - GPT2
+     - ``P4_4``
+   * - GPT3
+     - ``P4_6``
+   * - GPT4
+     - ``P9_4``
+   * - GPT5
+     - ``P9_6``
+   * - GPT6
+     - ``P3_4``
+   * - GPT7
+     - ``P8_6``
+   * - GPT8
+     - ``P9_4``
+   * - GPT9
+     - ``P9_6``
+   * - GPT10
+     - ``PA_4``
+   * - GPT11
+     - ``P6_2``
+   * - GPT12
+     - ``P3_0``
+   * - GPT13
+     - ``P6_4``
+   * - GPT14
+     - ``P3_5``
+   * - GPT15
+     - ``P6_6``
+
+These definitions are in ``boards/arm/rzv2h/rzv2h-evk/include/board.h``.
+
+The relevant options for enabling GPT7 as an example are::
+
+   CONFIG_PWM=y
+   CONFIG_RZV2H_GPT_PWM=y
+   CONFIG_RZV2H_GPT7_PWM=y
+   CONFIG_RZV2H_GPT_PWM_DEFAULT_FREQUENCY=1000
+   CONFIG_EXAMPLES_PWM=y
+
+After boot, enabled PWM channels are registered as ``/dev/pwmN`` devices.
+Verify with::
+
+   nsh> ls /dev
+   /dev:
+    console
+    null
+    pwm7
+    ttyS0
+    zero
+
+The ``pwm`` board configuration (``rzv2h-evk:pwm``) enables GPT7
+(PWM output on P8_6, corresponding to CN1 Pmod pin 9) and the
+``pwm`` application for interactive testing. Other channels can be
+enabled by adding the corresponding ``CONFIG_RZV2H_GPTn_PWM`` options.
+
+Using the ``pwm`` Application
+-----------------------------
+
+Start a 1 Hz PWM signal at 50% duty cycle on channel 7::
+
+   nsh> pwm -p /dev/pwm7 -f 1 -d 50
+
+The ``-f`` option sets the frequency in Hz and ``-d`` sets the duty cycle.
+
 QSPI Flash
 ==========
 
diff --git a/Documentation/platforms/arm/rzv2h/boards/rzv2h-rdk/index.rst 
b/Documentation/platforms/arm/rzv2h/boards/rzv2h-rdk/index.rst
index ffca9c2725f..e40c67d3c40 100644
--- a/Documentation/platforms/arm/rzv2h/boards/rzv2h-rdk/index.rst
+++ b/Documentation/platforms/arm/rzv2h/boards/rzv2h-rdk/index.rst
@@ -359,6 +359,59 @@ Reset bus 17 to recover a slave that holds the bus 
(requires
 
    nsh> i2c reset -b 17
 
+PWM
+===
+
+The RZV2H-RDK exposes GPT-based PWM output on channels 0 through 15.
+
+PWM Pin Assignments
+-------------------
+
+Each GPT channel is routed to the following board pin.
+
+.. list-table::
+   :header-rows: 1
+
+   * - Channel
+     - Pin
+   * - GPT0
+     - ``P7_0``
+   * - GPT1
+     - ``P8_0``
+   * - GPT2
+     - ``P4_4``
+   * - GPT3
+     - ``P4_6``
+   * - GPT4
+     - ``P9_4``
+   * - GPT5
+     - ``P9_6``
+   * - GPT6
+     - ``PA_4``
+   * - GPT7
+     - ``P8_6``
+   * - GPT8
+     - ``P9_4``
+   * - GPT9
+     - ``P9_6``
+   * - GPT10
+     - ``PA_4``
+   * - GPT11
+     - ``P6_2``
+   * - GPT12
+     - ``P3_0``
+   * - GPT13
+     - ``P6_4``
+   * - GPT14
+     - ``P3_5``
+   * - GPT15
+     - ``P6_6``
+
+These definitions are in ``boards/arm/rzv2h/rzv2h-rdk/include/board.h``.
+
+The ``pwm`` board configuration (``rzv2h-rdk:pwm``) enables GPT6
+(PWM output on ``PA_4``) and the ``pwm`` application for interactive testing.
+
 QSPI Flash
 ==========
 
diff --git a/Documentation/platforms/arm/rzv2h/index.rst 
b/Documentation/platforms/arm/rzv2h/index.rst
index 0f85929e2b0..1f2cc8f7f2c 100644
--- a/Documentation/platforms/arm/rzv2h/index.rst
+++ b/Documentation/platforms/arm/rzv2h/index.rst
@@ -41,6 +41,7 @@ SCI         Yes      Interrupt-driven SCI-B asynchronous UART 
on channels 0-9
 GPIO        Yes      Basic operations (config/read/write), no interrupt support
 RIIC I2C    Yes      Interrupt-driven RIIC master on channels 0-8
 SCI I2C     Yes      Interrupt-driven SCI simple I2C master on channels 0-9
+PWM         Yes      GPT (General PWM Timer) PWM on channels 0-15
 QSPI        Yes      xSPI controller in QSPI mode, manual-command transfers 
only
 ==========  =======  
============================================================
 
@@ -171,6 +172,18 @@ and interrupt priority. Channel ``n`` is registered as
 I2C bus reset recovery (``CONFIG_I2C_RESET``) is supported, using the same
 method as RIIC I2C.
 
+PWM
+---
+
+The RZ/V2H use the pulsed output control
+implemented using the GPT (General PWM Timer). The driver supports PWM with
+configurable frequency and duty cycle on channels 0 through 15.
+
+``CONFIG_RZV2H_GPT_PWM`` enables the GPT PWM driver. Each channel is
+individually selectable via ``CONFIG_RZV2H_GPTn_PWM``.
+The output pin (GTIOCA or GTIOCB) for each channel is defined in the
+board's ``board.h`` (``BOARD_GPTn_GTIOC_GPIO`` and ``BOARD_GPTn_USE_GTIOCA``).
+
 QSPI
 ----
 

Reply via email to