devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/3] arm64: Realtek RTD1295 RTC
@ 2017-09-04 22:53 Andreas Färber
  2017-09-04 22:53 ` [PATCH v4 1/3] dt-bindings: rtc: Add Realtek RTD1295 Andreas Färber
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Andreas Färber @ 2017-09-04 22:53 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-kernel, Roc He, 蒋丽琴,
	Andreas Färber, Alessandro Zummo, Alexandre Belloni,
	linux-rtc, devicetree, Andrew Lunn

Hello,

This series adds the RTC for the Realtek RTD1295 SoC.
Based on my RTD1295 clk series.

There being no public source code for RTD1295, the implementation is based on
register offsets seen in the vendor DT, as well as older mach-rtk119x code
published by QNAP.

v4 adds a missing clk_put().

The DT node depends on the clk series for clock index and header.

More experimental patches at:
https://github.com/afaerber/linux/commits/rtd1295-next

Have a lot of fun!

Cheers,
Andreas

v3 -> v4:
* Added clk_put() (Alexandre)

v2 -> v3:
* Dropped spinlock (Andrew)
* Improved year_days vs. days_in_year readability

v1 -> v2:
* Updated rtc driver to no longer use open/release (Alexandre)
* Cleaned up debug output (Andrew)
* Avoided COMPILE_TEST division errors (kbuild)
* Various cleanups and extensions

Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: linux-rtc@vger.kernel.org
Cc: Roc He <hepeng@zidoo.tv>
Cc: 蒋丽琴 <jiang.liqin@geniatech.com>
Cc: devicetree@vger.kernel.org
Cc: Andrew Lunn <andrew@lunn.ch>

Andreas Färber (3):
  dt-bindings: rtc: Add Realtek RTD1295
  rtc: Add Realtek RTD1295
  arm64: dts: realtek: Add RTD1295 RTC node

 .../devicetree/bindings/rtc/realtek,rtd119x.txt    |  16 ++
 arch/arm64/boot/dts/realtek/rtd1295.dtsi           |   6 +
 drivers/rtc/Kconfig                                |   8 +
 drivers/rtc/Makefile                               |   1 +
 drivers/rtc/rtc-rtd119x.c                          | 242 +++++++++++++++++++++
 5 files changed, 273 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/realtek,rtd119x.txt
 create mode 100644 drivers/rtc/rtc-rtd119x.c

-- 
2.13.5

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

* [PATCH v4 1/3] dt-bindings: rtc: Add Realtek RTD1295
  2017-09-04 22:53 [PATCH v4 0/3] arm64: Realtek RTD1295 RTC Andreas Färber
@ 2017-09-04 22:53 ` Andreas Färber
       [not found] ` <20170904225324.29138-1-afaerber-l3A5Bk7waGM@public.gmane.org>
  2017-09-05  7:59 ` [PATCH v4 0/3] arm64: Realtek RTD1295 RTC Alexandre Belloni
  2 siblings, 0 replies; 6+ messages in thread
From: Andreas Färber @ 2017-09-04 22:53 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-kernel, Roc He, 蒋丽琴,
	Andreas Färber, Alessandro Zummo, Alexandre Belloni,
	Rob Herring, Mark Rutland, linux-rtc, devicetree

Add a binding for the RTC on the Realtek RTD119x/RTD129x SoC families.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 v1 -> v2 -> v3 -> v4: Unchanged
 
 .../devicetree/bindings/rtc/realtek,rtd119x.txt          | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/realtek,rtd119x.txt

diff --git a/Documentation/devicetree/bindings/rtc/realtek,rtd119x.txt b/Documentation/devicetree/bindings/rtc/realtek,rtd119x.txt
new file mode 100644
index 000000000000..bbf1ccb5df31
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/realtek,rtd119x.txt
@@ -0,0 +1,16 @@
+Realtek RTD129x Real-Time Clock
+===============================
+
+Required properties:
+- compatible :  Should be "realtek,rtd1295-rtc"
+- reg        :  Specifies the physical base address and size
+- clocks     :  Specifies the clock gate
+
+
+Example:
+
+	rtc@9801b600 {
+		compatible = "realtek,rtd1295-clk";
+		reg = <0x9801b600 0x100>;
+		clocks = <&clkc RTD1295_CLK_EN_MISC_RTC>;
+	};
-- 
2.13.5

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

* [PATCH v4 3/3] arm64: dts: realtek: Add RTD1295 RTC node
       [not found] ` <20170904225324.29138-1-afaerber-l3A5Bk7waGM@public.gmane.org>
@ 2017-09-04 22:53   ` Andreas Färber
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Färber @ 2017-09-04 22:53 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Roc He,
	蒋丽琴, Andreas Färber, Rob Herring,
	Mark Rutland, Catalin Marinas, Will Deacon,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Add RTC node to the Realtek RTD1295 Device Tree.

Signed-off-by: Andreas Färber <afaerber-l3A5Bk7waGM@public.gmane.org>
---
 v3 -> v4: Unchanged
 
 v2 -> v3:
 * Rebased to no longer depend on reset controller series
 
 v1 -> v2: Unchanged
 
 Depends on the pending clock bindings.
 
 arch/arm64/boot/dts/realtek/rtd1295.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/realtek/rtd1295.dtsi b/arch/arm64/boot/dts/realtek/rtd1295.dtsi
index ab72255f843f..fbbd6456079e 100644
--- a/arch/arm64/boot/dts/realtek/rtd1295.dtsi
+++ b/arch/arm64/boot/dts/realtek/rtd1295.dtsi
@@ -164,6 +164,12 @@
 			status = "disabled";
 		};
 
+		rtc@9801b600 {
+			compatible = "realtek,rtd1295-rtc";
+			reg = <0x9801b600 0x100>;
+			clocks = <&clkc RTD1295_CLK_EN_MISC_RTC>;
+		};
+
 		gic: interrupt-controller@ff011000 {
 			compatible = "arm,gic-400";
 			reg = <0xff011000 0x1000>,
-- 
2.13.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v4 0/3] arm64: Realtek RTD1295 RTC
  2017-09-04 22:53 [PATCH v4 0/3] arm64: Realtek RTD1295 RTC Andreas Färber
  2017-09-04 22:53 ` [PATCH v4 1/3] dt-bindings: rtc: Add Realtek RTD1295 Andreas Färber
       [not found] ` <20170904225324.29138-1-afaerber-l3A5Bk7waGM@public.gmane.org>
@ 2017-09-05  7:59 ` Alexandre Belloni
       [not found]   ` <20170905075900.wsroxyp6mzdzjclu-m++hUPXGwpdeoWH0uzbU5w@public.gmane.org>
  2 siblings, 1 reply; 6+ messages in thread
From: Alexandre Belloni @ 2017-09-05  7:59 UTC (permalink / raw)
  To: Andreas Färber
  Cc: linux-arm-kernel, linux-kernel, Roc He, 蒋丽琴,
	Alessandro Zummo, linux-rtc, devicetree, Andrew Lunn

On 05/09/2017 at 00:53:21 +0200, Andreas Färber wrote:
> Hello,
> 
> This series adds the RTC for the Realtek RTD1295 SoC.
> Based on my RTD1295 clk series.
> 
> There being no public source code for RTD1295, the implementation is based on
> register offsets seen in the vendor DT, as well as older mach-rtk119x code
> published by QNAP.
> 
> v4 adds a missing clk_put().
> 
> The DT node depends on the clk series for clock index and header.
> 
> More experimental patches at:
> https://github.com/afaerber/linux/commits/rtd1295-next
> 
> Have a lot of fun!
> 
> Cheers,
> Andreas
> 
> v3 -> v4:
> * Added clk_put() (Alexandre)
> 
> v2 -> v3:
> * Dropped spinlock (Andrew)
> * Improved year_days vs. days_in_year readability
> 
> v1 -> v2:
> * Updated rtc driver to no longer use open/release (Alexandre)
> * Cleaned up debug output (Andrew)
> * Avoided COMPILE_TEST division errors (kbuild)
> * Various cleanups and extensions
> 
> Cc: Alessandro Zummo <a.zummo@towertech.it>
> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> Cc: linux-rtc@vger.kernel.org
> Cc: Roc He <hepeng@zidoo.tv>
> Cc: 蒋丽琴 <jiang.liqin@geniatech.com>
> Cc: devicetree@vger.kernel.org
> Cc: Andrew Lunn <andrew@lunn.ch>
> 
> Andreas Färber (3):
>   dt-bindings: rtc: Add Realtek RTD1295
>   rtc: Add Realtek RTD1295
>   arm64: dts: realtek: Add RTD1295 RTC node
> 
>  .../devicetree/bindings/rtc/realtek,rtd119x.txt    |  16 ++
>  arch/arm64/boot/dts/realtek/rtd1295.dtsi           |   6 +
>  drivers/rtc/Kconfig                                |   8 +
>  drivers/rtc/Makefile                               |   1 +
>  drivers/rtc/rtc-rtd119x.c                          | 242 +++++++++++++++++++++
>  5 files changed, 273 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/rtc/realtek,rtd119x.txt
>  create mode 100644 drivers/rtc/rtc-rtd119x.c
> 
Applied, thanks.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* Re: [PATCH v4 0/3] arm64: Realtek RTD1295 RTC
       [not found]   ` <20170905075900.wsroxyp6mzdzjclu-m++hUPXGwpdeoWH0uzbU5w@public.gmane.org>
@ 2017-09-05  8:03     ` Andreas Färber
  2017-09-05  8:09       ` Alexandre Belloni
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Färber @ 2017-09-05  8:03 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Roc He,
	蒋丽琴, Alessandro Zummo,
	linux-rtc-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Andrew Lunn

Am 05.09.2017 um 09:59 schrieb Alexandre Belloni:
> On 05/09/2017 at 00:53:21 +0200, Andreas Färber wrote:
>> Hello,
>>
>> This series adds the RTC for the Realtek RTD1295 SoC.
>> Based on my RTD1295 clk series.
>>
>> There being no public source code for RTD1295, the implementation is based on
>> register offsets seen in the vendor DT, as well as older mach-rtk119x code
>> published by QNAP.
>>
>> v4 adds a missing clk_put().
>>
>> The DT node depends on the clk series for clock index and header.
>>
>> More experimental patches at:
>> https://github.com/afaerber/linux/commits/rtd1295-next
>>
>> Have a lot of fun!
>>
>> Cheers,
>> Andreas
>>
>> v3 -> v4:
>> * Added clk_put() (Alexandre)
>>
>> v2 -> v3:
>> * Dropped spinlock (Andrew)
>> * Improved year_days vs. days_in_year readability
>>
>> v1 -> v2:
>> * Updated rtc driver to no longer use open/release (Alexandre)
>> * Cleaned up debug output (Andrew)
>> * Avoided COMPILE_TEST division errors (kbuild)
>> * Various cleanups and extensions
>>
>> Cc: Alessandro Zummo <a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org>
>> Cc: Alexandre Belloni <alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
>> Cc: linux-rtc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> Cc: Roc He <hepeng-qoVzM6YEWSw@public.gmane.org>
>> Cc: 蒋丽琴 <jiang.liqin-31gW8twSeR21Z/+hSey0Gg@public.gmane.org>
>> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> Cc: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
>>
>> Andreas Färber (3):
>>   dt-bindings: rtc: Add Realtek RTD1295
>>   rtc: Add Realtek RTD1295
>>   arm64: dts: realtek: Add RTD1295 RTC node
>>
>>  .../devicetree/bindings/rtc/realtek,rtd119x.txt    |  16 ++
>>  arch/arm64/boot/dts/realtek/rtd1295.dtsi           |   6 +
>>  drivers/rtc/Kconfig                                |   8 +
>>  drivers/rtc/Makefile                               |   1 +
>>  drivers/rtc/rtc-rtd119x.c                          | 242 +++++++++++++++++++++
>>  5 files changed, 273 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/rtc/realtek,rtd119x.txt
>>  create mode 100644 drivers/rtc/rtc-rtd119x.c
>>
> Applied, thanks.

Err, I am hoping you only queued patches 1-2? Please do not queue patch
3, that needs to go through my tree as per the comments - it will not build.

Thanks,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v4 0/3] arm64: Realtek RTD1295 RTC
  2017-09-05  8:03     ` Andreas Färber
@ 2017-09-05  8:09       ` Alexandre Belloni
  0 siblings, 0 replies; 6+ messages in thread
From: Alexandre Belloni @ 2017-09-05  8:09 UTC (permalink / raw)
  To: Andreas Färber
  Cc: linux-arm-kernel, linux-kernel, Roc He, 蒋丽琴,
	Alessandro Zummo, linux-rtc, devicetree, Andrew Lunn

On 05/09/2017 at 10:03:58 +0200, Andreas Färber wrote:
> Am 05.09.2017 um 09:59 schrieb Alexandre Belloni:
> > On 05/09/2017 at 00:53:21 +0200, Andreas Färber wrote:
> >> Hello,
> >>
> >> This series adds the RTC for the Realtek RTD1295 SoC.
> >> Based on my RTD1295 clk series.
> >>
> >> There being no public source code for RTD1295, the implementation is based on
> >> register offsets seen in the vendor DT, as well as older mach-rtk119x code
> >> published by QNAP.
> >>
> >> v4 adds a missing clk_put().
> >>
> >> The DT node depends on the clk series for clock index and header.
> >>
> >> More experimental patches at:
> >> https://github.com/afaerber/linux/commits/rtd1295-next
> >>
> >> Have a lot of fun!
> >>
> >> Cheers,
> >> Andreas
> >>
> >> v3 -> v4:
> >> * Added clk_put() (Alexandre)
> >>
> >> v2 -> v3:
> >> * Dropped spinlock (Andrew)
> >> * Improved year_days vs. days_in_year readability
> >>
> >> v1 -> v2:
> >> * Updated rtc driver to no longer use open/release (Alexandre)
> >> * Cleaned up debug output (Andrew)
> >> * Avoided COMPILE_TEST division errors (kbuild)
> >> * Various cleanups and extensions
> >>
> >> Cc: Alessandro Zummo <a.zummo@towertech.it>
> >> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> >> Cc: linux-rtc@vger.kernel.org
> >> Cc: Roc He <hepeng@zidoo.tv>
> >> Cc: 蒋丽琴 <jiang.liqin@geniatech.com>
> >> Cc: devicetree@vger.kernel.org
> >> Cc: Andrew Lunn <andrew@lunn.ch>
> >>
> >> Andreas Färber (3):
> >>   dt-bindings: rtc: Add Realtek RTD1295
> >>   rtc: Add Realtek RTD1295
> >>   arm64: dts: realtek: Add RTD1295 RTC node
> >>
> >>  .../devicetree/bindings/rtc/realtek,rtd119x.txt    |  16 ++
> >>  arch/arm64/boot/dts/realtek/rtd1295.dtsi           |   6 +
> >>  drivers/rtc/Kconfig                                |   8 +
> >>  drivers/rtc/Makefile                               |   1 +
> >>  drivers/rtc/rtc-rtd119x.c                          | 242 +++++++++++++++++++++
> >>  5 files changed, 273 insertions(+)
> >>  create mode 100644 Documentation/devicetree/bindings/rtc/realtek,rtd119x.txt
> >>  create mode 100644 drivers/rtc/rtc-rtd119x.c
> >>
> > Applied, thanks.
> 
> Err, I am hoping you only queued patches 1-2? Please do not queue patch
> 3, that needs to go through my tree as per the comments - it will not build.
> 

Yes, I'm not taking DT patches through the RTC tree.
I didn't receive v4 of the DT patch that's why I forgot to clarify.


-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

end of thread, other threads:[~2017-09-05  8:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-04 22:53 [PATCH v4 0/3] arm64: Realtek RTD1295 RTC Andreas Färber
2017-09-04 22:53 ` [PATCH v4 1/3] dt-bindings: rtc: Add Realtek RTD1295 Andreas Färber
     [not found] ` <20170904225324.29138-1-afaerber-l3A5Bk7waGM@public.gmane.org>
2017-09-04 22:53   ` [PATCH v4 3/3] arm64: dts: realtek: Add RTD1295 RTC node Andreas Färber
2017-09-05  7:59 ` [PATCH v4 0/3] arm64: Realtek RTD1295 RTC Alexandre Belloni
     [not found]   ` <20170905075900.wsroxyp6mzdzjclu-m++hUPXGwpdeoWH0uzbU5w@public.gmane.org>
2017-09-05  8:03     ` Andreas Färber
2017-09-05  8:09       ` Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).