diff options
author | Dave Gerlach <d-gerlach@ti.com> | 2022-04-26 13:07:44 -0700 |
---|---|---|
committer | Nishanth Menon <nm@ti.com> | 2022-05-03 08:02:09 -0500 |
commit | ea082040fe071d2ba1f8f73792743d7ca9fb218e (patch) | |
tree | 9eb4483dbdb0aa0bbf113dd2f825f184ac9631b5 /include | |
parent | 1dcbae86ee669bdb0338954cd0136863f5c96c0a (diff) | |
download | linux-stable-ea082040fe071d2ba1f8f73792743d7ca9fb218e.tar.gz linux-stable-ea082040fe071d2ba1f8f73792743d7ca9fb218e.tar.bz2 linux-stable-ea082040fe071d2ba1f8f73792743d7ca9fb218e.zip |
soc: ti: wkup_m3_ipc: Add support for i2c voltage scaling
Allow loading of a binary containing i2c scaling sequences to be
provided to the wkup_m3 firmware in order to properly scale voltage
rails on the PMIC during low power modes like DeepSleep0. Proper binary
format is determined by the FW in use.
Code expects firmware to have 0x0C57 present as the first two bytes
followed by one byte defining offset to sleep sequence followed by one
byte defining offset to wake sequence and then lastly both sequences.
Each sequence is a series of I2C transfers in the form:
u8 length | u8 chip address | u8 byte0/reg address | u8 byte1 | u8 byteN
..
The length indicates the number of bytes to transfer, including the
register address. The length of each transfer is limited by the I2C
buffer size of 32 bytes.
Based on previous work by Russ Dill.
[dfustini: replace FW_ACTION_HOTPLUG with FW_ACTION_UEVENT]
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
[dfustini: add NULL argument to rproc_da_to_va() call]
Signed-off-by: Drew Fustini <dfustini@baylibre.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20220426200741.712842-3-dfustini@baylibre.com
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/wkup_m3_ipc.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/wkup_m3_ipc.h b/include/linux/wkup_m3_ipc.h index b706eac58f92..fef0fac60f8c 100644 --- a/include/linux/wkup_m3_ipc.h +++ b/include/linux/wkup_m3_ipc.h @@ -37,6 +37,9 @@ struct wkup_m3_ipc { int isolation_conf; int state; + unsigned long volt_scale_offsets; + const char *sd_fw_name; + struct completion sync_complete; struct mbox_client mbox_client; struct mbox_chan *mbox; @@ -50,6 +53,12 @@ struct wkup_m3_wakeup_src { char src[10]; }; +struct wkup_m3_scale_data_header { + u16 magic; + u8 sleep_offset; + u8 wake_offset; +} __packed; + struct wkup_m3_ipc_ops { void (*set_mem_type)(struct wkup_m3_ipc *m3_ipc, int mem_type); void (*set_resume_address)(struct wkup_m3_ipc *m3_ipc, void *addr); |