From owner-freebsd-arm@freebsd.org Wed Feb 3 14:56:55 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 29516A9910D for ; Wed, 3 Feb 2016 14:56:55 +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 6A0638E6 for ; Wed, 3 Feb 2016 14:56:53 +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 d528c834; Wed, 3 Feb 2016 15:56:45 +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=VFqLEEDGTmsLPluvQNrUA7+4Lp0=; b=U2b5BSgq8NEpCCyU8nd1mkodH2fs SUO0+ToS2JUx+B7yg4nksOZe8S7Xr7+rEbGKC29CDSR7obBV6lq9+P8vMiicwzYd i049PkM6nQLssQ+Jyt6eBznFAgWA4ZIeljkSmgZyGVc8wCC9ktlEmF/r/FHt2Co4 8Brg57lRfZINOY4= 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=Agl87pizHNC2RJRrUv4Htgul1vuHg9kmvTvPJwZQPM8FszLPM0q3QDXH v9RbexEF+l4C2wMIh+RNO/j4GXh9iq7duHnYMKO5WbRb1XqAtqOPrv58O2jTAmZa ojkoKc+CayZcbZQEZej08Wc7/4YS5Y2AY//ZY/1r5zgPU1PJ44c= Received: from atlantis.staff.bocal.org (163.5.251.203 [163.5.251.203]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 6cd4fc30 TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO; Wed, 3 Feb 2016 15:56:45 +0100 (CET) Date: Wed, 3 Feb 2016 15:56:44 +0100 From: Emmanuel Vadot To: Jukka Ukkonen Cc: freebsd-arm Subject: Re: ds3231 suddenly failing Message-Id: <20160203155644.29677e6b6e35bc9f9462e678@bidouilliste.com> In-Reply-To: <56B21158.80401@gmail.com> References: <56B21158.80401@gmail.com> 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 14:56:55 -0000 Hi, 0xd0 is the 7-bit address while 0x1a0 is the 8-bits address so nothing is wrong here. 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" -- Emmanuel Vadot