Real Time Clock of the Sophgo CV1800 SoC

Schema identifier ($id): "http://devicetree.org/schemas/rtc/sophgo,cv1800b-rtc.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

The RTC (Real Time Clock) is an independently powered module in the chip. It contains a 32KHz oscillator and a Power-On-Reset (POR) sub-module, which can be used for time display and scheduled alarm produce. In addition, the hardware state machine provides triggering and timing control for chip power-on, power-off and reset. Furthermore, the 8051 subsystem is located within RTCSYS and is independently powered. System software can use the 8051 to manage wake conditions and wake the system while the system is asleep, and communicate with external devices through peripheral controllers. Technical Reference Manual available at https://github.com/sophgo/sophgo-doc/tree/main/SG200X/TRM

Maintainers (maintainers): "sophgo@lists.linux.dev"

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): /schemas/rtc/rtc.yaml#

Properties and child nodes (properties) #

compatible — required here #

Array item rules (items) #

Item 1

Exact value (const): "sophgo,cv1800b-rtc"

Item 2

Exact value (const): "syscon"

reg — required here #

Maximum number of items (maxItems): 1

interrupts — required here #

Array item rules (items) #

Item 1

RTC Alarm

Item 2

RTC Longpress

Item 3

VBAT DET

interrupt-names — required here #

Array item rules (items) #

Item 1

Exact value (const): "alarm"

Item 2

Exact value (const): "longpress"

Item 3

Exact value (const): "vbat"

clocks — required here #

Array item rules (items) #

Item 1

RTC clock source

Item 2

DW8051 MCU clock source

clock-names — required here #

Array item rules (items) #

Item 1

Exact value (const): "rtc"

Item 2

Exact value (const): "mcu"

Required in this object (required): "compatible", "reg", "interrupts", "interrupt-names", "clocks", "clock-names"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/clock/sophgo,cv1800.h>
#include <dt-bindings/interrupt-controller/irq.h>

rtc@5025000 {
    compatible = "sophgo,cv1800b-rtc", "syscon";
    reg = <0x5025000 0x2000>;
    interrupts = <17 IRQ_TYPE_LEVEL_HIGH>,
                 <18 IRQ_TYPE_LEVEL_HIGH>,
                 <19 IRQ_TYPE_LEVEL_HIGH>;
    interrupt-names = "alarm", "longpress", "vbat";
    clocks = <&clk CLK_RTC_25M>,
             <&clk CLK_SRC_RTC_SYS_0>;
    clock-names = "rtc", "mcu";
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Edit this page