]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/bcm283x_pwm.4
Upgrade to OpenSSH 7.6p1. This will be followed shortly by 7.7p1.
[FreeBSD/FreeBSD.git] / share / man / man4 / bcm283x_pwm.4
1 .\"
2 .\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 .\"
4 .\" Copyright (c) 2017 Poul-Henning Kamp <phk@FreeBSD.org>
5 .\" All rights reserved.
6 .\"
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\"    notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in the
14 .\"    documentation and/or other materials provided with the distribution.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 .\"
27 .\" $FreeBSD$
28 .\"
29 .Dd January 22, 2017
30 .Dt BCM283X_PWM 4
31 .Os
32 .Sh NAME
33 .Nm bcm283x_pwm
34 .Nd bcm283x_pwm - driver for Raspberry Pi 2/3 PWM
35 .Sh SYNOPSIS
36 .Cd "kldload bcm283x_clkman"
37 .Cd "kldload bcm283x_pwm"
38 .Sh DESCRIPTION
39 The
40 .Nm
41 driver provides access to the PWM engine on GPIO12 of Rpi 2 and 3 hardware.
42 .Pp
43 The PWM hardware is controlled via the
44 .Xr sysctl 8
45 interface:
46 .Bd -literal
47 dev.pwm.0.mode: 1
48 dev.pwm.0.freq: 125000000
49 dev.pwm.0.ratio: 2500
50 dev.pwm.0.period: 10000
51 dev.pwm.0.pwm_freq: 12500
52 .Ed
53 .Bl -tag -width ".Va dev.pwm.0.mode"
54 .It Va dev.pwm.0.mode
55 Three modes exist, 0=off, 1=PWM, 2=N/M.
56 The N/M mode is a first order delta-sigma mode, which makes a quite
57 handy DAC output with a trivial RC lowpass filter.
58 .Pp
59 .It Va dev.pwm.0.freq
60 The input frequency to the PWM hardware in Hz.
61 Minmum frequency is 123 kHz, maximum frequency is 125 MHz.
62 .It Va dev.pwm.0.period
63 The period length in cycles.
64 In PWM mode, the output frequency will be
65 (
66 .Va dev.pwm.0.freq
67 /
68 .Va dev.pwm.0.period .
69 )
70 In N/M mode this is the 'M'
71 .It Va dev.pwm.0.ratio
72 The "on" period in cycles.
73 In PWM mode, to get a 25% dutycycle, set this to 25% of
74 .Va dev.pwm.0.period .
75 In N/M mode this is the 'N'
76 .It Va dev.pwm.0.pwm_freq
77 The calculated PWM output frequency in PWM mode.
78 .El
79 .Pp
80 .Sh NOTES
81 Currently the
82 .Nm
83 driver ignores the 'status="disabled"' flag in the DTB, assuming that
84 if you load the driver, you want it to work.
85 .Sh SEE ALSO
86 .Xr sysctl 8
87 .Sh HISTORY
88 The
89 .Nm
90 driver first appeared in
91 .Fx 12.0 .
92 .Sh AUTHORS
93 .An -nosplit
94 The
95 .Nm
96 driver and this manual page were written by
97 .An Poul-Henning Kamp Aq Mt phk@FreeBSD.org .