Device Tree Configuration

Due to the RTC device being mounted on the I2C bus, the RTC device tree node should be added to the I2C device node. The I2C device address of AT8563 RTC is 0×51. The following is the RTC device tree source code:
    rtc@51 {
        compatible = "nxp,pcf8563";
        reg = <0x51>;
    };
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: The I2C device address of RTC is "0×51".