mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
uboot: introduce u-boot-sunxi-v2023.04 for Allwinner boards using 23.04 u-boot (eg orangepiplus2e)
- drop `allwinner-fix-nand-spl.patch` which has been mainlined - hammer `allwinner-boot-splash.patch` since Kconfig changed a bit upstream
This commit is contained in:
@@ -2,12 +2,15 @@
|
||||
BOARD_NAME="Orange Pi+ 2E"
|
||||
BOARDFAMILY="sun8i"
|
||||
BOOTCONFIG="orangepi_plus2e_defconfig"
|
||||
BOOTBRANCH_BOARD="tag:v2023.04"
|
||||
KERNEL_TARGET="legacy,current,edge"
|
||||
FULL_DESKTOP="yes"
|
||||
|
||||
# newer uboot for this board
|
||||
BOOTBRANCH_BOARD="tag:v2023.04"
|
||||
BOOTPATCHDIR="u-boot-sunxi-v2023.04"
|
||||
|
||||
function post_family_tweaks_bsp__orangepiplus2e_BSP() {
|
||||
display_alert "Installing BSP firmware and fixups"
|
||||
display_alert "Installing BSP firmware and fixups"
|
||||
|
||||
if [[ $BRANCH == legacy ]]; then
|
||||
|
||||
|
||||
@@ -0,0 +1,509 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Mavrodiev <stefan@olimex.com>
|
||||
Date: Tue, 6 Feb 2018 15:14:33 +0200
|
||||
Subject: arm: sunxi: Allwinner A10 SPI driver
|
||||
|
||||
Add spi driver for sun4i, sun5i and sun7i SoCs. The driver is
|
||||
adapted from mailine kernel.
|
||||
|
||||
Signed-off-by: Stefan Mavrodiev <stefan@olimex.com>
|
||||
Reviewed-by: Jagan Teki <jagan@openedev.com>
|
||||
---
|
||||
drivers/spi/Kconfig | 5 +
|
||||
drivers/spi/Makefile | 1 +
|
||||
drivers/spi/sun4i_spi.c | 456 ++++++++++
|
||||
3 files changed, 462 insertions(+)
|
||||
|
||||
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
|
||||
index cdd2304aeb..b6257b0787 100644
|
||||
--- a/drivers/spi/Kconfig
|
||||
+++ b/drivers/spi/Kconfig
|
||||
@@ -493,6 +493,11 @@ config STM32_SPI
|
||||
SoCs. This uses driver model and requires a device tree binding to
|
||||
operate.
|
||||
|
||||
+config SUN4I_SPI
|
||||
+ bool "Allwinner A10 SoCs SPI controller"
|
||||
+ help
|
||||
+ SPI driver for Allwinner sun4i, sun5i and sun7i SoCs
|
||||
+
|
||||
config TEGRA114_SPI
|
||||
bool "nVidia Tegra114 SPI driver"
|
||||
help
|
||||
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
|
||||
index 95dba9ac45..4bab89371e 100644
|
||||
--- a/drivers/spi/Makefile
|
||||
+++ b/drivers/spi/Makefile
|
||||
@@ -72,6 +72,7 @@ obj-$(CONFIG_SPI_SUNXI) += spi-sunxi.o
|
||||
obj-$(CONFIG_SH_QSPI) += sh_qspi.o
|
||||
obj-$(CONFIG_STM32_QSPI) += stm32_qspi.o
|
||||
obj-$(CONFIG_STM32_SPI) += stm32_spi.o
|
||||
+obj-$(CONFIG_SUN4I_SPI) += sun4i_spi.o
|
||||
obj-$(CONFIG_TEGRA114_SPI) += tegra114_spi.o
|
||||
obj-$(CONFIG_TEGRA20_SFLASH) += tegra20_sflash.o
|
||||
obj-$(CONFIG_TEGRA20_SLINK) += tegra20_slink.o
|
||||
diff --git a/drivers/spi/sun4i_spi.c b/drivers/spi/sun4i_spi.c
|
||||
new file mode 100644
|
||||
index 0000000000..b86b5a00ad
|
||||
--- /dev/null
|
||||
+++ b/drivers/spi/sun4i_spi.c
|
||||
@@ -0,0 +1,456 @@
|
||||
+/*
|
||||
+ * (C) Copyright 2017 Whitebox Systems / Northend Systems B.V.
|
||||
+ * S.J.R. van Schaik <stephan@whiteboxsystems.nl>
|
||||
+ * M.B.W. Wajer <merlijn@whiteboxsystems.nl>
|
||||
+ *
|
||||
+ * (C) Copyright 2017 Olimex Ltd..
|
||||
+ * Stefan Mavrodiev <stefan@olimex.com>
|
||||
+ *
|
||||
+ * Based on linux spi driver. Original copyright follows:
|
||||
+ * linux/drivers/spi/spi-sun4i.c
|
||||
+ *
|
||||
+ * Copyright (C) 2012 - 2014 Allwinner Tech
|
||||
+ * Pan Nan <pannan@allwinnertech.com>
|
||||
+ *
|
||||
+ * Copyright (C) 2014 Maxime Ripard
|
||||
+ * Maxime Ripard <maxime.ripard@free-electrons.com>
|
||||
+ *
|
||||
+ * SPDX-License-Identifier: GPL-2.0+
|
||||
+ */
|
||||
+
|
||||
+#include <common.h>
|
||||
+#include <dm.h>
|
||||
+#include <spi.h>
|
||||
+#include <errno.h>
|
||||
+#include <fdt_support.h>
|
||||
+#include <wait_bit.h>
|
||||
+
|
||||
+#include <asm/bitops.h>
|
||||
+#include <asm/gpio.h>
|
||||
+#include <asm/io.h>
|
||||
+
|
||||
+#include <asm/arch/clock.h>
|
||||
+
|
||||
+#define SUN4I_FIFO_DEPTH 64
|
||||
+
|
||||
+#define SUN4I_RXDATA_REG 0x00
|
||||
+
|
||||
+#define SUN4I_TXDATA_REG 0x04
|
||||
+
|
||||
+#define SUN4I_CTL_REG 0x08
|
||||
+#define SUN4I_CTL_ENABLE BIT(0)
|
||||
+#define SUN4I_CTL_MASTER BIT(1)
|
||||
+#define SUN4I_CTL_CPHA BIT(2)
|
||||
+#define SUN4I_CTL_CPOL BIT(3)
|
||||
+#define SUN4I_CTL_CS_ACTIVE_LOW BIT(4)
|
||||
+#define SUN4I_CTL_LMTF BIT(6)
|
||||
+#define SUN4I_CTL_TF_RST BIT(8)
|
||||
+#define SUN4I_CTL_RF_RST BIT(9)
|
||||
+#define SUN4I_CTL_XCH_MASK 0x0400
|
||||
+#define SUN4I_CTL_XCH BIT(10)
|
||||
+#define SUN4I_CTL_CS_MASK 0x3000
|
||||
+#define SUN4I_CTL_CS(cs) (((cs) << 12) & SUN4I_CTL_CS_MASK)
|
||||
+#define SUN4I_CTL_DHB BIT(15)
|
||||
+#define SUN4I_CTL_CS_MANUAL BIT(16)
|
||||
+#define SUN4I_CTL_CS_LEVEL BIT(17)
|
||||
+#define SUN4I_CTL_TP BIT(18)
|
||||
+
|
||||
+#define SUN4I_INT_CTL_REG 0x0c
|
||||
+#define SUN4I_INT_CTL_RF_F34 BIT(4)
|
||||
+#define SUN4I_INT_CTL_TF_E34 BIT(12)
|
||||
+#define SUN4I_INT_CTL_TC BIT(16)
|
||||
+
|
||||
+#define SUN4I_INT_STA_REG 0x10
|
||||
+
|
||||
+#define SUN4I_DMA_CTL_REG 0x14
|
||||
+
|
||||
+#define SUN4I_WAIT_REG 0x18
|
||||
+
|
||||
+#define SUN4I_CLK_CTL_REG 0x1c
|
||||
+#define SUN4I_CLK_CTL_CDR2_MASK 0xff
|
||||
+#define SUN4I_CLK_CTL_CDR2(div) ((div) & SUN4I_CLK_CTL_CDR2_MASK)
|
||||
+#define SUN4I_CLK_CTL_CDR1_MASK 0xf
|
||||
+#define SUN4I_CLK_CTL_CDR1(div) (((div) & SUN4I_CLK_CTL_CDR1_MASK) << 8)
|
||||
+#define SUN4I_CLK_CTL_DRS BIT(12)
|
||||
+
|
||||
+#define SUN4I_MAX_XFER_SIZE 0xffffff
|
||||
+
|
||||
+#define SUN4I_BURST_CNT_REG 0x20
|
||||
+#define SUN4I_BURST_CNT(cnt) ((cnt) & SUN4I_MAX_XFER_SIZE)
|
||||
+
|
||||
+#define SUN4I_XMIT_CNT_REG 0x24
|
||||
+#define SUN4I_XMIT_CNT(cnt) ((cnt) & SUN4I_MAX_XFER_SIZE)
|
||||
+
|
||||
+#define SUN4I_FIFO_STA_REG 0x28
|
||||
+#define SUN4I_FIFO_STA_RF_CNT_MASK 0x7f
|
||||
+#define SUN4I_FIFO_STA_RF_CNT_BITS 0
|
||||
+#define SUN4I_FIFO_STA_TF_CNT_MASK 0x7f
|
||||
+#define SUN4I_FIFO_STA_TF_CNT_BITS 16
|
||||
+
|
||||
+#define SUN4I_SPI_MAX_RATE 24000000
|
||||
+#define SUN4I_SPI_MIN_RATE 3000
|
||||
+#define SUN4I_SPI_DEFAULT_RATE 1000000
|
||||
+#define SUN4I_SPI_TIMEOUT_US 1000000
|
||||
+
|
||||
+/* sun4i spi register set */
|
||||
+struct sun4i_spi_regs {
|
||||
+ u32 rxdata;
|
||||
+ u32 txdata;
|
||||
+ u32 ctl;
|
||||
+ u32 intctl;
|
||||
+ u32 st;
|
||||
+ u32 dmactl;
|
||||
+ u32 wait;
|
||||
+ u32 cctl;
|
||||
+ u32 bc;
|
||||
+ u32 tc;
|
||||
+ u32 fifo_sta;
|
||||
+};
|
||||
+
|
||||
+struct sun4i_spi_platdata {
|
||||
+ u32 base_addr;
|
||||
+ u32 max_hz;
|
||||
+};
|
||||
+
|
||||
+struct sun4i_spi_priv {
|
||||
+ struct sun4i_spi_regs *regs;
|
||||
+ u32 freq;
|
||||
+ u32 mode;
|
||||
+
|
||||
+ const u8 *tx_buf;
|
||||
+ u8 *rx_buf;
|
||||
+};
|
||||
+
|
||||
+DECLARE_GLOBAL_DATA_PTR;
|
||||
+
|
||||
+static inline void sun4i_spi_drain_fifo(struct sun4i_spi_priv *priv, int len)
|
||||
+{
|
||||
+ u8 byte;
|
||||
+
|
||||
+ while (len--) {
|
||||
+ byte = readb(&priv->regs->rxdata);
|
||||
+ *priv->rx_buf++ = byte;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static inline void sun4i_spi_fill_fifo(struct sun4i_spi_priv *priv, int len)
|
||||
+{
|
||||
+ u8 byte;
|
||||
+
|
||||
+ while (len--) {
|
||||
+ byte = priv->tx_buf ? *priv->tx_buf++ : 0;
|
||||
+ writeb(byte, &priv->regs->txdata);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void sun4i_spi_set_cs(struct udevice *bus, u8 cs, bool enable)
|
||||
+{
|
||||
+ struct sun4i_spi_priv *priv = dev_get_priv(bus);
|
||||
+ u32 reg;
|
||||
+
|
||||
+ reg = readl(&priv->regs->ctl);
|
||||
+
|
||||
+ reg &= ~SUN4I_CTL_CS_MASK;
|
||||
+ reg |= SUN4I_CTL_CS(cs);
|
||||
+
|
||||
+ if (enable)
|
||||
+ reg &= ~SUN4I_CTL_CS_LEVEL;
|
||||
+ else
|
||||
+ reg |= SUN4I_CTL_CS_LEVEL;
|
||||
+
|
||||
+ writel(reg, &priv->regs->ctl);
|
||||
+}
|
||||
+
|
||||
+static int sun4i_spi_parse_pins(struct udevice *dev)
|
||||
+{
|
||||
+ const void *fdt = gd->fdt_blob;
|
||||
+ const char *pin_name;
|
||||
+ const fdt32_t *list;
|
||||
+ u32 phandle;
|
||||
+ int drive, pull = 0, pin, i;
|
||||
+ int offset;
|
||||
+ int size;
|
||||
+
|
||||
+ list = fdt_getprop(fdt, dev_of_offset(dev), "pinctrl-0", &size);
|
||||
+ if (!list) {
|
||||
+ printf("WARNING: sun4i_spi: cannot find pinctrl-0 node\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ while (size) {
|
||||
+ phandle = fdt32_to_cpu(*list++);
|
||||
+ size -= sizeof(*list);
|
||||
+
|
||||
+ offset = fdt_node_offset_by_phandle(fdt, phandle);
|
||||
+ if (offset < 0)
|
||||
+ return offset;
|
||||
+
|
||||
+ drive = fdt_getprop_u32_default_node(fdt, offset, 0,
|
||||
+ "drive-strength", 0);
|
||||
+ if (drive) {
|
||||
+ if (drive <= 10)
|
||||
+ drive = 0;
|
||||
+ else if (drive <= 20)
|
||||
+ drive = 1;
|
||||
+ else if (drive <= 30)
|
||||
+ drive = 2;
|
||||
+ else
|
||||
+ drive = 3;
|
||||
+ } else {
|
||||
+ drive = fdt_getprop_u32_default_node(fdt, offset, 0,
|
||||
+ "allwinner,drive",
|
||||
+ 0);
|
||||
+ drive = min(drive, 3);
|
||||
+ }
|
||||
+
|
||||
+ if (fdt_get_property(fdt, offset, "bias-disable", NULL))
|
||||
+ pull = 0;
|
||||
+ else if (fdt_get_property(fdt, offset, "bias-pull-up", NULL))
|
||||
+ pull = 1;
|
||||
+ else if (fdt_get_property(fdt, offset, "bias-pull-down", NULL))
|
||||
+ pull = 2;
|
||||
+ else
|
||||
+ pull = fdt_getprop_u32_default_node(fdt, offset, 0,
|
||||
+ "allwinner,pull",
|
||||
+ 0);
|
||||
+ pull = min(pull, 2);
|
||||
+
|
||||
+ for (i = 0; ; i++) {
|
||||
+ pin_name = fdt_stringlist_get(fdt, offset,
|
||||
+ "pins", i, NULL);
|
||||
+ if (!pin_name) {
|
||||
+ pin_name = fdt_stringlist_get(fdt, offset,
|
||||
+ "allwinner,pins",
|
||||
+ i, NULL);
|
||||
+ if (!pin_name)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ pin = name_to_gpio(pin_name);
|
||||
+ if (pin < 0)
|
||||
+ break;
|
||||
+
|
||||
+ sunxi_gpio_set_cfgpin(pin, SUNXI_GPC_SPI0);
|
||||
+ sunxi_gpio_set_drv(pin, drive);
|
||||
+ sunxi_gpio_set_pull(pin, pull);
|
||||
+ }
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static inline void sun4i_spi_enable_clock(void)
|
||||
+{
|
||||
+ struct sunxi_ccm_reg *const ccm =
|
||||
+ (struct sunxi_ccm_reg *const)SUNXI_CCM_BASE;
|
||||
+
|
||||
+ setbits_le32(&ccm->ahb_gate0, (1 << AHB_GATE_OFFSET_SPI0));
|
||||
+ writel((1 << 31), &ccm->spi0_clk_cfg);
|
||||
+}
|
||||
+
|
||||
+static int sun4i_spi_ofdata_to_platdata(struct udevice *bus)
|
||||
+{
|
||||
+ struct sun4i_spi_platdata *plat = dev_get_platdata(bus);
|
||||
+ int node = dev_of_offset(bus);
|
||||
+
|
||||
+ plat->base_addr = devfdt_get_addr(bus);
|
||||
+ plat->max_hz = fdtdec_get_int(gd->fdt_blob, node,
|
||||
+ "spi-max-frequency",
|
||||
+ SUN4I_SPI_DEFAULT_RATE);
|
||||
+
|
||||
+ if (plat->max_hz > SUN4I_SPI_MAX_RATE)
|
||||
+ plat->max_hz = SUN4I_SPI_MAX_RATE;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int sun4i_spi_probe(struct udevice *bus)
|
||||
+{
|
||||
+ struct sun4i_spi_platdata *plat = dev_get_platdata(bus);
|
||||
+ struct sun4i_spi_priv *priv = dev_get_priv(bus);
|
||||
+
|
||||
+ sun4i_spi_enable_clock();
|
||||
+ sun4i_spi_parse_pins(bus);
|
||||
+
|
||||
+ priv->regs = (struct sun4i_spi_regs *)(uintptr_t)plat->base_addr;
|
||||
+ priv->freq = plat->max_hz;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int sun4i_spi_claim_bus(struct udevice *dev)
|
||||
+{
|
||||
+ struct sun4i_spi_priv *priv = dev_get_priv(dev->parent);
|
||||
+
|
||||
+ writel(SUN4I_CTL_ENABLE | SUN4I_CTL_MASTER | SUN4I_CTL_TP |
|
||||
+ SUN4I_CTL_CS_MANUAL | SUN4I_CTL_CS_ACTIVE_LOW,
|
||||
+ &priv->regs->ctl);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int sun4i_spi_release_bus(struct udevice *dev)
|
||||
+{
|
||||
+ struct sun4i_spi_priv *priv = dev_get_priv(dev->parent);
|
||||
+ u32 reg;
|
||||
+
|
||||
+ reg = readl(&priv->regs->ctl);
|
||||
+ reg &= ~SUN4I_CTL_ENABLE;
|
||||
+ writel(reg, &priv->regs->ctl);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int sun4i_spi_xfer(struct udevice *dev, unsigned int bitlen,
|
||||
+ const void *dout, void *din, unsigned long flags)
|
||||
+{
|
||||
+ struct udevice *bus = dev->parent;
|
||||
+ struct sun4i_spi_priv *priv = dev_get_priv(bus);
|
||||
+ struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
|
||||
+
|
||||
+ u32 len = bitlen / 8;
|
||||
+ u32 reg;
|
||||
+ u8 nbytes;
|
||||
+ int ret;
|
||||
+
|
||||
+ priv->tx_buf = dout;
|
||||
+ priv->rx_buf = din;
|
||||
+
|
||||
+ if (bitlen % 8) {
|
||||
+ debug("%s: non byte-aligned SPI transfer.\n", __func__);
|
||||
+ return -ENAVAIL;
|
||||
+ }
|
||||
+
|
||||
+ if (flags & SPI_XFER_BEGIN)
|
||||
+ sun4i_spi_set_cs(bus, slave_plat->cs, true);
|
||||
+
|
||||
+ reg = readl(&priv->regs->ctl);
|
||||
+
|
||||
+ /* Reset FIFOs */
|
||||
+ writel(reg | SUN4I_CTL_RF_RST | SUN4I_CTL_TF_RST, &priv->regs->ctl);
|
||||
+
|
||||
+ while (len) {
|
||||
+ /* Setup the transfer now... */
|
||||
+ nbytes = min(len, (u32)(SUN4I_FIFO_DEPTH - 1));
|
||||
+
|
||||
+ /* Setup the counters */
|
||||
+ writel(SUN4I_BURST_CNT(nbytes), &priv->regs->bc);
|
||||
+ writel(SUN4I_XMIT_CNT(nbytes), &priv->regs->tc);
|
||||
+
|
||||
+ /* Fill the TX FIFO */
|
||||
+ sun4i_spi_fill_fifo(priv, nbytes);
|
||||
+
|
||||
+ /* Start the transfer */
|
||||
+ reg = readl(&priv->regs->ctl);
|
||||
+ writel(reg | SUN4I_CTL_XCH, &priv->regs->ctl);
|
||||
+
|
||||
+ /* Wait transfer to complete */
|
||||
+ ret = wait_for_bit_le32(&priv->regs->ctl, SUN4I_CTL_XCH_MASK,
|
||||
+ false, SUN4I_SPI_TIMEOUT_US, false);
|
||||
+ if (ret) {
|
||||
+ printf("ERROR: sun4i_spi: Timeout transferring data\n");
|
||||
+ sun4i_spi_set_cs(bus, slave_plat->cs, false);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ /* Drain the RX FIFO */
|
||||
+ sun4i_spi_drain_fifo(priv, nbytes);
|
||||
+
|
||||
+ len -= nbytes;
|
||||
+ }
|
||||
+
|
||||
+ if (flags & SPI_XFER_END)
|
||||
+ sun4i_spi_set_cs(bus, slave_plat->cs, false);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int sun4i_spi_set_speed(struct udevice *dev, uint speed)
|
||||
+{
|
||||
+ struct sun4i_spi_platdata *plat = dev_get_platdata(dev);
|
||||
+ struct sun4i_spi_priv *priv = dev_get_priv(dev);
|
||||
+ unsigned int div;
|
||||
+ u32 reg;
|
||||
+
|
||||
+ if (speed > plat->max_hz)
|
||||
+ speed = plat->max_hz;
|
||||
+
|
||||
+ if (speed < SUN4I_SPI_MIN_RATE)
|
||||
+ speed = SUN4I_SPI_MIN_RATE;
|
||||
+ /*
|
||||
+ * Setup clock divider.
|
||||
+ *
|
||||
+ * We have two choices there. Either we can use the clock
|
||||
+ * divide rate 1, which is calculated thanks to this formula:
|
||||
+ * SPI_CLK = MOD_CLK / (2 ^ (cdr + 1))
|
||||
+ * Or we can use CDR2, which is calculated with the formula:
|
||||
+ * SPI_CLK = MOD_CLK / (2 * (cdr + 1))
|
||||
+ * Whether we use the former or the latter is set through the
|
||||
+ * DRS bit.
|
||||
+ *
|
||||
+ * First try CDR2, and if we can't reach the expected
|
||||
+ * frequency, fall back to CDR1.
|
||||
+ */
|
||||
+
|
||||
+ div = SUN4I_SPI_MAX_RATE / (2 * speed);
|
||||
+ reg = readl(&priv->regs->cctl);
|
||||
+
|
||||
+ if (div <= (SUN4I_CLK_CTL_CDR2_MASK + 1)) {
|
||||
+ if (div > 0)
|
||||
+ div--;
|
||||
+
|
||||
+ reg &= ~(SUN4I_CLK_CTL_CDR2_MASK | SUN4I_CLK_CTL_DRS);
|
||||
+ reg |= SUN4I_CLK_CTL_CDR2(div) | SUN4I_CLK_CTL_DRS;
|
||||
+ } else {
|
||||
+ div = __ilog2(SUN4I_SPI_MAX_RATE) - __ilog2(speed);
|
||||
+ reg &= ~((SUN4I_CLK_CTL_CDR1_MASK << 8) | SUN4I_CLK_CTL_DRS);
|
||||
+ reg |= SUN4I_CLK_CTL_CDR1(div);
|
||||
+ }
|
||||
+
|
||||
+ priv->freq = speed;
|
||||
+ writel(reg, &priv->regs->cctl);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int sun4i_spi_set_mode(struct udevice *dev, uint mode)
|
||||
+{
|
||||
+ struct sun4i_spi_priv *priv = dev_get_priv(dev);
|
||||
+ u32 reg;
|
||||
+
|
||||
+ reg = readl(&priv->regs->ctl);
|
||||
+ reg &= ~(SUN4I_CTL_CPOL | SUN4I_CTL_CPHA);
|
||||
+
|
||||
+ if (mode & SPI_CPOL)
|
||||
+ reg |= SUN4I_CTL_CPOL;
|
||||
+
|
||||
+ if (mode & SPI_CPHA)
|
||||
+ reg |= SUN4I_CTL_CPHA;
|
||||
+
|
||||
+ priv->mode = mode;
|
||||
+ writel(reg, &priv->regs->ctl);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct dm_spi_ops sun4i_spi_ops = {
|
||||
+ .claim_bus = sun4i_spi_claim_bus,
|
||||
+ .release_bus = sun4i_spi_release_bus,
|
||||
+ .xfer = sun4i_spi_xfer,
|
||||
+ .set_speed = sun4i_spi_set_speed,
|
||||
+ .set_mode = sun4i_spi_set_mode,
|
||||
+};
|
||||
+
|
||||
+static const struct udevice_id sun4i_spi_ids[] = {
|
||||
+ { .compatible = "allwinner,sun4i-a10-spi" },
|
||||
+ { }
|
||||
+};
|
||||
+
|
||||
+U_BOOT_DRIVER(sun4i_spi) = {
|
||||
+ .name = "sun4i_spi",
|
||||
+ .id = UCLASS_SPI,
|
||||
+ .of_match = sun4i_spi_ids,
|
||||
+ .ops = &sun4i_spi_ops,
|
||||
+ .ofdata_to_platdata = sun4i_spi_ofdata_to_platdata,
|
||||
+ .platdata_auto_alloc_size = sizeof(struct sun4i_spi_platdata),
|
||||
+ .priv_auto_alloc_size = sizeof(struct sun4i_spi_priv),
|
||||
+ .probe = sun4i_spi_probe,
|
||||
+};
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,280 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: ThomasKaiser <github@kaiser-edv.de>
|
||||
Date: Sat, 18 Nov 2017 08:10:05 -0800
|
||||
Subject: [ARCHEOLOGY] Consolidate sunxi DRAM clockspeed adjustments
|
||||
|
||||
> X-Git-Archeology: > recovered message: > https://forum.armbian.com/topic/4921-orange-pi-zero-plus-h5-chip/?do=findComment&comment=43900
|
||||
> X-Git-Archeology: - Revision f043d0aaec32d6374b5cbd42fb6862b66650ec18: https://github.com/armbian/build/commit/f043d0aaec32d6374b5cbd42fb6862b66650ec18
|
||||
> X-Git-Archeology: Date: Sat, 18 Nov 2017 08:10:05 -0800
|
||||
> X-Git-Archeology: From: ThomasKaiser <github@kaiser-edv.de>
|
||||
> X-Git-Archeology: Subject: Consolidate sunxi DRAM clockspeed adjustments
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision 6a782a29a50b3c4ad52e5aa855f8b6708cdc84cd: https://github.com/armbian/build/commit/6a782a29a50b3c4ad52e5aa855f8b6708cdc84cd
|
||||
> X-Git-Archeology: Date: Fri, 24 Nov 2017 05:26:43 -0800
|
||||
> X-Git-Archeology: From: ThomasKaiser <github@kaiser-edv.de>
|
||||
> X-Git-Archeology: Subject: Prepare upstream NEO Plus 2 u-boot submission
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision 2c08ec8f5a210de35f9482f482ac01ea15381792: https://github.com/armbian/build/commit/2c08ec8f5a210de35f9482f482ac01ea15381792
|
||||
> X-Git-Archeology: Date: Thu, 24 May 2018 13:32:29 +0200
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igor.pecovnik@gmail.com>
|
||||
> X-Git-Archeology: Subject: Merge sunxi family into stable
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision 1a12994e79b6ef173dc58efe4df8919cb6cc7781: https://github.com/armbian/build/commit/1a12994e79b6ef173dc58efe4df8919cb6cc7781
|
||||
> X-Git-Archeology: Date: Tue, 17 Jul 2018 15:53:30 +0200
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Moving sunxi-next to 4.17.y (#1049)
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision aafb70a9a326afddc4494efcffb9e715b5fae66c: https://github.com/armbian/build/commit/aafb70a9a326afddc4494efcffb9e715b5fae66c
|
||||
> X-Git-Archeology: Date: Mon, 25 Nov 2019 19:51:06 -0500
|
||||
> X-Git-Archeology: From: Martin Ayotte <martinayotte@yahoo.ca>
|
||||
> X-Git-Archeology: Subject: switch to 5.4.y
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision 42201fd3fc1386c6dc8785c4f85db35289bfe2db: https://github.com/armbian/build/commit/42201fd3fc1386c6dc8785c4f85db35289bfe2db
|
||||
> X-Git-Archeology: Date: Sun, 01 Mar 2020 16:54:20 -0800
|
||||
> X-Git-Archeology: From: 5kft <5kft@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: [ sunxi ] lower DDR clock rate to 504MHz for H5 boards
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision 5e8cbd8e6aaa87ee03d08c761d5e765e81c4c686: https://github.com/armbian/build/commit/5e8cbd8e6aaa87ee03d08c761d5e765e81c4c686
|
||||
> X-Git-Archeology: Date: Fri, 17 Apr 2020 23:44:35 +0200
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Switch sunxi and sunxi64 to u-boot v2020.04 (#1894)
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision ce6783c07ff7a4b0e44bd69521253756ad08f368: https://github.com/armbian/build/commit/ce6783c07ff7a4b0e44bd69521253756ad08f368
|
||||
> X-Git-Archeology: Date: Thu, 15 Oct 2020 21:30:54 +0200
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igor.pecovnik@gmail.com>
|
||||
> X-Git-Archeology: Subject: Adjust remaining Allwinner u-boot patches due to u-boot upgrade to 2020.10
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision 8277822addfb690716f431c2f29a59effe7dd16f: https://github.com/armbian/build/commit/8277822addfb690716f431c2f29a59effe7dd16f
|
||||
> X-Git-Archeology: Date: Tue, 06 Apr 2021 11:42:56 +0200
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Bump Allwinner u-boot to 2021.04 (#2745)
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision d2fba532a6c06cd6ca93af66da129490a96e5452: https://github.com/armbian/build/commit/d2fba532a6c06cd6ca93af66da129490a96e5452
|
||||
> X-Git-Archeology: Date: Thu, 07 Oct 2021 19:26:06 +0200
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: allwinner: update u-boot to 2021.07 (#3143)
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision bd54236f9f1c4ed055e174a9a81d631f61ae9e55: https://github.com/armbian/build/commit/bd54236f9f1c4ed055e174a9a81d631f61ae9e55
|
||||
> X-Git-Archeology: Date: Sat, 09 Oct 2021 17:57:56 +0200
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Update u-boot to 2021.10 (#3182)
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision f6a09def35e647a5442e0f92f399485be29f19a9: https://github.com/armbian/build/commit/f6a09def35e647a5442e0f92f399485be29f19a9
|
||||
> X-Git-Archeology: Date: Thu, 10 Nov 2022 21:49:36 +0100
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Moving patches to per board and removing obsolete (#4409)
|
||||
> X-Git-Archeology:
|
||||
---
|
||||
configs/Lamobo_R1_defconfig | 2 +-
|
||||
configs/Linksprite_pcDuino3_defconfig | 2 +-
|
||||
configs/Orangepi_defconfig | 2 +-
|
||||
configs/Orangepi_mini_defconfig | 2 +-
|
||||
configs/a64-olinuxino_defconfig | 2 ++
|
||||
configs/nanopi_m1_plus_defconfig | 2 +-
|
||||
configs/nanopi_neo_plus2_defconfig | 2 +-
|
||||
configs/orangepi_lite_defconfig | 4 +++-
|
||||
configs/orangepi_one_defconfig | 4 +++-
|
||||
configs/orangepi_pc2_defconfig | 3 ++-
|
||||
configs/orangepi_plus2e_defconfig | 4 +++-
|
||||
configs/orangepi_plus_defconfig | 4 +++-
|
||||
configs/orangepi_prime_defconfig | 3 ++-
|
||||
configs/orangepi_zero_plus2_defconfig | 2 +-
|
||||
14 files changed, 25 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/configs/Lamobo_R1_defconfig b/configs/Lamobo_R1_defconfig
|
||||
index 5294608459..8118635190 100644
|
||||
--- a/configs/Lamobo_R1_defconfig
|
||||
+++ b/configs/Lamobo_R1_defconfig
|
||||
@@ -3,7 +3,7 @@ CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-lamobo-r1"
|
||||
CONFIG_SPL=y
|
||||
CONFIG_MACH_SUN7I=y
|
||||
-CONFIG_DRAM_CLK=432
|
||||
+CONFIG_DRAM_CLK=384
|
||||
CONFIG_MACPWR="PH23"
|
||||
CONFIG_SATAPWR="PB3"
|
||||
CONFIG_GMAC_TX_DELAY=4
|
||||
diff --git a/configs/Linksprite_pcDuino3_defconfig b/configs/Linksprite_pcDuino3_defconfig
|
||||
index 1fda0db4c9..e38d986ccd 100644
|
||||
--- a/configs/Linksprite_pcDuino3_defconfig
|
||||
+++ b/configs/Linksprite_pcDuino3_defconfig
|
||||
@@ -3,7 +3,7 @@ CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-pcduino3"
|
||||
CONFIG_SPL=y
|
||||
CONFIG_MACH_SUN7I=y
|
||||
-CONFIG_DRAM_CLK=480
|
||||
+CONFIG_DRAM_CLK=408
|
||||
CONFIG_DRAM_ZQ=122
|
||||
CONFIG_SATAPWR="PH2"
|
||||
CONFIG_AHCI=y
|
||||
diff --git a/configs/Orangepi_defconfig b/configs/Orangepi_defconfig
|
||||
index c89a9a1f9d..3405f3d70d 100644
|
||||
--- a/configs/Orangepi_defconfig
|
||||
+++ b/configs/Orangepi_defconfig
|
||||
@@ -3,7 +3,7 @@ CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-orangepi"
|
||||
CONFIG_SPL=y
|
||||
CONFIG_MACH_SUN7I=y
|
||||
-CONFIG_DRAM_CLK=432
|
||||
+CONFIG_DRAM_CLK=384
|
||||
CONFIG_MACPWR="PH23"
|
||||
CONFIG_USB1_VBUS_PIN="PH26"
|
||||
CONFIG_USB2_VBUS_PIN="PH22"
|
||||
diff --git a/configs/Orangepi_mini_defconfig b/configs/Orangepi_mini_defconfig
|
||||
index fe9ce808a1..7296c70e94 100644
|
||||
--- a/configs/Orangepi_mini_defconfig
|
||||
+++ b/configs/Orangepi_mini_defconfig
|
||||
@@ -3,7 +3,7 @@ CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-orangepi-mini"
|
||||
CONFIG_SPL=y
|
||||
CONFIG_MACH_SUN7I=y
|
||||
-CONFIG_DRAM_CLK=432
|
||||
+CONFIG_DRAM_CLK=384
|
||||
CONFIG_MACPWR="PH23"
|
||||
CONFIG_MMC_SUNXI_SLOT_EXTRA=3
|
||||
CONFIG_USB1_VBUS_PIN="PH26"
|
||||
diff --git a/configs/a64-olinuxino_defconfig b/configs/a64-olinuxino_defconfig
|
||||
index 16cef18bee..99fa24ae23 100644
|
||||
--- a/configs/a64-olinuxino_defconfig
|
||||
+++ b/configs/a64-olinuxino_defconfig
|
||||
@@ -6,6 +6,8 @@ CONFIG_MACH_SUN50I=y
|
||||
CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
|
||||
CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
+CONFIG_DRAM_CLK=624
|
||||
+CONFIG_DRAM_ZQ=3881949
|
||||
CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
diff --git a/configs/nanopi_m1_plus_defconfig b/configs/nanopi_m1_plus_defconfig
|
||||
index 76655d79ae..ffef239c53 100644
|
||||
--- a/configs/nanopi_m1_plus_defconfig
|
||||
+++ b/configs/nanopi_m1_plus_defconfig
|
||||
@@ -3,7 +3,7 @@ CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-m1-plus"
|
||||
CONFIG_SPL=y
|
||||
CONFIG_MACH_SUN8I_H3=y
|
||||
-CONFIG_DRAM_CLK=408
|
||||
+CONFIG_DRAM_CLK=576
|
||||
CONFIG_MACPWR="PD6"
|
||||
CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
diff --git a/configs/nanopi_neo_plus2_defconfig b/configs/nanopi_neo_plus2_defconfig
|
||||
index 924ff38f17..5171cb4800 100644
|
||||
--- a/configs/nanopi_neo_plus2_defconfig
|
||||
+++ b/configs/nanopi_neo_plus2_defconfig
|
||||
@@ -3,7 +3,7 @@ CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-nanopi-neo-plus2"
|
||||
CONFIG_SPL=y
|
||||
CONFIG_MACH_SUN50I_H5=y
|
||||
-CONFIG_DRAM_CLK=408
|
||||
+CONFIG_DRAM_CLK=504
|
||||
CONFIG_DRAM_ZQ=3881977
|
||||
# CONFIG_DRAM_ODT_EN is not set
|
||||
CONFIG_MACPWR="PD6"
|
||||
diff --git a/configs/orangepi_lite_defconfig b/configs/orangepi_lite_defconfig
|
||||
index 96bbd1bab6..ab64319875 100644
|
||||
--- a/configs/orangepi_lite_defconfig
|
||||
+++ b/configs/orangepi_lite_defconfig
|
||||
@@ -3,7 +3,9 @@ CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-lite"
|
||||
CONFIG_SPL=y
|
||||
CONFIG_MACH_SUN8I_H3=y
|
||||
-CONFIG_DRAM_CLK=672
|
||||
+CONFIG_DRAM_CLK=624
|
||||
+CONFIG_DRAM_ZQ=3881979
|
||||
+CONFIG_DRAM_ODT_EN=y
|
||||
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
diff --git a/configs/orangepi_one_defconfig b/configs/orangepi_one_defconfig
|
||||
index 1064b4a39d..cbe2c97f2b 100644
|
||||
--- a/configs/orangepi_one_defconfig
|
||||
+++ b/configs/orangepi_one_defconfig
|
||||
@@ -3,7 +3,9 @@ CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-one"
|
||||
CONFIG_SPL=y
|
||||
CONFIG_MACH_SUN8I_H3=y
|
||||
-CONFIG_DRAM_CLK=672
|
||||
+CONFIG_DRAM_CLK=624
|
||||
+CONFIG_DRAM_ZQ=3881979
|
||||
+CONFIG_DRAM_ODT_EN=y
|
||||
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
diff --git a/configs/orangepi_pc2_defconfig b/configs/orangepi_pc2_defconfig
|
||||
index 777af8c60e..5a7dbd45e8 100644
|
||||
--- a/configs/orangepi_pc2_defconfig
|
||||
+++ b/configs/orangepi_pc2_defconfig
|
||||
@@ -3,8 +3,9 @@ CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-pc2"
|
||||
CONFIG_SPL=y
|
||||
CONFIG_MACH_SUN50I_H5=y
|
||||
-CONFIG_DRAM_CLK=672
|
||||
+CONFIG_DRAM_CLK=504
|
||||
CONFIG_DRAM_ZQ=3881977
|
||||
+CONFIG_DRAM_ODT_EN=y
|
||||
CONFIG_MACPWR="PD6"
|
||||
CONFIG_SPL_SPI_SUNXI=y
|
||||
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
diff --git a/configs/orangepi_plus2e_defconfig b/configs/orangepi_plus2e_defconfig
|
||||
index 138a6a72b8..879f01dcd8 100644
|
||||
--- a/configs/orangepi_plus2e_defconfig
|
||||
+++ b/configs/orangepi_plus2e_defconfig
|
||||
@@ -3,7 +3,9 @@ CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-plus2e"
|
||||
CONFIG_SPL=y
|
||||
CONFIG_MACH_SUN8I_H3=y
|
||||
-CONFIG_DRAM_CLK=672
|
||||
+CONFIG_DRAM_CLK=624
|
||||
+CONFIG_DRAM_ZQ=3881979
|
||||
+CONFIG_DRAM_ODT_EN=y
|
||||
CONFIG_MACPWR="PD6"
|
||||
CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
diff --git a/configs/orangepi_plus_defconfig b/configs/orangepi_plus_defconfig
|
||||
index 76de72aa22..aa3f51e97b 100644
|
||||
--- a/configs/orangepi_plus_defconfig
|
||||
+++ b/configs/orangepi_plus_defconfig
|
||||
@@ -3,7 +3,9 @@ CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-plus"
|
||||
CONFIG_SPL=y
|
||||
CONFIG_MACH_SUN8I_H3=y
|
||||
-CONFIG_DRAM_CLK=672
|
||||
+CONFIG_DRAM_CLK=624
|
||||
+CONFIG_DRAM_ZQ=3881979
|
||||
+CONFIG_DRAM_ODT_EN=y
|
||||
CONFIG_MACPWR="PD6"
|
||||
CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||
CONFIG_USB1_VBUS_PIN="PG13"
|
||||
diff --git a/configs/orangepi_prime_defconfig b/configs/orangepi_prime_defconfig
|
||||
index 95a82e20f3..551348f8c6 100644
|
||||
--- a/configs/orangepi_prime_defconfig
|
||||
+++ b/configs/orangepi_prime_defconfig
|
||||
@@ -3,8 +3,9 @@ CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-prime"
|
||||
CONFIG_SPL=y
|
||||
CONFIG_MACH_SUN50I_H5=y
|
||||
-CONFIG_DRAM_CLK=672
|
||||
+CONFIG_DRAM_CLK=504
|
||||
CONFIG_DRAM_ZQ=3881977
|
||||
+CONFIG_DRAM_ODT_EN=y
|
||||
# CONFIG_DRAM_ODT_EN is not set
|
||||
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
CONFIG_SUN8I_EMAC=y
|
||||
diff --git a/configs/orangepi_zero_plus2_defconfig b/configs/orangepi_zero_plus2_defconfig
|
||||
index 393cb0fc32..53572b792b 100644
|
||||
--- a/configs/orangepi_zero_plus2_defconfig
|
||||
+++ b/configs/orangepi_zero_plus2_defconfig
|
||||
@@ -3,7 +3,7 @@ CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-zero-plus2"
|
||||
CONFIG_SPL=y
|
||||
CONFIG_MACH_SUN50I_H5=y
|
||||
-CONFIG_DRAM_CLK=672
|
||||
+CONFIG_DRAM_CLK=504
|
||||
CONFIG_DRAM_ZQ=3881977
|
||||
# CONFIG_DRAM_ODT_EN is not set
|
||||
CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: The Going <48602507+The-going@users.noreply.github.com>
|
||||
Date: Fri, 1 Apr 2022 22:57:09 +0300
|
||||
Subject: sunxi boot splash
|
||||
|
||||
---
|
||||
cmd/Kconfig | 1 +
|
||||
include/config_distro_bootcmd.h | 9 +++
|
||||
include/configs/sunxi-common.h | 30 ++++++++++
|
||||
3 files changed, 40 insertions(+)
|
||||
|
||||
diff --git a/cmd/Kconfig b/cmd/Kconfig
|
||||
index 2caa4af71c..5a611ef620 100644
|
||||
--- a/cmd/Kconfig
|
||||
+++ b/cmd/Kconfig
|
||||
@@ -1922,6 +1922,7 @@ menu "Misc commands"
|
||||
config CMD_BMP
|
||||
bool "Enable 'bmp' command"
|
||||
depends on VIDEO
|
||||
+ default y
|
||||
help
|
||||
This provides a way to obtain information about a BMP-format image
|
||||
and to display it. BMP (which presumably stands for BitMaP) is a
|
||||
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
|
||||
index 9d2a225e7e..4aa02e2bca 100644
|
||||
--- a/include/config_distro_bootcmd.h
|
||||
+++ b/include/config_distro_bootcmd.h
|
||||
@@ -469,6 +469,15 @@
|
||||
BOOTENV_SHARED_VIRTIO \
|
||||
BOOTENV_SHARED_EXTENSION \
|
||||
"boot_prefixes=/ /boot/\0" \
|
||||
+ "splashpos=m,m\0" \
|
||||
+ "splashimage=66000000\0" \
|
||||
+ "loadsplash= " \
|
||||
+ "for prefix in ${boot_prefixes}; do " \
|
||||
+ "if test -e mmc 0 ${prefix}boot.bmp; then " \
|
||||
+ "load mmc 0 ${splashimage} ${prefix}boot.bmp; " \
|
||||
+ "bmp d ${splashimage}; " \
|
||||
+ "fi; " \
|
||||
+ "done\0" \
|
||||
"boot_scripts=boot.scr.uimg boot.scr\0" \
|
||||
"boot_script_dhcp=boot.scr.uimg\0" \
|
||||
BOOTENV_BOOT_TARGETS \
|
||||
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
|
||||
index d2d70f0fc2..8a4ae69e58 100644
|
||||
--- a/include/configs/sunxi-common.h
|
||||
+++ b/include/configs/sunxi-common.h
|
||||
@@ -97,6 +97,30 @@
|
||||
#define LOW_LEVEL_SRAM_STACK 0x00008000 /* End of sram */
|
||||
#endif
|
||||
|
||||
+#if defined CONFIG_VIDEO || defined CONFIG_DM_VIDEO
|
||||
+#if !defined CONFIG_VIDEO_LOGO
|
||||
+#define CONFIG_VIDEO_LOGO
|
||||
+#endif
|
||||
+#if !defined CONFIG_SPLASH_SCREEN
|
||||
+#define CONFIG_SPLASH_SCREEN
|
||||
+#endif
|
||||
+#if !defined CONFIG_SPLASH_SCREEN_ALIGN
|
||||
+#define CONFIG_SPLASH_SCREEN_ALIGN
|
||||
+#endif
|
||||
+#if !defined CONFIG_BMP_16BPP
|
||||
+#define CONFIG_BMP_16BPP
|
||||
+#endif
|
||||
+#if !defined CONFIG_BMP_24BPP
|
||||
+#define CONFIG_BMP_24BPP
|
||||
+#endif
|
||||
+#if !defined CONFIG_BMP_32BPP
|
||||
+#define CONFIG_BMP_32BPP
|
||||
+#endif
|
||||
+#if !defined CONFIG_VIDEO_BMP_RLE8
|
||||
+#define CONFIG_VIDEO_BMP_RLE8
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
/* Ethernet support */
|
||||
|
||||
#ifdef CONFIG_ARM64
|
||||
@@ -277,8 +301,14 @@
|
||||
#include <config_distro_bootcmd.h>
|
||||
|
||||
#ifdef CONFIG_USB_KEYBOARD
|
||||
+#if defined CONFIG_VIDEO || defined CONFIG_DM_VIDEO
|
||||
+#define CONSOLE_STDIN_SETTINGS \
|
||||
+ "preboot=run loadsplash; usb start\0" \
|
||||
+ "stdin=serial,usbkbd\0"
|
||||
+#else
|
||||
#define CONSOLE_STDIN_SETTINGS \
|
||||
"stdin=serial,usbkbd\0"
|
||||
+#endif
|
||||
#else
|
||||
#define CONSOLE_STDIN_SETTINGS \
|
||||
"stdin=serial\0"
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,323 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||
Date: Fri, 17 Apr 2020 23:44:35 +0200
|
||||
Subject: [ARCHEOLOGY] Switch sunxi and sunxi64 to u-boot v2020.04 (#1894)
|
||||
|
||||
> X-Git-Archeology: > recovered message: > * Disable DE2 in u-boot to improve EDID detection
|
||||
> X-Git-Archeology: > recovered message: > * Remove deprecated patches
|
||||
> X-Git-Archeology: > recovered message: > * Define BOOTBRANCH in top level
|
||||
> X-Git-Archeology: > recovered message: > Signed-off-by: Igor Pecovnik <igor.pecovnik@gmail.com>
|
||||
> X-Git-Archeology: - Revision 5e8cbd8e6aaa87ee03d08c761d5e765e81c4c686: https://github.com/armbian/build/commit/5e8cbd8e6aaa87ee03d08c761d5e765e81c4c686
|
||||
> X-Git-Archeology: Date: Fri, 17 Apr 2020 23:44:35 +0200
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Switch sunxi and sunxi64 to u-boot v2020.04 (#1894)
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision 4ba494ae6ec0515c9e076624bb0ec7fa7f97655d: https://github.com/armbian/build/commit/4ba494ae6ec0515c9e076624bb0ec7fa7f97655d
|
||||
> X-Git-Archeology: Date: Sat, 19 Sep 2020 10:09:05 -0700
|
||||
> X-Git-Archeology: From: 5kft <5kft@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: [ sunxi-dev ] move u-boot to v2020.07
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision ce6783c07ff7a4b0e44bd69521253756ad08f368: https://github.com/armbian/build/commit/ce6783c07ff7a4b0e44bd69521253756ad08f368
|
||||
> X-Git-Archeology: Date: Thu, 15 Oct 2020 21:30:54 +0200
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igor.pecovnik@gmail.com>
|
||||
> X-Git-Archeology: Subject: Adjust remaining Allwinner u-boot patches due to u-boot upgrade to 2020.10
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision 21fc940aaf761bc65f8d81c6e68584757b43c8fb: https://github.com/armbian/build/commit/21fc940aaf761bc65f8d81c6e68584757b43c8fb
|
||||
> X-Git-Archeology: Date: Sun, 31 Jul 2022 10:34:48 +0200
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Several small bug fixes mainly outside supported areas (#4032)
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision f6a09def35e647a5442e0f92f399485be29f19a9: https://github.com/armbian/build/commit/f6a09def35e647a5442e0f92f399485be29f19a9
|
||||
> X-Git-Archeology: Date: Thu, 10 Nov 2022 21:49:36 +0100
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Moving patches to per board and removing obsolete (#4409)
|
||||
> X-Git-Archeology:
|
||||
---
|
||||
configs/Mele_A1000_defconfig | 1 +
|
||||
configs/Orangepi_mini_defconfig | 1 +
|
||||
configs/a64-olinuxino-emmc_defconfig | 1 +
|
||||
configs/a64-olinuxino_defconfig | 1 +
|
||||
configs/bananapi_m1_plus_defconfig | 1 +
|
||||
configs/bananapi_m2_plus_h3_defconfig | 1 +
|
||||
configs/bananapi_m2_plus_h5_defconfig | 1 +
|
||||
configs/bananapi_m2_zero_defconfig | 1 +
|
||||
configs/bananapi_m64_defconfig | 1 +
|
||||
configs/libretech_all_h3_cc_h2_plus_defconfig | 1 +
|
||||
configs/libretech_all_h3_cc_h3_defconfig | 1 +
|
||||
configs/libretech_all_h3_cc_h5_defconfig | 1 +
|
||||
configs/libretech_all_h5_cc_h5_defconfig | 1 +
|
||||
configs/nanopi_a64_defconfig | 1 +
|
||||
configs/nanopi_m1_defconfig | 1 +
|
||||
configs/orangepi_lite2_defconfig | 1 +
|
||||
configs/orangepi_lite_defconfig | 1 +
|
||||
configs/orangepi_one_defconfig | 1 +
|
||||
configs/orangepi_one_plus_defconfig | 1 +
|
||||
configs/orangepi_pc2_defconfig | 1 +
|
||||
configs/orangepi_pc_defconfig | 1 +
|
||||
configs/orangepi_plus2e_defconfig | 1 +
|
||||
configs/orangepi_plus_defconfig | 1 +
|
||||
configs/orangepi_prime_defconfig | 1 +
|
||||
configs/orangepi_win_defconfig | 1 +
|
||||
configs/pine64-lts_defconfig | 1 +
|
||||
configs/pine64_plus_defconfig | 1 +
|
||||
configs/pine_h64_defconfig | 1 +
|
||||
28 files changed, 28 insertions(+)
|
||||
|
||||
diff --git a/configs/Mele_A1000_defconfig b/configs/Mele_A1000_defconfig
|
||||
index f5b6d908cd..9adced2d4b 100644
|
||||
--- a/configs/Mele_A1000_defconfig
|
||||
+++ b/configs/Mele_A1000_defconfig
|
||||
@@ -19,3 +19,4 @@ CONFIG_SUN4I_EMAC=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/Orangepi_mini_defconfig b/configs/Orangepi_mini_defconfig
|
||||
index 7296c70e94..c899fae3db 100644
|
||||
--- a/configs/Orangepi_mini_defconfig
|
||||
+++ b/configs/Orangepi_mini_defconfig
|
||||
@@ -26,3 +26,4 @@ CONFIG_SUN7I_GMAC=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/a64-olinuxino-emmc_defconfig b/configs/a64-olinuxino-emmc_defconfig
|
||||
index 8ec9eb3e9c..4ccb4c8467 100644
|
||||
--- a/configs/a64-olinuxino-emmc_defconfig
|
||||
+++ b/configs/a64-olinuxino-emmc_defconfig
|
||||
@@ -10,3 +10,4 @@ CONFIG_SUPPORT_EMMC_BOOT=y
|
||||
CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/a64-olinuxino_defconfig b/configs/a64-olinuxino_defconfig
|
||||
index 99fa24ae23..d00bd9e7e3 100644
|
||||
--- a/configs/a64-olinuxino_defconfig
|
||||
+++ b/configs/a64-olinuxino_defconfig
|
||||
@@ -11,3 +11,4 @@ CONFIG_DRAM_ZQ=3881949
|
||||
CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/bananapi_m1_plus_defconfig b/configs/bananapi_m1_plus_defconfig
|
||||
index 0fbb619d62..f3b1651fa5 100644
|
||||
--- a/configs/bananapi_m1_plus_defconfig
|
||||
+++ b/configs/bananapi_m1_plus_defconfig
|
||||
@@ -24,3 +24,4 @@ CONFIG_SUN7I_GMAC=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/bananapi_m2_plus_h3_defconfig b/configs/bananapi_m2_plus_h3_defconfig
|
||||
index 26ced59fb0..a723dc4847 100644
|
||||
--- a/configs/bananapi_m2_plus_h3_defconfig
|
||||
+++ b/configs/bananapi_m2_plus_h3_defconfig
|
||||
@@ -11,3 +11,4 @@ CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_MUSB_GADGET=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/bananapi_m2_plus_h5_defconfig b/configs/bananapi_m2_plus_h5_defconfig
|
||||
index fb6c945919..2e4ecdfbe8 100644
|
||||
--- a/configs/bananapi_m2_plus_h5_defconfig
|
||||
+++ b/configs/bananapi_m2_plus_h5_defconfig
|
||||
@@ -11,3 +11,4 @@ CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_MUSB_GADGET=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/bananapi_m2_zero_defconfig b/configs/bananapi_m2_zero_defconfig
|
||||
index 25617a8c99..9d24512667 100644
|
||||
--- a/configs/bananapi_m2_zero_defconfig
|
||||
+++ b/configs/bananapi_m2_zero_defconfig
|
||||
@@ -5,3 +5,4 @@ CONFIG_SPL=y
|
||||
CONFIG_MACH_SUN8I_H3=y
|
||||
CONFIG_DRAM_CLK=408
|
||||
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/bananapi_m64_defconfig b/configs/bananapi_m64_defconfig
|
||||
index 99dc2f7d20..f18a4f1653 100644
|
||||
--- a/configs/bananapi_m64_defconfig
|
||||
+++ b/configs/bananapi_m64_defconfig
|
||||
@@ -11,3 +11,4 @@ CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_MUSB_GADGET=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/libretech_all_h3_cc_h2_plus_defconfig b/configs/libretech_all_h3_cc_h2_plus_defconfig
|
||||
index 8725fe64cd..e2b58e47f5 100644
|
||||
--- a/configs/libretech_all_h3_cc_h2_plus_defconfig
|
||||
+++ b/configs/libretech_all_h3_cc_h2_plus_defconfig
|
||||
@@ -9,3 +9,4 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||
CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/libretech_all_h3_cc_h3_defconfig b/configs/libretech_all_h3_cc_h3_defconfig
|
||||
index 5275fdc36d..11cd4e0fe3 100644
|
||||
--- a/configs/libretech_all_h3_cc_h3_defconfig
|
||||
+++ b/configs/libretech_all_h3_cc_h3_defconfig
|
||||
@@ -9,3 +9,4 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||
CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/libretech_all_h3_cc_h5_defconfig b/configs/libretech_all_h3_cc_h5_defconfig
|
||||
index 9627401949..6fefb6756d 100644
|
||||
--- a/configs/libretech_all_h3_cc_h5_defconfig
|
||||
+++ b/configs/libretech_all_h3_cc_h5_defconfig
|
||||
@@ -9,3 +9,4 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||
CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/libretech_all_h5_cc_h5_defconfig b/configs/libretech_all_h5_cc_h5_defconfig
|
||||
index c3aa4b1061..55e4313961 100644
|
||||
--- a/configs/libretech_all_h5_cc_h5_defconfig
|
||||
+++ b/configs/libretech_all_h5_cc_h5_defconfig
|
||||
@@ -12,3 +12,4 @@ CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/nanopi_a64_defconfig b/configs/nanopi_a64_defconfig
|
||||
index 70fc257eeb..3eb285ee98 100644
|
||||
--- a/configs/nanopi_a64_defconfig
|
||||
+++ b/configs/nanopi_a64_defconfig
|
||||
@@ -8,3 +8,4 @@ CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
|
||||
CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/nanopi_m1_defconfig b/configs/nanopi_m1_defconfig
|
||||
index dc2dbd6290..5abf34aa34 100644
|
||||
--- a/configs/nanopi_m1_defconfig
|
||||
+++ b/configs/nanopi_m1_defconfig
|
||||
@@ -7,3 +7,4 @@ CONFIG_DRAM_CLK=408
|
||||
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/orangepi_lite2_defconfig b/configs/orangepi_lite2_defconfig
|
||||
index 577f7436c1..4a393a08a8 100644
|
||||
--- a/configs/orangepi_lite2_defconfig
|
||||
+++ b/configs/orangepi_lite2_defconfig
|
||||
@@ -8,3 +8,4 @@ CONFIG_SUNXI_DRAM_H6_LPDDR3=y
|
||||
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/orangepi_lite_defconfig b/configs/orangepi_lite_defconfig
|
||||
index ab64319875..1a5ea7fe4d 100644
|
||||
--- a/configs/orangepi_lite_defconfig
|
||||
+++ b/configs/orangepi_lite_defconfig
|
||||
@@ -9,3 +9,4 @@ CONFIG_DRAM_ODT_EN=y
|
||||
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/orangepi_one_defconfig b/configs/orangepi_one_defconfig
|
||||
index cbe2c97f2b..4572c76579 100644
|
||||
--- a/configs/orangepi_one_defconfig
|
||||
+++ b/configs/orangepi_one_defconfig
|
||||
@@ -10,3 +10,4 @@ CONFIG_DRAM_ODT_EN=y
|
||||
CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/orangepi_one_plus_defconfig b/configs/orangepi_one_plus_defconfig
|
||||
index aa5f540eb1..43a96ef998 100644
|
||||
--- a/configs/orangepi_one_plus_defconfig
|
||||
+++ b/configs/orangepi_one_plus_defconfig
|
||||
@@ -8,3 +8,4 @@ CONFIG_SUNXI_DRAM_H6_LPDDR3=y
|
||||
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/orangepi_pc2_defconfig b/configs/orangepi_pc2_defconfig
|
||||
index 5a7dbd45e8..cb8ca5d981 100644
|
||||
--- a/configs/orangepi_pc2_defconfig
|
||||
+++ b/configs/orangepi_pc2_defconfig
|
||||
@@ -20,3 +20,4 @@ CONFIG_SPI=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_MUSB_GADGET=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/orangepi_pc_defconfig b/configs/orangepi_pc_defconfig
|
||||
index 905ff7b127..4aacb83bab 100644
|
||||
--- a/configs/orangepi_pc_defconfig
|
||||
+++ b/configs/orangepi_pc_defconfig
|
||||
@@ -12,3 +12,4 @@ CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_SY8106A_POWER=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/orangepi_plus2e_defconfig b/configs/orangepi_plus2e_defconfig
|
||||
index 879f01dcd8..96ce325066 100644
|
||||
--- a/configs/orangepi_plus2e_defconfig
|
||||
+++ b/configs/orangepi_plus2e_defconfig
|
||||
@@ -16,3 +16,4 @@ CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_SY8106A_POWER=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/orangepi_plus_defconfig b/configs/orangepi_plus_defconfig
|
||||
index aa3f51e97b..4b2ac4e05c 100644
|
||||
--- a/configs/orangepi_plus_defconfig
|
||||
+++ b/configs/orangepi_plus_defconfig
|
||||
@@ -18,3 +18,4 @@ CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_SY8106A_POWER=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/orangepi_prime_defconfig b/configs/orangepi_prime_defconfig
|
||||
index 551348f8c6..2e19c27942 100644
|
||||
--- a/configs/orangepi_prime_defconfig
|
||||
+++ b/configs/orangepi_prime_defconfig
|
||||
@@ -12,3 +12,4 @@ CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_MUSB_GADGET=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/orangepi_win_defconfig b/configs/orangepi_win_defconfig
|
||||
index 3b78ad7e52..eba4af1bda 100644
|
||||
--- a/configs/orangepi_win_defconfig
|
||||
+++ b/configs/orangepi_win_defconfig
|
||||
@@ -13,3 +13,4 @@ CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/pine64-lts_defconfig b/configs/pine64-lts_defconfig
|
||||
index 9583d293c8..8b8e9c4fff 100644
|
||||
--- a/configs/pine64-lts_defconfig
|
||||
+++ b/configs/pine64-lts_defconfig
|
||||
@@ -15,3 +15,4 @@ CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig
|
||||
index f42f4e5923..400519cd89 100644
|
||||
--- a/configs/pine64_plus_defconfig
|
||||
+++ b/configs/pine64_plus_defconfig
|
||||
@@ -11,3 +11,4 @@ CONFIG_PHY_REALTEK=y
|
||||
CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
diff --git a/configs/pine_h64_defconfig b/configs/pine_h64_defconfig
|
||||
index 6dac6098d0..07c5ceb3d9 100644
|
||||
--- a/configs/pine_h64_defconfig
|
||||
+++ b/configs/pine_h64_defconfig
|
||||
@@ -2,6 +2,7 @@ CONFIG_ARM=y
|
||||
CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="sun50i-h6-pine-h64"
|
||||
CONFIG_SPL=y
|
||||
+CONFIG_VIDEO_DE2=n
|
||||
CONFIG_MACH_SUN50I_H6=y
|
||||
CONFIG_SUNXI_DRAM_H6_LPDDR3=y
|
||||
CONFIG_MACPWR="PC16"
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: zador-blood-stained <zador-blood-stained@users.noreply.github.com>
|
||||
Date: Tue, 24 Oct 2017 17:44:22 +0300
|
||||
Subject: [ARCHEOLOGY] Enable USB keyboards in sunxi u-boot
|
||||
|
||||
> X-Git-Archeology: > recovered message: > Switch to AUTOBOOT_KEYED with <Space> and <Ctrl-C> as autoboot abort
|
||||
> X-Git-Archeology: > recovered message: > methods
|
||||
> X-Git-Archeology: > recovered message: > Increase sunxi bootdelay to 1
|
||||
> X-Git-Archeology: > recovered message: > Closes #789
|
||||
> X-Git-Archeology: - Revision dd48a784f5a202d84aa2dc8b5553a571c1866b11: https://github.com/armbian/build/commit/dd48a784f5a202d84aa2dc8b5553a571c1866b11
|
||||
> X-Git-Archeology: Date: Tue, 24 Oct 2017 17:44:22 +0300
|
||||
> X-Git-Archeology: From: zador-blood-stained <zador-blood-stained@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Enable USB keyboards in sunxi u-boot
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision 5f4c4c77b28b4d15fd0165809ccfaed7af5c73e5: https://github.com/armbian/build/commit/5f4c4c77b28b4d15fd0165809ccfaed7af5c73e5
|
||||
> X-Git-Archeology: Date: Sat, 25 Nov 2017 15:11:13 +0300
|
||||
> X-Git-Archeology: From: zador-blood-stained <zador-blood-stained@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: [WIP] Update sunxi u-boot to v2017.11
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision 9363e3ec4d3a3234c5bdab6b7a1e3fd606b68102: https://github.com/armbian/build/commit/9363e3ec4d3a3234c5bdab6b7a1e3fd606b68102
|
||||
> X-Git-Archeology: Date: Mon, 14 Jan 2019 16:52:22 -0500
|
||||
> X-Git-Archeology: From: Martin Ayotte <martinayotte@yahoo.ca>
|
||||
> X-Git-Archeology: Subject: u-boot v2018.11 migration + tons of patches touchups
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision c474e35fe1fc795154baf88dec36cc01c6a5b567: https://github.com/armbian/build/commit/c474e35fe1fc795154baf88dec36cc01c6a5b567
|
||||
> X-Git-Archeology: Date: Fri, 12 Apr 2019 20:29:43 +0200
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igor.pecovnik@gmail.com>
|
||||
> X-Git-Archeology: Subject: [ sunxi64 ] Moved A64 boards to mainline u-boot 2019.04 Tested basic functions with eMMC install on A64 Notebooks and Olinuxino
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision 5e8cbd8e6aaa87ee03d08c761d5e765e81c4c686: https://github.com/armbian/build/commit/5e8cbd8e6aaa87ee03d08c761d5e765e81c4c686
|
||||
> X-Git-Archeology: Date: Fri, 17 Apr 2020 23:44:35 +0200
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Switch sunxi and sunxi64 to u-boot v2020.04 (#1894)
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision 8277822addfb690716f431c2f29a59effe7dd16f: https://github.com/armbian/build/commit/8277822addfb690716f431c2f29a59effe7dd16f
|
||||
> X-Git-Archeology: Date: Tue, 06 Apr 2021 11:42:56 +0200
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Bump Allwinner u-boot to 2021.04 (#2745)
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision 3cb7175c667da480e59ef5b9bb23e238b4955cdf: https://github.com/armbian/build/commit/3cb7175c667da480e59ef5b9bb23e238b4955cdf
|
||||
> X-Git-Archeology: Date: Thu, 15 Sep 2022 11:08:20 +0200
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Upgrade Allwinner boot loader to 2022.08 (#4168)
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision 38db7daaf700a985036bb3d00be21c50f71e731c: https://github.com/armbian/build/commit/38db7daaf700a985036bb3d00be21c50f71e731c
|
||||
> X-Git-Archeology: Date: Thu, 10 Nov 2022 13:24:06 +0100
|
||||
> X-Git-Archeology: From: Markus Hoffrogge <mhoffrogge@gmail.com>
|
||||
> X-Git-Archeology: Subject: Fix U-Boot SUNXI enable-autoboot-keyed.patch for U-Boot v2022.07 [AR-1322] (#4403)
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision f6a09def35e647a5442e0f92f399485be29f19a9: https://github.com/armbian/build/commit/f6a09def35e647a5442e0f92f399485be29f19a9
|
||||
> X-Git-Archeology: Date: Thu, 10 Nov 2022 21:49:36 +0100
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Moving patches to per board and removing obsolete (#4409)
|
||||
> X-Git-Archeology:
|
||||
---
|
||||
arch/arm/Kconfig | 2 ++
|
||||
boot/Kconfig | 3 ++-
|
||||
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
|
||||
index 8a1e223422..1a41215ebf 100644
|
||||
--- a/arch/arm/Kconfig
|
||||
+++ b/arch/arm/Kconfig
|
||||
@@ -1123,6 +1123,8 @@ config ARCH_SUNXI
|
||||
select USB_KEYBOARD if DISTRO_DEFAULTS && USB_HOST
|
||||
select USB_STORAGE if DISTRO_DEFAULTS && USB_HOST
|
||||
select SPL_USE_TINY_PRINTF
|
||||
+ imply AUTOBOOT_KEYED
|
||||
+ imply AUTOBOOT_KEYED_CTRLC
|
||||
select USE_PREBOOT
|
||||
select SYS_RELOC_GD_ENV_ADDR
|
||||
imply BOARD_LATE_INIT
|
||||
diff --git a/boot/Kconfig b/boot/Kconfig
|
||||
index ad035695a4..5ce54eefcf 100644
|
||||
--- a/boot/Kconfig
|
||||
+++ b/boot/Kconfig
|
||||
@@ -1254,7 +1254,7 @@ config AUTOBOOT_FLUSH_STDIN
|
||||
config AUTOBOOT_PROMPT
|
||||
string "Autoboot stop prompt"
|
||||
depends on AUTOBOOT_KEYED
|
||||
- default "Autoboot in %d seconds\\n"
|
||||
+ default "Autoboot in %d seconds, press <Space> to stop\\n"
|
||||
help
|
||||
This string is displayed before the boot delay selected by
|
||||
CONFIG_BOOTDELAY starts. If it is not defined there is no
|
||||
@@ -1309,6 +1309,7 @@ config AUTOBOOT_DELAY_STR
|
||||
config AUTOBOOT_STOP_STR
|
||||
string "Stop autobooting via specific input key / string"
|
||||
depends on AUTOBOOT_KEYED && !AUTOBOOT_ENCRYPTION
|
||||
+ default " "
|
||||
help
|
||||
This option enables stopping (aborting) of the automatic
|
||||
boot feature only by issuing a specific input key or
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: 5kft <5kft@5kft.org>
|
||||
Date: Sat, 4 Aug 2018 14:06:50 +0000
|
||||
Subject: [ARCHEOLOGY] update R_PIO GPIO block enable (H3/H5)
|
||||
|
||||
> X-Git-Archeology: > recovered message: > Move the previous "R_PIO enable" change to initial board gpio_init (from clock_init)
|
||||
> X-Git-Archeology: - Revision c3f02be362aa216f2d3ee011916f9a18baf58291: https://github.com/armbian/build/commit/c3f02be362aa216f2d3ee011916f9a18baf58291
|
||||
> X-Git-Archeology: Date: Sat, 04 Aug 2018 14:06:50 +0000
|
||||
> X-Git-Archeology: From: 5kft <5kft@5kft.org>
|
||||
> X-Git-Archeology: Subject: update R_PIO GPIO block enable (H3/H5)
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision 5e8cbd8e6aaa87ee03d08c761d5e765e81c4c686: https://github.com/armbian/build/commit/5e8cbd8e6aaa87ee03d08c761d5e765e81c4c686
|
||||
> X-Git-Archeology: Date: Fri, 17 Apr 2020 23:44:35 +0200
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Switch sunxi and sunxi64 to u-boot v2020.04 (#1894)
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision f6a09def35e647a5442e0f92f399485be29f19a9: https://github.com/armbian/build/commit/f6a09def35e647a5442e0f92f399485be29f19a9
|
||||
> X-Git-Archeology: Date: Thu, 10 Nov 2022 21:49:36 +0100
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Moving patches to per board and removing obsolete (#4409)
|
||||
> X-Git-Archeology:
|
||||
---
|
||||
arch/arm/mach-sunxi/board.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
|
||||
index 391a65a549..1333f29fb2 100644
|
||||
--- a/arch/arm/mach-sunxi/board.c
|
||||
+++ b/arch/arm/mach-sunxi/board.c
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <asm/arch/timer.h>
|
||||
#include <asm/arch/tzpc.h>
|
||||
#include <asm/arch/mmc.h>
|
||||
+#include <asm/arch/prcm.h>
|
||||
|
||||
#include <linux/compiler.h>
|
||||
|
||||
@@ -77,6 +78,11 @@ phys_size_t board_get_usable_ram_top(phys_size_t total_size)
|
||||
#ifdef CONFIG_SPL_BUILD
|
||||
static int gpio_init(void)
|
||||
{
|
||||
+#if defined(CONFIG_MACH_SUNXI_H3_H5)
|
||||
+ /* enable R_PIO GPIO access */
|
||||
+ prcm_apb0_enable(PRCM_APB0_GATE_PIO);
|
||||
+#endif
|
||||
+
|
||||
__maybe_unused uint val;
|
||||
#if CONFIG_CONS_INDEX == 1 && defined(CONFIG_UART0_PORT_F)
|
||||
#if defined(CONFIG_MACH_SUN4I) || \
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: zador-blood-stained <zador-blood-stained@users.noreply.github.com>
|
||||
Date: Fri, 22 Sep 2017 21:07:18 +0300
|
||||
Subject: [ARCHEOLOGY] Fix sunxi u-boot crash in fdt setprop
|
||||
|
||||
> X-Git-Archeology: - Revision a717f1a5061e7611545ef0ed1a05f1e8077e109a: https://github.com/armbian/build/commit/a717f1a5061e7611545ef0ed1a05f1e8077e109a
|
||||
> X-Git-Archeology: Date: Fri, 22 Sep 2017 21:07:18 +0300
|
||||
> X-Git-Archeology: From: zador-blood-stained <zador-blood-stained@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Fix sunxi u-boot crash in fdt setprop
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision f6a09def35e647a5442e0f92f399485be29f19a9: https://github.com/armbian/build/commit/f6a09def35e647a5442e0f92f399485be29f19a9
|
||||
> X-Git-Archeology: Date: Thu, 10 Nov 2022 21:49:36 +0100
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Moving patches to per board and removing obsolete (#4409)
|
||||
> X-Git-Archeology:
|
||||
---
|
||||
cmd/fdt.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/cmd/fdt.c b/cmd/fdt.c
|
||||
index f38fe909c3..a3e5cd81aa 100644
|
||||
--- a/cmd/fdt.c
|
||||
+++ b/cmd/fdt.c
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <fdt_support.h>
|
||||
#include <mapmem.h>
|
||||
#include <asm/io.h>
|
||||
+#include <asm/unaligned.h>
|
||||
|
||||
#define MAX_LEVEL 32 /* how deeply nested we will go */
|
||||
#define SCRATCHPAD 1024 /* bytes of scratchpad memory */
|
||||
@@ -830,7 +831,10 @@ static int fdt_parse_prop(char * const *newval, int count, char *data, int *len)
|
||||
cp = newp;
|
||||
tmp = simple_strtoul(cp, &newp, 0);
|
||||
if (*cp != '?')
|
||||
- *(fdt32_t *)data = cpu_to_fdt32(tmp);
|
||||
+ {
|
||||
+ tmp = cpu_to_fdt32(tmp);
|
||||
+ put_unaligned(tmp, (fdt32_t *)data);
|
||||
+ }
|
||||
else
|
||||
newp++;
|
||||
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: zador-blood-stained <zador-blood-stained@users.noreply.github.com>
|
||||
Date: Sun, 5 Jun 2016 18:47:56 +0300
|
||||
Subject: [ARCHEOLOGY] Power LED patch for H3 SPL
|
||||
|
||||
> X-Git-Archeology: - Revision 55032f5bf7464b68528137a3e71e42de6d0355c5: https://github.com/armbian/build/commit/55032f5bf7464b68528137a3e71e42de6d0355c5
|
||||
> X-Git-Archeology: Date: Sun, 05 Jun 2016 18:47:56 +0300
|
||||
> X-Git-Archeology: From: zador-blood-stained <zador-blood-stained@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Power LED patch for H3 SPL
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision 2abd603134083a909818a029e06d33c216ce7ee7: https://github.com/armbian/build/commit/2abd603134083a909818a029e06d33c216ce7ee7
|
||||
> X-Git-Archeology: Date: Mon, 28 Nov 2016 11:45:33 +0100
|
||||
> X-Git-Archeology: From: Thomas Kaiser <github@kaiser-edv.de>
|
||||
> X-Git-Archeology: Subject: Add scaling_available_freqs sysfs node, enable led based on DT
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision 82dbcf0a5d8c23034c042b9df74a393b3a01461d: https://github.com/armbian/build/commit/82dbcf0a5d8c23034c042b9df74a393b3a01461d
|
||||
> X-Git-Archeology: Date: Tue, 29 Nov 2016 05:23:06 +0100
|
||||
> X-Git-Archeology: From: Thomas Kaiser <github@kaiser-edv.de>
|
||||
> X-Git-Archeology: Subject: Revert 'enable led based on DT' since needs massive testing
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision dddf22832564dda0102ea07bcc56fbbefae3b050: https://github.com/armbian/build/commit/dddf22832564dda0102ea07bcc56fbbefae3b050
|
||||
> X-Git-Archeology: Date: Tue, 29 Nov 2016 14:27:57 +0300
|
||||
> X-Git-Archeology: From: zador-blood-stained <zador-blood-stained@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Merge and rename u-boot patch directories
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision f6a09def35e647a5442e0f92f399485be29f19a9: https://github.com/armbian/build/commit/f6a09def35e647a5442e0f92f399485be29f19a9
|
||||
> X-Git-Archeology: Date: Thu, 10 Nov 2022 21:49:36 +0100
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Moving patches to per board and removing obsolete (#4409)
|
||||
> X-Git-Archeology:
|
||||
---
|
||||
board/sunxi/board.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
|
||||
index 827e545032..7d343a93b2 100644
|
||||
--- a/board/sunxi/board.c
|
||||
+++ b/board/sunxi/board.c
|
||||
@@ -581,6 +581,11 @@ void sunxi_board_init(void)
|
||||
status_led_init();
|
||||
#endif
|
||||
|
||||
+#ifdef CONFIG_MACH_SUN8I_H3
|
||||
+ /* turn on power LED (PL10) on H3 boards */
|
||||
+ gpio_direction_output(SUNXI_GPL(10), 1);
|
||||
+#endif
|
||||
+
|
||||
#ifdef CONFIG_SY8106A_POWER
|
||||
power_failed = sy8106a_set_vout1(CONFIG_SY8106A_VOUT1_VOLT);
|
||||
#endif
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <megous@megous.com>
|
||||
Date: Tue, 20 Dec 2016 11:25:12 +0100
|
||||
Subject: sunxi: h3: Fix PLL1 setup to never use dividers
|
||||
|
||||
Kernel would lower the divider on first CLK change and cause the
|
||||
lock up.
|
||||
---
|
||||
arch/arm/mach-sunxi/clock_sun6i.c | 7 +++----
|
||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-sunxi/clock_sun6i.c b/arch/arm/mach-sunxi/clock_sun6i.c
|
||||
index 6bd75a15f6..86f08ab717 100644
|
||||
--- a/arch/arm/mach-sunxi/clock_sun6i.c
|
||||
+++ b/arch/arm/mach-sunxi/clock_sun6i.c
|
||||
@@ -134,11 +134,10 @@ void clock_set_pll1(unsigned int clk)
|
||||
int k = 1;
|
||||
int m = 1;
|
||||
|
||||
- if (clk > 1152000000) {
|
||||
- k = 2;
|
||||
- } else if (clk > 768000000) {
|
||||
+ if (clk >= 1368000000) {
|
||||
k = 4;
|
||||
- m = 2;
|
||||
+ } else if (clk >= 768000000) {
|
||||
+ k = 2;
|
||||
}
|
||||
|
||||
/* Switch to 24MHz clock while changing PLL1 */
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: ThomasKaiser <github@kaiser-edv.de>
|
||||
Date: Sat, 9 Apr 2016 16:02:53 +0200
|
||||
Subject: [ARCHEOLOGY] Define safe voltage/cpufreq defaults for sun8i/dev
|
||||
|
||||
> X-Git-Archeology: - Revision da11a8c01fae54c17503d2ded7c0f972fd5d384a: https://github.com/armbian/build/commit/da11a8c01fae54c17503d2ded7c0f972fd5d384a
|
||||
> X-Git-Archeology: Date: Sat, 09 Apr 2016 16:02:53 +0200
|
||||
> X-Git-Archeology: From: ThomasKaiser <github@kaiser-edv.de>
|
||||
> X-Git-Archeology: Subject: Define safe voltage/cpufreq defaults for sun8i/dev
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision dddf22832564dda0102ea07bcc56fbbefae3b050: https://github.com/armbian/build/commit/dddf22832564dda0102ea07bcc56fbbefae3b050
|
||||
> X-Git-Archeology: Date: Tue, 29 Nov 2016 14:27:57 +0300
|
||||
> X-Git-Archeology: From: zador-blood-stained <zador-blood-stained@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Merge and rename u-boot patch directories
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision a6140729064068b611a546d0580cfc34ee561b8b: https://github.com/armbian/build/commit/a6140729064068b611a546d0580cfc34ee561b8b
|
||||
> X-Git-Archeology: Date: Sun, 11 Dec 2016 17:40:27 +0300
|
||||
> X-Git-Archeology: From: zador-blood-stained <zador-blood-stained@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Rename and remove obsolete u-boot patches
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision 3cb7175c667da480e59ef5b9bb23e238b4955cdf: https://github.com/armbian/build/commit/3cb7175c667da480e59ef5b9bb23e238b4955cdf
|
||||
> X-Git-Archeology: Date: Thu, 15 Sep 2022 11:08:20 +0200
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Upgrade Allwinner boot loader to 2022.08 (#4168)
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision f6a09def35e647a5442e0f92f399485be29f19a9: https://github.com/armbian/build/commit/f6a09def35e647a5442e0f92f399485be29f19a9
|
||||
> X-Git-Archeology: Date: Thu, 10 Nov 2022 21:49:36 +0100
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Moving patches to per board and removing obsolete (#4409)
|
||||
> X-Git-Archeology:
|
||||
---
|
||||
arch/arm/include/asm/arch-sunxi/clock_sun6i.h | 1 +
|
||||
arch/arm/mach-sunxi/clock_sun6i.c | 8 +++++---
|
||||
2 files changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun6i.h b/arch/arm/include/asm/arch-sunxi/clock_sun6i.h
|
||||
index 7fcf340db6..723113b10b 100644
|
||||
--- a/arch/arm/include/asm/arch-sunxi/clock_sun6i.h
|
||||
+++ b/arch/arm/include/asm/arch-sunxi/clock_sun6i.h
|
||||
@@ -208,6 +208,7 @@ struct sunxi_ccm_reg {
|
||||
#define CCM_PLL1_CTRL_N(n) ((((n) - 1) & 0x1f) << 8)
|
||||
#define CCM_PLL1_CTRL_P(n) (((n) & 0x3) << 16)
|
||||
#define CCM_PLL1_CTRL_EN (0x1 << 31)
|
||||
+#define CCM_PLL1_CTRL_LOCK (0x1 << 28)
|
||||
|
||||
#define CCM_PLL3_CTRL_M_SHIFT 0
|
||||
#define CCM_PLL3_CTRL_M_MASK (0xf << CCM_PLL3_CTRL_M_SHIFT)
|
||||
diff --git a/arch/arm/mach-sunxi/clock_sun6i.c b/arch/arm/mach-sunxi/clock_sun6i.c
|
||||
index 86f08ab717..0c403204c5 100644
|
||||
--- a/arch/arm/mach-sunxi/clock_sun6i.c
|
||||
+++ b/arch/arm/mach-sunxi/clock_sun6i.c
|
||||
@@ -158,15 +158,17 @@ void clock_set_pll1(unsigned int clk)
|
||||
writel(CCM_PLL1_CTRL_EN | CCM_PLL1_CTRL_P(p) |
|
||||
CCM_PLL1_CTRL_N(clk / (24000000 * k / m)) |
|
||||
CCM_PLL1_CTRL_K(k) | CCM_PLL1_CTRL_M(m), &ccm->pll1_cfg);
|
||||
- sdelay(200);
|
||||
+
|
||||
+ while (!(readl(&ccm->pll1_cfg) & CCM_PLL1_CTRL_LOCK))
|
||||
+ ;
|
||||
|
||||
/* Switch CPU to PLL1 */
|
||||
if (IS_ENABLED(CONFIG_MACH_SUNIV)) {
|
||||
writel(CPU_CLK_SRC_PLL1 << CPU_CLK_SRC_SHIFT,
|
||||
&ccm->cpu_axi_cfg);
|
||||
} else {
|
||||
- writel(AXI_DIV_3 << AXI_DIV_SHIFT |
|
||||
- ATB_DIV_2 << ATB_DIV_SHIFT |
|
||||
+ writel(AXI_DIV_4 << AXI_DIV_SHIFT |
|
||||
+ ATB_DIV_4 << ATB_DIV_SHIFT |
|
||||
CPU_CLK_SRC_PLL1 << CPU_CLK_SRC_SHIFT,
|
||||
&ccm->cpu_axi_cfg);
|
||||
}
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jernej Skrabec <jernej.skrabec@gmail.com>
|
||||
Date: Sat, 16 Oct 2021 21:33:35 +0200
|
||||
Subject: sunxi: H616 GPU enable hack
|
||||
|
||||
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
|
||||
---
|
||||
arch/arm/mach-sunxi/clock_sun50i_h6.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/mach-sunxi/clock_sun50i_h6.c b/arch/arm/mach-sunxi/clock_sun50i_h6.c
|
||||
index 7926394cf7..f12f962530 100644
|
||||
--- a/arch/arm/mach-sunxi/clock_sun50i_h6.c
|
||||
+++ b/arch/arm/mach-sunxi/clock_sun50i_h6.c
|
||||
@@ -16,6 +16,8 @@ void clock_init_safe(void)
|
||||
/* this seems to enable PLLs on H616 */
|
||||
setbits_le32(&prcm->sys_pwroff_gating, 0x10);
|
||||
setbits_le32(&prcm->res_cal_ctrl, 2);
|
||||
+ /* enable GPU */
|
||||
+ writel(0, 0x7010254);
|
||||
}
|
||||
|
||||
clrbits_le32(&prcm->res_cal_ctrl, 1);
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Kali Prasad <kprasadvnsi@protonmail.com>
|
||||
Date: Sun, 19 Sep 2021 00:05:05 +0000
|
||||
Subject: Adding h616 THS workaround.
|
||||
|
||||
Signed-off-by: Kali Prasad <kprasadvnsi@protonmail.com>
|
||||
---
|
||||
board/sunxi/board.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
|
||||
index 7d343a93b2..3079ac0002 100644
|
||||
--- a/board/sunxi/board.c
|
||||
+++ b/board/sunxi/board.c
|
||||
@@ -247,6 +247,15 @@ int board_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
+#if CONFIG_MACH_SUN50I_H616
|
||||
+ /*
|
||||
+ * The bit[16] of register reg[0x03000000] must be zero for the THS
|
||||
+ * driver to work properly in the kernel. The BSP u-boot is putting
|
||||
+ * the whole register to zero so we are doing the same.
|
||||
+ */
|
||||
+ writel(0x0, SUNXI_SRAMC_BASE);
|
||||
+#endif
|
||||
+
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
/*
|
||||
* Temporary workaround for enabling I2C clocks until proper sunxi DM
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: zador-blood-stained <zador-blood-stained@users.noreply.github.com>
|
||||
Date: Wed, 1 Nov 2017 13:04:00 +0300
|
||||
Subject: [ARCHEOLOGY] Lower default CPU and DRAM frequencies for H5 and A64
|
||||
devices
|
||||
|
||||
> X-Git-Archeology: - Revision 46e082773acb379ce3b3aa0c8fec42bb48750830: https://github.com/armbian/build/commit/46e082773acb379ce3b3aa0c8fec42bb48750830
|
||||
> X-Git-Archeology: Date: Wed, 01 Nov 2017 13:04:00 +0300
|
||||
> X-Git-Archeology: From: zador-blood-stained <zador-blood-stained@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Lower default CPU and DRAM frequencies for H5 and A64 devices
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision 9363e3ec4d3a3234c5bdab6b7a1e3fd606b68102: https://github.com/armbian/build/commit/9363e3ec4d3a3234c5bdab6b7a1e3fd606b68102
|
||||
> X-Git-Archeology: Date: Mon, 14 Jan 2019 16:52:22 -0500
|
||||
> X-Git-Archeology: From: Martin Ayotte <martinayotte@yahoo.ca>
|
||||
> X-Git-Archeology: Subject: u-boot v2018.11 migration + tons of patches touchups
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision f6a09def35e647a5442e0f92f399485be29f19a9: https://github.com/armbian/build/commit/f6a09def35e647a5442e0f92f399485be29f19a9
|
||||
> X-Git-Archeology: Date: Thu, 10 Nov 2022 21:49:36 +0100
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Moving patches to per board and removing obsolete (#4409)
|
||||
> X-Git-Archeology:
|
||||
---
|
||||
arch/arm/mach-sunxi/Kconfig | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
|
||||
index 6417aee944..08cfc581cb 100644
|
||||
--- a/arch/arm/mach-sunxi/Kconfig
|
||||
+++ b/arch/arm/mach-sunxi/Kconfig
|
||||
@@ -467,7 +467,7 @@ config DRAM_CLK
|
||||
default 312 if MACH_SUN6I || MACH_SUN8I
|
||||
default 360 if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || \
|
||||
MACH_SUN8I_V3S
|
||||
- default 672 if MACH_SUN50I
|
||||
+ default 648 if MACH_SUN50I || MACH_SUN50I_H5
|
||||
default 744 if MACH_SUN50I_H6
|
||||
default 720 if MACH_SUN50I_H616
|
||||
---help---
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: zador-blood-stained <zador-blood-stained@users.noreply.github.com>
|
||||
Date: Wed, 22 Feb 2017 15:26:26 +0300
|
||||
Subject: [ARCHEOLOGY] Convert boot_mode and sun8i machid tou-boot patch
|
||||
|
||||
> X-Git-Archeology: > recovered message: > Needs testing on A10, A20, ... with legacy kernel
|
||||
> X-Git-Archeology: - Revision b64408698796b0df34068e255981f78f5f627ab3: https://github.com/armbian/build/commit/b64408698796b0df34068e255981f78f5f627ab3
|
||||
> X-Git-Archeology: Date: Wed, 22 Feb 2017 15:26:26 +0300
|
||||
> X-Git-Archeology: From: zador-blood-stained <zador-blood-stained@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Convert boot_mode and sun8i machid tou-boot patch
|
||||
> X-Git-Archeology:
|
||||
> X-Git-Archeology: - Revision f6a09def35e647a5442e0f92f399485be29f19a9: https://github.com/armbian/build/commit/f6a09def35e647a5442e0f92f399485be29f19a9
|
||||
> X-Git-Archeology: Date: Thu, 10 Nov 2022 21:49:36 +0100
|
||||
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||
> X-Git-Archeology: Subject: Moving patches to per board and removing obsolete (#4409)
|
||||
> X-Git-Archeology:
|
||||
---
|
||||
include/configs/sun8i.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/include/configs/sun8i.h b/include/configs/sun8i.h
|
||||
index b6cd8d39a8..608a055892 100644
|
||||
--- a/include/configs/sun8i.h
|
||||
+++ b/include/configs/sun8i.h
|
||||
@@ -10,4 +10,6 @@
|
||||
|
||||
#include <configs/sunxi-common.h>
|
||||
|
||||
+#define CONFIG_MACH_TYPE (0x1029)
|
||||
+
|
||||
#endif /* __CONFIG_H */
|
||||
--
|
||||
Armbian
|
||||
|
||||
Reference in New Issue
Block a user