Skip to contentSkip to conversation

pinctrl: aspeed: Add AST2700 SoC0 support

PATCH Superseded Billy Tsai 3 participants 8 messages Mar 31 – Apr 10

Subsystems (8)

v5 of 9 Superseded Latest is v9 →

lore
Share & tools
lore

Billy Tsai

author reviewer
#0 lore raw

v5 cover pinctrl: aspeed: Add AST2700 SoC0 support

AST2700 is composed of two interconnected SoC instances, each providing its own pin control hardware. This series introduces bindings describing the AST2700 pinctrl architecture and adds pinctrl driver support for the SoC0 instance.

The bindings document the AST2700 dual-SoC design and follow common pinctrl conventions, while the SoC0 driver implementation builds upon the existing ASPEED pinctrl infrastructure.

---
Changes in v5:
- Complete the AST2700 SCU0 binding and disallow child nodes that are
not relevant for the hardware (p2a-control and smp-memram).
- Add examples for both the AST2700 SCU0 binding and the pinctrl binding,
ensuring they are valid against the schema.
- Rework the pinctrl binding example to be self-contained and independent
of the SCU binding.
- Reorder the binding patches so the pinctrl binding is introduced before
the SCU binding update, allowing the SCU example to be added cleanly.
- Adjust the binding accordingly to restrict drive-strength to the
supported values.
- Update the drive-strength table to match hardware-defined values.
- Link to v4: https://lore.kernel.org/r/[email protected]

Changes in v4:
- Rename series title to "pinctrl: aspeed: Add AST2700 SoC0 support"
to make it specific to SoC0.
- Remove unnecessary SCU example from bindings.
- Fix Makefile newline to avoid patch warning.
- Make pinctrl data structures const and align with existing Aspeed drivers.
- Sort the arrays and enums alphabetically.
- Minor cleanups for consistency, no functional changes.
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
dt-bindings: pinctrl: aspeed: AST2700 pinctrl improvements
- Improved binding descriptions for SoC0 and SoC1 to better explain the AST2700 dual-SoC architecture with independent pin control blocks
- Switched from additionalProperties to patternProperties using the '-state$' suffix to restrict child node naming
- Removed per-binding examples based on review feedback
- Added additionalProperties: false at the top level for stricter schema validation
- Dropped the aspeed,ast2700-soc1-pinctrl binding, as the SoC1 pinctrl registers follow a regular layout and can be described using an existing generic pinctrl binding
- Updated the function and group enum lists to match the definitions used by the AST2700 pinctrl driver

dt-bindings: mfd: aspeed: Add AST2700 SCU example with pinctrl
- Added a complete AST2700 SCU0 example demonstrating pinctrl integration
- Example covers both pin function/group configuration and pin drive-strength settings
- Updated child node naming to use the '-state' suffix, following common pinctrl conventions

pinctrl: aspeed: AST2700 SoC0 driver improvements
- Refactored pin and signal declarations to use common ASPEED pinmux macros (SIG_EXPR_LIST_DECL_SEMG, SIG_EXPR_LIST_DECL_SESG, PIN_DECL_*)
- Added SCU010 register definition for hardware strap control
- Reworked code structure to better align with existing ASPEED pinctrl drivers

- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Update pinctrl aspeed binding files.
- Update the commit message for pinctrl binding patch.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Billy Tsai (3):
dt-bindings: pinctrl: Add aspeed,ast2700-soc0-pinctrl
dt-bindings: mfd: aspeed,ast2x00-scu: Describe AST2700 SCU0
pinctrl: aspeed: Add AST2700 SoC0 support

 .../bindings/mfd/aspeed,ast2x00-scu.yaml           | 117 ++++
 .../pinctrl/aspeed,ast2700-soc0-pinctrl.yaml       | 161 +++++
 drivers/pinctrl/aspeed/Kconfig                     |   9 +
 drivers/pinctrl/aspeed/Makefile                    |   1 +
 drivers/pinctrl/aspeed/pinctrl-aspeed-g7-soc0.c    | 710 +++++++++++++++++++++
 5 files changed, 998 insertions(+)

---
base-commit: af4e9ef3d78420feb8fe58cd9a1ab80c501b3c08
change-id: 20251215-upstream_pinctrl-8f195df0a975

Best regards,

Signature · 1 line
Billy Tsai <[email protected]>
author reviewer
#1 lore raw

PATCH v5 1/3 dt-bindings: pinctrl: Add aspeed,ast2700-soc0-pinctrl

Add a device tree binding for the pin controller found in the ASPEED AST2700 SoC0.

The controller manages various peripheral functions such as eMMC, USB, VGA DDC, JTAG, and PCIe root complex signals.

Describe the AST2700 SoC0 pin controller using standard pin multiplexing and configuration properties.

---
 .../pinctrl/aspeed,ast2700-soc0-pinctrl.yaml       | 161 +++++++++++++++++++++
 1 file changed, 161 insertions(+)
Documentation/devicetree/bindings/pinctrl/aspeed,ast2700-soc0-pinctrl.yaml new file +161 -0
new file mode 100644
index 000000000000..e43a658fe02b
@@ -0,0 +1,161 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/aspeed,ast2700-soc0-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ASPEED AST2700 SoC0 Pin Controller
+
+maintainers:
+  - Billy Tsai <[email protected]>
+
+description:
+  The AST2700 features a dual-SoC architecture with two interconnected SoCs,
+  each having its own System Control Unit (SCU) for independent pin control.
+  This pin controller manages the pin multiplexing for SoC0.
+
+  The SoC0 pin controller manages pin functions including eMMC, VGA DDC,
+  dual USB3/USB2 ports (A and B), JTAG, and PCIe root complex interfaces.
+
+properties:
+  compatible:
+    const: aspeed,ast2700-soc0-pinctrl
+  reg:
+    maxItems: 1
+
+patternProperties:
+  '-state$':
+    type: object
+    allOf:
+      - $ref: pinmux-node.yaml#
+      - $ref: pincfg-node.yaml#
+    additionalProperties: false
+
+    properties:
+      function:
+        enum:
+          - EMMC
+          - JTAGDDR
+          - JTAGM0
+          - JTAGPCIEA
+          - JTAGPCIEB
+          - JTAGPSP
+          - JTAGSSP
+          - JTAGTSP
+          - JTAGUSB3A
+          - JTAGUSB3B
+          - PCIERC0PERST
+          - PCIERC1PERST
+          - TSPRSTN
+          - UFSCLKI
+          - USB2AD0
+          - USB2AD1
+          - USB2AH
+          - USB2AHP
+          - USB2AHPD0
+          - USB2AXH
+          - USB2AXH2B
+          - USB2AXHD1
+          - USB2AXHP
+          - USB2AXHP2B
+          - USB2AXHPD1
+          - USB2BD0
+          - USB2BD1
+          - USB2BH
+          - USB2BHP
+          - USB2BHPD0
+          - USB2BXH
+          - USB2BXH2A
+          - USB2BXHD1
+          - USB2BXHP
+          - USB2BXHP2A
+          - USB2BXHPD1
+          - USB3AXH
+          - USB3AXH2B
+          - USB3AXHD
+          - USB3AXHP
+          - USB3AXHP2B
+          - USB3AXHPD
+          - USB3BXH
+          - USB3BXH2A
+          - USB3BXHD
+          - USB3BXHP
+          - USB3BXHP2A
+          - USB3BXHPD
+          - VB
+          - VGADDC
+
+      groups:
+        enum:
+          - EMMCCDN
+          - EMMCG1
+          - EMMCG4
+          - EMMCG8
+          - EMMCWPN
+          - JTAG0
+          - PCIERC0PERST
+          - PCIERC1PERST
+          - TSPRSTN
+          - UFSCLKI
+          - USB2A
+          - USB2AAP
+          - USB2ABP
+          - USB2ADAP
+          - USB2AH
+          - USB2AHAP
+          - USB2B
+          - USB2BAP
+          - USB2BBP
+          - USB2BDBP
+          - USB2BH
+          - USB2BHBP
+          - USB3A
+          - USB3AAP
+          - USB3ABP
+          - USB3B
+          - USB3BAP
+          - USB3BBP
+          - VB0
+          - VB1
+          - VGADDC
+      pins:
+        enum:
+          - AB13
+          - AB14
+          - AC13
+          - AC14
+          - AD13
+          - AD14
+          - AE13
+          - AE14
+          - AE15
+          - AF13
+          - AF14
+          - AF15
+
+      drive-strength:
+        enum: [3, 6, 8, 11, 16, 18, 20, 23, 30, 32, 33, 35, 37, 38, 39, 41]
+
+      bias-disable: true
+      bias-pull-up: true
+      bias-pull-down: true
+
+required:
+  - compatible
+  - reg
+
+allOf:
+  - $ref: pinctrl.yaml#
+
+additionalProperties: false
+
+examples:
+  - |
+    pinctrl@400 {
+        compatible = "aspeed,ast2700-soc0-pinctrl";
+        reg = <0x400 0x318>;
+        emmc-state {
+            function = "EMMC";
+            groups = "EMMCG1";
+        };
+    };
Signature · 1 line
2.34.1
author reviewer
#2 lore raw

PATCH v5 2/3 dt-bindings: mfd: aspeed,ast2x00-scu: Describe AST2700 SCU0

In reply to Billy Tsai

AST2700 consists of two interconnected SoC instances, each with its own System Control Unit (SCU). The SCU0 provides pin control, interrupt controllers, clocks, resets, and address-space mappings for the Secondary and Tertiary Service Processors (SSP and TSP).

Describe the SSP/TSP address mappings using the standard memory-region and memory-region-names properties.

Disallow legacy child nodes that are not present on AST2700, including p2a-control and smp-memram. The latter is unnecessary as software can access the scratch registers via the SCU syscon.

Also allow the AST2700 SoC0 pin controller to be described as a child node of the SCU0, and add an example illustrating the SCU0 layout, including reserved-memory, interrupt controllers, and pinctrl.

---
 .../bindings/mfd/aspeed,ast2x00-scu.yaml           | 117 +++++++++++++++++++++
 1 file changed, 117 insertions(+)
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +117 -0
index a87f31fce019..86d51389689c 100644
@@ -46,6 +46,9 @@ properties:
   '#reset-cells':
     const: 1
 
+  memory-region: true
+  memory-region-names: true
+
 patternProperties:
   '^p2a-control@[0-9a-f]+$':
     description: >
@@ -87,6 +90,7 @@ patternProperties:
             - aspeed,ast2400-pinctrl
             - aspeed,ast2500-pinctrl
             - aspeed,ast2600-pinctrl
+            - aspeed,ast2700-soc0-pinctrl
 
     required:
       - compatible
@@ -156,6 +160,42 @@ required:
   - '#clock-cells'
   - '#reset-cells'
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            anyOf:
+              - const: aspeed,ast2700-scu0
+              - const: aspeed,ast2700-scu1
+    then:
+      patternProperties:
+        '^p2a-control@[0-9a-f]+$': false
+        '^smp-memram@[0-9a-f]+$': false
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: aspeed,ast2700-scu0
+    then:
+      properties:
+        memory-region:
+          items:
+            - description: Region mapped through the first SSP address window.
+            - description: Region mapped through the second SSP address window.
+            - description: Region mapped through the TSP address window.
+
+        memory-region-names:
+          items:
+            - const: ssp-0
+            - const: ssp-1
+            - const: tsp
+    else:
+      properties:
+        memory-region: false
+        memory-region-names: false
+
 additionalProperties: false
 
 examples:
@@ -180,4 +220,81 @@ examples:
             reg = <0x7c 0x4>, <0x150 0x8>;
         };
     };
+
+  - |
+    / {
+        #address-cells = <2>;
+        #size-cells = <2>;
+
+        reserved-memory {
+            #address-cells = <2>;
+            #size-cells = <2>;
+            ranges;
+
+            ssp_region_0: memory@400000000 {
+                reg = <0x4 0x00000000 0x0 0x01000000>;
+                no-map;
+            };
+
+            ssp_region_1: memory@401000000 {
+                reg = <0x4 0x01000000 0x0 0x01000000>;
+                no-map;
+            };
+
+            tsp_region: memory@402000000 {
+                reg = <0x4 0x02000000 0x0 0x01000000>;
+                no-map;
+            };
+        };
+
+        bus {
+            #address-cells = <2>;
+            #size-cells = <2>;
+
+            syscon@12c02000 {
+                compatible = "aspeed,ast2700-scu0", "syscon", "simple-mfd";
+                reg = <0 0x12c02000 0 0x1000>;
+                ranges = <0x0 0x0 0x12c02000 0x1000>;
+                #address-cells = <1>;
+                #size-cells = <1>;
+                #clock-cells = <1>;
+                #reset-cells = <1>;
+
+                memory-region = <&ssp_region_0>, <&ssp_region_1>,
+                                <&tsp_region>;
+                memory-region-names = "ssp-0", "ssp-1", "tsp";
+
+                silicon-id@0 {
+                    compatible = "aspeed,ast2700-silicon-id", "aspeed,silicon-id";
+                    reg = <0x0 0x4>;
+                };
+
+                interrupt-controller@1b0 {
+                    compatible = "aspeed,ast2700-scu-ic0";
+                    reg = <0x1b0 0x4>;
+                    #interrupt-cells = <1>;
+                    interrupts-extended = <&intc0 97>;
+                    interrupt-controller;
+                };
+
+                interrupt-controller@1e0 {
+                    compatible = "aspeed,ast2700-scu-ic1";
+                    reg = <0x1e0 0x4>;
+                    #interrupt-cells = <1>;
+                    interrupts-extended = <&intc0 98>;
+                    interrupt-controller;
+                };
+
+                pinctrl@400 {
+                    compatible = "aspeed,ast2700-soc0-pinctrl";
+                    reg = <0x400 0x318>;
+                    emmc-state {
+                        function = "EMMC";
+                        groups = "EMMCG1";
+                    };
+                };
+            };
+        };
+    };
+
 ...
Signature · 1 line
2.34.1
author reviewer
#7 lore raw

PATCH v5 3/3 pinctrl: aspeed: Add AST2700 SoC0 support

In reply to Billy Tsai

Add pinctrl support for the SoC0 instance of the ASPEED AST2700.

AST2700 consists of two interconnected SoC instances, each with its own pinctrl register block.

The SoC0 pinctrl hardware closely follows the design found in previous ASPEED BMC generations, allowing the driver to build upon the common ASPEED pinctrl infrastructure.

---
 drivers/pinctrl/aspeed/Kconfig                  |   9 +
 drivers/pinctrl/aspeed/Makefile                 |   1 +
 drivers/pinctrl/aspeed/pinctrl-aspeed-g7-soc0.c | 710 ++++++++++++++++++++++++
 3 files changed, 720 insertions(+)
drivers/pinctrl/aspeed/Kconfig +9 -0
index 1a4e5b9ed471..f9672cca891e 100644
@@ -31,3 +31,12 @@ config PINCTRL_ASPEED_G6
 	help
 	  Say Y here to enable pin controller support for Aspeed's 6th
 	  generation SoCs. GPIO is provided by a separate GPIO driver.
+
+config PINCTRL_ASPEED_G7_SOC0
+	bool "Aspeed G7 SoC pin control"
+	depends on (ARCH_ASPEED || COMPILE_TEST) && OF
+	select PINCTRL_ASPEED
+	help
+	  Say Y here to enable pin controller support for the SoC0 instance
+	  of Aspeed's 7th generation SoCs. GPIO is provided by a separate
+	  GPIO driver.
drivers/pinctrl/aspeed/Makefile +1 -0
index db2a7600ae2b..0de524ca2c72 100644
@@ -6,3 +6,4 @@ obj-$(CONFIG_PINCTRL_ASPEED)	+= pinctrl-aspeed.o pinmux-aspeed.o
 obj-$(CONFIG_PINCTRL_ASPEED_G4)	+= pinctrl-aspeed-g4.o
 obj-$(CONFIG_PINCTRL_ASPEED_G5)	+= pinctrl-aspeed-g5.o
 obj-$(CONFIG_PINCTRL_ASPEED_G6)	+= pinctrl-aspeed-g6.o
+obj-$(CONFIG_PINCTRL_ASPEED_G7_SOC0) += pinctrl-aspeed-g7-soc0.o
drivers/pinctrl/aspeed/pinctrl-aspeed-g7-soc0.c new file +710 -0

710 lines not on this page · raw message

Signature · 1 line
2.34.1
#3 lore raw

Re: [PATCH v5 2/3] dt-bindings: mfd: aspeed,ast2x00-scu: Describe AST2700 SCU0

In reply to Billy Tsai
Quoted 26 lines · Billy Tsai

AST2700 consists of two interconnected SoC instances, each with its own System Control Unit (SCU). The SCU0 provides pin control, interrupt controllers, clocks, resets, and address-space mappings for the Secondary and Tertiary Service Processors (SSP and TSP).

Describe the SSP/TSP address mappings using the standard memory-region and memory-region-names properties.

Disallow legacy child nodes that are not present on AST2700, including p2a-control and smp-memram. The latter is unnecessary as software can access the scratch registers via the SCU syscon.

Also allow the AST2700 SoC0 pin controller to be described as a child node of the SCU0, and add an example illustrating the SCU0 layout, including reserved-memory, interrupt controllers, and pinctrl.

---
 .../bindings/mfd/aspeed,ast2x00-scu.yaml           | 117 +++++++++++++++++++++
 1 file changed, 117 insertions(+)
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +0 -0
index a87f31fce019..86d51389689c 100644

Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml properties: · line 50

Quoted 5 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +2 -0
@@ -46,6 +46,9 @@ properties:
   '#reset-cells':
     const: 1
 
+  memory-region: true
+  memory-region-names: true

Missing constraints. From where did you take such syntax (so I can fix it)?

Best regards,
Krzysztof

author reviewer
#4 lore raw

Re: [PATCH v5 2/3] dt-bindings: mfd: aspeed,ast2x00-scu: Describe AST2700 SCU0

Quoted 29 lines
Quoted 29 lines

AST2700 consists of two interconnected SoC instances, each with its own System Control Unit (SCU). The SCU0 provides pin control, interrupt controllers, clocks, resets, and address-space mappings for the Secondary and Tertiary Service Processors (SSP and TSP).

Describe the SSP/TSP address mappings using the standard memory-region and memory-region-names properties.

Disallow legacy child nodes that are not present on AST2700, including p2a-control and smp-memram. The latter is unnecessary as software can access the scratch registers via the SCU syscon.

Also allow the AST2700 SoC0 pin controller to be described as a child node of the SCU0, and add an example illustrating the SCU0 layout, including reserved-memory, interrupt controllers, and pinctrl.

---
 .../bindings/mfd/aspeed,ast2x00-scu.yaml           | 117 +++++++++++++++++++++
 1 file changed, 117 insertions(+)
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +0 -0
index a87f31fce019..86d51389689c 100644
@@ -46,6 +46,9 @@ properties:
   '#reset-cells':
     const: 1
 
Quoted 5 lines

Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml properties: · line 50

Quoted 2 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +2 -0
+  memory-region: true
+  memory-region-names: true

Missing constraints. From where did you take such syntax (so I can fix it)?

The intention was to constrain these properties conditionally for AST2700 SCU0 as done further down in the patch.

I can update the binding so that memory-region and memory-region-names have baseline constraints (e.g. minItems and maxItems), and then refine them in the conditional branches for AST2700SCU0, AST2700SCU1 and others

memory-region:
minItems: 2
maxItems: 3
memory-region-names:
minItems: 2
maxItems: 3

Best regards,
Billy Tsai

maintainer
#5 lore raw

Re: [PATCH v5 2/3] dt-bindings: mfd: aspeed,ast2x00-scu: Describe AST2700 SCU0

Quoted 42 lines · Billy Tsai
Quoted 29 lines
Quoted 29 lines

AST2700 consists of two interconnected SoC instances, each with its own System Control Unit (SCU). The SCU0 provides pin control, interrupt controllers, clocks, resets, and address-space mappings for the Secondary and Tertiary Service Processors (SSP and TSP).

Describe the SSP/TSP address mappings using the standard memory-region and memory-region-names properties.

Disallow legacy child nodes that are not present on AST2700, including p2a-control and smp-memram. The latter is unnecessary as software can access the scratch registers via the SCU syscon.

Also allow the AST2700 SoC0 pin controller to be described as a child node of the SCU0, and add an example illustrating the SCU0 layout, including reserved-memory, interrupt controllers, and pinctrl.

---
 .../bindings/mfd/aspeed,ast2x00-scu.yaml           | 117 +++++++++++++++++++++
 1 file changed, 117 insertions(+)
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +0 -0
index a87f31fce019..86d51389689c 100644
@@ -46,6 +46,9 @@ properties:
   '#reset-cells':
     const: 1
 
Quoted 5 lines

Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml properties: · line 50

Quoted 2 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +2 -0
+  memory-region: true
+  memory-region-names: true

Missing constraints. From where did you take such syntax (so I can fix it)?

The intention was to constrain these properties conditionally for AST2700 SCU0 as done further down in the patch.

I can update the binding so that memory-region and memory-region-names have baseline constraints (e.g. minItems and maxItems), and then refine them in the conditional branches for AST2700SCU0, AST2700SCU1 and others

Quoted 6 lines

memory-region:
minItems: 2
maxItems: 3
memory-region-names:
minItems: 2
maxItems: 3

As of this patch, you don't need that. You can just define the regions and names at the top-level. And the conditional schema only needs to disallow them for the appropriate case.

Rob

author reviewer
#6 lore raw

Re: [PATCH v5 2/3] dt-bindings: mfd: aspeed,ast2x00-scu: Describe AST2700 SCU0

Quoted 49 lines
Quoted 42 lines
Quoted 29 lines
Quoted 29 lines

AST2700 consists of two interconnected SoC instances, each with its own System Control Unit (SCU). The SCU0 provides pin control, interrupt controllers, clocks, resets, and address-space mappings for the Secondary and Tertiary Service Processors (SSP and TSP).

Describe the SSP/TSP address mappings using the standard memory-region and memory-region-names properties.

Disallow legacy child nodes that are not present on AST2700, including p2a-control and smp-memram. The latter is unnecessary as software can access the scratch registers via the SCU syscon.

Also allow the AST2700 SoC0 pin controller to be described as a child node of the SCU0, and add an example illustrating the SCU0 layout, including reserved-memory, interrupt controllers, and pinctrl.

---
 .../bindings/mfd/aspeed,ast2x00-scu.yaml           | 117 +++++++++++++++++++++
 1 file changed, 117 insertions(+)
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +0 -0
index a87f31fce019..86d51389689c 100644
@@ -46,6 +46,9 @@ properties:
   '#reset-cells':
     const: 1
 
Quoted 5 lines

Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml properties: · line 50

Quoted 2 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +2 -0
+  memory-region: true
+  memory-region-names: true

Missing constraints. From where did you take such syntax (so I can fix it)?

The intention was to constrain these properties conditionally for AST2700 SCU0 as done further down in the patch.

I can update the binding so that memory-region and memory-region-names have baseline constraints (e.g. minItems and maxItems), and then refine them in the conditional branches for AST2700SCU0, AST2700SCU1 and others

Quoted 6 lines

memory-region:
minItems: 2
maxItems: 3
memory-region-names:
minItems: 2
maxItems: 3

Quoted 3 lines

As of this patch, you don't need that. You can just define the regions and names at the top-level. And the conditional schema only needs to disallow them for the appropriate case.

Based on your suggestion, I will simplify the schema and define memory-region and memory-region-names at the top-level without item constraints, and only disallow them for the non-AST2700 cases.

The updated structure would look like:

memory-region:
description:
Reserved memory regions used by AST2700 SCU to configure coprocessor address mapping windows.

memory-region-names:
description:
Names corresponding to the AST2700 coprocessor mapping windows listed in memory-region.

...

- if:
properties:
compatible:
contains:
anyOf:
- const: aspeed,ast2700-scu0
- const: aspeed,ast2700-scu1
then:
patternProperties:
'^p2a-control@[0-9a-f]+$': false
'^smp-memram@[0-9a-f]+$': false
else:
properties:
memory-region: false
memory-region-names: false

Does this match what you had in mind?

Thanks

Billy Tsai