1264977Sian/*- 2264977Sian * Copyright (c) 2014 Ian Lepore <ian@freebsd.org> 3264977Sian * All rights reserved. 4264977Sian * 5264977Sian * Redistribution and use in source and binary forms, with or without 6264977Sian * modification, are permitted provided that the following conditions 7264977Sian * are met: 8264977Sian * 1. Redistributions of source code must retain the above copyright 9264977Sian * notice, this list of conditions and the following disclaimer. 10264977Sian * 2. Redistributions in binary form must reproduce the above copyright 11264977Sian * notice, this list of conditions and the following disclaimer in the 12264977Sian * documentation and/or other materials provided with the distribution. 13264977Sian * 14264977Sian * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15264977Sian * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16264977Sian * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17264977Sian * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18264977Sian * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19264977Sian * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20264977Sian * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21264977Sian * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22264977Sian * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23264977Sian * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24264977Sian * SUCH DAMAGE. 25264977Sian * 26264977Sian * $FreeBSD$ 27264977Sian */ 28264977Sian 29264977Sian#ifndef IMX_CCMVAR_H 30264977Sian#define IMX_CCMVAR_H 31264977Sian 32264977Sian/* 33264977Sian * We need a clock management system that works across unrelated SoCs and 34264977Sian * devices. For now, to keep imx development moving, define some barebones 35264977Sian * functionality that can be shared within the imx family by having each SoC 36264977Sian * implement functions with a common name. 37264977Sian * 38264977Sian * The usb enable functions are best-effort. They turn on the usb otg, host, 39264977Sian * and phy clocks in a SoC-specific manner, but it may take a lot more than that 40264977Sian * to make usb work on a given board. In particular, it can require specific 41264977Sian * pinmux setup of gpio pins connected to external phy parts, voltage regulators 42264977Sian * and overcurrent detectors, and so on. On such boards, u-boot or other early 43264977Sian * board setup code has to handle those things. 44264977Sian */ 45264977Sian 46264977Sianuint32_t imx_ccm_ipg_hz(void); 47264977Sianuint32_t imx_ccm_perclk_hz(void); 48264977Sianuint32_t imx_ccm_sdhci_hz(void); 49264977Sianuint32_t imx_ccm_uart_hz(void); 50264977Sian 51264977Sianvoid imx_ccm_usb_enable(device_t _usbdev); 52264977Sianvoid imx_ccm_usbphy_enable(device_t _phydev); 53264977Sian 54264977Sian#endif 55