-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'topic-arcpgu-v6' of https://github.com/foss-for-synopsy…
…s-dwc-arc-processors/linux into drm-next This is DRM driver for ARC PGU - simple bitstreamer used on Synopsys ARC SDP boards (both AXS101 and AXS103). * 'topic-arcpgu-v6' of https://github.com/foss-for-synopsys-dwc-arc-processors/linux: arc: axs10x - add support of ARC PGU MAINTAINERS: Add maintainer for ARC PGU display controller drm: Add DT bindings documentation for ARC PGU display controller drm: Add support of ARC PGU display controller
- Loading branch information
Showing
12 changed files
with
947 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
ARC PGU | ||
|
||
This is a display controller found on several development boards produced | ||
by Synopsys. The ARC PGU is an RGB streamer that reads the data from a | ||
framebuffer and sends it to a single digital encoder (usually HDMI). | ||
|
||
Required properties: | ||
- compatible: "snps,arcpgu" | ||
- reg: Physical base address and length of the controller's registers. | ||
- clocks: A list of phandle + clock-specifier pairs, one for each | ||
entry in 'clock-names'. | ||
- clock-names: A list of clock names. For ARC PGU it should contain: | ||
- "pxlclk" for the clock feeding the output PLL of the controller. | ||
|
||
Required sub-nodes: | ||
- port: The PGU connection to an encoder chip. | ||
|
||
Example: | ||
|
||
/ { | ||
... | ||
|
||
pgu@XXXXXXXX { | ||
compatible = "snps,arcpgu"; | ||
reg = <0xXXXXXXXX 0x400>; | ||
clocks = <&clock_node>; | ||
clock-names = "pxlclk"; | ||
|
||
port { | ||
pgu_output: endpoint { | ||
remote-endpoint = <&hdmi_enc_input>; | ||
}; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
config DRM_ARCPGU | ||
tristate "ARC PGU" | ||
depends on DRM && OF | ||
select DRM_KMS_CMA_HELPER | ||
select DRM_KMS_FB_HELPER | ||
select DRM_KMS_HELPER | ||
help | ||
Choose this option if you have an ARC PGU controller. | ||
|
||
If M is selected the module will be called arcpgu. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
arcpgu-y := arcpgu_crtc.o arcpgu_hdmi.o arcpgu_drv.o | ||
obj-$(CONFIG_DRM_ARCPGU) += arcpgu.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* ARC PGU DRM driver. | ||
* | ||
* Copyright (C) 2016 Synopsys, Inc. (www.synopsys.com) | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
*/ | ||
|
||
#ifndef _ARCPGU_H_ | ||
#define _ARCPGU_H_ | ||
|
||
struct arcpgu_drm_private { | ||
void __iomem *regs; | ||
struct clk *clk; | ||
struct drm_fbdev_cma *fbdev; | ||
struct drm_framebuffer *fb; | ||
struct list_head event_list; | ||
struct drm_crtc crtc; | ||
struct drm_plane *plane; | ||
}; | ||
|
||
#define crtc_to_arcpgu_priv(x) container_of(x, struct arcpgu_drm_private, crtc) | ||
|
||
static inline void arc_pgu_write(struct arcpgu_drm_private *arcpgu, | ||
unsigned int reg, u32 value) | ||
{ | ||
iowrite32(value, arcpgu->regs + reg); | ||
} | ||
|
||
static inline u32 arc_pgu_read(struct arcpgu_drm_private *arcpgu, | ||
unsigned int reg) | ||
{ | ||
return ioread32(arcpgu->regs + reg); | ||
} | ||
|
||
int arc_pgu_setup_crtc(struct drm_device *dev); | ||
int arcpgu_drm_hdmi_init(struct drm_device *drm, struct device_node *np); | ||
struct drm_fbdev_cma *arcpgu_fbdev_cma_init(struct drm_device *dev, | ||
unsigned int preferred_bpp, unsigned int num_crtc, | ||
unsigned int max_conn_count); | ||
|
||
#endif |
Oops, something went wrong.