From 959226816d239c64e85cbb703b280b5572bba73c Mon Sep 17 00:00:00 2001 From: Elias Bakken Date: Fri, 24 Nov 2023 00:23:35 +0100 Subject: [PATCH] Update Armbian to 23.08, add overlay that enables USB-C peripheral, add overlay for SPI1 --- armbian/customize-image-barebone.sh | 17 + armbian/customize-image-fluidd.sh | 17 + armbian/customize-image-mainsail.sh | 16 + armbian/watermark-reflash.png | Bin 2137 -> 0 bytes armbian/watermark.png | Bin 1939 -> 2757 bytes rebuild.sh | 8 +- ...llwinner-add-support-for-Recore-dtbs.patch | 612 ------------------ userpatches/overlay/dts/sun50i-a64-spi1.dts | 27 + .../overlay/dts/sun50i-a64-usb-device.dts | 29 + userpatches/overlay/klipper/ar100.config | 16 +- .../u-boot-sunxi/allwinner-boot-splash.patch | 2 +- 11 files changed, 121 insertions(+), 623 deletions(-) delete mode 100644 armbian/watermark-reflash.png delete mode 100644 userpatches/kernel/archive/sunxi-5.15/allwinner-add-support-for-Recore-dtbs.patch create mode 100644 userpatches/overlay/dts/sun50i-a64-spi1.dts create mode 100644 userpatches/overlay/dts/sun50i-a64-usb-device.dts diff --git a/armbian/customize-image-barebone.sh b/armbian/customize-image-barebone.sh index c2aa01d..02a5a4c 100644 --- a/armbian/customize-image-barebone.sh +++ b/armbian/customize-image-barebone.sh @@ -22,9 +22,26 @@ install_bins(){ chmod +x /usr/local/bin/* } +add_overlays(){ + mkdir /boot/overlay-user + cp /tmp/overlay/dts/* /boot/overlay-user + armbian-add-overlay /boot/overlay-user/sun50i-a64-usb-device.dts +} + +fix_netplan(){ + cat <<- EOF > /etc/netplan/armbian-default.yaml + network: + version: 2 + renderer: NetworkManager + EOF +} + echo "🍰 Rebuild starting..." install_bins +add_overlays +fix_netplan + cp /tmp/overlay/rebuild/rebuild-version /etc/ echo "🍰 Rebuild finished" diff --git a/armbian/customize-image-fluidd.sh b/armbian/customize-image-fluidd.sh index 7523ce4..07898f7 100644 --- a/armbian/customize-image-fluidd.sh +++ b/armbian/customize-image-fluidd.sh @@ -155,6 +155,21 @@ post_build() { # Force debian to change password chage -d 0 debian } + +add_overlays(){ + mkdir /boot/overlay-user + cp /tmp/overlay/dts/* /boot/overlay-user + armbian-add-overlay /boot/overlay-user/sun50i-a64-usb-device.dts +} + +fix_netplan(){ + cat <<- EOF > /etc/netplan/armbian-default.yaml + network: + version: 2 + renderer: NetworkManager + EOF +} + echo "🍰 Rebuild starting..." set -e @@ -168,6 +183,8 @@ install_klipperscreen install_ustreamer install_bins install_autohotspot +add_overlays +fix_netplan post_build echo "🍰 Rebuild finished" diff --git a/armbian/customize-image-mainsail.sh b/armbian/customize-image-mainsail.sh index f43e320..985b124 100644 --- a/armbian/customize-image-mainsail.sh +++ b/armbian/customize-image-mainsail.sh @@ -166,6 +166,20 @@ post_build() { chage -d 0 debian } +add_overlays(){ + mkdir /boot/overlay-user + cp /tmp/overlay/dts/* /boot/overlay-user + armbian-add-overlay /boot/overlay-user/sun50i-a64-usb-device.dts +} + +fix_netplan(){ + cat <<- EOF > /etc/netplan/armbian-default.yaml + network: + version: 2 + renderer: NetworkManager + EOF +} + set -e echo "🍰 Rebuild starting..." prepare_build @@ -177,6 +191,8 @@ install_klipperscreen install_ustreamer install_bins install_autohotspot +add_overlays +fix_netplan post_build echo "🍰 Rebuild finished" diff --git a/armbian/watermark-reflash.png b/armbian/watermark-reflash.png deleted file mode 100644 index a1e8083b5e5220a6cdbd3df546c91ef4650136f8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2137 zcmV-f2&VUmP)sB00009a7bBm000id z000id0mpBsWB>pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H12j)pc zK~#90?VNv*Rb?5+Ki?H-N03r;FejqYBvG2l99=1memEp8nHY!#fmTi=@^J~|J-S5nq zbKY~F=leeQ-1ojep67Y5Z2y9EcoBFWcnDZ4X>UqBY)=HnrIqgnvnB1W;+_MXP>^?< zq^qlVPXxXhi`PnOD_BQe*d7M_AQo?v^gs!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fC^xV0Dd;Z2&e!%hj(Z)oJgWqe)YtXOH7B zzQRw;%L@BKFOt1daUXx|rHo;nL}Ko;5W7vw-xHZr3^{iA=Il}3fDvK{h5__3-yMuo z?Z2#;cKgt!$8P>uBeFZZDEBToGBz-&?>#Lvifa=}0Qlf2dlH|Y7v#kC!7#6ERDF(I z6g>?zXSa-J4;Q pgne9R!-GHrp43&||G&b#)R0m$oo^)y(oxWNcn^PU>#3MO{|i~lrTqW^ diff --git a/rebuild.sh b/rebuild.sh index e4e43dc..5afe659 100755 --- a/rebuild.sh +++ b/rebuild.sh @@ -27,8 +27,8 @@ NAME="rebuild-${VERSION}-${TAG}" cd $BUILD_DIR git reset --hard -git checkout v23.05.2 git pull +git checkout v23.08 rm -rf "userpatches" cd "$ROOT_DIR" @@ -37,11 +37,7 @@ cp armbian/customize-image-"${VERSION}".sh "${BUILD_DIR}"/userpatches/customize- cp armbian/recore.csc "${BUILD_DIR}"/config/boards rm -f "${BUILD_DIR}/patch/u-boot/u-boot-sunxi/allwinner-boot-splash.patch" -if [ "$VERSION" == "reflash" ]; then - cp armbian/watermark-reflash.png "${BUILD_DIR}"/packages/plymouth-theme-armbian/watermark.png -else - cp armbian/watermark.png "${BUILD_DIR}"/packages/plymouth-theme-armbian/watermark.png -fi +cp armbian/watermark.png "${BUILD_DIR}"/packages/plymouth-theme-armbian/watermark.png echo "${NAME}" > "${BUILD_DIR}"/userpatches/overlay/rebuild/rebuild-version diff --git a/userpatches/kernel/archive/sunxi-5.15/allwinner-add-support-for-Recore-dtbs.patch b/userpatches/kernel/archive/sunxi-5.15/allwinner-add-support-for-Recore-dtbs.patch deleted file mode 100644 index 47c2324..0000000 --- a/userpatches/kernel/archive/sunxi-5.15/allwinner-add-support-for-Recore-dtbs.patch +++ /dev/null @@ -1,612 +0,0 @@ -diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile -index 7dcf90b32..8be674369 100644 ---- a/arch/arm64/boot/dts/allwinner/Makefile -+++ b/arch/arm64/boot/dts/allwinner/Makefile -@@ -20,6 +20,10 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pinephone-1.2.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pinetab.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pinetab-early-adopter.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-sopine-baseboard.dtb -+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-recore.dtb -+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-recore-a5.dtb -+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-recore-a6.dtb -+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-recore-a7.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-teres-i.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a100-allwinner-perf1.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-bananapi-m2-plus.dtb -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-recore-a5.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-recore-a5.dts -new file mode 100644 -index 000000000..1920172d3 ---- /dev/null -+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-recore-a5.dts -@@ -0,0 +1,65 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+ -+/dts-v1/; -+ -+#include "sun50i-a64-recore.dtsi" -+ -+/ { -+ model = "Recore-A5"; -+ compatible = "iagent,recore-a5", "allwinner,sun50i-a64"; -+ -+ e0-consumer { -+ compatible = "custom,reg-userspace-consumer"; -+ regulator-name = "e0-consumer"; -+ controlled-supply = <®_aldo1>; -+ }; -+ -+ e1-consumer { -+ compatible = "custom,reg-userspace-consumer"; -+ regulator-name = "e1-consumer"; -+ controlled-supply = <®_aldo2>; -+ }; -+ -+ e2-consumer { -+ compatible = "custom,reg-userspace-consumer"; -+ regulator-name = "e2-consumer"; -+ controlled-supply = <®_dldo3>; -+ }; -+ -+ e3-consumer { -+ compatible = "custom,reg-userspace-consumer"; -+ regulator-name = "e3-consumer"; -+ controlled-supply = <®_dldo4>; -+ }; -+}; -+ -+®_aldo1 { -+ regulator-min-microvolt = <700000>; -+ regulator-max-microvolt = <700000>; -+ regulator-name = "vcc-vref-e0"; -+}; -+ -+®_aldo2 { -+ regulator-min-microvolt = <3200000>; -+ regulator-max-microvolt = <3200000>; -+ regulator-name = "vcc-vref-e1"; -+}; -+ -+®_dldo3 { -+ regulator-min-microvolt = <700000>; -+ regulator-max-microvolt = <700000>; -+ regulator-name = "vcc-vref-e2"; -+}; -+ -+®_dldo4 { -+ regulator-min-microvolt = <700000>; -+ regulator-max-microvolt = <700000>; -+ regulator-name = "vcc-vref-e3"; -+}; -+ -+/* STM32 */ -+&uart4 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart4_pins>; -+ status = "okay"; -+}; -\ No newline at end of file -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-recore-a6.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-recore-a6.dts -new file mode 100644 -index 000000000..c5be6e937 ---- /dev/null -+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-recore-a6.dts -@@ -0,0 +1,22 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+ -+/dts-v1/; -+ -+#include "sun50i-a64-recore.dtsi" -+ -+/ { -+ model = "Recore-A6"; -+ compatible = "iagent,recore-a6", "allwinner,sun50i-a64"; -+}; -+ -+®_aldo1 { -+ regulator-always-on; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-ext"; -+}; -+&uart4 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart4_pins>; -+ status = "okay"; -+}; -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-recore-a7.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-recore-a7.dts -new file mode 100644 -index 000000000..5cf1bcca7 ---- /dev/null -+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-recore-a7.dts -@@ -0,0 +1,41 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+ -+/dts-v1/; -+ -+#include "sun50i-a64-recore.dtsi" -+#include -+ -+/ { -+ model = "Recore-A7"; -+ compatible = "iagent,recore-a7", "allwinner,sun50i-a64"; -+}; -+ -+®_usb1_vbus3 { -+ gpio = <&pio 3 5 GPIO_ACTIVE_HIGH> ; /* PD5 */ -+}; -+ -+®_usb1_vbus4 { -+ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH> ; /* PD6 */ -+}; -+ -+®_aldo1 { -+ regulator-always-on; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-ext"; -+}; -+ -+/* Set over current to lowest value: 35 A = 700 mV */ -+®_dldo2 { -+ regulator-min-microvolt = <700000>; -+ regulator-max-microvolt = <700000>; -+}; -+ -+&usbphy { -+ usb0_id_det-gpios = <&pio 4 7 GPIO_ACTIVE_LOW>; -+}; -+&uart2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart2_pins>; -+ status = "okay"; -+}; -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-recore.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-recore.dts -new file mode 100644 -index 000000000..5cf1bcca7 ---- /dev/null -+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-recore.dts -@@ -0,0 +1,31 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+ -+/dts-v1/; -+ -+#include "sun50i-a64-recore.dtsi" -+ -+/ { -+ model = "Recore-all"; -+ compatible = "iagent,recore-all", "allwinner,sun50i-a64"; -+ -+ reg_usb1_vbus5: usb1-vbus5 { -+ compatible = "regulator-fixed"; -+ regulator-name = "usb1-vbus5"; -+ gpio = <&pio 3 5 GPIO_ACTIVE_HIGH> ; /* PD5 */ -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ regulator-always-on; -+ enable-active-high; -+ vin-supply = <®_5v>; -+ }; -+ reg_usb1_vbus6: usb1-vbus6 { -+ compatible = "regulator-fixed"; -+ regulator-name = "usb1-vbus6"; -+ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH> ; /* PD6 */ -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ regulator-always-on; -+ enable-active-high; -+ vin-supply = <®_5v>; -+ }; -+}; -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-recore.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-recore.dtsi -new file mode 100644 -index 000000000..89fcf8ccb ---- /dev/null -+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-recore.dtsi -@@ -0,0 +1,407 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+ -+/dts-v1/; -+ -+#include "sun50i-a64.dtsi" -+#include "sun50i-a64-cpu-opp.dtsi" -+ -+#include -+#include -+ -+/ { -+ aliases { -+ ethernet0 = &emac; -+ serial0 = &uart0; -+ }; -+ -+ chosen { -+ stdout-path = "serial0:115200n8"; -+ }; -+ -+ hdmi-connector { -+ compatible = "hdmi-connector"; -+ type = "a"; -+ -+ port { -+ hdmi_con_in: endpoint { -+ remote-endpoint = <&hdmi_out_con>; -+ }; -+ }; -+ }; -+ leds { -+ compatible = "gpio-leds"; -+ -+ heartbeat-led { -+ label = "recore:white:heartbeat"; -+ gpios = <&pio 1 7 GPIO_ACTIVE_HIGH>; -+ linux,default-trigger = "heartbeat"; -+ function = LED_FUNCTION_STATUS; -+ color = ; -+ }; -+ -+ emmc-led { -+ label = "recore:white:emmc"; -+ gpios = <&pio 1 5 GPIO_ACTIVE_HIGH>; -+ linux,default-trigger = "mmc2"; -+ }; -+ -+ cpu-led { -+ label = "recore:white:cpu"; -+ gpios = <&pio 1 6 GPIO_ACTIVE_HIGH>; -+ linux,default-trigger = "activity"; -+ }; -+ -+ usb-led { -+ label = "recore:white:usb"; -+ function = LED_FUNCTION_USB; -+ gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; -+ trigger-sources = <&ohci1>, <&ehci1>; -+ linux,default-trigger = "usb-host"; -+ }; -+ }; -+ -+ reg_5v: 5v-buck { -+ compatible = "regulator-fixed"; -+ regulator-name = "5v-buck"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ regulator-always-on; -+ }; -+ -+ reg_usb1_vbus1: usb1-vbus1 { -+ compatible = "regulator-fixed"; -+ regulator-name = "usb1-vbus1"; -+ gpio = <&pio 7 0 GPIO_ACTIVE_HIGH> ; /* PH0 */ -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ regulator-always-on; -+ regulator-boot-on; -+ enable-active-high; -+ }; -+ -+ reg_usb1_vbus2: usb1-vbus2 { -+ compatible = "regulator-fixed"; -+ regulator-name = "usb1-vbus2"; -+ gpio = <&pio 7 1 GPIO_ACTIVE_HIGH> ; /* PH1 */ -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ regulator-always-on; -+ regulator-boot-on; -+ enable-active-high; -+ }; -+ -+ reg_usb1_vbus3: usb1-vbus3 { -+ compatible = "regulator-fixed"; -+ regulator-name = "usb1-vbus3"; -+ gpio = <&pio 7 2 GPIO_ACTIVE_HIGH> ; /* PH2 */ -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ regulator-always-on; -+ enable-active-high; -+ vin-supply = <®_5v>; -+ }; -+ -+ reg_usb1_vbus4: usb1-vbus4 { -+ compatible = "regulator-fixed"; -+ regulator-name = "usb1-vbus4"; -+ gpio = <&pio 7 3 GPIO_ACTIVE_HIGH> ; /* PH3 */ -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ startup-delay-us = <100000>; -+ regulator-always-on; -+ enable-active-high; -+ vin-supply = <®_5v>; -+ }; -+ -+ reg_hdmi_vbus: hdmi-vbus { -+ compatible = "regulator-fixed"; -+ regulator-name = "hdmi-vbus"; -+ gpio = <&pio 6 9 GPIO_ACTIVE_HIGH> ; /* PG9 */ -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ regulator-always-on; -+ enable-active-high; -+ }; -+}; -+ -+&de { -+ status = "okay"; -+}; -+ -+&cpu0 { -+ cpu-supply = <®_dcdc2>; -+}; -+ -+&cpu1 { -+ cpu-supply = <®_dcdc2>; -+}; -+ -+&cpu2 { -+ cpu-supply = <®_dcdc2>; -+}; -+ -+&cpu3 { -+ cpu-supply = <®_dcdc2>; -+}; -+ -+&emac { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&rgmii_pins>; -+ phy-mode = "rgmii-txid"; -+ phy-handle = <&ext_rgmii_phy>; -+ phy-supply = <®_dcdc1>; -+ phy-io-supply = <®_dcdc1>; -+ status = "okay"; -+}; -+ -+&hdmi { -+ hvcc-supply = <®_dldo1>; -+ status = "okay"; -+}; -+ -+&hdmi_out { -+ hdmi_out_con: endpoint { -+ remote-endpoint = <&hdmi_con_in>; -+ }; -+}; -+ -+&mdio { -+ ext_rgmii_phy: ethernet-phy@1 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <7>; -+ }; -+}; -+ -+&mixer0 { -+ status = "disabled"; -+}; -+ -+&tcon0 { -+ status = "disabled"; -+}; -+ -+&mmc2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc2_pins>/*, <&mmc2_ds_pin>*/; -+ vmmc-supply = <®_dcdc1>; -+ vqmmc-supply = <®_eldo1>; -+ non-removable; -+ bus-width = <8>; -+ cap-mmc-hw-reset; -+ mmc-hs200-1_8v; -+ status = "okay"; -+}; -+ -+&ohci0 { -+ status = "okay"; -+}; -+ -+&ohci1 { -+ status = "okay"; -+}; -+ -+&ehci0 { -+ status = "okay"; -+}; -+ -+&ehci1 { -+ status = "okay"; -+}; -+ -+&pio { -+ vcc-pb-supply = <®_dcdc1>; -+ vcc-pc-supply = <®_eldo1>; -+ vcc-pd-supply = <®_dcdc1>; -+ vcc-pe-supply = <®_dcdc1>; -+ vcc-pf-supply = <®_dcdc1>; -+ vcc-pg-supply = <®_dcdc1>; -+ vcc-ph-supply = <®_dcdc1>; -+ vcc-pl-supply = <®_dcdc1>; -+}; -+ -+&r_rsb { -+ status = "okay"; -+ axp803: pmic@3a3 { -+ compatible = "x-powers,axp803"; -+ reg = <0x3a3>; -+ interrupt-parent = <&r_intc>; -+ interrupts = ; -+ }; -+}; -+ -+#include "axp803.dtsi" -+ -+&ac_power_supply { -+ status = "okay"; -+}; -+ -+&battery_power_supply { -+ status = "okay"; -+}; -+ -+®_dc1sw { -+ regulator-always-on; -+ regulator-name = "vcc-phy"; -+ regulator-enable-ramp-delay = <100000>; -+}; -+ -+®_dcdc1 { -+ regulator-always-on; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-3v3"; -+}; -+ -+®_dcdc2 { -+ regulator-always-on; -+ regulator-min-microvolt = <1040000>; -+ regulator-max-microvolt = <1300000>; -+ regulator-name = "vdd-cpux"; -+}; -+ -+®_dcdc5 { -+ regulator-always-on; -+ regulator-min-microvolt = <1360000>; -+ regulator-max-microvolt = <1360000>; -+ regulator-name = "vcc-dram"; -+}; -+ -+®_dcdc6 { -+ regulator-always-on; -+ regulator-min-microvolt = <1100000>; -+ regulator-max-microvolt = <1100000>; -+ regulator-name = "vdd-sys"; -+}; -+ -+®_aldo3 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "vcc-pll-avcc"; -+}; -+ -+®_dldo1 { -+ regulator-always-on; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-hdmi"; -+}; -+ -+/* Set over current to lowest value: 35 A = 700 mV, 50 A = 1000 mV */ -+®_dldo2 { -+ regulator-always-on; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1000000>; -+ regulator-name = "current-control"; -+}; -+ -+®_eldo1 { -+ regulator-always-on; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ regulator-name = "emmc-io"; -+}; -+ -+®_fldo1 { -+ regulator-name = "vdd-hsic"; -+ status = "disabled"; -+}; -+ -+®_fldo2 { -+ regulator-always-on; -+ regulator-min-microvolt = <1100000>; -+ regulator-max-microvolt = <1100000>; -+ regulator-name = "vdd-cpus"; -+}; -+ -+&gpio0_ldo { -+ function = "ldo"; -+}; -+ -+&gpio1_ldo { -+ function = "ldo"; -+}; -+ -+®_ldo_io0 { -+ regulator-always-on; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-ref"; -+ status = "okay"; -+}; -+ -+®_ldo_io1 { -+ regulator-always-on; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-iref"; -+ status = "okay"; -+}; -+ -+®_rtc_ldo { -+ regulator-name = "vcc-rtc"; -+}; -+ -+&simplefb_hdmi { -+ vcc-hdmi-supply = <®_hdmi_vbus>; -+}; -+ -+/* Debug port */ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_pb_pins>; -+ status = "okay"; -+}; -+ -+/* AR100 null-modem */ -+&uart1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart1_pins>; -+ status = "okay"; -+}; -+ -+&usb_otg { -+ dr_mode = "peripheral"; -+ vcc-supply = <®_dcdc1>; -+ status = "okay"; -+}; -+ -+&usb_power_supply { -+ status = "okay"; -+}; -+ -+&usbphy { -+ usb0_vbus_power-supply = <&usb_power_supply>; -+ vcc-supply = <®_dcdc1>; -+ status = "okay"; -+}; -+&cpu0 { -+ /delete-property/ cpu-idle-states; -+}; -+ -+&cpu1 { -+ /delete-property/ cpu-idle-states; -+}; -+ -+&cpu2 { -+ /delete-property/ cpu-idle-states; -+}; -+ -+&cpu3 { -+ /delete-property/ cpu-idle-states; -+}; -+ -+/ { -+ cpus { -+ /delete-node/ idle-states; -+ }; -+ /delete-node/ scpi; -+}; -+ -+&mbus{ -+ status="disabled"; -+}; -+ -+&mali { -+ assigned-clock-rates = <297000000>; -+}; diff --git a/userpatches/overlay/dts/sun50i-a64-spi1.dts b/userpatches/overlay/dts/sun50i-a64-spi1.dts new file mode 100644 index 0000000..0b432e8 --- /dev/null +++ b/userpatches/overlay/dts/sun50i-a64-spi1.dts @@ -0,0 +1,27 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "allwinner,sun50i-a64"; + + fragment@0 { + target-path = "/aliases"; + __overlay__ { + spi1 = "/soc/spi@1c69000"; + }; + }; + + fragment@1 { + target = <&spi1>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + spidev { + compatible = "armbian,spi-dev"; + reg = <0>; + spi-max-frequency = <1000000>; + }; + }; + }; +}; \ No newline at end of file diff --git a/userpatches/overlay/dts/sun50i-a64-usb-device.dts b/userpatches/overlay/dts/sun50i-a64-usb-device.dts new file mode 100644 index 0000000..8f74e0c --- /dev/null +++ b/userpatches/overlay/dts/sun50i-a64-usb-device.dts @@ -0,0 +1,29 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "allwinner,sun50i-a64"; + + fragment@0 { + target = <&ehci0>; + __overlay__ { + status = "disabled"; + }; + }; + + fragment@1 { + target = <&ohci0>; + __overlay__ { + status = "disabled"; + }; + }; + + fragment@2 { + target = <&usbphy>; + __overlay__ { + usb0_vbus_det-gpios = <&pio 7 10 0>; + usb0_vbus_power-supply = <&usb_power_supply>; + }; + }; + +}; \ No newline at end of file diff --git a/userpatches/overlay/klipper/ar100.config b/userpatches/overlay/klipper/ar100.config index a717fe3..64831a0 100644 --- a/userpatches/overlay/klipper/ar100.config +++ b/userpatches/overlay/klipper/ar100.config @@ -1,5 +1,13 @@ -# Base config file for the ar100 CPU +# config for the AR100 + +CONFIG_LOW_LEVEL_OPTIONS=y CONFIG_MACH_AR100=y -CONFIG_WANT_DISPLAYS=n -CONFIG_WANT_SOFTWARE_I2C=n -CONFIG_WANT_SOFTWARE_SPI=n +CONFIG_WANT_GPIO_BITBANGING=y +# CONFIG_WANT_DISPLAYS is not set +# CONFIG_WANT_SENSORS is not set +CONFIG_WANT_SOFTWARE_SPI=y +CONFIG_HAVE_GPIO=y +CONFIG_HAVE_GPIO_SPI=y +CONFIG_HAVE_STEPPER_BOTH_EDGE=y +CONFIG_HAVE_LIMITED_CODE_SIZE=y +CONFIG_INLINE_STEPPER_HACK=y \ No newline at end of file diff --git a/userpatches/u-boot/u-boot-sunxi/allwinner-boot-splash.patch b/userpatches/u-boot/u-boot-sunxi/allwinner-boot-splash.patch index c6895b0..49e8489 100644 --- a/userpatches/u-boot/u-boot-sunxi/allwinner-boot-splash.patch +++ b/userpatches/u-boot/u-boot-sunxi/allwinner-boot-splash.patch @@ -16,7 +16,7 @@ index 3a857b3f..492476e5 100644 @@ -1662,6 +1662,7 @@ menu "Misc commands" config CMD_BMP bool "Enable 'bmp' command" - depends on LCD || DM_VIDEO || VIDEO + depends on VIDEO + default y help This provides a way to obtain information about a BMP-format image