2024-02-20 19:14:59

by Brandon Brnich

[permalink] [raw]
Subject: [PATCH v5 0/4] Add Support for Wave5 on TI Devices

This series is responsible for adding support for Wave5 driver[0]
across numerous TI K3 platforms.

[0]: https://lore.kernel.org/all/[email protected]/

Changes since v4:
=================
* Remove clock-names from device tree nodes per Vignesh's request
- "vcodec" clock-name is defined as macro in driver, but unused
- no purpose to have it in dt node

Changes since v3:
=================

* Address Andrew's comments
- remove disabled by default on all platforms
- reorder addresses in 84s4 to be correctly sorted

Changes since v2:
=================

* Remove reference to k3 as requested
* Rebase on v6.8-rc2 where new bindings are present
* Remove am62a dts entry until hrtimer[1] patch gets merged

[1]: https://patchwork.kernel.org/project/linux-media/patch/[email protected]/

Changes since v1:
=================

* Remove sram parameters
- sram-size property not included in bindings. Without this, size
will default to 0 so no point in specifying until binding is added.
* Remove global CMA pools for each platform
- This is something that has been added in TI backport of driver
and does not yet have reliable support in upstream version.
- Removing for now with intention to add back once 48-bit
addressing is supported in upstream Wave5 driver.

Brandon Brnich (3):
arm64: dts: ti: k3-j784s4: Add Wave5 Video Encoder/Decoder Node
arm64: dts: ti: k3-am62p: Add Wave5 Video Encoder/Decoder Node
arm64: defconfig: Enable Wave5 Video Encoder/Decoder

Darren Etheridge (1):
arm64: dts: ti: k3-j721s2-main: Add Wave5 Video Encoder/Decoder Node

arch/arm64/boot/dts/ti/k3-am62p-main.dtsi | 8 ++++++++
arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 8 ++++++++
arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi | 16 ++++++++++++++++
arch/arm64/boot/dts/ti/k3-j784s4.dtsi | 2 ++
arch/arm64/configs/defconfig | 1 +
5 files changed, 35 insertions(+)

--
2.34.1



2024-02-20 19:15:53

by Brandon Brnich

[permalink] [raw]
Subject: [PATCH v5 1/4] arm64: dts: ti: k3-j784s4: Add Wave5 Video Encoder/Decoder Node

This patch adds support for the Wave521cl on the J784S4-evm.

Signed-off-by: Brandon Brnich <[email protected]>
---
arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi | 16 ++++++++++++++++
arch/arm64/boot/dts/ti/k3-j784s4.dtsi | 2 ++
2 files changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
index f2b720ed1e4f..40dd2e8a9f98 100644
--- a/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
@@ -662,6 +662,22 @@ main_i2c6: i2c@2060000 {
status = "disabled";
};

+ vpu0: video-codec@4210000 {
+ compatible = "ti,j721s2-wave521c", "cnm,wave521c";
+ reg = <0x00 0x4210000 0x00 0x10000>;
+ interrupts = <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&k3_clks 241 2>;
+ power-domains = <&k3_pds 241 TI_SCI_PD_EXCLUSIVE>;
+ };
+
+ vpu1: video-codec@4220000 {
+ compatible = "ti,j721s2-wave521c", "cnm,wave521c";
+ reg = <0x00 0x4220000 0x00 0x10000>;
+ interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&k3_clks 242 2>;
+ power-domains = <&k3_pds 242 TI_SCI_PD_EXCLUSIVE>;
+ };
+
main_sdhci0: mmc@4f80000 {
compatible = "ti,j721e-sdhci-8bit";
reg = <0x00 0x04f80000 0x00 0x1000>,
diff --git a/arch/arm64/boot/dts/ti/k3-j784s4.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4.dtsi
index 4398c3a463e1..2f633721a0c6 100644
--- a/arch/arm64/boot/dts/ti/k3-j784s4.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j784s4.dtsi
@@ -235,6 +235,8 @@ cbass_main: bus@100000 {
ranges = <0x00 0x00100000 0x00 0x00100000 0x00 0x00020000>, /* ctrl mmr */
<0x00 0x00600000 0x00 0x00600000 0x00 0x00031100>, /* GPIO */
<0x00 0x01000000 0x00 0x01000000 0x00 0x0d000000>, /* Most peripherals */
+ <0x00 0x04210000 0x00 0x04210000 0x00 0x00010000>, /* VPU0 */
+ <0x00 0x04220000 0x00 0x04220000 0x00 0x00010000>, /* VPU1 */
<0x00 0x0d000000 0x00 0x0d000000 0x00 0x01000000>, /* PCIe Core*/
<0x00 0x10000000 0x00 0x10000000 0x00 0x08000000>, /* PCIe0 DAT0 */
<0x00 0x18000000 0x00 0x18000000 0x00 0x08000000>, /* PCIe1 DAT0 */
--
2.34.1


2024-02-20 19:16:38

by Brandon Brnich

[permalink] [raw]
Subject: [PATCH v5 4/4] arm64: defconfig: Enable Wave5 Video Encoder/Decoder

Enable Wave521c video decoder/encoder driver on all TI K3 platforms that
contain the IP.

Signed-off-by: Brandon Brnich <[email protected]>
---
arch/arm64/configs/defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index e6cf3e5d63c3..6fe4f2da4aca 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -795,6 +795,7 @@ CONFIG_V4L_MEM2MEM_DRIVERS=y
CONFIG_VIDEO_CADENCE_CSI2RX=m
CONFIG_VIDEO_MEDIATEK_JPEG=m
CONFIG_VIDEO_MEDIATEK_VCODEC=m
+CONFIG_VIDEO_WAVE_VPU=m
CONFIG_VIDEO_IMX7_CSI=m
CONFIG_VIDEO_IMX_MIPI_CSIS=m
CONFIG_VIDEO_IMX8_ISI=m
--
2.34.1


2024-02-20 19:20:14

by Brandon Brnich

[permalink] [raw]
Subject: [PATCH v5 2/4] arm64: dts: ti: k3-j721s2-main: Add Wave5 Video Encoder/Decoder Node

From: Darren Etheridge <[email protected]>

Add the Chips and Media wave521cl video decoder/encoder node on J721S2.

Signed-off-by: Darren Etheridge <[email protected]>
Signed-off-by: Brandon Brnich <[email protected]>
---
arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
index ea7f2b2ab165..d1e5cb26f317 100644
--- a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
@@ -716,6 +716,14 @@ main_i2c6: i2c@2060000 {
status = "disabled";
};

+ vpu: video-codec@4210000 {
+ compatible = "ti,j721s2-wave521c", "cnm,wave521c";
+ reg = <0x00 0x4210000 0x00 0x10000>;
+ interrupts = <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&k3_clks 179 2>;
+ power-domains = <&k3_pds 179 TI_SCI_PD_EXCLUSIVE>;
+ };
+
main_sdhci0: mmc@4f80000 {
compatible = "ti,j721e-sdhci-8bit";
reg = <0x00 0x04f80000 0x00 0x1000>,
--
2.34.1


2024-02-20 19:20:34

by Brandon Brnich

[permalink] [raw]
Subject: [PATCH v5 3/4] arm64: dts: ti: k3-am62p: Add Wave5 Video Encoder/Decoder Node

This patch adds support for the Wave521cl on the AM62P.

Signed-off-by: Brandon Brnich <[email protected]>
---
arch/arm64/boot/dts/ti/k3-am62p-main.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi
index 4c51bae06b57..fd346e01e44e 100644
--- a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi
@@ -891,4 +891,12 @@ mcasp2: audio-controller@2b20000 {
power-domains = <&k3_pds 192 TI_SCI_PD_EXCLUSIVE>;
status = "disabled";
};
+
+ vpu: video-codec@30210000 {
+ compatible = "ti,j721s2-wave521c", "cnm,wave521c";
+ reg = <0x00 0x30210000 0x00 0x10000>;
+ interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&k3_clks 204 2>;
+ power-domains = <&k3_pds 204 TI_SCI_PD_EXCLUSIVE>;
+ };
};
--
2.34.1


2024-02-22 13:26:26

by Vignesh Raghavendra

[permalink] [raw]
Subject: Re: [PATCH v5 0/4] Add Support for Wave5 on TI Devices

Hi Brandon Brnich,

On Tue, 20 Feb 2024 13:14:09 -0600, Brandon Brnich wrote:
> This series is responsible for adding support for Wave5 driver[0]
> across numerous TI K3 platforms.
>
> [0]: https://lore.kernel.org/all/[email protected]/
>
> Changes since v4:
> =================
> * Remove clock-names from device tree nodes per Vignesh's request
> - "vcodec" clock-name is defined as macro in driver, but unused
> - no purpose to have it in dt node
>
> [...]

I have applied the following to branch ti-k3-dts-next on [1].
Thank you!

[1/4] arm64: dts: ti: k3-j784s4: Add Wave5 Video Encoder/Decoder Node
commit: 7805623df1ff50e69fa66e91f7305144e9ef5c31
[2/4] arm64: dts: ti: k3-j721s2-main: Add Wave5 Video Encoder/Decoder Node
commit: 8caaf735b9114f77895608acde21a5163b1bf02e
[3/4] arm64: dts: ti: k3-am62p: Add Wave5 Video Encoder/Decoder Node
commit: ab480b8036fde8c1ea628bb1027919bf399468e9

I have applied the following to branch ti-k3-config-next on [1].
Thank you!

[4/4] arm64: defconfig: Enable Wave5 Video Encoder/Decoder
commit: 02b645583e26f38261711f2a8b36c5db06862527

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
--
Vignesh


2024-02-27 05:43:37

by Devarsh Thakkar

[permalink] [raw]
Subject: Re: [PATCH v5 1/4] arm64: dts: ti: k3-j784s4: Add Wave5 Video Encoder/Decoder Node

Hi Brandon,

On 21/02/24 00:44, Brandon Brnich wrote:
> This patch adds support for the Wave521cl on the J784S4-evm.
>
> Signed-off-by: Brandon Brnich <[email protected]>
> ---
> arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi | 16 ++++++++++++++++
> arch/arm64/boot/dts/ti/k3-j784s4.dtsi | 2 ++
> 2 files changed, 18 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
> index f2b720ed1e4f..40dd2e8a9f98 100644
> --- a/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
> @@ -662,6 +662,22 @@ main_i2c6: i2c@2060000 {
> status = "disabled";
> };
>
> + vpu0: video-codec@4210000 {
> + compatible = "ti,j721s2-wave521c", "cnm,wave521c";
> + reg = <0x00 0x4210000 0x00 0x10000>;
> + interrupts = <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&k3_clks 241 2>;
> + power-domains = <&k3_pds 241 TI_SCI_PD_EXCLUSIVE>;
> + };
> +
> + vpu1: video-codec@4220000 {
> + compatible = "ti,j721s2-wave521c", "cnm,wave521c";
> + reg = <0x00 0x4220000 0x00 0x10000>;
> + interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&k3_clks 242 2>;
> + power-domains = <&k3_pds 242 TI_SCI_PD_EXCLUSIVE>;
> + };
> +
> main_sdhci0: mmc@4f80000 {
> compatible = "ti,j721e-sdhci-8bit";
> reg = <0x00 0x04f80000 0x00 0x1000>,
> diff --git a/arch/arm64/boot/dts/ti/k3-j784s4.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4.dtsi
> index 4398c3a463e1..2f633721a0c6 100644
> --- a/arch/arm64/boot/dts/ti/k3-j784s4.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-j784s4.dtsi
> @@ -235,6 +235,8 @@ cbass_main: bus@100000 {
> ranges = <0x00 0x00100000 0x00 0x00100000 0x00 0x00020000>, /* ctrl mmr */
> <0x00 0x00600000 0x00 0x00600000 0x00 0x00031100>, /* GPIO */
> <0x00 0x01000000 0x00 0x01000000 0x00 0x0d000000>, /* Most peripherals */
> + <0x00 0x04210000 0x00 0x04210000 0x00 0x00010000>, /* VPU0 */
> + <0x00 0x04220000 0x00 0x04220000 0x00 0x00010000>, /* VPU1 */

Above change seems not required as the /* Most peripherals */ range already
covers it. Also thanks to Vignesh for confirming this.

As this is already merged in tree, Could you please send a patch which fixes
this commit ?

Regards
Devarsh

> <0x00 0x0d000000 0x00 0x0d000000 0x00 0x01000000>, /* PCIe Core*/
> <0x00 0x10000000 0x00 0x10000000 0x00 0x08000000>, /* PCIe0 DAT0 */
> <0x00 0x18000000 0x00 0x18000000 0x00 0x08000000>, /* PCIe1 DAT0 */
>