From nobody Mon Nov 08 09:27:57 2021 X-Original-To: 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 7491018375CE for ; Mon, 8 Nov 2021 09:28:22 +0000 (UTC) (envelope-from bscott@bunyatech.com.au) Received: from vmse04.mailcluster.com.au (vmse04.mailcluster.com.au [IPv6:2401:fc00:4:1::6]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hnm4j6Zb9z3Cfm; Mon, 8 Nov 2021 09:28:21 +0000 (UTC) (envelope-from bscott@bunyatech.com.au) Received: from vmcp43.digitalpacific.com.au ([101.0.119.58]) by vmse04.mailcluster.com.au with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1mk0wb-0000Po-Cr; Mon, 08 Nov 2021 20:28:09 +1100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=bunyatech.com.au; s=default; h=Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=tuUS/9IrFM2pVxVpLEthhOFDL2MKNGIGJpLq4vV2rvA=; b=HfPC7FAacnntqfWtrcjF1J6SmM clha+uZzc/KRE/+4NmtRZO/eTQnf+HF3k1SRgZ89kNBB9y1G5J4wN2XUUSBLmwIBten+HIQhd0KrY JTHcGhZUcU41IIPUVIxRYMDa742t2DqYT1qEFtBvGlWosg6fQHHj6UjKOT5z+vwPqD8OMDVf068VN aihm0udnFBf7xZz+X7z89CTHwtHpT8oe8Z/DSTMxZH6D9RzUFoinqLhAK8Sv1d+Tx60AnVUn5LXCV VI7nz2EGyceiRZEKia8qalWbTSAjrKfAit0lCvwvJN0/YW0SZu4THG9gAB/gmfroJc7hbK0gRdQ2Y SfpTqfnw==; Received: from ppp221-139.static.internode.on.net ([150.101.221.139]:42240 helo=DHCP.tawonga.bunyatech.com.au) by vmcp43.digitalpacific.com.au with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1mk0wY-000IL5-5Z; Mon, 08 Nov 2021 20:27:58 +1100 Subject: Re: DS3231 v. MAX77620 To: Mark Murray , ticso@cicely.de Cc: arm@freebsd.org References: <76C50E73-B095-4886-B825-6BBE1451B131@FreeBSD.org> From: Brian Scott Message-ID: <2c1edde2-11ca-9168-f199-e123651bdca8@bunyatech.com.au> Date: Mon, 8 Nov 2021 20:27:57 +1100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 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 In-Reply-To: <76C50E73-B095-4886-B825-6BBE1451B131@FreeBSD.org> Content-Type: multipart/alternative; boundary="------------2A4472CFB695B8DD9B5581FF" Content-Language: en-GB X-Authenticated-User: bscott@bunyatech.com.au X-Authenticator: dovecot_plain X-Originating-IP: 101.0.119.58 X-SpamExperts-Domain: digipac-sh-outbound4.mailcluster.com.au X-SpamExperts-Username: 101.0.119.58 X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.13) X-Recommended-Action: accept X-Filter-ID: Pt3MvcO5N4iKaDQ5O6lkdGlMVN6RH8bjRMzItlySaT8REY1YpF72kr6hrwmQcHRdPUtbdvnXkggZ 3YnVId/Y5jcf0yeVQAvfjH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jJy9NKnswQZk8pVcXzMHkrQgBXoXqfdxZ6Xsc9abISq4C 6T1OqLqM41yH44GtDG57BA== X-Report-Abuse-To: spam@vmse01.mailcluster.com.au X-Rspamd-Queue-Id: 4Hnm4j6Zb9z3Cfm X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: Y This is a multi-part message in MIME format. --------------2A4472CFB695B8DD9B5581FF Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit On 8/11/21 7:55 pm, Mark Murray wrote: > On 7 Nov 2021, at 13:42, Bernd Walter > wrote: >> >> However, I also couldn't get the same DS3231 module running on my Pi4. > > The GPIO drivers for BCM2711 are subtly different from the others, and > thus > don't quite work. I have some config.txt hacks to turn on I2C, but > ideally we > should fix the drivers. > > I keep on failing to get time to do this, and getting my head around > FDT is > an obstacle. > > Some looking around has shown a couple of problems: > 1) Register differences in BCM2711 - should be easy to fix with a bit > of time > 2) We don't use the in-tree FDT files on the RPi's. Needs fixing if we > are to >    be able to tweek them without manual recompilation. > I got some help from Hrant Dadivanyan privately about the general I2C problem (setting alt0 mode on GPIO 2 and 3) that was covered in a discussion starting in https://lists.freebsd.org/pipermail/freebsd-arm/2021-April/023685.html. I had expected that the standard config.txt line 'dtparam=audio=on,i2c_arm=on,spi=on' should have taken care of this (i2c_arm=on). Good luck digging deeper into this. This stuff is seriously weird and its very easy to just go with the boilerplate fix. With the choice of module issue, Hrant reported that what appears to be an identical set up to mine but with a different outcome: Mine is 13.0-RELEASE without anything special to hide MAX77620: # dmesg | egrep -i 'iic|rtc|ds3231|max' iichb0: mem 0x7e804000-0x7e804fff irq 26 on simplebus0 iicbus0: on iichb0 iic0: on iicbus0 ds32310: at addr 0xd0 on iicbus0 ds32310: registered as a time-of-day clock, resolution 1.000000s Mine (with the I2C fix) gives: iicbus0: on iichb0 iic0: on iicbus0 rtc0: at addr 0xd0 on iicbus0 rtc0: registered as a time-of-day clock, resolution 1.000000s But seems to be working. As a positive from this, learning about the gpio= statement in config.txt has allowed me to set the pull-up attribute on a few pins (unrelated to this topic). This seems to be something the GPIO driver for the BCM2711 (?) is incapable of doing. 'gpio=22,23=ip,pu' . Lovely. Thanks for the work and the help, Brian --------------2A4472CFB695B8DD9B5581FF--