From owner-freebsd-arm@freebsd.org Wed Feb 3 15:32:35 2016 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C832A9A040 for ; Wed, 3 Feb 2016 15:32:35 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F59A1E8F; Wed, 3 Feb 2016 15:32:33 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id d692d428; Wed, 3 Feb 2016 16:32:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=qdfDd3uK0sPZqVKHvv4ftTmzXD0=; b=PoL5bXQtd+crYPE314NBh3AssLK8 v9uXUKhGWnxZgsGBPyMGE6WZxiffjgf0IHZWLQIn9BvhsDVNNUw0OtzSEk4MUxSs i+psax8QAihg91ELUbXr+WnAKRQWs+VylezzJ/0VSbxRWcuuV1bvtUlODxX47YOA 3R8M2ISxmkPQa2E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=ldk9lcnhXppgqbx0R25FU2sBwRi9kk8uGKIKjfR4SNbbztX4NiRr2fji 8SWGqgGyXBfOPVQd44h1akslUsOWIpZe9xD1rurSBQEzKGEg0/39rNbhDFFm4DQM LYAU017lp39od4FhCIqSVtKFANoNpTLMu/y2yvc7TFBpvAlO5ns= Received: from atlantis.staff.bocal.org (163.5.251.203 [163.5.251.203]) by mail.blih.net (OpenSMTPD) with ESMTPSA id e791df4a TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO; Wed, 3 Feb 2016 16:32:31 +0100 (CET) Date: Wed, 3 Feb 2016 16:32:31 +0100 From: Emmanuel Vadot To: Ian Lepore Cc: Jukka Ukkonen , freebsd-arm Subject: Re: ds3231 suddenly failing Message-Id: <20160203163231.7fee12c46699df072a6eb52f@bidouilliste.com> In-Reply-To: <1454513228.1736.6.camel@freebsd.org> References: <56B21158.80401@gmail.com> <20160203155644.29677e6b6e35bc9f9462e678@bidouilliste.com> <1454513228.1736.6.camel@freebsd.org> X-Mailer: Sylpheed 3.4.3 (GTK+ 2.24.29; amd64-portbld-freebsd10.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 15:32:35 -0000 Yes I realised that after reading your mail :) On Wed, 03 Feb 2016 08:27:08 -0700 Ian Lepore wrote: > On Wed, 2016-02-03 at 15:56 +0100, Emmanuel Vadot wrote: > > Hi, > > > > 0xd0 is the 7-bit address while 0x1a0 is the 8-bits address so > > nothing is wrong here. > > > > No, that's incorrect. 0x1a0 is not a valid i2c address. The address > of a Maxim DS3231 is 0b1101000x; 0xd0 when expressing addresses as 8 > -bit, or 0x68 when expressing them as 7-bit. > > -- Ian > > > i2c -s doesn't show anything because rpi only support I2C_RDRW > > ioctl. > > If you want to confirm that your device is ok you can patch i2c(8) > > with this diff : > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198817 > > You do not need to recompile the kernel, just i2c(8). > > > > On Wed, 3 Feb 2016 16:40:24 +0200 > > Jukka Ukkonen wrote: > > > > > > > > Hello all, > > > > > > Previously my RPI2 had no problems with ds3231 RTC. > > > Now 11.0-CURRENT r295206 shows these during boot... > > > > > > ds32310: at addr 0x1a0 on iicbus1 > > > ds32310: cannot read from RTC. > > > > > > Trying sysctl dev.ds3231 gives me this... > > > > > > dev.ds3231.0.%parent: iicbus1 > > > dev.ds3231.0.%pnpinfo: name=rtc compat=maxim,ds3231 > > > dev.ds3231.0.%location: addr=0x1a0 > > > dev.ds3231.0.%driver: ds3231 > > > dev.ds3231.0.%desc: Maxim DS3231 RTC > > > dev.ds3231.%parent: > > > > > > Trying "i2c -s" does not show anything on either > > > /dev/iic0 or /dev/iic1. > > > > > > AFAIK I have not changed anything in the build. > > > > > > Checking the contents of rpi2.dtb says this about > > > the clock chip... > > > > > > rtc { > > > compatible = "maxim,ds3231"; > > > reg = <0xd0>; > > > }; > > > > > > I guess that the alert "cannot read from RTC." is > > > due to the fact that "addr 0x1a0" does not match > > > "reg = <0xd0>;" in the DTB. It just does not dawn > > > to me where the kernel found the alternate value. > > > Any ideas? > > > > > > --jau > > > _______________________________________________ > > > freebsd-arm@freebsd.org mailing list > > > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > > > To unsubscribe, send any mail to " > > > freebsd-arm-unsubscribe@freebsd.org" > > > > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" -- Emmanuel Vadot