mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: BAREBOX <barebox@lists.infradead.org>
Subject: [PATCH 5/6] ARM: K3: Update yaml files for AM62L
Date: Thu, 14 Aug 2025 12:46:53 +0200	[thread overview]
Message-ID: <20250814-k3-am62l-updates-v1-5-9934277d8757@pengutronix.de> (raw)
In-Reply-To: <20250814-k3-am62l-updates-v1-0-9934277d8757@pengutronix.de>

The yaml files for configuring the boot images need to be different on
AM62x/AM62L. Without it for example the fuses can't be read. These yaml
files are now based on TI U-Boot 11.01.07

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-k3/Makefile             |   2 +-
 arch/arm/mach-k3/board-cfg-am62l.yaml |  32 +++
 arch/arm/mach-k3/schema-am62l.yaml    | 427 ++++++++++++++++++++++++++++++++++
 arch/arm/mach-k3/sec-cfg-am62l.yaml   | 131 +++++------
 4 files changed, 526 insertions(+), 66 deletions(-)

diff --git a/arch/arm/mach-k3/Makefile b/arch/arm/mach-k3/Makefile
index df77832887e992de934623d0a3384ab82454e2cc..c9edde63c143cabfe02167961f83528938d97112 100644
--- a/arch/arm/mach-k3/Makefile
+++ b/arch/arm/mach-k3/Makefile
@@ -22,7 +22,7 @@ $(obj)/combined-sysfw-cfg-am62x.k3cfg: $(srctree)/arch/arm/mach-k3/schema.yaml \
 				       FORCE
 	$(call if_changed,k3_cfg)
 
-$(obj)/combined-sysfw-cfg-am62l.k3cfg: $(srctree)/arch/arm/mach-k3/schema.yaml \
+$(obj)/combined-sysfw-cfg-am62l.k3cfg: $(srctree)/arch/arm/mach-k3/schema-am62l.yaml \
 				       $(obj)/board-cfg-am62x.yaml \
 				       $(obj)/sec-cfg-am62l.yaml \
 				       FORCE
diff --git a/arch/arm/mach-k3/board-cfg-am62l.yaml b/arch/arm/mach-k3/board-cfg-am62l.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..a0297c284a67539d4984ab0486011cc2a853bfc5
--- /dev/null
+++ b/arch/arm/mach-k3/board-cfg-am62l.yaml
@@ -0,0 +1,32 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2025 Texas Instruments Incorporated - https://www.ti.com/
+#
+# Board configuration for the emulated AM62Lx
+#
+---
+board-cfg:
+  rev:
+    boardcfg_abi_maj: 0x0
+    boardcfg_abi_min: 0x1
+
+  control:
+    subhdr:
+      magic: 0xC1D3
+      size: 7
+    main_isolation_enable: 0x5A
+    main_isolation_hostid: 0x2
+
+  bm_writer_cfg:
+    subhdr:
+      magic: 0x7D8A
+      size: 5
+    allowed_host: 10
+
+  reserved: [0, 0, 0, 0, 0, 0, 0]
+
+  debug_cfg:
+    subhdr:
+      magic: 0x020C
+      size: 8
+    trace_dst_enables: 0x00
+    trace_src_enables: 0x00
diff --git a/arch/arm/mach-k3/schema-am62l.yaml b/arch/arm/mach-k3/schema-am62l.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..6c7cc78f0179ddaf9e9ec0665214f49ce7bc6ce1
--- /dev/null
+++ b/arch/arm/mach-k3/schema-am62l.yaml
@@ -0,0 +1,427 @@
+# SPDX-License-Identifier: GPL-2.0-only OR MIT
+#
+# Copyright (C) 2025 Texas Instruments Incorporated - https://www.ti.com/
+#
+# Config schema for TI AM62L devices
+#
+
+---
+
+definitions:
+    u8:
+        type: integer
+        minimum: 0
+        maximum: 0xff
+    u16:
+        type: integer
+        minimum: 0
+        maximum: 0xffff
+    u32:
+        type: integer
+        minimum: 0
+        maximum: 0xffffffff
+
+
+
+type: object
+properties:
+    pm-cfg:
+        type: object
+        properties:
+            rev:
+                type: object
+                properties:
+                    boardcfg_abi_maj:
+                        $ref: "#/definitions/u8"
+                    boardcfg_abi_min:
+                        $ref: "#/definitions/u8"
+    board-cfg:
+        type: object
+        properties:
+            rev:
+                type: object
+                properties:
+                    boardcfg_abi_maj:
+                        $ref: "#/definitions/u8"
+                    boardcfg_abi_min:
+                        $ref: "#/definitions/u8"
+            control:
+                type: object
+                properties:
+                    subhdr:
+                        type: object
+                        properties:
+                            magic:
+                                $ref: "#/definitions/u16"
+                            size:
+                                $ref: "#/definitions/u16"
+                    main_isolation_enable:
+                        $ref: "#/definitions/u8"
+                    main_isolation_hostid:
+                        $ref: "#/definitions/u16"
+
+            bm_writer_cfg:
+                type: object
+                properties:
+                    subhdr:
+                        type: object
+                        properties:
+                            magic:
+                                $ref: "#/definitions/u16"
+                            size:
+                                $ref: "#/definitions/u16"
+                    allowed_host:
+                        $ref : "#/definitions/u8"
+
+            reserved:
+                type: array
+                minItems: 7
+                maxItems: 7
+                items:
+                    $ref: "#/definitions/u8"
+
+            debug_cfg:
+                type: object
+                properties:
+                    subhdr:
+                        type: object
+                        properties:
+                            magic:
+                                $ref: "#/definitions/u16"
+                            size:
+                                $ref: "#/definitions/u16"
+                    trace_dst_enables:
+                        $ref: "#/definitions/u16"
+                    trace_src_enables:
+                        $ref: "#/definitions/u16"
+
+    sec-cfg:
+        type: object
+        properties:
+            rev:
+                type: object
+                properties:
+                    boardcfg_abi_maj:
+                        $ref: "#/definitions/u8"
+                    boardcfg_abi_min:
+                        $ref: "#/definitions/u8"
+
+            processor_acl_list:
+                type: object
+                properties:
+                    subhdr:
+                        type: object
+                        properties:
+                            magic:
+                                $ref: "#/definitions/u16"
+                            size:
+                                $ref: "#/definitions/u16"
+                    proc_acl_entries:
+                        type: array
+                        minItems: 32
+                        maxItems: 32
+                        items:
+                            type: object
+                            properties:
+                                processor_id:
+                                    $ref: "#/definitions/u8"
+                                proc_access_master:
+                                    $ref: "#/definitions/u8"
+                                proc_access_secondary:
+                                    type: array
+                                    minItems: 3
+                                    maxItems: 3
+                                    items:
+                                        $ref: "#/definitions/u8"
+            host_hierarchy:
+                type: object
+                properties:
+                    subhdr:
+                        type: object
+                        properties:
+                            magic:
+                                $ref: "#/definitions/u16"
+                            size:
+                                $ref: "#/definitions/u16"
+                    host_hierarchy_entries:
+                        type: array
+                        minItems: 32
+                        maxItems: 32
+                        items:
+                            type: object
+                            properties:
+                                host_id:
+                                    $ref: "#/definitions/u8"
+                                supervisor_host_id:
+                                    $ref: "#/definitions/u8"
+
+            otp_config:
+                type: object
+                properties:
+                    subhdr:
+                        type: object
+                        properties:
+                            magic:
+                                $ref: "#/definitions/u16"
+                            size:
+                                $ref: "#/definitions/u16"
+                    otp_entry:
+                        type: array
+                        minItems: 32
+                        maxItems: 32
+                        items:
+                            type: object
+                            properties:
+                                host_id:
+                                    $ref: "#/definitions/u8"
+                                host_perms:
+                                    $ref: "#/definitions/u8"
+                    write_host_id:
+                        $ref: "#/definitions/u8"
+
+            dkek_config:
+                type: object
+                properties:
+                    subhdr:
+                        type: object
+                        properties:
+                            magic:
+                                $ref: "#/definitions/u16"
+                            size:
+                                $ref: "#/definitions/u16"
+                    allowed_hosts:
+                        type: array
+                        minItems: 4
+                        maxItems: 4
+                        items:
+                            $ref: "#/definitions/u8"
+                    allow_dkek_export_tisci:
+                        $ref: "#/definitions/u8"
+                    rsvd:
+                        type: array
+                        minItems: 3
+                        maxItems: 3
+                        items:
+                            $ref: "#/definitions/u8"
+
+            sa2ul_cfg:
+                type: object
+                properties:
+                    subhdr:
+                        type: object
+                        properties:
+                            magic:
+                                $ref: "#/definitions/u16"
+                            size:
+                                $ref: "#/definitions/u16"
+                    rsvd:
+                        type: array
+                        minItems: 2
+                        maxItems: 4
+                        items:
+                            $ref: "#/definitions/u8"
+                    enable_saul_psil_global_config_writes:
+                        $ref: "#/definitions/u8"
+                    auth_resource_owner:
+                        $ref: "#/definitions/u8"
+
+            sec_dbg_config:
+                type: object
+                properties:
+                    subhdr:
+                        type: object
+                        properties:
+                            magic:
+                                $ref: "#/definitions/u16"
+                            size:
+                                $ref: "#/definitions/u16"
+                    allow_jtag_unlock:
+                        $ref: "#/definitions/u8"
+                    allow_wildcard_unlock:
+                        $ref: "#/definitions/u8"
+                    allowed_debug_level_rsvd:
+                        $ref: "#/definitions/u8"
+                    rsvd:
+                        $ref: "#/definitions/u8"
+                    min_cert_rev:
+                        $ref: "#/definitions/u32"
+                    jtag_unlock_hosts:
+                        type: array
+                        minItems: 4
+                        maxItems: 4
+                        items:
+                            $ref: "#/definitions/u8"
+
+
+            sec_handover_cfg:
+                type: object
+                properties:
+                    subhdr:
+                        type: object
+                        properties:
+                            magic:
+                                $ref: "#/definitions/u16"
+                            size:
+                                $ref: "#/definitions/u16"
+                    handover_msg_sender:
+                        $ref: "#/definitions/u8"
+                    handover_to_host_id:
+                        $ref: "#/definitions/u8"
+                    rsvd:
+                        type: array
+                        minItems: 4
+                        maxItems: 4
+                        items:
+                            $ref: "#/definitions/u8"
+
+    rm-cfg:
+        type: object
+        properties:
+            rm_boardcfg:
+                type: object
+                properties:
+                    rev:
+                        type: object
+                        properties:
+                            boardcfg_abi_maj:
+                                $ref: "#/definitions/u8"
+                            boardcfg_abi_min:
+                                $ref: "#/definitions/u8"
+
+                    host_cfg:
+                        type: object
+                        properties:
+                            subhdr:
+                                type: object
+                                properties:
+                                    magic:
+                                        $ref: "#/definitions/u16"
+                                    size:
+                                        $ref: "#/definitions/u16"
+                            host_cfg_entries:
+                                type: array
+                                minItems: 0
+                                maxItems: 32
+                                items:
+                                    type: object
+                                    properties:
+                                        host_id:
+                                            $ref: "#/definitions/u8"
+                                        allowed_atype:
+                                            $ref: "#/definitions/u8"
+                                        allowed_qos:
+                                            $ref: "#/definitions/u16"
+                                        allowed_orderid:
+                                            $ref: "#/definitions/u32"
+                                        allowed_priority:
+                                            $ref: "#/definitions/u16"
+                                        allowed_sched_priority:
+                                            $ref: "#/definitions/u8"
+                    resasg:
+                        type: object
+                        properties:
+                            subhdr:
+                                type: object
+                                properties:
+                                    magic:
+                                        $ref: "#/definitions/u16"
+                                    size:
+                                        $ref: "#/definitions/u16"
+                            resasg_entries_size:
+                                        $ref: "#/definitions/u16"
+                            reserved:
+                                        $ref: "#/definitions/u16"
+
+            resasg_entries:
+                type: array
+                minItems: 0
+                maxItems: 468
+                items:
+                    type: object
+                    properties:
+                        start_resource:
+                            $ref: "#/definitions/u16"
+                        num_resource:
+                            $ref: "#/definitions/u16"
+                        type:
+                            $ref: "#/definitions/u16"
+                        host_id:
+                            $ref: "#/definitions/u8"
+                        reserved:
+                            $ref: "#/definitions/u8"
+
+    tifs-rm-cfg:
+        type: object
+        properties:
+            rm_boardcfg:
+                type: object
+                properties:
+                    rev:
+                        type: object
+                        properties:
+                            boardcfg_abi_maj:
+                                $ref: "#/definitions/u8"
+                            boardcfg_abi_min:
+                                $ref: "#/definitions/u8"
+
+                    host_cfg:
+                        type: object
+                        properties:
+                            subhdr:
+                                type: object
+                                properties:
+                                    magic:
+                                        $ref: "#/definitions/u16"
+                                    size:
+                                        $ref: "#/definitions/u16"
+                            host_cfg_entries:
+                                type: array
+                                minItems: 0
+                                maxItems: 32
+                                items:
+                                    type: object
+                                    properties:
+                                        host_id:
+                                            $ref: "#/definitions/u8"
+                                        allowed_atype:
+                                            $ref: "#/definitions/u8"
+                                        allowed_qos:
+                                            $ref: "#/definitions/u16"
+                                        allowed_orderid:
+                                            $ref: "#/definitions/u32"
+                                        allowed_priority:
+                                            $ref: "#/definitions/u16"
+                                        allowed_sched_priority:
+                                            $ref: "#/definitions/u8"
+                    resasg:
+                        type: object
+                        properties:
+                            subhdr:
+                                type: object
+                                properties:
+                                    magic:
+                                        $ref: "#/definitions/u16"
+                                    size:
+                                        $ref: "#/definitions/u16"
+                            resasg_entries_size:
+                                        $ref: "#/definitions/u16"
+                            reserved:
+                                        $ref: "#/definitions/u16"
+
+            resasg_entries:
+                type: array
+                minItems: 0
+                maxItems: 468
+                items:
+                    type: object
+                    properties:
+                        start_resource:
+                            $ref: "#/definitions/u16"
+                        num_resource:
+                            $ref: "#/definitions/u16"
+                        type:
+                            $ref: "#/definitions/u16"
+                        host_id:
+                            $ref: "#/definitions/u8"
+                        reserved:
+                            $ref: "#/definitions/u8"
diff --git a/arch/arm/mach-k3/sec-cfg-am62l.yaml b/arch/arm/mach-k3/sec-cfg-am62l.yaml
index bea6891eda249e236b2057cc1e6758de2c47016d..30511ed72b1f96c49adfbb3f672a9935bcb20c80 100644
--- a/arch/arm/mach-k3/sec-cfg-am62l.yaml
+++ b/arch/arm/mach-k3/sec-cfg-am62l.yaml
@@ -9,6 +9,7 @@ sec-cfg:
     rev:
         boardcfg_abi_maj: 0x0
         boardcfg_abi_min: 0x1
+
     processor_acl_list:
         subhdr:
             magic: 0xF1EA
@@ -250,102 +251,102 @@ sec-cfg:
             size: 69
         otp_entry:
             -  # 1
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 2
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 3
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 4
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 5
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 6
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 7
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 8
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 9
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 10
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 11
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 12
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 13
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 14
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 15
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 16
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 17
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 18
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 19
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 20
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 21
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 22
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 23
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 24
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 25
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 26
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 27
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 28
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 29
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 30
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 31
-                host_id: 0
-                host_perms: 0
+                host_id: 10
+                host_perms: 2
             -  # 32
-                host_id: 0
-                host_perms: 0
-        write_host_id: 0
+                host_id: 10
+                host_perms: 2
+        write_host_id: 10
     dkek_config:
         subhdr:
             magic: 0x5170

-- 
2.39.5




  parent reply	other threads:[~2025-08-14 13:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-14 10:46 [PATCH 0/6] ARM: k3: updates Sascha Hauer
2025-08-14 10:46 ` [PATCH 1/6] ARM: k3: AM62l3-EVM: add usb0 Sascha Hauer
2025-08-14 10:46 ` [PATCH 2/6] ARM: k3: quote PEM files Sascha Hauer
2025-08-14 10:46 ` [PATCH 3/6] ARM: k3: allow to pass custom signing keys Sascha Hauer
2025-08-14 10:46 ` [PATCH 4/6] k3img: handle PKCS#11 uris Sascha Hauer
2025-08-14 10:46 ` Sascha Hauer [this message]
2025-08-14 10:46 ` [PATCH 6/6] ARM: k3: use newer ti-linux-firmware Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250814-k3-am62l-updates-v1-5-9934277d8757@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox