Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1739594
| From | Chen-Yu Tsai <wens@csie.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 10/13] drm/sun4i: hdmi: Add A31 specific DDC register definitions |
| Date | 2017-09-26 09:10 +0200 |
| Message-ID | <utSaf-1rM-27@gated-at.bofh.it> (permalink) |
| References | <utSae-1rM-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The DDC block for the HDMI controller is different on the A31.
This patch adds the register definitions.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
drivers/gpu/drm/sun4i/sun4i_hdmi.h | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi.h b/drivers/gpu/drm/sun4i/sun4i_hdmi.h
index b1124a8f9f05..da4ea9efc6fa 100644
--- a/drivers/gpu/drm/sun4i/sun4i_hdmi.h
+++ b/drivers/gpu/drm/sun4i/sun4i_hdmi.h
@@ -153,6 +153,37 @@
#define SUN4I_HDMI_DDC_FIFO_SIZE 16
+/* A31 specific */
+#define SUN6I_HDMI_DDC_CTRL_REG 0x500
+#define SUN6I_HDMI_DDC_CTRL_RESET BIT(31)
+#define SUN6I_HDMI_DDC_CTRL_START_CMD BIT(27)
+#define SUN6I_HDMI_DDC_CTRL_SDA_ENABLE BIT(6)
+#define SUN6I_HDMI_DDC_CTRL_SCL_ENABLE BIT(4)
+#define SUN6I_HDMI_DDC_CTRL_ENABLE BIT(0)
+
+#define SUN6I_HDMI_DDC_CMD_REG 0x508
+#define SUN6I_HDMI_DDC_CMD_BYTE_COUNT(count) ((count) << 16)
+/* command types in lower 3 bits are the same as sun4i */
+
+#define SUN6I_HDMI_DDC_ADDR_REG 0x50c
+#define SUN6I_HDMI_DDC_ADDR_SEGMENT(seg) (((seg) & 0xff) << 24)
+#define SUN6I_HDMI_DDC_ADDR_EDDC(addr) (((addr) & 0xff) << 16)
+#define SUN6I_HDMI_DDC_ADDR_OFFSET(off) (((off) & 0xff) << 8)
+#define SUN6I_HDMI_DDC_ADDR_SLAVE(addr) (((addr) & 0xff) << 1)
+
+#define SUN6I_HDMI_DDC_INT_STATUS_REG 0x514
+#define SUN6I_HDMI_DDC_INT_STATUS_TIMEOUT BIT(8)
+/* lower 8 bits are the same as sun4i */
+
+#define SUN6I_HDMI_DDC_FIFO_CTRL_REG 0x518
+#define SUN6I_HDMI_DDC_FIFO_CTRL_CLEAR BIT(15)
+/* lower 9 bits are the same as sun4i */
+
+#define SUN6I_HDMI_DDC_CLK_REG 0x520
+/* DDC CLK bit fields are the same, but the formula is not */
+
+#define SUN6I_HDMI_DDC_FIFO_DATA_REG 0x580
+
enum sun4i_hdmi_pkt_type {
SUN4I_HDMI_PKT_AVI = 2,
SUN4I_HDMI_PKT_END = 15,
--
2.14.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 00/13] drm/sun4i: hdmi: Support HDMI controller on A31 Chen-Yu Tsai <wens@csie.org> - 2017-09-26 09:10 +0200
[PATCH v2 07/13] dt-bindings: display: sun4i: Add binding for A31 HDMI controller Chen-Yu Tsai <wens@csie.org> - 2017-09-26 09:10 +0200
[PATCH v2 02/13] clk: sunxi-ng: sun6i: Rename HDMI DDC clock to avoid name collision Chen-Yu Tsai <wens@csie.org> - 2017-09-26 09:10 +0200
Re: [PATCH v2 02/13] clk: sunxi-ng: sun6i: Rename HDMI DDC clock to avoid name collision Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-09-26 11:40 +0200
Re: [PATCH v2 02/13] clk: sunxi-ng: sun6i: Rename HDMI DDC clock to avoid name collision Chen-Yu Tsai <wens@csie.org> - 2017-09-27 05:50 +0200
[PATCH v2 09/13] drm/sun4i: hdmi: Add support for controller hardware variants Chen-Yu Tsai <wens@csie.org> - 2017-09-26 09:10 +0200
Re: [PATCH v2 09/13] drm/sun4i: hdmi: Add support for controller hardware variants Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-09-26 12:10 +0200
[PATCH v2 13/13] ARM: dts: sun6i: Enable HDMI support on some A31/A31s devices Chen-Yu Tsai <wens@csie.org> - 2017-09-26 09:10 +0200
[PATCH v2 08/13] regmap: add iopoll-like polling macro for regmap_field Chen-Yu Tsai <wens@csie.org> - 2017-09-26 09:10 +0200
[PATCH v2 10/13] drm/sun4i: hdmi: Add A31 specific DDC register definitions Chen-Yu Tsai <wens@csie.org> - 2017-09-26 09:10 +0200
Re: [PATCH v2 10/13] drm/sun4i: hdmi: Add A31 specific DDC register definitions Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-09-26 12:10 +0200
[PATCH v2 04/13] drm/sun4i: hdmi: Disable clks in bind function error path and unbind function Chen-Yu Tsai <wens@csie.org> - 2017-09-26 09:10 +0200
Re: [PATCH v2 04/13] drm/sun4i: hdmi: Disable clks in bind function error path and unbind function Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-09-26 12:00 +0200
[PATCH v2 03/13] drm/sun4i: tcon: Add support for demuxing TCON output on A31 Chen-Yu Tsai <wens@csie.org> - 2017-09-26 09:10 +0200
Re: [PATCH v2 03/13] drm/sun4i: tcon: Add support for demuxing TCON output on A31 Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-09-26 12:00 +0200
Re: [PATCH v2 03/13] drm/sun4i: tcon: Add support for demuxing TCON output on A31 Chen-Yu Tsai <wens@csie.org> - 2017-09-27 06:10 +0200
[PATCH v2 05/13] drm/sun4i: hdmi: create a regmap for later use Chen-Yu Tsai <wens@csie.org> - 2017-09-26 09:10 +0200
Re: [PATCH v2 05/13] drm/sun4i: hdmi: create a regmap for later use Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-09-26 12:00 +0200
[PATCH v2 06/13] drm/sun4i: hdmi: Allow using second PLL as TMDS clk parent Chen-Yu Tsai <wens@csie.org> - 2017-09-26 09:10 +0200
Re: [PATCH v2 06/13] drm/sun4i: hdmi: Allow using second PLL as TMDS clk parent Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-09-26 12:00 +0200
csiph-web