* [PATCH] dt-bindings: remoteproc: mtk,scp: Allow multiple memory regions
@ 2026-05-06 13:31 Arnab Layek
2026-05-06 13:36 ` Krzysztof Kozlowski
2026-05-11 12:10 ` [PATCH v2 0/1] dt-bindings: remoteproc: mtk,scp: Allow multiple memory regions for MT8188 Arnab Layek
0 siblings, 2 replies; 5+ messages in thread
From: Arnab Layek @ 2026-05-06 13:31 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno
Cc: linux-remoteproc, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Project_Global_Chrome_Upstream_Group, Arnab Layek
Update the memory-region property to support 1-2 reserved memory
regions instead of exactly one. This is needed for newer MediaTek
SoCs like MT8188 which require additional memory regions for SCP
operation.
Tested on MT8188 Geralt platform.
Signed-off-by: Arnab Layek <arnab.layek@mediatek.com>
---
.../devicetree/bindings/remoteproc/mtk,scp.yaml | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
index bdbb12118da4..9f6dca94ff40 100644
--- a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
@@ -55,7 +55,10 @@ properties:
initializing SCP.
memory-region:
- maxItems: 1
+ description:
+ Phandle to the reserved memory regions.
+ minItems: 1
+ maxItems: 2
cros-ec-rpmsg:
$ref: /schemas/embedded-controller/google,cros-ec.yaml
@@ -123,7 +126,10 @@ patternProperties:
initializing sub cores of multi-core SCP.
memory-region:
- maxItems: 1
+ description:
+ Phandle to the reserved memory regions.
+ minItems: 1
+ maxItems: 2
cros-ec-rpmsg:
$ref: /schemas/embedded-controller/google,cros-ec.yaml
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] dt-bindings: remoteproc: mtk,scp: Allow multiple memory regions
2026-05-06 13:31 [PATCH] dt-bindings: remoteproc: mtk,scp: Allow multiple memory regions Arnab Layek
@ 2026-05-06 13:36 ` Krzysztof Kozlowski
2026-05-11 12:10 ` [PATCH v2 0/1] dt-bindings: remoteproc: mtk,scp: Allow multiple memory regions for MT8188 Arnab Layek
1 sibling, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2026-05-06 13:36 UTC (permalink / raw)
To: Arnab Layek, Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno
Cc: linux-remoteproc, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Project_Global_Chrome_Upstream_Group
On 06/05/2026 15:31, Arnab Layek wrote:
> Update the memory-region property to support 1-2 reserved memory
> regions instead of exactly one. This is needed for newer MediaTek
> SoCs like MT8188 which require additional memory regions for SCP
> operation.
So where is the compatible? Already there?
>
> Tested on MT8188 Geralt platform.
You cannot test binding.
>
> Signed-off-by: Arnab Layek <arnab.layek@mediatek.com>
> ---
> .../devicetree/bindings/remoteproc/mtk,scp.yaml | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
> index bdbb12118da4..9f6dca94ff40 100644
> --- a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
> +++ b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
> @@ -55,7 +55,10 @@ properties:
> initializing SCP.
>
> memory-region:
> - maxItems: 1
> + description:
> + Phandle to the reserved memory regions.
> + minItems: 1
> + maxItems: 2
Just like I sent some patches long time ago for iommus Mediatek media
bindings - fix it the same way. Pity the patches were not picked up,
even though sending twice, but that does not give you easier way to get
incorrect code in. You just multiple poor patterns...
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 0/1] dt-bindings: remoteproc: mtk,scp: Allow multiple memory regions for MT8188
2026-05-06 13:31 [PATCH] dt-bindings: remoteproc: mtk,scp: Allow multiple memory regions Arnab Layek
2026-05-06 13:36 ` Krzysztof Kozlowski
@ 2026-05-11 12:10 ` Arnab Layek
2026-05-11 12:10 ` [PATCH v2 1/1] " Arnab Layek
1 sibling, 1 reply; 5+ messages in thread
From: Arnab Layek @ 2026-05-11 12:10 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno
Cc: linux-remoteproc, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Project_Global_Chrome_Upstream_Group, Arnab Layek
This patch updates the MediaTek SCP device tree binding to support
multiple memory regions for MT8188 SoCs, addressing review feedback
from v1.
The MT8188 SCP requires two memory regions (SRAM + L1TCM) while other
MediaTek SoCs use only one. This patch follows the proper pattern of
using conditional schemas with explicit descriptions.
Changes in v2:
- Use conditional schema (if/then in allOf) to restrict multiple
memory regions only to MT8188 variants, keeping maxItems: 1 as
default for other SoCs (addresses Krzysztof's review)
- Add explicit item descriptions for each memory region (Main SRAM
and optional L1TCM) instead of just setting minItems/maxItems
- Apply to both top-level and patternProperties
Based on linux-next, tag: next-20260505
Arnab Layek (1):
dt-bindings: remoteproc: mtk,scp: Allow multiple memory regions for
MT8188
.../bindings/remoteproc/mtk,scp.yaml | 21 +++++++++++++++++++
1 file changed, 21 insertions(+)
--
2.45.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/1] dt-bindings: remoteproc: mtk,scp: Allow multiple memory regions for MT8188
2026-05-11 12:10 ` [PATCH v2 0/1] dt-bindings: remoteproc: mtk,scp: Allow multiple memory regions for MT8188 Arnab Layek
@ 2026-05-11 12:10 ` Arnab Layek
2026-05-11 16:27 ` Conor Dooley
0 siblings, 1 reply; 5+ messages in thread
From: Arnab Layek @ 2026-05-11 12:10 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno
Cc: linux-remoteproc, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Project_Global_Chrome_Upstream_Group, Arnab Layek
The MT8188 SCP requires two reserved memory regions:
1. Main SCP SRAM memory region (required)
2. SCP L1TCM memory region (optional, for additional memory)
Some other MediaTek SoCs only use a single memory region. This patch adds
a conditional schema using if/then to allow 1-2 memory regions
specifically for mediatek,mt8188-scp and mediatek,mt8188-scp-dual
compatibles, while keeping the default maxItems: 1 for other
SoCs.
Each memory region is documented with descriptions to
clarify their purpose, following the pattern used in other bindings.
Signed-off-by: Arnab Layek <arnab.layek@mediatek.com>
---
.../bindings/remoteproc/mtk,scp.yaml | 21 +++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
index bdbb12118da4..df13be2026a6 100644
--- a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
@@ -205,6 +205,27 @@ allOf:
items:
- const: cfg
- const: l1tcm
+ - if:
+ properties:
+ compatible:
+ enum:
+ - mediatek,mt8188-scp
+ - mediatek,mt8188-scp-dual
+ then:
+ properties:
+ memory-region:
+ minItems: 1
+ items:
+ - description: Main SCP SRAM memory region
+ - description: Optional SCP L1TCM memory region
+ patternProperties:
+ "^scp@[a-f0-9]+$":
+ properties:
+ memory-region:
+ minItems: 1
+ items:
+ - description: Main SCP SRAM memory region
+ - description: Optional SCP L1TCM memory region
additionalProperties: false
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/1] dt-bindings: remoteproc: mtk,scp: Allow multiple memory regions for MT8188
2026-05-11 12:10 ` [PATCH v2 1/1] " Arnab Layek
@ 2026-05-11 16:27 ` Conor Dooley
0 siblings, 0 replies; 5+ messages in thread
From: Conor Dooley @ 2026-05-11 16:27 UTC (permalink / raw)
To: Arnab Layek
Cc: Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, linux-remoteproc, devicetree,
linux-kernel, linux-arm-kernel, linux-mediatek,
Project_Global_Chrome_Upstream_Group
[-- Attachment #1: Type: text/plain, Size: 2134 bytes --]
On Mon, May 11, 2026 at 08:10:04PM +0800, Arnab Layek wrote:
> The MT8188 SCP requires two reserved memory regions:
> 1. Main SCP SRAM memory region (required)
> 2. SCP L1TCM memory region (optional, for additional memory)
>
> Some other MediaTek SoCs only use a single memory region. This patch adds
> a conditional schema using if/then to allow 1-2 memory regions
> specifically for mediatek,mt8188-scp and mediatek,mt8188-scp-dual
> compatibles, while keeping the default maxItems: 1 for other
> SoCs.
>
> Each memory region is documented with descriptions to
> clarify their purpose, following the pattern used in other bindings.
>
> Signed-off-by: Arnab Layek <arnab.layek@mediatek.com>
> ---
> .../bindings/remoteproc/mtk,scp.yaml | 21 +++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
> index bdbb12118da4..df13be2026a6 100644
> --- a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
> +++ b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
> @@ -205,6 +205,27 @@ allOf:
> items:
> - const: cfg
> - const: l1tcm
> + - if:
> + properties:
> + compatible:
> + enum:
> + - mediatek,mt8188-scp
> + - mediatek,mt8188-scp-dual
> + then:
> + properties:
> + memory-region:
> + minItems: 1
> + items:
> + - description: Main SCP SRAM memory region
> + - description: Optional SCP L1TCM memory region
> + patternProperties:
> + "^scp@[a-f0-9]+$":
> + properties:
> + memory-region:
> + minItems: 1
> + items:
> + - description: Main SCP SRAM memory region
> + - description: Optional SCP L1TCM memory region
Does this even work, given that memory-region has maxItems: 1 outside
the conditional section?
Cheers,
Conor.
>
> additionalProperties: false
>
> --
> 2.45.2
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-05-11 16:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-06 13:31 [PATCH] dt-bindings: remoteproc: mtk,scp: Allow multiple memory regions Arnab Layek
2026-05-06 13:36 ` Krzysztof Kozlowski
2026-05-11 12:10 ` [PATCH v2 0/1] dt-bindings: remoteproc: mtk,scp: Allow multiple memory regions for MT8188 Arnab Layek
2026-05-11 12:10 ` [PATCH v2 1/1] " Arnab Layek
2026-05-11 16:27 ` Conor Dooley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox