1*a7fa939bSIan Lepore /*- 2*a7fa939bSIan Lepore * Copyright (c) 2014 Ian Lepore <ian@freebsd.org> 3*a7fa939bSIan Lepore * All rights reserved. 4*a7fa939bSIan Lepore * 5*a7fa939bSIan Lepore * Redistribution and use in source and binary forms, with or without 6*a7fa939bSIan Lepore * modification, are permitted provided that the following conditions 7*a7fa939bSIan Lepore * are met: 8*a7fa939bSIan Lepore * 1. Redistributions of source code must retain the above copyright 9*a7fa939bSIan Lepore * notice, this list of conditions and the following disclaimer. 10*a7fa939bSIan Lepore * 2. Redistributions in binary form must reproduce the above copyright 11*a7fa939bSIan Lepore * notice, this list of conditions and the following disclaimer in the 12*a7fa939bSIan Lepore * documentation and/or other materials provided with the distribution. 13*a7fa939bSIan Lepore * 14*a7fa939bSIan Lepore * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15*a7fa939bSIan Lepore * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16*a7fa939bSIan Lepore * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17*a7fa939bSIan Lepore * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18*a7fa939bSIan Lepore * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19*a7fa939bSIan Lepore * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20*a7fa939bSIan Lepore * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21*a7fa939bSIan Lepore * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22*a7fa939bSIan Lepore * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23*a7fa939bSIan Lepore * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24*a7fa939bSIan Lepore * SUCH DAMAGE. 25*a7fa939bSIan Lepore * 26*a7fa939bSIan Lepore * $FreeBSD$ 27*a7fa939bSIan Lepore */ 28*a7fa939bSIan Lepore 29*a7fa939bSIan Lepore #ifndef IMX_CCMVAR_H 30*a7fa939bSIan Lepore #define IMX_CCMVAR_H 31*a7fa939bSIan Lepore 32*a7fa939bSIan Lepore /* 33*a7fa939bSIan Lepore * We need a clock management system that works across unrelated SoCs and 34*a7fa939bSIan Lepore * devices. For now, to keep imx development moving, define some barebones 35*a7fa939bSIan Lepore * functionality that can be shared within the imx family by having each SoC 36*a7fa939bSIan Lepore * implement functions with a common name. 37*a7fa939bSIan Lepore * 38*a7fa939bSIan Lepore * The usb enable functions are best-effort. They turn on the usb otg, host, 39*a7fa939bSIan Lepore * and phy clocks in a SoC-specific manner, but it may take a lot more than that 40*a7fa939bSIan Lepore * to make usb work on a given board. In particular, it can require specific 41*a7fa939bSIan Lepore * pinmux setup of gpio pins connected to external phy parts, voltage regulators 42*a7fa939bSIan Lepore * and overcurrent detectors, and so on. On such boards, u-boot or other early 43*a7fa939bSIan Lepore * board setup code has to handle those things. 44*a7fa939bSIan Lepore */ 45*a7fa939bSIan Lepore 46*a7fa939bSIan Lepore uint32_t imx_ccm_ipg_hz(void); 47*a7fa939bSIan Lepore uint32_t imx_ccm_perclk_hz(void); 48*a7fa939bSIan Lepore uint32_t imx_ccm_sdhci_hz(void); 49*a7fa939bSIan Lepore uint32_t imx_ccm_uart_hz(void); 50*a7fa939bSIan Lepore 51*a7fa939bSIan Lepore void imx_ccm_usb_enable(device_t _usbdev); 52*a7fa939bSIan Lepore void imx_ccm_usbphy_enable(device_t _phydev); 53*a7fa939bSIan Lepore 54*a7fa939bSIan Lepore #endif 55