Introduce support for the Qualcomm IPQ50xx SoC. This series adds support for the following components: - minimal boot support: GCC/pinctrl/watchdog/CPUFreq/SDI (upstreamed) - USB2 (upstreamed) - Thermal/Tsens - PCIe gen2 1&2-lane PHY and controller - PWM and PWM LED - QPIC SPI NAND controller - CMN PLL Block (provider of fixed rate clocks to GCC/ethernet/more.) - Ethernet: IPQ5018 Internal GE PHY (1 gbps) - Remoteproc MPD driver for IPQ5018 (2.4G) & QCN6122 (5/6G) Wifi Co-developed-by: Ziyang Huang <hzyitc@outlook.com> Signed-off-by: Ziyang Huang <hzyitc@outlook.com> Signed-off-by: George Moussalem <george.moussalem@outlook.com> Link: https://github.com/openwrt/openwrt/pull/17182 Signed-off-by: Robert Marko <robimarko@gmail.com>
46 lines
1.8 KiB
Diff
46 lines
1.8 KiB
Diff
From: Sricharan Ramabadhran <quic_srichara@quicinc.com>
|
|
Subject: [PATCH] thermal/drivers/qcom: Add new feat for soc without rpm
|
|
Date: Fri, 22 Sep 2023 17:21:14 +0530
|
|
|
|
In IPQ5018, Tsens IP doesn't have RPM. Hence the early init to
|
|
enable tsens would not be done. So add a flag for that in feat
|
|
and skip enable checks. Without this, tsens probe fails.
|
|
|
|
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
|
|
Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
|
|
---
|
|
drivers/thermal/qcom/tsens.c | 2 +-
|
|
drivers/thermal/qcom/tsens.h | 3 +++
|
|
2 files changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/thermal/qcom/tsens.c
|
|
+++ b/drivers/thermal/qcom/tsens.c
|
|
@@ -974,7 +974,7 @@ int __init init_common(struct tsens_priv
|
|
ret = regmap_field_read(priv->rf[TSENS_EN], &enabled);
|
|
if (ret)
|
|
goto err_put_device;
|
|
- if (!enabled) {
|
|
+ if (!enabled && !(priv->feat->ignore_enable)) {
|
|
dev_err(dev, "%s: device not enabled\n", __func__);
|
|
ret = -ENODEV;
|
|
goto err_put_device;
|
|
--- a/drivers/thermal/qcom/tsens.h
|
|
+++ b/drivers/thermal/qcom/tsens.h
|
|
@@ -505,6 +505,8 @@ enum regfield_ids {
|
|
* @srot_split: does the IP neatly splits the register space into SROT and TM,
|
|
* with SROT only being available to secure boot firmware?
|
|
* @has_watchdog: does this IP support watchdog functionality?
|
|
+ * @ignore_enable: does this IP reside in a soc that does not have rpm to
|
|
+ * do pre-init.
|
|
* @max_sensors: maximum sensors supported by this version of the IP
|
|
* @trip_min_temp: minimum trip temperature supported by this version of the IP
|
|
* @trip_max_temp: maximum trip temperature supported by this version of the IP
|
|
@@ -516,6 +518,7 @@ struct tsens_features {
|
|
unsigned int adc:1;
|
|
unsigned int srot_split:1;
|
|
unsigned int has_watchdog:1;
|
|
+ unsigned int ignore_enable:1;
|
|
unsigned int max_sensors;
|
|
int trip_min_temp;
|
|
int trip_max_temp;
|