* [PATCH v9 1/6] firmware: meson: sm: video firmware loading via secure monitor
2026-09-14 8:10 [PATCH v9 0/6] Add Amlogic stateless H.264 video decoder for S4 Zhentao Guo via B4 Relay
@ 2026-09-14 8:10 ` Zhentao Guo via B4 Relay
2026-09-14 8:10 ` [PATCH v9 2/6] firmware: meson: sm: Add video firmware loading SMC call Zhentao Guo via B4 Relay
` (3 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: Zhentao Guo via B4 Relay @ 2026-09-14 8:10 UTC (permalink / raw)
To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-kernel, linux-amlogic, linux-kernel, linux-media,
devicetree, Zhentao Guo
From: Zhentao Guo <zhentao.guo@amlogic.com>
Add SM_LOAD_VIDEO_FW to the secure monitor command enum
to allow decoder drivers to load firmware through the meson_sm
interface.
Signed-off-by: Zhentao Guo <zhentao.guo@amlogic.com>
---
include/linux/firmware/meson/meson_sm.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/firmware/meson/meson_sm.h b/include/linux/firmware/meson/meson_sm.h
index 3ebc2bd9a976..3b90b49d0552 100644
--- a/include/linux/firmware/meson/meson_sm.h
+++ b/include/linux/firmware/meson/meson_sm.h
@@ -15,6 +15,7 @@ enum {
SM_THERMAL_CALIB_READ,
SM_A1_PWRC_SET,
SM_A1_PWRC_GET,
+ SM_LOAD_VIDEO_FW,
};
struct meson_sm_firmware;
--
2.42.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v9 2/6] firmware: meson: sm: Add video firmware loading SMC call
2026-09-14 8:10 [PATCH v9 0/6] Add Amlogic stateless H.264 video decoder for S4 Zhentao Guo via B4 Relay
2026-09-14 8:10 ` [PATCH v9 1/6] firmware: meson: sm: video firmware loading via secure monitor Zhentao Guo via B4 Relay
@ 2026-09-14 8:10 ` Zhentao Guo via B4 Relay
2026-09-14 8:10 ` [PATCH v9 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder Zhentao Guo via B4 Relay
` (2 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: Zhentao Guo via B4 Relay @ 2026-09-14 8:10 UTC (permalink / raw)
To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-kernel, linux-amlogic, linux-kernel, linux-media,
devicetree, Zhentao Guo
From: Zhentao Guo <zhentao.guo@amlogic.com>
Add SM_LOAD_VIDEO_FW at SMC ID 0xb200000f in the command
table to load video firmware.
Signed-off-by: Zhentao Guo <zhentao.guo@amlogic.com>
---
drivers/firmware/meson/meson_sm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/firmware/meson/meson_sm.c b/drivers/firmware/meson/meson_sm.c
index ab9751a59b55..887caa5c625d 100644
--- a/drivers/firmware/meson/meson_sm.c
+++ b/drivers/firmware/meson/meson_sm.c
@@ -48,6 +48,7 @@ static const struct meson_sm_chip gxbb_chip = {
CMD(SM_THERMAL_CALIB_READ, 0x82000047),
CMD(SM_A1_PWRC_SET, 0x82000093),
CMD(SM_A1_PWRC_GET, 0x82000095),
+ CMD(SM_LOAD_VIDEO_FW, 0xb200000f),
{ /* sentinel */ },
},
};
--
2.42.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v9 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder
2026-09-14 8:10 [PATCH v9 0/6] Add Amlogic stateless H.264 video decoder for S4 Zhentao Guo via B4 Relay
2026-09-14 8:10 ` [PATCH v9 1/6] firmware: meson: sm: video firmware loading via secure monitor Zhentao Guo via B4 Relay
2026-09-14 8:10 ` [PATCH v9 2/6] firmware: meson: sm: Add video firmware loading SMC call Zhentao Guo via B4 Relay
@ 2026-09-14 8:10 ` Zhentao Guo via B4 Relay
2026-09-16 9:01 ` Krzysztof Kozlowski
2026-09-14 8:10 ` [PATCH v9 5/6] arm64: dts: amlogic: Add video decoder driver support for S4 SOCs Zhentao Guo via B4 Relay
2026-09-14 8:10 ` [PATCH v9 6/6] arm64: defconfig: Enable CONFIG_VIDEO_AMLOGIC_VDEC Zhentao Guo via B4 Relay
4 siblings, 1 reply; 10+ messages in thread
From: Zhentao Guo via B4 Relay @ 2026-09-14 8:10 UTC (permalink / raw)
To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-kernel, linux-amlogic, linux-kernel, linux-media,
devicetree, Zhentao Guo
From: Zhentao Guo <zhentao.guo@amlogic.com>
Describe the initial support for the V4L2 stateless video decoder
driver used with the Amlogic S4 (S805X2) platform.
Signed-off-by: Zhentao Guo <zhentao.guo@amlogic.com>
---
.../devicetree/bindings/media/amlogic,s4-vdec.yaml | 114 +++++++++++++++++++++
1 file changed, 114 insertions(+)
diff --git a/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml b/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml
new file mode 100644
index 000000000000..d350b3e68a38
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml
@@ -0,0 +1,114 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2025 Amlogic, Inc. All rights reserved
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/amlogic,s4-vdec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic Video Decode Accelerator
+
+maintainers:
+ - Zhentao Guo <zhentao.guo@amlogic.com>
+
+description:
+ The Video Decoder Accelerator present on Amlogic SOCs.
+ It supports stateless h264 decoding.
+
+properties:
+ compatible:
+ const: amlogic,s4-vdec
+
+ reg:
+ maxItems: 2
+
+ reg-names:
+ items:
+ - const: dos
+ - const: dmc
+
+ interrupts:
+ maxItems: 2
+
+ interrupt-names:
+ items:
+ - const: core_hvdec
+ - const: core_vdec
+
+ clocks:
+ items:
+ - description: Clock for dos core
+ - description: Clock for vdec core
+ - description: Clock for hvdec core
+
+ clock-names:
+ items:
+ - const: dos
+ - const: core_v
+ - const: core_h
+
+ power-domains:
+ maxItems: 2
+
+ power-domain-names:
+ items:
+ - const: dos_v
+ - const: dos_h
+
+ resets:
+ maxItems: 1
+
+ amlogic,canvas:
+ description: Canvas maintains an index-to-physical-address
+ mapping table that allows the 16-bit AMRISC decoder core
+ to access 32-bit or 64-bit physical address.
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+ amlogic,secure-monitor:
+ description: Used to decrypt and load the signed decoder
+ firmware through ARM SMC (Secure Monitor Call).
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - interrupts
+ - clocks
+ - clock-names
+ - power-domains
+ - power-domain-names
+ - resets
+ - amlogic,canvas
+ - amlogic,secure-monitor
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/clock/amlogic,s4-pll-clkc.h>
+ #include <dt-bindings/clock/amlogic,s4-peripherals-clkc.h>
+ #include <dt-bindings/power/meson-s4-power.h>
+ #include <dt-bindings/reset/amlogic,meson-s4-reset.h>
+ video-codec@fe320000 {
+ compatible = "amlogic,s4-vdec";
+ reg = <0xfe320000 0x10000>,
+ <0xfe036000 0x20>;
+ reg-names = "dos",
+ "dmc";
+ interrupts = <GIC_SPI 91 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 92 IRQ_TYPE_EDGE_RISING>;
+ clocks = <&clkc_periphs CLKID_DOS>,
+ <&clkc_periphs CLKID_VDEC_SEL>,
+ <&clkc_periphs CLKID_HEVCF_SEL>;
+ clock-names = "dos",
+ "core_v",
+ "core_h";
+ power-domains = <&pwrc PWRC_S4_DOS_VDEC_ID>,
+ <&pwrc PWRC_S4_DOS_HEVC_ID>;
+ power-domain-names = "dos_v",
+ "dos_h";
+ resets = <&reset RESET_DOS>;
+ amlogic,canvas = <&canvas>;
+ amlogic,secure-monitor = <&sm>;
+ };
--
2.42.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v9 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder
2026-09-14 8:10 ` [PATCH v9 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder Zhentao Guo via B4 Relay
@ 2026-09-16 9:01 ` Krzysztof Kozlowski
2026-09-17 3:07 ` Zhentao Guo
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-16 9:01 UTC (permalink / raw)
To: Zhentao Guo
Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-arm-kernel, linux-amlogic, linux-kernel,
linux-media, devicetree
On Mon, Sep 14, 2026 at 04:10:20PM +0800, Zhentao Guo wrote:
> Describe the initial support for the V4L2 stateless video decoder
> driver used with the Amlogic S4 (S805X2) platform.
Drop driver. Describe the hardware instead.
>
> Signed-off-by: Zhentao Guo <zhentao.guo@amlogic.com>
> ---
> .../devicetree/bindings/media/amlogic,s4-vdec.yaml | 114 +++++++++++++++++++++
> 1 file changed, 114 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml b/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml
> new file mode 100644
> index 000000000000..d350b3e68a38
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml
> @@ -0,0 +1,114 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +# Copyright (C) 2025 Amlogic, Inc. All rights reserved
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/amlogic,s4-vdec.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Amlogic Video Decode Accelerator
> +
> +maintainers:
> + - Zhentao Guo <zhentao.guo@amlogic.com>
> +
> +description:
> + The Video Decoder Accelerator present on Amlogic SOCs.
> + It supports stateless h264 decoding.
> +
> +properties:
> + compatible:
> + const: amlogic,s4-vdec
> +
> + reg:
> + maxItems: 2
> +
> + reg-names:
> + items:
> + - const: dos
> + - const: dmc
> +
> + interrupts:
> + maxItems: 2
> +
> + interrupt-names:
> + items:
> + - const: core_hvdec
> + - const: core_vdec
Drop "core_" from both... or rather some consistency would be more
useful. Below you call them core_v and core_h, but there is also:
> +
> + clocks:
> + items:
> + - description: Clock for dos core
core dos?
> + - description: Clock for vdec core
> + - description: Clock for hvdec core
> +
> + clock-names:
> + items:
> + - const: dos
> + - const: core_v
hvdec?
> + - const: core_h
vdec? to keep the naming and order of interrupts?
> +
> + power-domains:
> + maxItems: 2
> +
> + power-domain-names:
> + items:
> + - const: dos_v
> + - const: dos_h
So there is also dos variant v and h?
Pretty confusing.
> +
> + resets:
> + maxItems: 1
> +
> + amlogic,canvas:
> + description: Canvas maintains an index-to-physical-address
> + mapping table that allows the 16-bit AMRISC decoder core
> + to access 32-bit or 64-bit physical address.
> + $ref: /schemas/types.yaml#/definitions/phandle
> +
> + amlogic,secure-monitor:
> + description: Used to decrypt and load the signed decoder
> + firmware through ARM SMC (Secure Monitor Call).
> + $ref: /schemas/types.yaml#/definitions/phandle
> +
> +required:
> + - compatible
> + - reg
> + - reg-names
> + - interrupts
> + - clocks
> + - clock-names
> + - power-domains
> + - power-domain-names
> + - resets
> + - amlogic,canvas
> + - amlogic,secure-monitor
> +
> +additionalProperties: false
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v9 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder
2026-09-16 9:01 ` Krzysztof Kozlowski
@ 2026-09-17 3:07 ` Zhentao Guo
2026-09-17 6:02 ` Krzysztof Kozlowski
0 siblings, 1 reply; 10+ messages in thread
From: Zhentao Guo @ 2026-09-17 3:07 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-arm-kernel, linux-amlogic, linux-kernel,
linux-media, devicetree
Hi Krzysztof,
> On Mon, Sep 14, 2026 at 04:10:20PM +0800, Zhentao Guo wrote:
>> Describe the initial support for the V4L2 stateless video decoder
>> driver used with the Amlogic S4 (S805X2) platform.
> Drop driver. Describe the hardware instead.
OK,got it.
>> Signed-off-by: Zhentao Guo <zhentao.guo@amlogic.com>
>> ---
>> .../devicetree/bindings/media/amlogic,s4-vdec.yaml | 114 +++++++++++++++++++++
>> 1 file changed, 114 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml b/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml
>> new file mode 100644
>> index 000000000000..d350b3e68a38
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml
>> @@ -0,0 +1,114 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +# Copyright (C) 2025 Amlogic, Inc. All rights reserved
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/media/amlogic,s4-vdec.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Amlogic Video Decode Accelerator
>> +
>> +maintainers:
>> + - Zhentao Guo <zhentao.guo@amlogic.com>
>> +
>> +description:
>> + The Video Decoder Accelerator present on Amlogic SOCs.
>> + It supports stateless h264 decoding.
>> +
>> +properties:
>> + compatible:
>> + const: amlogic,s4-vdec
>> +
>> + reg:
>> + maxItems: 2
>> +
>> + reg-names:
>> + items:
>> + - const: dos
>> + - const: dmc
>> +
>> + interrupts:
>> + maxItems: 2
>> +
>> + interrupt-names:
>> + items:
>> + - const: core_hvdec
>> + - const: core_vdec
> Drop "core_" from both... or rather some consistency would be more
> useful. Below you call them core_v and core_h, but there is also:
>
>> +
>> + clocks:
>> + items:
>> + - description: Clock for dos core
> core dos?
To explain this, I would like to show you the structure diagram of the
Amlogic hardware decoder IP:
+-----------+------------------------+
| | |
| | vdec |
| | |
| dos +------------------------+
| | |
| | hvdec |
| | |
+-----------+------------------------+
The IP consists of three cores. Dos core is in the front of the IP,
which controls the rest two cores. The actual hardware decoding is
handled by the two cores vdec and hvdec.
Each of the three cores has its own independent clock source.
>> + - description: Clock for vdec core
>> + - description: Clock for hvdec core
>> +
>> + clock-names:
>> + items:
>> + - const: dos
>> + - const: core_v
> hvdec?
>
>> + - const: core_h
> vdec? to keep the naming and order of interrupts?
Actually, in the interrupt vector table they are arranged exactly this
way: hvdec comes first, followed by vdec. This is indeed the reverse of
the order used for clk and power-domain.
>> +
>> + power-domains:
>> + maxItems: 2
>> +
>> + power-domain-names:
>> + items:
>> + - const: dos_v
>> + - const: dos_h
> So there is also dos variant v and h?
>
> Pretty confusing.
That is indeed a bit odd, I'll give them new names.
Also, I'd like to ask your advice on these names. I remember that in
your review comments on v7, you mentioned that having "vdec" as the
module name and then reusing it for the clock/interrupt/power-domain
name felt repetitive. But as shown in the diagram above, the decoder
hardware does have a sub-core called vdec, so do you think it is
appropriate if I'm also using "vdec" to name its clock, power-domain,
and interrupt, to indicate that these all used by vdec core? I would be
grateful for your feedback on this.
>> +
>> + resets:
>> + maxItems: 1
>> +
>> + amlogic,canvas:
>> + description: Canvas maintains an index-to-physical-address
>> + mapping table that allows the 16-bit AMRISC decoder core
>> + to access 32-bit or 64-bit physical address.
>> + $ref: /schemas/types.yaml#/definitions/phandle
>> +
>> + amlogic,secure-monitor:
>> + description: Used to decrypt and load the signed decoder
>> + firmware through ARM SMC (Secure Monitor Call).
>> + $ref: /schemas/types.yaml#/definitions/phandle
>> +
>> +required:
>> + - compatible
>> + - reg
>> + - reg-names
>> + - interrupts
>> + - clocks
>> + - clock-names
>> + - power-domains
>> + - power-domain-names
>> + - resets
>> + - amlogic,canvas
>> + - amlogic,secure-monitor
>> +
>> +additionalProperties: false
> Best regards,
> Krzysztof
BRs
Zhentao
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v9 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder
2026-09-17 3:07 ` Zhentao Guo
@ 2026-09-17 6:02 ` Krzysztof Kozlowski
2026-09-17 6:07 ` Zhentao Guo
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-17 6:02 UTC (permalink / raw)
To: Zhentao Guo
Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-arm-kernel, linux-amlogic, linux-kernel,
linux-media, devicetree
On 17/09/2026 05:07, Zhentao Guo wrote:
> Hi Krzysztof,
>
>> On Mon, Sep 14, 2026 at 04:10:20PM +0800, Zhentao Guo wrote:
>>> Describe the initial support for the V4L2 stateless video decoder
>>> driver used with the Amlogic S4 (S805X2) platform.
>> Drop driver. Describe the hardware instead.
> OK,got it.
>>> Signed-off-by: Zhentao Guo <zhentao.guo@amlogic.com>
>>> ---
>>> .../devicetree/bindings/media/amlogic,s4-vdec.yaml | 114 +++++++++++++++++++++
>>> 1 file changed, 114 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml b/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml
>>> new file mode 100644
>>> index 000000000000..d350b3e68a38
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml
>>> @@ -0,0 +1,114 @@
>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>>> +# Copyright (C) 2025 Amlogic, Inc. All rights reserved
>>> +%YAML 1.2
>>> +---
>>> +$id: http://devicetree.org/schemas/media/amlogic,s4-vdec.yaml#
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: Amlogic Video Decode Accelerator
>>> +
>>> +maintainers:
>>> + - Zhentao Guo <zhentao.guo@amlogic.com>
>>> +
>>> +description:
>>> + The Video Decoder Accelerator present on Amlogic SOCs.
>>> + It supports stateless h264 decoding.
>>> +
>>> +properties:
>>> + compatible:
>>> + const: amlogic,s4-vdec
>>> +
>>> + reg:
>>> + maxItems: 2
>>> +
>>> + reg-names:
>>> + items:
>>> + - const: dos
>>> + - const: dmc
>>> +
>>> + interrupts:
>>> + maxItems: 2
>>> +
>>> + interrupt-names:
>>> + items:
>>> + - const: core_hvdec
>>> + - const: core_vdec
>> Drop "core_" from both... or rather some consistency would be more
>> useful. Below you call them core_v and core_h, but there is also:
>>
>>> +
>>> + clocks:
>>> + items:
>>> + - description: Clock for dos core
>> core dos?
>
> To explain this, I would like to show you the structure diagram of the
> Amlogic hardware decoder IP:
>
> +-----------+------------------------+
> | | |
> | | vdec |
> | | |
> | dos +------------------------+
> | | |
> | | hvdec |
> | | |
> +-----------+------------------------+
>
> The IP consists of three cores. Dos core is in the front of the IP,
> which controls the rest two cores. The actual hardware decoding is
> handled by the two cores vdec and hvdec.
>
> Each of the three cores has its own independent clock source.
So everything could be called consistently "dos", "vdec" and "hvdec" in
all properties (clocks, interrupts etC).
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v9 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder
2026-09-17 6:02 ` Krzysztof Kozlowski
@ 2026-09-17 6:07 ` Zhentao Guo
0 siblings, 0 replies; 10+ messages in thread
From: Zhentao Guo @ 2026-09-17 6:07 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-arm-kernel, linux-amlogic, linux-kernel,
linux-media, devicetree
> On 17/09/2026 05:07, Zhentao Guo wrote:
>> Hi Krzysztof,
>>
>>> On Mon, Sep 14, 2026 at 04:10:20PM +0800, Zhentao Guo wrote:
>>>> Describe the initial support for the V4L2 stateless video decoder
>>>> driver used with the Amlogic S4 (S805X2) platform.
>>> Drop driver. Describe the hardware instead.
>> OK,got it.
>>>> Signed-off-by: Zhentao Guo <zhentao.guo@amlogic.com>
>>>> ---
>>>> .../devicetree/bindings/media/amlogic,s4-vdec.yaml | 114 +++++++++++++++++++++
>>>> 1 file changed, 114 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml b/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml
>>>> new file mode 100644
>>>> index 000000000000..d350b3e68a38
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml
>>>> @@ -0,0 +1,114 @@
>>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>>>> +# Copyright (C) 2025 Amlogic, Inc. All rights reserved
>>>> +%YAML 1.2
>>>> +---
>>>> +$id: http://devicetree.org/schemas/media/amlogic,s4-vdec.yaml#
>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>>> +
>>>> +title: Amlogic Video Decode Accelerator
>>>> +
>>>> +maintainers:
>>>> + - Zhentao Guo <zhentao.guo@amlogic.com>
>>>> +
>>>> +description:
>>>> + The Video Decoder Accelerator present on Amlogic SOCs.
>>>> + It supports stateless h264 decoding.
>>>> +
>>>> +properties:
>>>> + compatible:
>>>> + const: amlogic,s4-vdec
>>>> +
>>>> + reg:
>>>> + maxItems: 2
>>>> +
>>>> + reg-names:
>>>> + items:
>>>> + - const: dos
>>>> + - const: dmc
>>>> +
>>>> + interrupts:
>>>> + maxItems: 2
>>>> +
>>>> + interrupt-names:
>>>> + items:
>>>> + - const: core_hvdec
>>>> + - const: core_vdec
>>> Drop "core_" from both... or rather some consistency would be more
>>> useful. Below you call them core_v and core_h, but there is also:
>>>
>>>> +
>>>> + clocks:
>>>> + items:
>>>> + - description: Clock for dos core
>>> core dos?
>> To explain this, I would like to show you the structure diagram of the
>> Amlogic hardware decoder IP:
>>
>> +-----------+------------------------+
>> | | |
>> | | vdec |
>> | | |
>> | dos +------------------------+
>> | | |
>> | | hvdec |
>> | | |
>> +-----------+------------------------+
>>
>> The IP consists of three cores. Dos core is in the front of the IP,
>> which controls the rest two cores. The actual hardware decoding is
>> handled by the two cores vdec and hvdec.
>>
>> Each of the three cores has its own independent clock source.
> So everything could be called consistently "dos", "vdec" and "hvdec" in
> all properties (clocks, interrupts etC).
Got it, thanks!
>
> Best regards,
> Krzysztof
BRs
Zhentao
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v9 5/6] arm64: dts: amlogic: Add video decoder driver support for S4 SOCs
2026-09-14 8:10 [PATCH v9 0/6] Add Amlogic stateless H.264 video decoder for S4 Zhentao Guo via B4 Relay
` (2 preceding siblings ...)
2026-09-14 8:10 ` [PATCH v9 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder Zhentao Guo via B4 Relay
@ 2026-09-14 8:10 ` Zhentao Guo via B4 Relay
2026-09-14 8:10 ` [PATCH v9 6/6] arm64: defconfig: Enable CONFIG_VIDEO_AMLOGIC_VDEC Zhentao Guo via B4 Relay
4 siblings, 0 replies; 10+ messages in thread
From: Zhentao Guo via B4 Relay @ 2026-09-14 8:10 UTC (permalink / raw)
To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-kernel, linux-amlogic, linux-kernel, linux-media,
devicetree, Zhentao Guo
From: Zhentao Guo <zhentao.guo@amlogic.com>
Add vdec node to enable Amlogic V4L2 stateless video decoder
support. Since the video fw needs to be loaded via TEE helpers,
enable the optee node in this patch.
Signed-off-by: Zhentao Guo <zhentao.guo@amlogic.com>
---
arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 33 +++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi
index 2a6fbd530836..d62e93a28098 100644
--- a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi
@@ -80,6 +80,11 @@ pwrc: power-controller {
#power-domain-cells = <1>;
};
};
+
+ optee {
+ compatible = "linaro,optee-tz";
+ method = "smc";
+ };
};
saradc: adc@fe026000 {
@@ -907,5 +912,33 @@ emmc: mmc@fe08c000 {
assigned-clocks = <&clkc_periphs CLKID_SD_EMMC_C>;
assigned-clock-rates = <24000000>;
};
+
+ canvas: video-lut@fe036048 {
+ compatible = "amlogic,canvas";
+ reg = <0x0 0xfe036048 0x0 0x14>;
+ };
+
+ video-codec@fe320000 {
+ compatible = "amlogic,s4-vdec";
+ reg = <0x0 0xfe320000 0x0 0x10000>,
+ <0x0 0xfe036000 0x0 0x20>;
+ reg-names = "dos",
+ "dmc";
+ interrupts = <GIC_SPI 91 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 92 IRQ_TYPE_EDGE_RISING>;
+ clocks = <&clkc_periphs CLKID_DOS>,
+ <&clkc_periphs CLKID_VDEC_SEL>,
+ <&clkc_periphs CLKID_HEVCF_SEL>;
+ clock-names = "dos",
+ "core_v",
+ "core_h";
+ power-domains = <&pwrc PWRC_S4_DOS_VDEC_ID>,
+ <&pwrc PWRC_S4_DOS_HEVC_ID>;
+ power-domain-names = "dos_v",
+ "dos_h";
+ resets = <&reset RESET_DOS>;
+ amlogic,canvas = <&canvas>;
+ amlogic,secure-monitor = <&sm>;
+ };
};
};
--
2.42.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v9 6/6] arm64: defconfig: Enable CONFIG_VIDEO_AMLOGIC_VDEC
2026-09-14 8:10 [PATCH v9 0/6] Add Amlogic stateless H.264 video decoder for S4 Zhentao Guo via B4 Relay
` (3 preceding siblings ...)
2026-09-14 8:10 ` [PATCH v9 5/6] arm64: dts: amlogic: Add video decoder driver support for S4 SOCs Zhentao Guo via B4 Relay
@ 2026-09-14 8:10 ` Zhentao Guo via B4 Relay
4 siblings, 0 replies; 10+ messages in thread
From: Zhentao Guo via B4 Relay @ 2026-09-14 8:10 UTC (permalink / raw)
To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-kernel, linux-amlogic, linux-kernel, linux-media,
devicetree, Zhentao Guo
From: Zhentao Guo <zhentao.guo@amlogic.com>
Enable the Amlogic V4L2 stateless video decoder driver as a module
in the arm64 defconfig to support stateless video decoder on Amlogic
SoCs. The driver is used by Amlogic S4 platform, such as S805X2
board.
Signed-off-by: Zhentao Guo <zhentao.guo@amlogic.com>
---
arch/arm64/configs/defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index f0947c8176a1..d29e7bf5769f 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -919,6 +919,7 @@ CONFIG_USB_VIDEO_CLASS=m
CONFIG_V4L_PLATFORM_DRIVERS=y
CONFIG_SDR_PLATFORM_DRIVERS=y
CONFIG_V4L_MEM2MEM_DRIVERS=y
+CONFIG_VIDEO_AMLOGIC_VDEC=m
CONFIG_VIDEO_AMPHION_VPU=m
CONFIG_VIDEO_CADENCE_CSI2RX=m
CONFIG_VIDEO_WAVE_VPU=m
--
2.42.0
^ permalink raw reply related [flat|nested] 10+ messages in thread