public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v5 0/4] add NXP RTC driver support for S32G2/S32G3 SoCs
@ 2024-11-26 11:49 Ciprian Costea
  2024-11-26 11:49 ` [PATCH v5 1/4] dt-bindings: rtc: add schema for NXP " Ciprian Costea
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Ciprian Costea @ 2024-11-26 11:49 UTC (permalink / raw)
  To: Alexandre Belloni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Catalin Marinas, Will Deacon
  Cc: linux-rtc, devicetree, linux-kernel, linux-arm-kernel, imx,
	NXP S32 Linux, Christophe Lizzi, Alberto Ruiz, Enric Balletbo,
	Ciprian Marian Costea

From: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>

This patch series add support for the NXP RTC hardware module present on
S32G2/S32G3 SoCs.

RTC tracks clock time during system suspend. It is used as a time-based
wakeup source for the S32G2/S32G3 SoCs.

RTC is not battery-powered and it is not kept alive during system reset.

Following is an example of Suspend to RAM trigger on S32G2/S32G3 SoCs,
using userspace tools such as rtcwake:
# rtcwake -s 2 -m mem
# rtcwake: assuming RTC uses UTC ...
# rtcwake: wakeup from "mem" using /dev/rtc0 at Wed Feb  6 06:28:36 2036
#

Changes in V5:
- Removed rollover support.
- Removed clock switching support between Runtime and Suspend. A clock source
  which is always available has been used instead.
- Enabled 512 value RTC hardware frequency divisor to achieve higher rollover
  time
- Removed unneeded 'remove' callback.
- Decreased driver print verbosity on error paths.
- Provided 'clock-names' actual names in bindings documentation
- Remove __maybe_unused notations. Used the DEFINE_SIMPLE_DEV_PM_OPS() and
  pm_sleep_ptr() macros to handle the .suspend/.resume callbacks.
- Fixed some alignment issues.

Changes in V4:
- Dropped 'assigned-*' clock management approach. Simplified RTC Runtime
  and Suspend/Standby clock configuration.
- Simplified error paths on probe function
- Removed node label from bindings example
- Several cosmetic coding style fixes

Changes in V3:
- Removed 'nxp,s32g3-rtc' compatible string
- Change to 'remove' callback from 'remove_new'
- Used 'dev.parent' from 'struct rtc_device' instead of defining a
  specific 'struct device' in driver data
- Fixed several errors reported by kernel test robot
- Removed 'assigned-clocks', 'assigned-clock-parents' and
  'assigned-clock-rates' from required properties in the binding
  documentation.
- Refactored S32G RTC driver such that a default clock source and
  divisors configuration will be applied in case 'assigned-clocks' and
  'assigned-clock-parents' properties are missing.

Changes in V2:
- Removed 'clksel' support from dts bindings. Used clock parents support
  from CCF to better illustrate the RTC hardware IP from S32G2/S32G3.
- Removed frequency dividers support from dts bindings. Used assigned
  clock frequencies support from CCF instead.
- Reduced the interval while RTC is voluntarily disabled to a simple
  register write in order to avoid any race condition between a possbile
  rollover and 'suspend' callback execution flow.
- Updated bindings documentation with respect to clocking support.
- Fixed a potential unused variable warning reported by kernel test robot.
- Updated to usage of 'devm_rtc_allocate_device' and 'devm_rtc_register_device'
  instead of deprecated 'devm_rtc_device_register'.

Ciprian Marian Costea (4):
  dt-bindings: rtc: add schema for NXP S32G2/S32G3 SoCs
  rtc: s32g: add NXP S32G2/S32G3 SoC support
  arm64: defconfig: add S32G RTC module support
  MAINTAINERS: add NXP S32G RTC driver

 .../devicetree/bindings/rtc/nxp,s32g-rtc.yaml |  69 +++
 MAINTAINERS                                   |   2 +
 arch/arm64/configs/defconfig                  |   1 +
 drivers/rtc/Kconfig                           |  11 +
 drivers/rtc/Makefile                          |   1 +
 drivers/rtc/rtc-s32g.c                        | 554 ++++++++++++++++++
 6 files changed, 638 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/nxp,s32g-rtc.yaml
 create mode 100644 drivers/rtc/rtc-s32g.c

-- 
2.45.2



^ permalink raw reply	[flat|nested] 16+ messages in thread
* [PATCH] mmc: sdhci-esdhc-imx: enable 'SDHCI_QUIRK_NO_LED' quirk for S32G
@ 2024-11-26 11:44 Ciprian Costea
  2024-11-26 11:44 ` [PATCH v5 2/4] rtc: s32g: add NXP S32G2/S32G3 SoC support Ciprian Costea
  0 siblings, 1 reply; 16+ messages in thread
From: Ciprian Costea @ 2024-11-26 11:44 UTC (permalink / raw)
  To: Alexandre Belloni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Catalin Marinas, Will Deacon
  Cc: linux-rtc, devicetree, linux-kernel, linux-arm-kernel, imx,
	NXP S32 Linux, Christophe Lizzi, Alberto Ruiz, Enric Balletbo,
	Ciprian Marian Costea

From: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>

Enable 'SDHCI_QUIRK_NO_LED' quirk for S32G2/S32G3 SoCs.
S32G SDHCI controller does not have a LED signal line.

Signed-off-by: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
---
 drivers/mmc/host/sdhci-esdhc-imx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index d55d045ef236..e23177ea9d91 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -304,6 +304,7 @@ static struct esdhc_soc_data usdhc_s32g2_data = {
 			| ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200
 			| ESDHC_FLAG_HS400 | ESDHC_FLAG_HS400_ES
 			| ESDHC_FLAG_SKIP_ERR004536 | ESDHC_FLAG_SKIP_CD_WAKE,
+	.quirks = SDHCI_QUIRK_NO_LED,
 };
 
 static struct esdhc_soc_data usdhc_imx7ulp_data = {
-- 
2.45.2



^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-12-02 13:08 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-26 11:49 [PATCH v5 0/4] add NXP RTC driver support for S32G2/S32G3 SoCs Ciprian Costea
2024-11-26 11:49 ` [PATCH v5 1/4] dt-bindings: rtc: add schema for NXP " Ciprian Costea
2024-11-26 19:08   ` Krzysztof Kozlowski
2024-11-27 12:01     ` Ciprian Marian Costea
2024-11-27 14:43   ` Rob Herring
2024-11-27 14:49     ` Ciprian Marian Costea
2024-11-26 11:49 ` [PATCH v5 2/4] rtc: s32g: add NXP S32G2/S32G3 SoC support Ciprian Costea
2024-11-26 18:05   ` Frank Li
2024-11-27 15:07     ` Ciprian Marian Costea
2024-11-27 15:32       ` Alexandre Belloni
2024-12-02 13:06         ` Ciprian Marian Costea
2024-11-28 21:18   ` kernel test robot
2024-11-26 11:49 ` [PATCH v5 3/4] arm64: defconfig: add S32G RTC module support Ciprian Costea
2024-11-26 11:49 ` [PATCH v5 4/4] MAINTAINERS: add NXP S32G RTC driver Ciprian Costea
  -- strict thread matches above, loose matches on Subject: below --
2024-11-26 11:44 [PATCH] mmc: sdhci-esdhc-imx: enable 'SDHCI_QUIRK_NO_LED' quirk for S32G Ciprian Costea
2024-11-26 11:44 ` [PATCH v5 2/4] rtc: s32g: add NXP S32G2/S32G3 SoC support Ciprian Costea
2024-11-30 20:07   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox