From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 22 23:38:39 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0E0616A400 for ; Fri, 22 Feb 2008 23:38:39 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id BC09913C448 for ; Fri, 22 Feb 2008 23:38:39 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id A00D51CC033; Fri, 22 Feb 2008 15:38:39 -0800 (PST) Date: Fri, 22 Feb 2008 15:38:39 -0800 From: Jeremy Chadwick To: David Duchscher Message-ID: <20080222233839.GA59633@eos.sc1.parodius.com> References: <49B17835-A03A-4186-8669-B942668FEBF2@tamu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49B17835-A03A-4186-8669-B942668FEBF2@tamu.edu> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: hackers@freebsd.org Subject: Re: Winbond IO chip driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 23:38:39 -0000 On Fri, Feb 22, 2008 at 09:53:09AM -0600, David Duchscher wrote: > It was suggested that this list may be a better place to post my request. > > I have started work on a WinBond chip driver (currently only the W83627HF > chip) to provide access to the chips watchdog timer and sensors. I have > never written a driver before and my C is rather rusty so I figured I would > post what I currently have in hopes that some kind soul would take pity on > me. What I have so far is located here: > > http://freebsd.tamu.edu/wbio/ > > The driver does attach and the watchdog timer works for the chip in my test > machine running FreeBSD 6.3. TData sheets are here: > > http://www.winbond-usa.com/en/content/view/143/273/ > > Any advice, pointers, documents would be much appreciated. Somewhat related: I can work with you on this, if need be. I've been working with both the Winbond W83627HF and (more so) the Winbond W83793G, talking to both via SMBus, so that we have a way to monitor fans and thermal information on our Supermicro boxes. I've written an application that fetches said information per Supermicro specs (they deviate from Winbond's specifications a bit, since they appear to use resistors on some of the thermistors at different resistances -- and to make matters worse, the ICs are silkscreened on the board as W83627HFs but are actually W83793G -- really weird): FAN1 = 0 rpm FAN2 = 0 rpm FAN3 = 0 rpm FAN4 = 3366 rpm FAN5 = 1475 rpm FAN6 = 1193 rpm VCOREA (Vcore) = 1.292 V VCOREB (+1.5V) = 1.542 V VTT (P_VTT) = 1.204 V VSEN1(-12V) = -12.288 V VSEN2 (Vdimm) = 1.824 V 3VSEN (+3.3V) = 3.360 V 12VSEN (+12V) = 11.904 V 5VDD (+5V) = 4.998 V 5VSB (5Vsb) = 5.046 V VBAT (Vbatt) = 3.184 V TD1 = 30 C TR1 = 42 C TR2 = 33 C It would be ideal if we could get something going similar to Linux's lmsensors project, though with watchdog support too. However, I do not agree with the "auto-probe" method of finding out what HW IC is used; I would much rather have a configuration database of motherboards and what actual chip code they should use, ditto with "one-offs" (where some mainboard vendors use different slave addresses or I/O base ports). Yes, it would require more work, but it would guarantee functionality, and not present nightmare situations for users and developers, e.g. "I get SOME temperatures, but I don't know if they're right, and these voltages are totally wrong", etc... Finally, I have not played with the watchdog capabilities at all. Watchdogs are pretty cool though. :-) I'll look at your code over the next few weeks... -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |