Removing deprecated u-boot patch, adjusting Lime2emmc special patch and restoring workaround patch
This commit is contained in:
parent
7d5227021a
commit
95797a752f
@ -2,15 +2,15 @@ diff --git a/configs/A20-OLinuXino-Lime2-eMMC_defconfig b/configs/A20-OLinuXino-
|
||||
index cd1fa64..f817b8c 100644
|
||||
--- a/configs/A20-OLinuXino-Lime2-eMMC_defconfig
|
||||
+++ b/configs/A20-OLinuXino-Lime2-eMMC_defconfig
|
||||
@@ -25,6 +25,8 @@ CONFIG_DFU_RAM=y
|
||||
CONFIG_ETH_DESIGNWARE=y
|
||||
CONFIG_RGMII=y
|
||||
CONFIG_SUN7I_GMAC=y
|
||||
@@ -7,6 +7,8 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||
CONFIG_USB0_VBUS_PIN="PC17"
|
||||
CONFIG_USB0_VBUS_DET="PH5"
|
||||
CONFIG_I2C1_ENABLE=y
|
||||
+CONFIG_PHY_MICREL=y
|
||||
+CONFIG_PHY_MICREL_KSZ90X1=y
|
||||
CONFIG_AXP_ALDO3_VOLT=2800
|
||||
CONFIG_AXP_ALDO4_VOLT=2800
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SATAPWR="PC3"
|
||||
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2-emmc"
|
||||
CONFIG_AHCI=y
|
||||
diff --git a/drivers/net/phy/micrel_ksz90x1.c b/drivers/net/phy/micrel_ksz90x1.c
|
||||
index b350a61..701a3d1 100644
|
||||
--- a/drivers/net/phy/micrel_ksz90x1.c
|
||||
|
||||
@ -1,127 +0,0 @@
|
||||
From 315edb971fa05d80fd0f17190406125f7455dc96 Mon Sep 17 00:00:00 2001
|
||||
From: Icenowy Zheng <icenowy@aosc.io>
|
||||
Date: Mon, 1 May 2017 16:00:57 +0800
|
||||
Subject: [PATCH] sunxi: setup simplefb for Allwinner DE2
|
||||
|
||||
As the support of EFI boot on Allwinner H3 is broken, we still need to
|
||||
use simplefb to pass the framebuffer to Linux.
|
||||
|
||||
Add code to setup simplefb for Allwinner DE2 driver.
|
||||
|
||||
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
|
||||
---
|
||||
drivers/video/sunxi/sunxi_de2.c | 81 +++++++++++++++++++++++++++++++++++++++++
|
||||
include/configs/sunxi-common.h | 4 ++
|
||||
2 files changed, 85 insertions(+)
|
||||
|
||||
diff --git a/drivers/video/sunxi/sunxi_de2.c b/drivers/video/sunxi/sunxi_de2.c
|
||||
index 9a32c3a..66ad43c 100644
|
||||
--- a/drivers/video/sunxi/sunxi_de2.c
|
||||
+++ b/drivers/video/sunxi/sunxi_de2.c
|
||||
@@ -10,6 +10,8 @@
|
||||
#include <display.h>
|
||||
#include <dm.h>
|
||||
#include <edid.h>
|
||||
+#include <fdtdec.h>
|
||||
+#include <fdt_support.h>
|
||||
#include <video.h>
|
||||
#include <asm/global_data.h>
|
||||
#include <asm/io.h>
|
||||
@@ -256,3 +258,82 @@ U_BOOT_DRIVER(sunxi_de2) = {
|
||||
U_BOOT_DEVICE(sunxi_de2) = {
|
||||
.name = "sunxi_de2"
|
||||
};
|
||||
+
|
||||
+/*
|
||||
+ * Simplefb support.
|
||||
+ */
|
||||
+#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_VIDEO_DT_SIMPLEFB)
|
||||
+int sunxi_simplefb_setup(void *blob)
|
||||
+{
|
||||
+ struct udevice *de2, *hdmi;
|
||||
+ struct video_priv *de2_priv;
|
||||
+ struct video_uc_platdata *de2_plat;
|
||||
+ int mux;
|
||||
+ int offset, ret;
|
||||
+ u64 start, size;
|
||||
+ const char *pipeline = NULL;
|
||||
+
|
||||
+ debug("Setting up simplefb\n");
|
||||
+
|
||||
+ if (IS_ENABLED(CONFIG_MACH_SUNXI_H3_H5))
|
||||
+ mux = 0;
|
||||
+ else
|
||||
+ mux = 1;
|
||||
+
|
||||
+ /* Skip simplefb setting if DE2 / HDMI is not present */
|
||||
+ ret = uclass_find_device_by_name(UCLASS_VIDEO,
|
||||
+ "sunxi_de2", &de2);
|
||||
+ if (ret) {
|
||||
+ debug("DE2 not present\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ ret = uclass_find_device_by_name(UCLASS_DISPLAY,
|
||||
+ "sunxi_dw_hdmi", &hdmi);
|
||||
+ if (ret) {
|
||||
+ debug("HDMI not present\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (mux == 0)
|
||||
+ pipeline = "mixer0-lcd0-hdmi";
|
||||
+ else
|
||||
+ pipeline = "mixer1-lcd1-hdmi";
|
||||
+
|
||||
+ de2_priv = dev_get_uclass_priv(de2);
|
||||
+ de2_plat = dev_get_uclass_platdata(de2);
|
||||
+
|
||||
+ /* Find a prefilled simpefb node, matching out pipeline config */
|
||||
+ offset = fdt_node_offset_by_compatible(blob, -1,
|
||||
+ "allwinner,simple-framebuffer");
|
||||
+ while (offset >= 0) {
|
||||
+ ret = fdt_stringlist_search(blob, offset, "allwinner,pipeline",
|
||||
+ pipeline);
|
||||
+ if (ret == 0)
|
||||
+ break;
|
||||
+ offset = fdt_node_offset_by_compatible(blob, offset,
|
||||
+ "allwinner,simple-framebuffer");
|
||||
+ }
|
||||
+ if (offset < 0) {
|
||||
+ eprintf("Cannot setup simplefb: node not found\n");
|
||||
+ return 0; /* Keep older kernels working */
|
||||
+ }
|
||||
+
|
||||
+ start = gd->bd->bi_dram[0].start;
|
||||
+ size = de2_plat->base - start;
|
||||
+ ret = fdt_fixup_memory_banks(blob, &start, &size, 1);
|
||||
+ if (ret) {
|
||||
+ eprintf("Cannot setup simplefb: Error reserving memory\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ret = fdt_setup_simplefb_node(blob, offset, de2_plat->base,
|
||||
+ de2_priv->xsize, de2_priv->ysize,
|
||||
+ (1 << de2_priv->bpix) / 8 * de2_priv->xsize,
|
||||
+ "x8r8g8b8");
|
||||
+ if (ret)
|
||||
+ eprintf("Cannot setup simplefb: Error setting properties\n");
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+#endif /* CONFIG_OF_BOARD_SETUP && CONFIG_VIDEO_DT_SIMPLEFB */
|
||||
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
|
||||
index 997a92c..8078ffe 100644
|
||||
--- a/include/configs/sunxi-common.h
|
||||
+++ b/include/configs/sunxi-common.h
|
||||
@@ -286,6 +286,10 @@ extern int soft_i2c_gpio_scl;
|
||||
|
||||
#endif /* CONFIG_VIDEO */
|
||||
|
||||
+#ifdef CONFIG_VIDEO_DE2
|
||||
+#define CONFIG_VIDEO_DT_SIMPLEFB
|
||||
+#endif
|
||||
+
|
||||
/* Ethernet support */
|
||||
#ifdef CONFIG_SUNXI_EMAC
|
||||
#define CONFIG_PHY_ADDR 1
|
||||
@ -2,10 +2,10 @@ diff --git a/configs/A20-OLinuXino-Lime2-eMMC_defconfig b/configs/A20-OLinuXino-
|
||||
index f817b8c..ee7b429
|
||||
--- a/configs/A20-OLinuXino-Lime2-eMMC_defconfig
|
||||
+++ b/configs/A20-OLinuXino-Lime2-eMMC_defconfig
|
||||
@@ -27,7 +27,6 @@ CONFIG_RGMII=y
|
||||
@@ -27,7 +27,6 @@ CONFIG_DFU_RAM=y
|
||||
CONFIG_ETH_DESIGNWARE=y
|
||||
CONFIG_RGMII=y
|
||||
CONFIG_SUN7I_GMAC=y
|
||||
CONFIG_PHY_MICREL=y
|
||||
CONFIG_PHY_MICREL_KSZ90X1=y
|
||||
-CONFIG_AXP_ALDO3_VOLT=2800
|
||||
CONFIG_AXP_ALDO4_VOLT=2800
|
||||
CONFIG_SCSI=y
|
||||
|
||||
Loading…
Reference in New Issue
Block a user