svn commit: r309079 - head/sys/arm/allwinner
Emmanuel Vadot
manu at FreeBSD.org
Thu Nov 24 01:24:27 UTC 2016
Author: manu
Date: Thu Nov 24 01:24:26 2016
New Revision: 309079
URL: https://svnweb.freebsd.org/changeset/base/309079
Log:
Enable the SCL and SDA i2c line for DDC.
This is an undocumented register that we need to set if we do not want to
rely on u-boot or other bootloader.
Modified:
head/sys/arm/allwinner/a10_hdmi.c
Modified: head/sys/arm/allwinner/a10_hdmi.c
==============================================================================
--- head/sys/arm/allwinner/a10_hdmi.c Thu Nov 24 00:49:00 2016 (r309078)
+++ head/sys/arm/allwinner/a10_hdmi.c Thu Nov 24 01:24:26 2016 (r309079)
@@ -189,6 +189,9 @@ __FBSDID("$FreeBSD$");
#define DDC_ADDR 0x50
#define EDDC_ADDR 0x60
#define EDID_LENGTH 128
+#define DDC_CTRL_LINE 0x540
+#define DDC_LINE_SCL_ENABLE (1 << 8)
+#define DDC_LINE_SDA_ENABLE (1 << 9)
#define HDMI_ENABLE_DELAY 50000
#define DDC_READ_RETRY 4
#define EXT_TAG 0x00
@@ -494,6 +497,10 @@ a10hdmi_get_edid(device_t dev, uint8_t *
/* Configure DDC clock */
HDMI_WRITE(sc, DDC_CLOCK, DDC_CLOCK_M | DDC_CLOCK_N);
+ /* Enable SDA/SCL */
+ HDMI_WRITE(sc, DDC_CTRL_LINE,
+ DDC_LINE_SCL_ENABLE | DDC_LINE_SDA_ENABLE);
+
/* Read EDID block */
error = a10hdmi_ddc_read(sc, 0, sc->edid);
if (error == 0) {
More information about the svn-src-all
mailing list