From nobody Mon Feb 21 11:46:41 2022 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 37EF219D6267 for ; Mon, 21 Feb 2022 11:46:54 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K2LB533dfz3C6c for ; Mon, 21 Feb 2022 11:46:53 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: by mail-ed1-x529.google.com with SMTP id s14so11402791edw.0 for ; Mon, 21 Feb 2022 03:46:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mJ4tACieHCPUmPLhv61IyWGuQYA1EUNsYN1av+fLguQ=; b=FJg2dFIXAv7ImxcG7lHX5uDGRsDwwtDFR1uxCUoHsTqLr1wMrQK6q+EvVeqXM19pod UXmi/+LsuWPSGf1lGaS0s6W87u1aYfng9QWPeaLAMTBCbA9IlTfCAVrscTHfbvf8kuZR hFaESjTxAQPVEXHk94r971FLFxy04SzO7Xnp+2k51U+AW2IQgWnW36SMuOctUd836uaM sAQy0ktZr4GudoSQ8KR03dfNrs8aabTa4DzcCsb6zSuKBn03WH+P+Lk3VrpQJUc/w+Wm 0WggS+2ijaRJpIqCdODUir3w84k2QLPEuoaASqFQBM3kKlweck6WURA53SNiAU9cxBiI 4UAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mJ4tACieHCPUmPLhv61IyWGuQYA1EUNsYN1av+fLguQ=; b=WCqdgfK3LwgWH0d71RtXO2bWZG4o/4u7NqsfrKnVAiRofO9nH5ZetxWOHIL48EsC2D hhK4Zb5mtCAaNQr4mGddm/HhU3bPPRhi9JwJcvaZWBgT2VRMVQMc3Le+RsOe4MfuB1bU zEf6jWWh7swbQwi+E17ykZc4h/uHZpnOhLPe7SUhG7HRB3LFKUm4IIFKurgBgCTc+cjL q0xDeMDYbAtYFYkzCUx+O6AfFbKlYbD01jGaQp+sdNU3HjnRqNmAaKqz5RYzuj7KJLcC ya9PUkbH4BwX6RPqwm46IMoZSLu8H7IO/AwAgcK9g/1c139y5bmnFVQ9c12YFat61tE/ BEkw== X-Gm-Message-State: AOAM5302INhM/qx32cxVEU/o1imHOXaebTFK0pAqccoyfVKPk3IxJb9d FoSbjkPeYQB4B8dBHfFrwepa+W18pv3PCJF//HHQyXBg/Y0= X-Google-Smtp-Source: ABdhPJyzLXzB35qEJUmesJOJ7xs7nzYRt+oc+81wcBZq+UYibUSHkCMXmMEawKQAyj+wpk7FkHhl0VC/U2n1Ew8b7tg= X-Received: by 2002:a50:9ea2:0:b0:409:5438:debf with SMTP id a31-20020a509ea2000000b004095438debfmr20862975edf.126.1645444012383; Mon, 21 Feb 2022 03:46:52 -0800 (PST) List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 References: <2DF482A7-FEFC-4833-A16B-A7A01B8713DD@dons.net.au> <94C3A304-B821-4885-A50D-32BD1FBED43D@dons.net.au> <76D58677-D12C-4F0D-A0E0-F28E300FE39B@dons.net.au> <6C023EE9-E5E9-4C2B-B715-97317B6370A7@dons.net.au> In-Reply-To: <6C023EE9-E5E9-4C2B-B715-97317B6370A7@dons.net.au> From: Archimedes Gaviola Date: Mon, 21 Feb 2022 19:46:41 +0800 Message-ID: Subject: Re: DS3231 RTC module not detected To: "Daniel O'Connor" Cc: freebsd-arm@freebsd.org Content-Type: multipart/alternative; boundary="000000000000db229305d885c9fd" X-Rspamd-Queue-Id: 4K2LB533dfz3C6c X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=FJg2dFIX; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of archimedesgaviola@gmail.com designates 2a00:1450:4864:20::529 as permitted sender) smtp.mailfrom=archimedesgaviola@gmail.com X-Spamd-Result: default: False [-3.99 / 15.00]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MID_RHS_MATCH_FROMTLD(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.99)[-0.993]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::529:from]; MLMMJ_DEST(0.00)[freebsd-arm]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --000000000000db229305d885c9fd Content-Type: text/plain; charset="UTF-8" On Mon, Feb 21, 2022 at 7:29 PM Daniel O'Connor 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


=
On Mon, Feb 21, 2022 at 7:29 PM Danie= l 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 cus= tomizing the GENERIC kernel here

No I didn't realise it was necessary :)

=
Yes it is :-)
=C2=A0

>
https://lists.freebsd.o= rg/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 you= r kernel (I assume it's still the GENERIC otherwise use your existing c= onfig),
>
> include=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0GENERIC
> ident=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0GENERIC-PI
> nooptions=C2=A0 =C2=A0 =C2=A0SOC_NVIDIA_TEGRA210
>
> 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.
>
> This is the way I do it with my ds3231 driver, hope you will get the s= ame result.

Thanks.


You're welco= me.
=C2=A0

I chatted to some people on IRC and I think it's fixed in a later versi= on anyway with these commits:
https://cgit.freeb= sd.org/src/commit/?id=3D1bd3e8ba696633ccd7525030d951b58ade167814
https://cgit.freeb= sd.org/src/commit/?id=3Da534b50e245d801af887d91b5d48ebcf120aa039


Wow, this is good news...
=C2=A0
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--