summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-12-19 07:57:33 -0500
committerTom Rini <trini@konsulko.com>2017-12-19 07:57:33 -0500
commit76cc372879e2f2f0467e8a3875f097d189647793 (patch)
tree73b2136d7b21c4fd351fd48cdf6b87ce229e7951 /drivers
parent5f7708362812dc5c0647cdae4f05a85e57b3cf32 (diff)
parent23cd00ab2d8c39eaa15257efcba441939ea66fa8 (diff)
Merge git://git.denx.de/u-boot-sunxi
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/Kconfig8
-rw-r--r--drivers/video/sunxi/sunxi_de2.c11
-rw-r--r--drivers/video/sunxi/sunxi_dw_hdmi.c14
3 files changed, 23 insertions, 10 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 52555da4b3..d42d915f17 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -244,6 +244,14 @@ config SUN7I_GMAC
help
Enable the support for Sun7i GMAC Ethernet controller
+config SUN7I_GMAC_FORCE_TXERR
+ bool "Force PA17 as gmac function"
+ depends on SUN7I_GMAC
+ help
+ Some ethernet phys needs TXERR control. Since the GMAC
+ doesn't have such signal, setting PA17 as GMAC function
+ makes the pin output low, which enables data transmission.
+
config SUN4I_EMAC
bool "Allwinner Sun4i Ethernet MAC support"
depends on DM_ETH
diff --git a/drivers/video/sunxi/sunxi_de2.c b/drivers/video/sunxi/sunxi_de2.c
index 6d6bb2e0c3..860187323c 100644
--- a/drivers/video/sunxi/sunxi_de2.c
+++ b/drivers/video/sunxi/sunxi_de2.c
@@ -319,7 +319,7 @@ U_BOOT_DEVICE(sunxi_de2) = {
#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_VIDEO_DT_SIMPLEFB)
int sunxi_simplefb_setup(void *blob)
{
- struct udevice *de2, *hdmi;
+ struct udevice *de2, *hdmi, *lcd;
struct video_priv *de2_priv;
struct video_uc_platdata *de2_plat;
int mux;
@@ -355,6 +355,15 @@ int sunxi_simplefb_setup(void *blob)
debug("HDMI present but not probed\n");
}
+ ret = uclass_find_device_by_name(UCLASS_DISPLAY,
+ "sunxi_lcd", &lcd);
+ if (ret)
+ debug("LCD not present\n");
+ else if (device_active(lcd))
+ pipeline = "mixer0-lcd0";
+ else
+ debug("LCD present but not probed\n");
+
if (!pipeline) {
debug("No active display present\n");
return 0;
diff --git a/drivers/video/sunxi/sunxi_dw_hdmi.c b/drivers/video/sunxi/sunxi_dw_hdmi.c
index 33920a2b67..4f01d1bded 100644
--- a/drivers/video/sunxi/sunxi_dw_hdmi.c
+++ b/drivers/video/sunxi/sunxi_dw_hdmi.c
@@ -304,15 +304,11 @@ static int sunxi_dw_hdmi_enable(struct udevice *dev, int panel_bpp,
sunxi_dw_hdmi_lcdc_init(priv->mux, edid, panel_bpp);
- /*
- * Condition in original code is a bit weird. This is attempt
- * to make it more reasonable and it works. It could be that
- * bits and conditions are related and should be separated.
- */
- if (!((edid->flags & DISPLAY_FLAGS_HSYNC_HIGH) &&
- (edid->flags & DISPLAY_FLAGS_VSYNC_HIGH))) {
- setbits_le32(&phy->pol, 0x300);
- }
+ if (edid->flags & DISPLAY_FLAGS_HSYNC_LOW)
+ setbits_le32(&phy->pol, 0x200);
+
+ if (edid->flags & DISPLAY_FLAGS_VSYNC_LOW)
+ setbits_le32(&phy->pol, 0x100);
setbits_le32(&phy->ctrl, 0xf << 12);