mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-20 01:24:39 +08:00
d91612d7f0
The RTC power domain in sun6i and newer SoCs manages the 16 MHz RC oscillator (called "IOSC" or "osc16M") and the optional 32 kHz crystal oscillator (called "LOSC" or "osc32k"). Starting with the H6, this power domain also handles the 24 MHz DCXO (called variously "HOSC", "dcxo24M", or "osc24M") as well. The H6 also adds a calibration circuit for IOSC. Later SoCs introduce further variations on the design: - H616 adds an additional mux for the 32 kHz fanout source. - R329 adds an additional mux for the RTC timekeeping clock, a clock for the SPI bus between power domains inside the RTC, and removes the IOSC calibration functionality. Take advantage of the CCU framework to handle this increased complexity. This driver is intended to be a drop-in replacement for the existing RTC clock provider. So some runtime adjustment of the clock parents is needed, both to handle hardware differences, and to support the old binding which omitted some of the input clocks. Signed-off-by: Samuel Holland <samuel@sholland.org> Acked-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220203021736.13434-6-samuel@sholland.org
16 lines
306 B
C
16 lines
306 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef _CCU_SUN6I_RTC_H
|
|
#define _CCU_SUN6I_RTC_H
|
|
|
|
#include <dt-bindings/clock/sun6i-rtc.h>
|
|
|
|
#define CLK_IOSC_32K 3
|
|
#define CLK_EXT_OSC32K_GATE 4
|
|
#define CLK_OSC24M_32K 5
|
|
#define CLK_RTC_32K 6
|
|
|
|
#define CLK_NUMBER (CLK_RTC_32K + 1)
|
|
|
|
#endif /* _CCU_SUN6I_RTC_H */
|