* [PATCH v7 1/6] firmware: meson: sm: video firmware loading via secure monitor
2026-08-12 2:41 [PATCH v7 0/6] Add Amlogic stateless H.264 video decoder for S4 Zhentao Guo via B4 Relay
@ 2026-08-12 2:41 ` Zhentao Guo via B4 Relay
2026-08-12 2:41 ` [PATCH v7 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-08-12 2:41 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 v7 2/6] firmware: meson: sm: Add video firmware loading SMC call
2026-08-12 2:41 [PATCH v7 0/6] Add Amlogic stateless H.264 video decoder for S4 Zhentao Guo via B4 Relay
2026-08-12 2:41 ` [PATCH v7 1/6] firmware: meson: sm: video firmware loading via secure monitor Zhentao Guo via B4 Relay
@ 2026-08-12 2:41 ` Zhentao Guo via B4 Relay
2026-08-12 2:41 ` [PATCH v7 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-08-12 2:41 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 v7 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder
2026-08-12 2:41 [PATCH v7 0/6] Add Amlogic stateless H.264 video decoder for S4 Zhentao Guo via B4 Relay
2026-08-12 2:41 ` [PATCH v7 1/6] firmware: meson: sm: video firmware loading via secure monitor Zhentao Guo via B4 Relay
2026-08-12 2:41 ` [PATCH v7 2/6] firmware: meson: sm: Add video firmware loading SMC call Zhentao Guo via B4 Relay
@ 2026-08-12 2:41 ` Zhentao Guo via B4 Relay
2026-08-13 7:01 ` Krzysztof Kozlowski
2026-08-12 2:41 ` [PATCH v7 5/6] arm64: dts: amlogic: Add video decoder driver support for S4 SOCs Zhentao Guo via B4 Relay
2026-08-12 2:41 ` [PATCH v7 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-08-12 2:41 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 | 111 +++++++++++++++++++++
1 file changed, 111 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..b5af3f931b26
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml
@@ -0,0 +1,111 @@
+# 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: hvdec
+ - const: vdec
+
+ clocks:
+ maxItems: 3
+
+ clock-names:
+ items:
+ - const: dos
+ - const: vdec
+ - const: hevcf
+
+ power-domains:
+ maxItems: 2
+
+ power-domain-names:
+ items:
+ - const: vdec
+ - const: hvdec
+
+ resets:
+ maxItems: 1
+
+ amlogic,canvas:
+ description: should point to a canvas provider node
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+ secure-monitor:
+ description: phandle to the secure-monitor node
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - interrupts
+ - interrupt-names
+ - clocks
+ - clock-names
+ - power-domains
+ - power-domain-names
+ - resets
+ - amlogic,canvas
+ - 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>;
+ interrupt-names = "hvdec",
+ "vdec";
+ clocks = <&clkc_periphs CLKID_DOS>,
+ <&clkc_periphs CLKID_VDEC_SEL>,
+ <&clkc_periphs CLKID_HEVCF_SEL>;
+ clock-names = "dos",
+ "vdec",
+ "hevcf";
+ 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>;
+ secure-monitor = <&sm>;
+ };
--
2.42.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v7 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder
2026-08-12 2:41 ` [PATCH v7 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder Zhentao Guo via B4 Relay
@ 2026-08-13 7:01 ` Krzysztof Kozlowski
2026-08-13 8:39 ` Zhentao Guo
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-13 7: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 Wed, Aug 12, 2026 at 10:41:25AM +0800, Zhentao Guo wrote:
> 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 | 111 +++++++++++++++++++++
> 1 file changed, 111 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..b5af3f931b26
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml
> @@ -0,0 +1,111 @@
> +# 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: hvdec
> + - const: vdec
vdec is the name of the module, so not really useful name.
> +
> + clocks:
> + maxItems: 3
> +
> + clock-names:
> + items:
> + - const: dos
> + - const: vdec
Same here
> + - const: hevcf
> +
> + power-domains:
> + maxItems: 2
> +
> + power-domain-names:
> + items:
> + - const: vdec
> + - const: hvdec
Same here.
> +
> + resets:
> + maxItems: 1
> +
> + amlogic,canvas:
> + description: should point to a canvas provider node
You basically duplicate the property name. Say something useful, what is
it used for?
> + $ref: /schemas/types.yaml#/definitions/phandle
> +
> + secure-monitor:
> + description: phandle to the secure-monitor node
Can a property whose type is a phandle and is called "secure-monitor" be
not "phandle to the secure-monitor node"?
Write useful code, not redundant.
Anyway, missing vendor prefix as it is not a generic property (otherwise
point me to generic schema defining it).
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v7 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder
2026-08-13 7:01 ` Krzysztof Kozlowski
@ 2026-08-13 8:39 ` Zhentao Guo
2026-08-13 9:22 ` Krzysztof Kozlowski
0 siblings, 1 reply; 10+ messages in thread
From: Zhentao Guo @ 2026-08-13 8:39 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 Wed, Aug 12, 2026 at 10:41:25AM +0800, Zhentao Guo wrote:
>> 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 | 111 +++++++++++++++++++++
>> 1 file changed, 111 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..b5af3f931b26
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml
>> @@ -0,0 +1,111 @@
>> +# 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: hvdec
>> + - const: vdec
> vdec is the name of the module, so not really useful name.
Ok, I'll come up with a new name and change it in the next revision.
>> +
>> + clocks:
>> + maxItems: 3
>> +
>> + clock-names:
>> + items:
>> + - const: dos
>> + - const: vdec
> Same here
OK, but there would be a nit. In file
drivers/soc/amlogic/meson-clk-measure.c, This clock source is also named
*"vdec"*in|drivers/soc/amlogic/meson-clk-measure.c|, where a
*"vdec"*clock node is created in debugfs for checking its status. Using
a different name in the driver (including DT and binding) would make it
inconsistent with the debugfs node naming.
>> + - const: hevcf
>> +
>> + power-domains:
>> + maxItems: 2
>> +
>> + power-domain-names:
>> + items:
>> + - const: vdec
>> + - const: hvdec
> Same here.
Ok, I'll rename this.
>> +
>> + resets:
>> + maxItems: 1
>> +
>> + amlogic,canvas:
>> + description: should point to a canvas provider node
> You basically duplicate the property name. Say something useful, what is
> it used for?
I'll update the description to explain its usage in the next version.
>
>> + $ref: /schemas/types.yaml#/definitions/phandle
>> +
>> + secure-monitor:
>> + description: phandle to the secure-monitor node
> Can a property whose type is a phandle and is called "secure-monitor" be
> not "phandle to the secure-monitor node"?
>
> Write useful code, not redundant.
Okay, I'll explain it more detailed.
> Anyway, missing vendor prefix as it is not a generic property (otherwise
> point me to generic schema defining it).
I checked the upstream code, this is not a generic property. I'll add
the prefix.
>
> Best regards,
> Krzysztof
BRs
Zhentao
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v7 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder
2026-08-13 8:39 ` Zhentao Guo
@ 2026-08-13 9:22 ` Krzysztof Kozlowski
2026-08-13 9:39 ` Zhentao Guo
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-13 9:22 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 13/08/2026 10:39, Zhentao Guo wrote:
> Hi Krzysztof
>
>> On Wed, Aug 12, 2026 at 10:41:25AM +0800, Zhentao Guo wrote:
>>> 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 | 111 +++++++++++++++++++++
>>> 1 file changed, 111 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..b5af3f931b26
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml
>>> @@ -0,0 +1,111 @@
>>> +# 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: hvdec
>>> + - const: vdec
>> vdec is the name of the module, so not really useful name.
> Ok, I'll come up with a new name and change it in the next revision.
>>> +
>>> + clocks:
>>> + maxItems: 3
>>> +
>>> + clock-names:
>>> + items:
>>> + - const: dos
>>> + - const: vdec
>> Same here
> OK, but there would be a nit. In file
> drivers/soc/amlogic/meson-clk-measure.c, This clock source is also named
> *"vdec"*in|drivers/soc/amlogic/meson-clk-measure.c|, where a
Source does not matter. You do not describe here the source, but this
device. How is the input called in this device, not in the source?
> *"vdec"*clock node is created in debugfs for checking its status. Using
> a different name in the driver (including DT and binding) would make it
> inconsistent with the debugfs node naming.
What inconsistency? How would provider name matter?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v7 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder
2026-08-13 9:22 ` Krzysztof Kozlowski
@ 2026-08-13 9:39 ` Zhentao Guo
0 siblings, 0 replies; 10+ messages in thread
From: Zhentao Guo @ 2026-08-13 9:39 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
在 2026/8/13 17:22, Krzysztof Kozlowski 写道:
> [ EXTERNAL EMAIL ]
>
> On 13/08/2026 10:39, Zhentao Guo wrote:
>> Hi Krzysztof
>>
>>> On Wed, Aug 12, 2026 at 10:41:25AM +0800, Zhentao Guo wrote:
>>>> 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 | 111 +++++++++++++++++++++
>>>> 1 file changed, 111 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..b5af3f931b26
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml
>>>> @@ -0,0 +1,111 @@
>>>> +# 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: hvdec
>>>> + - const: vdec
>>> vdec is the name of the module, so not really useful name.
>> Ok, I'll come up with a new name and change it in the next revision.
>>>> +
>>>> + clocks:
>>>> + maxItems: 3
>>>> +
>>>> + clock-names:
>>>> + items:
>>>> + - const: dos
>>>> + - const: vdec
>>> Same here
>> OK, but there would be a nit. In file
>> drivers/soc/amlogic/meson-clk-measure.c, This clock source is also named
>> *"vdec"*in|drivers/soc/amlogic/meson-clk-measure.c|, where a
> Source does not matter. You do not describe here the source, but this
> device. How is the input called in this device, not in the source?
Yes, I get what you mean.
>> *"vdec"*clock node is created in debugfs for checking its status. Using
>> a different name in the driver (including DT and binding) would make it
>> inconsistent with the debugfs node naming.
> What inconsistency? How would provider name matter?
This isn't actually a provider name either, it merely defines a debug
node and names it "vdec". I dose not matter, I'll rename the clock in
the device.
>
> Best regards,
> Krzysztof
BRs
Zhentao
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v7 5/6] arm64: dts: amlogic: Add video decoder driver support for S4 SOCs
2026-08-12 2:41 [PATCH v7 0/6] Add Amlogic stateless H.264 video decoder for S4 Zhentao Guo via B4 Relay
` (2 preceding siblings ...)
2026-08-12 2:41 ` [PATCH v7 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder Zhentao Guo via B4 Relay
@ 2026-08-12 2:41 ` Zhentao Guo via B4 Relay
2026-08-12 2:41 ` [PATCH v7 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-08-12 2:41 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 | 35 +++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi
index 2a6fbd530836..2262bc198de3 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,35 @@ 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>;
+ interrupt-names = "hvdec",
+ "vdec";
+ clocks = <&clkc_periphs CLKID_DOS>,
+ <&clkc_periphs CLKID_VDEC_SEL>,
+ <&clkc_periphs CLKID_HEVCF_SEL>;
+ clock-names = "dos",
+ "vdec",
+ "hevcf";
+ 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>;
+ secure-monitor = <&sm>;
+ };
};
};
--
2.42.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v7 6/6] arm64: defconfig: Enable CONFIG_VIDEO_AMLOGIC_VDEC
2026-08-12 2:41 [PATCH v7 0/6] Add Amlogic stateless H.264 video decoder for S4 Zhentao Guo via B4 Relay
` (3 preceding siblings ...)
2026-08-12 2:41 ` [PATCH v7 5/6] arm64: dts: amlogic: Add video decoder driver support for S4 SOCs Zhentao Guo via B4 Relay
@ 2026-08-12 2:41 ` Zhentao Guo via B4 Relay
4 siblings, 0 replies; 10+ messages in thread
From: Zhentao Guo via B4 Relay @ 2026-08-12 2:41 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 6ec8d3a69c98..7be4e5a284ba 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -919,6 +919,7 @@ CONFIG_V4L_PLATFORM_DRIVERS=y
CONFIG_SDR_PLATFORM_DRIVERS=y
CONFIG_V4L_MEM2MEM_DRIVERS=y
CONFIG_VIDEO_AMPHION_VPU=m
+CONFIG_VIDEO_AMLOGIC_VDEC=m
CONFIG_VIDEO_CADENCE_CSI2RX=m
CONFIG_VIDEO_WAVE_VPU=m
CONFIG_VIDEO_E5010_JPEG_ENC=m
--
2.42.0
^ permalink raw reply related [flat|nested] 10+ messages in thread