From: Dhruva Gole <d-gole@ti.com> To: Mark Brown <broonie@kernel.org>, Nishanth Menon <nm@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>, Tero Kristo <kristo@kernel.org> Cc: <linux-arm-kernel@lists.infradead.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-spi@vger.kernel.org>, Dhruva Gole <d-gole@ti.com> Subject: [PATCH 0/2] spi-cadence-quadspi: Introduce runtime_pm support Date: Fri, 18 Aug 2023 16:07:48 +0530 [thread overview] Message-ID: <20230818103750.516309-1-d-gole@ti.com> (raw) Abstract ******** This series aims to add runtime_pm [0] functionality to the cadence-qspi driver/IP. Prior to this, the driver had system suspend resume support which comes into picture only during system wide low power states like deep sleep / Suspend-to-RAM. Now, with runtime_pm support we can finally allow this driver/controller to be clock gated/ suspended when it's not in active use. This helps the overall system to reduce it's power consumption without needing to resort to system wide low power modes. As it turns out, the system suspend resume functionality that existed so far can be re-used as is even for runtime suspend resume, hence the actual implementations of those calls need not change. Testing ******* This series has been tested by me on a SK-AM625 [1] EVM by Texas Instruments. I did a basic test to check if IP suspended by trying to access it's registers while suspended (got core dump) and then to check resume I read back data from it. Also used k3conf, a TI tool to check on the device status in K3 Family of SOCs. I highly encourage other platforms and users of this driver to test these changes as it affects all those who use runtime_pm. For this, I have uploaded these changes on my github branch [2] which can be cloned and readily used. For referring to how I tested, please refer to my logs [3] Runtime PM usage **************** The auto-suspend delay can be tweaked from the userspace using the following sysfs entry: root@am62xx-evm:~# cat /sys/bus/platform/devices/fc40000.spi/power/autosuspend_delay_ms 2000 Other useful information can be obtained from the same folder, root@am62xx-evm:~# cat /sys/bus/platform/devices/fc40000.spi/power/runtime_* To disable runtime auto-suspend for this driver one can set autosuspend_delay_ms to -1 Note to maintainers ******************* * Patch 1/2 should probably go via Nishant's / Vignesh's tree * Patch 2/2 (RFT) can go via Mark's tree Reference/Links *************** [0] https://docs.kernel.org/power/runtime_pm.html [1] https://www.ti.com/tool/SK-AM62 [2] https://github.com/DhruvaG2000/v-linux/tree/ospi_runtime_pm [3] https://gist.github.com/DhruvaG2000/6aeeb2196caf8fbbe518c89037cb7548 Dhruva Gole (2): arm64: dts: ti: k3-am62-main: PM fixes in the fss node spi: spi-cadence-quadspi: add runtime pm support arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 3 +- drivers/spi/spi-cadence-quadspi.c | 38 ++++++++++++++++++------ 2 files changed, 31 insertions(+), 10 deletions(-) base-commit: 47762f08697484cf0c2f2904b8c52375ed26c8cb -- 2.34.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Dhruva Gole <d-gole@ti.com> To: Mark Brown <broonie@kernel.org>, Nishanth Menon <nm@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>, Tero Kristo <kristo@kernel.org> Cc: <linux-arm-kernel@lists.infradead.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-spi@vger.kernel.org>, Dhruva Gole <d-gole@ti.com> Subject: [PATCH 0/2] spi-cadence-quadspi: Introduce runtime_pm support Date: Fri, 18 Aug 2023 16:07:48 +0530 [thread overview] Message-ID: <20230818103750.516309-1-d-gole@ti.com> (raw) Abstract ******** This series aims to add runtime_pm [0] functionality to the cadence-qspi driver/IP. Prior to this, the driver had system suspend resume support which comes into picture only during system wide low power states like deep sleep / Suspend-to-RAM. Now, with runtime_pm support we can finally allow this driver/controller to be clock gated/ suspended when it's not in active use. This helps the overall system to reduce it's power consumption without needing to resort to system wide low power modes. As it turns out, the system suspend resume functionality that existed so far can be re-used as is even for runtime suspend resume, hence the actual implementations of those calls need not change. Testing ******* This series has been tested by me on a SK-AM625 [1] EVM by Texas Instruments. I did a basic test to check if IP suspended by trying to access it's registers while suspended (got core dump) and then to check resume I read back data from it. Also used k3conf, a TI tool to check on the device status in K3 Family of SOCs. I highly encourage other platforms and users of this driver to test these changes as it affects all those who use runtime_pm. For this, I have uploaded these changes on my github branch [2] which can be cloned and readily used. For referring to how I tested, please refer to my logs [3] Runtime PM usage **************** The auto-suspend delay can be tweaked from the userspace using the following sysfs entry: root@am62xx-evm:~# cat /sys/bus/platform/devices/fc40000.spi/power/autosuspend_delay_ms 2000 Other useful information can be obtained from the same folder, root@am62xx-evm:~# cat /sys/bus/platform/devices/fc40000.spi/power/runtime_* To disable runtime auto-suspend for this driver one can set autosuspend_delay_ms to -1 Note to maintainers ******************* * Patch 1/2 should probably go via Nishant's / Vignesh's tree * Patch 2/2 (RFT) can go via Mark's tree Reference/Links *************** [0] https://docs.kernel.org/power/runtime_pm.html [1] https://www.ti.com/tool/SK-AM62 [2] https://github.com/DhruvaG2000/v-linux/tree/ospi_runtime_pm [3] https://gist.github.com/DhruvaG2000/6aeeb2196caf8fbbe518c89037cb7548 Dhruva Gole (2): arm64: dts: ti: k3-am62-main: PM fixes in the fss node spi: spi-cadence-quadspi: add runtime pm support arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 3 +- drivers/spi/spi-cadence-quadspi.c | 38 ++++++++++++++++++------ 2 files changed, 31 insertions(+), 10 deletions(-) base-commit: 47762f08697484cf0c2f2904b8c52375ed26c8cb -- 2.34.1
next reply other threads:[~2023-08-18 10:39 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-08-18 10:37 Dhruva Gole [this message] 2023-08-18 10:37 ` [PATCH 0/2] spi-cadence-quadspi: Introduce runtime_pm support Dhruva Gole 2023-08-18 10:37 ` [PATCH 1/2] arm64: dts: ti: k3-am62-main: PM fixes in the fss node Dhruva Gole 2023-08-18 10:37 ` Dhruva Gole 2023-08-21 16:28 ` Andrew Davis 2023-08-21 16:28 ` Andrew Davis 2023-08-18 10:37 ` [RFT/PATCH 2/2] spi: spi-cadence-quadspi: add runtime pm support Dhruva Gole 2023-08-18 10:37 ` Dhruva Gole
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230818103750.516309-1-d-gole@ti.com \ --to=d-gole@ti.com \ --cc=broonie@kernel.org \ --cc=devicetree@vger.kernel.org \ --cc=kristo@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-spi@vger.kernel.org \ --cc=nm@ti.com \ --cc=vigneshr@ti.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.