216 lines
4.6 KiB
Diff
216 lines
4.6 KiB
Diff
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
|
|
--- a/arch/arm/dts/Makefile
|
|
+++ b/arch/arm/dts/Makefile
|
|
@@ -836,6 +836,7 @@
|
|
dtb-$(CONFIG_MACH_SUN50I_H616) += \
|
|
sun50i-h616-orangepi-zero2.dtb \
|
|
sun50i-h618-orangepi-zero3.dtb \
|
|
+ sun50i-h313-x96q-lpddr3.dtb \
|
|
sun50i-h616-x96-mate.dtb
|
|
|
|
|
|
diff --git a/configs/x96q_lpddr3_defconfig b/configs/x96q_lpddr3_defconfig
|
|
+ new file mode 100755
|
|
+ index 000000000..306157b84
|
|
+++ b/configs/x96q_lpddr3_defconfig
|
|
@@ -0,0 +1,31 @@
|
|
+CONFIG_ARM=y
|
|
+CONFIG_ARCH_SUNXI=y
|
|
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-h313-x96q-lpddr3"
|
|
+CONFIG_SPL=y
|
|
+CONFIG_SUNXI_DRAM_H616_LPDDR3=y
|
|
+CONFIG_DRAM_CLK=600
|
|
+CONFIG_DRAM_SUN50I_H616_DX_ODT=0x06060606
|
|
+CONFIG_DRAM_SUN50I_H616_DX_DRI=0x0d0d0d0d
|
|
+CONFIG_DRAM_SUN50I_H616_CA_DRI=0x00000d0d
|
|
+CONFIG_DRAM_SUN50I_H616_ODT_EN=0x00000001
|
|
+CONFIG_DRAM_SUN50I_H616_TPR0=0x0
|
|
+CONFIG_DRAM_SUN50I_H616_TPR2=0x00000000
|
|
+CONFIG_DRAM_SUN50I_H616_TPR10=0x002f3359
|
|
+CONFIG_DRAM_SUN50I_H616_TPR11=0xaa889967
|
|
+CONFIG_DRAM_SUN50I_H616_TPR12=0xeeee8979
|
|
+CONFIG_MACH_SUN50I_H616=y
|
|
+CONFIG_R_I2C_ENABLE=y
|
|
+CONFIG_SPL_I2C=y
|
|
+CONFIG_SPL_I2C_SUPPORT=y
|
|
+CONFIG_SPL_SYS_I2C_LEGACY=y
|
|
+CONFIG_SYS_I2C_MVTWSI=y
|
|
+CONFIG_SYS_I2C_SLAVE=0x7f
|
|
+CONFIG_SYS_I2C_SPEED=100000
|
|
+CONFIG_SYS_MONITOR_LEN=786432
|
|
+CONFIG_PHY_REALTEK=y
|
|
+CONFIG_SUN8I_EMAC=y
|
|
+CONFIG_I2C3_ENABLE=y
|
|
+CONFIG_AXP313_POWER=y
|
|
+CONFIG_USB_EHCI_HCD=y
|
|
+CONFIG_USB_OHCI_HCD=y
|
|
+CONFIG_USB_MUSB_GADGET=y
|
|
diff --git a/arch/arm/dts/sun50i-h313-x96q-lpddr3.dts b/arch/arm/dts/sun50i-h313-x96q-lpddr3.dts
|
|
new file mode 100644
|
|
index 000000000..306157b84
|
|
--- /dev/null
|
|
+++ b/arch/arm/dts/sun50i-h313-x96q-lpddr3.dts
|
|
@@ -0,0 +1,162 @@
|
|
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
|
|
+/*
|
|
+ * Author: [email protected]
|
|
+ */
|
|
+
|
|
+/dts-v1/;
|
|
+
|
|
+#include "sun50i-h616.dtsi"
|
|
+
|
|
+#include <dt-bindings/gpio/gpio.h>
|
|
+#include <dt-bindings/interrupt-controller/arm-gic.h>
|
|
+#include <dt-bindings/leds/common.h>
|
|
+
|
|
+/ {
|
|
+ model = "hechuang,x96q LPDDR3";
|
|
+ compatible = "hechuang,x96-q", "allwinner,sun50i-h616";
|
|
+
|
|
+ aliases {
|
|
+ mmc0 = &mmc0;
|
|
+ mmc1 = &mmc1;
|
|
+ mmc2 = &mmc2;
|
|
+ ethernet0 = &emac1;
|
|
+ serial0 = &uart0;
|
|
+ };
|
|
+
|
|
+ chosen {
|
|
+ stdout-path = "serial0:115200n8";
|
|
+ };
|
|
+
|
|
+ leds {
|
|
+ compatible = "gpio-leds";
|
|
+
|
|
+ led-red {
|
|
+ function = LED_FUNCTION_DISK_ACTIVITY;
|
|
+ color = <LED_COLOR_ID_RED>;
|
|
+ gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
|
|
+ linux,default-trigger = "mmc0";
|
|
+ };
|
|
+ };
|
|
+
|
|
+ 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;
|
|
+ };
|
|
+};
|
|
+
|
|
+&cpu0 {
|
|
+ cpu-supply = <®_dcdc2>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&cpu1 {
|
|
+ cpu-supply = <®_dcdc2>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&cpu2 {
|
|
+ cpu-supply = <®_dcdc2>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&cpu3 {
|
|
+ cpu-supply = <®_dcdc2>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&emac1 {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&rmii_pins>;
|
|
+ phy-mode = "rmii";
|
|
+ phy-handle = <&rmii_phy>;
|
|
+ phy-supply = <®_aldo1>;
|
|
+ allwinner,rx-delay-ps = <3100>;
|
|
+ allwinner,tx-delay-ps = <700>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&mdio1 {
|
|
+ rmii_phy: ethernet-phy@0 {
|
|
+ compatible = "ethernet-phy-ieee802.3-c22";
|
|
+ reg = <0>;
|
|
+ };
|
|
+};
|
|
+
|
|
+&mmc0 {
|
|
+ vmmc-supply = <®_dldo2>;
|
|
+ broken-cd;
|
|
+ bus-width = <4>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&mmc1 {
|
|
+ vmmc-supply = <®_dldo2>;
|
|
+ broken-cd;
|
|
+ bus-width = <4>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&mmc2 {
|
|
+ vmmc-supply = <®_dldo2>;
|
|
+ bus-width = <8>;
|
|
+ non-removable;
|
|
+ cap-mmc-hw-reset;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&r_i2c {
|
|
+ status = "okay";
|
|
+
|
|
+ axp313a: pmic@36 {
|
|
+ compatible = "x-powers,axp313a";
|
|
+ reg = <0x36>;
|
|
+ wakeup-source;
|
|
+
|
|
+ regulators {
|
|
+ reg_dcdc1: dcdc1 {
|
|
+ regulator-always-on;
|
|
+ regulator-min-microvolt = <1160000>;
|
|
+ regulator-max-microvolt = <1160000>;
|
|
+ regulator-name = "vdd-cpu";
|
|
+ };
|
|
+
|
|
+ reg_dcdc2: dcdc2 {
|
|
+ regulator-always-on;
|
|
+ regulator-min-microvolt = <1160000>;
|
|
+ regulator-max-microvolt = <1160000>;
|
|
+ regulator-name = "vdd-gpu-sys";
|
|
+ };
|
|
+
|
|
+ reg_dcdc3: dcdc3 {
|
|
+ regulator-always-on;
|
|
+ regulator-min-microvolt = <1200000>;
|
|
+ regulator-max-microvolt = <1200000>;
|
|
+ regulator-name = "vdd-dram";
|
|
+ };
|
|
+
|
|
+ reg_aldo1: ldo1 {
|
|
+ regulator-always-on;
|
|
+ regulator-min-microvolt = <1800000>;
|
|
+ regulator-max-microvolt = <1800000>;
|
|
+ regulator-name = "vcc-sys";
|
|
+ };
|
|
+
|
|
+ reg_dldo2: ldo2 {
|
|
+ regulator-always-on;
|
|
+ regulator-min-microvolt = <3300000>;
|
|
+ regulator-max-microvolt = <3300000>;
|
|
+ regulator-name = "vcc3v3-ext";
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+};
|
|
+
|
|
+&uart0 {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&uart0_ph_pins>;
|
|
+ status = "okay";
|
|
+};
|