From owner-freebsd-arm@freebsd.org Mon Jul 15 15:03:24 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 A9592BC2A7 for ; Mon, 15 Jul 2019 15:03:24 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (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 2EA6B954A5 for ; Mon, 15 Jul 2019 15:03:24 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1563202997; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=RfhWqjPvOBQMP/hHpV96z8D3Om0MprRSiX/DMg4IhoH5pcYbqUGZRy1XjuNFriZpht3xtIeIBGthd +Bw9zD19qZAl9T2LZ6tuDy/fyfr+rJOyOpUaaj4ArYSd52KRSzomXhEwGMmQD9UGFWk7EZSoNn9fcw 4xctasJm/rz1ASyagwjAedP4u1xA5qH/d73+eNTarA+BaeZ0jUZhrn4ektAb4dU0Iw6phUtbi20mQt RdVsKBBzYE2kVUYrZjIt6jDHeksUh/PQXCcJfwAXFiT9VQWhRT38VpxfMbHwE9ka8dQgl0ADaVhfdN gt0QJny+55Esrm3ZSAy3Hf1QCR//DZA== 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=xG5mEsUh3RfYG7oUjFHJGq5k+XTenDfnoCRFmTVBm/A=; b=Xzb5SgddxU8Y7idNrr7VqoiJRUvlNLmLbfLeUTJL1/saBV1AG0XNKoEO3LDwNihf30sWX9Xm1l0H+ otnkql7CQhwvT8X5M0UswlhaUYxjWY9srHIh0eBDCrrsloyuCgpdP6rvEQVRjIFGTbJghYpzcVWVV0 Kmt4BoxWzqHoMT93DK1lDeNSclQt61djYm9z7Zf2rvKsG83MDdNZkEIb2xh7NB2Q571VZF/R2Kt7uy /NqY708VGsil/ME7xqw4BA+Ij8TLDHXRJ1QbQ812nqYnm8MwjQ4nUJ4ucUdGEgQqFKHirlbJKIIuKd UhuJ/deI/dEYGSK60+QKo0WPX5Jo3pQ== ARC-Authentication-Results: i=1; outbound4.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:to:from:subject:message-id:from; bh=xG5mEsUh3RfYG7oUjFHJGq5k+XTenDfnoCRFmTVBm/A=; b=HpsJoGSLpoc2OUMczdPPo/Dp+6WXV6YLB2DtvzqpBvO6X1QWGhXr3GHEa4qlrcS5MRRxfhMUj4Gtv w1ECb8ZH8aoPr75+xWq7iXN0bft2bBhSKVu9F+l/EOh27PF0POTsPI5TGkLSIJlkh67aNRt3C0HvCZ Scwjm1QKHrOKdfvuAFs8WnVpyhmaWmLuzmuaXFW5WDPjffMB6nrio12DHzBqzSKHuvYjKWtpII562I 0ltY/PFKVWhzCYyy7FiJaclZ968mAqdvOOoRWVtaqnJq5y1dj5eYPU+0U/y5MZ1+rbnLbB1Lng7LYQ 3TcFAI/026vo7+dKe1dw4bE+Zs2PbwA== X-MHO-RoutePath: aGlwcGll X-MHO-User: ab79271f-a711-11e9-907a-1ba68abff17b 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 outbound4.ore.mailhop.org (Halon) with ESMTPSA id ab79271f-a711-11e9-907a-1ba68abff17b; Mon, 15 Jul 2019 15:03:15 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x6FF3E0e032314; Mon, 15 Jul 2019 09:03:14 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: Rasclock (PCF2127 ) Hardware Clock FreeBSD 12.0 From: Ian Lepore To: Stefan Parvu , freebsd-arm@freebsd.org Date: Mon, 15 Jul 2019 09:03:14 -0600 In-Reply-To: References: <41A4CA5C-B487-490F-8A19-2D51F43E1004@kronometrix.org> <95616620-bbaf-dbc3-49eb-3e2562638d49@bunyatech.com.au> 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: 2EA6B954A5 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_SHORT(-0.99)[-0.992,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:16509, ipnet:54.148.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: Mon, 15 Jul 2019 15:03:24 -0000 On Mon, 2019-07-15 at 16:49 +0300, Stefan Parvu wrote: > > > > I'd think the nxprtc driver would be much more likely to work. > > Here latest: > https://github.com/raspberrypi/firmware/issues/1190 < > https://github.com/raspberrypi/firmware/issues/1190> > > Still for some very strange reasons Im not able to use Raclock on > FreeBSD 12. > Pssoible problems: > > * driver issue > > * battery low, cannot save keep the time > > * else, configurations > > The config is simple: > > config.txt: > > root@k1:~ # cat /boot/msdos/config.txt > arm_control=0x200 > dtparam=audio=on,i2c_arm=on,spi=on > dtoverlay=mmc > dtoverlay=pwm > dtoverlay=pi3-disable-bt > device_tree_address=0x4000 > kernel=u-boot.bin > dtoverlay=i2c-rtc,pcf2129 > > Any ideas, tips ? > > Stefan I'm the one who wrote the nxprtc driver (and pretty much all the i2c rtc drivers except ds1307). I have a rasclock here (v4.2) and it works fine, but it's been over a year since I last hooked it up. The battery-low flag is set by the chip whenever the battery voltage drops below 2.5v, but the battery is able to run the chip all the way down to 1.2v before it stops keeping time. The PCF2129 chip has a unique feature where battery usage is disabled when it leaves the factory, and code in the driver sends a command to the chip to make it start using the battery the first time the chip is used. The idea is to preserve the battery when the chip is just sitting around for months in a warehouse. But if the people who make the rasclock do something like QA-test the boards when they're built, they could end up disabling that battery-save feature. It might help to see what's going on with the clock at boot time. Add debug.clock_show_io=3 to loader.conf and let's see what it says when it boots. -- Ian