1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/rtc/sophgo,cv1800b-rtc.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Real Time Clock of the Sophgo CV1800 SoC 8 9description: 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 24maintainers: 25 - sophgo@lists.linux.dev 26 27allOf: 28 - $ref: /schemas/rtc/rtc.yaml# 29 30properties: 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 61required: 62 - compatible 63 - reg 64 - interrupts 65 - interrupt-names 66 - clocks 67 - clock-names 68 69unevaluatedProperties: false 70 71examples: 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 }; 87