From: Jules Maselbas <jmaselbas@zdiv.net>
To: barebox@lists.infradead.org
Cc: Jules Maselbas <jmaselbas@zdiv.net>
Subject: [PATCH v3 5/6] ARM: sunxi: Introduce mach-sunxi
Date: Wed, 12 Feb 2025 11:48:41 +0100 [thread overview]
Message-ID: <20250212104842.504-6-jmaselbas@zdiv.net> (raw)
In-Reply-To: <20250212104842.504-1-jmaselbas@zdiv.net>
Add some boilerplate, Makefiles, Kbuild.
A generic barebox-dt-2nd.img image can be build for A64 SoC using
the multi_v8_defconfig.
This image can be booted from u-boot and has been tested on Pine64+,
it should work on other A64 SoC such as the pinephone, and other Pine64
boards, it might also work on H6 SoC which uses the same sd/mmc controler.
Signed-off-by: Jules Maselbas <jmaselbas@zdiv.net>
---
v1->v2:
- removed RELOCATABLE and HAVE_PBL_MULTI_IMAGES from Kconfig (Ahmad)
- used __dummy__.o insead of an empty file (Ahmad)
- removed include/mach/sunxi/barebox-arm.h (Ahmad)
v2->v3:
- add arch sun50i-a64 + mci driver to the multi_v8_defconfig (Sascha)
- remove the sunxi_v8_defconfig
arch/arm/Kconfig | 12 ++++++++++++
arch/arm/Makefile | 1 +
arch/arm/configs/multi_v8_defconfig | 2 ++
arch/arm/mach-sunxi/Kconfig | 13 +++++++++++++
arch/arm/mach-sunxi/Makefile | 1 +
5 files changed, 29 insertions(+)
create mode 100644 arch/arm/mach-sunxi/Kconfig
create mode 100644 arch/arm/mach-sunxi/Makefile
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 2e52ed7b50..3d8f2eeca7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -173,6 +173,17 @@ config ARCH_K3
select COMMON_CLK_OF_PROVIDER
select PM_GENERIC_DOMAINS
+config ARCH_SUNXI
+ bool "Allwinner (sunxi) SoCs"
+ depends on ARCH_MULTIARCH
+ select CLKDEV_LOOKUP
+ select COMMON_CLK
+ select COMMON_CLK_OF_PROVIDER
+ select GPIOLIB
+ select OFDEVICE
+ select OFTREE
+ select PINCTRL
+
config ARCH_LAYERSCAPE
bool "NXP Layerscape based"
depends on ARCH_MULTIARCH
@@ -259,6 +270,7 @@ source "arch/arm/mach-omap/Kconfig"
source "arch/arm/mach-pxa/Kconfig"
source "arch/arm/mach-rockchip/Kconfig"
source "arch/arm/mach-socfpga/Kconfig"
+source "arch/arm/mach-sunxi/Kconfig"
source "arch/arm/mach-stm32mp/Kconfig"
source "arch/arm/mach-versatile/Kconfig"
source "arch/arm/mach-vexpress/Kconfig"
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 270f5dfdc1..e4041cf715 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -102,6 +102,7 @@ machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip
machine-$(CONFIG_ARCH_SAMSUNG) += samsung
machine-$(CONFIG_ARCH_SOCFPGA) += socfpga
machine-$(CONFIG_ARCH_STM32MP) += stm32mp
+machine-$(CONFIG_ARCH_SUNXI) += sunxi
machine-$(CONFIG_ARCH_VERSATILE) += versatile
machine-$(CONFIG_ARCH_VEXPRESS) += vexpress
machine-$(CONFIG_ARCH_TEGRA) += tegra
diff --git a/arch/arm/configs/multi_v8_defconfig b/arch/arm/configs/multi_v8_defconfig
index 20bd0575f5..b1e66e85f4 100644
--- a/arch/arm/configs/multi_v8_defconfig
+++ b/arch/arm/configs/multi_v8_defconfig
@@ -3,6 +3,7 @@ CONFIG_ARCH_IMX=y
CONFIG_ARCH_K3=y
CONFIG_ARCH_LAYERSCAPE=y
CONFIG_ARCH_ROCKCHIP=y
+CONFIG_ARCH_SUN50I_A64=y
CONFIG_ARCH_ZYNQMP=y
CONFIG_MACH_KOENIGBAUER_ALPHAJET=y
CONFIG_MACH_INNOCOMM_WB15=y
@@ -207,6 +208,7 @@ CONFIG_MCI=y
CONFIG_MCI_MMC_BOOT_PARTITIONS=y
CONFIG_MCI_DW=y
CONFIG_MCI_ROCKCHIP_DWCMSHC=y
+CONFIG_MCI_SUNXI_SMHC=y
CONFIG_MCI_IMX_ESDHC=y
CONFIG_MCI_ARASAN=y
CONFIG_COMMON_CLK_SCMI=y
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
new file mode 100644
index 0000000000..4fdd0877bf
--- /dev/null
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -0,0 +1,13 @@
+menu "Allwinner (sunxi) boards"
+ depends on ARCH_SUNXI
+
+config ARCH_SUN50I_A64
+ bool "Allwinner A64 SoC"
+ select CPU_V8
+ select CPU_SUPPORTS_64BIT_KERNEL
+ select CLOCKSOURCE_ARM_ARCHITECTED_TIMER
+ select PINCTRL_SUN50I_A64
+ depends on 64BIT
+ default y
+
+endmenu
diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile
new file mode 100644
index 0000000000..16a218658a
--- /dev/null
+++ b/arch/arm/mach-sunxi/Makefile
@@ -0,0 +1 @@
+obj- := __dummy__.o
--
2.48.1
next prev parent reply other threads:[~2025-02-12 10:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-12 10:48 [PATCH v3 0/6] Initial support for Allwinner A64 SoC Jules Maselbas
2025-02-12 10:48 ` [PATCH v3 1/6] clk: divider: add error code propagation Jules Maselbas
2025-02-12 10:48 ` [PATCH v3 2/6] clk: Add clock driver for sun50i-a64 Jules Maselbas
2025-02-12 10:48 ` [PATCH v3 3/6] pinctrl: Add sun50i-a64 pinctrl driver Jules Maselbas
2025-02-12 10:48 ` [PATCH v3 4/6] mci: Add sunxi-mmc driver Jules Maselbas
2025-02-12 10:48 ` Jules Maselbas [this message]
2025-02-12 10:48 ` [PATCH v3 6/6] Documentation: sunxi: Add some documentation Jules Maselbas
2025-02-14 10:31 ` [PATCH v3 0/6] Initial support for Allwinner A64 SoC Sascha Hauer
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=20250212104842.504-6-jmaselbas@zdiv.net \
--to=jmaselbas@zdiv.net \
--cc=barebox@lists.infradead.org \
/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