Skip to content

Commit 7651742

Browse files
qiujingbaoinochisa
authored andcommitted
dt-bindings: soc: sophgo: add RTC support for Sophgo CV1800 series
Add RTC devicetree binding for Sophgo CV1800 series SoC. The device is called RTC, but contains control registers of other HW blocks in its address space, most notably of Power-on-Reset (PoR) module, DW8051 IP (MCU core), accompanying SRAM, hence putting it in SoC subsystem. Signed-off-by: Jingbao Qiu <[email protected]> Signed-off-by: Alexander Sverdlin <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Inochi Amaoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Inochi Amaoto <[email protected]> Signed-off-by: Chen Wang <[email protected]> Signed-off-by: Chen Wang <[email protected]>
1 parent f18198c commit 7651742

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/sophgo/sophgo,cv1800b-rtc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Real Time Clock of the Sophgo CV1800 SoC
8+
9+
description:
10+
The RTC (Real Time Clock) is an independently powered module in the chip. It
11+
contains a 32KHz oscillator and a Power-On-Reset (POR) sub-module, which can
12+
be used for time display and scheduled alarm produce. In addition, the
13+
hardware state machine provides triggering and timing control for chip
14+
power-on, power-off and reset.
15+
16+
Furthermore, the 8051 subsystem is located within RTCSYS and is independently
17+
powered. System software can use the 8051 to manage wake conditions and wake
18+
the system while the system is asleep, and communicate with external devices
19+
through peripheral controllers.
20+
21+
Technical Reference Manual available at
22+
https://github.com/sophgo/sophgo-doc/tree/main/SG200X/TRM
23+
24+
maintainers:
25+
26+
27+
allOf:
28+
- $ref: /schemas/rtc/rtc.yaml#
29+
30+
properties:
31+
compatible:
32+
items:
33+
- const: sophgo,cv1800b-rtc
34+
- const: syscon
35+
36+
reg:
37+
maxItems: 1
38+
39+
interrupts:
40+
items:
41+
- description: RTC Alarm
42+
- description: RTC Longpress
43+
- description: VBAT DET
44+
45+
interrupt-names:
46+
items:
47+
- const: alarm
48+
- const: longpress
49+
- const: vbat
50+
51+
clocks:
52+
items:
53+
- description: RTC clock source
54+
- description: DW8051 MCU clock source
55+
56+
clock-names:
57+
items:
58+
- const: rtc
59+
- const: mcu
60+
61+
required:
62+
- compatible
63+
- reg
64+
- interrupts
65+
- interrupt-names
66+
- clocks
67+
- clock-names
68+
69+
unevaluatedProperties: false
70+
71+
examples:
72+
- |
73+
#include <dt-bindings/clock/sophgo,cv1800.h>
74+
#include <dt-bindings/interrupt-controller/irq.h>
75+
76+
rtc@5025000 {
77+
compatible = "sophgo,cv1800b-rtc", "syscon";
78+
reg = <0x5025000 0x2000>;
79+
interrupts = <17 IRQ_TYPE_LEVEL_HIGH>,
80+
<18 IRQ_TYPE_LEVEL_HIGH>,
81+
<19 IRQ_TYPE_LEVEL_HIGH>;
82+
interrupt-names = "alarm", "longpress", "vbat";
83+
clocks = <&clk CLK_RTC_25M>,
84+
<&clk CLK_SRC_RTC_SYS_0>;
85+
clock-names = "rtc", "mcu";
86+
};

0 commit comments

Comments
 (0)