| .. | .. |
|---|
| 78 | 78 | u32 low_rm; |
|---|
| 79 | 79 | u32 current_rm; |
|---|
| 80 | 80 | u32 target_rm; |
|---|
| 81 | + u32 pvtpll_clk_id; |
|---|
| 82 | + bool pvtpll_low_temp; |
|---|
| 81 | 83 | }; |
|---|
| 82 | 84 | |
|---|
| 83 | 85 | #if IS_ENABLED(CONFIG_ROCKCHIP_OPP) |
|---|
| .. | .. |
|---|
| 87 | 89 | int *volt_sel, int *scale_sel); |
|---|
| 88 | 90 | void rockchip_pvtpll_calibrate_opp(struct rockchip_opp_info *info); |
|---|
| 89 | 91 | void rockchip_pvtpll_add_length(struct rockchip_opp_info *info); |
|---|
| 92 | +void rockchip_init_pvtpll_table(struct rockchip_opp_info *info, int bin); |
|---|
| 90 | 93 | void rockchip_of_get_pvtm_sel(struct device *dev, struct device_node *np, |
|---|
| 91 | | - char *reg_name, int process, |
|---|
| 94 | + char *reg_name, int bin, int process, |
|---|
| 92 | 95 | int *volt_sel, int *scale_sel); |
|---|
| 93 | 96 | void rockchip_of_get_bin_sel(struct device *dev, struct device_node *np, |
|---|
| 94 | 97 | int bin, int *scale_sel); |
|---|
| .. | .. |
|---|
| 102 | 105 | char *porp_name, struct volt_rm_table **table); |
|---|
| 103 | 106 | void rockchip_get_opp_data(const struct of_device_id *matches, |
|---|
| 104 | 107 | struct rockchip_opp_info *info); |
|---|
| 108 | +int rockchip_get_soc_info(struct device *dev, struct device_node *np, int *bin, |
|---|
| 109 | + int *process); |
|---|
| 105 | 110 | void rockchip_get_scale_volt_sel(struct device *dev, char *lkg_name, |
|---|
| 106 | 111 | char *reg_name, int bin, int process, |
|---|
| 107 | 112 | int *scale, int *volt_sel); |
|---|
| 108 | 113 | struct opp_table *rockchip_set_opp_prop_name(struct device *dev, int process, |
|---|
| 109 | 114 | int volt_sel); |
|---|
| 115 | +struct opp_table *rockchip_set_opp_supported_hw(struct device *dev, |
|---|
| 116 | + struct device_node *np, |
|---|
| 117 | + int bin, int volt_sel); |
|---|
| 110 | 118 | int rockchip_adjust_power_scale(struct device *dev, int scale); |
|---|
| 111 | 119 | int rockchip_get_read_margin(struct device *dev, |
|---|
| 112 | 120 | struct rockchip_opp_info *opp_info, |
|---|
| .. | .. |
|---|
| 125 | 133 | int rockchip_init_opp_table(struct device *dev, |
|---|
| 126 | 134 | struct rockchip_opp_info *info, |
|---|
| 127 | 135 | char *lkg_name, char *reg_name); |
|---|
| 136 | +void rockchip_uninit_opp_table(struct device *dev, |
|---|
| 137 | + struct rockchip_opp_info *info); |
|---|
| 128 | 138 | #else |
|---|
| 129 | 139 | static inline int rockchip_of_get_leakage(struct device *dev, char *lkg_name, |
|---|
| 130 | 140 | int *leakage) |
|---|
| .. | .. |
|---|
| 147 | 157 | { |
|---|
| 148 | 158 | } |
|---|
| 149 | 159 | |
|---|
| 160 | +static inline void rockchip_init_pvtpll_table(struct rockchip_opp_info *info, |
|---|
| 161 | + int bin) |
|---|
| 162 | +{ |
|---|
| 163 | +} |
|---|
| 164 | + |
|---|
| 150 | 165 | static inline void rockchip_of_get_pvtm_sel(struct device *dev, |
|---|
| 151 | 166 | struct device_node *np, |
|---|
| 152 | | - char *reg_name, int process, |
|---|
| 167 | + char *reg_name, int bin, int process, |
|---|
| 153 | 168 | int *volt_sel, int *scale_sel) |
|---|
| 154 | 169 | { |
|---|
| 155 | 170 | } |
|---|
| .. | .. |
|---|
| 191 | 206 | struct rockchip_opp_info *info) |
|---|
| 192 | 207 | { |
|---|
| 193 | 208 | } |
|---|
| 209 | +static inline int rockchip_get_soc_info(struct device *dev, |
|---|
| 210 | + struct device_node *np, int *bin, |
|---|
| 211 | + int *process) |
|---|
| 212 | +{ |
|---|
| 213 | + return -EOPNOTSUPP; |
|---|
| 214 | +} |
|---|
| 194 | 215 | |
|---|
| 195 | 216 | static inline void rockchip_get_scale_volt_sel(struct device *dev, |
|---|
| 196 | 217 | char *lkg_name, char *reg_name, |
|---|
| .. | .. |
|---|
| 202 | 223 | static inline struct opp_table *rockchip_set_opp_prop_name(struct device *dev, |
|---|
| 203 | 224 | int process, |
|---|
| 204 | 225 | int volt_sel) |
|---|
| 226 | +{ |
|---|
| 227 | + return ERR_PTR(-EOPNOTSUPP); |
|---|
| 228 | +} |
|---|
| 229 | + |
|---|
| 230 | +static inline struct opp_table *rockchip_set_opp_supported_hw(struct device *dev, |
|---|
| 231 | + struct device_node *np, |
|---|
| 232 | + int bin, int volt_sel) |
|---|
| 205 | 233 | { |
|---|
| 206 | 234 | return ERR_PTR(-EOPNOTSUPP); |
|---|
| 207 | 235 | } |
|---|
| .. | .. |
|---|
| 248 | 276 | return -EOPNOTSUPP; |
|---|
| 249 | 277 | } |
|---|
| 250 | 278 | |
|---|
| 279 | +static inline void rockchip_uninit_opp_table(struct device *dev, |
|---|
| 280 | + struct rockchip_opp_info *info) |
|---|
| 281 | +{ |
|---|
| 282 | +} |
|---|
| 283 | + |
|---|
| 251 | 284 | #endif /* CONFIG_ROCKCHIP_OPP */ |
|---|
| 252 | 285 | |
|---|
| 253 | 286 | #endif |
|---|