From patchwork Thu Jan 16 19:38:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 858622 Received: from relay.smtp-ext.broadcom.com (relay.smtp-ext.broadcom.com [192.19.144.207]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC27D14AD2B; Thu, 16 Jan 2025 19:44:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.19.144.207 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737056698; cv=none; b=VFq+TRJLJG6Y5YBaUY4gtakT2UiOTOnigGlvWsmOPQp8BEs21t/JZcelPmrPutISIRr6FewrKnIZRaD9r4uG6hs0j7oFRsd5h/9o8aHyS9j+lrM4mkskNVnYx6oCCS0Wjcd3Q/+epMZGVHTzChLQnXT0rC521fMC0hcJoDZdtB0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737056698; c=relaxed/simple; bh=kn6/zBHCGJlt3wXOC8g6H3w523YCtAh1W1ztNmBm9Hs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sB3EXudOZuBnwv6oV4Dx5yFq0vwxEp6HB/u9luQ0vCHAIlVLdqAzEo/Qr86ZHpO4II5ekjWVTJxQ/MQoelAMKyuXwMjD8rbJHTXRTzADzjXSFV9WqEaqhADEZ8GaStlQBjdPxBxSdNlqdwq5lgRAO8Grv39IK2VyA4R2n5gk6bs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=MShopdcz; arc=none smtp.client-ip=192.19.144.207 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="MShopdcz" Received: from mail-lvn-it-01.lvn.broadcom.net (mail-lvn-it-01.lvn.broadcom.net [10.36.132.253]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 2F909C002825; Thu, 16 Jan 2025 11:44:50 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 2F909C002825 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1737056690; bh=kn6/zBHCGJlt3wXOC8g6H3w523YCtAh1W1ztNmBm9Hs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MShopdcz8biVW8zFqwZe0qtX6eNczDdICj2aaD4fXFOoD4/uVywuGvb0jUf7f51RQ C06deVf6pb9fiYdfsqMcwLa5o8x/3sEuJmJusmOyBDqs8vzUCLn4yvF5Cvt+aknL96 /6sSIciEhRAuZ73J5eASsOSdKNqDOfchjdb79sPk= Received: from fainelli-desktop.igp.broadcom.net (fainelli-desktop.dhcp.broadcom.net [10.67.48.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-lvn-it-01.lvn.broadcom.net (Postfix) with ESMTPSA id B0C0218041CACA; Thu, 16 Jan 2025 11:44:49 -0800 (PST) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Markus Mayer , Broadcom internal kernel review list , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-pm@vger.kernel.org (open list:BROADCOM STB AVS TMON DRIVER), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-arm-kernel@lists.infradead.org (moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE) Subject: [PATCH 1/2] dt-bindings: thermal: Update for BCM74110 Date: Thu, 16 Jan 2025 11:38:41 -0800 Message-ID: <20250116193842.758788-2-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250116193842.758788-1-florian.fainelli@broadcom.com> References: <20250116193842.758788-1-florian.fainelli@broadcom.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Update the binding with the BCM74110 compatible string which denotes the first device we need to support in a different process node requiring an updated thermal equation. Signed-off-by: Florian Fainelli --- Documentation/devicetree/bindings/thermal/brcm,avs-tmon.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/thermal/brcm,avs-tmon.yaml b/Documentation/devicetree/bindings/thermal/brcm,avs-tmon.yaml index 081486b44382..2f62551a49c1 100644 --- a/Documentation/devicetree/bindings/thermal/brcm,avs-tmon.yaml +++ b/Documentation/devicetree/bindings/thermal/brcm,avs-tmon.yaml @@ -18,6 +18,7 @@ properties: compatible: items: - enum: + - brcm,avs-tmon-bcm74110 - brcm,avs-tmon-bcm7216 - brcm,avs-tmon-bcm7445 - const: brcm,avs-tmon From patchwork Thu Jan 16 19:38:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 858062 Received: from relay.smtp-ext.broadcom.com (relay.smtp-ext.broadcom.com [192.19.144.207]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC2D522F387; Thu, 16 Jan 2025 19:44:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.19.144.207 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737056698; cv=none; b=BXxiisgovINtptRhxSHLGgC3u5jMpZELe7sTCtHZgvEu7cbDelGHjCaMcoJmESPcD2iK7JBzaxH9HGKlsyfdrFE4AN0IzYSG5L7UeeiLSuJhZDz9N5w9GASBtRVXoeY+Ffo1vu1hUlDXRiaKlW2R5R0APwLSdvAl84EEv0HQ72Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737056698; c=relaxed/simple; bh=IcjiODguC40y78u4uqPvE4L9y/vTL7BHxqp7PNXf8UI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eXheYYreZaLSmvAxYt54OsJqkM7O1Ig6SVl3Y2jQsFmNBd61Ct9vI7F9MLpxXgczIZELUSumaoOdN9GlGElBRZtTOqEv2vVnlaGL1RXL+CLhvGimJVvFg8Zb3MWlxft6rgsLce6Wei4zkqNuxkTTuNE17GVRDa7NFRiIsksh8aE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=akHQe3vn; arc=none smtp.client-ip=192.19.144.207 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="akHQe3vn" Received: from mail-lvn-it-01.lvn.broadcom.net (mail-lvn-it-01.lvn.broadcom.net [10.36.132.253]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 6AA36C004305; Thu, 16 Jan 2025 11:44:50 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 6AA36C004305 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1737056690; bh=IcjiODguC40y78u4uqPvE4L9y/vTL7BHxqp7PNXf8UI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=akHQe3vngF/Tinu8bCQyyaUSzR1V3VZM4bmGXvCrKAXLU/SON6FLTz1OHD3LXsfTS dwqnUyhzzQkg+xBus5kKBqWJ0q3Yu/je2mHvA9bx13+kTTz1BSfdyQjsmwf1IsMS3j Onio1Eq4EDoTfzNgcN6et91nRPAAX3dBIZ8sBYd4= Received: from fainelli-desktop.igp.broadcom.net (fainelli-desktop.dhcp.broadcom.net [10.67.48.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-lvn-it-01.lvn.broadcom.net (Postfix) with ESMTPSA id EA1EA18041CAD2; Thu, 16 Jan 2025 11:44:49 -0800 (PST) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Markus Mayer , Broadcom internal kernel review list , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-pm@vger.kernel.org (open list:BROADCOM STB AVS TMON DRIVER), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-arm-kernel@lists.infradead.org (moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE) Subject: [PATCH 2/2] thermal: brcmstb_thermal: Add support for BCM74110 Date: Thu, 16 Jan 2025 11:38:42 -0800 Message-ID: <20250116193842.758788-3-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250116193842.758788-1-florian.fainelli@broadcom.com> References: <20250116193842.758788-1-florian.fainelli@broadcom.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 BCM74110 uses a different process node compared to previous chips that requires a different equation, account for that. Signed-off-by: Florian Fainelli --- drivers/thermal/broadcom/brcmstb_thermal.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/broadcom/brcmstb_thermal.c b/drivers/thermal/broadcom/brcmstb_thermal.c index 270982740fde..f46f2ddc174e 100644 --- a/drivers/thermal/broadcom/brcmstb_thermal.c +++ b/drivers/thermal/broadcom/brcmstb_thermal.c @@ -286,14 +286,20 @@ static int brcmstb_set_trips(struct thermal_zone_device *tz, int low, int high) return 0; } -static const struct thermal_zone_device_ops brcmstb_16nm_of_ops = { +static const struct thermal_zone_device_ops brcmstb_of_ops = { .get_temp = brcmstb_get_temp, }; +static const struct brcmstb_thermal_params brcmstb_8nm_params = { + .offset = 418670, + .mult = 509, + .of_ops = &brcmstb_of_ops, +}; + static const struct brcmstb_thermal_params brcmstb_16nm_params = { .offset = 457829, .mult = 557, - .of_ops = &brcmstb_16nm_of_ops, + .of_ops = &brcmstb_of_ops, }; static const struct thermal_zone_device_ops brcmstb_28nm_of_ops = { @@ -308,6 +314,7 @@ static const struct brcmstb_thermal_params brcmstb_28nm_params = { }; static const struct of_device_id brcmstb_thermal_id_table[] = { + { .compatible = "brcm,avs-tmon-bcm74110", .data = &brcmstb_8nm_params }, { .compatible = "brcm,avs-tmon-bcm7216", .data = &brcmstb_16nm_params }, { .compatible = "brcm,avs-tmon", .data = &brcmstb_28nm_params }, {},