diff mbox series

[V2,6/7] MIPS: Loongson64: DTS: Add RTC support to Loongson-2K

Message ID 8be1bf437f5407c54a93e7be2c6303d0eb6eeb83.1673227292.git.zhoubinbin@loongson.cn (mailing list archive)
State Superseded
Headers show
Series rtc: ls2x: Add support for the Loongson-2K/LS7A RTC | expand

Commit Message

Binbin Zhou Jan. 9, 2023, 1:36 a.m. UTC
The Loongson-2K RTC module is now supported, enable it.

The MMIO address is unclear from the Loongson 2K1000 user manual, I took
it from Loongson's out-of-tree fork of Linux 4.19.

Signed-off-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
---
 arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Jiaxun Yang Jan. 11, 2023, 4:47 p.m. UTC | #1
在2023年1月9日一月 上午1:36,Binbin Zhou写道:
> The Loongson-2K RTC module is now supported, enable it.
>
> The MMIO address is unclear from the Loongson 2K1000 user manual, I took
> it from Loongson's out-of-tree fork of Linux 4.19.

Can confirm this MMIO address is correct. It matches current confbus BAR
setting by PMON.

>
> Signed-off-by: WANG Xuerui <git@xen0n.name>
> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>

Acked-by: Jiaxun Yang <jiaxun.yang@flygoat.com>


> ---
>  arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi 
> b/arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi
> index 8143a61111e3..c22414595140 100644
> --- a/arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi
> +++ b/arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi
> @@ -57,6 +57,13 @@ pm: reset-controller@1fe07000 {
>  			reg = <0 0x1fe07000 0 0x422>;
>  		};
> 
> +		rtc0: rtc@1fe07800 {
> +			compatible = "loongson,ls2x-rtc";
> +			reg = <0 0x1fe07800 0 0x78>;
> +			interrupt-parent = <&liointc0>;
> +			interrupts = <60 IRQ_TYPE_LEVEL_LOW>;
> +		};
> +
>  		liointc0: interrupt-controller@1fe11400 {
>  			compatible = "loongson,liointc-2.0";
>  			reg = <0 0x1fe11400 0 0x40>,
> -- 
> 2.31.1
diff mbox series

Patch

diff --git a/arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi b/arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi
index 8143a61111e3..c22414595140 100644
--- a/arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi
+++ b/arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi
@@ -57,6 +57,13 @@  pm: reset-controller@1fe07000 {
 			reg = <0 0x1fe07000 0 0x422>;
 		};
 
+		rtc0: rtc@1fe07800 {
+			compatible = "loongson,ls2x-rtc";
+			reg = <0 0x1fe07800 0 0x78>;
+			interrupt-parent = <&liointc0>;
+			interrupts = <60 IRQ_TYPE_LEVEL_LOW>;
+		};
+
 		liointc0: interrupt-controller@1fe11400 {
 			compatible = "loongson,liointc-2.0";
 			reg = <0 0x1fe11400 0 0x40>,