Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(kernel-rolling) media: Add Phytium JPEG Engine support #185

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions Documentation/devicetree/bindings/media/phytium,jpeg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/phytium,jpeg.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Phytium JPEG Engine

maintainers:
- Chen Baozi <[email protected]>

description: |-
The JPEG Engine embedded in the Phytium SOCs can capture
and compress video data from digital or analog sources.

properties:
compatible:
const: phytium,jpeg

reg:
maxItems: 1
description: |
Contains the offset and length of the JPEG Engine memory region.

interrupts:
maxItems: 1
description: |
The interrupt associated with the VE on this platform.

phytium,ocm-buf-addr:
$ref: /schemas/types.yaml#/definitions/uint64
description: |
The physical address used to storage the inputing video data.


required:
- compatible
- reg
- interrupts
- phytium,ocm-buf-addr

additionalProperties: false

examples:
- |
jpeg: jpeg@32b32000 {
compatible = "phytium,jpeg";
reg = <0x0 0x32b32000 0 0x1000>;
interrupts = <0 41 4>;
phytium,ocm-buf-addr = <0x30c40000 0x30c60000>;
status = "okay";
};
1 change: 1 addition & 0 deletions drivers/media/platform/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ source "drivers/media/platform/microchip/Kconfig"
source "drivers/media/platform/nuvoton/Kconfig"
source "drivers/media/platform/nvidia/Kconfig"
source "drivers/media/platform/nxp/Kconfig"
source "drivers/media/platform/phytium/Kconfig"
source "drivers/media/platform/qcom/Kconfig"
source "drivers/media/platform/renesas/Kconfig"
source "drivers/media/platform/rockchip/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions drivers/media/platform/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ obj-y += microchip/
obj-y += nuvoton/
obj-y += nvidia/
obj-y += nxp/
obj-y += phytium/
obj-y += qcom/
obj-y += renesas/
obj-y += rockchip/
Expand Down
14 changes: 14 additions & 0 deletions drivers/media/platform/phytium/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-License-Identifier: GPL-2.0-only

comment "Phytium media platform drivers"

config VIDEO_PHYTIUM_JPEG
tristate "Phytium JPEG Encoder Engine driver"
depends on V4L_PLATFORM_DRIVERS
depends on VIDEO_DEV
select VIDEOBUF2_DMA_CONTIG
help
Support for the Phytium JPEG Encoder Engine embedded
in the Phytium SOCs. The engine can capture and
compress video data from digital or analog sources.

5 changes: 5 additions & 0 deletions drivers/media/platform/phytium/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
#
phytium_jpeg-objs := phytium_jpeg_core.o

obj-$(CONFIG_VIDEO_PHYTIUM_JPEG) += phytium_jpeg.o
Loading