From owner-freebsd-arm@freebsd.org Thu Nov 21 05:56:30 2019 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AE2DA1AF691 for ; Thu, 21 Nov 2019 05:56:30 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47JTMf1vzLz3Pjw for ; Thu, 21 Nov 2019 05:56:30 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1574315789; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=o1RQtCimxsJY5kZjgP7BOr4V0g9LqsRQKPN8Nri/pxx/pojWdhIDmwtUA/0+2226O1c4qihlcbuwZ AYA2blYoREwmErKSbLcNUxM78Pru60joH/pJcbCNGW+q+wq41j4XOy7hJ9HsuEir2A9W8fxcszxZXN ssZUrjtaykGdlb3s1PjcHBC8liSq9nnkH/tX7nnYxs214EE6/H76olNX7XpoQeXsLG2DdzlLewj2aU JxmbAx6dbYkvmna98FL6zTnh16vvOfVcZE7nTP99W//8AMcr7ejGaqhmCtKSTKZMi8d55lRt1PEoNF 4HPOGHkfYHl9IZngOp73bn+CesaTVig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=RMIVVroCR0UUFEoYIKxskL1Ydr+FqrV/wy93LftvJ48=; b=UMNWqqRKmC/LuuyOl0iyWqGEjAvwrv5q2WRVbzPGtcAHUQtxp/62d+zosf5IA6vy9MpK7tzXeneXq SFKoG5L4DUaEaaxaLP0L2ryJ3xLTE5X2YGhT2sbIpusMeA94+d2HfaNmyMkGLZ+mTcoPpS3l9lNild qnbgG+3U4d6xY/EZQt+arfwxhdtv7tMbvMfkWlyT/poZlA6dCCy9E2ebBlzPrsvx0FA10zeNekvPQK 1rkPVvAeypKm3iGOsdisuHhNp60OIebRuGICS/kocqfBWh0cL2zBaWFYmtjl+qC4WuZCwDQNaIWtMT Qz0lRl4DW3TIqnXbjDbuTIf2z7Nzw+A== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=RMIVVroCR0UUFEoYIKxskL1Ydr+FqrV/wy93LftvJ48=; b=Gr2ljQ/cn//G0K0tTKCrPUZa9G5YR++Gjokpnx7Rg/QTxvws9Wrpznqkv4edvkSzWApa0MllryKdk rAyhxqa+7tJP/2i8/l2XziAc3RX5yZq3DaUiKejaluXzzLnD99T+fveGMLGYQRLmbdbGzv+VN2Re5D tRTeH2qo0uWBDnKugTdaNFrzviv0i8oU4Za/5bZNHZdl3lGpCUnHUPg+CHGEfzkRSEtoUAYZC+P2v8 s6SVrHZ2+aVUTTB5eLXWaPx6EeMUhpJBsPyBslaVSBn2qDED1DP0pHC5zbiAFoGIX7uEMSfHLDicmp xODVjuMO2c4jqnjgU3FWjW/vibtfjCg== X-MHO-RoutePath: aGlwcGll X-MHO-User: a70e18d1-0c23-11ea-b80c-052b4a66b6b2 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id a70e18d1-0c23-11ea-b80c-052b4a66b6b2; Thu, 21 Nov 2019 05:56:27 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id xAL5uPoc052808; Wed, 20 Nov 2019 22:56:25 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: 20h offset with DS3231 RTC From: Ian Lepore To: ticso@cicely.de, freebsd-arm@freebsd.org Cc: Bernd Walter Date: Wed, 20 Nov 2019 22:56:24 -0700 In-Reply-To: <20191120224239.GA34719@cicely7.cicely.de> References: <20191120224239.GA34719@cicely7.cicely.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 47JTMf1vzLz3Pjw X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.90 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.93)[-0.929,0]; NEURAL_HAM_LONG(-0.97)[-0.974,0]; ASN(0.00)[asn:16509, ipnet:54.186.0.0/15, country:US] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Nov 2019 05:56:30 -0000 On Wed, 2019-11-20 at 23:42 +0100, Bernd Walter wrote: > I just added an RTC to a Pi3B with FreeBSD 12.1-RELEASE: > ds32310: at addr 0xd0 on iicbus0 > ... > Setting date via ntp. > 20 Nov 22:55:48 ntpdate[760]: step time server 46.165.221.137 offset > 71999.728041 sec > > This was the 3rd reboot. > The first boot had no actual time as expected and the RTC wasn't even > running. > The second already showed the offset. > > To verify I checked another systemm, wqhich I've added such an RTC > before. > dmesg said that it booted 9 days ago with 1s offset, but with another > reboot: > 20 Nov 23:31:44 ntpdate[826]: step time server 80.67.16.8 offset > 72000.160415 sec > > It seems that the error depends on the actual date/time. > I think this is because of a bug/lack-of-capability in the rpi i2c driver and/or hardware, and it affects all i2c devices that use some common driver routines to read and write slave device "registers". I'll look into fixing it, hopefully within a day. -- Ian