Assign Fault LED, rework HDD power staggering, fix minor systemd service warning on Helios64 (#2204)

* Supress systemd service warning

* helios64: u-boot: staggered HDD power up

Set the delay to 10s in between turning on the next HDD power rails.
Remove the delay property from kernel device tree, let it only apply to
u-boot

Signed-off-by: Aditya Prayoga <aditya@kobol.io>

* helios64: fault LED as kernel panic indicator

also sync, u-boot dts

* helios64: fix hwmon udev rules

Legacy kernel (LK 4.4) has different class/naming on SoC Temp sensor.
Also fix typo on current/dev udev rules.
This commit is contained in:
Aditya Prayoga 2020-09-15 14:46:06 +07:00 committed by GitHub
parent ebc497ff6b
commit 6f6543c6f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 76 additions and 45 deletions

View file

@ -1,13 +1,13 @@
From 469211a4113729a93e64448cf9726973d1a9b2e6 Mon Sep 17 00:00:00 2001
From 89fcfe49a259d7f8a21bd88c8a7ebab651bb4417 Mon Sep 17 00:00:00 2001
From: Aditya Prayoga <aditya@kobol.io>
Date: Mon, 7 Sep 2020 17:54:51 +0700
Date: Mon, 14 Sep 2020 08:31:22 +0700
Subject: [PATCH] Patching something
Signed-off-by: Aditya Prayoga <aditya@kobol.io>
---
arch/arm/dts/Makefile | 1 +
arch/arm/dts/rk3399-helios64-u-boot.dtsi | 130 +++
arch/arm/dts/rk3399-helios64.dts | 1149 ++++++++++++++++++++++
arch/arm/dts/rk3399-helios64-u-boot.dtsi | 134 +++
arch/arm/dts/rk3399-helios64.dts | 1147 ++++++++++++++++++++++
arch/arm/mach-rockchip/rk3399/Kconfig | 17 +
board/kobol/helios64/Kconfig | 24 +
board/kobol/helios64/MAINTAINERS | 6 +
@ -17,7 +17,7 @@ Signed-off-by: Aditya Prayoga <aditya@kobol.io>
board/kobol/helios64/sys_otp.h | 10 +
configs/helios64-rk3399_defconfig | 149 +++
include/configs/helios64.h | 47 +
12 files changed, 2048 insertions(+)
12 files changed, 2050 insertions(+)
create mode 100644 arch/arm/dts/rk3399-helios64-u-boot.dtsi
create mode 100644 arch/arm/dts/rk3399-helios64.dts
create mode 100644 board/kobol/helios64/Kconfig
@ -30,7 +30,7 @@ Signed-off-by: Aditya Prayoga <aditya@kobol.io>
create mode 100644 include/configs/helios64.h
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 530d60bfc..d9fd6cf1c 100644
index 530d60bf..d9fd6cf1 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -122,6 +122,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \
@ -43,10 +43,10 @@ index 530d60bfc..d9fd6cf1c 100644
rk3399-khadas-edge-v.dtb \
diff --git a/arch/arm/dts/rk3399-helios64-u-boot.dtsi b/arch/arm/dts/rk3399-helios64-u-boot.dtsi
new file mode 100644
index 000000000..27ea5eaa9
index 00000000..db362d44
--- /dev/null
+++ b/arch/arm/dts/rk3399-helios64-u-boot.dtsi
@@ -0,0 +1,130 @@
@@ -0,0 +1,134 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (c) 2020 Aditya Prayoga (aditya@kobol.io)
@ -163,6 +163,10 @@ index 000000000..27ea5eaa9
+ };
+};
+
+&power_hdd_a {
+ startup-delay-us = <10000000>;
+};
+
+&spi1 {
+ spiflash: flash@0 {
+ compatible = "jedec,spi-nor";
@ -179,10 +183,10 @@ index 000000000..27ea5eaa9
+};
diff --git a/arch/arm/dts/rk3399-helios64.dts b/arch/arm/dts/rk3399-helios64.dts
new file mode 100644
index 000000000..d5f1df674
index 00000000..c4fedbf0
--- /dev/null
+++ b/arch/arm/dts/rk3399-helios64.dts
@@ -0,0 +1,1149 @@
@@ -0,0 +1,1147 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2020 Aditya Prayoga (aditya@kobol.io)
@ -405,7 +409,6 @@ index 000000000..d5f1df674
+ regulator-name = "power_hdd_a";
+ regulator-always-on;
+ regulator-boot-on;
+ startup-delay-us = <2500000>;
+ };
+
+ power_hdd_b: power-hdd-b {
@ -417,7 +420,6 @@ index 000000000..d5f1df674
+ regulator-name = "power_hdd_b";
+ regulator-always-on;
+ regulator-boot-on;
+ startup-delay-us = <2500000>;
+ };
+
+ usblan_power: usblan-power {
@ -578,7 +580,7 @@ index 000000000..d5f1df674
+ fault-led {
+ label = "helios64:red:fault";
+ gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "none";
+ linux,default-trigger = "panic";
+ default-state = "keep";
+ mode = <0x23>;
+ };
@ -1333,7 +1335,7 @@ index 000000000..d5f1df674
+ status = "okay";
+};
diff --git a/arch/arm/mach-rockchip/rk3399/Kconfig b/arch/arm/mach-rockchip/rk3399/Kconfig
index 254b9c5b4..5f89bf6eb 100644
index 254b9c5b..5f89bf6e 100644
--- a/arch/arm/mach-rockchip/rk3399/Kconfig
+++ b/arch/arm/mach-rockchip/rk3399/Kconfig
@@ -26,6 +26,22 @@ config TARGET_PINEBOOK_PRO_RK3399
@ -1369,7 +1371,7 @@ index 254b9c5b4..5f89bf6eb 100644
source "board/rockchip/evb_rk3399/Kconfig"
diff --git a/board/kobol/helios64/Kconfig b/board/kobol/helios64/Kconfig
new file mode 100644
index 000000000..644cdbd8f
index 00000000..644cdbd8
--- /dev/null
+++ b/board/kobol/helios64/Kconfig
@@ -0,0 +1,24 @@
@ -1399,7 +1401,7 @@ index 000000000..644cdbd8f
+endif
diff --git a/board/kobol/helios64/MAINTAINERS b/board/kobol/helios64/MAINTAINERS
new file mode 100644
index 000000000..a9c88c79e
index 00000000..a9c88c79
--- /dev/null
+++ b/board/kobol/helios64/MAINTAINERS
@@ -0,0 +1,6 @@
@ -1411,7 +1413,7 @@ index 000000000..a9c88c79e
+F: configs/helios64_defconfig
diff --git a/board/kobol/helios64/Makefile b/board/kobol/helios64/Makefile
new file mode 100644
index 000000000..ab34245a6
index 00000000..ab34245a
--- /dev/null
+++ b/board/kobol/helios64/Makefile
@@ -0,0 +1,5 @@
@ -1422,7 +1424,7 @@ index 000000000..ab34245a6
+obj-y := helios64.o sys_otp.o
diff --git a/board/kobol/helios64/helios64.c b/board/kobol/helios64/helios64.c
new file mode 100644
index 000000000..c7a0efa49
index 00000000..c7a0efa4
--- /dev/null
+++ b/board/kobol/helios64/helios64.c
@@ -0,0 +1,262 @@
@ -1690,7 +1692,7 @@ index 000000000..c7a0efa49
+#endif
diff --git a/board/kobol/helios64/sys_otp.c b/board/kobol/helios64/sys_otp.c
new file mode 100644
index 000000000..3a2783464
index 00000000..3a278346
--- /dev/null
+++ b/board/kobol/helios64/sys_otp.c
@@ -0,0 +1,248 @@
@ -1944,7 +1946,7 @@ index 000000000..3a2783464
+}
diff --git a/board/kobol/helios64/sys_otp.h b/board/kobol/helios64/sys_otp.h
new file mode 100644
index 000000000..61f6f3b38
index 00000000..61f6f3b3
--- /dev/null
+++ b/board/kobol/helios64/sys_otp.h
@@ -0,0 +1,10 @@
@ -1960,7 +1962,7 @@ index 000000000..61f6f3b38
+#endif
diff --git a/configs/helios64-rk3399_defconfig b/configs/helios64-rk3399_defconfig
new file mode 100644
index 000000000..622100551
index 00000000..62210055
--- /dev/null
+++ b/configs/helios64-rk3399_defconfig
@@ -0,0 +1,149 @@
@ -2115,7 +2117,7 @@ index 000000000..622100551
+CONFIG_HEXDUMP=y
diff --git a/include/configs/helios64.h b/include/configs/helios64.h
new file mode 100644
index 000000000..6fca9a6be
index 00000000..6fca9a6b
--- /dev/null
+++ b/include/configs/helios64.h
@@ -0,0 +1,47 @@