diff --git a/board/aarch64/acer-connect-vero-w6m/acer-connect-vero-w6m.mk b/board/aarch64/acer-connect-vero-w6m/acer-connect-vero-w6m.mk index 41f6f7fde..d43272586 100644 --- a/board/aarch64/acer-connect-vero-w6m/acer-connect-vero-w6m.mk +++ b/board/aarch64/acer-connect-vero-w6m/acer-connect-vero-w6m.mk @@ -1,2 +1,7 @@ +define ACER_CONNECT_VERO_W6M_LINUX_CONFIG_FIXUPS + $(call KCONFIG_ENABLE_OPT,CONFIG_LEDS_CLASS_MULTICOLOR) + $(call KCONFIG_SET_OPT,CONFIG_LEDS_KTD202X,m) +endef + $(eval $(ix-board)) $(eval $(generic-package)) diff --git a/board/aarch64/acer-connect-vero-w6m/dts/mediatek/mt7986a-acer-connect-vero-w6m.dts b/board/aarch64/acer-connect-vero-w6m/dts/mediatek/mt7986a-acer-connect-vero-w6m.dts index 2062c6590..37c992d39 100644 --- a/board/aarch64/acer-connect-vero-w6m/dts/mediatek/mt7986a-acer-connect-vero-w6m.dts +++ b/board/aarch64/acer-connect-vero-w6m/dts/mediatek/mt7986a-acer-connect-vero-w6m.dts @@ -10,10 +10,6 @@ aliases { serial0 = &uart0; - led-boot = &led_status; - led-failsafe = &led_status; - led-running = &led_status; - led-upgrade = &led_status; }; }; @@ -23,27 +19,25 @@ reg = <0x30>; vin-supply = <®_5v>; vio-supply = <®_3p3v>; + #address-cells = <1>; + #size-cells = <0>; - led_status: multi-led { - color = ; + led@0 { + reg = <0>; + color = ; + function = LED_FUNCTION_STATUS; + }; + + led@1 { + reg = <1>; + color = ; + function = LED_FUNCTION_STATUS; + }; + + led@2 { + reg = <2>; + color = ; function = LED_FUNCTION_STATUS; - #address-cells = <1>; - #size-cells = <0>; - - led@0 { - reg = <0>; - color = ; - }; - - led@1 { - reg = <1>; - color = ; - }; - - led@2 { - reg = <2>; - color = ; - }; }; }; }; diff --git a/board/aarch64/acer-connect-vero-w6m/rootfs/usr/share/product/acer,connect-vero-w/etc/iitod.json b/board/aarch64/acer-connect-vero-w6m/rootfs/usr/share/product/acer,connect-vero-w/etc/iitod.json new file mode 100644 index 000000000..56a5a37de --- /dev/null +++ b/board/aarch64/acer-connect-vero-w6m/rootfs/usr/share/product/acer,connect-vero-w/etc/iitod.json @@ -0,0 +1,67 @@ +{ + "input": { + "path": { + "locate": { "path": "/run/led/locate" }, + + "status-prime": { "path": "/run/led/status-prime" }, + "status-ok": { "path": "/run/led/status-ok" }, + "status-err": { "path": "/run/led/status-err" }, + "status-crit": { "path": "/run/led/status-crit" }, + + "startup": { "path": "/run/finit/cond/usr/startup-config-ok" }, + "fail-safe": { "path": "/run/finit/cond/usr/failure-config-ok" }, + "panic": { "path": "/run/finit/cond/usr/failure-config-error" } + } + }, + + "output": { + "led": { + "red:status": { + "rules": [ + { "if": "locate", "then": "@off" }, + { "if": "panic", "then": "@blink-5hz" }, + { "if": "fail-safe", "then": "@blink-5hz" }, + { "if": "status-crit", "then": "@blink-1hz" }, + { "if": "status-err", "then": "@on" } + ] + }, + "green:status": { + "rules": [ + { "if": "locate", "then": "@off" }, + { "if": "panic", "then": "@off" }, + { "if": "fail-safe", "then": "@off" }, + { "if": "status-crit", "then": "@off" }, + { "if": "status-err", "then": "@off" }, + { "if": "status-prime", "then": "@blink-1hz" }, + { "if": "status-ok", "then": "@on" }, + { "if": "startup", "then": "@on" }, + { "if": "true", "then": "@blink-1hz" } + ] + }, + "blue:status": { + "rules": [ + { "if": "locate", "then": "@blink-1hz" } + ] + } + } + }, + + "aliases": { + "on": { + "brightness": true + }, + "off": { + "brightness": false + }, + "blink-1hz": { + "trigger": "timer", + "delay_on": 500, + "delay_off": 500 + }, + "blink-5hz": { + "trigger": "timer", + "delay_on": 100, + "delay_off": 100 + } + } +}