aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/clk
Commit message (Collapse)AuthorAgeFilesLines
* ofw: Convert simplebus to device_get_softc_class().Michal Meloun11 days2-27/+8
| | | | | | | | | Stop embedding struct simplebus_softc as the first member of subclass softcs. Use device_get_softc_class() to locate the simplebus portion of the device softc MFC after: 2 months Differential Revision: https://reviews.freebsd.org/D59837
* clk: Fix a few typos in the spacemit CCU driverBojan Novković2026-09-222-5/+5
| | | | | Fixes: dcb10e3add17 Reported by: Bruno Banelli <bruno.banelli@sartura.hr> (p_idx typo)
* jh7110_temp: CPU temperature sensor for JH7110Brian Scott2026-09-221-0/+16
| | | | | | | | | | | | | | | | | | This patch adds a driver for the CPU temperature sensor on the jh7110 SoC. The calibration numbers come from the OpenBSD driver but are reworked to produce a result in K rather than C. The temperature is exposed as a sysctl, dev.jh7110_temp.0.temperature but I have also exposed it as dev.cpu.0.temperature because that's where you find it on a RaspberryPi and amdtemp(4), so it's a lot more obvious. (mhorne: Added 'starfive,jh7100-temp' compatible.) Reviewed by: mhorne, bnovkov MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D59478
* Fixed some clocks divide width.priittrees2026-09-011-6/+6
| | | | | | | | | | clk_cpll_div_333m_div, clk_cpll_div_125m_div, clk_cpll_div_50m_div, clk_cpll_div_25m_div, clk_cpll_div_100m_div, clk_osc0_div_750k_div did not respond Rockchip RK3568 TRM Part1 V1.1-20210301.pdf documentation page 79. I changed them correctly. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2287
* clk: Correct SpacemitT typoEd Maste2026-08-211-1/+1
| | | | | | | | SpacemiT has only one T. Fixes: dcb10e3add17 ("clk: Initial support for the SpacemiT K1 clock control units") Sponsored by: The FreeBSD Foundation
* clk: Initial support for the SpacemiT K1 clock control unitsBojan Novković2026-08-164-0/+869
| | | | | | | | | | This change implements the core clknode methods for the SpacemiT K1 clock control units. These methods were used to implement drivers for the APMU and PLL CCUs. The initial driver for the APMU CCU only contains clock definitions for the SDHCI controller for now. Differential Revision: https://reviews.freebsd.org/D57176 Reviewed by: mmel, mhorne, manu
* clknode_if.m: fix two typosMitchell Horne2026-08-141-2/+2
| | | | One is the parameter name.
* clk: Fix a typo in a source code commentGordon Bergling2026-06-141-1/+1
| | | | | | - s/freqency/frequency/ MFC after: 3 days
* clk_fixed: quiet a warning messageMitchell Horne2026-04-161-2/+4
| | | | | | | | | | | | | Frequently there are some unused/unspecified fixed clocks present in a device tree. Each one emits a warning before it fails to attach, which results in (sometimes many) repeated messages which are not user-actionable. Put this warning behind the bootverbose flag. MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56204
* ofw: bool-ify OF_hasprop()Mitchell Horne2026-04-161-1/+1
| | | | | | | | | | | Adjust the function signature and the few callers that don't treat it this way already. This is style only; no functional change intended. Reviewed by: andrew Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56203
* aw_ccu: Add clocks for H616Tom Jones2026-02-091-0/+493
| | | | | | Reviewed by: manu, adrian Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54927
* rockship: Fix a typo in a source code commentGordon Bergling2026-01-171-1/+1
| | | | | | - s/vaues/values/ MFC after: 5 days
* Add StarFive JH7110's STG clocksJari Sihvola2024-12-161-0/+204
| | | | | | | | | | This is identical to AON clocks. The only difference is BUS_PASS_ORDER_LAST which was needed for some reason. This has clocks needed by PCIe controller driver. Reviewed by: mhorne MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47920
* jh7110: Add sys clocks for STG & PCIEJari Sihvola2024-12-161-0/+7
| | | | | | | | | This patch adds some SYS clocks for StarFive JH7110. They are necessary for getting STG clocks and PCIe driver working. Reviewed by: mhorne MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47981
* Replace calls to bus_generic_attach with bus_attach_childrenJohn Baldwin2024-12-063-3/+6
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47675
* riscv: Allwinner D1 clock and reset driverJulien Cassette2024-11-161-0/+1062
| | | | | | | | | Add the SOC_ALLWINNER_D1 config option, following other platforms. Co-authored-by: mhorne Reviewed by: manu (previous version) Sponsored by: The FreeBSD Foundation (in part) Differential Revision: https://reviews.freebsd.org/D47515
* jh7110: Add StarFive JH7110 clock/reset generator driversJari Sihvola2024-05-076-0/+1375
| | | | | | | | | | | | | Implement a core clknode driver for the JH7110 (StarFive VisionFive v2) platform. Add clock/reset generator drivers for the PLL, SYS, and AON clock groupings. Co-authored-by: mhorne Reviewed by: mhorne Sponsored by: The FreeBSD Foundation (mhorne's contributions) Differential Revision: https://reviews.freebsd.org/D43037
* Revert "jh7110: Add StarFive JH7110 clock/reset generator drivers"Mitchell Horne2024-05-076-1375/+0
| | | | | | I did not set the author field properly; revert to fix this. This reverts commit 5d6d6278979b9eab598a23c804d23e930d2f7268.
* jh7110: Add StarFive JH7110 clock/reset generator driversMitchell Horne2024-05-076-0/+1375
| | | | | | | | | | | | | Implement a core clknode driver for the JH7110 (StarFive VisionFive v2) platform. Add clock/reset generator drivers for the PLL, SYS, and AON clock groupings. Co-authored-by: mhorne Reviewed by: mhorne Sponsored by: The FreeBSD Foundation (mhorne's contributions) Differential Revision: https://reviews.freebsd.org/D43037
* clkdom_dump(): improve output textMitchell Horne2024-03-081-4/+14
| | | | | | | | | | | | | | If the call to clknode_get_freq() returns an error (unlikely), report this, rather than printing the error code as the clock frequency. If the clock has no parent (e.g. a fixed reference clock), print "none" rather than "(NULL)(-1)". This is a more human-legible presentation of the same information. Reviewed by: manu MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44267
* clk_fixed: quiet by defaultMitchell Horne2024-03-081-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | We may attach several of these devices, but there is no meaningful information added to dmesg. For example: ofwbus0: <Open Firmware Device Tree> clk_fixed0: <Fixed clock> on ofwbus0 clk_fixed1: <Fixed clock> on ofwbus0 clk_fixed2: <Fixed clock> on ofwbus0 clk_fixed3: <Fixed clock> on ofwbus0 clk_fixed4: <Fixed clock> on ofwbus0 clk_fixed5: <Fixed clock> on ofwbus0 clk_fixed6: <Fixed clock> on ofwbus0 clk_fixed7: <Fixed clock> on ofwbus0 clk_fixed8: <Fixed clock> on ofwbus0 clk_fixed9: <Fixed clock> on ofwbus0 clk_fixed10: <Fixed clock> on ofwbus0 clk_fixed11: <Fixed clock> on ofwbus0 To reduce this noise, quiet the devices for by default. For verbose boot, the message will be emitted. Reviewed by: manu MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44266
* clk_fixed: call clkdom_dump() for verbose bootMitchell Horne2024-03-081-3/+4
| | | | | | | | | | | | | This is standard practice for clock drivers that register clocks dynamically. Nothing else uses the CLK_DEBUG macro. The result is that the name and frequency of the fixed clock is printed for a verbose boot, which may aid in debugging. Reviewed by: manu MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44265
* syscon: Move syscon code in dev/sysconEmmanuel Vadot2024-01-102-2/+2
| | | | | | | | | | | We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: mhorne Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43196
* hwreset: Move reset code in dev/hwresetEmmanuel Vadot2024-01-104-4/+4
| | | | | | | | | | | We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: imp Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43192
* clk: Move clock code in dev/clkEmmanuel Vadot2024-01-1068-97/+3443
| | | | | | | | | | | We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: mhorne Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43191
* clk: Move rockchip driver into the common directoryEmmanuel Vadot2024-01-1021-0/+9084
| | | | | | | | No need to keep it under sys/arm64/rockchip/clk It's easier to find which controller we support by looking under one directory. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43189
* clk: Move allwinner driver into the common directoryEmmanuel Vadot2024-01-1030-0/+9861
| | | | | | | | | No need to keep it under sys/arm/allwinner/clkng It's easier to find which controller we support by looking under one directory. It will also be shared with Allwinner RiscV SoC. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43188
* xilinx: reset: Remove debug printfsEmmanuel Vadot2023-10-121-2/+0
| | | | Sponsored by: Beckhoff Automation GmbH & Co. KG
* arm64: zynqmp: Add clock driverEmmanuel Vadot2023-09-1812-0/+1549
Add clock and reset drivers for the ZynqMP SoC. The clocks are discovered by talking to the firmware as the topology isn't fixed on this SoC. Differential Revision: https://reviews.freebsd.org/D41812 Sponsored by: Beckhoff Automation GmbH & Co. KG