Date: Wed, 9 Jun 2021 16:16:49 -0500 From: Matthew Grooms <mgrooms@shrew.net> To: freebsd-arm@freebsd.org Subject: Re: RPI4 Hardware PWM Message-ID: <d215038d-6cd9-f0bb-bc56-4beaf8e06c63@shrew.net> In-Reply-To: <9bb7f3d1-8256-be26-ba87-90946ce1b95f@shrew.net> References: <9bb7f3d1-8256-be26-ba87-90946ce1b95f@shrew.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 6/8/2021 4:06 PM, Matthew Grooms wrote: > Hey All, > > I have a project I'm working on that depends on interfacing with a few > sensor modules using both i2c and PWM. I've got the i2c devices to > work correctly, but I'm not sure how to interface with the HW PWM > support of the RPI4. I can see there are settings exposed via sysctl > for Beaglebone systems ... > > https://zewaren.net/bbb-pwm.html > > I was hoping I'd be able to force GPIO 12 or 13 into ALT0 and set the > duty values via sysctl, but that doesn't seem to be an option. Any > help would be greatly appreciated. Replying to myself with a bit more info. I see that there is a driver available for rpi boards authored by PHK ... https://cgit.freebsd.org/src/tree/sys/arm/broadcom/bcm2835/bcm2835_pwm.c That has notes on RPi2/3 boards, but not mention of RPi4. When I load that, I see the following output ... Jun 9 18:29:50 generic kernel: pwm0: <BCM2708/2835 PWM controller> mem 0x7e20c000-0x7e20c027 on simplebus0 Jun 9 18:29:50 generic kernel: pwm0: cannot find Clock Manager I assume I'm doing something wrong. Any feedback would be greatly appreciated. Thanks, -Matthew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d215038d-6cd9-f0bb-bc56-4beaf8e06c63>