Found it! Just needed to add another alias in the DTS file:

rtc2 = "/ocp/i2c@44e0b000/rtc@68";

and afterwards, my Cape's RTC is used:

debian@bbgg:~$ dmesg | grep rtc
[    1.067904] omap_rtc 44e3e000.rtc: already running
[    1.068392] omap_rtc 44e3e000.rtc: registered as rtc1
[    1.132459] rtc-ds1307 0-0068: registered as rtc2
[    1.172017] rtc-pcf2127-i2c 1-0051: rtc core: registered rtc-pcf2127-i2c 
as rtc0
[    1.178840] rtc-pcf2127-i2c 1-0051: setting system clock to 2020-09-27 
07:40:07 UTC (1601192407)


A sexta-feira, 25 de setembro de 2020 à(s) 18:42:26 UTC+1, 
[email protected] escreveu:

> Hi,
>
> I have a custom Cape that has a PCF2129 RTC chip.
> I've set a device tree overlay like this:
>
> &{/} {
> aliases {
> rtc0 = &extrtc;
> rtc1 = "/ocp/rtc@44e3e000";
> };
> };
>
> &i2c1 {
> extrtc: pcf2129@51 {
> compatible = "nxp,pcf2129";
> reg = <0x51>;
> };
> }
>
> and this setup works fine in a BB Green Wireless:
>
> debian@bbgw:~$ dmesg | grep rtc
> [    1.032100] omap_rtc 44e3e000.rtc: already running
> [    1.032598] omap_rtc 44e3e000.rtc: registered as rtc1
> [    1.133896] rtc-pcf2127-i2c 1-0051: rtc core: registered 
> rtc-pcf2127-i2c as rtc0
> [    1.140557] rtc-pcf2127-i2c 1-0051: setting system clock to 2020-09-25 
> 15:27:03 UTC (1601047623)
>
> Nevertheless, trying to use that Cape in a BB Green Gateway (that has 
> another RTC builtin), I'm unable to set the Cape's RTC as default, because 
> it's set as rtc2, instead of rtc0 (using the same overlay file):
>
>  debian@bbgg:~$ dmesg | grep rtc
> [    1.084958] omap_rtc 44e3e000.rtc: already running
> [    1.085461] omap_rtc 44e3e000.rtc: registered as rtc1
> [    1.152108] rtc-ds1307 0-0068: registered as rtc0
> [    1.187459] rtc-pcf2127-i2c 1-0051: oscillator stop detected, date/time 
> is not reliable
> [    1.187691] rtc-pcf2127-i2c 1-0051: rtc core: registered 
> rtc-pcf2127-i2c as rtc2
> [    1.194605] rtc-ds1307 0-0068: setting system clock to 2020-09-25 
> 17:23:30 UTC (1601054610)
>
> Is there any way that I could setup my Cape's DTS file in order the Cape's 
> RTC is used  on a BB Green Gateway?
>
> Best regards,
> José Gonçalves
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/e8a6c304-1904-4fa3-b95f-8d4cb8040535n%40googlegroups.com.

Reply via email to