Skip to contentSkip to conversation

pinctrl: aspeed: backport AST2700 SoC0 support

PATCH Applied Vince Chang 3 participants 7 messages Oct 29 – Nov 5

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

cover pinctrl: aspeed: backport AST2700 SoC0 support

Backport three upstream Linux ASPEED pinctrl and SCU binding commits to OpenBMC dev-6.18 to provide AST2700 SoC0 pin controller support.

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      | 114 +++
 .../pinctrl/aspeed,ast2700-soc0-pinctrl.yaml  | 188 +++++
 drivers/pinctrl/aspeed/Kconfig                |   9 +
 drivers/pinctrl/aspeed/Makefile               |   1 +
 .../pinctrl/aspeed/pinctrl-aspeed-g7-soc0.c   | 749 ++++++++++++++++++
 5 files changed, 1061 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/aspeed,ast2700-soc0-pinctrl.yaml
 create mode 100644 drivers/pinctrl/aspeed/pinctrl-aspeed-g7-soc0.c
Signature · 1 line
2.43.0
#1 lore raw

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

From: Billy Tsai <[email protected]>

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.

(cherry picked from commit 86dc1b92cdb343f8de51edf489bcdd8cb5517cf8)
---
 .../pinctrl/aspeed,ast2700-soc0-pinctrl.yaml  | 188 ++++++++++++++++++
 1 file changed, 188 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/aspeed,ast2700-soc0-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/aspeed,ast2700-soc0-pinctrl.yaml new file +188 -0
new file mode 100644
index 000000000000..407a64f28d49
@@ -0,0 +1,188 @@
+# 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$':
+    description: |
+      Pin control state.
+
+      If 'function' is present, the node describes a pinmux state and must
+      specify 'groups'.
+
+      For pin configuration, exactly one of 'groups' or 'pins' must be
+      specified in each state node. Group-level configuration applies to all
+      pins in the group. Pin-level configuration may be supplied in a
+      separate state node for individual pins; when both group-level and
+      pin-level configuration apply to the same pin, the pin-level
+      configuration takes precedence.
+
+    type: object
+    allOf:
+      - $ref: pinmux-node.yaml#
+      - $ref: pincfg-node.yaml#
+      - if:
+          required:
+            - function
+        then:
+          required:
+            - groups
+      - oneOf:
+          - required:
+              - groups
+          - required:
+              - pins
+
+    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.43.0
#2 lore raw

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

In reply to Vince Chang

From: Billy Tsai <[email protected]>

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      | 114 ++++++++++++++++++
 1 file changed, 114 insertions(+)
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +114 -0
index da1887d7a8fe..8b14d8d75639 100644
@@ -46,6 +46,18 @@ properties:
   '#reset-cells':
     const: 1
 
+  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
+
 patternProperties:
   '^p2a-control@[0-9a-f]+$':
     description: >
@@ -87,6 +99,7 @@ patternProperties:
             - aspeed,ast2400-pinctrl
             - aspeed,ast2500-pinctrl
             - aspeed,ast2600-pinctrl
+            - aspeed,ast2700-soc0-pinctrl
 
     required:
       - compatible
@@ -139,6 +152,30 @@ required:
   - '#clock-cells'
   - '#reset-cells'
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - aspeed,ast2700-scu0
+              - aspeed,ast2700-scu1
+    then:
+      patternProperties:
+        '^p2a-control@[0-9a-f]+$': false
+        '^smp-memram@[0-9a-f]+$': false
+
+  - if:
+      not:
+        properties:
+          compatible:
+            contains:
+              const: aspeed,ast2700-scu0
+    then:
+      properties:
+        memory-region: false
+        memory-region-names: false
+
 additionalProperties: false
 
 examples:
@@ -163,4 +200,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.43.0
maintainer
#3 lore raw

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

Quoted 25 lines · Vince Chang

From: Billy Tsai <[email protected]>

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.

Quoted 3 lines
---
 .../bindings/mfd/aspeed,ast2x00-scu.yaml      | 114 ++++++++++++++++++
 1 file changed, 114 insertions(+)

What is this?

Why are you sending downstream patches to upstream contributors?

Please check your git send-email settings.

Signature · 1 line
Lee Jones
#4 lore raw

RE: [PATCH linux dev-6.18 2/3] dt-bindings: mfd: aspeed,ast2x00-scu: Describe AST2700 SCU0

Hi Lee,

Quoted 3 lines

Why are you sending downstream patches to upstream contributors?

Please check your git send-email settings.

Sorry for the noise. This patch is a backport of an upstream commit to OpenBMC's dev-6.18 branch. It appears git send-email automatically added you to Cc based on the original commit's trailers.

I'll fix my git send-email settings to avoid this in future backport submissions.

Thanks,
Vince

************* Email Confidentiality Notice ********************

DISCLAIMER:
This message (and any attachments) may contain legally privileged and/or other confidential information. If you have received it in error, please notify the sender by reply e-mail and immediately delete the e-mail and any attachments without copying or disclosing the contents. Thank you.

Quoted 54 lines

-----Original Message-----
From: Lee Jones <[email protected]>
Sent: Thursday, November 5, 2026 2:24 AM
To: Vince Chang <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Billy Tsai <[email protected]>; [email protected]; Rob Herring <[email protected]>; Linus Walleij <[email protected]>
Subject: Re: [PATCH linux dev-6.18 2/3] dt-bindings: mfd: aspeed,ast2x00-scu:
Describe AST2700 SCU0

Quoted 14 lines · Vince Chang

From: Billy Tsai <[email protected]>

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.

Quoted 8 lines

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.

Link:

https://patch.msgid.link/20260428-upstream_pinctrl-v8-2-eb8ef9ab0498@as
peedtech.com

Quoted 2 lines
(cherry picked from commit

2611c4d623ba867e196a4146f1927c3c468ac2bc)

Quoted 3 lines
---
 .../bindings/mfd/aspeed,ast2x00-scu.yaml      | 114

++++++++++++++++++

Quoted 1 line
 1 file changed, 114 insertions(+)

What is this?

Why are you sending downstream patches to upstream contributors?

Please check your git send-email settings.

--
Lee Jones

#5 lore raw

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

In reply to Vince Chang

From: Billy Tsai <[email protected]>

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.

(cherry picked from commit 7f73aa118a6fd9d3a8a2030e1f6aa0dd5dc8cae1)
---
 drivers/pinctrl/aspeed/Kconfig                |   9 +
 drivers/pinctrl/aspeed/Makefile               |   1 +
 .../pinctrl/aspeed/pinctrl-aspeed-g7-soc0.c   | 749 ++++++++++++++++++
 3 files changed, 759 insertions(+)
 create mode 100644 drivers/pinctrl/aspeed/pinctrl-aspeed-g7-soc0.c
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 +749 -0

749 lines not on this page · raw message

Signature · 1 line
2.43.0
maintainer Applied
#6 lore raw
In reply to Vince Chang
Quoted 2 lines · Vince Chang

Backport three upstream Linux ASPEED pinctrl and SCU binding commits to OpenBMC dev-6.18 to provide AST2700 SoC0 pin controller support.

Applied, thanks.

Andrew