@JamesCL
Changes:
git status
On branch main
Your branch is up to date with 'origin/main'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: config/boards/radxa-cubie-a5e.conf
modified: config/sources/families/sun55iw3.conf
Untracked files:
(use "git add <file>..." to include in what will be committed)
config/boards/orangepi4a.conf
patch/kernel/archive/sunxi-dev-6.12/Add-sun55iw3-OrangePi-4A.patch
patch/u-boot/sunxi-dev-u-boot-a523/
you should skip the cubie board changes:
config/boards/radxa-cubie-a5e.conf
config/sources/families/sun55iw3.conf
#
# SPDX-License-Identifier: GPL-2.0
#
# Copyright (c) 2013-2023 Igor Pecovnik, igor@armbian.com
#
# This file is a part of the Armbian Build Framework
# https://github.com/armbian/build/
#
enable_extension "sunxi-tools"
declare -g ARCH=arm64
declare -g ATFSOURCE='https://github.com/jernejsk/arm-trusted-firmware'
declare -g ATF_TARGET_MAP="PLAT=sun55i_a523 DEBUG=1 bl31;;build/sun55i_a523/debug/bl31.bin"
declare -g ATFBRANCH="branch:a523"
declare -g BOOTSCRIPT='boot-sun50i-next.cmd:boot.cmd'
declare -g BOOTDELAY=1
declare -g BOOTSOURCE='https://github.com/jernejsk/u-boot/'
declare -g BOOTPATCHDIR="sunxi-dev-${BOOTPATCHDIR:-"u-boot-a523"}"
declare -g BOOTBRANCH="${BOOTBRANCH:-"branch:a523"}"
declare -g BOOTENV_FILE='sunxi.txt'
declare -g UBOOT_TARGET_MAP="${UBOOT_TARGET_MAP:-BINMAN_ALLOW_MISSING=1;;u-boot-sunxi-with-spl.bin}"
declare -g OVERLAY_DIR="/boot/dtb/allwinner/overlay"
declare -g LINUXFAMILY="sun55iw3"
case "${BRANCH}" in
dev)
declare -g KERNELSOURCE='https://github.com/apritzel/linux'
declare -g KERNELBRANCH='branch:a523-v2-WIP'
declare -g KERNEL_MAJOR_MINOR="6.12" # Major and minor versions of this kernel.
KERNELPATCHDIR="archive/sunxi-dev-${KERNEL_MAJOR_MINOR}"
;;
esac
family_tweaks() {
# execute specific tweaks function if present
[[ $(type -t family_tweaks_s) == function ]] && family_tweaks_s
cp $SRC/packages/blobs/splash/armbian-u-boot-24.bmp $SDCARD/boot/boot.bmp
}
write_uboot_platform() {
dd if=/dev/zero of=$2 bs=512 count=1023 seek=1 status=noxfer > /dev/null 2>&1
dd if=$1/u-boot-sunxi-with-spl.bin of=$2 bs=512 seek=256 status=noxfer > /dev/null 2>&1
}
setup_write_uboot_platform() {
local tmp part dev
if grep -q "ubootpart" /proc/cmdline; then
# mainline with new boot script
tmp=$(cat /proc/cmdline)
tmp="${tmp##*ubootpart=}"
tmp="${tmp%% *}"
[[ -n $tmp ]] && part=$(findfs PARTUUID=$tmp 2> /dev/null)
[[ -n $part ]] && dev=$(lsblk -n -o PKNAME $part 2> /dev/null)
[[ -n $dev ]] && DEVICE="/dev/$dev"
else
# legacy or old boot script
tmp=$(cat /proc/cmdline)
tmp="${tmp##*root=}"
tmp="${tmp%% *}"
[[ -n $tmp ]] && part=$(findfs $tmp 2> /dev/null)
[[ -n $part ]] && dev=$(lsblk -n -o PKNAME $part 2> /dev/null)
# do not try to write u-boot to USB devices
[[ -n $dev && $dev == mmcblk* ]] && DEVICE="/dev/$dev"
fi
}
config/boards/orangepi4a.conf
# Allwinner Cortex-A55 octa core SoC
BOARD_NAME="Orange Pi 4A"
BOARDFAMILY="sun55iw3"
BOARD_MAINTAINER=""
BOOTCONFIG="orangepi-4a_defconfig"
OVERLAY_PREFIX="sun55i-t527"
#BOOT_LOGO="desktop"
KERNEL_TARGET="dev"
patch/kernel/archive/sunxi-dev-6.12/Add-sun55iw3-OrangePi-4A.patch
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: John Doe <john.doe@somewhere.on.planet>
Date: Mon, 24 Feb 2025 21:37:29 -0300
Subject: Add sun55i-t527-orangepi-4a dts file
Signed-off-by: John Doe <john.doe@somewhere.on.planet>
---
arch/arm64/boot/dts/allwinner/Makefile | 2 +
arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts | 375 ++++++++++
2 files changed, 377 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index 9d5e14695af0..b409e491bf73 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -53,5 +53,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h700-anbernic-rg35xx-h.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h700-anbernic-rg35xx-plus.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h700-anbernic-rg35xx-sp.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun55i-a527-radxa-a5e.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun55i-h728-x96qpro+.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun55i-t527-avaota-a1.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun55i-t527-orangepi-4a.dtb
+
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts b/arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts
new file mode 100644
index 000000000000..06046e2555af
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts
@@ -0,0 +1,375 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR MIT)
+// Copyright (C) 2024 Arm Ltd.
+
+/dts-v1/;
+
+#include "sun55i-a523.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ model = "OrangePi 4A";
+ compatible = "xunlong,orangepi-4a", "allwinner,sun55i-t527";
+
+ aliases {
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ /* For now, until we have mainline components living in SRAM */
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ /* 128 KiB reserved for Trusted Firmware-A (BL31). */
+ secmon@48000000 {
+ reg = <0x0 0x48000000 0x0 0x20000>;
+ no-map;
+ };
+
+ /* 256 KiB reserved for the SCP. */
+ secmon@48100000 {
+ reg = <0x0 0x48100000 0x0 0x40000>;
+ no-map;
+ };
+ };
+
+ leds: gpio-leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ status = "okay";
+
+ status_led@0 {
+ gpios = <&pio 3 20 GPIO_ACTIVE_HIGH>; /* PD20 */
+ label = "status_led";
+ linux,default-trigger = "heartbeat";
+ linux,default-trigger-delay-ms = <0>;
+ };
+ };
+
+ reg_vcc5v: vcc5v {
+ /* board wide 5V supply from the 12V->5V regulator */
+ compatible = "regulator-fixed";
+ regulator-name = "vcc-5v";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
+
+ reg_exxt_vbus: exxt-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "exxxxt-vbus";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <1000>;
+ gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>;
+ regulator-always-on;
+ regulator-boot-on;
+ enable-active-high;
+ };
+
+ reg_usb0_vbus: usb0-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb0-vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-enable-ramp-delay = <1000>;
+ gpio = <&r_pio 0 4 GPIO_ACTIVE_HIGH>;
+ regulator-always-on;
+ regulator-boot-on;
+ enable-active-high;
+ };
+
+ reg_usb1_vbus: usb1-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb1-vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-enable-ramp-delay = <1000>;
+ gpio = <&r_pio 0 12 GPIO_ACTIVE_HIGH>;
+ regulator-always-on;
+ regulator-boot-on;
+ enable-active-high;
+ };
+};
+
+&mmc0 {
+ vmmc-supply = <®_cldo3>;
+ vqmmc-supply = <®_cldo1>;
+ cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_DOWN)>; /* PF6 */
+ bus-width = <4>;
+ max-frequency = <20000000>;
+ status = "okay";
+};
+
+&pio {
+ vcc-pb-supply = <®_cldo3>;
+ vcc-pc-supply = <®_cldo1>;
+ vcc-pd-supply = <®_dcdc4>;
+ vcc-pe-supply = <®_dcdc4>;
+ vcc-pf-supply = <®_cldo3>;
+ vcc-pg-supply = <®_bldo1>;
+ vcc-ph-supply = <®_cldo3>;
+ vcc-pi-supply = <®_dcdc4>;
+ vcc-pj-supply = <®_dcdc4>;
+ vcc-pk-supply = <®_bldo3>;
+};
+
+&r_i2c0 {
+ status = "okay";
+
+ axp717: pmic@35 {
+ compatible = "x-powers,axp717";
+ reg = <0x35>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ interrupt-parent = <&nmi_intc>;
+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+
+ vin1-supply = <®_vcc5v>;
+ vin2-supply = <®_vcc5v>;
+ vin3-supply = <®_vcc5v>;
+ vin4-supply = <®_vcc5v>;
+ aldoin-supply = <®_vcc5v>;
+ bldoin-supply = <®_vcc5v>;
+ cldoin-supply = <®_vcc5v>;
+
+ regulators {
+ /* Supplies the "little" cluster (1.4 GHz cores) */
+ reg_dcdc1: dcdc1 {
+ regulator-always-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <1160000>;
+ regulator-name = "vdd-cpu0-3";
+ };
+
+ reg_dcdc2: dcdc2 {
+ regulator-always-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <1160000>;
+ regulator-name = "vdd-gpu-sys";
+ };
+
+ reg_dcdc3: dcdc3 {
+ regulator-always-on;
+ regulator-min-microvolt = <1160000>;
+ regulator-max-microvolt = <1160000>;
+ regulator-name = "vdd-dram";
+ };
+
+ reg_dcdc4: dcdc4 {
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vdd-io";
+ };
+
+ reg_aldo1: aldo1 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "axp2202-aldo1";
+ };
+
+ reg_aldo2: aldo2 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "axp2202-aldo2";
+ };
+
+ reg_aldo3: aldo3 {
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc-pl-pm";
+ };
+
+ reg_aldo4: aldo4 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-pll-dxco-avcc";
+ };
+
+ reg_bldo1: bldo1 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-pg-wifi-lvds";
+ };
+
+ reg_bldo2: bldo2 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-dram-1v8";
+ };
+
+ reg_bldo3: bldo3 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-cvp-pk-vid1v8";
+ };
+
+ reg_bldo4: bldo4 {
+ regulator-always-on;
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-name = "axp2202-bldo4";
+ };
+
+ reg_cldo1: cldo1 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-pc";
+ };
+
+ reg_cldo2: cldo2 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-efuse";
+ };
+
+ reg_cldo3: cldo3 {
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc-mmc-eth-codec";
+ };
+
+ reg_cldo4: cldo4 {
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "axp2202-cldo4";
+ };
+
+ reg_cpusldo: cpusldo {
+ /* supplies the management core */
+ regulator-always-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+ regulator-name = "vdd-cpus";
+ };
+ };
+ };
+
+ axp323: pmic@36 {
+ compatible = "x-powers,axp323";
+ reg = <0x36>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ interrupt-parent = <&nmi_intc>;
+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+ status = "okay";
+
+ vin1-supply = <®_vcc5v>;
+ vin2-supply = <®_vcc5v>;
+ vin3-supply = <®_vcc5v>;
+
+ regulators {
+ /* Supplies the "big" cluster (1.8 GHz cores) */
+ reg_dcdc1_323: dcdc1 {
+ regulator-always-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <1160000>;
+ regulator-name = "vdd-cpu4-7";
+ };
+
+ reg_dcdc2_323: dcdc2 {
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-name = "axp323-dcdc2";
+ };
+
+ reg_dcdc3_323: dcdc3 {
+ regulator-always-on;
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1000000>;
+ regulator-name = "vdd-npu";
+ };
+
+ reg_aldo1_323: aldo1 {
+ regulator-name = "axp323-aldo1";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ };
+
+ reg_dldo1_323: dldo1 {
+ regulator-name = "axp323-dldo1";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+ };
+ };
+};
+
+&r_pio {
+/*
+ * Specifying the supply would create a circular dependency.
+ *
+ * vcc-pl-supply = <®_aldo3>;
+ */
+ vcc-pm-supply = <®_aldo3>;
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_pb_pins>;
+ status = "okay";
+};
+
+&ehci0 {
+ drvvbus-supply = <®_usb0_vbus>;
+ status = "okay";
+};
+
+&ohci0 {
+ drvvbus-supply = <®_usb0_vbus>;
+ status = "okay";
+};
+
+&ehci1 {
+ drvvbus-supply = <®_usb1_vbus>;
+ status = "okay";
+};
+
+&ohci1 {
+ drvvbus-supply = <®_usb1_vbus>;
+ status = "okay";
+};
+
+&usbphy {
+ status = "okay";
+};
+
+&gmac1 {
+ phy-mode = "rgmii";
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&gmac1_pins_default>;
+ pinctrl-1 = <&gmac1_pins_sleep>;
+ aw,soc-phy25m;
+ tx-delay = <1>;
+ rx-delay = <3>;
+ dwmac3v3-supply = <®_cldo3>;
+ phy3v3-supply = <®_cldo3>;
+ status = "okay";
+};
+
+&gmac1_phy0 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <1>;
+ reset-gpios = <&pio 8 15 GPIO_ACTIVE_LOW>;
+ reset-assert-us = <15000>;
+ reset-deassert-us = <100000>;
+};
--
Created with Armbian build tools https://github.com/armbian/build
patch/u-boot/sunxi-dev-u-boot-a523/Add-u-boot-OrangePi4A-defconfig.patch
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: John Doe <john.doe@somewhere.on.planet>
Date: Mon, 24 Feb 2025 22:04:53 -0300
Subject: Add u-boot orangepi-4a_defconfig
Signed-off-by: John Doe <john.doe@somewhere.on.planet>
---
arch/arm/dts/sun55i-t527-orangepi-4a.dts | 375 ++++++++++
configs/orangepi-4a_defconfig | 26 +
2 files changed, 401 insertions(+)
diff --git a/arch/arm/dts/sun55i-t527-orangepi-4a.dts b/arch/arm/dts/sun55i-t527-orangepi-4a.dts
new file mode 100644
index 0000000000..06046e2555
--- /dev/null
+++ b/arch/arm/dts/sun55i-t527-orangepi-4a.dts
@@ -0,0 +1,375 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR MIT)
+// Copyright (C) 2024 Arm Ltd.
+
+/dts-v1/;
+
+#include "sun55i-a523.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ model = "OrangePi 4A";
+ compatible = "xunlong,orangepi-4a", "allwinner,sun55i-t527";
+
+ aliases {
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ /* For now, until we have mainline components living in SRAM */
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ /* 128 KiB reserved for Trusted Firmware-A (BL31). */
+ secmon@48000000 {
+ reg = <0x0 0x48000000 0x0 0x20000>;
+ no-map;
+ };
+
+ /* 256 KiB reserved for the SCP. */
+ secmon@48100000 {
+ reg = <0x0 0x48100000 0x0 0x40000>;
+ no-map;
+ };
+ };
+
+ leds: gpio-leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ status = "okay";
+
+ status_led@0 {
+ gpios = <&pio 3 20 GPIO_ACTIVE_HIGH>; /* PD20 */
+ label = "status_led";
+ linux,default-trigger = "heartbeat";
+ linux,default-trigger-delay-ms = <0>;
+ };
+ };
+
+ reg_vcc5v: vcc5v {
+ /* board wide 5V supply from the 12V->5V regulator */
+ compatible = "regulator-fixed";
+ regulator-name = "vcc-5v";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
+
+ reg_exxt_vbus: exxt-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "exxxxt-vbus";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <1000>;
+ gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>;
+ regulator-always-on;
+ regulator-boot-on;
+ enable-active-high;
+ };
+
+ reg_usb0_vbus: usb0-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb0-vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-enable-ramp-delay = <1000>;
+ gpio = <&r_pio 0 4 GPIO_ACTIVE_HIGH>;
+ regulator-always-on;
+ regulator-boot-on;
+ enable-active-high;
+ };
+
+ reg_usb1_vbus: usb1-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb1-vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-enable-ramp-delay = <1000>;
+ gpio = <&r_pio 0 12 GPIO_ACTIVE_HIGH>;
+ regulator-always-on;
+ regulator-boot-on;
+ enable-active-high;
+ };
+};
+
+&mmc0 {
+ vmmc-supply = <®_cldo3>;
+ vqmmc-supply = <®_cldo1>;
+ cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_DOWN)>; /* PF6 */
+ bus-width = <4>;
+ max-frequency = <20000000>;
+ status = "okay";
+};
+
+&pio {
+ vcc-pb-supply = <®_cldo3>;
+ vcc-pc-supply = <®_cldo1>;
+ vcc-pd-supply = <®_dcdc4>;
+ vcc-pe-supply = <®_dcdc4>;
+ vcc-pf-supply = <®_cldo3>;
+ vcc-pg-supply = <®_bldo1>;
+ vcc-ph-supply = <®_cldo3>;
+ vcc-pi-supply = <®_dcdc4>;
+ vcc-pj-supply = <®_dcdc4>;
+ vcc-pk-supply = <®_bldo3>;
+};
+
+&r_i2c0 {
+ status = "okay";
+
+ axp717: pmic@35 {
+ compatible = "x-powers,axp717";
+ reg = <0x35>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ interrupt-parent = <&nmi_intc>;
+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+
+ vin1-supply = <®_vcc5v>;
+ vin2-supply = <®_vcc5v>;
+ vin3-supply = <®_vcc5v>;
+ vin4-supply = <®_vcc5v>;
+ aldoin-supply = <®_vcc5v>;
+ bldoin-supply = <®_vcc5v>;
+ cldoin-supply = <®_vcc5v>;
+
+ regulators {
+ /* Supplies the "little" cluster (1.4 GHz cores) */
+ reg_dcdc1: dcdc1 {
+ regulator-always-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <1160000>;
+ regulator-name = "vdd-cpu0-3";
+ };
+
+ reg_dcdc2: dcdc2 {
+ regulator-always-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <1160000>;
+ regulator-name = "vdd-gpu-sys";
+ };
+
+ reg_dcdc3: dcdc3 {
+ regulator-always-on;
+ regulator-min-microvolt = <1160000>;
+ regulator-max-microvolt = <1160000>;
+ regulator-name = "vdd-dram";
+ };
+
+ reg_dcdc4: dcdc4 {
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vdd-io";
+ };
+
+ reg_aldo1: aldo1 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "axp2202-aldo1";
+ };
+
+ reg_aldo2: aldo2 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "axp2202-aldo2";
+ };
+
+ reg_aldo3: aldo3 {
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc-pl-pm";
+ };
+
+ reg_aldo4: aldo4 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-pll-dxco-avcc";
+ };
+
+ reg_bldo1: bldo1 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-pg-wifi-lvds";
+ };
+
+ reg_bldo2: bldo2 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-dram-1v8";
+ };
+
+ reg_bldo3: bldo3 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-cvp-pk-vid1v8";
+ };
+
+ reg_bldo4: bldo4 {
+ regulator-always-on;
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-name = "axp2202-bldo4";
+ };
+
+ reg_cldo1: cldo1 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-pc";
+ };
+
+ reg_cldo2: cldo2 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-efuse";
+ };
+
+ reg_cldo3: cldo3 {
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc-mmc-eth-codec";
+ };
+
+ reg_cldo4: cldo4 {
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "axp2202-cldo4";
+ };
+
+ reg_cpusldo: cpusldo {
+ /* supplies the management core */
+ regulator-always-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+ regulator-name = "vdd-cpus";
+ };
+ };
+ };
+
+ axp323: pmic@36 {
+ compatible = "x-powers,axp323";
+ reg = <0x36>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ interrupt-parent = <&nmi_intc>;
+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+ status = "okay";
+
+ vin1-supply = <®_vcc5v>;
+ vin2-supply = <®_vcc5v>;
+ vin3-supply = <®_vcc5v>;
+
+ regulators {
+ /* Supplies the "big" cluster (1.8 GHz cores) */
+ reg_dcdc1_323: dcdc1 {
+ regulator-always-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <1160000>;
+ regulator-name = "vdd-cpu4-7";
+ };
+
+ reg_dcdc2_323: dcdc2 {
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-name = "axp323-dcdc2";
+ };
+
+ reg_dcdc3_323: dcdc3 {
+ regulator-always-on;
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1000000>;
+ regulator-name = "vdd-npu";
+ };
+
+ reg_aldo1_323: aldo1 {
+ regulator-name = "axp323-aldo1";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ };
+
+ reg_dldo1_323: dldo1 {
+ regulator-name = "axp323-dldo1";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+ };
+ };
+};
+
+&r_pio {
+/*
+ * Specifying the supply would create a circular dependency.
+ *
+ * vcc-pl-supply = <®_aldo3>;
+ */
+ vcc-pm-supply = <®_aldo3>;
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_pb_pins>;
+ status = "okay";
+};
+
+&ehci0 {
+ drvvbus-supply = <®_usb0_vbus>;
+ status = "okay";
+};
+
+&ohci0 {
+ drvvbus-supply = <®_usb0_vbus>;
+ status = "okay";
+};
+
+&ehci1 {
+ drvvbus-supply = <®_usb1_vbus>;
+ status = "okay";
+};
+
+&ohci1 {
+ drvvbus-supply = <®_usb1_vbus>;
+ status = "okay";
+};
+
+&usbphy {
+ status = "okay";
+};
+
+&gmac1 {
+ phy-mode = "rgmii";
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&gmac1_pins_default>;
+ pinctrl-1 = <&gmac1_pins_sleep>;
+ aw,soc-phy25m;
+ tx-delay = <1>;
+ rx-delay = <3>;
+ dwmac3v3-supply = <®_cldo3>;
+ phy3v3-supply = <®_cldo3>;
+ status = "okay";
+};
+
+&gmac1_phy0 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <1>;
+ reset-gpios = <&pio 8 15 GPIO_ACTIVE_LOW>;
+ reset-assert-us = <15000>;
+ reset-deassert-us = <100000>;
+};
diff --git a/configs/orangepi-4a_defconfig b/configs/orangepi-4a_defconfig
new file mode 100644
index 0000000000..5a9422535c
--- /dev/null
+++ b/configs/orangepi-4a_defconfig
@@ -0,0 +1,26 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_SUNXI_ARMV8_32BIT_BUILD=y
+CONFIG_DEFAULT_DEVICE_TREE="sun55i-a527-orangepi-4a"
+CONFIG_SPL=y
+CONFIG_DRAM_SUNXI_DX_ODT=0x07070707
+CONFIG_DRAM_SUNXI_DX_DRI=0x0d0d0d0d
+CONFIG_DRAM_SUNXI_CA_DRI=0x0e0e
+CONFIG_DRAM_SUNXI_ODT_EN=0x84848484
+CONFIG_DRAM_SUNXI_TPR0=0x80808080
+CONFIG_DRAM_SUNXI_TPR1=0x06060606
+CONFIG_DRAM_SUNXI_TPR6=0x38000000
+CONFIG_DRAM_SUNXI_TPR10=0x802f3333
+CONFIG_DRAM_SUNXI_TPR11=0xc6c4c2c0
+CONFIG_DRAM_SUNXI_TPR12=0x3a373233
+CONFIG_MACH_SUN55I_A523=y
+CONFIG_R_I2C_ENABLE=y
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL_I2C=y
+CONFIG_SPL_SYS_I2C_LEGACY=y
+CONFIG_SYS_I2C_MVTWSI=y
+CONFIG_SYS_I2C_SLAVE=0x7f
+CONFIG_SYS_I2C_SPEED=400000
+CONFIG_AXP717_POWER=y
+CONFIG_AXP_DCDC2_VOLT=920
+CONFIG_AXP_DCDC3_VOLT=1100
--
Created with Armbian build tools https://github.com/armbian/build
patch/u-boot/sunxi-dev-u-boot-a523/Fix-uboot-sun55iw3-orangepi4a.patch
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: John Doe <john.doe@somewhere.on.planet>
Date: Mon, 24 Feb 2025 23:29:02 -0300
Subject: Fix u-boot sun55iw3-orangepi-4a
Signed-off-by: John Doe <john.doe@somewhere.on.planet>
---
arch/arm/dts/sun55i-t527-orangepi-4a.dts | 21 ----------
configs/orangepi-4a_defconfig | 2 +-
2 files changed, 1 insertion(+), 22 deletions(-)
diff --git a/arch/arm/dts/sun55i-t527-orangepi-4a.dts b/arch/arm/dts/sun55i-t527-orangepi-4a.dts
index 06046e2555..d6e291c3b1 100644
--- a/arch/arm/dts/sun55i-t527-orangepi-4a.dts
+++ b/arch/arm/dts/sun55i-t527-orangepi-4a.dts
@@ -350,26 +350,5 @@
};
&usbphy {
status = "okay";
};
-
-&gmac1 {
- phy-mode = "rgmii";
- pinctrl-names = "default", "sleep";
- pinctrl-0 = <&gmac1_pins_default>;
- pinctrl-1 = <&gmac1_pins_sleep>;
- aw,soc-phy25m;
- tx-delay = <1>;
- rx-delay = <3>;
- dwmac3v3-supply = <®_cldo3>;
- phy3v3-supply = <®_cldo3>;
- status = "okay";
-};
-
-&gmac1_phy0 {
- compatible = "ethernet-phy-ieee802.3-c22";
- reg = <1>;
- reset-gpios = <&pio 8 15 GPIO_ACTIVE_LOW>;
- reset-assert-us = <15000>;
- reset-deassert-us = <100000>;
-};
diff --git a/configs/orangepi-4a_defconfig b/configs/orangepi-4a_defconfig
index 5a9422535c..10901edfc7 100644
--- a/configs/orangepi-4a_defconfig
+++ b/configs/orangepi-4a_defconfig
@@ -1,9 +1,9 @@
CONFIG_ARM=y
CONFIG_ARCH_SUNXI=y
CONFIG_SUNXI_ARMV8_32BIT_BUILD=y
-CONFIG_DEFAULT_DEVICE_TREE="sun55i-a527-orangepi-4a"
+CONFIG_DEFAULT_DEVICE_TREE="sun55i-t527-orangepi-4a"
CONFIG_SPL=y
CONFIG_DRAM_SUNXI_DX_ODT=0x07070707
CONFIG_DRAM_SUNXI_DX_DRI=0x0d0d0d0d
CONFIG_DRAM_SUNXI_CA_DRI=0x0e0e
CONFIG_DRAM_SUNXI_ODT_EN=0x84848484
--
Created with Armbian build tools https://github.com/armbian/build
Those were the changes I made, I don't have the board to be able to test and try to repair the compilation, if someone has the board and can make the missing changes maybe this will help.
You need to clone the following repository to apply the above changes:
https://github.com/juanesf/build.git