Skip to content

Commit

Permalink
Merge tag 'rtc-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/abelloni/linux

Pull RTC updates from Alexandre Belloni:
 "More conversions of DT bindings to yaml. There is one new driver, for
  the DFRobot SD2405AL and support for important features of the stm32
  RTC. Summary:

  New driver:
   - DFRobot SD2405AL

  Drivers:
   - stm32: add alarm A out and LSCO support
   - sun6i: disable automatic clock input switching
   - m48t59: set range"

* tag 'rtc-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux:
  rtc: rc5t619: use proper module tables
  rtc: m48t59: set range
  dt-bindings: rtc: microcrystal,rv3028: add #clock-cells property
  rtc: m48t59: Remove division condition with direct comparison
  rtc: at91sam9: fix OF node leak in probe() error path
  rtc: sun6i: disable automatic clock input switching
  dt-bindings: rtc: Drop non-trivial duplicate compatibles
  dt-bindings: vendor-prefixes: Add DFRobot.
  dt-bindings: rtc: Add support for SD2405AL.
  rtc: Add driver for SD2405AL
  rtc: s35390a: Drop vendorless compatible string from match table
  rtc: twl: convert comma to semicolon
  dt-bindings: rtc: sprd,sc2731-rtc: convert to YAML
  rtc: stm32: add alarm A out feature
  rtc: stm32: add Low Speed Clock Output (LSCO) support
  rtc: stm32: add pinctrl and pinmux interfaces
  dt-bindings: rtc: stm32: describe pinmux nodes
  • Loading branch information
torvalds committed Sep 25, 2024
2 parents aa48655 + 6902862 commit b2149f9
Show file tree
Hide file tree
Showing 17 changed files with 633 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ properties:
interrupts:
maxItems: 1

"#clock-cells":
const: 0

trickle-resistor-ohms:
enum:
- 3000
Expand Down
49 changes: 49 additions & 0 deletions Documentation/devicetree/bindings/rtc/sprd,sc2731-rtc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc/sprd,sc2731-rtc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Spreadtrum SC2731 Real Time Clock

maintainers:
- Orson Zhai <[email protected]>
- Baolin Wang <[email protected]>
- Chunyan Zhang <[email protected]>

properties:
compatible:
const: sprd,sc2731-rtc

reg:
maxItems: 1

interrupts:
maxItems: 1

required:
- compatible
- reg
- interrupts

allOf:
- $ref: rtc.yaml#

unevaluatedProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
pmic {
#address-cells = <1>;
#size-cells = <0>;
rtc@280 {
compatible = "sprd,sc2731-rtc";
reg = <0x280>;
interrupt-parent = <&sc2731_pmic>;
interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
};
};
...
26 changes: 0 additions & 26 deletions Documentation/devicetree/bindings/rtc/sprd,sc27xx-rtc.txt

This file was deleted.

28 changes: 28 additions & 0 deletions Documentation/devicetree/bindings/rtc/st,stm32-rtc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,28 @@ properties:
override default rtc_ck parent clock phandle of the new parent clock of rtc_ck
maxItems: 1

patternProperties:
"^rtc-[a-z]+-[0-9]+$":
type: object
$ref: /schemas/pinctrl/pinmux-node.yaml
description: |
Configuration of STM32 RTC pins description. STM32 RTC is able to output
some signals on specific pins:
- LSCO (Low Speed Clock Output) that allow to output LSE clock on a pin.
- Alarm out that allow to send a pulse on a pin when alarm A of the RTC
expires.
additionalProperties: false
properties:
function:
enum:
- lsco
- alarm-a
pins:
enum:
- out1
- out2
- out2_rmp

allOf:
- if:
properties:
Expand All @@ -68,6 +90,9 @@ allOf:

clock-names: false

patternProperties:
"^rtc-[a-z]+-[0-9]+$": false

required:
- st,syscfg

Expand All @@ -83,6 +108,9 @@ allOf:
minItems: 2
maxItems: 2

patternProperties:
"^rtc-[a-z]+-[0-9]+$": false

required:
- clock-names
- st,syscfg
Expand Down
9 changes: 2 additions & 7 deletions Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ properties:
- dallas,ds1672
# Extremely Accurate I²C RTC with Integrated Crystal and SRAM
- dallas,ds3232
# SD2405AL Real-Time Clock
- dfrobot,sd2405al
# EM Microelectronic EM3027 RTC
- emmicro,em3027
# I2C-BUS INTERFACE REAL TIME CLOCK MODULE
- epson,rx8010
# I2C-BUS INTERFACE REAL TIME CLOCK MODULE
- epson,rx8025
- epson,rx8035
# I2C-BUS INTERFACE REAL TIME CLOCK MODULE with Battery Backed RAM
- epson,rx8111
Expand All @@ -52,10 +53,6 @@ properties:
- epson,rx8581
# Android Goldfish Real-time Clock
- google,goldfish-rtc
# Intersil ISL1208 Low Power RTC with Battery Backed SRAM
- isil,isl1208
# Intersil ISL1218 Low Power RTC with Battery Backed SRAM
- isil,isl1218
# Mvebu Real-time Clock
- marvell,orion-rtc
# Maxim DS1742/DS1743 Real-time Clock
Expand All @@ -68,8 +65,6 @@ properties:
- microcrystal,rv8523
# NXP LPC32xx SoC Real-time Clock
- nxp,lpc3220-rtc
# Real-time Clock Module
- pericom,pt7c4338
# I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
- ricoh,r2025sd
# I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
Expand Down
2 changes: 2 additions & 0 deletions Documentation/devicetree/bindings/vendor-prefixes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,8 @@ patternProperties:
description: Devantech, Ltd.
"^dfi,.*":
description: DFI Inc.
"^dfrobot,.*":
description: DFRobot Corporation
"^dh,.*":
description: DH electronics GmbH
"^difrnce,.*":
Expand Down
6 changes: 6 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -6557,6 +6557,12 @@ F: include/net/devlink.h
F: include/uapi/linux/devlink.h
F: net/devlink/

DFROBOT SD2405AL RTC DRIVER
M: Tóth János <[email protected]>
L: [email protected]
S: Maintained
F: drivers/rtc/rtc-sd2405al.c

DH ELECTRONICS IMX6 DHCOM/DHCOR BOARD SUPPORT
M: Christoph Niedermaier <[email protected]>
L: [email protected]
Expand Down
16 changes: 16 additions & 0 deletions drivers/rtc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,16 @@ config RTC_DRV_S5M
This driver can also be built as a module. If so, the module
will be called rtc-s5m.

config RTC_DRV_SD2405AL
tristate "DFRobot SD2405AL"
select REGMAP_I2C
help
If you say yes here you will get support for the
DFRobot SD2405AL I2C RTC Module.

This driver can also be built as a module. If so, the module
will be called rtc-sd2405al.

config RTC_DRV_SD3078
tristate "ZXW Shenzhen whwave SD3078"
select REGMAP_I2C
Expand Down Expand Up @@ -1934,6 +1944,12 @@ config RTC_DRV_STM32
tristate "STM32 RTC"
select REGMAP_MMIO
depends on ARCH_STM32 || COMPILE_TEST
depends on OF
depends on PINCTRL
select PINMUX
select PINCONF
select GENERIC_PINCONF
depends on COMMON_CLK
help
If you say yes here you get support for the STM32 On-Chip
Real Time Clock.
Expand Down
1 change: 1 addition & 0 deletions drivers/rtc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ obj-$(CONFIG_RTC_DRV_S3C) += rtc-s3c.o
obj-$(CONFIG_RTC_DRV_S5M) += rtc-s5m.o
obj-$(CONFIG_RTC_DRV_SA1100) += rtc-sa1100.o
obj-$(CONFIG_RTC_DRV_SC27XX) += rtc-sc27xx.o
obj-$(CONFIG_RTC_DRV_SD2405AL) += rtc-sd2405al.o
obj-$(CONFIG_RTC_DRV_SD3078) += rtc-sd3078.o
obj-$(CONFIG_RTC_DRV_SH) += rtc-sh.o
obj-$(CONFIG_RTC_DRV_SNVS) += rtc-snvs.o
Expand Down
1 change: 1 addition & 0 deletions drivers/rtc/rtc-at91sam9.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ static int at91_rtc_probe(struct platform_device *pdev)
return ret;

rtc->gpbr = syscon_node_to_regmap(args.np);
of_node_put(args.np);
rtc->gpbr_offset = args.args[0];
if (IS_ERR(rtc->gpbr)) {
dev_err(&pdev->dev, "failed to retrieve gpbr regmap, aborting.\n");
Expand Down
4 changes: 3 additions & 1 deletion drivers/rtc/rtc-m48t59.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ static int m48t59_rtc_set_time(struct device *dev, struct rtc_time *tm)
M48T59_WRITE((bin2bcd(tm->tm_mon + 1) & 0x1F), M48T59_MONTH);
M48T59_WRITE(bin2bcd(year % 100), M48T59_YEAR);

if (pdata->type == M48T59RTC_TYPE_M48T59 && (year / 100))
if (pdata->type == M48T59RTC_TYPE_M48T59 && (year >= 100))
val = (M48T59_WDAY_CEB | M48T59_WDAY_CB);
val |= (bin2bcd(tm->tm_wday) & 0x07);
M48T59_WRITE(val, M48T59_WDAY);
Expand Down Expand Up @@ -458,6 +458,8 @@ static int m48t59_rtc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, m48t59);

m48t59->rtc->ops = &m48t59_rtc_ops;
m48t59->rtc->range_min = RTC_TIMESTAMP_BEGIN_1900;
m48t59->rtc->range_max = RTC_TIMESTAMP_END_2099;

nvmem_cfg.size = pdata->offset;
ret = devm_rtc_nvmem_register(m48t59->rtc, &nvmem_cfg);
Expand Down
13 changes: 11 additions & 2 deletions drivers/rtc/rtc-rc5t619.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,14 +429,23 @@ static int rc5t619_rtc_probe(struct platform_device *pdev)
return devm_rtc_register_device(rtc->rtc);
}

static const struct platform_device_id rc5t619_rtc_id[] = {
{
.name = "rc5t619-rtc",
}, {
/* sentinel */
}
};
MODULE_DEVICE_TABLE(platform, rc5t619_rtc_id);

static struct platform_driver rc5t619_rtc_driver = {
.driver = {
.name = "rc5t619-rtc",
},
.probe = rc5t619_rtc_probe,
.id_table = rc5t619_rtc_id,
};

module_platform_driver(rc5t619_rtc_driver);
MODULE_ALIAS("platform:rc5t619-rtc");

MODULE_DESCRIPTION("RICOH RC5T619 RTC driver");
MODULE_LICENSE("GPL");
1 change: 0 additions & 1 deletion drivers/rtc/rtc-s35390a.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ static const struct i2c_device_id s35390a_id[] = {
MODULE_DEVICE_TABLE(i2c, s35390a_id);

static const __maybe_unused struct of_device_id s35390a_of_match[] = {
{ .compatible = "s35390a" },
{ .compatible = "sii,s35390a" },
{ }
};
Expand Down
Loading

0 comments on commit b2149f9

Please sign in to comment.