aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/files/arch
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2021-12-21 16:27:16 +0000
committerDaniel Golle <daniel@makrotopia.org>2022-01-01 22:29:33 +0000
commit99a1e882970f02d3713b3d67022af012b782a5f4 (patch)
treeb9f4069b18d31c823e9a16cc280a71c7245a0516 /target/linux/mvebu/files/arch
parent3b14ddf8d204ee59533ec76ed6018db01f77d6e7 (diff)
downloadupstream-99a1e882970f02d3713b3d67022af012b782a5f4.tar.gz
upstream-99a1e882970f02d3713b3d67022af012b782a5f4.tar.bz2
upstream-99a1e882970f02d3713b3d67022af012b782a5f4.zip
mvebu: puzzle-m902: add driver for MCU driving LEDs, fan and buzzer
Backport MFD driver for communicating with the on-board MCU found on IEI World Puzzle appliances. Improve the driver to support multiple LEDs, apply a default state and let MCU take care of blinking if timing is within supported range. Wire up LEDs and fan for Puzzle M902 in device tree. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit f0c0b18234418c6ed6d35fcf1c6e5b0cbdceed49 with commit 962c58558010bd302793ac24284c4f9db8fe287f squashed)
Diffstat (limited to 'target/linux/mvebu/files/arch')
-rw-r--r--target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts74
1 files changed, 73 insertions, 1 deletions
diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts
index dc4e6527f1..8d2d53d03c 100644
--- a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts
+++ b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts
@@ -38,7 +38,10 @@
ethernet8 = &cp2_eth2;
spi1 = &cp0_spi0;
spi2 = &cp0_spi1;
- serial1 = &cp0_uart0;
+ led-boot = &led_power;
+ led-failsafe = &led_info;
+ led-running = &led_power;
+ led-upgrade = &led_info;
};
memory@00000000 {
@@ -91,6 +94,75 @@
&cp0_uart0 {
status = "okay";
+
+ puzzle-mcu {
+ compatible = "iei,wt61p803-puzzle";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ current-speed = <115200>;
+ enable-beep;
+ status = "okay";
+
+ leds {
+ compatible = "iei,wt61p803-puzzle-leds";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ led@0 {
+ reg = <0>;
+ label = "white:network";
+ active-low;
+ };
+
+ led@1 {
+ reg = <1>;
+ label = "green:cloud";
+ active-low;
+ };
+
+ led_info: led@2 {
+ reg = <2>;
+ label = "orange:info";
+ active-low;
+ };
+
+ led_power: led@3 {
+ reg = <3>;
+ label = "yellow:power";
+ active-low;
+ default-state = "on";
+ };
+ };
+
+ hwmon {
+ compatible = "iei,wt61p803-puzzle-hwmon";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ chassis_fan_group0: fan-group@0 {
+ #cooling-cells = <2>;
+ reg = <0x00>;
+ cooling-levels = <64 102 170 230 250>;
+ };
+ };
+ };
+};
+
+&ap_thermal_cpu1 {
+ trips {
+ cpu_active: cpu-active {
+ temperature = <44000>;
+ hysteresis = <2000>;
+ type = "active";
+ };
+ };
+ cooling-maps {
+ fan-map {
+ trip = <&cpu_active>;
+ cooling-device = <&chassis_fan_group0 64 THERMAL_NO_LIMIT>;
+ };
+ };
};
/* on-board eMMC - U9 */