2 .\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
4 .\" Copyright (c) 2017 Poul-Henning Kamp <phk@FreeBSD.org>
5 .\" All rights reserved.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
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.
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.
34 .Nd bcm283x_pwm - driver for Raspberry Pi 2/3 PWM
36 .Cd "kldload bcm283x_clkman"
37 .Cd "kldload bcm283x_pwm"
41 driver provides access to the PWM engine on GPIO12 of Rpi 2 and 3 hardware.
43 The PWM hardware is controlled via the
48 dev.pwm.0.freq: 125000000
50 dev.pwm.0.period: 10000
51 dev.pwm.0.pwm_freq: 12500
53 .Bl -tag -width ".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.
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
68 .Va dev.pwm.0.period .
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.
83 driver ignores the 'status="disabled"' flag in the DTB, assuming that
84 if you load the driver, you want it to work.
90 driver first appeared in
96 driver and this manual page were written by
97 .An Poul-Henning Kamp Aq Mt phk@FreeBSD.org .