Linux-Media Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2 0/5] arm64: dts: allwinner: a64: Enable deinterlace core
@ 2020-02-10 17:06 Jernej Skrabec
  2020-02-10 17:06 ` [PATCH v2 1/5] dt-bindings: interconnect: sunxi: Add A64 MBUS compatible Jernej Skrabec
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Jernej Skrabec @ 2020-02-10 17:06 UTC (permalink / raw)
  To: mripard, wens
  Cc: mchehab, robh+dt, mark.rutland, linux-media, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi

Allwinner A64 contains deinterlace core, compatible to the one found in
H3. It can be used in combination with VPU to playback interlaced videos.

Please take a look.

Best regards,
Jernej

Changes from v1:
- use number instead of macro in patch 3

Jernej Skrabec (5):
  dt-bindings: interconnect: sunxi: Add A64 MBUS compatible
  clk: sunxi-ng: a64: Export MBUS clock
  arm64: dts: allwinner: a64: Add MBUS controller node
  media: dt-bindings: media: Add Allwinner A64 deinterlace compatible
  arm64: dts: allwinner: a64: Add deinterlace core node

 .../arm/sunxi/allwinner,sun4i-a10-mbus.yaml   |  1 +
 .../media/allwinner,sun8i-h3-deinterlace.yaml |  6 ++++-
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 22 +++++++++++++++++++
 drivers/clk/sunxi-ng/ccu-sun50i-a64.h         |  4 ----
 include/dt-bindings/clock/sun50i-a64-ccu.h    |  2 +-
 5 files changed, 29 insertions(+), 6 deletions(-)

-- 
2.25.0


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

* [PATCH v2 1/5] dt-bindings: interconnect: sunxi: Add A64 MBUS compatible
  2020-02-10 17:06 [PATCH v2 0/5] arm64: dts: allwinner: a64: Enable deinterlace core Jernej Skrabec
@ 2020-02-10 17:06 ` Jernej Skrabec
  2020-02-10 17:06 ` [PATCH v2 2/5] clk: sunxi-ng: a64: Export MBUS clock Jernej Skrabec
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Jernej Skrabec @ 2020-02-10 17:06 UTC (permalink / raw)
  To: mripard, wens
  Cc: mchehab, robh+dt, mark.rutland, linux-media, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi, Rob Herring

A64 contains MBUS controller. Add a compatible for it.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
 .../devicetree/bindings/arm/sunxi/allwinner,sun4i-a10-mbus.yaml  | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/sunxi/allwinner,sun4i-a10-mbus.yaml b/Documentation/devicetree/bindings/arm/sunxi/allwinner,sun4i-a10-mbus.yaml
index 9370e64992dd..aa0738b4d534 100644
--- a/Documentation/devicetree/bindings/arm/sunxi/allwinner,sun4i-a10-mbus.yaml
+++ b/Documentation/devicetree/bindings/arm/sunxi/allwinner,sun4i-a10-mbus.yaml
@@ -30,6 +30,7 @@ properties:
     enum:
       - allwinner,sun5i-a13-mbus
       - allwinner,sun8i-h3-mbus
+      - allwinner,sun50i-a64-mbus
 
   reg:
     maxItems: 1
-- 
2.25.0


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

* [PATCH v2 2/5] clk: sunxi-ng: a64: Export MBUS clock
  2020-02-10 17:06 [PATCH v2 0/5] arm64: dts: allwinner: a64: Enable deinterlace core Jernej Skrabec
  2020-02-10 17:06 ` [PATCH v2 1/5] dt-bindings: interconnect: sunxi: Add A64 MBUS compatible Jernej Skrabec
@ 2020-02-10 17:06 ` Jernej Skrabec
  2020-02-10 17:06 ` [PATCH v2 3/5] arm64: dts: allwinner: a64: Add MBUS controller node Jernej Skrabec
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Jernej Skrabec @ 2020-02-10 17:06 UTC (permalink / raw)
  To: mripard, wens
  Cc: mchehab, robh+dt, mark.rutland, linux-media, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi

MBUS clock will be referenced in MBUS controller node.

Export it.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
 drivers/clk/sunxi-ng/ccu-sun50i-a64.h      | 4 ----
 include/dt-bindings/clock/sun50i-a64-ccu.h | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-a64.h b/drivers/clk/sunxi-ng/ccu-sun50i-a64.h
index 116e6f826d04..54d1f96f4b68 100644
--- a/drivers/clk/sunxi-ng/ccu-sun50i-a64.h
+++ b/drivers/clk/sunxi-ng/ccu-sun50i-a64.h
@@ -55,10 +55,6 @@
 
 /* All the DRAM gates are exported */
 
-/* Some more module clocks are exported */
-
-#define CLK_MBUS			112
-
 /* And the DSI and GPU module clock is exported */
 
 #define CLK_NUMBER			(CLK_GPU + 1)
diff --git a/include/dt-bindings/clock/sun50i-a64-ccu.h b/include/dt-bindings/clock/sun50i-a64-ccu.h
index e512a1c9b0fc..318eb15c414c 100644
--- a/include/dt-bindings/clock/sun50i-a64-ccu.h
+++ b/include/dt-bindings/clock/sun50i-a64-ccu.h
@@ -131,7 +131,7 @@
 #define CLK_AVS			109
 #define CLK_HDMI		110
 #define CLK_HDMI_DDC		111
-
+#define CLK_MBUS		112
 #define CLK_DSI_DPHY		113
 #define CLK_GPU			114
 
-- 
2.25.0


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

* [PATCH v2 3/5] arm64: dts: allwinner: a64: Add MBUS controller node
  2020-02-10 17:06 [PATCH v2 0/5] arm64: dts: allwinner: a64: Enable deinterlace core Jernej Skrabec
  2020-02-10 17:06 ` [PATCH v2 1/5] dt-bindings: interconnect: sunxi: Add A64 MBUS compatible Jernej Skrabec
  2020-02-10 17:06 ` [PATCH v2 2/5] clk: sunxi-ng: a64: Export MBUS clock Jernej Skrabec
@ 2020-02-10 17:06 ` Jernej Skrabec
  2020-02-10 17:06 ` [PATCH v2 4/5] media: dt-bindings: media: Add Allwinner A64 deinterlace compatible Jernej Skrabec
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Jernej Skrabec @ 2020-02-10 17:06 UTC (permalink / raw)
  To: mripard, wens
  Cc: mchehab, robh+dt, mark.rutland, linux-media, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi

A64 contains MBUS, which is the bus used by DMA devices to access
system memory.

MBUS controller is responsible for arbitration between channels based
on set priority and can do some other things as well, like report
bandwidth used. It also maps RAM region to different address than CPU.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 862b47dc9dc9..251c91724de1 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -1061,6 +1061,14 @@ pwm: pwm@1c21400 {
 			status = "disabled";
 		};
 
+		mbus: dram-controller@1c62000 {
+			compatible = "allwinner,sun50i-a64-mbus";
+			reg = <0x01c62000 0x1000>;
+			clocks = <&ccu 112>;
+			dma-ranges = <0x00000000 0x40000000 0xc0000000>;
+			#interconnect-cells = <1>;
+		};
+
 		csi: csi@1cb0000 {
 			compatible = "allwinner,sun50i-a64-csi";
 			reg = <0x01cb0000 0x1000>;
-- 
2.25.0


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

* [PATCH v2 4/5] media: dt-bindings: media: Add Allwinner A64 deinterlace compatible
  2020-02-10 17:06 [PATCH v2 0/5] arm64: dts: allwinner: a64: Enable deinterlace core Jernej Skrabec
                   ` (2 preceding siblings ...)
  2020-02-10 17:06 ` [PATCH v2 3/5] arm64: dts: allwinner: a64: Add MBUS controller node Jernej Skrabec
@ 2020-02-10 17:06 ` Jernej Skrabec
  2020-02-10 17:06 ` [PATCH v2 5/5] arm64: dts: allwinner: a64: Add deinterlace core node Jernej Skrabec
  2020-02-11  6:49 ` [PATCH v2 0/5] arm64: dts: allwinner: a64: Enable deinterlace core Maxime Ripard
  5 siblings, 0 replies; 7+ messages in thread
From: Jernej Skrabec @ 2020-02-10 17:06 UTC (permalink / raw)
  To: mripard, wens
  Cc: mchehab, robh+dt, mark.rutland, linux-media, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi, Rob Herring

Allwinner A64 SoC also contains deinterlace core, compatible to H3.

Add compatible string for it.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
 .../bindings/media/allwinner,sun8i-h3-deinterlace.yaml      | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/media/allwinner,sun8i-h3-deinterlace.yaml b/Documentation/devicetree/bindings/media/allwinner,sun8i-h3-deinterlace.yaml
index 2e40f700e84f..8707df613f6c 100644
--- a/Documentation/devicetree/bindings/media/allwinner,sun8i-h3-deinterlace.yaml
+++ b/Documentation/devicetree/bindings/media/allwinner,sun8i-h3-deinterlace.yaml
@@ -17,7 +17,11 @@ description: |-
 
 properties:
   compatible:
-    const: allwinner,sun8i-h3-deinterlace
+    oneOf:
+      - const: allwinner,sun8i-h3-deinterlace
+      - items:
+        - const: allwinner,sun50i-a64-deinterlace
+        - const: allwinner,sun8i-h3-deinterlace
 
   reg:
     maxItems: 1
-- 
2.25.0


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

* [PATCH v2 5/5] arm64: dts: allwinner: a64: Add deinterlace core node
  2020-02-10 17:06 [PATCH v2 0/5] arm64: dts: allwinner: a64: Enable deinterlace core Jernej Skrabec
                   ` (3 preceding siblings ...)
  2020-02-10 17:06 ` [PATCH v2 4/5] media: dt-bindings: media: Add Allwinner A64 deinterlace compatible Jernej Skrabec
@ 2020-02-10 17:06 ` Jernej Skrabec
  2020-02-11  6:49 ` [PATCH v2 0/5] arm64: dts: allwinner: a64: Enable deinterlace core Maxime Ripard
  5 siblings, 0 replies; 7+ messages in thread
From: Jernej Skrabec @ 2020-02-10 17:06 UTC (permalink / raw)
  To: mripard, wens
  Cc: mchehab, robh+dt, mark.rutland, linux-media, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi

A64 contains deinterlace core, compatible to the one found in H3.
It can be used in combination with VPU unit to decode and process
interlaced videos.

Add a node for it.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 251c91724de1..72b1b34879c6 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -1114,6 +1114,20 @@ dphy: d-phy@1ca1000 {
 			#phy-cells = <0>;
 		};
 
+		deinterlace: deinterlace@1e00000 {
+			compatible = "allwinner,sun50i-a64-deinterlace",
+				     "allwinner,sun8i-h3-deinterlace";
+			reg = <0x01e00000 0x20000>;
+			clocks = <&ccu CLK_BUS_DEINTERLACE>,
+				 <&ccu CLK_DEINTERLACE>,
+				 <&ccu CLK_DRAM_DEINTERLACE>;
+			clock-names = "bus", "mod", "ram";
+			resets = <&ccu RST_BUS_DEINTERLACE>;
+			interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
+			interconnects = <&mbus 9>;
+			interconnect-names = "dma-mem";
+		};
+
 		hdmi: hdmi@1ee0000 {
 			compatible = "allwinner,sun50i-a64-dw-hdmi",
 				     "allwinner,sun8i-a83t-dw-hdmi";
-- 
2.25.0


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

* Re: [PATCH v2 0/5] arm64: dts: allwinner: a64: Enable deinterlace core
  2020-02-10 17:06 [PATCH v2 0/5] arm64: dts: allwinner: a64: Enable deinterlace core Jernej Skrabec
                   ` (4 preceding siblings ...)
  2020-02-10 17:06 ` [PATCH v2 5/5] arm64: dts: allwinner: a64: Add deinterlace core node Jernej Skrabec
@ 2020-02-11  6:49 ` Maxime Ripard
  5 siblings, 0 replies; 7+ messages in thread
From: Maxime Ripard @ 2020-02-11  6:49 UTC (permalink / raw)
  To: Jernej Skrabec
  Cc: wens, mchehab, robh+dt, mark.rutland, linux-media, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi

[-- Attachment #1: Type: text/plain, Size: 263 bytes --]

On Mon, Feb 10, 2020 at 06:06:51PM +0100, Jernej Skrabec wrote:
> Allwinner A64 contains deinterlace core, compatible to the one found in
> H3. It can be used in combination with VPU to playback interlaced videos.
>
> Please take a look.

Applied, thanks!
Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-10 17:06 [PATCH v2 0/5] arm64: dts: allwinner: a64: Enable deinterlace core Jernej Skrabec
2020-02-10 17:06 ` [PATCH v2 1/5] dt-bindings: interconnect: sunxi: Add A64 MBUS compatible Jernej Skrabec
2020-02-10 17:06 ` [PATCH v2 2/5] clk: sunxi-ng: a64: Export MBUS clock Jernej Skrabec
2020-02-10 17:06 ` [PATCH v2 3/5] arm64: dts: allwinner: a64: Add MBUS controller node Jernej Skrabec
2020-02-10 17:06 ` [PATCH v2 4/5] media: dt-bindings: media: Add Allwinner A64 deinterlace compatible Jernej Skrabec
2020-02-10 17:06 ` [PATCH v2 5/5] arm64: dts: allwinner: a64: Add deinterlace core node Jernej Skrabec
2020-02-11  6:49 ` [PATCH v2 0/5] arm64: dts: allwinner: a64: Enable deinterlace core Maxime Ripard

Linux-Media Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-media/0 linux-media/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-media linux-media/ https://lore.kernel.org/linux-media \
		linux-media@vger.kernel.org
	public-inbox-index linux-media

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-media


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git