Commit 949f647
i2c: imx-lpi2c: Add runtime PM support for IRQ and clock management on i.MX8QXP/8QM
On i.MX8QXP/8QM SoCs, both the lvds/mipi and lvds/mipi-lpi2c power domains
must enter low-power mode during runtime suspend to achieve deep power
savings.
LPI2C resides in the lvds-lpi2c/mipi-lpi2c power domain, while its IRQ is
routed through an irqsteer located in the lvds/mipi power domain. The LPI2C
clock source comes from an LPCG within the lvds-lpi2c domain.
For example, the hierarchy for lvds0 and lvds0-lpi2c0 domains is:
┌───────────────────────┐
│ pm-domain : lvds0 │
│ │
│ ┌──────────────┐ │
│ │ irqsteer │ │
│ └───────▲──────┘ │
│ │irq │
│ │ │
└────────────┼──────────┘
┌────────────┼──────────┐
│ ┌───┼───┐ │
│ │lpi2c0 │ │
│ └───┬───┘clk │
│ ┌────────┼───────┐ │
│ │ LPCG │ │
│ └────────────────┘ │
│pm-domain:lvds0-lpi2c0 │
└───────────────────────┘
To allow these domains to power down in system runtime suspend:
- All irqsteer clients must release IRQs.
- All LPCG clients must disable and unprepare clocks.
Thus, LPI2C must:
- Free its IRQ during runtime suspend and re-request it on resume.
- Disable and unprepare all clocks during runtime suspend and prepare
and rne ble them on resume.
This enables the lvds/mipi domains to enter deep low-power mode,
significantly reducing power consumption compared to active mode.
Signed-off-by: Carlos Song <carlos.song@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20251125084718.2156168-1-carlos.song@nxp.com1 parent 7021f6c commit 949f647
1 file changed
Lines changed: 71 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| |||
148 | 149 | | |
149 | 150 | | |
150 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
151 | 157 | | |
152 | 158 | | |
153 | 159 | | |
| |||
186 | 192 | | |
187 | 193 | | |
188 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
189 | 210 | | |
190 | 211 | | |
191 | 212 | | |
| |||
1363 | 1384 | | |
1364 | 1385 | | |
1365 | 1386 | | |
1366 | | - | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
1367 | 1390 | | |
1368 | 1391 | | |
1369 | 1392 | | |
| |||
1374 | 1397 | | |
1375 | 1398 | | |
1376 | 1399 | | |
1377 | | - | |
| 1400 | + | |
1378 | 1401 | | |
1379 | 1402 | | |
1380 | 1403 | | |
1381 | 1404 | | |
1382 | 1405 | | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
1383 | 1410 | | |
1384 | 1411 | | |
1385 | 1412 | | |
1386 | 1413 | | |
1387 | | - | |
1388 | | - | |
1389 | | - | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
1390 | 1417 | | |
1391 | 1418 | | |
1392 | 1419 | | |
| |||
1406 | 1433 | | |
1407 | 1434 | | |
1408 | 1435 | | |
1409 | | - | |
| 1436 | + | |
1410 | 1437 | | |
1411 | 1438 | | |
1412 | | - | |
| 1439 | + | |
1413 | 1440 | | |
1414 | 1441 | | |
1415 | 1442 | | |
| |||
1432 | 1459 | | |
1433 | 1460 | | |
1434 | 1461 | | |
1435 | | - | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
1436 | 1467 | | |
1437 | 1468 | | |
1438 | 1469 | | |
| |||
1487 | 1518 | | |
1488 | 1519 | | |
1489 | 1520 | | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
1490 | 1526 | | |
1491 | | - | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
1492 | 1531 | | |
1493 | 1532 | | |
1494 | 1533 | | |
| |||
1497 | 1536 | | |
1498 | 1537 | | |
1499 | 1538 | | |
| 1539 | + | |
| 1540 | + | |
1500 | 1541 | | |
1501 | 1542 | | |
1502 | 1543 | | |
1503 | | - | |
1504 | | - | |
1505 | | - | |
1506 | | - | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
1507 | 1565 | | |
1508 | 1566 | | |
1509 | 1567 | | |
| |||
0 commit comments