[PATCH v5 10/10] docs/system/arm/aspeed: Document OTP memory options

Kane Chen via posted 10 patches 3 months ago
Maintainers: "Cédric Le Goater" <clg@kaod.org>, Peter Maydell <peter.maydell@linaro.org>, Steven Lee <steven_lee@aspeedtech.com>, Troy Lee <leetroy@gmail.com>, Jamin Lin <jamin_lin@aspeedtech.com>, Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>
[PATCH v5 10/10] docs/system/arm/aspeed: Document OTP memory options
Posted by Kane Chen via 3 months ago
From: Kane-Chen-AS <kane_chen@aspeedtech.com>

Add documentation for the OTP memory module used by AST2600 and AST1030
SoCs, and describe options for using a pre-generated image or an
internal buffer. Include example commands for configuration and image
generation.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
---
 docs/system/arm/aspeed.rst | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/docs/system/arm/aspeed.rst b/docs/system/arm/aspeed.rst
index bf18c56347..6317c0e910 100644
--- a/docs/system/arm/aspeed.rst
+++ b/docs/system/arm/aspeed.rst
@@ -243,6 +243,37 @@ under Linux), use :
 
   -M ast2500-evb,bmc-console=uart3
 
+OTP Option
+^^^^^^^^^^
+
+Both the AST2600 and AST1030 chips use the same One Time Programmable
+(OTP) memory module, which is utilized for configuration, key storage,
+and storing user-programmable data. This OTP memory module is managed
+by the Secure Boot Controller (SBC). The following options can be
+specified or omitted based on your needs.
+
+  * When the options are specified, the pre-generated configuration
+    file will be used as the OTP memory storage.
+
+  * When the options are omitted, an internal memory buffer will be
+    used to store the OTP memory data.
+
+.. code-block:: bash
+
+  -blockdev driver=file,filename=otpmem.img,node-name=otp \
+  -global aspeed-otp.drive=otp \
+
+The following bash command can be used to generate a default
+configuration file for OTP memory:
+
+.. code-block:: bash
+
+  if [ ! -f otpmem.img ]; then
+    for i in $(seq 1 2048); do
+      printf '\x00\x00\x00\x00\xff\xff\xff\xff'
+    done > otpmem.img
+  fi
+
 Aspeed 2700 family boards (``ast2700-evb``)
 ==================================================================
 
-- 
2.43.0
Re: [SPAM] [PATCH v5 10/10] docs/system/arm/aspeed: Document OTP memory options
Posted by Cédric Le Goater 2 months, 1 week ago
On 8/12/25 11:40, Kane Chen wrote:
> From: Kane-Chen-AS <kane_chen@aspeedtech.com>
> 
> Add documentation for the OTP memory module used by AST2600 and AST1030
> SoCs, and describe options for using a pre-generated image or an
> internal buffer. Include example commands for configuration and image
> generation.
> 
> Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
> ---
>   docs/system/arm/aspeed.rst | 31 +++++++++++++++++++++++++++++++
>   1 file changed, 31 insertions(+)
> 
> diff --git a/docs/system/arm/aspeed.rst b/docs/system/arm/aspeed.rst
> index bf18c56347..6317c0e910 100644
> --- a/docs/system/arm/aspeed.rst
> +++ b/docs/system/arm/aspeed.rst
> @@ -243,6 +243,37 @@ under Linux), use :
>   
>     -M ast2500-evb,bmc-console=uart3
>   
> +OTP Option
> +^^^^^^^^^^
> +
> +Both the AST2600 and AST1030 chips use the same One Time Programmable
> +(OTP) memory module, which is utilized for configuration, key storage,
> +and storing user-programmable data. This OTP memory module is managed
> +by the Secure Boot Controller (SBC). The following options can be
> +specified or omitted based on your needs.
> +
> +  * When the options are specified, the pre-generated configuration
> +    file will be used as the OTP memory storage.
> +
> +  * When the options are omitted, an internal memory buffer will be
> +    used to store the OTP memory data.
> +
> +.. code-block:: bash
> +
> +  -blockdev driver=file,filename=otpmem.img,node-name=otp \
> +  -global aspeed-otp.drive=otp \
> +
> +The following bash command can be used to generate a default
> +configuration file for OTP memory:
> +
> +.. code-block:: bash
> +
> +  if [ ! -f otpmem.img ]; then
> +    for i in $(seq 1 2048); do
> +      printf '\x00\x00\x00\x00\xff\xff\xff\xff'
> +    done > otpmem.img
> +  fi
> +
>   Aspeed 2700 family boards (``ast2700-evb``)
>   ==================================================================
>   


Reviewed-by: Cédric Le Goater <clg@redhat.com>

Thanks,

C.