214 lines
4.8 KiB
Diff
214 lines
4.8 KiB
Diff
diff --git a/arch/arm/dts/sun50i-h5-libretech-all-h3-cc.dts b/arch/arm/dts/sun50i-h5-libretech-all-h3-cc.dts
|
|
new file mode 100644
|
|
index 0000000..a72b0a3
|
|
--- /dev/null
|
|
+++ b/arch/arm/dts/sun50i-h5-libretech-all-h3-cc.dts
|
|
@@ -0,0 +1,12 @@
|
|
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
+/*
|
|
+ * Copyright (C) 2018 BayLibre, SAS
|
|
+ * Author: Neil Armstrong <narmstrong@baylibre.com>
|
|
+ */
|
|
+
|
|
+#include "sun8i-h3-libretech-all-h3-cc.dts"
|
|
+
|
|
+/ {
|
|
+ model = "Libre Computer Board ALL-H3-CC H5";
|
|
+ compatible = "libretech,all-h3-cc-h5", "allwinner,sun50i-h5";
|
|
+};
|
|
diff --git a/arch/arm/dts/sun8i-h3-libretech-all-h3-cc.dts b/arch/arm/dts/sun8i-h3-libretech-all-h3-cc.dts
|
|
new file mode 100644
|
|
index 0000000..e6dd4e7
|
|
--- /dev/null
|
|
+++ b/arch/arm/dts/sun8i-h3-libretech-all-h3-cc.dts
|
|
@@ -0,0 +1,168 @@
|
|
+/*
|
|
+ * Copyright (C) 2017 Chen-Yu Tsai <wens@csie.org>
|
|
+ *
|
|
+ * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
+ */
|
|
+
|
|
+/dts-v1/;
|
|
+#include "sun8i-h3.dtsi"
|
|
+
|
|
+#include <dt-bindings/gpio/gpio.h>
|
|
+#include <dt-bindings/input/input.h>
|
|
+
|
|
+/ {
|
|
+ model = "Libre Computer Board ALL-H3-CC H3";
|
|
+ compatible = "libretech,all-h3-cc-h3", "allwinner,sun8i-h3";
|
|
+
|
|
+ aliases {
|
|
+ ethernet0 = &emac;
|
|
+ serial0 = &uart0;
|
|
+ };
|
|
+
|
|
+ chosen {
|
|
+ stdout-path = "serial0:115200n8";
|
|
+ };
|
|
+
|
|
+ leds {
|
|
+ compatible = "gpio-leds";
|
|
+
|
|
+ pwr_led {
|
|
+ label = "librecomputer:green:pwr";
|
|
+ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
|
|
+ default-state = "on";
|
|
+ };
|
|
+
|
|
+ status_led {
|
|
+ label = "librecomputer:blue:status";
|
|
+ gpios = <&pio 0 7 GPIO_ACTIVE_HIGH>; /* PA7 */
|
|
+ };
|
|
+ };
|
|
+
|
|
+ gpio_keys {
|
|
+ compatible = "gpio-keys";
|
|
+
|
|
+ power {
|
|
+ label = "power";
|
|
+ linux,code = <KEY_POWER>;
|
|
+ gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
|
|
+ };
|
|
+ };
|
|
+
|
|
+ reg_vcc1v2: vcc1v2 {
|
|
+ compatible = "regulator-fixed";
|
|
+ regulator-name = "vcc1v2";
|
|
+ regulator-min-microvolt = <3300000>;
|
|
+ regulator-max-microvolt = <3300000>;
|
|
+ regulator-always-on;
|
|
+ regulator-boot-on;
|
|
+ vin-supply = <®_vcc5v0>;
|
|
+ gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
|
|
+ enable-active-high;
|
|
+ };
|
|
+
|
|
+ reg_vcc3v3: vcc3v3 {
|
|
+ compatible = "regulator-fixed";
|
|
+ regulator-name = "vcc3v3";
|
|
+ regulator-min-microvolt = <3300000>;
|
|
+ regulator-max-microvolt = <3300000>;
|
|
+ vin-supply = <®_vcc5v0>;
|
|
+ };
|
|
+
|
|
+ /* This represents the board's 5V input */
|
|
+ reg_vcc5v0: vcc5v0 {
|
|
+ compatible = "regulator-fixed";
|
|
+ regulator-name = "vcc5v0";
|
|
+ regulator-min-microvolt = <5000000>;
|
|
+ regulator-max-microvolt = <5000000>;
|
|
+ };
|
|
+
|
|
+ reg_vcc_dram: vcc-dram {
|
|
+ compatible = "regulator-fixed";
|
|
+ regulator-name = "vcc-dram";
|
|
+ regulator-min-microvolt = <1500000>;
|
|
+ regulator-max-microvolt = <1500000>;
|
|
+ regulator-always-on;
|
|
+ regulator-boot-on;
|
|
+ vin-supply = <®_vcc5v0>;
|
|
+ gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */
|
|
+ enable-active-high;
|
|
+ };
|
|
+
|
|
+ reg_vcc_io: vcc-io {
|
|
+ compatible = "regulator-fixed";
|
|
+ regulator-name = "vcc-io";
|
|
+ regulator-min-microvolt = <3300000>;
|
|
+ regulator-max-microvolt = <3300000>;
|
|
+ regulator-always-on;
|
|
+ regulator-boot-on;
|
|
+ vin-supply = <®_vcc3v3>;
|
|
+ gpio = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */
|
|
+ };
|
|
+
|
|
+ reg_vdd_cpux: vdd-cpux {
|
|
+ compatible = "regulator-fixed";
|
|
+ regulator-name = "vdd-cpux";
|
|
+ regulator-min-microvolt = <3300000>;
|
|
+ regulator-max-microvolt = <3300000>;
|
|
+ regulator-always-on;
|
|
+ regulator-boot-on;
|
|
+ vin-supply = <®_vcc5v0>;
|
|
+ gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
|
|
+ enable-active-high;
|
|
+ };
|
|
+};
|
|
+
|
|
+&ehci1 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&ehci2 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&ehci3 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&ir {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&ir_pins_a>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&mmc0 {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&mmc0_pins_a>;
|
|
+ vmmc-supply = <®_vcc_io>;
|
|
+ bus-width = <4>;
|
|
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
|
|
+ cd-inverted;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&ohci1 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&ohci2 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&ohci3 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&uart0 {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&uart0_pins_a>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&usbphy {
|
|
+ /* VBUS on USB ports are always on */
|
|
+ usb0_vbus-supply = <®_vcc5v0>;
|
|
+ usb1_vbus-supply = <®_vcc5v0>;
|
|
+ usb2_vbus-supply = <®_vcc5v0>;
|
|
+ usb3_vbus-supply = <®_vcc5v0>;
|
|
+ status = "okay";
|
|
+};
|
|
diff --git a/configs/libretech_all_h3_cc_h5_defconfig b/configs/libretech_all_h3_cc_h5_defconfig
|
|
new file mode 100644
|
|
index 0000000..061bddc
|
|
--- /dev/null
|
|
+++ b/configs/libretech_all_h3_cc_h5_defconfig
|
|
@@ -0,0 +1,15 @@
|
|
+CONFIG_ARM=y
|
|
+CONFIG_ARCH_SUNXI=y
|
|
+CONFIG_SPL=y
|
|
+CONFIG_MACH_SUN50I_H5=y
|
|
+CONFIG_DRAM_CLK=672
|
|
+CONFIG_DRAM_ZQ=3881979
|
|
+CONFIG_DRAM_ODT_EN=y
|
|
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-libretech-all-h3-cc"
|
|
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
|
+# CONFIG_CMD_FLASH is not set
|
|
+# CONFIG_SPL_DOS_PARTITION is not set
|
|
+# CONFIG_SPL_EFI_PARTITION is not set
|
|
+CONFIG_SUN8I_EMAC=y
|
|
+CONFIG_USB_EHCI_HCD=y
|
|
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
|