你好
我使用PCF8563为AM625提供外部RTC,使用了I2C0,设备树配置如下
main_i2c0_pins_default: main-i2c0-pins-default { pinctrl-single,pins = < AM62X_IOPAD(0x1e0, PIN_INPUT_PULLUP, 0) /* (B16) I2C0_SCL */ AM62X_IOPAD(0x1e4, PIN_INPUT_PULLUP, 0) /* (A16) I2C0_SDA */ >; }; &main_i2c0 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&main_i2c0_pins_default>; clock-frequency = <400000>; pcf8563:rtc@51{ compatible = "nxp,pcf8563"; reg = <0x51>; status = "okay"; }; };
我想使用hwclock来查看时,会一直提示 hwclock: ioctl(RTC_RD_TIME) to /dev/rtc0 to read the time failed: Invalid argument
内核启动时提示:
[ 7.811184] rtc-pcf8563 2-0051: registered as rtc0
[ 7.816563] rtc-pcf8563 2-0051: hctosys: unable to read the hardware clock
尝试使用hwclock -w 写入,但写入后还是如此的错误。