arm64: dts: allwinner: a64: Enable deinterlace core
Subsystems (5)
v2 cover arm64: dts: allwinner: a64: Enable deinterlace core
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(-)
Signature · 1 line
2.25.0
PATCH v2 1/5 dt-bindings: interconnect: sunxi: Add A64 MBUS compatible
A64 contains MBUS controller. Add a compatible for it.
--- .../devicetree/bindings/arm/sunxi/allwinner,sun4i-a10-mbus.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/sunxi/allwinner,sun4i-a10-mbus.yaml +1 -0
@@ -30,6 +30,7 @@ properties: enum: - allwinner,sun5i-a13-mbus - allwinner,sun8i-h3-mbus + - allwinner,sun50i-a64-mbus reg: maxItems: 1
Signature · 1 line
2.25.0
PATCH v2 2/5 clk: sunxi-ng: a64: Export MBUS clock
In reply to Jernej SkrabecMBUS clock will be referenced in MBUS controller node.
Export it.
--- 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(-)
drivers/clk/sunxi-ng/ccu-sun50i-a64.h +0 -4
@@ -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)
include/dt-bindings/clock/sun50i-a64-ccu.h +1 -1
@@ -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
Signature · 1 line
2.25.0
PATCH v2 3/5 arm64: dts: allwinner: a64: Add MBUS controller node
In reply to Jernej SkrabecA64 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.
--- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +8 -0
@@ -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>;
Signature · 1 line
2.25.0
PATCH v2 4/5 media: dt-bindings: media: Add Allwinner A64 deinterlace compatible
In reply to Jernej SkrabecAllwinner A64 SoC also contains deinterlace core, compatible to H3.
Add compatible string for it.
--- .../bindings/media/allwinner,sun8i-h3-deinterlace.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/media/allwinner,sun8i-h3-deinterlace.yaml +5 -1
@@ -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
Signature · 1 line
2.25.0
PATCH v2 5/5 arm64: dts: allwinner: a64: Add deinterlace core node
In reply to Jernej SkrabecA64 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.
--- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +14 -0
@@ -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";
Signature · 1 line
2.25.0
Maxime Ripard
AppliedQuoted 4 lines · Jernej Skrabec
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