diff --git a/Documentation/platforms/risc-v/esp32c3/boards/esp32c3-generic/index.rst b/Documentation/platforms/risc-v/esp32c3/boards/esp32c3-generic/index.rst index 24a40e5e408..d5fa696ac53 100644 --- a/Documentation/platforms/risc-v/esp32c3/boards/esp32c3-generic/index.rst +++ b/Documentation/platforms/risc-v/esp32c3/boards/esp32c3-generic/index.rst @@ -221,6 +221,41 @@ We can use the interrupt pin to send a signal when the interrupt fires:: The pin is configured as a rising edge interrupt, so after issuing the above command, connect it to 3.3V. +To use dedicated gpio for controlling multiple gpio pin at the same time +or having better response time, you need to enable +`CONFIG_ESPRESSIF_DEDICATED_GPIO` option. Dedicated GPIO is suitable +for faster response times required applications like simulate serial/parallel +interfaces in a bit-banging way. +After this option enabled GPIO4 and GPIO5 pins are ready to used as dedicated GPIO pins +as input/output mode. These pins are for example, you can use any pin up to 8 pins for +input and 8 pins for output for dedicated gpio. +To write and read data from dedicated gpio, you need to use +`write` and `read` calls. + +The following snippet demonstrates how to read/write to dedicated GPIO pins: + +.. code-block:: C + + int fd; = open("/dev/dedic_gpio0", O_RDWR); + int rd_val = 0; + int wr_mask = 0xffff; + int wr_val = 3; + + while(1) + { + write(fd, &wr_val, wr_mask); + if (wr_val == 0) + { + wr_val = 3; + } + else + { + wr_val = 0; + } + read(fd, &rd_val, sizeof(uint32_t)); + printf("rd_val: %d", rd_val); + } + i2c --- diff --git a/Documentation/platforms/risc-v/esp32c3/index.rst b/Documentation/platforms/risc-v/esp32c3/index.rst index 8158b2bfd23..054e78ae94a 100644 --- a/Documentation/platforms/risc-v/esp32c3/index.rst +++ b/Documentation/platforms/risc-v/esp32c3/index.rst @@ -356,7 +356,7 @@ CAN/TWAI Yes DMA No DS No eFuse Yes Also virtual mode supported -GPIO Yes +GPIO Yes Dedicated GPIO supported HMAC No I2C Yes Master and Slave mode supported I2S Yes diff --git a/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitc/index.rst b/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitc/index.rst index 1af2c0cd644..98479fa4fe1 100644 --- a/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitc/index.rst +++ b/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitc/index.rst @@ -204,6 +204,41 @@ We can use the interrupt pin to send a signal when the interrupt fires:: The pin is configured as a rising edge interrupt, so after issuing the above command, connect it to 3.3V. +To use dedicated gpio for controlling multiple gpio pin at the same time +or having better response time, you need to enable +`CONFIG_ESPRESSIF_DEDICATED_GPIO` option. Dedicated GPIO is suitable +for faster response times required applications like simulate serial/parallel +interfaces in a bit-banging way. +After this option enabled GPIO4 and GPIO5 pins are ready to used as dedicated GPIO pins +as input/output mode. These pins are for example, you can use any pin up to 8 pins for +input and 8 pins for output for dedicated gpio. +To write and read data from dedicated gpio, you need to use +`write` and `read` calls. + +The following snippet demonstrates how to read/write to dedicated GPIO pins: + +.. code-block:: C + + int fd; = open("/dev/dedic_gpio0", O_RDWR); + int rd_val = 0; + int wr_mask = 0xffff; + int wr_val = 3; + + while(1) + { + write(fd, &wr_val, wr_mask); + if (wr_val == 0) + { + wr_val = 3; + } + else + { + wr_val = 0; + } + read(fd, &rd_val, sizeof(uint32_t)); + printf("rd_val: %d", rd_val); + } + i2c --- diff --git a/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitm/index.rst b/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitm/index.rst index fd81264a27f..8773d3917ec 100644 --- a/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitm/index.rst +++ b/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitm/index.rst @@ -167,6 +167,41 @@ We can use the interrupt pin to send a signal when the interrupt fires:: The pin is configured as a rising edge interrupt, so after issuing the above command, connect it to 3.3V. +To use dedicated gpio for controlling multiple gpio pin at the same time +or having better response time, you need to enable +`CONFIG_ESPRESSIF_DEDICATED_GPIO` option. Dedicated GPIO is suitable +for faster response times required applications like simulate serial/parallel +interfaces in a bit-banging way. +After this option enabled GPIO4 and GPIO5 pins are ready to used as dedicated GPIO pins +as input/output mode. These pins are for example, you can use any pin up to 8 pins for +input and 8 pins for output for dedicated gpio. +To write and read data from dedicated gpio, you need to use +`write` and `read` calls. + +The following snippet demonstrates how to read/write to dedicated GPIO pins: + +.. code-block:: C + + int fd; = open("/dev/dedic_gpio0", O_RDWR); + int rd_val = 0; + int wr_mask = 0xffff; + int wr_val = 3; + + while(1) + { + write(fd, &wr_val, wr_mask); + if (wr_val == 0) + { + wr_val = 3; + } + else + { + wr_val = 0; + } + read(fd, &rd_val, sizeof(uint32_t)); + printf("rd_val: %d", rd_val); + } + i2c --- diff --git a/Documentation/platforms/risc-v/esp32c6/index.rst b/Documentation/platforms/risc-v/esp32c6/index.rst index c72fc77994e..44e1ed438b0 100644 --- a/Documentation/platforms/risc-v/esp32c6/index.rst +++ b/Documentation/platforms/risc-v/esp32c6/index.rst @@ -344,7 +344,7 @@ CAN/TWAI Yes DMA Yes ECC No eFuse Yes -GPIO Yes +GPIO Yes Dedicated GPIO supported HMAC No I2C Yes Master and Slave mode supported I2S Yes diff --git a/Documentation/platforms/risc-v/esp32h2/boards/esp32h2-devkit/index.rst b/Documentation/platforms/risc-v/esp32h2/boards/esp32h2-devkit/index.rst index 5f9aaae5e2e..12910ad40bf 100644 --- a/Documentation/platforms/risc-v/esp32h2/boards/esp32h2-devkit/index.rst +++ b/Documentation/platforms/risc-v/esp32h2/boards/esp32h2-devkit/index.rst @@ -187,6 +187,41 @@ We can use the interrupt pin to send a signal when the interrupt fires:: The pin is configured as a rising edge interrupt, so after issuing the above command, connect it to 3.3V. +To use dedicated gpio for controlling multiple gpio pin at the same time +or having better response time, you need to enable +`CONFIG_ESPRESSIF_DEDICATED_GPIO` option. Dedicated GPIO is suitable +for faster response times required applications like simulate serial/parallel +interfaces in a bit-banging way. +After this option enabled GPIO4 and GPIO5 pins are ready to used as dedicated GPIO pins +as input/output mode. These pins are for example, you can use any pin up to 8 pins for +input and 8 pins for output for dedicated gpio. +To write and read data from dedicated gpio, you need to use +`write` and `read` calls. + +The following snippet demonstrates how to read/write to dedicated GPIO pins: + +.. code-block:: C + + int fd; = open("/dev/dedic_gpio0", O_RDWR); + int rd_val = 0; + int wr_mask = 0xffff; + int wr_val = 3; + + while(1) + { + write(fd, &wr_val, wr_mask); + if (wr_val == 0) + { + wr_val = 3; + } + else + { + wr_val = 0; + } + read(fd, &rd_val, sizeof(uint32_t)); + printf("rd_val: %d", rd_val); + } + i2c --- diff --git a/Documentation/platforms/risc-v/esp32h2/index.rst b/Documentation/platforms/risc-v/esp32h2/index.rst index 2e0fba33537..e44a0f7b28f 100644 --- a/Documentation/platforms/risc-v/esp32h2/index.rst +++ b/Documentation/platforms/risc-v/esp32h2/index.rst @@ -346,7 +346,7 @@ DMA Yes DS No ECC No eFuse Yes -GPIO Yes +GPIO Yes Dedicated GPIO supported HMAC No I2C Yes Master and Slave mode supported I2S Yes