// SPDX-License-Identifier: GPL-2.0-only /* * ispcsiphy.c * * TI OMAP3 ISP - CSI PHY module * * Copyright (C) 2010 Nokia Corporation * Copyright (C) 2009 Texas Instruments, Inc. * * Contacts: Laurent Pinchart <[email protected]> * Sakari Ailus <[email protected]> */ #include <linux/delay.h> #include <linux/device.h> #include <linux/regmap.h> #include <linux/regulator/consumer.h> #include "isp.h" #include "ispreg.h" #include "ispcsiphy.h" static void csiphy_routing_cfg_3630(struct isp_csiphy *phy, enum isp_interface_type iface, bool ccp2_strobe) { … } static void csiphy_routing_cfg_3430(struct isp_csiphy *phy, u32 iface, bool on, bool ccp2_strobe) { … } /* * Configure OMAP 3 CSI PHY routing. * @phy: relevant phy device * @iface: ISP_INTERFACE_* * @on: power on or off * @ccp2_strobe: false: data/clock, true: data/strobe * * Note that the underlying routing configuration registers are part of the * control (SCM) register space and part of the CORE power domain on both 3430 * and 3630, so they will not hold their contents in off-mode. This isn't an * issue since the MPU power domain is forced on whilst the ISP is in use. */ static void csiphy_routing_cfg(struct isp_csiphy *phy, enum isp_interface_type iface, bool on, bool ccp2_strobe) { … } /* * csiphy_power_autoswitch_enable * @enable: Sets or clears the autoswitch function enable flag. */ static void csiphy_power_autoswitch_enable(struct isp_csiphy *phy, bool enable) { … } /* * csiphy_set_power * @power: Power state to be set. * * Returns 0 if successful, or -EBUSY if the retry count is exceeded. */ static int csiphy_set_power(struct isp_csiphy *phy, u32 power) { … } /* * TCLK values are OK at their reset values */ #define TCLK_TERM … #define TCLK_MISS … #define TCLK_SETTLE … static int omap3isp_csiphy_config(struct isp_csiphy *phy) { … } int omap3isp_csiphy_acquire(struct isp_csiphy *phy, struct media_entity *entity) { … } void omap3isp_csiphy_release(struct isp_csiphy *phy) { … } /* * omap3isp_csiphy_init - Initialize the CSI PHY frontends */ int omap3isp_csiphy_init(struct isp_device *isp) { … } void omap3isp_csiphy_cleanup(struct isp_device *isp) { … }