Page MenuHomeFreeBSD

arm/broadcom: add bcm_gpclk driver and dpclk-rpi DTS overlay for CPRMAN testing
Needs ReviewPublic

Authored by 3293789706_qq.com on Wed, Mar 25, 2:16 AM.
Tags
None
Referenced Files
F151183604: D56072.diff
Mon, Apr 6, 4:09 PM
Unknown Object (File)
Mon, Apr 6, 4:14 AM
Unknown Object (File)
Tue, Mar 31, 11:35 PM
Unknown Object (File)
Tue, Mar 31, 11:34 PM
Unknown Object (File)
Tue, Mar 31, 1:27 PM
Unknown Object (File)
Tue, Mar 31, 11:29 AM
Unknown Object (File)
Mon, Mar 30, 11:12 AM
Unknown Object (File)
Mon, Mar 30, 11:00 AM
Subscribers

Details

Reviewers
andrew
manu
obiwac
Summary

Add a minimal FDT driver (bcm_gpclk) that consumes a BCM283x GP clock
via the clkdev framework. The driver is primarily intended as a test
harness for the existing CPRMAN clock driver: it exposes two sysctl
knobs under dev.bcm_gpclk.<unit>:

freq   - read/write the GP clock frequency (Hz) via clk_set_freq(9)
enable - gate/ungate the clock via clk_enable/clk_disable(9)

This makes it straightforward to exercise CPRMAN parent selection,
divider calculation, mux switching, and busy-wait logic from userland
without requiring any additional hardware beyond the SoC itself.
Add dpclk-rpi.dtso, a DTS overlay for BCM2711 (RPi 4) that routes
GPCLK0 to GPIO4 (ALT0) and instantiates a gpclk0 node consuming
BCM2835_CLOCK_GP0 from the CPRMAN clock provider.
Wire up the new files in files.bcm283x, files.arm64, and the rpi DTB
module Makefile.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 71703
Build 68586: arc lint + arc unit