* [PATCH v10 1/6] firmware: meson: sm: video firmware loading via secure monitor
2026-09-24 7:55 [PATCH v10 0/6] Add Amlogic stateless H.264 video decoder for S4 Zhentao Guo via B4 Relay
@ 2026-09-24 7:55 ` Zhentao Guo via B4 Relay
2026-09-24 7:55 ` [PATCH v10 2/6] firmware: meson: sm: Add video firmware loading SMC call Zhentao Guo via B4 Relay
` (3 subsequent siblings)
4 siblings, 0 replies; 16+ messages in thread
From: Zhentao Guo via B4 Relay @ 2026-09-24 7:55 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] 16+ messages in thread* [PATCH v10 2/6] firmware: meson: sm: Add video firmware loading SMC call
2026-09-24 7:55 [PATCH v10 0/6] Add Amlogic stateless H.264 video decoder for S4 Zhentao Guo via B4 Relay
2026-09-24 7:55 ` [PATCH v10 1/6] firmware: meson: sm: video firmware loading via secure monitor Zhentao Guo via B4 Relay
@ 2026-09-24 7:55 ` Zhentao Guo via B4 Relay
2026-09-24 7:55 ` [PATCH v10 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder Zhentao Guo via B4 Relay
` (2 subsequent siblings)
4 siblings, 0 replies; 16+ messages in thread
From: Zhentao Guo via B4 Relay @ 2026-09-24 7:55 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] 16+ messages in thread* [PATCH v10 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder
2026-09-24 7:55 [PATCH v10 0/6] Add Amlogic stateless H.264 video decoder for S4 Zhentao Guo via B4 Relay
2026-09-24 7:55 ` [PATCH v10 1/6] firmware: meson: sm: video firmware loading via secure monitor Zhentao Guo via B4 Relay
2026-09-24 7:55 ` [PATCH v10 2/6] firmware: meson: sm: Add video firmware loading SMC call Zhentao Guo via B4 Relay
@ 2026-09-24 7:55 ` Zhentao Guo via B4 Relay
2026-09-28 10:58 ` Krzysztof Kozlowski
2026-09-24 7:55 ` [PATCH v10 5/6] arm64: dts: amlogic: Add video decoder driver support for S4 SOCs Zhentao Guo via B4 Relay
2026-09-24 7:55 ` [PATCH v10 6/6] arm64: defconfig: Enable CONFIG_VIDEO_AMLOGIC_VDEC Zhentao Guo via B4 Relay
4 siblings, 1 reply; 16+ messages in thread
From: Zhentao Guo via B4 Relay @ 2026-09-24 7:55 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 bindings for Amlogic hardware decoder accelerator.
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..751043c3d9cc
--- /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:
+ minItems: 2
+
+ reg-names:
+ items:
+ - const: dos
+ - const: dmc
+
+ interrupts:
+ minItems: 2
+
+ interrupt-names:
+ items:
+ - const: hvdec
+ - const: vdec
+
+ clocks:
+ items:
+ - description: Clock for dos core
+ - description: Clock for vdec core
+ - description: Clock for hvdec core
+
+ clock-names:
+ items:
+ - const: dos
+ - const: vdec
+ - const: hvdec
+
+ power-domains:
+ minItems: 2
+
+ power-domain-names:
+ items:
+ - const: vdec
+ - const: hvdec
+
+ 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",
+ "vdec",
+ "hvdec";
+ power-domains = <&pwrc PWRC_S4_DOS_VDEC_ID>,
+ <&pwrc PWRC_S4_DOS_HEVC_ID>;
+ power-domain-names = "vdec",
+ "hvdec";
+ resets = <&reset RESET_DOS>;
+ amlogic,canvas = <&canvas>;
+ amlogic,secure-monitor = <&sm>;
+ };
--
2.42.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH v10 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder
2026-09-24 7:55 ` [PATCH v10 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder Zhentao Guo via B4 Relay
@ 2026-09-28 10:58 ` Krzysztof Kozlowski
2026-09-29 2:59 ` Zhentao Guo
0 siblings, 1 reply; 16+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-28 10:58 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 Thu, Sep 24, 2026 at 03:55:10PM +0800, Zhentao Guo wrote:
> Add bindings for Amlogic hardware decoder accelerator.
>
> 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..751043c3d9cc
> --- /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:
> + minItems: 2
What is happening here? Previous version was different.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v10 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder
2026-09-28 10:58 ` Krzysztof Kozlowski
@ 2026-09-29 2:59 ` Zhentao Guo
2026-09-29 5:40 ` Krzysztof Kozlowski
0 siblings, 1 reply; 16+ messages in thread
From: Zhentao Guo @ 2026-09-29 2:59 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 Thu, Sep 24, 2026 at 03:55:10PM +0800, Zhentao Guo wrote:
>> Add bindings for Amlogic hardware decoder accelerator.
>>
>> 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..751043c3d9cc
>> --- /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:
>> + minItems: 2
> What is happening here? Previous version was different.
maxItems: 2 implies that a single items is also allowed,but the hardware actually requires at least two register regions (dos
and dmc) to work, so minItems:2 makes sense here.
The same applies to |power-domain| and |interrupts| below. At least 2
power-domains to make the hardware work, and at least 2 interrupts
needed for the two sub-cores.
>
> Best regards,
> Krzysztof
Best regards,
Zhentao
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v10 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder
2026-09-29 2:59 ` Zhentao Guo
@ 2026-09-29 5:40 ` Krzysztof Kozlowski
2026-09-29 5:57 ` Zhentao Guo
0 siblings, 1 reply; 16+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-29 5:40 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 29/09/2026 04:59, Zhentao Guo wrote:
> Hi Krzysztof,
>
>> On Thu, Sep 24, 2026 at 03:55:10PM +0800, Zhentao Guo wrote:
>>> Add bindings for Amlogic hardware decoder accelerator.
>>>
>>> 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..751043c3d9cc
>>> --- /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:
>>> + minItems: 2
>> What is happening here? Previous version was different.
>
> maxItems: 2 implies that a single items is also allowed,but the hardware actually requires at least two register regions (dos
Since when?
> and dmc) to work, so minItems:2 makes sense here.
>
> The same applies to |power-domain| and |interrupts| below. At least 2
> power-domains to make the hardware work, and at least 2 interrupts
> needed for the two sub-cores.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v10 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder
2026-09-29 5:40 ` Krzysztof Kozlowski
@ 2026-09-29 5:57 ` Zhentao Guo
2026-09-29 6:00 ` Krzysztof Kozlowski
0 siblings, 1 reply; 16+ messages in thread
From: Zhentao Guo @ 2026-09-29 5:57 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 29/09/2026 04:59, Zhentao Guo wrote:
>> Hi Krzysztof,
>>
>>> On Thu, Sep 24, 2026 at 03:55:10PM +0800, Zhentao Guo wrote:
>>>> Add bindings for Amlogic hardware decoder accelerator.
>>>>
>>>> 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..751043c3d9cc
>>>> --- /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:
>>>> + minItems: 2
>>> What is happening here? Previous version was different.
>> maxItems: 2 implies that a single items is also allowed,but the hardware actually requires at least two register regions (dos
> Since when?
It should have been minItems:2 ever since v1,I must admit that this is a
long-standing mistake.
>> and dmc) to work, so minItems:2 makes sense here.
>>
>> The same applies to |power-domain| and |interrupts| below. At least 2
>> power-domains to make the hardware work, and at least 2 interrupts
>> needed for the two sub-cores.
>
> Best regards,
> Krzysztof
Best regards,
Zhentao
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v10 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder
2026-09-29 5:57 ` Zhentao Guo
@ 2026-09-29 6:00 ` Krzysztof Kozlowski
2026-09-29 6:23 ` Zhentao Guo
0 siblings, 1 reply; 16+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-29 6:00 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 29/09/2026 07:57, Zhentao Guo wrote:
> Hi Krzysztof,
>> On 29/09/2026 04:59, Zhentao Guo wrote:
>>> Hi Krzysztof,
>>>
>>>> On Thu, Sep 24, 2026 at 03:55:10PM +0800, Zhentao Guo wrote:
>>>>> Add bindings for Amlogic hardware decoder accelerator.
>>>>>
>>>>> 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..751043c3d9cc
>>>>> --- /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:
>>>>> + minItems: 2
>>>> What is happening here? Previous version was different.
>>> maxItems: 2 implies that a single items is also allowed,but the hardware actually requires at least two register regions (dos
>> Since when?
> It should have been minItems:2 ever since v1,I must admit that this is a
> long-standing mistake.
No. Since when 1 item is allowed?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v10 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder
2026-09-29 6:00 ` Krzysztof Kozlowski
@ 2026-09-29 6:23 ` Zhentao Guo
2026-09-29 6:36 ` Krzysztof Kozlowski
0 siblings, 1 reply; 16+ messages in thread
From: Zhentao Guo @ 2026-09-29 6:23 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 29/09/2026 07:57, Zhentao Guo wrote:
>> Hi Krzysztof,
>>> On 29/09/2026 04:59, Zhentao Guo wrote:
>>>> Hi Krzysztof,
>>>>
>>>>> On Thu, Sep 24, 2026 at 03:55:10PM +0800, Zhentao Guo wrote:
>>>>>> Add bindings for Amlogic hardware decoder accelerator.
>>>>>>
>>>>>> 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..751043c3d9cc
>>>>>> --- /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:
>>>>>> + minItems: 2
>>>>> What is happening here? Previous version was different.
>>>> maxItems: 2 implies that a single items is also allowed,but the hardware actually requires at least two register regions (dos
>>> Since when?
>> It should have been minItems:2 ever since v1,I must admit that this is a
>> long-standing mistake.
> No. Since when 1 item is allowed?
A single item was never allowed. The hardware has always required both
the dos and dmc register regions to work (the same applies to the
power-domain and interrupts) . In the previous version of this patch,
allowing one entry was simply a mistake, not an option we ever supported.
No existing device tree relies on having only a single entry either.
> Best regards,
> Krzysztof
Best regards,
Zhentao
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v10 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder
2026-09-29 6:23 ` Zhentao Guo
@ 2026-09-29 6:36 ` Krzysztof Kozlowski
2026-09-29 8:21 ` Zhentao Guo
0 siblings, 1 reply; 16+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-29 6:36 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 29/09/2026 08:23, Zhentao Guo wrote:
>
> In the previous version of this patch,
> allowing one entry was simply a mistake, not an option we ever supported.
I do not think it is true, please test it.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v10 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder
2026-09-29 6:36 ` Krzysztof Kozlowski
@ 2026-09-29 8:21 ` Zhentao Guo
2026-09-29 8:25 ` Krzysztof Kozlowski
0 siblings, 1 reply; 16+ messages in thread
From: Zhentao Guo @ 2026-09-29 8:21 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 29/09/2026 08:23, Zhentao Guo wrote:
>> In the previous version of this patch,
>> allowing one entry was simply a mistake, not an option we ever supported.
> I do not think it is true, please test it.
I re-ran the dt_binding_check against the new schema and a full
dtbs_check, the binding validates, its example compiles and passes, no
failures found.
If there is any additional testing you would recommend, I would be glad
to run it.Or do you have any remaining concerns about the change? I'm
happy to clarify anything that is still unclear.
> Best regards,
> Krzysztof
Best regards,
Zhentao
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v10 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder
2026-09-29 8:21 ` Zhentao Guo
@ 2026-09-29 8:25 ` Krzysztof Kozlowski
2026-09-29 9:41 ` Zhentao Guo
0 siblings, 1 reply; 16+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-29 8:25 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 29/09/2026 10:21, Zhentao Guo wrote:
> Hi Krzysztof,
>
>> On 29/09/2026 08:23, Zhentao Guo wrote:
>>> In the previous version of this patch,
>>> allowing one entry was simply a mistake, not an option we ever supported.
>> I do not think it is true, please test it.
>
> I re-ran the dt_binding_check against the new schema and a full
> dtbs_check, the binding validates, its example compiles and passes, no
> failures found.
>
> If there is any additional testing you would recommend, I would be glad
> to run it.Or do you have any remaining concerns about the change? I'm
> happy to clarify anything that is still unclear.
So please kindly provide a proof that one entry was before allowed, how
you claim. Remember, we speak ABOUT ONLY one thing - the quote I started
with.
> maxItems: 2 implies that a single items is also allowed,
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v10 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder
2026-09-29 8:25 ` Krzysztof Kozlowski
@ 2026-09-29 9:41 ` Zhentao Guo
0 siblings, 0 replies; 16+ messages in thread
From: Zhentao Guo @ 2026-09-29 9:41 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 29/09/2026 10:21, Zhentao Guo wrote:
>> Hi Krzysztof,
>>
>>> On 29/09/2026 08:23, Zhentao Guo wrote:
>>>> In the previous version of this patch,
>>>> allowing one entry was simply a mistake, not an option we ever supported.
>>> I do not think it is true, please test it.
>> I re-ran the dt_binding_check against the new schema and a full
>> dtbs_check, the binding validates, its example compiles and passes, no
>> failures found.
>>
>> If there is any additional testing you would recommend, I would be glad
>> to run it.Or do you have any remaining concerns about the change? I'm
>> happy to clarify anything that is still unclear.
> So please kindly provide a proof that one entry was before allowed, how
> you claim. Remember, we speak ABOUT ONLY one thing - the quote I started
> with.
Sorry for missing your point eariler.I tested it:
With the previous version (|reg: maxItems: 2 |plus the 2-entry
|reg-names |items list), a DTS with a single |reg |entry is rejected by
dt_binding_check ("reg: ... is too short").
Let me clarify what I originally meant by "maxItems: 2 implies that a
single item is also allowed" — my point was about readability, not about
dtschema's actual validation behavior. I should have phrased it better.
Just to make sure if my understanding is right: the two items already
listed in each |"*-names"|array imply an effective minimum of 2 for the
properties (including regs, interrupts, power-domains), so I still need
to specify the maxItems for them? I would greatly appreciate your
correction if I have misunderstood this.
>> maxItems: 2 implies that a single items is also allowed,
>
> Best regards,
> Krzysztof
Best regards,
Zhentao
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v10 5/6] arm64: dts: amlogic: Add video decoder driver support for S4 SOCs
2026-09-24 7:55 [PATCH v10 0/6] Add Amlogic stateless H.264 video decoder for S4 Zhentao Guo via B4 Relay
` (2 preceding siblings ...)
2026-09-24 7:55 ` [PATCH v10 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder Zhentao Guo via B4 Relay
@ 2026-09-24 7:55 ` Zhentao Guo via B4 Relay
2026-09-24 7:55 ` [PATCH v10 6/6] arm64: defconfig: Enable CONFIG_VIDEO_AMLOGIC_VDEC Zhentao Guo via B4 Relay
4 siblings, 0 replies; 16+ messages in thread
From: Zhentao Guo via B4 Relay @ 2026-09-24 7:55 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..7a1dcb3951c8 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",
+ "vdec",
+ "hvdec";
+ power-domains = <&pwrc PWRC_S4_DOS_VDEC_ID>,
+ <&pwrc PWRC_S4_DOS_HEVC_ID>;
+ power-domain-names = "vdec",
+ "hvdec";
+ resets = <&reset RESET_DOS>;
+ amlogic,canvas = <&canvas>;
+ amlogic,secure-monitor = <&sm>;
+ };
};
};
--
2.42.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH v10 6/6] arm64: defconfig: Enable CONFIG_VIDEO_AMLOGIC_VDEC
2026-09-24 7:55 [PATCH v10 0/6] Add Amlogic stateless H.264 video decoder for S4 Zhentao Guo via B4 Relay
` (3 preceding siblings ...)
2026-09-24 7:55 ` [PATCH v10 5/6] arm64: dts: amlogic: Add video decoder driver support for S4 SOCs Zhentao Guo via B4 Relay
@ 2026-09-24 7:55 ` Zhentao Guo via B4 Relay
4 siblings, 0 replies; 16+ messages in thread
From: Zhentao Guo via B4 Relay @ 2026-09-24 7:55 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] 16+ messages in thread