TJCUT
December 13, 2022, 1:47am
1
Hello,
Our board has an RTC chip. (Isl1208)
I defined with the following content, but it is not called.
rtc.diff (2.0 KB)
Module : NANO emmc
Jetpack : 4.6
soruce : kernel/kernel-4.9/arch/arm64/configs/tegra_defconfig
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc1"
CONFIG_RTC_BACKUP_HCTOSYS_DEVICE="rtc0"
CONFIG_RTC_DRV_ISL1208=m
# CONFIG_RTC_DRV_MAX77686=y
# CONFIG_RTC_DRV_RX8025=y
source: kernel/kernel-4.9/drivers/rtc/rtc-isl1208.c
static int
isl1208_probe(struct i2c_client *client, const struct i2c_device_id *id)
{
int rc = 0;
struct rtc_device *rtc;
printk("[%s:%d]\n", __func__, __LINE__);
if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
return -ENODEV;
source: hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-camera-rbpcv2-imx219.dtsi
GEN_I2C2: i2c@7000c400 {
isl1208: rtc@6f {
compatible = "isil, isl1208";
reg = <0x6f>;
status = "okay";
interrupt-names = "irq";
// interrupts-extended = <&gpio1 12 IRQ_TYPE_EDGE_FALLING>,
// <&gpio2 24 IRQ_TYPE_EDGE_FALLING>;
interrupts = <TEGRA_GPIO(C, 4) GPIO_ACTIVE_LOW>;
};
};
And check the following:
# insmod /lib/modules/4.9.253-tegra/kernel/drivers/rtc/rtc-isl1208.ko
root@linux:/home/nvidia# lsmod
Module Size Used by
rtc_isl1208 11535 0
root@linux:/home/nvidia# dmesg | grep 1208
root@linux:/home/nvidia#
However, no message is output.
Any extras to probe the RTC driver?
Does the /dev/rtc* generated?
default have rtc0/rtc1 it could be rtc2 if probe successfully.
TJCUT
December 13, 2022, 7:46am
4
It is verified as follows.
root@linux:/home/nvidia# ls -al /dev/rtc*
lrwxrwxrwx 1 root root 4 Jul 21 2021 /dev/rtc -> rtc1
crw------- 1 root root 252, 1 Jul 21 2021 /dev/rtc1
root@linux:/home/nvidia# lsmod
Module Size Used by
rtc_isl1208 11535 0
root@linux:/home/nvidia# dmesg | grep rtc
[ 0.592263] vdd-rtc: 850 <--> 1100 mV at 1000 mV
[ 0.627855] camchar: rtcpu character device driver loaded
[ 1.181742] rtc rtc1: alarm rtc device
[ 1.181767] tegra_rtc 7000e000.rtc: rtc core: registered 7000e000.rtc as rtc1
[ 1.181801] tegra_rtc 7000e000.rtc: Tegra internal Real Time Clock
[ 1.369752] hctosys: /home/nvidia/work/NANO/eeprom_4.6/public_release/kernel/kernel-4.9/drivers/rtc/hctosys.c: Ignoring backup rtc device (rtc0)
[ 1.370022] tegra_rtc 7000e000.rtc: setting system clock to 1970-01-01 00:00:10 UTC (10)
root@linux:/home/nvidia#
root@linux:/home/nvidia# dmesg | grep isl1208
root@linux:/home/nvidia#
But no isl1208.
For reference, our board was configured like this:
Can’t you just change tegra_rtc to isl1208 rtc?
You can disable tegra RTC but that couldn’t help on it.
It’s could be device tree problem due to the probe() function didn’t call.
Maybe dump the device tree to confirm.
TJCUT
December 13, 2022, 8:39am
6
I defined isl1208 in dts as:
GEN_I2C2: i2c@7000c400 {
isl1208: rtc@6f {
compatible = "isil, isl1208";
reg = <0x6f>;
status = "okay";
interrupt-names = "irq";
// interrupts-extended = <&gpio1 12 IRQ_TYPE_EDGE_FALLING>,
// <&gpio2 24 IRQ_TYPE_EDGE_FALLING>;
interrupts = <TEGRA_GPIO(C, 4) GPIO_ACTIVE_LOW>;
};
};
tegra210-camera-rbpcv2-imx219.dtsi (14.4 KB)
I don’t know where to add it.
So I added imx219 dts.
I reviewed the built dtb file.
f.dts (318.7 KB)
However, isl1208 was not detected.
Can you guide me on how to add isl1208?
Add to tegra210-porg-super-module-e2614.dtsi to try.
Thanks
1 Like
TJCUT
December 14, 2022, 12:34am
8
Hello, ShaneCCC
Thanks, it’s OK.
hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-super-module-e2614.dtsi
i2c@7000c400 {
isl1208: rtc@6f {
compatible = "isil,isl1208";
reg = <0x6f>;
status = "okay";
interrupts = <TEGRA_GPIO(C, 4) GPIO_ACTIVE_LOW>;
};
e2614_i2c_mux: i2cmux@70 {
...
root@linux:/home/nvidia# dmesg | grep 1208
[ 1.179460] rtc-isl1208 1-006f: [isl1208_probe:628]
system
Closed
January 4, 2023, 12:53am
10
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.