* [PATCH v9 0/6] Add support for IPQ5018 tsens
@ 2025-02-28 5:11 George Moussalem
0 siblings, 0 replies; 16+ messages in thread
From: George Moussalem @ 2025-02-28 5:11 UTC (permalink / raw)
To: linux-arm-msm, linux-pm, devicetree, daniel.lezcano, rafael,
amitk, thara.gopinath, dmitry.baryshkov, robh, krzk+dt,
quic_srichara
IPQ5018 has tsens V1.0 IP with 5 sensors, of which 4 are in use,
and 1 interrupt. There is no RPM present in the soc to do tsens early
enable. Adding support for the same here.
Last patch series sent by Qualcomm dates back to Sep 22, 2023.
Since I'm working on OpenWrt support for IPQ5018 based boards (routers)
and Sricharan Ramabadhran <quic_srichara@quicinc.com> in below email
confirmed this SoC is still active, I'm continuing the efforts to send
patches upstream for Linux kernel support.
https://lore.kernel.org/all/63dc4054-b1e2-4e7a-94e7-643beb26a6f3@quicinc.com/
[v9]
*) Updated checks in tsens to more strictly evaluate for v2+ upon enabling
v2 features as suggsted by Dmitry.
*) Split patch 3 into two, one to update conditional statements as
mentioned above and the other to implement tsens IP v1 without RPM.
*) Added back Dmitry's RB tag on patch 6 which wasn't carried over
from v7 to v8
*) Link to v8: https://lore.kernel.org/all/DS7PR19MB88833F7A9C8F4FC484977BA69DCD2@DS7PR19MB8883.namprd19.prod.outlook.com/
[v8]
*) Tsens V1 uses v1 interrupts and watchdog is not present (only on v2.3+).
As such, replaced VER_1_X with VER_1_X_NO_RPM in conditons to ensure
v1 interrupts are set and watchdog isn't enabled.
*) Tested on Linksys MX2000 and SPNMX56
*) Link to v7: https://lore.kernel.org/all/DS7PR19MB88831624F11516945C63400F9DC22@DS7PR19MB8883.namprd19.prod.outlook.com/
[v7]
*) Updated cover letter
*) Replaced patch 3 with a new one to add support for tsens v1.0 with
no RPM and removed Dmitry's 'Reviewed-by tag
*) Refactored patch 4 and split support for IPQ5018 from support for
tsens v1.0 without RPM. As such, also removed Dmitry's RB tag.
*) Depends on patch 1 and 2 from patch series to add support for
IQP5332 and IPQ5424 applied on Feb 11 2025:
https://patchwork.kernel.org/project/linux-arm-msm/cover/20250210120436.821684-1-quic_mmanikan@quicinc.com/
*) Link to v6: https://lore.kernel.org/all/DS7PR19MB88838833C0A3BFC3C7FC481F9DC02@DS7PR19MB8883.namprd19.prod.outlook.com/
[v6]
*) Include (this) cover letter
*) Picked up Dmitry's Reviewed-by tag on patch 5
*) Link to v5: https://lore.kernel.org/all/DS7PR19MB88832FDED68D3EBB0EE7E99F9DC72@DS7PR19MB8883.namprd19.prod.outlook.com/
[v5]
*) Adjusted commit messages to indicate IPQ5018 has 5 sensors of
which 4 are described and in use as per downstream driver and dts.
*) Padded addresses of tsens and qfprom nodes with leading zeros.
*) Link to v4: https://lore.kernel.org/all/DS7PR19MB8883BE38C2B500D03213747A9DC72@DS7PR19MB8883.namprd19.prod.outlook.com/
[v4]
*) Documented ipq5018 in qcom,qfprom bindings
*) Constrained ipq5018-tsens to one interrupt with description
*) Added Rob's Acked-by tag
*) Added Dmitry's Reviewed-by tag
*) Fixed modpost warning: added __init to init_common
*) Sorted tsens nodes by address
*) Sorted thermal-zones nodes by name
*) Link to v3: https://lore.kernel.org/all/20230922115116.2748804-1-srichara@win-platform-upstream01.qualcomm.com/
[v3]
*) Added the tsens-ipq5018 as new binding without rpm
*) Added Dmitry's Reviewed tag
*) Fixed Dmitry's comments for error checks in init_ipq5018
*) Ordered the qfprom device node properties
*) Link to v2: https://lore.kernel.org/all/20230915121504.806672-1-quic_srichara@quicinc.com/
[v2]
*) Sorted the compatible and removed example
*) Fixed the name for new tsens_feature
*) Used tsend_calibrate_common instead of legacy
and addressed comments from Dmitry.
*) Squashed patch 3 & 4
*) Fixed node names, order and added qfprom cells
for points seprately
*) Squashed patch 6 & 7
*) Link to v1: https://lore.kernel.org/all/1693250307-8910-1-git-send-email-quic_srichara@quicinc.com/
George Moussalem (2):
thermal: qcom: tsens: update conditions to strictly evaluate for IP
v2+
thermal: qcom: tsens: add support for tsens v1 without RPM
Sricharan Ramabadhran (4):
dt-bindings: nvmem: Add compatible for IPQ5018
dt-bindings: thermal: qcom-tsens: Add ipq5018 compatible
thermal: qcom: tsens: Add support for IPQ5018 tsens
arm64: dts: qcom: ipq5018: Add tsens node
.../bindings/nvmem/qcom,qfprom.yaml | 1 +
.../bindings/thermal/qcom-tsens.yaml | 2 +
arch/arm64/boot/dts/qcom/ipq5018.dtsi | 169 ++++++++++++++++++
drivers/thermal/qcom/tsens-v1.c | 62 +++++++
drivers/thermal/qcom/tsens.c | 27 ++-
drivers/thermal/qcom/tsens.h | 4 +
6 files changed, 256 insertions(+), 9 deletions(-)
--
2.48.1
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v9 0/6] Add support for IPQ5018 tsens
[not found] <20250228051521.138214-1-george.moussalem@outlook.com>
@ 2025-02-28 5:11 ` George Moussalem
2025-03-07 17:04 ` (subset) " Srinivas Kandagatla
` (3 more replies)
2025-02-28 5:11 ` [PATCH v9 1/6] dt-bindings: nvmem: Add compatible for IPQ5018 George Moussalem
` (5 subsequent siblings)
6 siblings, 4 replies; 16+ messages in thread
From: George Moussalem @ 2025-02-28 5:11 UTC (permalink / raw)
To: linux-arm-msm, linux-pm, devicetree, daniel.lezcano, rafael,
amitk, thara.gopinath, dmitry.baryshkov, robh, krzk+dt,
quic_srichara
Cc: George Moussalem
IPQ5018 has tsens V1.0 IP with 5 sensors, of which 4 are in use,
and 1 interrupt. There is no RPM present in the soc to do tsens early
enable. Adding support for the same here.
Last patch series sent by Qualcomm dates back to Sep 22, 2023.
Since I'm working on OpenWrt support for IPQ5018 based boards (routers)
and Sricharan Ramabadhran <quic_srichara@quicinc.com> in below email
confirmed this SoC is still active, I'm continuing the efforts to send
patches upstream for Linux kernel support.
https://lore.kernel.org/all/63dc4054-b1e2-4e7a-94e7-643beb26a6f3@quicinc.com/
[v9]
*) Updated checks in tsens to more strictly evaluate for v2+ upon enabling
v2 features as suggsted by Dmitry.
*) Split patch 3 into two, one to update conditional statements as
mentioned above and the other to implement tsens IP v1 without RPM.
*) Added back Dmitry's RB tag on patch 6 which wasn't carried over
from v7 to v8
*) Link to v8: https://lore.kernel.org/all/DS7PR19MB88833F7A9C8F4FC484977BA69DCD2@DS7PR19MB8883.namprd19.prod.outlook.com/
[v8]
*) Tsens V1 uses v1 interrupts and watchdog is not present (only on v2.3+).
As such, replaced VER_1_X with VER_1_X_NO_RPM in conditons to ensure
v1 interrupts are set and watchdog isn't enabled.
*) Tested on Linksys MX2000 and SPNMX56
*) Link to v7: https://lore.kernel.org/all/DS7PR19MB88831624F11516945C63400F9DC22@DS7PR19MB8883.namprd19.prod.outlook.com/
[v7]
*) Updated cover letter
*) Replaced patch 3 with a new one to add support for tsens v1.0 with
no RPM and removed Dmitry's 'Reviewed-by tag
*) Refactored patch 4 and split support for IPQ5018 from support for
tsens v1.0 without RPM. As such, also removed Dmitry's RB tag.
*) Depends on patch 1 and 2 from patch series to add support for
IQP5332 and IPQ5424 applied on Feb 11 2025:
https://patchwork.kernel.org/project/linux-arm-msm/cover/20250210120436.821684-1-quic_mmanikan@quicinc.com/
*) Link to v6: https://lore.kernel.org/all/DS7PR19MB88838833C0A3BFC3C7FC481F9DC02@DS7PR19MB8883.namprd19.prod.outlook.com/
[v6]
*) Include (this) cover letter
*) Picked up Dmitry's Reviewed-by tag on patch 5
*) Link to v5: https://lore.kernel.org/all/DS7PR19MB88832FDED68D3EBB0EE7E99F9DC72@DS7PR19MB8883.namprd19.prod.outlook.com/
[v5]
*) Adjusted commit messages to indicate IPQ5018 has 5 sensors of
which 4 are described and in use as per downstream driver and dts.
*) Padded addresses of tsens and qfprom nodes with leading zeros.
*) Link to v4: https://lore.kernel.org/all/DS7PR19MB8883BE38C2B500D03213747A9DC72@DS7PR19MB8883.namprd19.prod.outlook.com/
[v4]
*) Documented ipq5018 in qcom,qfprom bindings
*) Constrained ipq5018-tsens to one interrupt with description
*) Added Rob's Acked-by tag
*) Added Dmitry's Reviewed-by tag
*) Fixed modpost warning: added __init to init_common
*) Sorted tsens nodes by address
*) Sorted thermal-zones nodes by name
*) Link to v3: https://lore.kernel.org/all/20230922115116.2748804-1-srichara@win-platform-upstream01.qualcomm.com/
[v3]
*) Added the tsens-ipq5018 as new binding without rpm
*) Added Dmitry's Reviewed tag
*) Fixed Dmitry's comments for error checks in init_ipq5018
*) Ordered the qfprom device node properties
*) Link to v2: https://lore.kernel.org/all/20230915121504.806672-1-quic_srichara@quicinc.com/
[v2]
*) Sorted the compatible and removed example
*) Fixed the name for new tsens_feature
*) Used tsend_calibrate_common instead of legacy
and addressed comments from Dmitry.
*) Squashed patch 3 & 4
*) Fixed node names, order and added qfprom cells
for points seprately
*) Squashed patch 6 & 7
*) Link to v1: https://lore.kernel.org/all/1693250307-8910-1-git-send-email-quic_srichara@quicinc.com/
George Moussalem (2):
thermal: qcom: tsens: update conditions to strictly evaluate for IP
v2+
thermal: qcom: tsens: add support for tsens v1 without RPM
Sricharan Ramabadhran (4):
dt-bindings: nvmem: Add compatible for IPQ5018
dt-bindings: thermal: qcom-tsens: Add ipq5018 compatible
thermal: qcom: tsens: Add support for IPQ5018 tsens
arm64: dts: qcom: ipq5018: Add tsens node
.../bindings/nvmem/qcom,qfprom.yaml | 1 +
.../bindings/thermal/qcom-tsens.yaml | 2 +
arch/arm64/boot/dts/qcom/ipq5018.dtsi | 169 ++++++++++++++++++
drivers/thermal/qcom/tsens-v1.c | 62 +++++++
drivers/thermal/qcom/tsens.c | 27 ++-
drivers/thermal/qcom/tsens.h | 4 +
6 files changed, 256 insertions(+), 9 deletions(-)
--
2.48.1
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v9 1/6] dt-bindings: nvmem: Add compatible for IPQ5018
[not found] <20250228051521.138214-1-george.moussalem@outlook.com>
2025-02-28 5:11 ` [PATCH v9 0/6] Add support for IPQ5018 tsens George Moussalem
@ 2025-02-28 5:11 ` George Moussalem
2025-02-28 5:11 ` [PATCH v9 2/6] dt-bindings: thermal: qcom-tsens: Add ipq5018 compatible George Moussalem
` (4 subsequent siblings)
6 siblings, 0 replies; 16+ messages in thread
From: George Moussalem @ 2025-02-28 5:11 UTC (permalink / raw)
To: linux-arm-msm, linux-pm, devicetree, daniel.lezcano, rafael,
amitk, thara.gopinath, dmitry.baryshkov, robh, krzk+dt,
quic_srichara
Cc: Krzysztof Kozlowski, George Moussalem
From: Sricharan Ramabadhran <quic_srichara@quicinc.com>
Document the QFPROM block found on IPQ5018
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
---
Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
index 39c209249c9c..de262f3153ed 100644
--- a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
+++ b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
@@ -19,6 +19,7 @@ properties:
- enum:
- qcom,apq8064-qfprom
- qcom,apq8084-qfprom
+ - qcom,ipq5018-qfprom
- qcom,ipq5332-qfprom
- qcom,ipq5424-qfprom
- qcom,ipq6018-qfprom
--
2.48.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v9 2/6] dt-bindings: thermal: qcom-tsens: Add ipq5018 compatible
[not found] <20250228051521.138214-1-george.moussalem@outlook.com>
2025-02-28 5:11 ` [PATCH v9 0/6] Add support for IPQ5018 tsens George Moussalem
2025-02-28 5:11 ` [PATCH v9 1/6] dt-bindings: nvmem: Add compatible for IPQ5018 George Moussalem
@ 2025-02-28 5:11 ` George Moussalem
2025-02-28 5:11 ` [PATCH v9 3/6] thermal: qcom: tsens: update conditions to strictly evaluate for IP v2+ George Moussalem
` (3 subsequent siblings)
6 siblings, 0 replies; 16+ messages in thread
From: George Moussalem @ 2025-02-28 5:11 UTC (permalink / raw)
To: linux-arm-msm, linux-pm, devicetree, daniel.lezcano, rafael,
amitk, thara.gopinath, dmitry.baryshkov, robh, krzk+dt,
quic_srichara
Cc: George Moussalem
From: Sricharan Ramabadhran <quic_srichara@quicinc.com>
IPQ5018 has tsens v1.0 block with 5 sensors of which 4 are in use
and 1 interrupt.
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
index f9d8012c8cf5..0e653bbe9884 100644
--- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
+++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
@@ -39,6 +39,7 @@ properties:
- description: v1 of TSENS
items:
- enum:
+ - qcom,ipq5018-tsens
- qcom,msm8937-tsens
- qcom,msm8956-tsens
- qcom,msm8976-tsens
@@ -251,6 +252,7 @@ allOf:
compatible:
contains:
enum:
+ - qcom,ipq5018-tsens
- qcom,ipq8064-tsens
- qcom,msm8960-tsens
- qcom,tsens-v0_1
--
2.48.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v9 3/6] thermal: qcom: tsens: update conditions to strictly evaluate for IP v2+
[not found] <20250228051521.138214-1-george.moussalem@outlook.com>
` (2 preceding siblings ...)
2025-02-28 5:11 ` [PATCH v9 2/6] dt-bindings: thermal: qcom-tsens: Add ipq5018 compatible George Moussalem
@ 2025-02-28 5:11 ` George Moussalem
2025-02-28 5:58 ` Dmitry Baryshkov
2025-03-02 11:12 ` Amit Kucheria
2025-02-28 5:11 ` [PATCH v9 4/6] thermal: qcom: tsens: add support for tsens v1 without RPM George Moussalem
` (2 subsequent siblings)
6 siblings, 2 replies; 16+ messages in thread
From: George Moussalem @ 2025-02-28 5:11 UTC (permalink / raw)
To: linux-arm-msm, linux-pm, devicetree, daniel.lezcano, rafael,
amitk, thara.gopinath, dmitry.baryshkov, robh, krzk+dt,
quic_srichara
Cc: George Moussalem
TSENS v2.0+ leverage features not available to prior versions such as
updated interrupts init routine, masked interrupts, and watchdog.
Currently, the checks in place evaluate whether the IP version is greater
than v1 which invalidates when updates to v1 or v1 minor versions are
implemented. As such, update the conditional statements to strictly
evaluate whether the version is greater than or equal to v2 (inclusive).
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
drivers/thermal/qcom/tsens.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
index 1f5d4de017d9..43b388bcc7d6 100644
--- a/drivers/thermal/qcom/tsens.c
+++ b/drivers/thermal/qcom/tsens.c
@@ -447,7 +447,7 @@ static void tsens_set_interrupt(struct tsens_priv *priv, u32 hw_id,
dev_dbg(priv->dev, "[%u] %s: %s -> %s\n", hw_id, __func__,
irq_type ? ((irq_type == 1) ? "UP" : "CRITICAL") : "LOW",
enable ? "en" : "dis");
- if (tsens_version(priv) > VER_1_X)
+ if (tsens_version(priv) >= VER_2_X)
tsens_set_interrupt_v2(priv, hw_id, irq_type, enable);
else
tsens_set_interrupt_v1(priv, hw_id, irq_type, enable);
@@ -499,7 +499,7 @@ static int tsens_read_irq_state(struct tsens_priv *priv, u32 hw_id,
ret = regmap_field_read(priv->rf[LOW_INT_CLEAR_0 + hw_id], &d->low_irq_clear);
if (ret)
return ret;
- if (tsens_version(priv) > VER_1_X) {
+ if (tsens_version(priv) >= VER_2_X) {
ret = regmap_field_read(priv->rf[UP_INT_MASK_0 + hw_id], &d->up_irq_mask);
if (ret)
return ret;
@@ -543,7 +543,7 @@ static int tsens_read_irq_state(struct tsens_priv *priv, u32 hw_id,
static inline u32 masked_irq(u32 hw_id, u32 mask, enum tsens_ver ver)
{
- if (ver > VER_1_X)
+ if (ver >= VER_2_X)
return mask & (1 << hw_id);
/* v1, v0.1 don't have a irq mask register */
@@ -733,7 +733,7 @@ static int tsens_set_trips(struct thermal_zone_device *tz, int low, int high)
static int tsens_enable_irq(struct tsens_priv *priv)
{
int ret;
- int val = tsens_version(priv) > VER_1_X ? 7 : 1;
+ int val = tsens_version(priv) >= VER_2_X ? 7 : 1;
ret = regmap_field_write(priv->rf[INT_EN], val);
if (ret < 0)
@@ -1040,7 +1040,7 @@ int __init init_common(struct tsens_priv *priv)
}
}
- if (tsens_version(priv) > VER_1_X && ver_minor > 2) {
+ if (tsens_version(priv) >= VER_2_X && ver_minor > 2) {
/* Watchdog is present only on v2.3+ */
priv->feat->has_watchdog = 1;
for (i = WDOG_BARK_STATUS; i <= CC_MON_MASK; i++) {
--
2.48.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v9 4/6] thermal: qcom: tsens: add support for tsens v1 without RPM
[not found] <20250228051521.138214-1-george.moussalem@outlook.com>
` (3 preceding siblings ...)
2025-02-28 5:11 ` [PATCH v9 3/6] thermal: qcom: tsens: update conditions to strictly evaluate for IP v2+ George Moussalem
@ 2025-02-28 5:11 ` George Moussalem
2025-02-28 5:59 ` Dmitry Baryshkov
2025-02-28 5:11 ` [PATCH v9 5/6] thermal: qcom: tsens: Add support for IPQ5018 tsens George Moussalem
2025-02-28 5:11 ` [PATCH v9 6/6] arm64: dts: qcom: ipq5018: Add tsens node George Moussalem
6 siblings, 1 reply; 16+ messages in thread
From: George Moussalem @ 2025-02-28 5:11 UTC (permalink / raw)
To: linux-arm-msm, linux-pm, devicetree, daniel.lezcano, rafael,
amitk, thara.gopinath, dmitry.baryshkov, robh, krzk+dt,
quic_srichara
Cc: George Moussalem
Adding generic support for SoCs with tsens v1.0 IP with no RPM.
Due to lack of RPM, tsens has to be reset and enabled in the driver
init. SoCs can have support for more sensors than those which will
actually be enabled. As such, init will only enable those explicitly
added to the hw_ids array.
Co-developed-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
drivers/thermal/qcom/tsens-v1.c | 48 +++++++++++++++++++++++++++++++++
drivers/thermal/qcom/tsens.c | 14 +++++++---
drivers/thermal/qcom/tsens.h | 1 +
3 files changed, 59 insertions(+), 4 deletions(-)
diff --git a/drivers/thermal/qcom/tsens-v1.c b/drivers/thermal/qcom/tsens-v1.c
index 1a7874676f68..877b27274fd2 100644
--- a/drivers/thermal/qcom/tsens-v1.c
+++ b/drivers/thermal/qcom/tsens-v1.c
@@ -79,6 +79,17 @@ static struct tsens_features tsens_v1_feat = {
.trip_max_temp = 120000,
};
+static struct tsens_features tsens_v1_no_rpm_feat = {
+ .ver_major = VER_1_X_NO_RPM,
+ .crit_int = 0,
+ .combo_int = 0,
+ .adc = 1,
+ .srot_split = 1,
+ .max_sensors = 11,
+ .trip_min_temp = -40000,
+ .trip_max_temp = 120000,
+};
+
static const struct reg_field tsens_v1_regfields[MAX_REGFIELDS] = {
/* ----- SROT ------ */
/* VERSION */
@@ -150,6 +161,43 @@ static int __init init_8956(struct tsens_priv *priv) {
return init_common(priv);
}
+static int __init init_tsens_v1_no_rpm(struct tsens_priv *priv)
+{
+ int i, ret;
+ u32 mask = 0;
+
+ ret = init_common(priv);
+ if (ret < 0) {
+ dev_err(priv->dev, "Init common failed %d\n", ret);
+ return ret;
+ }
+
+ ret = regmap_field_write(priv->rf[TSENS_SW_RST], 1);
+ if (ret) {
+ dev_err(priv->dev, "Reset failed\n");
+ return ret;
+ }
+
+ for (i = 0; i < priv->num_sensors; i++)
+ mask |= BIT(priv->sensor[i].hw_id);
+
+ ret = regmap_field_update_bits(priv->rf[SENSOR_EN], mask, mask);
+ if (ret) {
+ dev_err(priv->dev, "Sensor Enable failed\n");
+ return ret;
+ }
+
+ ret = regmap_field_write(priv->rf[TSENS_EN], 1);
+ if (ret) {
+ dev_err(priv->dev, "Enable failed\n");
+ return ret;
+ }
+
+ ret = regmap_field_write(priv->rf[TSENS_SW_RST], 0);
+
+ return ret;
+}
+
static const struct tsens_ops ops_generic_v1 = {
.init = init_common,
.calibrate = calibrate_v1,
diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
index 43b388bcc7d6..2cda92f3d125 100644
--- a/drivers/thermal/qcom/tsens.c
+++ b/drivers/thermal/qcom/tsens.c
@@ -975,10 +975,16 @@ int __init init_common(struct tsens_priv *priv)
ret = regmap_field_read(priv->rf[TSENS_EN], &enabled);
if (ret)
goto err_put_device;
- if (!enabled && (tsens_version(priv) != VER_2_X_NO_RPM)) {
- dev_err(dev, "%s: device not enabled\n", __func__);
- ret = -ENODEV;
- goto err_put_device;
+ if (!enabled) {
+ switch (tsens_version(priv)) {
+ case VER_1_X_NO_RPM:
+ case VER_2_X_NO_RPM:
+ break;
+ default:
+ dev_err(dev, "%s: device not enabled\n", __func__);
+ ret = -ENODEV;
+ goto err_put_device;
+ }
}
priv->rf[SENSOR_EN] = devm_regmap_field_alloc(dev, priv->srot_map,
diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h
index 336bc868fd7c..e3cb611426c4 100644
--- a/drivers/thermal/qcom/tsens.h
+++ b/drivers/thermal/qcom/tsens.h
@@ -34,6 +34,7 @@ enum tsens_ver {
VER_0 = 0,
VER_0_1,
VER_1_X,
+ VER_1_X_NO_RPM,
VER_2_X,
VER_2_X_NO_RPM,
};
--
2.48.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v9 5/6] thermal: qcom: tsens: Add support for IPQ5018 tsens
[not found] <20250228051521.138214-1-george.moussalem@outlook.com>
` (4 preceding siblings ...)
2025-02-28 5:11 ` [PATCH v9 4/6] thermal: qcom: tsens: add support for tsens v1 without RPM George Moussalem
@ 2025-02-28 5:11 ` George Moussalem
2025-02-28 5:11 ` [PATCH v9 6/6] arm64: dts: qcom: ipq5018: Add tsens node George Moussalem
6 siblings, 0 replies; 16+ messages in thread
From: George Moussalem @ 2025-02-28 5:11 UTC (permalink / raw)
To: linux-arm-msm, linux-pm, devicetree, daniel.lezcano, rafael,
amitk, thara.gopinath, dmitry.baryshkov, robh, krzk+dt,
quic_srichara
Cc: George Moussalem
From: Sricharan Ramabadhran <quic_srichara@quicinc.com>
IPQ5018 has tsens IP V1.0, 5 sensors of which 4 are in use and 1
interrupt. The IP does not have a RPM, hence use init routine for
tsens v1.0 without RPM which does not early enable.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
drivers/thermal/qcom/tsens-v1.c | 14 ++++++++++++++
drivers/thermal/qcom/tsens.c | 3 +++
drivers/thermal/qcom/tsens.h | 3 +++
3 files changed, 20 insertions(+)
diff --git a/drivers/thermal/qcom/tsens-v1.c b/drivers/thermal/qcom/tsens-v1.c
index 877b27274fd2..27360e70d62a 100644
--- a/drivers/thermal/qcom/tsens-v1.c
+++ b/drivers/thermal/qcom/tsens-v1.c
@@ -242,3 +242,17 @@ struct tsens_plat_data data_8976 = {
.feat = &tsens_v1_feat,
.fields = tsens_v1_regfields,
};
+
+const struct tsens_ops ops_ipq5018 = {
+ .init = init_tsens_v1_no_rpm,
+ .calibrate = tsens_calibrate_common,
+ .get_temp = get_temp_tsens_valid,
+};
+
+const struct tsens_plat_data data_ipq5018 = {
+ .num_sensors = 5,
+ .ops = &ops_ipq5018,
+ .hw_ids = (unsigned int []){0, 1, 2, 3, 4},
+ .feat = &tsens_v1_no_rpm_feat,
+ .fields = tsens_v1_regfields,
+};
diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
index 2cda92f3d125..a2422ebee816 100644
--- a/drivers/thermal/qcom/tsens.c
+++ b/drivers/thermal/qcom/tsens.c
@@ -1108,6 +1108,9 @@ static SIMPLE_DEV_PM_OPS(tsens_pm_ops, tsens_suspend, tsens_resume);
static const struct of_device_id tsens_table[] = {
{
+ .compatible = "qcom,ipq5018-tsens",
+ .data = &data_ipq5018,
+ }, {
.compatible = "qcom,ipq5332-tsens",
.data = &data_ipq5332,
}, {
diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h
index e3cb611426c4..2a7afa4c899b 100644
--- a/drivers/thermal/qcom/tsens.h
+++ b/drivers/thermal/qcom/tsens.h
@@ -652,6 +652,9 @@ extern struct tsens_plat_data data_8226, data_8909, data_8916, data_8939, data_8
/* TSENS v1 targets */
extern struct tsens_plat_data data_tsens_v1, data_8937, data_8976, data_8956;
+/* TSENS v1 with no RPM targets */
+extern const struct tsens_plat_data data_ipq5018;
+
/* TSENS v2 targets */
extern struct tsens_plat_data data_8996, data_ipq8074, data_tsens_v2;
extern const struct tsens_plat_data data_ipq5332, data_ipq5424;
--
2.48.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v9 6/6] arm64: dts: qcom: ipq5018: Add tsens node
[not found] <20250228051521.138214-1-george.moussalem@outlook.com>
` (5 preceding siblings ...)
2025-02-28 5:11 ` [PATCH v9 5/6] thermal: qcom: tsens: Add support for IPQ5018 tsens George Moussalem
@ 2025-02-28 5:11 ` George Moussalem
2025-07-16 19:40 ` (subset) " Bjorn Andersson
6 siblings, 1 reply; 16+ messages in thread
From: George Moussalem @ 2025-02-28 5:11 UTC (permalink / raw)
To: linux-arm-msm, linux-pm, devicetree, daniel.lezcano, rafael,
amitk, thara.gopinath, dmitry.baryshkov, robh, krzk+dt,
quic_srichara
Cc: George Moussalem
From: Sricharan Ramabadhran <quic_srichara@quicinc.com>
IPQ5018 has tsens V1.0 IP with 5 sensors, though 4 are in use.
There is no RPM, so tsens has to be manually enabled. Adding the tsens
and nvmem nodes and adding 4 thermal sensors (zones). With the
critical temperature being 120'C and action is to reboot.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
arch/arm64/boot/dts/qcom/ipq5018.dtsi | 169 ++++++++++++++++++++++++++
1 file changed, 169 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/ipq5018.dtsi b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
index 8914f2ef0bc4..91c062cce903 100644
--- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
@@ -147,6 +147,117 @@ usbphy0: phy@5b000 {
status = "disabled";
};
+ qfprom: qfprom@a0000 {
+ compatible = "qcom,ipq5018-qfprom", "qcom,qfprom";
+ reg = <0x000a0000 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ tsens_mode: mode@249 {
+ reg = <0x249 0x1>;
+ bits = <0 3>;
+ };
+
+ tsens_base1: base1@249 {
+ reg = <0x249 0x2>;
+ bits = <3 8>;
+ };
+
+ tsens_base2: base2@24a {
+ reg = <0x24a 0x2>;
+ bits = <3 8>;
+ };
+
+ tsens_s0_p1: s0-p1@24b {
+ reg = <0x24b 0x2>;
+ bits = <2 6>;
+ };
+
+ tsens_s0_p2: s0-p2@24c {
+ reg = <0x24c 0x1>;
+ bits = <1 6>;
+ };
+
+ tsens_s1_p1: s1-p1@24c {
+ reg = <0x24c 0x2>;
+ bits = <7 6>;
+ };
+
+ tsens_s1_p2: s1-p2@24d {
+ reg = <0x24d 0x2>;
+ bits = <5 6>;
+ };
+
+ tsens_s2_p1: s2-p1@24e {
+ reg = <0x24e 0x2>;
+ bits = <3 6>;
+ };
+
+ tsens_s2_p2: s2-p2@24f {
+ reg = <0x24f 0x1>;
+ bits = <1 6>;
+ };
+
+ tsens_s3_p1: s3-p1@24f {
+ reg = <0x24f 0x2>;
+ bits = <7 6>;
+ };
+
+ tsens_s3_p2: s3-p2@250 {
+ reg = <0x250 0x2>;
+ bits = <5 6>;
+ };
+
+ tsens_s4_p1: s4-p1@251 {
+ reg = <0x251 0x2>;
+ bits = <3 6>;
+ };
+
+ tsens_s4_p2: s4-p2@254 {
+ reg = <0x254 0x1>;
+ bits = <0 6>;
+ };
+ };
+
+ tsens: thermal-sensor@4a9000 {
+ compatible = "qcom,ipq5018-tsens";
+ reg = <0x004a9000 0x1000>, /* TM */
+ <0x004a8000 0x1000>; /* SROT */
+
+ nvmem-cells = <&tsens_mode>,
+ <&tsens_base1>,
+ <&tsens_base2>,
+ <&tsens_s0_p1>,
+ <&tsens_s0_p2>,
+ <&tsens_s1_p1>,
+ <&tsens_s1_p2>,
+ <&tsens_s2_p1>,
+ <&tsens_s2_p2>,
+ <&tsens_s3_p1>,
+ <&tsens_s3_p2>,
+ <&tsens_s4_p1>,
+ <&tsens_s4_p2>;
+
+ nvmem-cell-names = "mode",
+ "base1",
+ "base2",
+ "s0_p1",
+ "s0_p2",
+ "s1_p1",
+ "s1_p2",
+ "s2_p1",
+ "s2_p2",
+ "s3_p1",
+ "s3_p2",
+ "s4_p1",
+ "s4_p2";
+
+ interrupts = <GIC_SPI 184 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "uplow";
+ #qcom,sensors = <5>;
+ #thermal-sensor-cells = <1>;
+ };
+
tlmm: pinctrl@1000000 {
compatible = "qcom,ipq5018-tlmm";
reg = <0x01000000 0x300000>;
@@ -389,6 +500,64 @@ frame@b128000 {
};
};
+ thermal-zones {
+ cpu-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens 2>;
+
+ trips {
+ cpu-critical {
+ temperature = <120000>;
+ hysteresis = <2>;
+ type = "critical";
+ };
+ };
+ };
+
+ gephy-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens 4>;
+
+ trips {
+ gephy-critical {
+ temperature = <120000>;
+ hysteresis = <2>;
+ type = "critical";
+ };
+ };
+ };
+
+ top-glue-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens 3>;
+
+ trips {
+ top_glue-critical {
+ temperature = <120000>;
+ hysteresis = <2>;
+ type = "critical";
+ };
+ };
+ };
+
+ ubi32-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens 1>;
+
+ trips {
+ ubi32-critical {
+ temperature = <120000>;
+ hysteresis = <2>;
+ type = "critical";
+ };
+ };
+ };
+ };
+
timer {
compatible = "arm,armv8-timer";
interrupts = <GIC_PPI 2 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
--
2.48.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v9 3/6] thermal: qcom: tsens: update conditions to strictly evaluate for IP v2+
2025-02-28 5:11 ` [PATCH v9 3/6] thermal: qcom: tsens: update conditions to strictly evaluate for IP v2+ George Moussalem
@ 2025-02-28 5:58 ` Dmitry Baryshkov
2025-03-02 11:12 ` Amit Kucheria
1 sibling, 0 replies; 16+ messages in thread
From: Dmitry Baryshkov @ 2025-02-28 5:58 UTC (permalink / raw)
To: George Moussalem
Cc: linux-arm-msm, linux-pm, devicetree, daniel.lezcano, rafael,
amitk, thara.gopinath, robh, krzk+dt, quic_srichara
On Fri, Feb 28, 2025 at 09:11:36AM +0400, George Moussalem wrote:
> TSENS v2.0+ leverage features not available to prior versions such as
> updated interrupts init routine, masked interrupts, and watchdog.
> Currently, the checks in place evaluate whether the IP version is greater
> than v1 which invalidates when updates to v1 or v1 minor versions are
> implemented. As such, update the conditional statements to strictly
> evaluate whether the version is greater than or equal to v2 (inclusive).
>
> Signed-off-by: George Moussalem <george.moussalem@outlook.com>
> ---
> drivers/thermal/qcom/tsens.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v9 4/6] thermal: qcom: tsens: add support for tsens v1 without RPM
2025-02-28 5:11 ` [PATCH v9 4/6] thermal: qcom: tsens: add support for tsens v1 without RPM George Moussalem
@ 2025-02-28 5:59 ` Dmitry Baryshkov
0 siblings, 0 replies; 16+ messages in thread
From: Dmitry Baryshkov @ 2025-02-28 5:59 UTC (permalink / raw)
To: George Moussalem
Cc: linux-arm-msm, linux-pm, devicetree, daniel.lezcano, rafael,
amitk, thara.gopinath, robh, krzk+dt, quic_srichara
On Fri, Feb 28, 2025 at 09:11:37AM +0400, George Moussalem wrote:
> Adding generic support for SoCs with tsens v1.0 IP with no RPM.
> Due to lack of RPM, tsens has to be reset and enabled in the driver
> init. SoCs can have support for more sensors than those which will
> actually be enabled. As such, init will only enable those explicitly
> added to the hw_ids array.
>
> Co-developed-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
> Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
> Signed-off-by: George Moussalem <george.moussalem@outlook.com>
> ---
> drivers/thermal/qcom/tsens-v1.c | 48 +++++++++++++++++++++++++++++++++
> drivers/thermal/qcom/tsens.c | 14 +++++++---
> drivers/thermal/qcom/tsens.h | 1 +
> 3 files changed, 59 insertions(+), 4 deletions(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v9 3/6] thermal: qcom: tsens: update conditions to strictly evaluate for IP v2+
2025-02-28 5:11 ` [PATCH v9 3/6] thermal: qcom: tsens: update conditions to strictly evaluate for IP v2+ George Moussalem
2025-02-28 5:58 ` Dmitry Baryshkov
@ 2025-03-02 11:12 ` Amit Kucheria
1 sibling, 0 replies; 16+ messages in thread
From: Amit Kucheria @ 2025-03-02 11:12 UTC (permalink / raw)
To: George Moussalem
Cc: linux-arm-msm, linux-pm, devicetree, daniel.lezcano, rafael,
thara.gopinath, dmitry.baryshkov, robh, krzk+dt, quic_srichara
On Fri, Feb 28, 2025 at 10:46 AM George Moussalem
<george.moussalem@outlook.com> wrote:
>
> TSENS v2.0+ leverage features not available to prior versions such as
> updated interrupts init routine, masked interrupts, and watchdog.
> Currently, the checks in place evaluate whether the IP version is greater
> than v1 which invalidates when updates to v1 or v1 minor versions are
> implemented. As such, update the conditional statements to strictly
> evaluate whether the version is greater than or equal to v2 (inclusive).
>
> Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Reviewed-by: Amit Kucheria <amitk@kernel.org>
> ---
> drivers/thermal/qcom/tsens.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
> index 1f5d4de017d9..43b388bcc7d6 100644
> --- a/drivers/thermal/qcom/tsens.c
> +++ b/drivers/thermal/qcom/tsens.c
> @@ -447,7 +447,7 @@ static void tsens_set_interrupt(struct tsens_priv *priv, u32 hw_id,
> dev_dbg(priv->dev, "[%u] %s: %s -> %s\n", hw_id, __func__,
> irq_type ? ((irq_type == 1) ? "UP" : "CRITICAL") : "LOW",
> enable ? "en" : "dis");
> - if (tsens_version(priv) > VER_1_X)
> + if (tsens_version(priv) >= VER_2_X)
> tsens_set_interrupt_v2(priv, hw_id, irq_type, enable);
> else
> tsens_set_interrupt_v1(priv, hw_id, irq_type, enable);
> @@ -499,7 +499,7 @@ static int tsens_read_irq_state(struct tsens_priv *priv, u32 hw_id,
> ret = regmap_field_read(priv->rf[LOW_INT_CLEAR_0 + hw_id], &d->low_irq_clear);
> if (ret)
> return ret;
> - if (tsens_version(priv) > VER_1_X) {
> + if (tsens_version(priv) >= VER_2_X) {
> ret = regmap_field_read(priv->rf[UP_INT_MASK_0 + hw_id], &d->up_irq_mask);
> if (ret)
> return ret;
> @@ -543,7 +543,7 @@ static int tsens_read_irq_state(struct tsens_priv *priv, u32 hw_id,
>
> static inline u32 masked_irq(u32 hw_id, u32 mask, enum tsens_ver ver)
> {
> - if (ver > VER_1_X)
> + if (ver >= VER_2_X)
> return mask & (1 << hw_id);
>
> /* v1, v0.1 don't have a irq mask register */
> @@ -733,7 +733,7 @@ static int tsens_set_trips(struct thermal_zone_device *tz, int low, int high)
> static int tsens_enable_irq(struct tsens_priv *priv)
> {
> int ret;
> - int val = tsens_version(priv) > VER_1_X ? 7 : 1;
> + int val = tsens_version(priv) >= VER_2_X ? 7 : 1;
>
> ret = regmap_field_write(priv->rf[INT_EN], val);
> if (ret < 0)
> @@ -1040,7 +1040,7 @@ int __init init_common(struct tsens_priv *priv)
> }
> }
>
> - if (tsens_version(priv) > VER_1_X && ver_minor > 2) {
> + if (tsens_version(priv) >= VER_2_X && ver_minor > 2) {
> /* Watchdog is present only on v2.3+ */
> priv->feat->has_watchdog = 1;
> for (i = WDOG_BARK_STATUS; i <= CC_MON_MASK; i++) {
> --
> 2.48.1
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: (subset) [PATCH v9 0/6] Add support for IPQ5018 tsens
2025-02-28 5:11 ` [PATCH v9 0/6] Add support for IPQ5018 tsens George Moussalem
@ 2025-03-07 17:04 ` Srinivas Kandagatla
2025-04-25 12:11 ` George Moussalem
` (2 subsequent siblings)
3 siblings, 0 replies; 16+ messages in thread
From: Srinivas Kandagatla @ 2025-03-07 17:04 UTC (permalink / raw)
To: linux-arm-msm, linux-pm, devicetree, daniel.lezcano, rafael,
amitk, thara.gopinath, dmitry.baryshkov, robh, krzk+dt,
quic_srichara, George Moussalem
On Fri, 28 Feb 2025 09:11:33 +0400, George Moussalem wrote:
> IPQ5018 has tsens V1.0 IP with 5 sensors, of which 4 are in use,
> and 1 interrupt. There is no RPM present in the soc to do tsens early
> enable. Adding support for the same here.
>
> Last patch series sent by Qualcomm dates back to Sep 22, 2023.
> Since I'm working on OpenWrt support for IPQ5018 based boards (routers)
> and Sricharan Ramabadhran <quic_srichara@quicinc.com> in below email
> confirmed this SoC is still active, I'm continuing the efforts to send
> patches upstream for Linux kernel support.
> https://lore.kernel.org/all/63dc4054-b1e2-4e7a-94e7-643beb26a6f3@quicinc.com/
>
> [...]
Applied, thanks!
[1/6] dt-bindings: nvmem: Add compatible for IPQ5018
commit: eb7eeabf64d2b2ea3ae562e85f09fb2593a6da2f
Best regards,
--
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v9 0/6] Add support for IPQ5018 tsens
2025-02-28 5:11 ` [PATCH v9 0/6] Add support for IPQ5018 tsens George Moussalem
2025-03-07 17:04 ` (subset) " Srinivas Kandagatla
@ 2025-04-25 12:11 ` George Moussalem
2025-05-14 10:43 ` Daniel Lezcano
2025-07-16 19:40 ` Bjorn Andersson
3 siblings, 0 replies; 16+ messages in thread
From: George Moussalem @ 2025-04-25 12:11 UTC (permalink / raw)
To: linux-arm-msm, linux-pm, devicetree, daniel.lezcano, rafael,
amitk, thara.gopinath, dmitry.baryshkov, robh, krzk+dt,
quic_srichara
As FYI, as I don't see the email that was sent on this main thread,
patch 1 has been applied by Srinivas on March 7 (thanks!):
https://lore.kernel.org/linux-pm/174136704062.10922.6561617829094107048.b4-ty@linaro.org/
[1/6] dt-bindings: nvmem: Add compatible for IPQ5018
commit: eb7eeabf64d2b2ea3ae562e85f09fb2593a6da2f
On 2/28/25 09:11, George Moussalem wrote:
> IPQ5018 has tsens V1.0 IP with 5 sensors, of which 4 are in use,
> and 1 interrupt. There is no RPM present in the soc to do tsens early
> enable. Adding support for the same here.
>
> Last patch series sent by Qualcomm dates back to Sep 22, 2023.
> Since I'm working on OpenWrt support for IPQ5018 based boards (routers)
> and Sricharan Ramabadhran <quic_srichara@quicinc.com> in below email
> confirmed this SoC is still active, I'm continuing the efforts to send
> patches upstream for Linux kernel support.
> https://lore.kernel.org/all/63dc4054-b1e2-4e7a-94e7-643beb26a6f3@quicinc.com/
>
> [v9]
> *) Updated checks in tsens to more strictly evaluate for v2+ upon enabling
> v2 features as suggsted by Dmitry.
> *) Split patch 3 into two, one to update conditional statements as
> mentioned above and the other to implement tsens IP v1 without RPM.
> *) Added back Dmitry's RB tag on patch 6 which wasn't carried over
> from v7 to v8
> *) Link to v8: https://lore.kernel.org/all/DS7PR19MB88833F7A9C8F4FC484977BA69DCD2@DS7PR19MB8883.namprd19.prod.outlook.com/
>
> [v8]
> *) Tsens V1 uses v1 interrupts and watchdog is not present (only on v2.3+).
> As such, replaced VER_1_X with VER_1_X_NO_RPM in conditons to ensure
> v1 interrupts are set and watchdog isn't enabled.
> *) Tested on Linksys MX2000 and SPNMX56
> *) Link to v7: https://lore.kernel.org/all/DS7PR19MB88831624F11516945C63400F9DC22@DS7PR19MB8883.namprd19.prod.outlook.com/
>
> [v7]
> *) Updated cover letter
> *) Replaced patch 3 with a new one to add support for tsens v1.0 with
> no RPM and removed Dmitry's 'Reviewed-by tag
> *) Refactored patch 4 and split support for IPQ5018 from support for
> tsens v1.0 without RPM. As such, also removed Dmitry's RB tag.
> *) Depends on patch 1 and 2 from patch series to add support for
> IQP5332 and IPQ5424 applied on Feb 11 2025:
> https://patchwork.kernel.org/project/linux-arm-msm/cover/20250210120436.821684-1-quic_mmanikan@quicinc.com/
> *) Link to v6: https://lore.kernel.org/all/DS7PR19MB88838833C0A3BFC3C7FC481F9DC02@DS7PR19MB8883.namprd19.prod.outlook.com/
>
> [v6]
> *) Include (this) cover letter
> *) Picked up Dmitry's Reviewed-by tag on patch 5
> *) Link to v5: https://lore.kernel.org/all/DS7PR19MB88832FDED68D3EBB0EE7E99F9DC72@DS7PR19MB8883.namprd19.prod.outlook.com/
>
> [v5]
> *) Adjusted commit messages to indicate IPQ5018 has 5 sensors of
> which 4 are described and in use as per downstream driver and dts.
> *) Padded addresses of tsens and qfprom nodes with leading zeros.
> *) Link to v4: https://lore.kernel.org/all/DS7PR19MB8883BE38C2B500D03213747A9DC72@DS7PR19MB8883.namprd19.prod.outlook.com/
>
> [v4]
> *) Documented ipq5018 in qcom,qfprom bindings
> *) Constrained ipq5018-tsens to one interrupt with description
> *) Added Rob's Acked-by tag
> *) Added Dmitry's Reviewed-by tag
> *) Fixed modpost warning: added __init to init_common
> *) Sorted tsens nodes by address
> *) Sorted thermal-zones nodes by name
> *) Link to v3: https://lore.kernel.org/all/20230922115116.2748804-1-srichara@win-platform-upstream01.qualcomm.com/
>
> [v3]
> *) Added the tsens-ipq5018 as new binding without rpm
> *) Added Dmitry's Reviewed tag
> *) Fixed Dmitry's comments for error checks in init_ipq5018
> *) Ordered the qfprom device node properties
> *) Link to v2: https://lore.kernel.org/all/20230915121504.806672-1-quic_srichara@quicinc.com/
>
> [v2]
> *) Sorted the compatible and removed example
> *) Fixed the name for new tsens_feature
> *) Used tsend_calibrate_common instead of legacy
> and addressed comments from Dmitry.
> *) Squashed patch 3 & 4
> *) Fixed node names, order and added qfprom cells
> for points seprately
> *) Squashed patch 6 & 7
> *) Link to v1: https://lore.kernel.org/all/1693250307-8910-1-git-send-email-quic_srichara@quicinc.com/
>
>
> George Moussalem (2):
> thermal: qcom: tsens: update conditions to strictly evaluate for IP
> v2+
> thermal: qcom: tsens: add support for tsens v1 without RPM
>
> Sricharan Ramabadhran (4):
> dt-bindings: nvmem: Add compatible for IPQ5018
> dt-bindings: thermal: qcom-tsens: Add ipq5018 compatible
> thermal: qcom: tsens: Add support for IPQ5018 tsens
> arm64: dts: qcom: ipq5018: Add tsens node
>
> .../bindings/nvmem/qcom,qfprom.yaml | 1 +
> .../bindings/thermal/qcom-tsens.yaml | 2 +
> arch/arm64/boot/dts/qcom/ipq5018.dtsi | 169 ++++++++++++++++++
> drivers/thermal/qcom/tsens-v1.c | 62 +++++++
> drivers/thermal/qcom/tsens.c | 27 ++-
> drivers/thermal/qcom/tsens.h | 4 +
> 6 files changed, 256 insertions(+), 9 deletions(-)
>
Best regards,
George
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v9 0/6] Add support for IPQ5018 tsens
2025-02-28 5:11 ` [PATCH v9 0/6] Add support for IPQ5018 tsens George Moussalem
2025-03-07 17:04 ` (subset) " Srinivas Kandagatla
2025-04-25 12:11 ` George Moussalem
@ 2025-05-14 10:43 ` Daniel Lezcano
2025-07-16 19:40 ` Bjorn Andersson
3 siblings, 0 replies; 16+ messages in thread
From: Daniel Lezcano @ 2025-05-14 10:43 UTC (permalink / raw)
To: George Moussalem
Cc: linux-arm-msm, linux-pm, devicetree, rafael, amitk,
thara.gopinath, dmitry.baryshkov, robh, krzk+dt, quic_srichara
On Fri, Feb 28, 2025 at 09:11:33AM +0400, George Moussalem wrote:
> IPQ5018 has tsens V1.0 IP with 5 sensors, of which 4 are in use,
> and 1 interrupt. There is no RPM present in the soc to do tsens early
> enable. Adding support for the same here.
>
> Last patch series sent by Qualcomm dates back to Sep 22, 2023.
> Since I'm working on OpenWrt support for IPQ5018 based boards (routers)
> and Sricharan Ramabadhran <quic_srichara@quicinc.com> in below email
> confirmed this SoC is still active, I'm continuing the efforts to send
> patches upstream for Linux kernel support.
> https://lore.kernel.org/all/63dc4054-b1e2-4e7a-94e7-643beb26a6f3@quicinc.com/
Applied, patches 2,3,4,5
Thanks!
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v9 0/6] Add support for IPQ5018 tsens
2025-02-28 5:11 ` [PATCH v9 0/6] Add support for IPQ5018 tsens George Moussalem
` (2 preceding siblings ...)
2025-05-14 10:43 ` Daniel Lezcano
@ 2025-07-16 19:40 ` Bjorn Andersson
3 siblings, 0 replies; 16+ messages in thread
From: Bjorn Andersson @ 2025-07-16 19:40 UTC (permalink / raw)
To: linux-arm-msm, linux-pm, devicetree, daniel.lezcano, rafael,
amitk, thara.gopinath, robh, krzk+dt, quic_srichara,
Dmitry Baryshkov, George Moussalem
On Fri, 28 Feb 2025 09:11:33 +0400, George Moussalem wrote:
> IPQ5018 has tsens V1.0 IP with 5 sensors, of which 4 are in use,
> and 1 interrupt. There is no RPM present in the soc to do tsens early
> enable. Adding support for the same here.
>
> Last patch series sent by Qualcomm dates back to Sep 22, 2023.
> Since I'm working on OpenWrt support for IPQ5018 based boards (routers)
> and Sricharan Ramabadhran <quic_srichara@quicinc.com> in below email
> confirmed this SoC is still active, I'm continuing the efforts to send
> patches upstream for Linux kernel support.
> https://lore.kernel.org/all/63dc4054-b1e2-4e7a-94e7-643beb26a6f3@quicinc.com/
>
> [...]
Applied, thanks!
[1/6] dt-bindings: nvmem: Add compatible for IPQ5018
(no commit info)
[2/6] dt-bindings: thermal: qcom-tsens: Add ipq5018 compatible
(no commit info)
[3/6] thermal: qcom: tsens: update conditions to strictly evaluate for IP v2+
(no commit info)
[4/6] thermal: qcom: tsens: add support for tsens v1 without RPM
(no commit info)
[5/6] thermal: qcom: tsens: Add support for IPQ5018 tsens
(no commit info)
[6/6] arm64: dts: qcom: ipq5018: Add tsens node
commit: 767d6b3ecc292c83442ca84e5e22e38adea9733d
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: (subset) [PATCH v9 6/6] arm64: dts: qcom: ipq5018: Add tsens node
2025-02-28 5:11 ` [PATCH v9 6/6] arm64: dts: qcom: ipq5018: Add tsens node George Moussalem
@ 2025-07-16 19:40 ` Bjorn Andersson
0 siblings, 0 replies; 16+ messages in thread
From: Bjorn Andersson @ 2025-07-16 19:40 UTC (permalink / raw)
To: linux-arm-msm, linux-pm, devicetree, daniel.lezcano, rafael,
amitk, thara.gopinath, robh, krzk+dt, quic_srichara,
Dmitry Baryshkov, George Moussalem
On Fri, 28 Feb 2025 09:11:39 +0400, George Moussalem wrote:
> IPQ5018 has tsens V1.0 IP with 5 sensors, though 4 are in use.
> There is no RPM, so tsens has to be manually enabled. Adding the tsens
> and nvmem nodes and adding 4 thermal sensors (zones). With the
> critical temperature being 120'C and action is to reboot.
>
>
Applied, thanks!
[6/6] arm64: dts: qcom: ipq5018: Add tsens node
commit: 767d6b3ecc292c83442ca84e5e22e38adea9733d
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2025-07-16 19:41 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20250228051521.138214-1-george.moussalem@outlook.com>
2025-02-28 5:11 ` [PATCH v9 0/6] Add support for IPQ5018 tsens George Moussalem
2025-03-07 17:04 ` (subset) " Srinivas Kandagatla
2025-04-25 12:11 ` George Moussalem
2025-05-14 10:43 ` Daniel Lezcano
2025-07-16 19:40 ` Bjorn Andersson
2025-02-28 5:11 ` [PATCH v9 1/6] dt-bindings: nvmem: Add compatible for IPQ5018 George Moussalem
2025-02-28 5:11 ` [PATCH v9 2/6] dt-bindings: thermal: qcom-tsens: Add ipq5018 compatible George Moussalem
2025-02-28 5:11 ` [PATCH v9 3/6] thermal: qcom: tsens: update conditions to strictly evaluate for IP v2+ George Moussalem
2025-02-28 5:58 ` Dmitry Baryshkov
2025-03-02 11:12 ` Amit Kucheria
2025-02-28 5:11 ` [PATCH v9 4/6] thermal: qcom: tsens: add support for tsens v1 without RPM George Moussalem
2025-02-28 5:59 ` Dmitry Baryshkov
2025-02-28 5:11 ` [PATCH v9 5/6] thermal: qcom: tsens: Add support for IPQ5018 tsens George Moussalem
2025-02-28 5:11 ` [PATCH v9 6/6] arm64: dts: qcom: ipq5018: Add tsens node George Moussalem
2025-07-16 19:40 ` (subset) " Bjorn Andersson
2025-02-28 5:11 [PATCH v9 0/6] Add support for IPQ5018 tsens George Moussalem
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).