From owner-svn-src-all@freebsd.org Sun Nov 6 13:56:36 2016 Return-Path: Delivered-To: svn-src-all@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 F3CE0C32B7B; Sun, 6 Nov 2016 13:56:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBC8A696; Sun, 6 Nov 2016 13:56:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uA6DuZ2n079299; Sun, 6 Nov 2016 13:56:35 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uA6DuYcO079294; Sun, 6 Nov 2016 13:56:34 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201611061356.uA6DuYcO079294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Sun, 6 Nov 2016 13:56:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r308371 - in stable/10: share/man/man4 sys/conf sys/dev/jedec_ts sys/modules/i2c sys/modules/i2c/jedec_ts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Nov 2016 13:56:36 -0000 Author: avg Date: Sun Nov 6 13:56:34 2016 New Revision: 308371 URL: https://svnweb.freebsd.org/changeset/base/308371 Log: MFC r307768: jedec_ts: a driver for thermal sensors on memory modules Added: stable/10/share/man/man4/jedec_ts.4 - copied unchanged from r307768, head/share/man/man4/jedec_ts.4 stable/10/sys/dev/jedec_ts/ - copied from r307768, head/sys/dev/jedec_ts/ stable/10/sys/modules/i2c/jedec_ts/ - copied from r307768, head/sys/modules/i2c/jedec_ts/ Modified: stable/10/sys/conf/NOTES stable/10/sys/conf/files stable/10/sys/modules/i2c/Makefile Directory Properties: stable/10/ (props changed) Copied: stable/10/share/man/man4/jedec_ts.4 (from r307768, head/share/man/man4/jedec_ts.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man4/jedec_ts.4 Sun Nov 6 13:56:34 2016 (r308371, copy of r307768, head/share/man/man4/jedec_ts.4) @@ -0,0 +1,130 @@ +.\" +.\" Copyright (c) 2016 Andriy Gapon +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd October 13, 2016 +.Dt JEDEC_TS 4 +.Os +.Sh NAME +.Nm jedec_ts +.Nd driver for temperature sensors on memory modules +.Sh SYNOPSIS +.Bd -ragged -offset indent +.Cd "device jedec_ts" +.Cd "device smbus" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +jedec_ts_load="YES" +.Ed +.Pp +In +.Pa /boot/device.hints : +.Bd -literal -offset indent +.Cd hint.jedec_ts.0.at="smbus0" +.Cd hint.jedec_ts.0.addr="0x30" +.Cd hint.jedec_ts.1.at="smbus0" +.Cd hint.jedec_ts.1.addr="0x32" +.Cd hint.jedec_ts.2.at="smbus0" +.Cd hint.jedec_ts.2.addr="0x34" +.Cd hint.jedec_ts.3.at="smbus0" +.Cd hint.jedec_ts.3.addr="0x36" +.Cd hint.jedec_ts.4.at="smbus0" +.Cd hint.jedec_ts.4.addr="0x38" +.Cd hint.jedec_ts.5.at="smbus0" +.Cd hint.jedec_ts.5.addr="0x3A" +.Cd hint.jedec_ts.6.at="smbus0" +.Cd hint.jedec_ts.6.addr="0x3C" +.Cd hint.jedec_ts.7.at="smbus0" +.Cd hint.jedec_ts.7.addr="0x3E" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides access to sensor data over the +.Xr smbus 4 . +The driver supports temperature sensors on memory modules that conform +to JEDEC Standard 21-C, TSE2002 Specification. +.Pp +The access to +.Nm +data is made via the +.Xr sysctl 8 +interface: +.Bl -tag -width "dev.jedec_ts.%d.temp" +.It Va dev.jedec_ts.%d.temp +read-only value of the current temperature read by the sensor. +.El +.Pp +On a system using +.Xr device.hints 5 , +these values are configurable for +.Nm : +.Bl -tag -width "hint.jedec_ts.%d.addr" +.It Va hint.jedec_ts.%d.at +target +.Xr smbus 4 . +.It Va hint.jedec_ts.%d.addr +.Nm +SMBus address on the +.Xr smbus 4 . +.El +.Pp +.Nm +temperature sensors can be wired to eight different addresses, +allowing up to eight sensors on the same +.Xr smbus 4 . +.Pp +If the sensors are on an I2C bus behind an +.Xr iicbus 4 +controller, then the +.Xr iicsmb 4 +bridge driver can be used to attach the +.Xr smbus 4 . +.Sh EXAMPLES +.Ss Sensor read out for two memory modules: +.Bd -literal +dev.jedec_ts.0.temp: 40.2500C +dev.jedec_ts.1.temp: 40.7500C +.Ed +.Sh SEE ALSO +.Xr iicbus 4 , +.Xr iicsmb 4 , +.Xr smbus 4 , +.Xr sysctl 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 12.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver and this manual page were written by +.An Andriy Gapon Aq Mt avg@FreeBSD.org . Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Sun Nov 6 13:53:50 2016 (r308370) +++ stable/10/sys/conf/NOTES Sun Nov 6 13:56:34 2016 (r308371) @@ -2515,7 +2515,12 @@ device ismt device smb +# SMBus peripheral devices # +# jedec_ts Temperature Sensor compliant with JEDEC Standard 21-C +# +device jedec_ts + # I2C Bus # # Philips i2c bus support is provided by the `iicbus' device. Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Sun Nov 6 13:53:50 2016 (r308370) +++ stable/10/sys/conf/files Sun Nov 6 13:56:34 2016 (r308371) @@ -1782,6 +1782,7 @@ dev/ixl/i40e_nvm.c optional ixl ixlv in compile-with "${NORMAL_C} -I$S/dev/ixl" dev/ixl/i40e_adminq.c optional ixl ixlv inet \ compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/jedec_ts/jedec_ts.c optional jedec_ts smbus dev/jme/if_jme.c optional jme pci dev/joy/joy.c optional joy dev/joy/joy_isa.c optional joy isa Modified: stable/10/sys/modules/i2c/Makefile ============================================================================== --- stable/10/sys/modules/i2c/Makefile Sun Nov 6 13:53:50 2016 (r308370) +++ stable/10/sys/modules/i2c/Makefile Sun Nov 6 13:56:34 2016 (r308371) @@ -1,6 +1,6 @@ # $FreeBSD$ SUBDIR = -SUBDIR += controllers if_ic smbus iicbus iicbb iicsmb iic smb +SUBDIR += controllers if_ic smbus iicbus iicbb iicsmb iic smb jedec_ts .include