mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
- Fix dram, mmc for h616. - The prefix is missing if we use OF_UPSTREAM - upstream: arm64: sun50i-h616: sync with sunxi-6.12 kernel - upstream: arm64: Add sun50i-h618-bananapi-m4-berry.dts
420 lines
9.7 KiB
Diff
420 lines
9.7 KiB
Diff
From 07306aba1fd53935ae6df436d4f71313f49614ac Mon Sep 17 00:00:00 2001
|
|
From: The-going <48602507+The-going@users.noreply.github.com>
|
|
Date: Sun, 30 Mar 2025 18:12:38 +0300
|
|
Subject: dts: upstream: arm64: Add sun50i-h618-bananapi-m4-berry.dts
|
|
|
|
---
|
|
dts/upstream/src/arm64/allwinner/axp313a.dtsi | 64 ++++
|
|
.../src/arm64/allwinner/sun50i-h616.dtsi | 4 +-
|
|
.../sun50i-h618-bananapi-m4-berry.dts | 312 ++++++++++++++++++
|
|
3 files changed, 378 insertions(+), 2 deletions(-)
|
|
create mode 100644 dts/upstream/src/arm64/allwinner/axp313a.dtsi
|
|
create mode 100644 dts/upstream/src/arm64/allwinner/sun50i-h618-bananapi-m4-berry.dts
|
|
|
|
diff --git a/dts/upstream/src/arm64/allwinner/axp313a.dtsi b/dts/upstream/src/arm64/allwinner/axp313a.dtsi
|
|
new file mode 100644
|
|
index 000000000000..99057e975574
|
|
--- /dev/null
|
|
+++ b/dts/upstream/src/arm64/allwinner/axp313a.dtsi
|
|
@@ -0,0 +1,64 @@
|
|
+
|
|
+&r_i2c {
|
|
+ status = "okay";
|
|
+
|
|
+ axp313a: pmic@36 {
|
|
+ compatible = "x-powers,axp313a";
|
|
+ reg = <0x36>;
|
|
+ #interrupt-cells = <1>;
|
|
+ interrupt-controller;
|
|
+ interrupt-parent = <&pio>;
|
|
+
|
|
+ vin1-supply = <®_vcc5v>;
|
|
+ vin2-supply = <®_vcc5v>;
|
|
+ vin3-supply = <®_vcc5v>;
|
|
+
|
|
+ regulators {
|
|
+ reg_dcdc1: dcdc1 {
|
|
+ regulator-name = "vdd-gpu";
|
|
+ regulator-min-microvolt = <810000>;
|
|
+ regulator-max-microvolt = <990000>;
|
|
+ regulator-step-delay-us = <25>;
|
|
+ regulator-final-delay-us = <50>;
|
|
+ regulator-always-on;
|
|
+ };
|
|
+
|
|
+ reg_dcdc2: dcdc2 {
|
|
+ regulator-name = "vdd-cpu";
|
|
+ regulator-min-microvolt = <500000>;
|
|
+ regulator-max-microvolt = <1200000>;
|
|
+ regulator-step-delay-us = <25>;
|
|
+ regulator-final-delay-us = <50>;
|
|
+ regulator-ramp-delay = <200>;
|
|
+ regulator-always-on;
|
|
+ };
|
|
+
|
|
+ reg_dcdc3: dcdc3 {
|
|
+ regulator-name = "vcc-dram";
|
|
+ regulator-min-microvolt = <1100000>;
|
|
+ regulator-max-microvolt = <1100000>;
|
|
+ regulator-step-delay-us = <25>;
|
|
+ regulator-final-delay-us = <50>;
|
|
+ regulator-always-on;
|
|
+ };
|
|
+
|
|
+ reg_aldo1: aldo1 {
|
|
+ regulator-name = "vcc-1v8";
|
|
+ regulator-min-microvolt = <1800000>;
|
|
+ regulator-max-microvolt = <1800000>;
|
|
+ regulator-step-delay-us = <25>;
|
|
+ regulator-final-delay-us = <50>;
|
|
+ regulator-always-on;
|
|
+ };
|
|
+
|
|
+ reg_dldo1: dldo1 {
|
|
+ regulator-name = "vcc-3v3";
|
|
+ regulator-min-microvolt = <3300000>;
|
|
+ regulator-max-microvolt = <3300000>;
|
|
+ regulator-step-delay-us = <25>;
|
|
+ regulator-final-delay-us = <50>;
|
|
+ regulator-always-on;
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+};
|
|
diff --git a/dts/upstream/src/arm64/allwinner/sun50i-h616.dtsi b/dts/upstream/src/arm64/allwinner/sun50i-h616.dtsi
|
|
index 3fb5c6e25af4..0573e208c855 100644
|
|
--- a/dts/upstream/src/arm64/allwinner/sun50i-h616.dtsi
|
|
+++ b/dts/upstream/src/arm64/allwinner/sun50i-h616.dtsi
|
|
@@ -353,8 +353,8 @@
|
|
ext_rgmii_pins: rgmii-pins {
|
|
pins = "PI0", "PI1", "PI2", "PI3", "PI4",
|
|
"PI5", "PI7", "PI8", "PI9", "PI10",
|
|
- "PI11", "PI12", "PI13", "PI14", "PI15",
|
|
- "PI16";
|
|
+ "PI11", "PI12", "PI13", "PI14", "PI15";
|
|
+ /* "PI16" Managed by mdio */
|
|
function = "emac0";
|
|
drive-strength = <40>;
|
|
};
|
|
diff --git a/dts/upstream/src/arm64/allwinner/sun50i-h618-bananapi-m4-berry.dts b/dts/upstream/src/arm64/allwinner/sun50i-h618-bananapi-m4-berry.dts
|
|
new file mode 100644
|
|
index 000000000000..2d3d8589eff4
|
|
--- /dev/null
|
|
+++ b/dts/upstream/src/arm64/allwinner/sun50i-h618-bananapi-m4-berry.dts
|
|
@@ -0,0 +1,312 @@
|
|
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
|
|
+/*
|
|
+ * Copyright (C) 2020 Arm Ltd.
|
|
+ * Copyright 2025 Armbian community.
|
|
+ */
|
|
+
|
|
+/dts-v1/;
|
|
+
|
|
+#include "sun50i-h616.dtsi"
|
|
+#include "sun50i-h616-cpu-opp.dtsi"
|
|
+#include "axp313a.dtsi"
|
|
+
|
|
+#include <dt-bindings/gpio/gpio.h>
|
|
+#include <dt-bindings/input/linux-event-codes.h>
|
|
+#include <dt-bindings/interrupt-controller/arm-gic.h>
|
|
+#include <dt-bindings/leds/common.h>
|
|
+
|
|
+/ {
|
|
+ model = "BananaPi M4 Berry";
|
|
+ compatible = "BiPai,bananapi-m4berry", "allwinner,sun50i-h616";
|
|
+
|
|
+ aliases {
|
|
+ ethernet0 = &emac0;
|
|
+ serial0 = &uart0;
|
|
+ };
|
|
+
|
|
+ chosen {
|
|
+ stdout-path = "serial0:115200n8";
|
|
+ };
|
|
+
|
|
+ leds: leds {
|
|
+ compatible = "gpio-leds";
|
|
+
|
|
+ led-0 {
|
|
+ label = "red_led";
|
|
+ gpios = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */
|
|
+ linux,default-trigger = "heartbeat";
|
|
+ };
|
|
+ };
|
|
+
|
|
+ gpio-keys {
|
|
+ compatible = "gpio-keys";
|
|
+
|
|
+ key-sw3 {
|
|
+ label = "sw3";
|
|
+ linux,code = <BTN_0>;
|
|
+ gpios = <&pio 2 7 GPIO_ACTIVE_LOW>; /* PC7 */
|
|
+ };
|
|
+ };
|
|
+
|
|
+ reg_vcc5v: vcc5v {
|
|
+ /* board wide 5V supply directly from the USB-C socket */
|
|
+ compatible = "regulator-fixed";
|
|
+ regulator-name = "vcc-5v";
|
|
+ regulator-min-microvolt = <5000000>;
|
|
+ regulator-max-microvolt = <5000000>;
|
|
+ regulator-always-on;
|
|
+ };
|
|
+
|
|
+ reg_usb_vbus: regulator-usb-vbus {
|
|
+ /* separate discrete regulator for the USB ports */
|
|
+ compatible = "regulator-fixed";
|
|
+ regulator-name = "usb-vbus";
|
|
+ regulator-min-microvolt = <5000000>;
|
|
+ regulator-max-microvolt = <5000000>;
|
|
+ vin-supply = <®_vcc5v>;
|
|
+ };
|
|
+
|
|
+ reg_vcc3v3: vcc3v3 {
|
|
+ /* SY8089 DC/DC converter */
|
|
+ compatible = "regulator-fixed";
|
|
+ regulator-name = "vcc-3v3";
|
|
+ regulator-min-microvolt = <3300000>;
|
|
+ regulator-max-microvolt = <3300000>;
|
|
+ vin-supply = <®_dldo1>;
|
|
+ regulator-always-on;
|
|
+ };
|
|
+
|
|
+ reg_vcc1v8: vcc1v8 {
|
|
+ /* Always on 1.8V/300mA regulator for WiFi and BT IO */
|
|
+ compatible = "regulator-fixed";
|
|
+ regulator-name = "vcc-1v8";
|
|
+ regulator-min-microvolt = <1800000>;
|
|
+ regulator-max-microvolt = <1800000>;
|
|
+ regulator-always-on;
|
|
+ vin-supply = <®_aldo1>;
|
|
+ };
|
|
+
|
|
+ reg_gmac_3v3: gmac-3v3 {
|
|
+ compatible = "regulator-fixed";
|
|
+ regulator-name = "gmac-3v3";
|
|
+ regulator-min-microvolt = <3300000>;
|
|
+ regulator-max-microvolt = <3300000>;
|
|
+ regulator-always-on;
|
|
+ vin-supply = <®_vcc5v>;
|
|
+ };
|
|
+
|
|
+ wifi_usb {
|
|
+ compatible = "usb-wifi";
|
|
+ status = "okay";
|
|
+ reset-gpios = <&pio 2 2 GPIO_ACTIVE_HIGH>; /* PC2 */
|
|
+ vin-supply = <®_vcc1v8>;
|
|
+ };
|
|
+
|
|
+ soc {
|
|
+ pwm: pwm@300a000 {
|
|
+ compatible = "allwinner,sun50i-h616-pwm";
|
|
+ reg = <0x0300a000 0x400>;
|
|
+ clocks = <&osc24M>, <&ccu CLK_BUS_PWM>;
|
|
+ clock-names = "mod", "bus";
|
|
+ resets = <&ccu RST_BUS_PWM>;
|
|
+ pwm-number = <6>;
|
|
+ pwm-base = <0x0>;
|
|
+ sunxi-pwms = <&pwm0>, <&pwm1>, <&pwm2>,
|
|
+ <&pwm3>, <&pwm4>, <&pwm5>;
|
|
+ #pwm-cells = <3>;
|
|
+ status = "okay";
|
|
+ };
|
|
+
|
|
+ pwm0: pwm0@0300a000 {
|
|
+ compatible = "allwinner,sunxi-pwm0";
|
|
+ pinctrl-names = "default";
|
|
+ };
|
|
+
|
|
+ pwm1: pwm1@0300a000 {
|
|
+ compatible = "allwinner,sunxi-pwm1";
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&pwm1_ph_pin>;
|
|
+ };
|
|
+
|
|
+ pwm2: pwm2@0300a000 {
|
|
+ compatible = "allwinner,sunxi-pwm2";
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&pwm2_ph_pin>;
|
|
+ };
|
|
+
|
|
+ pwm3: pwm3@0300a000 {
|
|
+ compatible = "allwinner,sunxi-pwm3";
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&pwm3_ph_pin>;
|
|
+ };
|
|
+
|
|
+ pwm4: pwm4@0300a000 {
|
|
+ compatible = "allwinner,sunxi-pwm4";
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&pwm4_ph_pin>;
|
|
+ };
|
|
+
|
|
+ pwm5: pwm5@0300a000 {
|
|
+ compatible = "allwinner,sunxi-pwm5";
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&pwm5_pin>;
|
|
+ clk_bypass_output = <0x1>;
|
|
+ status = "okay";
|
|
+ };
|
|
+ };
|
|
+};
|
|
+
|
|
+&cpu0 {
|
|
+ cpu-supply = <®_dcdc2>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&sid {
|
|
+ ephy_calibration: ephy-calibration@2c {
|
|
+ reg = <0x2c 0x2>;
|
|
+ };
|
|
+};
|
|
+
|
|
+&mmc0 {
|
|
+ vmmc-supply = <®_dldo1>;
|
|
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
|
|
+ bus-width = <4>;
|
|
+ max-frequency = <50000000>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&mmc2 {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&mmc2_pins>;
|
|
+ vmmc-supply = <®_dldo1>;
|
|
+ bus-width = <8>;
|
|
+ max-frequency = <150000000>;
|
|
+ non-removable;
|
|
+ cap-mmc-hw-reset;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&pio {
|
|
+ vcc-pc-supply = <®_aldo1>;
|
|
+ vcc-pf-supply = <®_dldo1>;
|
|
+ vcc-pg-supply = <®_dldo1>;
|
|
+ vcc-ph-supply = <®_dldo1>;
|
|
+ vcc-pi-supply = <®_dldo1>;
|
|
+};
|
|
+
|
|
+&emac0 {
|
|
+ compatible = "allwinner,sun50i-h616-emac";
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&ext_rgmii_pins>;
|
|
+ phy-mode = "rgmii";
|
|
+ phy-handle = <&ext_rgmii_phy>;
|
|
+ phy-supply = <®_gmac_3v3>;
|
|
+ phy-io-supply = <®_dldo1>;
|
|
+ allwinner,rx-delay-ps = <3100>;
|
|
+ allwinner,tx-delay-ps = <700>;
|
|
+ use_ephy25m = <0x00>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&mdio0 {
|
|
+ ext_rgmii_phy: ethernet-phy@1 {
|
|
+ /* rtl8211F compatible string for mdio and phy */
|
|
+ compatible = "ethernet-phy-id001c.c916";
|
|
+ reg = <1>;
|
|
+ reset-assert-us = <20000>;
|
|
+ reset-deassert-us = <100000>;
|
|
+ reset-gpios = <&pio 8 16 GPIO_ACTIVE_LOW>; /* PI16 */
|
|
+ };
|
|
+};
|
|
+
|
|
+&emac1 {
|
|
+ status = "disabled";
|
|
+};
|
|
+
|
|
+&mdio1 {
|
|
+ rmii_phy: ethernet-phy@1 {
|
|
+ compatible = "ethernet-phy-ieee802.3-c22";
|
|
+ reg = <1>;
|
|
+ };
|
|
+};
|
|
+
|
|
+&uart0 {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&uart0_ph_pins>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&usbotg {
|
|
+ /*
|
|
+ * PHY0 pins are connected to a USB-C socket, but a role switch
|
|
+ * is not implemented: both CC pins are pulled to GND.
|
|
+ * The VBUS pins power the device, so a fixed peripheral mode
|
|
+ * is the best choice.
|
|
+ * The board can be powered via GPIOs, in this case port0 *can*
|
|
+ * act as a host (with a cable/adapter ignoring CC), as VBUS is
|
|
+ * then provided by the GPIOs. Any user of this setup would
|
|
+ * need to adjust the DT accordingly: dr_mode set to "host",
|
|
+ * enabling OHCI0 and EHCI0.
|
|
+ */
|
|
+ dr_mode = "peripheral";
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&usbphy {
|
|
+ usb1_vbus-supply = <®_usb_vbus>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&ehci0 {
|
|
+ status = "disabled";
|
|
+};
|
|
+
|
|
+&ehci1 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&ehci2 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&ehci3 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&ohci0 {
|
|
+ status = "disabled";
|
|
+};
|
|
+
|
|
+&ohci1 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&ohci2 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&ohci3 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&i2c1 {
|
|
+ status = "disabled";
|
|
+};
|
|
+
|
|
+&i2c2 {
|
|
+ status = "disabled";
|
|
+};
|
|
+
|
|
+&i2c3 {
|
|
+ status = "disabled";
|
|
+};
|
|
+
|
|
+&i2c4 {
|
|
+ status = "disabled";
|
|
+};
|
|
+
|
|
+&uart1 {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
|
|
+ status = "disabled";
|
|
+};
|
|
--
|
|
2.35.3
|
|
|