From nobody Mon Feb 21 11:28:45 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 B4FB119D1850 for ; Mon, 21 Feb 2022 11:29:10 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from midget.dons.net.au (2403-5800-5200-4700-225-90ff-fe47-39b4.ip6.aussiebb.net [IPv6:2403:5800:5200:4700:225:90ff:fe47:39b4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "dons.net.au", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K2Knc4f6dz4rBj for ; Mon, 21 Feb 2022 11:29:08 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from midget.dons.net.au (localhost [127.0.0.1]) by midget.dons.net.au (8.17.1/8.16.1) with ESMTPS id 21LBSu0g028537 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Mon, 21 Feb 2022 21:58:56 +1030 (ACDT) (envelope-from darius@dons.net.au) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dons.net.au; s=default; t=1645442940; bh=d6OaIhjVVOJroBJqnhZV+pnLqWFKPCe8aa8RRC4a79w=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=IxRQDsYErV0hYJ+13NBZzQf7au4csRgFiDxI9Ttyck5BLphny4H8UJ7hc055NrlsX 58Pd+TKltaTAVjcIchNVZ5T/7XqqWe23fed9dMl2JqJtBQMvnM0BXN0jc5I1+U102h U5gDj1aK/EH6MuerZpw+RSnvaTpcBhtS/RezVpfE= Received: (from mailnull@localhost) by midget.dons.net.au (8.17.1/8.16.1/Submit) id 21LBSkoF028527 for ; Mon, 21 Feb 2022 21:58:46 +1030 (ACDT) (envelope-from darius@dons.net.au) X-MIMEDefang-Relay-0ce1a11234c790b6ab6410cd70c6fdb820520472: 2403:5800:5200:4700:9ff:9026:de6b:58bc Received: from smtpclient.apple (2403-5800-5200-4700-9ff-9026-de6b-58bc.ip6.aussiebb.net [2403:5800:5200:4700:9ff:9026:de6b:58bc]) by 2403-5800-5200-4700-225-90ff-fe47-39b4.ip6.aussiebb.net (envelope-sender ) (MIMEDefang) with ESMTP id 21LBSkHZ028522; Mon, 21 Feb 2022 21:58:46 +1030 Content-Type: text/plain; charset=us-ascii 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 (Mac OS X Mail 15.0 \(3693.40.0.1.81\)) Subject: Re: DS3231 RTC module not detected From: "Daniel O'Connor" In-Reply-To: Date: Mon, 21 Feb 2022 21:58:45 +1030 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <6C023EE9-E5E9-4C2B-B715-97317B6370A7@dons.net.au> 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> To: Archimedes Gaviola X-Mailer: Apple Mail (2.3693.40.0.1.81) X-Spam-Score: 0.6 () No, score=0.6 required=5.0 tests=KHOP_HELO_FCRDNS, PDS_RDNS_DYNAMIC_FP,RDNS_DYNAMIC,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.5 X-Scanned-By: MIMEDefang 2.83 on 10.0.2.1 X-Rspamd-Queue-Id: 4K2Knc4f6dz4rBj X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=dons.net.au header.s=default header.b=IxRQDsYE; dmarc=pass (policy=quarantine) header.from=dons.net.au; spf=pass (mx1.freebsd.org: domain of darius@dons.net.au designates 2403:5800:5200:4700:225:90ff:fe47:39b4 as permitted sender) smtp.mailfrom=darius@dons.net.au X-Spamd-Result: default: False [-3.50 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[dons.net.au:s=default]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+mx]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[dons.net.au:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[dons.net.au,quarantine]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-arm]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:4764, ipnet:2403:5800:5000::/36, country:AU]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N > On 21 Feb 2022, at 21:50, Archimedes Gaviola = wrote: > Did you re-compile your kernel? Brian has shared his resolution on = customizing the GENERIC kernel here=20 No I didn't realise it was necessary :) > = 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), >=20 > include GENERIC > ident GENERIC-PI > nooptions SOC_NVIDIA_TEGRA210 >=20 > 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=3D"YES" if necessary. = Lastly, kindly backup your data before recompiling for safety. >=20 > This is the way I do it with my ds3231 driver, hope you will get the = same result. Thanks. 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=3D1bd3e8ba696633ccd7525030d951b58a= de167814 = https://cgit.freebsd.org/src/commit/?id=3Da534b50e245d801af887d91b5d48ebcf= 120aa039 Although I have not been brave enough to update to HEAD and try it yet = :) -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum