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 c4685a347b0..0951e242e87 100644 --- a/Documentation/platforms/risc-v/esp32c3/boards/esp32c3-generic/index.rst +++ b/Documentation/platforms/risc-v/esp32c3/boards/esp32c3-generic/index.rst @@ -142,6 +142,43 @@ disables the NuttShell to get the best possible score. .. note:: As the NSH is disabled, the application will start as soon as the system is turned on. +efuse +----- + +This configuration demonstrates the use of the eFuse driver. It can be accessed +through the ``/dev/efuse`` device file. +Virtual eFuse mode can be used by enabling `CONFIG_ESPRESSIF_EFUSE_VIRTUAL` +option to prevent possible damages on chip. + +The following snippet demonstrates how to read MAC address: + +.. code-block:: C + + int fd; + int ret; + uint8_t mac[6]; + struct efuse_param_s param; + struct efuse_desc_s mac_addr = + { + .bit_offset = 1, + .bit_count = 48 + }; + + const efuse_desc_t* desc[] = + { + &mac_addr, + NULL + }; + param.field = desc; + param.size = 48; + param.data = mac; + + fd = open("/dev/efuse", O_RDONLY); + ret = ioctl(fd, EFUSEIOC_READ_FIELD, ¶m); + +To find offset and count variables for related eFuse, +please refer to Espressif's Technical Reference Manuals. + gpio ---- diff --git a/Documentation/platforms/risc-v/esp32c3/index.rst b/Documentation/platforms/risc-v/esp32c3/index.rst index 39873414813..f25d19a4bd6 100644 --- a/Documentation/platforms/risc-v/esp32c3/index.rst +++ b/Documentation/platforms/risc-v/esp32c3/index.rst @@ -291,7 +291,7 @@ Bluetooth No CAN/TWAI Yes CDC Console Yes Rev.3 DMA Yes -eFuse No +eFuse Yes Also virtual mode supported GPIO Yes I2C Yes LED_PWM 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 da2233c17b1..05afe6720bf 100644 --- a/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitc/index.rst +++ b/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitc/index.rst @@ -125,6 +125,43 @@ disables the NuttShell to get the best possible score. .. note:: As the NSH is disabled, the application will start as soon as the system is turned on. +efuse +----- + +This configuration demonstrates the use of the eFuse driver. It can be accessed +through the ``/dev/efuse`` device file. +Virtual eFuse mode can be used by enabling `CONFIG_ESPRESSIF_EFUSE_VIRTUAL` +option to prevent possible damages on chip. + +The following snippet demonstrates how to read MAC address: + +.. code-block:: C + + int fd; + int ret; + uint8_t mac[6]; + struct efuse_param_s param; + struct efuse_desc_s mac_addr = + { + .bit_offset = 1, + .bit_count = 48 + }; + + const efuse_desc_t* desc[] = + { + &mac_addr, + NULL + }; + param.field = desc; + param.size = 48; + param.data = mac; + + fd = open("/dev/efuse", O_RDONLY); + ret = ioctl(fd, EFUSEIOC_READ_FIELD, ¶m); + +To find offset and count variables for related eFuse, +please refer to Espressif's Technical Reference Manuals. + gpio ---- 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 700991a75b3..e8a5f19c002 100644 --- a/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitm/index.rst +++ b/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitm/index.rst @@ -109,6 +109,43 @@ disables the NuttShell to get the best possible score. .. note:: As the NSH is disabled, the application will start as soon as the system is turned on. +efuse +----- + +This configuration demonstrates the use of the eFuse driver. It can be accessed +through the ``/dev/efuse`` device file. +Virtual eFuse mode can be used by enabling `CONFIG_ESPRESSIF_EFUSE_VIRTUAL` +option to prevent possible damages on chip. + +The following snippet demonstrates how to read MAC address: + +.. code-block:: C + + int fd; + int ret; + uint8_t mac[6]; + struct efuse_param_s param; + struct efuse_desc_s mac_addr = + { + .bit_offset = 1, + .bit_count = 48 + }; + + const efuse_desc_t* desc[] = + { + &mac_addr, + NULL + }; + param.field = desc; + param.size = 48; + param.data = mac; + + fd = open("/dev/efuse", O_RDONLY); + ret = ioctl(fd, EFUSEIOC_READ_FIELD, ¶m); + +To find offset and count variables for related eFuse, +please refer to Espressif's Technical Reference Manuals. + gpio ---- diff --git a/Documentation/platforms/risc-v/esp32c6/index.rst b/Documentation/platforms/risc-v/esp32c6/index.rst index b418eb0f18b..197be4219d6 100644 --- a/Documentation/platforms/risc-v/esp32c6/index.rst +++ b/Documentation/platforms/risc-v/esp32c6/index.rst @@ -278,7 +278,7 @@ Bluetooth No CAN/TWAI Yes DMA Yes ECC No -eFuse No +eFuse Yes GPIO Yes HMAC No I2C 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 604b87e81a2..5909c36f548 100644 --- a/Documentation/platforms/risc-v/esp32h2/boards/esp32h2-devkit/index.rst +++ b/Documentation/platforms/risc-v/esp32h2/boards/esp32h2-devkit/index.rst @@ -108,6 +108,43 @@ disables the NuttShell to get the best possible score. .. note:: As the NSH is disabled, the application will start as soon as the system is turned on. +efuse +----- + +This configuration demonstrates the use of the eFuse driver. It can be accessed +through the ``/dev/efuse`` device file. +Virtual eFuse mode can be used by enabling `CONFIG_ESPRESSIF_EFUSE_VIRTUAL` +option to prevent possible damages on chip. + +The following snippet demonstrates how to read MAC address: + +.. code-block:: C + + int fd; + int ret; + uint8_t mac[6]; + struct efuse_param_s param; + struct efuse_desc_s mac_addr = + { + .bit_offset = 1, + .bit_count = 48 + }; + + const efuse_desc_t* desc[] = + { + &mac_addr, + NULL + }; + param.field = desc; + param.size = 48; + param.data = mac; + + fd = open("/dev/efuse", O_RDONLY); + ret = ioctl(fd, EFUSEIOC_READ_FIELD, ¶m); + +To find offset and count variables for related eFuse, +please refer to Espressif's Technical Reference Manuals. + gpio ---- diff --git a/Documentation/platforms/risc-v/esp32h2/index.rst b/Documentation/platforms/risc-v/esp32h2/index.rst index 137b38e679f..bf261e55380 100644 --- a/Documentation/platforms/risc-v/esp32h2/index.rst +++ b/Documentation/platforms/risc-v/esp32h2/index.rst @@ -278,7 +278,7 @@ Bluetooth No CAN/TWAI Yes DMA Yes ECC No -eFuse No +eFuse Yes GPIO Yes HMAC No I2C Yes