Skip to content

Commit ee12a7d

Browse files
committed
Fix formatting issue in SMC page
- Fix SMC keys list formatting issue by adding extra newline - Use markdown link syntax for urls Signed-off-by: alhg <alhg@users.noreply.github.com>
1 parent 80962b6 commit ee12a7d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

docs/hw/soc/smc.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@ title: System Management Controller (SMC)
44

55
The SMC is a piece of hardware handling access to such things as temperature sensors, voltage/power meters, battery status, fan status, and the LCD backlight and lid switch.
66

7-
It is "documented", to the extent that it is, in https://github.com/corellium/linux-m1/blob/master/drivers/hwmon/apple-m1-smc.c, but that's just the protocol, which essentially allows you to do three things:
7+
It is "documented", to the extent that it is, in [https://github.com/corellium/linux-m1/blob/master/drivers/hwmon/apple-m1-smc.c](https://github.com/corellium/linux-m1/blob/master/drivers/hwmon/apple-m1-smc.c), but that's just the protocol, which essentially allows you to do three things:
88

99
1. read data for each of many, many four-ASCII-character "keys". There are about 1,400 such keys on the MacBook Pro.
10-
1110
2. read data for a key, supplying a payload.
12-
1311
3. write data for a key.
1412

1513
In addition to receiving the bytes of data, the SMC provides a type for that data, encoded as four ASCII characters, and a flags byte.
@@ -34,9 +32,10 @@ Almost totally unknown. Keys with `0xf0` flags don't appear to return non-zero v
3432

3533
### SMC keys
3634

37-
Many. https://github.com/torvalds/linux/blob/master/drivers/hwmon/applesmc.c documents some, but mostly you have to guess based on the four-character name. There are more than 1,400 such keys on the MacBook Pro, with many apparently unused.
35+
Many. [https://github.com/torvalds/linux/blob/master/drivers/hwmon/applesmc.c](https://github.com/torvalds/linux/blob/master/drivers/hwmon/applesmc.c) documents some, but mostly you have to guess based on the four-character name. There are more than 1,400 such keys on the MacBook Pro, with many apparently unused.
3836

3937
Some guesses as to what they might mean:
38+
4039
* `T???`: temperature values, in Celsius, as float. There are many of those. The question marks specify, presumably, the location (and possibly whether or not the value is averaged to provide a more meaningful reading?)
4140
* `TB0T`: battery temperature
4241
* `TCHP`: charger temperature (increases sligtly when charging)
@@ -84,7 +83,6 @@ Some guesses as to what they might mean:
8483
* `VD0R`: input voltage in V
8584
* `PDTR`: input power in W
8685

87-
8886
### Quirks
8987

9088
Or possibly quirks?
@@ -98,6 +96,7 @@ Or possibly quirks?
9896

9997
Setting the "NTAP" (notify application processor, maybe?) flag to 1 makes the SMC send notifications when certain system events happen, such as power being connected and disconnected, the power button being pressed, or the lid being opened or
10098
closed. Notifications are mailbox messages apparently limited to the 64-bit payload.
99+
101100
### ADC
102101

103102
In addition to the keys accessible "directly" through the SMC, there is what appears to be a muxed single-channel ADC providing access to 111 further values. It is accessed through "aDC#" (giving the number of keys), "aDC?" (query key name using a numeric payload), and "aDCR", the actual result value.

0 commit comments

Comments
 (0)