Merge tag 'for_3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next
Kishon writes: for_3.17 Adds regulator support in PHY core. PHY core is modified to support representation of multi-phy PHY providers with each individual PHY as sub-node OF PHY provider node. New PHY drivers adapted to PHY framework (hix5hd2 SATA PHY, QCOM APQ8064 SATA PHY, QCOM IPQ806x SATA PHY, Berlin SATA PHY and MiPHY356x). Existing TI PIPE3 PHY can now be used for PCIe too. Includes misc fixes and cleanups.
This commit is contained in:
@@ -23,6 +23,7 @@ enum omap_control_phy_type {
|
||||
OMAP_CTRL_TYPE_OTGHS = 1, /* Mailbox OTGHS_CONTROL */
|
||||
OMAP_CTRL_TYPE_USB2, /* USB2_PHY, power down in CONTROL_DEV_CONF */
|
||||
OMAP_CTRL_TYPE_PIPE3, /* PIPE3 PHY, DPLL & seperate Rx/Tx power */
|
||||
OMAP_CTRL_TYPE_PCIE, /* RX TX control of ACSPCIE */
|
||||
OMAP_CTRL_TYPE_DRA7USB2, /* USB2 PHY, power and power_aux e.g. DRA7 */
|
||||
OMAP_CTRL_TYPE_AM437USB2, /* USB2 PHY, power e.g. AM437x */
|
||||
};
|
||||
@@ -33,6 +34,7 @@ struct omap_control_phy {
|
||||
u32 __iomem *otghs_control;
|
||||
u32 __iomem *power;
|
||||
u32 __iomem *power_aux;
|
||||
u32 __iomem *pcie_pcs;
|
||||
|
||||
struct clk *sys_clk;
|
||||
|
||||
@@ -63,6 +65,9 @@ enum omap_control_usb_mode {
|
||||
#define OMAP_CTRL_PIPE3_PHY_TX_RX_POWERON 0x3
|
||||
#define OMAP_CTRL_PIPE3_PHY_TX_RX_POWEROFF 0x0
|
||||
|
||||
#define OMAP_CTRL_PCIE_PCS_MASK 0xff
|
||||
#define OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT 0x8
|
||||
|
||||
#define OMAP_CTRL_USB2_PHY_PD BIT(28)
|
||||
|
||||
#define AM437X_CTRL_USB2_PHY_PD BIT(0)
|
||||
@@ -74,6 +79,7 @@ enum omap_control_usb_mode {
|
||||
void omap_control_phy_power(struct device *dev, int on);
|
||||
void omap_control_usb_set_mode(struct device *dev,
|
||||
enum omap_control_usb_mode mode);
|
||||
void omap_control_pcie_pcs(struct device *dev, u8 id, u8 delay);
|
||||
#else
|
||||
|
||||
static inline void omap_control_phy_power(struct device *dev, int on)
|
||||
@@ -84,6 +90,10 @@ static inline void omap_control_usb_set_mode(struct device *dev,
|
||||
enum omap_control_usb_mode mode)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void omap_control_pcie_pcs(struct device *dev, u8 id, u8 delay)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OMAP_CONTROL_PHY_H__ */
|
||||
|
@@ -18,6 +18,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
|
||||
struct phy;
|
||||
|
||||
@@ -65,6 +66,7 @@ struct phy {
|
||||
int init_count;
|
||||
int power_count;
|
||||
struct phy_attrs attrs;
|
||||
struct regulator *pwr;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -156,9 +158,10 @@ void devm_phy_put(struct device *dev, struct phy *phy);
|
||||
struct phy *of_phy_get(struct device_node *np, const char *con_id);
|
||||
struct phy *of_phy_simple_xlate(struct device *dev,
|
||||
struct of_phandle_args *args);
|
||||
struct phy *phy_create(struct device *dev, const struct phy_ops *ops,
|
||||
struct phy_init_data *init_data);
|
||||
struct phy *devm_phy_create(struct device *dev,
|
||||
struct phy *phy_create(struct device *dev, struct device_node *node,
|
||||
const struct phy_ops *ops,
|
||||
struct phy_init_data *init_data);
|
||||
struct phy *devm_phy_create(struct device *dev, struct device_node *node,
|
||||
const struct phy_ops *ops, struct phy_init_data *init_data);
|
||||
void phy_destroy(struct phy *phy);
|
||||
void devm_phy_destroy(struct device *dev, struct phy *phy);
|
||||
@@ -297,13 +300,17 @@ static inline struct phy *of_phy_simple_xlate(struct device *dev,
|
||||
}
|
||||
|
||||
static inline struct phy *phy_create(struct device *dev,
|
||||
const struct phy_ops *ops, struct phy_init_data *init_data)
|
||||
struct device_node *node,
|
||||
const struct phy_ops *ops,
|
||||
struct phy_init_data *init_data)
|
||||
{
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
||||
static inline struct phy *devm_phy_create(struct device *dev,
|
||||
const struct phy_ops *ops, struct phy_init_data *init_data)
|
||||
struct device_node *node,
|
||||
const struct phy_ops *ops,
|
||||
struct phy_init_data *init_data)
|
||||
{
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
Reference in New Issue
Block a user