xref: /freebsd/sys/arm/freescale/imx/imx6_anatopvar.h (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
19808ebfaSIan Lepore /*-
2*4d846d26SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
3af3dc4a7SPedro F. Giffuni  *
49808ebfaSIan Lepore  * Copyright (c) 2013 Ian Lepore <ian@freebsd.org>
59808ebfaSIan Lepore  * All rights reserved.
69808ebfaSIan Lepore  *
79808ebfaSIan Lepore  * Redistribution and use in source and binary forms, with or without
89808ebfaSIan Lepore  * modification, are permitted provided that the following conditions
99808ebfaSIan Lepore  * are met:
109808ebfaSIan Lepore  * 1. Redistributions of source code must retain the above copyright
119808ebfaSIan Lepore  *    notice, this list of conditions and the following disclaimer.
129808ebfaSIan Lepore  * 2. Redistributions in binary form must reproduce the above copyright
139808ebfaSIan Lepore  *    notice, this list of conditions and the following disclaimer in the
149808ebfaSIan Lepore  *    documentation and/or other materials provided with the distribution.
159808ebfaSIan Lepore  *
169808ebfaSIan Lepore  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
179808ebfaSIan Lepore  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
189808ebfaSIan Lepore  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
199808ebfaSIan Lepore  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
209808ebfaSIan Lepore  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
219808ebfaSIan Lepore  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
229808ebfaSIan Lepore  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
239808ebfaSIan Lepore  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
249808ebfaSIan Lepore  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
259808ebfaSIan Lepore  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
269808ebfaSIan Lepore  * SUCH DAMAGE.
279808ebfaSIan Lepore  */
289808ebfaSIan Lepore 
299808ebfaSIan Lepore #ifndef	IMX6_ANATOPVAR_H
309808ebfaSIan Lepore #define	IMX6_ANATOPVAR_H
319808ebfaSIan Lepore 
329808ebfaSIan Lepore /*
339808ebfaSIan Lepore  * All registers controlling various analog aspects of the SoC (such as PLLs or
349808ebfaSIan Lepore  * voltage regulators or USB VBUS detection) are gathered together under the
359808ebfaSIan Lepore  * anatop device (because of newbus hierarchical resource management), but other
369808ebfaSIan Lepore  * drivers such as CMM or USBPHY need access to these registers.  These
379808ebfaSIan Lepore  * functions let them have at the hardware directly.  No effort is made by these
389808ebfaSIan Lepore  * functions to mediate concurrent access.
399808ebfaSIan Lepore  */
409808ebfaSIan Lepore uint32_t imx6_anatop_read_4(bus_size_t _offset);
419808ebfaSIan Lepore void imx6_anatop_write_4(bus_size_t _offset, uint32_t _value);
429808ebfaSIan Lepore 
4386a55754SIan Lepore uint32_t imx6_get_cpu_clock(void);
4486a55754SIan Lepore 
45f0583578SRuslan Bukin uint32_t pll4_configure_output(uint32_t mfi, uint32_t mfn, uint32_t mfd);
46f0583578SRuslan Bukin 
479808ebfaSIan Lepore #endif
48