From owner-freebsd-arm@freebsd.org Mon Feb 4 10:28:34 2019 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B621714C669B for ; Mon, 4 Feb 2019 10:28:34 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [195.149.99.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "raven.bwct.de", Issuer "raven.bwct.de" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2EAE477AD6 for ; Mon, 4 Feb 2019 10:28:32 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.15.2/8.15.2) with ESMTPS id x14ASSLU074831 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 4 Feb 2019 11:28:30 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cicely.de; s=default; t=1549276110; bh=vX9awoXbP+61lq7tK5YTrWQY6Bis3bIdzNZO8zVyfWE=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To; b=gbVPMKXxiZz/g9QMlzKnIqcglzInkgFpOZz2v0wLmHkmh3FAlut7Q/7gi5CKeNRwd bvgbpYMUVGsOOjh2W2yMx6n0+HHNm9q3XiZTovMNMskWblib5MU8Ff+GFix1khVW5e AUeiqewkbzT4u187CwSBpOdFdLhXvH4KPUVNeCro= Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.5/8.14.4) with ESMTP id x14ASQqi004377 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 4 Feb 2019 11:28:26 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.15.2/8.15.2) with ESMTP id x14ASQuT043027; Mon, 4 Feb 2019 11:28:26 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.15.2/8.15.2/Submit) id x14ASP14043026; Mon, 4 Feb 2019 11:28:25 +0100 (CET) (envelope-from ticso) Date: Mon, 4 Feb 2019 11:28:25 +0100 From: Bernd Walter To: Emmanuel Vadot Cc: ticso@cicely.de, Bernd Walter , freebsd-arm@freebsd.org Subject: Re: Problem with PCF8563 RTC on Raspberry Message-ID: <20190204102825.GB41812@cicely7.cicely.de> Reply-To: ticso@cicely.de References: <20190204090854.GA41812@cicely7.cicely.de> <20190204104434.559c5ade316cc37a918520be@bidouilliste.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190204104434.559c5ade316cc37a918520be@bidouilliste.com> X-Operating-System: FreeBSD cicely7.cicely.de 12.0-STABLE amd64 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-2.9 required=4.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9 autolearn=ham version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on spamd.cicely.de X-Rspamd-Queue-Id: 2EAE477AD6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cicely.de header.s=default header.b=gbVPMKXx X-Spamd-Result: default: False [-2.60 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[ticso@cicely.de]; R_DKIM_ALLOW(-0.20)[cicely.de:s=default]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-0.99)[-0.994,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[cicely.de]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[cicely.de:+]; MX_GOOD(-0.01)[cached: mx1.bwct.de]; RCVD_IN_DNSWL_NONE(0.00)[3.99.149.195.list.dnswl.org : 127.0.20.0]; NEURAL_HAM_SHORT(-0.87)[-0.865,0]; NEURAL_HAM_MEDIUM(-0.93)[-0.932,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:21461, ipnet:195.149.99.0/24, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.00)[country: DE(-0.01)] 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, 04 Feb 2019 10:28:34 -0000 On Mon, Feb 04, 2019 at 10:44:34AM +0100, Emmanuel Vadot wrote: > On Mon, 4 Feb 2019 10:08:54 +0100 > Bernd Walter wrote: > > > I'm trying to get the RTC on a Waveshare ARPI600 module running on a > > Raspberry Pi B. > > This is the Overlay I'm using: > > /dts-v1/; > > /plugin/; > > > > &i2c0 { > > status = "okay"; > > > > rtc: rtc@51 { > > compatible = "nxp,pcf8563"; > > reg = <0x51>; > > }; > > }; > > > > IICbus gets probed during boot: > > iicbus0: on iichb0 > > iic0: on iicbus0 > > iicbus0: at addr 0xa2 > > > > When I load the nxprtc moduele I get the following error: > > nxprtc0: at addr 0xa2 on iicbus0 > > nxprtc0: cannot set up timer > > > > I wonder if I miss something, e.g. setting GPIO. > > However, for spi0 no GPIO setup was required and the overlay looks > > quite similar. > > Looking at the code it means that the driver didn't managed to talked > to the chip via i2c, the start_timer function is the first time that > i2c transfer is happening. That's my understanding of the situation as well. > Could be either pinmux problems or frequency (default is 100khz so it > should work ok). > What pin are you using to connect to the module ? Good point. It is connected to Pin3/5. Signals scoped turn out that they stay high. Pinout diagram show that the Pins are named SDA1/SCL1, so probably I'm just using the wrong controller. Will give it a test on i2c1 instead. > Also it seems that the overlay i2c-rtc.dtbo from the Rpi fundation > list this module but I'm unsure how to use this overlay. It is > installed via the rpi-firmware package. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.