From owner-freebsd-arm@freebsd.org Wed Jul 17 21:55:05 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 275CFB637C for ; Wed, 17 Jul 2019 21:55:05 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1.eu.mailhop.org (outbound1.eu.mailhop.org [52.28.251.132]) (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 9A46F95578 for ; Wed, 17 Jul 2019 21:55:04 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1563400495; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=ANKL7rCriquDAg3gUiKqDj5H00NZCkQNzCHeVOwReL3Tk6HxiWBIOj8EZ9nAmTvpOydbCLOb+IOmj aio1ImOi4+zYCh6BAMU22AsJUY5fbuYS2uVrC28nmtVbbxxF8sJkzA7MdlUu+fg9t1hCE/V/L0nkHE 99EMeIXRuI5ua+hNzgE1GbNZLKui4hNGsAouaSGWJak0STolST/Y5IS5CVAjX8JSl8JBGYaY7iCDJy meHXwWYsOaXOdoSWsHRRFjJn2Z1Yt+aB+74mbDYOFWrYprYKPQCyg+2LKUeGxN/PClIdCp9vJ4XSC7 PBIsg6JzVqvIqgPzs9eSUjKlG4nRd6w== 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:to:from:subject:message-id:dkim-signature:from; bh=txbEJVvwc6bV07MfS5aqeibk719lTJxc4caiFdLy4NI=; b=uXvHAxdm10kc8EY75N9s4JiJOdbqo9Jt6NdFa3OKN+YDeipC0YJwsq1YXIe/hP809GZUwzB0dwdgN LClaIuvzq2IL1v9UhAqgXTfBKgSPAxjvn0ZAs05m6drH77Hj669OvFRw3vvts5knrVH6eSoJ+zHx/w 1JtUAmJtdJWuGnhTRi1vrpbavkOdxzgZhyGHeBSDj2j++RJQ+Cv7/J1UUatECid0ha+OkG4oTG0Nn4 p8gnCIOc1rUzv/W3XNufVTtqfm8g7HR8JKL309xXeWuJbop8A+6gtRtd19FqYD22JJ73iU6N/qxLnG xGx+PwBraAVgSjYf/qdrode4h4juP4w== ARC-Authentication-Results: i=1; outbound3.eu.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:to:from:subject:message-id:from; bh=txbEJVvwc6bV07MfS5aqeibk719lTJxc4caiFdLy4NI=; b=eIVMpie3mjwebSCEy/QPtfKp2k29Jikfk3BuJiLS57hnbKWX+pBwMJyTo1gS0u1Y5gSYINKNJZ4u4 fv8WvoenCMeqVzfDNvbBslFG9daUhtswL6pt6LgRT9HA69OfbGtbROgWnY64O8Qc6C6FRosgPELkEn 2fxOceydS9Uwdth3ypkKoXZDnE/YLNv1fMQPF+fr5hSPeUwAzOlMu9txvozGupV9gsW6Z0DYwixNeg 3dinlK+k1cWkQjfxjFHkbIAfUOYplt/B0r+U0NcItNf0VMvwK/InhImOFx38iYoMfpxTrvmkf3Yez4 NY8EYxOVATlB3rvW7K3X5WFGtgBRvpA== X-MHO-RoutePath: aGlwcGll X-MHO-User: 81016307-a8dd-11e9-852e-270a483ae530 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.eu.mailhop.org (Halon) with ESMTPSA id 81016307-a8dd-11e9-852e-270a483ae530; Wed, 17 Jul 2019 21:54:53 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x6HLspK8041789; Wed, 17 Jul 2019 15:54:51 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <4707336cb7d4cdd8dbd2070a9e799f12bff59fcc.camel@freebsd.org> Subject: Re: Rasclock (PCF2127 ) Hardware Clock FreeBSD 12.0 From: Ian Lepore To: Stefan Parvu , freebsd-arm@freebsd.org Date: Wed, 17 Jul 2019 15:54:51 -0600 In-Reply-To: <91E26684-07A0-4F03-92BC-8D49359B1358@kronometrix.org> References: <41A4CA5C-B487-490F-8A19-2D51F43E1004@kronometrix.org> <95616620-bbaf-dbc3-49eb-3e2562638d49@bunyatech.com.au> <74E3E782-8481-4B5B-A0AF-A04590C27D6D@kronometrix.org> <790afcb5f0809a89b45982958a85f1539fec05c7.camel@freebsd.org> <36088812-2135-4433-BC49-0BC433EC6767@kronometrix.org> <86CC4711-47AC-45C6-B6D3-71C9FFDD4A91@kronometrix.org> <2ec7d7f63de31065b9cab396c662fe24f0107078.camel@freebsd.org> <2AC05799-7D11-4200-8D16-38E3718470BB@kronometrix.org> <91E26684-07A0-4F03-92BC-8D49359B1358@kronometrix.org> 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: 9A46F95578 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.991,0]; ASN(0.00)[asn:16509, ipnet:52.28.0.0/16, 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: Wed, 17 Jul 2019 21:55:05 -0000 On Thu, 2019-07-18 at 00:42 +0300, Stefan Parvu wrote: > nxprtc driver results > > 1. Default test - passed > Description: I can see the driver, NTP runs ok, after reboot system > is ok and I can see activity from RTC via sysctl > I can see sometimes from dmesg the following: > > local_intc0: Spurious interrupt detected > local_intc0: Spurious interrupt detected > local_intc0: Spurious interrupt detected > local_intc0: Spurious interrupt detected > > > 2. System power off 2hrs - failed > Description: I set correctly the time on the system, NTP was running > and I have shutdown the system. > After two hours I powered back the system but I see the RTC battery > failed. > > mbox0: mbox response error > bcm2835_cpufreq0: can't get clock rate (id=8) > bcm2835_cpufreq0: ARM 600MHz, Core 250MHz, SDRAM -999MHz, Turbo OFF > nxprtc0: WARNING: RTC battery failed; time is invalid > nxprtc0: registered as a time-of-day clock, resolution 0.015625s > Release APs...done > > > I have changed now Varta 3V CR1220 to Energizer CR1220. Lets see. > > The spurious interrupt problems are fixed with this patch (it isn't really a problem, the patch just disables the messages): https://svnweb.freebsd.org/base/head/sys/arm/broadcom/bcm2835/bcm2835_intr.c?r1=332262&r2=346489&view=patch But this driver is built into the kernel, not a module, so you'll have to replace the whole kernel from 12-RELEASE with the one you build yourself. My RasClock battery had gone dead too. It was no more than 2 years old at the most, but the rasclock was running on battery all that time (until it died), because I almost never power on the rpi boards. I think the rasclock may use more battery power than some other rtc boards because the chip it uses is more accurate than most. Part of how it does that is to use a temperature-compensated oscillator, but that means it uses extra power to measure the temperature. -- Ian