PHYTEC
Page 34
&i2c1 {
[…]
eeprom: m24c32@51 {
compatible = "atmel,24c32";
reg = <0x51>;
pagesize = <32>;
status = "okay";
};
eeprom_id: m24c32@59 {
compatible = "atmel,24c32";
reg = <0x59>;
pagesize = <32>;
status = "okay";
};
};
[…]
The ID page at address 0x59 of the EEPROM is reserved for factory use. Information about the module configuration will be stored here in the future.
RTC
RTCs can be accessed via
. Because PHYTEC boards have often more than one RTC, there might be more than one RTC device file.
/dev/rtc*
To find the name of the RTC device, you can read its
entry with:
sysfs
target$ cat /sys/class/rtc/rtc*/name
You will get, for example:
rtc-rv3028 0-0052
snvs_rtc 30370000.snvs:snvs-rtc-lp
Date and time can be manipulated with the
tool, using the
(systohc) and (hctosys) options. To set the date, first, use
and then run
hwclock
-w
-s
date
hwclo
to store the new date into the RTC. For more information about this tool, refer to the manpage of
.
ck -w -u
hwclock
DT representation for I²C RTCs: imx8mp-phycore-som.dtsi:
Tip
This will list all RTCs including the non-I²C RTCs. Linux assigns RTC device IDs based on the device tree/aliases entries if present.