2018-07-24 16:13:36 +01:00
|
|
|
/*
|
2019-02-14 10:15:20 +00:00
|
|
|
* Copyright (c) 2017-2019, STMicroelectronics - All Rights Reserved
|
2018-07-24 16:13:36 +01:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
*/
|
|
|
|
|
2018-11-08 10:20:19 +00:00
|
|
|
#ifndef STM32MP1_CLKFUNC_H
|
|
|
|
#define STM32MP1_CLKFUNC_H
|
2018-07-24 16:13:36 +01:00
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
2018-12-14 00:18:21 +00:00
|
|
|
#include <libfdt.h>
|
|
|
|
|
2018-07-24 16:13:36 +01:00
|
|
|
enum stm32mp_osc_id {
|
|
|
|
_HSI,
|
|
|
|
_HSE,
|
|
|
|
_CSI,
|
|
|
|
_LSI,
|
|
|
|
_LSE,
|
|
|
|
_I2S_CKIN,
|
|
|
|
NB_OSC,
|
|
|
|
_UNKNOWN_OSC_ID = 0xFF
|
|
|
|
};
|
|
|
|
|
|
|
|
extern const char *stm32mp_osc_node_label[NB_OSC];
|
|
|
|
|
|
|
|
int fdt_osc_read_freq(const char *name, uint32_t *freq);
|
|
|
|
bool fdt_osc_read_bool(enum stm32mp_osc_id osc_id, const char *prop_name);
|
|
|
|
uint32_t fdt_osc_read_uint32_default(enum stm32mp_osc_id osc_id,
|
|
|
|
const char *prop_name,
|
|
|
|
uint32_t dflt_value);
|
|
|
|
|
2018-11-08 10:20:19 +00:00
|
|
|
#endif /* STM32MP1_CLKFUNC_H */
|