From patchwork Mon Aug 28 19:18:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sricharan Ramabadhran X-Patchwork-Id: 717949 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75D3BC83F1B for ; Mon, 28 Aug 2023 19:20:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233385AbjH1TT4 (ORCPT ); Mon, 28 Aug 2023 15:19:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233362AbjH1TTn (ORCPT ); Mon, 28 Aug 2023 15:19:43 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52AA2107; Mon, 28 Aug 2023 12:19:40 -0700 (PDT) Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37SJGW7a013107; Mon, 28 Aug 2023 19:19:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=nPYs6hFoo6E7/FWcrbdC3FBYvedtX/7cz7YBcPZkCtI=; b=igsPpzXRi7zsoQJPtsbVXMROdkbeFJHh1DvZJmcGCgOJ2kRFixmYKHKnjMRflWC6i8Bs JT684VVrhD/2RHlMV0I41JmCKSB3TLjz8Eq28rVGkjKPJzq1FcyICUKdoYxEaUMvQz+B Ww9+g5p43nUGq2B6MEt4DJAO1yavBcokbjJ2AGI/xPgSrH6AM/EnvkuyP6dYgDCZykSc QRt5pBU63JZi8bJ7ONWM4IMcWGnnnKJsvg+mS8Q0imi0LGu0Itb/klrFkBmovmR1u7Fy oh2LfKDj0JZfnc8t/1MpNTJ2puoQZz51DZxA5N/hKZ/sca/rq+0u82kZpkmzFz05Spa5 Lw== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3sqapfmfhd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Aug 2023 19:19:30 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 37SJJTn0003302 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Aug 2023 19:19:29 GMT Received: from srichara-linux.qualcomm.com (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Mon, 28 Aug 2023 12:19:00 -0700 From: Sricharan Ramabadhran To: , , , , , , , , , , , , , , Subject: [PATCH 3/7] thermal/drivers/qcom/tsens: Add support for IPQ5018 tsens Date: Tue, 29 Aug 2023 00:48:23 +0530 Message-ID: <1693250307-8910-4-git-send-email-quic_srichara@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1693250307-8910-1-git-send-email-quic_srichara@quicinc.com> References: <1693250307-8910-1-git-send-email-quic_srichara@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: GTjzH62Dk5iep0RkRZTO-vxl5gTVq0ih X-Proofpoint-GUID: GTjzH62Dk5iep0RkRZTO-vxl5gTVq0ih X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-08-28_16,2023-08-28_04,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 lowpriorityscore=0 clxscore=1015 impostorscore=0 mlxscore=0 malwarescore=0 mlxlogscore=999 phishscore=0 adultscore=0 spamscore=0 suspectscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2308280168 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org IPQ5018 has tsens IP V1.0, 4 sensors 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. Signed-off-by: Sricharan Ramabadhran --- drivers/thermal/qcom/tsens-v1.c | 115 ++++++++++++++++++++++++++++++++ drivers/thermal/qcom/tsens.h | 2 +- 2 files changed, 116 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/qcom/tsens-v1.c b/drivers/thermal/qcom/tsens-v1.c index dc1c4ae2d8b0..a74dae69408b 100644 --- a/drivers/thermal/qcom/tsens-v1.c +++ b/drivers/thermal/qcom/tsens-v1.c @@ -42,6 +42,59 @@ static struct tsens_legacy_calibration_format tsens_qcs404_nvmem = { }, }; +struct tsens_legacy_calibration_format tsens_ipq5018_nvmem = { + .base_len = 8, + .base_shift = 2, + .sp_len = 6, + .mode = { 0, 8 }, + .invalid = { 0, 2 }, + .base = { { 0, 11 }, { 0, 19 } }, + .sp = { + { { 0, 27 }, { 1, 1 } }, + { { 1, 7 }, { 1, 13 } }, + { { 1, 19 }, { 1, 25 } }, + { { 1, 31 }, { 2, 5 } }, + { { 2, 11 }, { 3, 0 } }, + }, +}; + +static void fixup_ipq5018_points(int mode, u32 *p1, u32 *p2) +{ + if (mode == NO_PT_CALIB) { + p1[0] = 403; + p2[0] = 688; + p1[1] = 390; + p2[1] = 674; + p1[2] = 341; + p2[2] = 635; + p1[3] = 387; + p2[3] = 673; + p1[4] = 347; + p2[4] = 639; + } +} + +static int calibrate_ipq5018(struct tsens_priv *priv) +{ + u32 p1[10], p2[10]; + u32 *qfprom_cdata; + int mode; + + qfprom_cdata = (u32 *)qfprom_read(priv->dev, "calib"); + if (IS_ERR(qfprom_cdata)) + return PTR_ERR(qfprom_cdata); + + mode = tsens_read_calibration_legacy(priv, &tsens_ipq5018_nvmem, + p1, p2, + qfprom_cdata, NULL); + + fixup_ipq5018_points(mode, p1, p2); + compute_intercept_slope(priv, p1, p2, mode); + kfree(qfprom_cdata); + + return 0; +} + static int calibrate_v1(struct tsens_priv *priv) { u32 p1[10], p2[10]; @@ -79,6 +132,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, + .no_early_init = 1, +}; + static const struct reg_field tsens_v1_regfields[MAX_REGFIELDS] = { /* ----- SROT ------ */ /* VERSION */ @@ -150,6 +215,43 @@ static int __init init_8956(struct tsens_priv *priv) { return init_common(priv); } +static int init_ipq5018(struct tsens_priv *priv) +{ + int ret; + u32 mask; + + init_common(priv); + if (!priv->tm_map) + return -ENODEV; + + ret = regmap_field_write(priv->rf[TSENS_SW_RST], 1); + if (ret) { + dev_err(priv->dev, "Reset failed\n"); + return ret; + } + + mask = GENMASK(10, 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); + if (ret) { + dev_err(priv->dev, "Reset failed\n"); + return ret; + } + + return 0; +} + static const struct tsens_ops ops_generic_v1 = { .init = init_common, .calibrate = calibrate_v1, @@ -187,3 +289,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 = calibrate_ipq5018, + .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.h b/drivers/thermal/qcom/tsens.h index fb73e3dd0de9..5f0bdbeedf90 100644 --- a/drivers/thermal/qcom/tsens.h +++ b/drivers/thermal/qcom/tsens.h @@ -645,7 +645,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_8976, data_8956; +extern struct tsens_plat_data data_tsens_v1, data_8976, data_8956, data_ipq5018; /* TSENS v2 targets */ extern struct tsens_plat_data data_8996, data_ipq8074, data_tsens_v2; From patchwork Mon Aug 28 19:18:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sricharan Ramabadhran X-Patchwork-Id: 717948 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2224BC83F24 for ; Mon, 28 Aug 2023 19:20:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233405AbjH1TT6 (ORCPT ); Mon, 28 Aug 2023 15:19:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233358AbjH1TTn (ORCPT ); Mon, 28 Aug 2023 15:19:43 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75070114; Mon, 28 Aug 2023 12:19:40 -0700 (PDT) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37SHLOF0028593; Mon, 28 Aug 2023 19:19:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=fOGmgXl/ickbKb7w6SjmfQviRBopf2X+iPgtWmfyzKg=; b=pBiSXFz5VOrCgObOW7tE2UUOFqb7BHFKK6mbf8b0eYEgzMjLpsNtzDZSrn4CdImbTrxn ewQeWA1VAd17LjMIupb7ahvLWGtog3YQB6jGKVyRI30xLOde6JFZVA55gzbmJ+ltmRk3 czHv71biAaRIIa+LY7VpZWjTgAwRzCkm1bO6vbCi4uhKnBOHCEdDRbVoxMouW2iEt3IN 9WLV1TWpumby55P+DQkuQPTyElRW5NhR3r4CR5lW7B8QTAVOSv2mA+yD3AU1WZII+lN3 x5/BSUC+g7b5zi5+KDYU+eS3h1hcBNN8U8+asX9jdg2PqGU2DIgXCu2Cu4maUMxk3ACr Og== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3sq73n4rdx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Aug 2023 19:19:30 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 37SJJTn1003302 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Aug 2023 19:19:29 GMT Received: from srichara-linux.qualcomm.com (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Mon, 28 Aug 2023 12:19:05 -0700 From: Sricharan Ramabadhran To: , , , , , , , , , , , , , , Subject: [PATCH 4/7] thermal/drivers/qcom: Add IPQ5018 compatible Date: Tue, 29 Aug 2023 00:48:24 +0530 Message-ID: <1693250307-8910-5-git-send-email-quic_srichara@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1693250307-8910-1-git-send-email-quic_srichara@quicinc.com> References: <1693250307-8910-1-git-send-email-quic_srichara@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: DaYU-U74ncWlsKHiZN2wDvH30kWmGtQ1 X-Proofpoint-ORIG-GUID: DaYU-U74ncWlsKHiZN2wDvH30kWmGtQ1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-08-28_16,2023-08-28_04,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 impostorscore=0 mlxscore=0 mlxlogscore=770 lowpriorityscore=0 clxscore=1015 phishscore=0 bulkscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2308280168 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org IPQ5018 has tsens V1.0 IP with 4 sensors and 1 interrupt. Signed-off-by: Sricharan Ramabadhran --- drivers/thermal/qcom/tsens.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index f39495b61952..a24eb88b3444 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -1101,6 +1101,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, }, { From patchwork Mon Aug 28 19:18:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sricharan Ramabadhran X-Patchwork-Id: 717950 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3DC06C83F17 for ; Mon, 28 Aug 2023 19:20:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233381AbjH1TTz (ORCPT ); Mon, 28 Aug 2023 15:19:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233361AbjH1TTn (ORCPT ); Mon, 28 Aug 2023 15:19:43 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABD32120; Mon, 28 Aug 2023 12:19:40 -0700 (PDT) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37SJ12qH007567; Mon, 28 Aug 2023 19:19:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=iwBHdSgkTzksPkElbM9VpFckJ2B833jELeGXVSHyQ8o=; b=btG0SOiZNzR1mSGbcDKzRasfehCHb3mQscqb3kiyBYG3VXwwd4n0iv6lZP1e15WkA/5/ ymfvpGn3AWKdEeItrbxhZFmFAAlbc4SF7iYVZ1jUEw6pV2ifQwf6j2DVRVfWdDV6OPyb CL2qcAU8mDjEboOQ6x/Y3Ras4TcECyGCn8vSwOK+1Qe0krdhWHqelXoHTzrj46unKvDU 5Vf5dWBnOhRrZ4uwYDOfhtD5BvI05IJSdIj7BSsOEcqtvLfkI5qY3caGUilJypAjlEhl rF+l1KOrfpeVvMct5kCC06UR5TRrxb1xzJYdyRwyC96yWl7qMr3tTl0fr+7ODIFwNquM 5g== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3sq9m8vhw6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Aug 2023 19:19:30 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 37SJJTn3003302 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Aug 2023 19:19:29 GMT Received: from srichara-linux.qualcomm.com (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Mon, 28 Aug 2023 12:19:14 -0700 From: Sricharan Ramabadhran To: , , , , , , , , , , , , , , Subject: [PATCH 6/7] arm64: dts: qcom: ipq5018: Add tsens node Date: Tue, 29 Aug 2023 00:48:26 +0530 Message-ID: <1693250307-8910-7-git-send-email-quic_srichara@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1693250307-8910-1-git-send-email-quic_srichara@quicinc.com> References: <1693250307-8910-1-git-send-email-quic_srichara@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 0LxdwKbXpAmCiu73gdA-bMd7uijvC5TC X-Proofpoint-GUID: 0LxdwKbXpAmCiu73gdA-bMd7uijvC5TC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-08-28_16,2023-08-28_04,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 bulkscore=0 clxscore=1015 mlxscore=0 adultscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 lowpriorityscore=0 mlxlogscore=802 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2308280168 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org IPQ5018 has tsens V1.0 IP with 4 sensors. There is no RPM, so tsens has to manually enabled. Adding the tsens and nvmem node. Signed-off-by: Sricharan Ramabadhran --- arch/arm64/boot/dts/qcom/ipq5018.dtsi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/ipq5018.dtsi b/arch/arm64/boot/dts/qcom/ipq5018.dtsi index 9f13d2dcdfd5..277b3cfc7f72 100644 --- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi @@ -93,6 +93,29 @@ soc: soc@0 { #size-cells = <1>; ranges = <0 0 0 0xffffffff>; + qfprom_nvmem: qfprom_nvmem@a0000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "qcom,ipq5018-qfprom", "qcom,qfprom"; + reg = <0xa0000 0x1000>; + + tsens_calib: calib@248 { + reg = <0x248 0x10>; + }; + }; + + tsens: thermal-sensor@4a9000 { + compatible = "qcom,ipq5018-tsens", "qcom,tsens-v1"; + reg = <0x4a9000 0x1000>, /* TM */ + <0x4a8000 0x1000>; /* SORT */ + nvmem-cells = <&tsens_calib>; + nvmem-cell-names = "calib"; + interrupts = ; + interrupt-names = "uplow"; + #qcom,sensors = <5>; + #thermal-sensor-cells = <1>; + }; + tlmm: pinctrl@1000000 { compatible = "qcom,ipq5018-tlmm"; reg = <0x01000000 0x300000>;