xref: /linux/drivers/phy/spacemit/phy-k3-common.h (revision 16e6a1a3cb3fa5fa11cd76a9d71235d927923329)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef _PHY_K3_COMMON_H
4 #define _PHY_K3_COMMON_H
5 
6 #include <linux/phy/phy.h>
7 
8 struct k3_phy_lane_group_data {
9 	u32 lanes;
10 	u8 config;
11 	u8 mask;
12 	u32 offsets[] __counted_by(lanes);
13 };
14 
15 struct k3_lane_group {
16 	const struct k3_phy_lane_group_data *data;
17 	void __iomem *base;
18 	struct phy *phy;
19 	bool is_pcie;
20 };
21 
22 extern const struct phy_ops k3_pcie_phy_ops;
23 extern const struct phy_ops k3_usb3_phy_ops;
24 
25 int k3_phy_calibrate(struct regmap *apb_spare);
26 
27 #endif
28