Date: Mon, 21 Feb 2022 19:46:41 +0800 From: Archimedes Gaviola <archimedes.gaviola@gmail.com> To: "Daniel O'Connor" <darius@dons.net.au> Cc: freebsd-arm@freebsd.org Subject: Re: DS3231 RTC module not detected Message-ID: <CAJFbk7FVOjg0zP-WKhKP3ANeGrOiUsEt_9YqGQX2V2inQ16tdg@mail.gmail.com> In-Reply-To: <6C023EE9-E5E9-4C2B-B715-97317B6370A7@dons.net.au> References: <CAJFbk7EtkjnFBJgr-L3faxaQ2saNgEQ%2BLRPWbRySpwY8wJRh=Q@mail.gmail.com> <F2EFEDCC-1E00-4221-8AF9-3744A7AC359C@dons.net.au> <CAJFbk7Ed2R8M2xAkJQAjiivZie=8Ca_Rt50YEG4P3yWzQLQhrg@mail.gmail.com> <2DF482A7-FEFC-4833-A16B-A7A01B8713DD@dons.net.au> <CAJFbk7GRjq-MheWRhVN1TkLOkAiYx5_NH6K%2B3umN0SMjExyB8Q@mail.gmail.com> <94C3A304-B821-4885-A50D-32BD1FBED43D@dons.net.au> <CAJFbk7F7HvJGrf2UJn6hQ-PqfWKmttWLzqmqKHLfHGkJKS=kgg@mail.gmail.com> <76D58677-D12C-4F0D-A0E0-F28E300FE39B@dons.net.au> <CAJFbk7HdJDSNU0R1nNNMJsOePLpRb2=q9%2BOJOBTB8Boe6Ba6Ow@mail.gmail.com> <6C023EE9-E5E9-4C2B-B715-97317B6370A7@dons.net.au>
next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000db229305d885c9fd Content-Type: text/plain; charset="UTF-8" On Mon, Feb 21, 2022 at 7:29 PM Daniel O'Connor <darius@dons.net.au> wrote: > > > > On 21 Feb 2022, at 21:50, Archimedes Gaviola < > archimedes.gaviola@gmail.com> wrote: > > Did you re-compile your kernel? Brian has shared his resolution on > customizing the GENERIC kernel here > > No I didn't realise it was necessary :) > Yes it is :-) > > > https://lists.freebsd.org/archives/freebsd-arm/2022-February/001024.html > which allows to free-up the i2c address 0x68 which by default is being used > by the MAX77620 RTC driver from the SOC_NVIDIA_TEGRA210. So, you need to > add these lines in your kernel (I assume it's still the GENERIC otherwise > use your existing config), > > > > include GENERIC > > ident GENERIC-PI > > nooptions SOC_NVIDIA_TEGRA210 > > > > and then recompile. Keep your /boot/msdos/config.txt and > /boot/msdos/overlays/ds1307.dtbo files intact. After recompiling and > rebooting, you can check the dmesg if the ds1307 driver is loaded, > otherwise invoke "kldload ds1307" and see if it's detected. Add a line into > your /boot/loader.conf with ds1307_enable="YES" if necessary. Lastly, > kindly backup your data before recompiling for safety. > > > > This is the way I do it with my ds3231 driver, hope you will get the > same result. > > Thanks. > You're welcome. > > I chatted to some people on IRC and I think it's fixed in a later version > anyway with these commits: > > https://cgit.freebsd.org/src/commit/?id=1bd3e8ba696633ccd7525030d951b58ade167814 > > https://cgit.freebsd.org/src/commit/?id=a534b50e245d801af887d91b5d48ebcf120aa039 > > Wow, this is good news... > Although I have not been brave enough to update to HEAD and try it yet :) > Yeah, better to wait than meet a lot of surprises with HEAD :-) --000000000000db229305d885c9fd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Mon, Feb 21, 2022 at 7:29 PM Danie= l O'Connor <<a href=3D"mailto:darius@dons.net.au">darius@dons.net.au= </a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:= 0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">= <br> <br> > On 21 Feb 2022, at 21:50, Archimedes Gaviola <<a href=3D"mailto:arc= himedes.gaviola@gmail.com" target=3D"_blank">archimedes.gaviola@gmail.com</= a>> wrote:<br> > Did you re-compile your kernel? Brian has shared his resolution on cus= tomizing the GENERIC kernel here <br> <br> No I didn't realise it was necessary :)<br></blockquote><div><br></div>= <div>Yes it is :-)</div><div>=C2=A0<br></div><blockquote class=3D"gmail_quo= te" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204= );padding-left:1ex"> <br> > <a href=3D"https://lists.freebsd.org/archives/freebsd-arm/2022-Februar= y/001024.html" rel=3D"noreferrer" target=3D"_blank">https://lists.freebsd.o= rg/archives/freebsd-arm/2022-February/001024.html</a> which allows to free-= up the i2c address 0x68 which by default is being used by the MAX77620 RTC = driver from the SOC_NVIDIA_TEGRA210. So, you need to add these lines in you= r kernel (I assume it's still the GENERIC otherwise use your existing c= onfig),<br> > <br> > include=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0GENERIC<br> > ident=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0GENERIC-PI<br> > nooptions=C2=A0 =C2=A0 =C2=A0SOC_NVIDIA_TEGRA210<br> > <br> > and then recompile. Keep your /boot/msdos/config.txt and /boot/msdos/o= verlays/ds1307.dtbo files intact. After recompiling and rebooting, you can = check the dmesg if the ds1307 driver is loaded, otherwise invoke "kldl= oad ds1307" and see if it's detected. Add a line into your /boot/l= oader.conf with ds1307_enable=3D"YES" if necessary. Lastly, kindl= y backup your data before recompiling for safety.<br> > <br> > This is the way I do it with my ds3231 driver, hope you will get the s= ame result.<br> <br> Thanks.<br></blockquote><div><br></div><div><br></div><div>You're welco= me.<br></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"ma= rgin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:= 1ex"> <br> I chatted to some people on IRC and I think it's fixed in a later versi= on anyway with these commits:<br> <a href=3D"https://cgit.freebsd.org/src/commit/?id=3D1bd3e8ba696633ccd75250= 30d951b58ade167814" rel=3D"noreferrer" target=3D"_blank">https://cgit.freeb= sd.org/src/commit/?id=3D1bd3e8ba696633ccd7525030d951b58ade167814</a><br> <a href=3D"https://cgit.freebsd.org/src/commit/?id=3Da534b50e245d801af887d9= 1b5d48ebcf120aa039" rel=3D"noreferrer" target=3D"_blank">https://cgit.freeb= sd.org/src/commit/?id=3Da534b50e245d801af887d91b5d48ebcf120aa039</a><br> <br></blockquote><div><br></div><div>Wow, this is good news...<br></div><di= v>=C2=A0<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px= 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> Although I have not been brave enough to update to HEAD and try it yet :)<b= r></blockquote></div><div class=3D"gmail_quote"><br></div><div class=3D"gma= il_quote">Yeah, better to wait than meet a lot of surprises with HEAD :-)<b= r></div></div> --000000000000db229305d885c9fd--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJFbk7FVOjg0zP-WKhKP3ANeGrOiUsEt_9YqGQX2V2inQ16tdg>