TI SoC driver updates for v6.18

- ti_sci: Add support for abort handling of entry to Low Power Mode
 - k3-socinfo: Add decode for AM62L SR1.1 silicon revision
 - pruss: Replace usage of %pK in printk with safer %p formatting
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+KKGk1TrgjIXoxo03bWEnRc2JJ0FAmjJnesACgkQ3bWEnRc2
 JJ1beQ/7B5TCcVSP5FtKQgPGMZmYHiC3jMwbRUJgRY+usW4LHNzEDrN5hXYqTnmb
 K/1OKmYgcBbxJd6NF5jZqjDjQ2AvBfgqqq/kYvzryCmbFbO3ERKL7hYWvPxUkuQ3
 vGGywUVeSfhcEPRDmxuYMoqcgc2yF1z0MRFEZ3ZhooLdrNpDic2PmW5hXHKTxtPZ
 ra/QMbyxIc9vODcVJtLGVbi+YBreXH9vMWmKvbyisg4VDBAGAMzkfPaWQP7sh5P5
 T7668n+9+zd7uu7ALcfLl+hzc+UCPpFS9BuOTtA6xDTNdRvl8iA78CBiwVjfVbK1
 /EO2Dx59Y/3nYd95zVB5JraqO2Q+kLjyU0qRRBZ9g4o2KghjJ+v+xV6t0y5wF17n
 HHK5DXh3ZRNcupxYDSH5d3plyaCrsSa8itv+SbQPni97jqdgoAWc3gASS46krng1
 H9TfxQzoZULmuT0z4ffSYl7TZP344hxwbxdNcEJa/Fgb76sI7BglIYtl0DmrxtCg
 8SlvX1VphFyC97dZfG7NBVJIo7Fp27CntDDLLIIMpdwEvdfHeFSLGVcYiXDL6Z7T
 8djkOdBYMXUH2fdFyhe8QWjB22wlwfICGqXtPapsF4yYDz2zl7hysu2D1CFPdmcI
 saGROi/bKDgJjXri9gf2ItdMZ/1yFnXl2LqW80ioqiLwnbeFl70=
 =YbaZ
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmjTCqcACgkQmmx57+YA
 GNnf/xAAwK8s2GBoske+1I6HRTKp7Mz+Dw3j1EKZtScNS1KcROg+2fbMNC+poHrC
 HwU5/URmnEsHkX9x4wDAn7q4wLEYTzFVC2tFW3kV0pmVltZWug7R7jfgQQg/ksay
 apfrDy6io/vgRUbXN+Cow4Nr8jSDdT/oj+b5z1CLIRDp2bqLhqvqHMFBePLIDdr0
 AFyh/WUqSGT4DkZaD4Ng2SYjIVeyDvFN+WKBB8u2LO2S+BGEHI6h7YDRHRL8oBR8
 mJs3PFGTVP0dJuTEpxZiF48Y1p5mEl3k1Jcy8Nu/p5mcU8/o7Y3nWKZ4BwhouGdD
 3nE8HyRxOvXlsMCqgzFJNMmdpL1qqaOgQjUa7Nm063eXEXsnv61E5hdxvGl9dTwO
 zDyEzXOFwCXZjH5Gtsca0/DOMtShI0pSBmY3viFu00Bcxr9jrO8DmiRIxCrExyol
 uNQgfGmFLng5+yIWXxjYLh2oyqbMR6zSb7mA7BsP+Kc7TgFzzqecp2cAaFGYCcck
 XumFusd9HZXM4wwABEdywQZj0WoJHKq9RLRqNBt3JhUqnhlHyINiTR8uVDaopJc8
 jaxPSZ7p78QZbiabjIYy0o+QlozmHVkhzScVY6pEltoKxczqI7C6EysWup++zPh2
 82G2shIAN3RIDHVBzjb50d5ryIXcfVC8siL0+TgJoeLPz8ySaS0=
 =tx5G
 -----END PGP SIGNATURE-----

Merge tag 'ti-driver-soc-for-v6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/drivers

TI SoC driver updates for v6.18

- ti_sci: Add support for abort handling of entry to Low Power Mode
- k3-socinfo: Add decode for AM62L SR1.1 silicon revision
- pruss: Replace usage of %pK in printk with safer %p formatting

* tag 'ti-driver-soc-for-v6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  soc: ti: k3-socinfo: Add information for AM62L SR1.1
  firmware: ti_sci: Enable abort handling of entry to LPM
  soc: ti: pruss: don't use %pK through printk

Link: https://lore.kernel.org/r/20250916175441.iehltsk2377rg5c6@alike
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2025-09-23 23:01:25 +02:00
commit be6d263680
4 changed files with 69 additions and 3 deletions

View File

@ -2015,6 +2015,47 @@ static int ti_sci_cmd_set_latency_constraint(const struct ti_sci_handle *handle,
return ret;
}
/**
* ti_sci_cmd_lpm_abort() - Abort entry to LPM by clearing selection of LPM to enter
* @dev: Device pointer corresponding to the SCI entity
*
* Return: 0 if all went well, else returns appropriate error value.
*/
static int ti_sci_cmd_lpm_abort(struct device *dev)
{
struct ti_sci_info *info = dev_get_drvdata(dev);
struct ti_sci_msg_hdr *req;
struct ti_sci_msg_hdr *resp;
struct ti_sci_xfer *xfer;
int ret = 0;
xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_LPM_ABORT,
TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
sizeof(*req), sizeof(*resp));
if (IS_ERR(xfer)) {
ret = PTR_ERR(xfer);
dev_err(dev, "Message alloc failed(%d)\n", ret);
return ret;
}
req = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
ret = ti_sci_do_xfer(info, xfer);
if (ret) {
dev_err(dev, "Mbox send fail %d\n", ret);
goto fail;
}
resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
if (!ti_sci_is_response_ack(resp))
ret = -ENODEV;
fail:
ti_sci_put_one_xfer(&info->minfo, xfer);
return ret;
}
static int ti_sci_cmd_core_reboot(const struct ti_sci_handle *handle)
{
struct ti_sci_info *info;
@ -3739,11 +3780,22 @@ static int __maybe_unused ti_sci_resume_noirq(struct device *dev)
return 0;
}
static void __maybe_unused ti_sci_pm_complete(struct device *dev)
{
struct ti_sci_info *info = dev_get_drvdata(dev);
if (info->fw_caps & MSG_FLAG_CAPS_LPM_ABORT) {
if (ti_sci_cmd_lpm_abort(dev))
dev_err(dev, "LPM clear selection failed.\n");
}
}
static const struct dev_pm_ops ti_sci_pm_ops = {
#ifdef CONFIG_PM_SLEEP
.suspend = ti_sci_suspend,
.suspend_noirq = ti_sci_suspend_noirq,
.resume_noirq = ti_sci_resume_noirq,
.complete = ti_sci_pm_complete,
#endif
};
@ -3876,10 +3928,11 @@ static int ti_sci_probe(struct platform_device *pdev)
}
ti_sci_msg_cmd_query_fw_caps(&info->handle, &info->fw_caps);
dev_dbg(dev, "Detected firmware capabilities: %s%s%s\n",
dev_dbg(dev, "Detected firmware capabilities: %s%s%s%s\n",
info->fw_caps & MSG_FLAG_CAPS_GENERIC ? "Generic" : "",
info->fw_caps & MSG_FLAG_CAPS_LPM_PARTIAL_IO ? " Partial-IO" : "",
info->fw_caps & MSG_FLAG_CAPS_LPM_DM_MANAGED ? " DM-Managed" : ""
info->fw_caps & MSG_FLAG_CAPS_LPM_DM_MANAGED ? " DM-Managed" : "",
info->fw_caps & MSG_FLAG_CAPS_LPM_ABORT ? " LPM-Abort" : ""
);
ti_sci_setup_ops(info);

View File

@ -42,6 +42,7 @@
#define TI_SCI_MSG_SET_IO_ISOLATION 0x0307
#define TI_SCI_MSG_LPM_SET_DEVICE_CONSTRAINT 0x0309
#define TI_SCI_MSG_LPM_SET_LATENCY_CONSTRAINT 0x030A
#define TI_SCI_MSG_LPM_ABORT 0x0311
/* Resource Management Requests */
#define TI_SCI_MSG_GET_RESOURCE_RANGE 0x1500
@ -147,6 +148,7 @@ struct ti_sci_msg_req_reboot {
* MSG_FLAG_CAPS_GENERIC: Generic capability (LPM not supported)
* MSG_FLAG_CAPS_LPM_PARTIAL_IO: Partial IO in LPM
* MSG_FLAG_CAPS_LPM_DM_MANAGED: LPM can be managed by DM
* MSG_FLAG_CAPS_LPM_ABORT: Abort entry to LPM
*
* Response to a generic message with message type TI_SCI_MSG_QUERY_FW_CAPS
* providing currently available SOC/firmware capabilities. SoC that don't
@ -157,6 +159,7 @@ struct ti_sci_msg_resp_query_fw_caps {
#define MSG_FLAG_CAPS_GENERIC TI_SCI_MSG_FLAG(0)
#define MSG_FLAG_CAPS_LPM_PARTIAL_IO TI_SCI_MSG_FLAG(4)
#define MSG_FLAG_CAPS_LPM_DM_MANAGED TI_SCI_MSG_FLAG(5)
#define MSG_FLAG_CAPS_LPM_ABORT TI_SCI_MSG_FLAG(9)
#define MSG_MASK_CAPS_LPM GENMASK_ULL(4, 1)
u64 fw_caps;
} __packed;

View File

@ -66,6 +66,10 @@ static const char * const j721e_rev_string_map[] = {
"1.0", "1.1", "2.0",
};
static const char * const am62lx_rev_string_map[] = {
"1.0", "1.1",
};
static int
k3_chipinfo_partno_to_names(unsigned int partno,
struct soc_device_attribute *soc_dev_attr)
@ -92,6 +96,12 @@ k3_chipinfo_variant_to_sr(unsigned int partno, unsigned int variant,
soc_dev_attr->revision = kasprintf(GFP_KERNEL, "SR%s",
j721e_rev_string_map[variant]);
break;
case JTAG_ID_PARTNO_AM62LX:
if (variant >= ARRAY_SIZE(am62lx_rev_string_map))
goto err_unknown_variant;
soc_dev_attr->revision = kasprintf(GFP_KERNEL, "SR%s",
am62lx_rev_string_map[variant]);
break;
default:
variant++;
soc_dev_attr->revision = kasprintf(GFP_KERNEL, "SR%x.0",

View File

@ -449,7 +449,7 @@ static int pruss_of_setup_memories(struct device *dev, struct pruss *pruss)
pruss->mem_regions[i].pa = res.start;
pruss->mem_regions[i].size = resource_size(&res);
dev_dbg(dev, "memory %8s: pa %pa size 0x%zx va %pK\n",
dev_dbg(dev, "memory %8s: pa %pa size 0x%zx va %p\n",
mem_names[i], &pruss->mem_regions[i].pa,
pruss->mem_regions[i].size, pruss->mem_regions[i].va);
}