From owner-svn-src-head@FreeBSD.ORG Fri Nov 21 21:30:09 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68BE2352; Fri, 21 Nov 2014 21:30:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 3B70CE0B; Fri, 21 Nov 2014 21:30:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sALLU9QF059850; Fri, 21 Nov 2014 21:30:09 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sALLU9bJ059849; Fri, 21 Nov 2014 21:30:09 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201411212130.sALLU9bJ059849@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 21 Nov 2014 21:30:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274822 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Nov 2014 21:30:09 -0000 Author: ian Date: Fri Nov 21 21:30:08 2014 New Revision: 274822 URL: https://svnweb.freebsd.org/changeset/base/274822 Log: Document the recent enhancements for configuring bus speed in iicbus(4). Differential Revision: https://reviews.freebsd.org/D1182 PR: 195009 Modified: head/share/man/man4/iicbus.4 Modified: head/share/man/man4/iicbus.4 ============================================================================== --- head/share/man/man4/iicbus.4 Fri Nov 21 21:14:05 2014 (r274821) +++ head/share/man/man4/iicbus.4 Fri Nov 21 21:30:08 2014 (r274822) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 24, 2014 +.Dd November 17, 2014 .Dt IICBUS 4 .Os .Sh NAME @@ -103,12 +103,59 @@ Some I2C interfaces are available: .It Sy lpbb Ta "parallel port specific bit-banging interface" .It Sy bktr Ta "Brooktree848 video chipset, hardware and software master-only interface" .El +.Sh BUS FREQUENCY CONFIGURATION +The operating frequency of an I2C bus may be fixed or configurable. +The bus may be used as part of some larger standard interface, and that +interface specification may require a fixed frequency. +The driver for that hardware would not honor an attempt to configure a +different speed. +A general purpose I2C bus, such as those found in many embedded systems, +will often support multiple bus frequencies. +.Pp +When a system supports multiple I2C busses, a different frequency can +be configured for each bus by number, represented by the +.Va %d +in the variable names below. +Busses can be configured using any combination of device hints, +Flattened Device Tree (FDT) data, tunables set via +.Xr loader 8 , +or at runtime using +.Xr sysctl 8 . +When configuration is supplied using more than one method, FDT and +hint data will be overridden by a tunable, which can be overriden by +.Xr sysctl 8 . +.Ss Device Hints +Set +.Va hint.iicbus.%d.frequency +to the frequency in Hz, on systems that use device hints to configure +I2C devices. +The hint is also honored by systems that use FDT data if +no frequency is configured using FDT. +.Ss Flattened Device Tree Data +Configure the I2C bus speed using the FDT standard +.Va clock-frequency +property of the node describing the I2C controller hardware. +.Ss Sysctl and Tunable +Set +.Va dev.iicbus.%d.frequency +in +.Xr loader.conf 5 . +The same variable can be changed at any time with +.Xr sysctl 8 . +Reset the bus using +.Xr i2c 8 +or the +.Xr iic 4 +.Va I2CRSTCARD +ioctl to make the change take effect. .Sh SEE ALSO .Xr bktr 4 , +.Xr fdt 4 , .Xr iic 4 , .Xr iicbb 4 , .Xr lpbb 4 , -.Xr pcf 4 +.Xr pcf 4 , +.Xr i2c 8 .Sh HISTORY The .Nm