From: Jesse Taube <mr.bossman075@gmail.com>
To: u-boot@lists.denx.de
Cc: jagan@amarulasolutions.com, andre.przywara@arm.com,
hdegoede@redhat.com, sjg@chromium.org, icenowy@aosc.io,
marek.behun@nic.cz, festevam@denx.de, narmstrong@baylibre.com,
tharvey@gateworks.com, christianshewitt@gmail.com,
pbrobinson@gmail.com, jernej.skrabec@gmail.com, hs@denx.de,
samuel@sholland.org, arnaud.ferraris@gmail.com,
giulio.benetti@benettiengineering.com, Mr.Bossman075@gmail.com,
thirtythreeforty@gmail.com
Subject: [PATCH v3 07/10] configs: sunxi: Add common SUNIV header
Date: Sat, 29 Jan 2022 10:23:06 -0500 [thread overview]
Message-ID: <20220129152309.1567937-8-Mr.Bossman075@gmail.com> (raw)
In-Reply-To: <20220129152309.1567937-1-Mr.Bossman075@gmail.com>
From: Icenowy Zheng <icenowy@aosc.io>
Adds support for SUNIV and the F1C100s.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
---
V1->V2:
* Combine ifdefs
* Fix indentation
* Fix negative logic
* Fix rebase artifacts
* Remove CONFIG_SYS_LOAD_ADDR
* Remove CONFIG_ENV_SECT_SIZE
V2->V3:
* Fix comment
---
include/configs/suniv.h | 14 +++++++++
include/configs/sunxi-common.h | 57 +++++++++++++++++++++++++---------
2 files changed, 56 insertions(+), 15 deletions(-)
create mode 100644 include/configs/suniv.h
diff --git a/include/configs/suniv.h b/include/configs/suniv.h
new file mode 100644
index 0000000000..6118cd5e1a
--- /dev/null
+++ b/include/configs/suniv.h
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Configuration settings for new Allwinner F-series (suniv) CPU
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/*
+ * Include common sunxi configuration where most the settings are
+ */
+#include <configs/sunxi-common.h>
+
+#endif /* __CONFIG_H */
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 01c3cfced2..4bab917c0b 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -22,7 +22,12 @@
/* Serial & console */
#define CONFIG_SYS_NS16550_SERIAL
/* ns16550 reg in the low bits of cpu reg */
+#ifdef CONFIG_MACH_SUNIV
+/* suniv doesn't have apb2 and uart is connected to apb1 */
+#define CONFIG_SYS_NS16550_CLK 100000000
+#else
#define CONFIG_SYS_NS16550_CLK 24000000
+#endif
#ifndef CONFIG_DM_SERIAL
# define CONFIG_SYS_NS16550_REG_SIZE -4
# define CONFIG_SYS_NS16550_COM1 SUNXI_UART0_BASE
@@ -49,6 +54,15 @@
* since it needs to fit in with the other values. By also #defining it
* we get warnings if the Kconfig value mismatches. */
#define CONFIG_SPL_BSS_START_ADDR 0x2ff80000
+#elif defined(CONFIG_MACH_SUNIV)
+#define SDRAM_OFFSET(x) 0x8##x
+#define CONFIG_SYS_SDRAM_BASE 0x80000000
+/* Note SPL_STACK_R_ADDR is set through Kconfig, we include it here
+ * since it needs to fit in with the other values. By also #defining it
+ * we get warnings if the Kconfig value mismatches.
+ */
+#define CONFIG_SPL_STACK_R_ADDR 0x81e00000
+#define CONFIG_SPL_BSS_START_ADDR 0x81f80000
#else
#define SDRAM_OFFSET(x) 0x4##x
#define CONFIG_SYS_SDRAM_BASE 0x40000000
@@ -179,13 +193,40 @@
#define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(FE00000))
#define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(FF00000))
+#elif defined(CONFIG_MACH_SUN8I_V3S)
+/*
+ * 64M RAM minus 2MB heap + 16MB for u-boot, stack, fb, etc.
+ * 16M uncompressed kernel, 8M compressed kernel, 1M fdt,
+ * 1M script, 1M pxe, 1M dt overlay and the ramdisk at the end.
+ */
+#define BOOTM_SIZE __stringify(0x2e00000)
+#define KERNEL_ADDR_R __stringify(SDRAM_OFFSET(1000000))
+#define FDT_ADDR_R __stringify(SDRAM_OFFSET(1800000))
+#define SCRIPT_ADDR_R __stringify(SDRAM_OFFSET(1900000))
+#define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(1A00000))
+#define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(1B00000))
+#define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(1C00000))
+
+#elif defined(CONFIG_MACH_SUNIV)
+/*
+ * 32M RAM minus 1MB heap + 8MB for u-boot, stack, fb, etc.
+ * 8M uncompressed kernel, 4M compressed kernel, 512K fdt,
+ * 512K script, 512K pxe and the ramdisk at the end.
+ */
+#define BOOTM_SIZE __stringify(0x1700000)
+#define KERNEL_ADDR_R __stringify(SDRAM_OFFSET(0500000))
+#define FDT_ADDR_R __stringify(SDRAM_OFFSET(0C00000))
+#define SCRIPT_ADDR_R __stringify(SDRAM_OFFSET(0C50000))
+#define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(0D00000))
+#define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(0D50000))
+#define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(0D60000))
+
#else
/*
* 160M RAM (256M minimum minus 64MB heap + 32MB for u-boot, stack, fb, etc.
* 32M uncompressed kernel, 16M compressed kernel, 1M fdt,
* 1M script, 1M pxe, 1M dt overlay and the ramdisk at the end.
*/
-#ifndef CONFIG_MACH_SUN8I_V3S
#define BOOTM_SIZE __stringify(0xa000000)
#define KERNEL_ADDR_R __stringify(SDRAM_OFFSET(2000000))
#define FDT_ADDR_R __stringify(SDRAM_OFFSET(3000000))
@@ -193,20 +234,6 @@
#define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(3200000))
#define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(3300000))
#define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(3400000))
-#else
-/*
- * 64M RAM minus 2MB heap + 16MB for u-boot, stack, fb, etc.
- * 16M uncompressed kernel, 8M compressed kernel, 1M fdt,
- * 1M script, 1M pxe, 1M dt overlay and the ramdisk at the end.
- */
-#define BOOTM_SIZE __stringify(0x2e00000)
-#define KERNEL_ADDR_R __stringify(SDRAM_OFFSET(1000000))
-#define FDT_ADDR_R __stringify(SDRAM_OFFSET(1800000))
-#define SCRIPT_ADDR_R __stringify(SDRAM_OFFSET(1900000))
-#define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(1A00000))
-#define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(1B00000))
-#define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(1C00000))
-#endif
#endif
#define MEM_LAYOUT_ENV_SETTINGS \
--
2.34.1
next prev parent reply other threads:[~2022-01-29 15:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-29 15:22 [PATCH v3 00/10] Add support for SUNIV and F1C100s Jesse Taube
2022-01-29 15:23 ` [PATCH v3 01/10] arm: arm926ej-s: start.S: port save_boot_params support from armv7 code Jesse Taube
2022-01-29 15:23 ` [PATCH v3 02/10] mach-sunxi: Move timer code to mach folder Jesse Taube
2022-01-29 22:58 ` Andre Przywara
2022-01-29 15:23 ` [PATCH v3 03/10] arm: arm926ej-s: Add sunxi code Jesse Taube
2022-01-29 15:23 ` [PATCH v3 04/10] ARM: sunxi: Add clock and uart to sunxi headers Jesse Taube
2022-01-29 15:23 ` [PATCH v3 05/10] sunxi: Add F1C100s DRAM initial support Jesse Taube
2022-01-29 15:23 ` [PATCH v3 06/10] sunxi: board: Add support for SUNIV Jesse Taube
2022-01-29 15:23 ` Jesse Taube [this message]
2022-01-29 15:23 ` [PATCH v3 08/10] mach-sunxi: Add support for SUNIV architecture Jesse Taube
2022-01-29 22:59 ` Andre Przywara
2022-01-29 15:23 ` [PATCH v3 09/10] ARM: dts: suniv: Add device tree files and bindings for F1C100s Jesse Taube
2022-01-29 23:00 ` Andre Przywara
2022-01-29 15:23 ` [PATCH v3 10/10] configs: sunxi: Add support for Lichee Pi Nano Jesse Taube
2022-01-29 23:00 ` Andre Przywara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220129152309.1567937-8-Mr.Bossman075@gmail.com \
--to=mr.bossman075@gmail.com \
--cc=andre.przywara@arm.com \
--cc=arnaud.ferraris@gmail.com \
--cc=christianshewitt@gmail.com \
--cc=festevam@denx.de \
--cc=giulio.benetti@benettiengineering.com \
--cc=hdegoede@redhat.com \
--cc=hs@denx.de \
--cc=icenowy@aosc.io \
--cc=jagan@amarulasolutions.com \
--cc=jernej.skrabec@gmail.com \
--cc=marek.behun@nic.cz \
--cc=narmstrong@baylibre.com \
--cc=pbrobinson@gmail.com \
--cc=samuel@sholland.org \
--cc=sjg@chromium.org \
--cc=tharvey@gateworks.com \
--cc=thirtythreeforty@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox