All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 1/5] dt-bindings: nvmem: Add compatible for IPQ5018
       [not found] <20250224061224.3342-1-george.moussalem@outlook.com>
@ 2025-02-24  6:12 ` George Moussalem
  2025-02-24  9:19   ` Krzysztof Kozlowski
  2025-02-24  6:12 ` [PATCH v6 2/5] dt-bindings: thermal: qcom-tsens: Add ipq5018 compatible George Moussalem
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: George Moussalem @ 2025-02-24  6:12 UTC (permalink / raw)
  To: linux-arm-msm, linux-pm, devicetree, 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.39.5


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v6 2/5] dt-bindings: thermal: qcom-tsens: Add ipq5018 compatible
       [not found] <20250224061224.3342-1-george.moussalem@outlook.com>
  2025-02-24  6:12 ` [PATCH v6 1/5] dt-bindings: nvmem: Add compatible for IPQ5018 George Moussalem
@ 2025-02-24  6:12 ` George Moussalem
  2025-02-24  6:12 ` [PATCH v6 3/5] thermal: drivers: qcom: Add new feat for soc without rpm George Moussalem
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: George Moussalem @ 2025-02-24  6:12 UTC (permalink / raw)
  To: linux-arm-msm, linux-pm, devicetree, 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 b9829bb22cc0..8bc468e44f85 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
@@ -237,6 +238,7 @@ allOf:
         compatible:
           contains:
             enum:
+              - qcom,ipq5018-tsens
               - qcom,ipq8064-tsens
               - qcom,msm8960-tsens
               - qcom,tsens-v0_1
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v6 3/5] thermal: drivers: qcom: Add new feat for soc without rpm
       [not found] <20250224061224.3342-1-george.moussalem@outlook.com>
  2025-02-24  6:12 ` [PATCH v6 1/5] dt-bindings: nvmem: Add compatible for IPQ5018 George Moussalem
  2025-02-24  6:12 ` [PATCH v6 2/5] dt-bindings: thermal: qcom-tsens: Add ipq5018 compatible George Moussalem
@ 2025-02-24  6:12 ` George Moussalem
  2025-02-24  9:08   ` Manikanta Mylavarapu
  2025-02-24  6:12 ` [PATCH v6 4/5] thermal: qcom: tsens: Add support for IPQ5018 tsens George Moussalem
  2025-02-24  6:12 ` [PATCH v6 5/5] arm64: dts: qcom: ipq5018: Add tsens node George Moussalem
  4 siblings, 1 reply; 14+ messages in thread
From: George Moussalem @ 2025-02-24  6:12 UTC (permalink / raw)
  To: linux-arm-msm, linux-pm, devicetree, amitk, thara.gopinath,
	dmitry.baryshkov, robh, krzk+dt, quic_srichara
  Cc: George Moussalem

From: Sricharan Ramabadhran <quic_srichara@quicinc.com>

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>
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
 drivers/thermal/qcom/tsens.c | 2 +-
 drivers/thermal/qcom/tsens.h | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
index 3aa3736181aa..a25ca17adf1a 100644
--- a/drivers/thermal/qcom/tsens.c
+++ b/drivers/thermal/qcom/tsens.c
@@ -975,7 +975,7 @@ 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) {
+	if (!enabled && !(priv->feat->ignore_enable)) {
 		dev_err(dev, "%s: device not enabled\n", __func__);
 		ret = -ENODEV;
 		goto err_put_device;
diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h
index 7b36a0318fa6..90bf11fba563 100644
--- 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;
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v6 4/5] thermal: qcom: tsens: Add support for IPQ5018 tsens
       [not found] <20250224061224.3342-1-george.moussalem@outlook.com>
                   ` (2 preceding siblings ...)
  2025-02-24  6:12 ` [PATCH v6 3/5] thermal: drivers: qcom: Add new feat for soc without rpm George Moussalem
@ 2025-02-24  6:12 ` George Moussalem
  2025-02-24  6:12 ` [PATCH v6 5/5] arm64: dts: qcom: ipq5018: Add tsens node George Moussalem
  4 siblings, 0 replies; 14+ messages in thread
From: George Moussalem @ 2025-02-24  6:12 UTC (permalink / raw)
  To: linux-arm-msm, linux-pm, devicetree, 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 soc does not have a RPM, hence tsens has to be
reset and enabled in the driver init. Adding the driver support for same.

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 | 60 +++++++++++++++++++++++++++++++++
 drivers/thermal/qcom/tsens.c    |  3 ++
 drivers/thermal/qcom/tsens.h    |  2 +-
 3 files changed, 64 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/qcom/tsens-v1.c b/drivers/thermal/qcom/tsens-v1.c
index 1a7874676f68..1f955acbc2cf 100644
--- a/drivers/thermal/qcom/tsens-v1.c
+++ b/drivers/thermal/qcom/tsens-v1.c
@@ -79,6 +79,18 @@ static struct tsens_features tsens_v1_feat = {
 	.trip_max_temp	= 120000,
 };
 
+static struct tsens_features tsens_v1_ipq5018_feat = {
+	.ver_major	= VER_1_X,
+	.crit_int	= 0,
+	.combo_int	= 0,
+	.adc		= 1,
+	.srot_split	= 1,
+	.max_sensors	= 11,
+	.trip_min_temp	= -40000,
+	.trip_max_temp	= 120000,
+	.ignore_enable	= 1,
+};
+
 static const struct reg_field tsens_v1_regfields[MAX_REGFIELDS] = {
 	/* ----- SROT ------ */
 	/* VERSION */
@@ -150,6 +162,41 @@ static int __init init_8956(struct tsens_priv *priv) {
 	return init_common(priv);
 }
 
+static int __init init_ipq5018(struct tsens_priv *priv)
+{
+	int ret;
+	u32 mask;
+
+	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;
+	}
+
+	mask = GENMASK(priv->num_sensors, 0);
+	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,
@@ -194,3 +241,16 @@ struct tsens_plat_data data_8976 = {
 	.feat		= &tsens_v1_feat,
 	.fields		= tsens_v1_regfields,
 };
+
+const struct tsens_ops ops_ipq5018 = {
+	.init		= init_ipq5018,
+	.calibrate	= tsens_calibrate_common,
+	.get_temp	= get_temp_tsens_valid,
+};
+
+struct tsens_plat_data data_ipq5018 = {
+	.num_sensors	= 5,
+	.ops		= &ops_ipq5018,
+	.feat		= &tsens_v1_ipq5018_feat,
+	.fields		= tsens_v1_regfields,
+};
diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
index a25ca17adf1a..5ccaa297d16d 100644
--- a/drivers/thermal/qcom/tsens.c
+++ b/drivers/thermal/qcom/tsens.c
@@ -1102,6 +1102,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,ipq8064-tsens",
 		.data = &data_8960,
 	}, {
diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h
index 90bf11fba563..f5c87facb552 100644
--- a/drivers/thermal/qcom/tsens.h
+++ b/drivers/thermal/qcom/tsens.h
@@ -650,7 +650,7 @@ extern struct tsens_plat_data data_8960;
 extern struct tsens_plat_data data_8226, data_8909, data_8916, data_8939, data_8974, data_9607;
 
 /* TSENS v1 targets */
-extern struct tsens_plat_data data_tsens_v1, data_8937, data_8976, data_8956;
+extern struct tsens_plat_data data_tsens_v1, data_8937, data_8976, data_8956, data_ipq5018;
 
 /* TSENS v2 targets */
 extern struct tsens_plat_data data_8996, data_ipq8074, data_tsens_v2;
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v6 5/5] arm64: dts: qcom: ipq5018: Add tsens node
       [not found] <20250224061224.3342-1-george.moussalem@outlook.com>
                   ` (3 preceding siblings ...)
  2025-02-24  6:12 ` [PATCH v6 4/5] thermal: qcom: tsens: Add support for IPQ5018 tsens George Moussalem
@ 2025-02-24  6:12 ` George Moussalem
  4 siblings, 0 replies; 14+ messages in thread
From: George Moussalem @ 2025-02-24  6:12 UTC (permalink / raw)
  To: linux-arm-msm, linux-pm, devicetree, 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.39.5


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH v6 3/5] thermal: drivers: qcom: Add new feat for soc without rpm
  2025-02-24  6:12 ` [PATCH v6 3/5] thermal: drivers: qcom: Add new feat for soc without rpm George Moussalem
@ 2025-02-24  9:08   ` Manikanta Mylavarapu
  2025-02-24 10:33     ` George Moussalem
  2025-02-24 13:45     ` Dmitry Baryshkov
  0 siblings, 2 replies; 14+ messages in thread
From: Manikanta Mylavarapu @ 2025-02-24  9:08 UTC (permalink / raw)
  To: George Moussalem, linux-arm-msm, linux-pm, devicetree, amitk,
	thara.gopinath, dmitry.baryshkov, robh, krzk+dt, quic_srichara



On 2/24/2025 11:42 AM, George Moussalem wrote:
> From: Sricharan Ramabadhran <quic_srichara@quicinc.com>
> 
> 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>
> Signed-off-by: George Moussalem <george.moussalem@outlook.com>
> ---
>  drivers/thermal/qcom/tsens.c | 2 +-
>  drivers/thermal/qcom/tsens.h | 3 +++
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
> index 3aa3736181aa..a25ca17adf1a 100644
> --- a/drivers/thermal/qcom/tsens.c
> +++ b/drivers/thermal/qcom/tsens.c
> @@ -975,7 +975,7 @@ 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) {
> +	if (!enabled && !(priv->feat->ignore_enable)) {

Please drop 'ignore_enable' and use 'VER_2_X_NO_RPM' instead.

>  		dev_err(dev, "%s: device not enabled\n", __func__);
>  		ret = -ENODEV;
>  		goto err_put_device;
> diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h
> index 7b36a0318fa6..90bf11fba563 100644
> --- 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.

Drop 'ignore_enable'.

>   * @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;

Drop 'ignore_enable'.

Thanks & Regards,
Manikanta.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v6 1/5] dt-bindings: nvmem: Add compatible for IPQ5018
  2025-02-24  6:12 ` [PATCH v6 1/5] dt-bindings: nvmem: Add compatible for IPQ5018 George Moussalem
@ 2025-02-24  9:19   ` Krzysztof Kozlowski
  2025-02-24 13:42     ` Dmitry Baryshkov
  0 siblings, 1 reply; 14+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-24  9:19 UTC (permalink / raw)
  To: George Moussalem, linux-arm-msm, linux-pm, devicetree, amitk,
	thara.gopinath, dmitry.baryshkov, robh, krzk+dt, quic_srichara
  Cc: Krzysztof Kozlowski

On 24/02/2025 07:12, George Moussalem wrote:
> 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>

You can send the patches to yourself and see whether they are properly
threaded.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v6 3/5] thermal: drivers: qcom: Add new feat for soc without rpm
  2025-02-24  9:08   ` Manikanta Mylavarapu
@ 2025-02-24 10:33     ` George Moussalem
  2025-02-24 13:45     ` Dmitry Baryshkov
  1 sibling, 0 replies; 14+ messages in thread
From: George Moussalem @ 2025-02-24 10:33 UTC (permalink / raw)
  To: Manikanta Mylavarapu, linux-arm-msm, linux-pm, devicetree, amitk,
	thara.gopinath, dmitry.baryshkov, robh, krzk+dt, quic_srichara


On 2/24/25 13:08, Manikanta Mylavarapu wrote:
>
> On 2/24/2025 11:42 AM, George Moussalem wrote:
>> From: Sricharan Ramabadhran <quic_srichara@quicinc.com>
>>
>> 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>
>> Signed-off-by: George Moussalem <george.moussalem@outlook.com>
>> ---
>>  drivers/thermal/qcom/tsens.c | 2 +-
>>  drivers/thermal/qcom/tsens.h | 3 +++
>>  2 files changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
>> index 3aa3736181aa..a25ca17adf1a 100644
>> --- a/drivers/thermal/qcom/tsens.c
>> +++ b/drivers/thermal/qcom/tsens.c
>> @@ -975,7 +975,7 @@ 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) {
>> +	if (!enabled && !(priv->feat->ignore_enable)) {
> Please drop 'ignore_enable' and use 'VER_2_X_NO_RPM' instead.

couldn't find it, but found it was recently added in:
https://lore.kernel.org/all/5dc4bbb7-71b5-4389-9e99-099e1c93d1c9@linaro.org/
Will change to 'VER_2_NO_RPM'

>
>>  		dev_err(dev, "%s: device not enabled\n", __func__);
>>  		ret = -ENODEV;
>>  		goto err_put_device;
>> diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h
>> index 7b36a0318fa6..90bf11fba563 100644
>> --- 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.
> Drop 'ignore_enable'.

will do

>
>>   * @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;
> Drop 'ignore_enable'.

will do

>
> Thanks & Regards,
> Manikanta.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v6 1/5] dt-bindings: nvmem: Add compatible for IPQ5018
  2025-02-24  9:19   ` Krzysztof Kozlowski
@ 2025-02-24 13:42     ` Dmitry Baryshkov
  2025-02-24 13:49       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 14+ messages in thread
From: Dmitry Baryshkov @ 2025-02-24 13:42 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: George Moussalem, linux-arm-msm, linux-pm, devicetree, amitk,
	thara.gopinath, robh, krzk+dt, quic_srichara, Krzysztof Kozlowski

On Mon, Feb 24, 2025 at 10:19:35AM +0100, Krzysztof Kozlowski wrote:
> On 24/02/2025 07:12, George Moussalem wrote:
> > 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>
> 
> You can send the patches to yourself and see whether they are properly
> threaded.

I don't think outlook world understands the concept of threading.

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v6 3/5] thermal: drivers: qcom: Add new feat for soc without rpm
  2025-02-24  9:08   ` Manikanta Mylavarapu
  2025-02-24 10:33     ` George Moussalem
@ 2025-02-24 13:45     ` Dmitry Baryshkov
  1 sibling, 0 replies; 14+ messages in thread
From: Dmitry Baryshkov @ 2025-02-24 13:45 UTC (permalink / raw)
  To: Manikanta Mylavarapu
  Cc: George Moussalem, linux-arm-msm, linux-pm, devicetree, amitk,
	thara.gopinath, robh, krzk+dt, quic_srichara

On Mon, Feb 24, 2025 at 02:38:24PM +0530, Manikanta Mylavarapu wrote:
> 
> 
> On 2/24/2025 11:42 AM, George Moussalem wrote:
> > From: Sricharan Ramabadhran <quic_srichara@quicinc.com>
> > 
> > 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>
> > Signed-off-by: George Moussalem <george.moussalem@outlook.com>
> > ---
> >  drivers/thermal/qcom/tsens.c | 2 +-
> >  drivers/thermal/qcom/tsens.h | 3 +++
> >  2 files changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
> > index 3aa3736181aa..a25ca17adf1a 100644
> > --- a/drivers/thermal/qcom/tsens.c
> > +++ b/drivers/thermal/qcom/tsens.c
> > @@ -975,7 +975,7 @@ 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) {
> > +	if (!enabled && !(priv->feat->ignore_enable)) {
> 
> Please drop 'ignore_enable' and use 'VER_2_X_NO_RPM' instead.

It is not possible, since IPQ5018 is 1.x. But I agree, a similar concept
should be used.

> 
> >  		dev_err(dev, "%s: device not enabled\n", __func__);
> >  		ret = -ENODEV;
> >  		goto err_put_device;

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v6 1/5] dt-bindings: nvmem: Add compatible for IPQ5018
  2025-02-24 13:42     ` Dmitry Baryshkov
@ 2025-02-24 13:49       ` Krzysztof Kozlowski
  2025-02-24 13:58         ` George Moussalem
       [not found]         ` <DS7PR19MB888339C2474E520C495ED62B9DC02@DS7PR19MB8883.namprd19.prod.outlook.com>
  0 siblings, 2 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-24 13:49 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: George Moussalem, linux-arm-msm, linux-pm, devicetree, amitk,
	thara.gopinath, robh, krzk+dt, quic_srichara, Krzysztof Kozlowski

On 24/02/2025 14:42, Dmitry Baryshkov wrote:
> On Mon, Feb 24, 2025 at 10:19:35AM +0100, Krzysztof Kozlowski wrote:
>> On 24/02/2025 07:12, George Moussalem wrote:
>>> 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>
>>
>> You can send the patches to yourself and see whether they are properly
>> threaded.
> 
> I don't think outlook world understands the concept of threading.


True, but note that outlook.com is just provider and you can use
whatever email client with it. mutt/neomutt, Thunderbird, claws, Kmail etc.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v6 1/5] dt-bindings: nvmem: Add compatible for IPQ5018
  2025-02-24 13:49       ` Krzysztof Kozlowski
@ 2025-02-24 13:58         ` George Moussalem
  2025-02-24 15:45           ` Dmitry Baryshkov
       [not found]         ` <DS7PR19MB888339C2474E520C495ED62B9DC02@DS7PR19MB8883.namprd19.prod.outlook.com>
  1 sibling, 1 reply; 14+ messages in thread
From: George Moussalem @ 2025-02-24 13:58 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Dmitry Baryshkov
  Cc: linux-arm-msm, linux-pm, devicetree, amitk, thara.gopinath, robh,
	krzk+dt, quic_srichara, Krzysztof Kozlowski

On 2/24/25 17:49, Krzysztof Kozlowski wrote:

> On 24/02/2025 14:42, Dmitry Baryshkov wrote:
>> On Mon, Feb 24, 2025 at 10:19:35AM +0100, Krzysztof Kozlowski wrote:
>>> On 24/02/2025 07:12, George Moussalem wrote:
>>>> 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>
>>> You can send the patches to yourself and see whether they are properly
>>> threaded.
>> I don't think outlook world understands the concept of threading.

using git send-email from an @outlook.com address. But I've figured out the issue:
git send-email --thread
this sets In-reply-to and References tags

> True, but note that outlook.com is just provider and you can use
> whatever email client with it. mutt/neomutt, Thunderbird, claws, Kmail etc.

correct, not sending from outlook, but git send-email. Was missing the --thread option

> Best regards,
> Krzysztof

Best regards,
George


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v6 1/5] dt-bindings: nvmem: Add compatible for IPQ5018
       [not found]         ` <DS7PR19MB888339C2474E520C495ED62B9DC02@DS7PR19MB8883.namprd19.prod.outlook.com>
@ 2025-02-24 14:11           ` Krzysztof Kozlowski
  0 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-24 14:11 UTC (permalink / raw)
  To: George Moussalem, Krzysztof Kozlowski, Dmitry Baryshkov
  Cc: linux-arm-msm, linux-pm, devicetree, amitk, thara.gopinath, robh,
	krzk+dt, quic_srichara

On 24/02/2025 14:55, George Moussalem wrote:
> 
> On 2/24/25 17:49, Krzysztof Kozlowski wrote:
> 
>> On 24/02/2025 14:42, Dmitry Baryshkov wrote:
>>> On Mon, Feb 24, 2025 at 10:19:35AM +0100, Krzysztof Kozlowski wrote:
>>>> On 24/02/2025 07:12, George Moussalem wrote:
>>>>> 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>
>>>> You can send the patches to yourself and see whether they are properly
>>>> threaded.
>>> I don't think outlook world understands the concept of threading.
> 
> using git send-email from an @outlook.com address. But I've figured out the issue:
> git send-email --thread
> this sets In-reply-to and References tags
> 
>>
>> True, but note that outlook.com is just provider and you can use
>> whatever email client with it. mutt/neomutt, Thunderbird, claws, Kmail etc.

I meant use these to check if it works.

> 
> correct, not sending from outlook, but git send-email. Was missing the --thread option


That's odd, git send-email automatically threads and provides proper
reference. Never ever had to use it... because *it is the default* or
you did not create patches standard way, but then this should be fixed.


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v6 1/5] dt-bindings: nvmem: Add compatible for IPQ5018
  2025-02-24 13:58         ` George Moussalem
@ 2025-02-24 15:45           ` Dmitry Baryshkov
  0 siblings, 0 replies; 14+ messages in thread
From: Dmitry Baryshkov @ 2025-02-24 15:45 UTC (permalink / raw)
  To: George Moussalem
  Cc: Krzysztof Kozlowski, linux-arm-msm, linux-pm, devicetree, amitk,
	thara.gopinath, robh, krzk+dt, quic_srichara, Krzysztof Kozlowski

On Mon, Feb 24, 2025 at 05:58:39PM +0400, George Moussalem wrote:
> On 2/24/25 17:49, Krzysztof Kozlowski wrote:
> 
> > On 24/02/2025 14:42, Dmitry Baryshkov wrote:
> >> On Mon, Feb 24, 2025 at 10:19:35AM +0100, Krzysztof Kozlowski wrote:
> >>> On 24/02/2025 07:12, George Moussalem wrote:
> >>>> 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>
> >>> You can send the patches to yourself and see whether they are properly
> >>> threaded.
> >> I don't think outlook world understands the concept of threading.
> 
> using git send-email from an @outlook.com address. But I've figured out the issue:
> git send-email --thread
> this sets In-reply-to and References tags

It does that by default. The usual way is to have your cover letter as
0000-foo-bar.patch and then use git send-email 00*. This way it picks up
the cover letter as the first patch and everything else goes as reponses
to it.

OR you can use a tool which does that for you. We usually recommend b4
tool, it wraps ardoung git-send-email and it can help a lot.

> 
> > True, but note that outlook.com is just provider and you can use
> > whatever email client with it. mutt/neomutt, Thunderbird, claws, Kmail etc.
> 
> correct, not sending from outlook, but git send-email. Was missing the --thread option
> 
> > Best regards,
> > Krzysztof
> 
> Best regards,
> George
> 

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-02-24 15:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250224061224.3342-1-george.moussalem@outlook.com>
2025-02-24  6:12 ` [PATCH v6 1/5] dt-bindings: nvmem: Add compatible for IPQ5018 George Moussalem
2025-02-24  9:19   ` Krzysztof Kozlowski
2025-02-24 13:42     ` Dmitry Baryshkov
2025-02-24 13:49       ` Krzysztof Kozlowski
2025-02-24 13:58         ` George Moussalem
2025-02-24 15:45           ` Dmitry Baryshkov
     [not found]         ` <DS7PR19MB888339C2474E520C495ED62B9DC02@DS7PR19MB8883.namprd19.prod.outlook.com>
2025-02-24 14:11           ` Krzysztof Kozlowski
2025-02-24  6:12 ` [PATCH v6 2/5] dt-bindings: thermal: qcom-tsens: Add ipq5018 compatible George Moussalem
2025-02-24  6:12 ` [PATCH v6 3/5] thermal: drivers: qcom: Add new feat for soc without rpm George Moussalem
2025-02-24  9:08   ` Manikanta Mylavarapu
2025-02-24 10:33     ` George Moussalem
2025-02-24 13:45     ` Dmitry Baryshkov
2025-02-24  6:12 ` [PATCH v6 4/5] thermal: qcom: tsens: Add support for IPQ5018 tsens George Moussalem
2025-02-24  6:12 ` [PATCH v6 5/5] arm64: dts: qcom: ipq5018: Add tsens node George Moussalem

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.