From owner-svn-src-head@freebsd.org Mon Sep 10 22:48:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73E64109E231; Mon, 10 Sep 2018 22:48:27 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 241047958E; Mon, 10 Sep 2018 22:48:27 +0000 (UTC) (envelope-from gonzo@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1EE477279; Mon, 10 Sep 2018 22:48:27 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8AMmQ42077118; Mon, 10 Sep 2018 22:48:27 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8AMmQF3077117; Mon, 10 Sep 2018 22:48:26 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201809102248.w8AMmQF3077117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 10 Sep 2018 22:48:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338574 - head/share/man/man4/man4.arm X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/share/man/man4/man4.arm X-SVN-Commit-Revision: 338574 X-SVN-Commit-Repository: base 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.27 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: Mon, 10 Sep 2018 22:48:27 -0000 Author: gonzo Date: Mon Sep 10 22:48:26 2018 New Revision: 338574 URL: https://svnweb.freebsd.org/changeset/base/338574 Log: [bcm283x_pwm] Add documentation for the second PWM channel Document sysctls for the second PWM channel added in r335855 Also fix some minor style issues and a typo. Approved by: re (gjb) Submitted by: bobf@mrp3.com Reviewed by: 0mp Differential Revision: https://reviews.freebsd.org/D17084 Modified: head/share/man/man4/man4.arm/bcm283x_pwm.4 Modified: head/share/man/man4/man4.arm/bcm283x_pwm.4 ============================================================================== --- head/share/man/man4/man4.arm/bcm283x_pwm.4 Mon Sep 10 20:46:17 2018 (r338573) +++ head/share/man/man4/man4.arm/bcm283x_pwm.4 Mon Sep 10 22:48:26 2018 (r338574) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 22, 2017 +.Dd September 10, 2018 .Dt BCM283X_PWM 4 .Os .Sh NAME @@ -38,43 +38,56 @@ .Sh DESCRIPTION The .Nm -driver provides access to the PWM engine on GPIO12 of Rpi 2 and 3 hardware. +driver provides access to the PWM engine on GPIO12 of Raspberry Pi 2 and 3 hardware. .Pp The PWM hardware is controlled via the .Xr sysctl 8 interface: .Bd -literal dev.pwm.0.mode: 1 +dev.pwm.0.mode2: 1 dev.pwm.0.freq: 125000000 dev.pwm.0.ratio: 2500 +dev.pwm.0.ratio2: 2500 dev.pwm.0.period: 10000 +dev.pwm.0.period2: 10000 dev.pwm.0.pwm_freq: 12500 +dev.pwm.0.pwm_freq2: 12500 .Ed -.Bl -tag -width ".Va dev.pwm.0.mode" -.It Va dev.pwm.0.mode +.Bl -tag -width ".Va dev.pwm" +.It Va dev.pwm.0.mode , dev.pwm.0.mode2 +PWM Mode for channels 1 and 2. Three modes exist, 0=off, 1=PWM, 2=N/M. The N/M mode is a first order delta-sigma mode, which makes a quite handy DAC output with a trivial RC lowpass filter. .Pp .It Va dev.pwm.0.freq The input frequency to the PWM hardware in Hz. -Minmum frequency is 123 kHz, maximum frequency is 125 MHz. -.It Va dev.pwm.0.period +Applies to both channels 1 and 2. +Minimum frequency is 123 kHz, maximum frequency is 125 MHz. +.It Va dev.pwm.0.period , dev.pwm.0.period2 The period length in cycles. -In PWM mode, the output frequency will be +In PWM mode, the output frequencies will be ( .Va dev.pwm.0.freq / -.Va dev.pwm.0.period . -) -In N/M mode this is the 'M' -.It Va dev.pwm.0.ratio -The "on" period in cycles. +.Va dev.pwm.period +) and ( +.Va dev.pwm.0.freq2 +/ +.Va dev.pwm.0.period2 +). +In N/M mode this is the 'M'. +.It Va dev.pwm.0.ratio , dev.pwm.0.ratio2 +The "on" period in cycles for PWM channels 1 and 2. In PWM mode, to get a 25% dutycycle, set this to 25% of -.Va dev.pwm.0.period . -In N/M mode this is the 'N' -.It Va dev.pwm.0.pwm_freq -The calculated PWM output frequency in PWM mode. +.Va dev.pwm.0.period +or +.Va dev.pwm.0.period2 , +as appropriate. +In N/M mode this is the 'N'. +.It Va dev.pwm.0.pwm_freq , dev.pwm.0.pwm_freq2 +The calculated PWM output frequencies in PWM mode, for channels 1 and 2. .El .Pp .Sh NOTES