Lines Matching +full:12 +full:- +full:byte
1 /* SPDX-License-Identifier: GPL-2.0 */
25 * These commands are used to retrieve the sdb-partition-XX datas from
26 * the SMU. The length is always 2. First byte is the subcommand code
27 * and second byte is the partition ID.
31 * - 0..1 : partition address
32 * - 2 : a byte containing the partition ID
33 * - 3 : length (maybe other bits are rest of header ?)
48 * act differently based on the number of arguments. With 1 byte
52 * Queries (1 byte arg):
53 * ---------------------
62 * mask in the first byte of active/available fans, followed by 6 words (16
66 * ------------------------
68 * first arg byte is 0 for RPM fans and 0x10 for PWM. Second arg byte is the
86 * This is a "mux", first data byte contains the "sub" command.
98 #define SMU_CMD_RTC_SET_PRAM_BYTE_ACC 0x20 /* i: 1 byte (address?) */
99 #define SMU_CMD_RTC_SET_PRAM_AUTOINC 0x21 /* i: 1 byte (data?) */
115 * 0: bus number (from device-tree usually, SMU has lots of busses !)
120 * 4: subaddress byte 0 (or only byte for subaddress length 1)
121 * 5: subaddress byte 1
122 * 6: subaddress byte 2
128 * - 0x00: Simple transfer
129 * - 0x01: Subaddress transfer (addr write + data tx, no restart)
130 * - 0x02: Combined transfer (addr write + restart + data tx)
141 * obtained via a command of type 0x9a with a length of 1 byte containing
142 * 0 as the data byte. OF also fills the rest of the data buffer with 0xff's
145 * byte 0 of the reply:
146 * - on read, 0xfe or 0xfc : bus is busy, wait (see below) or nak ?
147 * - on read, 0x00 or 0x01 : reply is in buffer (after the byte 0)
148 * - on write, < 0 -> failure (immediate exit)
149 * - else, OF just exists (without error, weird)
151 * So on read, there is this wait-for-busy thing when getting a 0xfc or
156 * The Darwin I2C driver is less subtle though. On any non-success status
180 * - length 5 (only "VSLEW") : it returns "DONE" and 3 bytes of
182 * - length 8 ("VSLEWxyz") has 3 additional bytes appended, and is
200 * This command takes one byte of parameter: the sensor ID (or "reg"
201 * value in the device-tree) and returns a 16 bits value
252 * 2-8: unknown (BCD coding)
303 * either in the last 16 bits of property "smu-version-pmu" or as the 16
304 * bytes at offset 1 of "smu-version-info"
307 * byte 0: subcommand code (0x02)
308 * byte 1: 0x04 (always, I don't know what it means, maybe the address
310 * byte 2..5: SMU address of the chunk (big endian 32 bits)
311 * byte 6: size to transfer (up to max chunk size)
350 * 1 byte (signed char): Last shutdown cause. Exact meaning unknown.
358 * 2 (optional): Set server ID (1 byte)
361 * 1 byte (server ID?)
377 * - Kernel side interface -
441 * Synchronous helpers. Will spin-wait for completion of a command
447 smu_spinwait_cmd(&scmd->cmd); in smu_spinwait_simple()
524 * - SMU "sdb" partitions informations -
548 /* This is the definition of the SMU sdb-partition-0x12 table (called
577 __u16 volt_scale; /* u4.12 fixed point */
578 __s16 volt_offset; /* s4.12 fixed point */
579 __u16 curr_scale; /* u4.12 fixed point */
580 __s16 curr_offset; /* s4.12 fixed point */
599 __u16 pow_scale; /* u4.12 fixed point */
600 __s16 pow_offset; /* s4.12 fixed point */
650 * - Userland interface -
657 * - sending SMU commands (default at open() time)
658 * - receiving SMU events (not yet implemented)
683 __u8 cmd; /* SMU command byte */