devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] arm64: dts: mediatek: mt8188-geralt: Enable first SCP core
@ 2025-08-14  9:25 Chen-Yu Tsai
  2025-08-14  9:49 ` Fei Shao
  2025-10-14 13:27 ` AngeloGioacchino Del Regno
  0 siblings, 2 replies; 5+ messages in thread
From: Chen-Yu Tsai @ 2025-08-14  9:25 UTC (permalink / raw)
  To: Matthias Brugger, AngeloGioacchino Del Regno
  Cc: Chen-Yu Tsai, linux-mediatek, devicetree, linux-arm-kernel,
	linux-kernel, Fei Shao

The first SCP core is used to drive the video decoder and encoders.

Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
Changes since v1:
- Added SCP vreq pin
---
 .../boot/dts/mediatek/mt8188-geralt.dtsi      | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi b/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
index c5254ae0bb99..7fedbacdac44 100644
--- a/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
@@ -164,6 +164,12 @@ reserved_memory: reserved-memory {
 		#size-cells = <2>;
 		ranges;
 
+		scp_mem_reserved: memory@50000000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0x50000000 0 0x800000>;
+			no-map;
+		};
+
 		apu_mem: memory@55000000 {
 			compatible = "shared-dma-pool";
 			reg = <0 0x55000000 0 0x1400000>;
@@ -1077,6 +1083,13 @@ pins-bus {
 		};
 	};
 
+	scp_pins: scp-pins {
+		pins-scp-vreq {
+			pinmux = <PINMUX_GPIO98__FUNC_O_SCP_VREQ_VAO>;
+			bias-disable;
+		};
+	};
+
 	spi0_pins: spi0-pins {
 		pins-bus {
 			pinmux = <PINMUX_GPIO69__FUNC_O_SPIM0_CSB>,
@@ -1146,6 +1159,18 @@ &postmask0_out {
 	remote-endpoint = <&dither0_in>;
 };
 
+&scp_cluster {
+	status = "okay";
+};
+
+&scp_c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&scp_pins>;
+	firmware-name = "mediatek/mt8188/scp.img";
+	memory-region = <&scp_mem_reserved>;
+	status = "okay";
+};
+
 &sound {
 	pinctrl-names = "aud_etdm_hp_on", "aud_etdm_hp_off",
 			"aud_etdm_spk_on", "aud_etdm_spk_off",
-- 
2.51.0.rc1.163.g2494970778-goog


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] arm64: dts: mediatek: mt8188-geralt: Enable first SCP core
  2025-08-14  9:25 [PATCH v2] arm64: dts: mediatek: mt8188-geralt: Enable first SCP core Chen-Yu Tsai
@ 2025-08-14  9:49 ` Fei Shao
  2025-10-14 13:27 ` AngeloGioacchino Del Regno
  1 sibling, 0 replies; 5+ messages in thread
From: Fei Shao @ 2025-08-14  9:49 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Matthias Brugger, AngeloGioacchino Del Regno, linux-mediatek,
	devicetree, linux-arm-kernel, linux-kernel

On Thu, Aug 14, 2025 at 5:25 PM Chen-Yu Tsai <wenst@chromium.org> wrote:
>
> The first SCP core is used to drive the video decoder and encoders.
>
> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>

Reviewed-by: Fei Shao <fshao@chromium.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] arm64: dts: mediatek: mt8188-geralt: Enable first SCP core
  2025-08-14  9:25 [PATCH v2] arm64: dts: mediatek: mt8188-geralt: Enable first SCP core Chen-Yu Tsai
  2025-08-14  9:49 ` Fei Shao
@ 2025-10-14 13:27 ` AngeloGioacchino Del Regno
  2025-10-15  7:31   ` Chen-Yu Tsai
  1 sibling, 1 reply; 5+ messages in thread
From: AngeloGioacchino Del Regno @ 2025-10-14 13:27 UTC (permalink / raw)
  To: Chen-Yu Tsai, Matthias Brugger
  Cc: linux-mediatek, devicetree, linux-arm-kernel, linux-kernel,
	Fei Shao

Il 14/08/25 11:25, Chen-Yu Tsai ha scritto:
> The first SCP core is used to drive the video decoder and encoders.
> 
> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
> ---
> Changes since v1:
> - Added SCP vreq pin
> ---
>   .../boot/dts/mediatek/mt8188-geralt.dtsi      | 25 +++++++++++++++++++
>   1 file changed, 25 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi b/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
> index c5254ae0bb99..7fedbacdac44 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
> @@ -164,6 +164,12 @@ reserved_memory: reserved-memory {
>   		#size-cells = <2>;
>   		ranges;
>   
> +		scp_mem_reserved: memory@50000000 {
> +			compatible = "shared-dma-pool";
> +			reg = <0 0x50000000 0 0x800000>;
> +			no-map;
> +		};
> +
>   		apu_mem: memory@55000000 {
>   			compatible = "shared-dma-pool";
>   			reg = <0 0x55000000 0 0x1400000>;
> @@ -1077,6 +1083,13 @@ pins-bus {
>   		};
>   	};
>   
> +	scp_pins: scp-pins {
> +		pins-scp-vreq {
> +			pinmux = <PINMUX_GPIO98__FUNC_O_SCP_VREQ_VAO>;
> +			bias-disable;
> +		};
> +	};
> +
>   	spi0_pins: spi0-pins {
>   		pins-bus {
>   			pinmux = <PINMUX_GPIO69__FUNC_O_SPIM0_CSB>,
> @@ -1146,6 +1159,18 @@ &postmask0_out {
>   	remote-endpoint = <&dither0_in>;
>   };
>   
> +&scp_cluster {
> +	status = "okay";
> +};
> +
> +&scp_c0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&scp_pins>;
> +	firmware-name = "mediatek/mt8188/scp.img";

After a (very brief) discussion with Arnd last time, turns out we decided to avoid
using the firmware-name property, including for mtk-scp.

Please resend without firmware-name.

P.S.: there's a patch to construct the firmware name from compatible...
https://lore.kernel.org/r/20250911140043.190801-1-angelogioacchino.delregno@collabora.com

Cheers,
Angelo

> +	memory-region = <&scp_mem_reserved>;
> +	status = "okay";
> +};
> +
>   &sound {
>   	pinctrl-names = "aud_etdm_hp_on", "aud_etdm_hp_off",
>   			"aud_etdm_spk_on", "aud_etdm_spk_off",



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] arm64: dts: mediatek: mt8188-geralt: Enable first SCP core
  2025-10-14 13:27 ` AngeloGioacchino Del Regno
@ 2025-10-15  7:31   ` Chen-Yu Tsai
  2025-10-15  8:31     ` AngeloGioacchino Del Regno
  0 siblings, 1 reply; 5+ messages in thread
From: Chen-Yu Tsai @ 2025-10-15  7:31 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno
  Cc: Matthias Brugger, linux-mediatek, devicetree, linux-arm-kernel,
	linux-kernel, Fei Shao

On Tue, Oct 14, 2025 at 9:27 PM AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com> wrote:
>
> Il 14/08/25 11:25, Chen-Yu Tsai ha scritto:
> > The first SCP core is used to drive the video decoder and encoders.
> >
> > Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
> > ---
> > Changes since v1:
> > - Added SCP vreq pin
> > ---
> >   .../boot/dts/mediatek/mt8188-geralt.dtsi      | 25 +++++++++++++++++++
> >   1 file changed, 25 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi b/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
> > index c5254ae0bb99..7fedbacdac44 100644
> > --- a/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
> > +++ b/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
> > @@ -164,6 +164,12 @@ reserved_memory: reserved-memory {
> >               #size-cells = <2>;
> >               ranges;
> >
> > +             scp_mem_reserved: memory@50000000 {
> > +                     compatible = "shared-dma-pool";
> > +                     reg = <0 0x50000000 0 0x800000>;
> > +                     no-map;
> > +             };
> > +
> >               apu_mem: memory@55000000 {
> >                       compatible = "shared-dma-pool";
> >                       reg = <0 0x55000000 0 0x1400000>;
> > @@ -1077,6 +1083,13 @@ pins-bus {
> >               };
> >       };
> >
> > +     scp_pins: scp-pins {
> > +             pins-scp-vreq {
> > +                     pinmux = <PINMUX_GPIO98__FUNC_O_SCP_VREQ_VAO>;
> > +                     bias-disable;
> > +             };
> > +     };
> > +
> >       spi0_pins: spi0-pins {
> >               pins-bus {
> >                       pinmux = <PINMUX_GPIO69__FUNC_O_SPIM0_CSB>,
> > @@ -1146,6 +1159,18 @@ &postmask0_out {
> >       remote-endpoint = <&dither0_in>;
> >   };
> >
> > +&scp_cluster {
> > +     status = "okay";
> > +};
> > +
> > +&scp_c0 {
> > +     pinctrl-names = "default";
> > +     pinctrl-0 = <&scp_pins>;
> > +     firmware-name = "mediatek/mt8188/scp.img";
>
> After a (very brief) discussion with Arnd last time, turns out we decided to avoid
> using the firmware-name property, including for mtk-scp.
>
> Please resend without firmware-name.
>
> P.S.: there's a patch to construct the firmware name from compatible...
> https://lore.kernel.org/r/20250911140043.190801-1-angelogioacchino.delregno@collabora.com

I'm aware of the patch, but did that get merged? If not then this would
cause it to default to just /lib/firmware/scp.img?

ChenYu

> Cheers,
> Angelo
>
> > +     memory-region = <&scp_mem_reserved>;
> > +     status = "okay";
> > +};
> > +
> >   &sound {
> >       pinctrl-names = "aud_etdm_hp_on", "aud_etdm_hp_off",
> >                       "aud_etdm_spk_on", "aud_etdm_spk_off",
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] arm64: dts: mediatek: mt8188-geralt: Enable first SCP core
  2025-10-15  7:31   ` Chen-Yu Tsai
@ 2025-10-15  8:31     ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 5+ messages in thread
From: AngeloGioacchino Del Regno @ 2025-10-15  8:31 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Matthias Brugger, linux-mediatek, devicetree, linux-arm-kernel,
	linux-kernel, Fei Shao

Il 15/10/25 09:31, Chen-Yu Tsai ha scritto:
> On Tue, Oct 14, 2025 at 9:27 PM AngeloGioacchino Del Regno
> <angelogioacchino.delregno@collabora.com> wrote:
>>
>> Il 14/08/25 11:25, Chen-Yu Tsai ha scritto:
>>> The first SCP core is used to drive the video decoder and encoders.
>>>
>>> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
>>> ---
>>> Changes since v1:
>>> - Added SCP vreq pin
>>> ---
>>>    .../boot/dts/mediatek/mt8188-geralt.dtsi      | 25 +++++++++++++++++++
>>>    1 file changed, 25 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi b/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
>>> index c5254ae0bb99..7fedbacdac44 100644
>>> --- a/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
>>> +++ b/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
>>> @@ -164,6 +164,12 @@ reserved_memory: reserved-memory {
>>>                #size-cells = <2>;
>>>                ranges;
>>>
>>> +             scp_mem_reserved: memory@50000000 {
>>> +                     compatible = "shared-dma-pool";
>>> +                     reg = <0 0x50000000 0 0x800000>;
>>> +                     no-map;
>>> +             };
>>> +
>>>                apu_mem: memory@55000000 {
>>>                        compatible = "shared-dma-pool";
>>>                        reg = <0 0x55000000 0 0x1400000>;
>>> @@ -1077,6 +1083,13 @@ pins-bus {
>>>                };
>>>        };
>>>
>>> +     scp_pins: scp-pins {
>>> +             pins-scp-vreq {
>>> +                     pinmux = <PINMUX_GPIO98__FUNC_O_SCP_VREQ_VAO>;
>>> +                     bias-disable;
>>> +             };
>>> +     };
>>> +
>>>        spi0_pins: spi0-pins {
>>>                pins-bus {
>>>                        pinmux = <PINMUX_GPIO69__FUNC_O_SPIM0_CSB>,
>>> @@ -1146,6 +1159,18 @@ &postmask0_out {
>>>        remote-endpoint = <&dither0_in>;
>>>    };
>>>
>>> +&scp_cluster {
>>> +     status = "okay";
>>> +};
>>> +
>>> +&scp_c0 {
>>> +     pinctrl-names = "default";
>>> +     pinctrl-0 = <&scp_pins>;
>>> +     firmware-name = "mediatek/mt8188/scp.img";
>>
>> After a (very brief) discussion with Arnd last time, turns out we decided to avoid
>> using the firmware-name property, including for mtk-scp.
>>
>> Please resend without firmware-name.
>>
>> P.S.: there's a patch to construct the firmware name from compatible...
>> https://lore.kernel.org/r/20250911140043.190801-1-angelogioacchino.delregno@collabora.com
> 
> I'm aware of the patch, but did that get merged?

Not yet.

 >> If not then this would
> cause it to default to just /lib/firmware/scp.img?

Yes... but there's no way around it, we can't add firmware-name to devicetrees.

> 
> ChenYu
> 
>> Cheers,
>> Angelo
>>
>>> +     memory-region = <&scp_mem_reserved>;
>>> +     status = "okay";
>>> +};
>>> +
>>>    &sound {
>>>        pinctrl-names = "aud_etdm_hp_on", "aud_etdm_hp_off",
>>>                        "aud_etdm_spk_on", "aud_etdm_spk_off",
>>
>>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-10-15  8:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-14  9:25 [PATCH v2] arm64: dts: mediatek: mt8188-geralt: Enable first SCP core Chen-Yu Tsai
2025-08-14  9:49 ` Fei Shao
2025-10-14 13:27 ` AngeloGioacchino Del Regno
2025-10-15  7:31   ` Chen-Yu Tsai
2025-10-15  8:31     ` AngeloGioacchino Del Regno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).