mirror of
https://github.com/Fishwaldo/build.git
synced 2025-07-23 05:18:55 +00:00
108 lines
3.3 KiB
Diff
108 lines
3.3 KiB
Diff
From 681db972d03bb40370e9f69eeb2f47e871a6f920 Mon Sep 17 00:00:00 2001
|
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
|
Date: Sun, 27 Dec 2020 15:11:59 +0000
|
|
Subject: [PATCH 46/58] arm64: dts: meson: add initial device-tree for Bananapi
|
|
BPI-M5
|
|
|
|
The Bananapi Wiki links to Amlogic BSP kernel sources which show [0]
|
|
BPI-M5 to be aligned with the HardKernel ODROID-C4 device-tree with
|
|
relatively minor differences:
|
|
|
|
- 1x Green LED
|
|
- 4x Switches labelled SW1/RST/SW3/SW4
|
|
- 3.5mm A/V connector
|
|
- USB-C power connector (5V)
|
|
|
|
[0] https://github.com/Dangku/amlogic-linux/commit/bddc95f88a07e7e66f73192d8307af5b547c5b32
|
|
|
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|
---
|
|
arch/arm64/boot/dts/amlogic/Makefile | 1 +
|
|
.../dts/amlogic/meson-sm1-bananapi-m5.dts | 63 +++++++++++++++++++
|
|
2 files changed, 64 insertions(+)
|
|
create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts
|
|
|
|
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
|
index aebd49c88719..da11ef28a47b 100644
|
|
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
|
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
|
@@ -46,6 +46,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-rbox-pro.dtb
|
|
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-libretech-pc.dtb
|
|
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb
|
|
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-wetek-core2.dtb
|
|
+dtb-$(CONFIG_ARCH_MESON) += meson-sm1-bananapi-m5.dtb
|
|
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-sei610.dtb
|
|
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-khadas-vim3l.dtb
|
|
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-c4.dtb
|
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts
|
|
new file mode 100644
|
|
index 000000000000..a98301777622
|
|
--- /dev/null
|
|
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts
|
|
@@ -0,0 +1,63 @@
|
|
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
+/*
|
|
+ * Copyright (c) 2020 Christian Hewitt <christianshewitt@gmail.com>
|
|
+ */
|
|
+
|
|
+/dts-v1/;
|
|
+
|
|
+#include "meson-sm1-odroid-c4.dts"
|
|
+
|
|
+/ {
|
|
+ compatible = "sinovoip,bananapi-m5", "amlogic,sm1";
|
|
+ model = "Bananapi BPI-M5";
|
|
+
|
|
+ leds {
|
|
+ compatible = "gpio-leds";
|
|
+
|
|
+ blue {
|
|
+ color = <LED_COLOR_ID_BLUE>;
|
|
+ function = LED_FUNCTION_STATUS;
|
|
+ gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_LOW>;
|
|
+ linux,default-trigger = "heartbeat";
|
|
+ panic-indicator;
|
|
+ };
|
|
+
|
|
+ green {
|
|
+ color = <LED_COLOR_ID_GREEN>;
|
|
+ function = LED_FUNCTION_STATUS;
|
|
+ gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
|
|
+ default-state = "off";
|
|
+ };
|
|
+ };
|
|
+
|
|
+ hub_5v: regulator-hub_5v {
|
|
+ compatible = "regulator-fixed";
|
|
+ regulator-name = "HUB_5V";
|
|
+ regulator-min-microvolt = <5000000>;
|
|
+ regulator-max-microvolt = <5000000>;
|
|
+ vin-supply = <&vcc_5v>;
|
|
+
|
|
+ /* Connected to the Hub CHIPENABLE, LOW sets low power state */
|
|
+ gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;
|
|
+ enable-active-high;
|
|
+ };
|
|
+};
|
|
+
|
|
+&gpio {
|
|
+ /*
|
|
+ * WARNING: The USB Hub on the Bananapi M5 needs a reset signal
|
|
+ * to be turned high in order to be detected by the USB Controller
|
|
+ * This signal should be handled by a USB specific power sequence
|
|
+ * in order to reset the Hub when USB bus is powered down.
|
|
+ */
|
|
+ usb-hub {
|
|
+ gpio-hog;
|
|
+ gpios = <GPIOH_4 GPIO_ACTIVE_HIGH>;
|
|
+ output-high;
|
|
+ line-name = "usb-hub-reset";
|
|
+ };
|
|
+};
|
|
+
|
|
+&ir {
|
|
+ linux,rc-map-name = "rc-odroid";
|
|
+};
|
|
--
|
|
2.25.1
|
|
|