Skip to content

Commit d6ca5c9

Browse files
committed
Start documenting kernel support of EC
Signed-off-by: Daniel Schaefer <[email protected]>
1 parent 7fbd80d commit d6ca5c9

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

kernel-support.md

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# ChromeOS Kernel Modules
2+
3+
Much of the functionality of `framework_tool` is to interact with the EC.
4+
On Linux there are kernel modules to do similar tasks
5+
6+
## EC Version
7+
8+
```
9+
> cat /sys/class/chromeos/cros_ec/version
10+
RO version: lilac-3.0.3-413f018
11+
RW version: lilac-3.0.3-413f018
12+
Firmware copy: RO
13+
Build info: lilac-3.0.3-413f018 2025-03-06 05:45:28 marigold2@ip-172-26-3-226
14+
Chip vendor: Nuvoton
15+
Chip name: npcx9m3f
16+
Chip revision: 00160207
17+
Board version: 8
18+
```
19+
20+
### Reboot EC
21+
22+
```
23+
> cat /sys/class/chromeos/cros_ec/reboot
24+
ro|rw|cancel|cold|disable-jump|hibernate|cold-ap-off [at-shutdown]
25+
```
26+
27+
## Sensors (Fan Speed) and Temperature
28+
29+
```
30+
> cat /sys/class/chromeos/cros_ec/device/cros-ec-hwmon.8.auto/hwmon/hwmon13/temp*
31+
> sensors cros_ec-isa-0000
32+
cros_ec-isa-0000
33+
Adapter: ISA adapter
34+
fan1: 0 RPM
35+
local_f75303@4d: +42.9°C
36+
cpu_f75303@4d: +46.9°C
37+
ddr_f75303@4d: +34.9°C
38+
cpu@4c: +48.9°C
39+
40+
> ls -l /sys/class/chromeos/cros_ec/device/cros-ec-hwmon.*.auto/hwmon/hwmon*/
41+
total 0
42+
lrwxrwxrwx 1 root root 0 May 18 13:47 device -> ../../../cros-ec-hwmon.8.auto/
43+
-r--r--r-- 1 root root 4096 May 18 13:47 fan1_fault
44+
-r--r--r-- 1 root root 4096 May 18 13:47 fan1_input
45+
-r--r--r-- 1 root root 4096 May 18 17:40 name
46+
drwxr-xr-x 2 root root 0 May 18 17:37 power/
47+
lrwxrwxrwx 1 root root 0 May 18 13:52 subsystem -> ../../../../../../../class/hwmon/
48+
-r--r--r-- 1 root root 4096 May 18 13:47 temp1_fault
49+
-r--r--r-- 1 root root 4096 May 18 17:42 temp1_input
50+
-r--r--r-- 1 root root 4096 May 18 17:42 temp1_label
51+
-r--r--r-- 1 root root 4096 May 18 13:47 temp2_fault
52+
-r--r--r-- 1 root root 4096 May 18 13:47 temp2_input
53+
-r--r--r-- 1 root root 4096 May 18 17:42 temp2_label
54+
-r--r--r-- 1 root root 4096 May 18 13:47 temp3_fault
55+
-r--r--r-- 1 root root 4096 May 18 13:47 temp3_input
56+
-r--r--r-- 1 root root 4096 May 18 17:42 temp3_label
57+
-r--r--r-- 1 root root 4096 May 18 13:47 temp4_fault
58+
-r--r--r-- 1 root root 4096 May 18 13:47 temp4_input
59+
-r--r--r-- 1 root root 4096 May 18 17:42 temp4_label
60+
-rw-r--r-- 1 root root 4096 May 18 13:52 uevent
61+
```
62+
63+
## Keyboard backlight LEDs (Framework 12, Framework 13)
64+
65+
Module: `leds_cros_ec`
66+
67+
```
68+
# Check current brightness
69+
# This changes even if you adjust with fn+space
70+
> cat /sys/class/leds/chromeos::kbd_backlight/brightness
71+
0
72+
73+
# Check max brightness
74+
> cat /sys/class/leds/chromeos::kbd_backlight/max_brightness
75+
100
76+
77+
# Change brightness
78+
> echo 100 | sudo tee /sys/class/leds/chromeos::kbd_backlight/brightness
79+
100
80+
```

0 commit comments

Comments
 (0)