From patchwork Sat Mar 9 13:15:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 779215 Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D99653BBE3 for ; Sat, 9 Mar 2024 13:15:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709990114; cv=none; b=pT+sOO0e3YEHR9mTxoejaEAUeZvEHm7SVSQtG4fOoKxWiKyC6L6qaY8gtbQwKoIrRCrKosALDvBtO8CjqHFxcgLd+FNIBzMBoO8d5tJ0aQHVDetPfzrmXOAwMl9CQW8PO85zG4LpenUCWPMgEM7cAM3pj/z7JpMjzxtfQd/00AA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709990114; c=relaxed/simple; bh=HmrkCodgOiENVwajhEf4IeU+AccZfWCi1JJva4e0gNI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZblH3XpI2+m2GnBCpnqF3gNnHw5nKEsGsiunyglhpQSMC2yEOX9cT+5VCyuS9LSsFmYT1gwyNOoaHQGzHxG5Jvg5cxpshKQEPV+ueHjrrHCIti4aIIhd8pngfySIfN25D+N5CSSKxVlRWgsaUyAXguXbdUW7DRgMjuCY2q29IeI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=oJloeZMN; arc=none smtp.client-ip=209.85.208.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="oJloeZMN" Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-2d40fe2181dso20260591fa.1 for ; Sat, 09 Mar 2024 05:15:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709990110; x=1710594910; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=6Q2KZLzuT3UR94jDBU/FFVjIPHKvDHfe0WeIOQfMnsg=; b=oJloeZMNuy9UGO6DTS/QXrJqtlxCpT+mzWBQXiEmvklJ0IpQbAkJq8sdJEdO2jTw4j MMkLvjEnAsnkqpLbs+9AXjgFavBLLXKfpat39o0GIpZRhw8bsjS7D1oFbYCJ/3BuXy14 +VEqh3s0FxM3V5SYNjeTSppTDzZrGvoKJGHw/lPVJ1AhX0fiBi6U9jqMyNK00DRl4xCK BEbfhbpVGQhHvGvLeifgwMJkBKya6IoYm5KfIAyXTNWQPyjupA7D032SylcQiWhIHsrZ 1Ec32kPT2sS3THMeRNES2VMSf6tZ0nWf2NOBnok3uFA8Hg4I6GgrbPXKG8gcLNUIQKSJ FY5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709990110; x=1710594910; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6Q2KZLzuT3UR94jDBU/FFVjIPHKvDHfe0WeIOQfMnsg=; b=AUysJxbRu7BtQJpD5wqVMIbvNtgeVguIgbKrtmqwT2jWdVb/IuXip8U/sR1MG5hq95 Ssl6sQK81FHiZvaaxHtgNTPUpwjDlqFXu7ugWhVry3Ke4dVvU87GB5XTsO/bBZxJABsX BgQqoBLHXfvvpHro2J8IN1750prGvl3mpQhCW+q4uUvfti1j7LOofS+NmY0c1CgljFls bu46iz5hxSkaoKjsnQqOwApe/TzoVBc/pjoLzbBAwU54hZG5+1iAsfTJX+p8f/VV6KvU UO2pBrzFTfFTBCCaZdZVoJX6woVVZ16y8RohD0CiZDydQpLabf1l71efY6idXVR8wHbm lTjA== X-Forwarded-Encrypted: i=1; AJvYcCURozNgOukR6YxdgjFdURiVI5k3TpHWuTEximUWsS65Nc/yE0ZuiR86YiyDxMvdcWmzSJR+JAskiPAB+wUVFVC07VXe9OwAJCXWrnnMcg== X-Gm-Message-State: AOJu0YyYOkdWbW9HKAREKCmGQ++ifGb1tQyLvUiRrlAUXZB2rT1tV27x 4voFcTByzAfBj+JWOV+iZusbS6rBFlv2iD6XOPVEiAxs7NAj/VyQfWHVuHFnSq3AbqiJL/osB5D whas= X-Google-Smtp-Source: AGHT+IGeAzGtL6FkqXCIla/z9d2A5mD9375JAQQhHyrsSlcx+uZwDAjn7BDeiiA/FM6uxk4RgHrvFg== X-Received: by 2002:a2e:9890:0:b0:2d3:a7da:b17b with SMTP id b16-20020a2e9890000000b002d3a7dab17bmr1431405ljj.4.1709990110049; Sat, 09 Mar 2024 05:15:10 -0800 (PST) Received: from [10.167.154.1] (078088045141.garwolin.vectranet.pl. [78.88.45.141]) by smtp.gmail.com with ESMTPSA id i26-20020a2ea37a000000b002d3e6ce75cesm297596ljn.70.2024.03.09.05.15.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Mar 2024 05:15:09 -0800 (PST) From: Konrad Dybcio Date: Sat, 09 Mar 2024 14:15:02 +0100 Subject: [PATCH v2 1/3] dt-bindings: thermal: lmh: Add QCM2290 compatible Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240308-topic-rb1_lmh-v2-1-bac3914b0fe3@linaro.org> References: <20240308-topic-rb1_lmh-v2-0-bac3914b0fe3@linaro.org> In-Reply-To: <20240308-topic-rb1_lmh-v2-0-bac3914b0fe3@linaro.org> To: Bjorn Andersson , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thara Gopinath , Amit Kucheria Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Dmitry Baryshkov , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709990106; l=924; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=HmrkCodgOiENVwajhEf4IeU+AccZfWCi1JJva4e0gNI=; b=a9qQLgMOYxxC13+lhiLrDmaFP2VsWIJNnpW3mFDBV7o3tEwmYyluHlr0nwCzXgk2DThNsG6co W7+3PbadllBA5b5ZpMaaLeY+14KSj1SDZ4bAzUbFUSBvLXnm00bKsUj X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Document the QCM2290 LMH. Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/thermal/qcom-lmh.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/thermal/qcom-lmh.yaml b/Documentation/devicetree/bindings/thermal/qcom-lmh.yaml index 5ff72ce5c887..1175bb358382 100644 --- a/Documentation/devicetree/bindings/thermal/qcom-lmh.yaml +++ b/Documentation/devicetree/bindings/thermal/qcom-lmh.yaml @@ -17,10 +17,14 @@ description: properties: compatible: - enum: - - qcom,sc8180x-lmh - - qcom,sdm845-lmh - - qcom,sm8150-lmh + oneOf: + - enum: + - qcom,sc8180x-lmh + - qcom,sdm845-lmh + - qcom,sm8150-lmh + - items: + - const: qcom,qcm2290-lmh + - const: qcom,sm8150-lmh reg: items: From patchwork Sat Mar 9 13:15:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 779507 Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76B4F3CF6E for ; Sat, 9 Mar 2024 13:15:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709990116; cv=none; b=uLdaHG+wO/RcN3W49h6LFCOP+zsMH+ayIUWDDiW5ZP8/mqxcQS3q/VI8y3C+7WHwFetStz8W1UfjwWxS9gST6COjYg9nqz+DG+YIkyFIoViuoS64TlVpN8K638O/AnUwDD6fUUQAStmcD9U2Na74Ri3iXeoHDI7SyTfYbr3m+ys= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709990116; c=relaxed/simple; bh=1zKmaCSSw5TxCbTRZY28a9vzXURFEF5JKLcjEG+HISo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=T84dUZ0iVMW4deUoph0IBtofkZ+ouR10540XKJiqzwbcDZGjtVVaOK38xNjiaKj3vzk1jnp5n/8xUuXFRLNdL+LMDn+EQwPfZeVAH/aaCV3V4Ev/bhJHqxueuPmCyFo1WUrNhZ86GmTpTwUi9I2II+W2zqMJn6g/VqY9eKBBKtQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=SZkti58G; arc=none smtp.client-ip=209.85.208.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="SZkti58G" Received: by mail-lj1-f172.google.com with SMTP id 38308e7fff4ca-2d28e465655so41251071fa.0 for ; Sat, 09 Mar 2024 05:15:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709990111; x=1710594911; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=YuS5xkKxAChkv3klXygyRlixyQm1XAjkTPSLMGW83Tc=; b=SZkti58G9LFB0NPJQ9i3yL7gXa0LVbuaLIPlPMlw7HO5qxmx4SGwDFXYznZhJ5pwJ0 5U8LY/ODm+DekJEp8DD8/T47BVVjQayBZMirRkvbAgwkKPHxV0+Tdn8ryBpfz9NSLbTe GSI+3iTi98WgACYJ+4iLtIWPoCU+LHwSMGCPpmXJRKQ9tfLCJ+4mjmopCtPye3NGz6Jl oJEzfQ3HZ1ebf27QUgk63eBzQQI3W2zmluHLSEpatXzMv+Io6QFo+3TXbRCAT7n2YlWN WU5S4Er+7eoVfayoO1rNi8NIfS5YJhV25u1tZxrD4EpV3q2kdiKSoN6YQGFu2GpyrjCN +1ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709990111; x=1710594911; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YuS5xkKxAChkv3klXygyRlixyQm1XAjkTPSLMGW83Tc=; b=L3Ok1S4w5mDfYPFOflHhoBSYdg/9kutYKCb2AlXIxaK+JVOWSSYho/593zhhbj55s6 3/A9S9PksrMPyNjftwPaNDxnnYZcRQXPpna2Ix+Q8bsP/erhyOdEGeQjbAj+5ZvKPMbg VB5Tawdf/eg123ma90+RWEhFAiI7my1GVgYllhbyYEwiD59ilvEoaIft9Pe3aOLXbGSQ 1aHnCpP+pg3JvoEN2NNCfYz5qZ+9w545301vN2TNahS6s0KjYu4N+HTDcfBU4l3MqsgQ hJo3dN3ELhpu7af1OHmodv8McPumx2+T15o1h0Z+7SvT4Yo/IUb+cvo+Flp0yfOo9adA y3Uw== X-Forwarded-Encrypted: i=1; AJvYcCVk/2Xcff8MHQYA9L0/DUWijEW/kBOyk6rTIySbQB2TtAJHbMX0ATlKM12u2POmY85Z/gGsgE+zHggEjhkyx9XF8cnC154V7kM6OpQIdw== X-Gm-Message-State: AOJu0Yykubh5vjYreqP0oWQZuj9S8ORcURi1GXUP402CBRQRK3k+kFYW wfh/VAM+TSpiaW4+wtlcX2YLQvND3QBx0APEfyF4X7+ZK3B7iAIJFkc+Y/iaAZQ= X-Google-Smtp-Source: AGHT+IEPOEM1RVrjIlKaaUwTfgMe1csvJm3TBP9ee3LeoP3bZr1TnDN/ZKE6refGJOTjv02fY+UnJQ== X-Received: by 2002:a05:651c:b0f:b0:2d2:74ed:37b0 with SMTP id b15-20020a05651c0b0f00b002d274ed37b0mr1504989ljr.11.1709990111704; Sat, 09 Mar 2024 05:15:11 -0800 (PST) Received: from [10.167.154.1] (078088045141.garwolin.vectranet.pl. [78.88.45.141]) by smtp.gmail.com with ESMTPSA id i26-20020a2ea37a000000b002d3e6ce75cesm297596ljn.70.2024.03.09.05.15.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Mar 2024 05:15:11 -0800 (PST) From: Konrad Dybcio Date: Sat, 09 Mar 2024 14:15:03 +0100 Subject: [PATCH v2 2/3] thermal: qcom: lmh: Check for SCM availability at probe Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240308-topic-rb1_lmh-v2-2-bac3914b0fe3@linaro.org> References: <20240308-topic-rb1_lmh-v2-0-bac3914b0fe3@linaro.org> In-Reply-To: <20240308-topic-rb1_lmh-v2-0-bac3914b0fe3@linaro.org> To: Bjorn Andersson , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thara Gopinath , Amit Kucheria Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Dmitry Baryshkov , Konrad Dybcio , stable@vger.kernel.org X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709990106; l=948; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=1zKmaCSSw5TxCbTRZY28a9vzXURFEF5JKLcjEG+HISo=; b=JJqil+Pd55w4V+n8GoA7VUlGwELl4ASURFbO2mhhito2CCvmqL0S6QbnYq50dLqP8nX/vqyfI 4E3rY11y6sDBOf8BCdM2BvMWXGkEYvkWNkqeffRUXGCTOcrI/8SSo9R X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Up until now, the necessary scm availability check has not been performed, leading to possible null pointer dereferences (which did happen for me on RB1). Fix that. Fixes: 53bca371cdf7 ("thermal/drivers/qcom: Add support for LMh driver") Cc: Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Reviewed-by: Bjorn Andersson --- drivers/thermal/qcom/lmh.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/thermal/qcom/lmh.c b/drivers/thermal/qcom/lmh.c index f6edb12ec004..5225b3621a56 100644 --- a/drivers/thermal/qcom/lmh.c +++ b/drivers/thermal/qcom/lmh.c @@ -95,6 +95,9 @@ static int lmh_probe(struct platform_device *pdev) unsigned int enable_alg; u32 node_id; + if (!qcom_scm_is_available()) + return -EPROBE_DEFER; + lmh_data = devm_kzalloc(dev, sizeof(*lmh_data), GFP_KERNEL); if (!lmh_data) return -ENOMEM; From patchwork Sat Mar 9 13:15:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 779214 Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 274953FBA4 for ; Sat, 9 Mar 2024 13:15:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709990117; cv=none; b=F0R/Uc699/Mr4frmXZ+5gHSVymmEK2xzgmDEKrAqxqUCBcJGZIOtaot/CfDUGdii4WlREQ8X5+RYS3T5JEYj0SQCjVwau1wrNQZMiqYmJ8dJ7RJ8WGCzDQ/eH+9SZAWCpry+ZPxVQ+RXH8GaLku24Ldf8uPDRteCwGWj1jgIyDU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709990117; c=relaxed/simple; bh=jrOFTMCntFqOIhBMm68qr8H/xgDF3gFVfyHkGoBalZA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qlY2nr9K1T6SH+aWI5LStt/I5XoNuZLecQRXT9suQRPHK64mcsqsAB9IMsxWcUQDeNCU0NXOflvpWOjL6jhz3Pi8lL74lBZtfzfuNpoFyVNrRNJpdGLLt3VbQXnJC/CjRnjqVMXPsq47knkXIhpdrHL3HzYo1tTvuOTZsuHI4eg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=rQyMCZLH; arc=none smtp.client-ip=209.85.208.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="rQyMCZLH" Received: by mail-lj1-f172.google.com with SMTP id 38308e7fff4ca-2d228a132acso36392931fa.0 for ; Sat, 09 Mar 2024 05:15:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709990113; x=1710594913; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=o6Sple/2ZZdRH/Vvx8i+an89/boBf3Gnas4pdauUz+A=; b=rQyMCZLH/0Y8iNXsgiLKozjRB9cTOEPaLEvPfhgVEQg7GSNqBu42fOXQMFb4qfSgdp LEQ3/S5asMFU8m/U1TV0aVEnAbuSnrVBYgP2+AM4X1nJ7WauZDALRxk/FUMm5HSo1V3S Gavj79o3KaVTmE2uUYBBLPqyTZtFHSQI/TkprL4boIRvdtQmYd69NfnryED6IQbXu6zU Dse8A9vGFujqqUO22uI2TPa8E5DFNGe0ABiOTueB5MD8mk1yUfKgfqKhDaCdSfvJmwng grnKf9yDzuQky4FMRaYALZCSoWjc0+R9072/6xPCLeLDij2pm/kCodzvJtUsbEiRfl2A AXDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709990113; x=1710594913; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o6Sple/2ZZdRH/Vvx8i+an89/boBf3Gnas4pdauUz+A=; b=CwAOGih9ae9SGmcP1/1c6DF6ZINgLe3jsO1pQkpM+8HGVUU0qqmshhcd74abzM08cb Izq3MFDFgtjv9cuqWhZ4vEEghBfiSvC86ZLEXuzUJmtcuoPxjLGLbmDwGSLDRCJq/jDK bX8ldYve3qnbfmwjWrPY8st5x5Tg6ArmBNhe55Xwh/hPzA0CLcBAgIDYUuGyP2RrmEkU SRcrTJWCTwDPRR7cPPeRqviej/m6zTyIQ8Vf40QTxBATq4PkI5dw4Hkuw139VolDm196 b6/TOrg7NTqdywT6kc/BjgnAj84P/ODX9CicpUX9RssbjDGOeZ/e552Yqk/VpJg7rPC7 XTPg== X-Forwarded-Encrypted: i=1; AJvYcCXUw5NpQ3T0VosoTjK6O/LAnVb8Sx/P+Fq6xxswE7ZHDEvN2bQLYpq3um2g14x6XOJo6Oo1MQhjHdCRm50lTw+DCGmEPrGzBFCOoU+Ibg== X-Gm-Message-State: AOJu0YxveMTewZ3n3fer3THBJYPt44ic+WPvdS3uFLR2EbqdYawkXUqd QOjoEQ7pzBV7vwevoauQ4BUG+qsDsUlD5jTk5bgEyVCbL96MQndNgUMi7KVi7nw= X-Google-Smtp-Source: AGHT+IFJLAytUkHELZ+tKQCNdstE4VZYqgVMmbL7iQAZfoMj7LyG8cr60snwA1EFoIGHOI9j+byTMw== X-Received: by 2002:a05:651c:104a:b0:2d2:a3ae:b339 with SMTP id x10-20020a05651c104a00b002d2a3aeb339mr1161270ljm.48.1709990113309; Sat, 09 Mar 2024 05:15:13 -0800 (PST) Received: from [10.167.154.1] (078088045141.garwolin.vectranet.pl. [78.88.45.141]) by smtp.gmail.com with ESMTPSA id i26-20020a2ea37a000000b002d3e6ce75cesm297596ljn.70.2024.03.09.05.15.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Mar 2024 05:15:13 -0800 (PST) From: Konrad Dybcio Date: Sat, 09 Mar 2024 14:15:04 +0100 Subject: [PATCH v2 3/3] arm64: dts: qcom: qcm2290: Add LMH node Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240308-topic-rb1_lmh-v2-3-bac3914b0fe3@linaro.org> References: <20240308-topic-rb1_lmh-v2-0-bac3914b0fe3@linaro.org> In-Reply-To: <20240308-topic-rb1_lmh-v2-0-bac3914b0fe3@linaro.org> To: Bjorn Andersson , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thara Gopinath , Amit Kucheria Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Dmitry Baryshkov , Konrad Dybcio , Loic Poulain X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709990106; l=1580; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=N3iZ4RWL64J9KIrMZcxBsUxhgEKVEWBB91k8Rvp8UdQ=; b=KuOaBM5yLNvJjgYyczPohcnrS6i2fHLRlRPwCX3R0BQIBV2vj2vKIxhMZWAu+vnruHDZhgrs5 YOZmplen22fAPynqjNXj7OfAHvuwjZthpHkHnkOo9kXkDbJucohmPdw X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= From: Loic Poulain Add a node for the Limits Management Hardware to ensure it can be configured by the operating system. Signed-off-by: Loic Poulain [Konrad: add commit msg, rebase] Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/qcm2290.dtsi | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/qcm2290.dtsi b/arch/arm64/boot/dts/qcom/qcm2290.dtsi index 89beac833d43..1aacad50e7fc 100644 --- a/arch/arm64/boot/dts/qcom/qcm2290.dtsi +++ b/arch/arm64/boot/dts/qcom/qcm2290.dtsi @@ -1858,7 +1858,7 @@ cpufreq_hw: cpufreq@f521000 { compatible = "qcom,qcm2290-cpufreq-hw", "qcom,cpufreq-hw"; reg = <0x0 0x0f521000 0x0 0x1000>; reg-names = "freq-domain0"; - interrupts = ; + interrupts-extended = <&lmh_cluster 0>; interrupt-names = "dcvsh-irq-0"; clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, <&gcc GPLL0>; clock-names = "xo", "alternate"; @@ -1866,6 +1866,18 @@ cpufreq_hw: cpufreq@f521000 { #freq-domain-cells = <1>; #clock-cells = <1>; }; + + lmh_cluster: lmh@f550800 { + compatible = "qcom,qcm2290-lmh", "qcom,sm8150-lmh"; + reg = <0x0 0x0f550800 0x0 0x400>; + interrupts = ; + cpus = <&CPU0>; + qcom,lmh-temp-arm-millicelsius = <65000>; + qcom,lmh-temp-low-millicelsius = <94500>; + qcom,lmh-temp-high-millicelsius = <95000>; + interrupt-controller; + #interrupt-cells = <1>; + }; }; thermal-zones {