Device Tree Configuration

All the RTC device tree source code is listed under the rtc node of jh7110.dtsi.

The following shows more details.
        rtc: rtc@17040000 {
            compatible = "starfive,rtc_hms";
            reg = <0x0 0x17040000 0x0 0x10000>;
            interrupts = <10>, <11>, <12>;
            interrupt-names = "rtc_ms_pulse", "rtc_sec_pulse", "rtc";
            clocks = <&clkgen JH7110_RTC_HMS_CLK_APB>,
                     <&clkgen JH7110_RTC_HMS_CLK_CAL>;
            clock-names = "pclk", "cal_clk";
            resets = <&rstgen RSTN_U0_RTC_HMS_APB>,
                     <&rstgen RSTN_U0_RTC_HMS_CAL>,
                     <&rstgen RSTN_U0_RTC_HMS_OSC32K>;
            reset-names = "rst_apb", "rst_cal", "rst_osc";
            rtc,cal-clock-freq = <1000000>;
            status = "okay";
        };
The following list provides explanations for the parameters included in the above code block.
  • compatible: Compatibility information, used to associate the driver and its target device.
  • reg: Register base address "0x17040000" and range "0x10000".
  • interrupts: Hardware interrupt ID.
  • interrupt-names: Hardware interrupt names.
  • clocks: The clocks used by the RTC module.
  • clock-names: The names of the above clocks.
  • resets: The reset signals used by the RTC module.
  • reset-names: The names of the above reset signals.
  • cal-clock-freq: The work frequency of the clock calibration.
  • status: The work status of the RTC module. To enable the module, set this bit as "okay" or to disable the module, set this bit as "disabled".