From patchwork Wed Nov 27 05:29:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasily Khoruzhick X-Patchwork-Id: 11263445 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AA08A1390 for ; Wed, 27 Nov 2019 05:30:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8892D2084B for ; Wed, 27 Nov 2019 05:30:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TH8Cv41K" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726719AbfK0FaI (ORCPT ); Wed, 27 Nov 2019 00:30:08 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:43295 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726558AbfK0FaH (ORCPT ); Wed, 27 Nov 2019 00:30:07 -0500 Received: by mail-pf1-f193.google.com with SMTP id h14so196207pfe.10; Tue, 26 Nov 2019 21:30:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=K9R7+DQrvs6TQPapCAJo0gk7ntwM61doRyvwyArb+eI=; b=TH8Cv41KFqnO7YoWhF3rUR1KCNUQJDWeIWCGHjxg+IoW5wMeCB2YlPG+nzKRWR7hf0 MxQ0cDN93bo4wWlrE9FvswOP05pIKVpdcEhRj0WcRGaQYcb3WLXGFM9YlVQCJ1UI/0u7 Lp8gLjpxu1/xO7JUwotlfW0WFz1XiwHhSHACilfn7HOzTcXC7QMiGQjcnqNFhU13Mdle 5SFBHc0iO4GABmm+pWKmStDq/jZF9s4RXg0VWfeP5X/+bZaWSZy0ihRODHIc+W8K8bpN CXEfV5zgzQ0zp9rAkPfkqpjFp+H/FLGZQZ/ZHOFzBLoaIhMxC7sDnUeHJ+OeSU7sRv7b 02DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=K9R7+DQrvs6TQPapCAJo0gk7ntwM61doRyvwyArb+eI=; b=DtTXgQRbsZRJ7OdosyAKb3zQWATHuPl+Oh8vPn6cmT30MiC9LNvhAF2/J4eYFrDlhd kdLH68w1PDwJUxpMGb8qkDRA3ZdIqogmm0oRzTUSXBC21oonOczQZpIgaX7MSqh2Jdsl SdTpmnuDDkmZN5z+A/M+d7ZKlDNwasEszQ80YhIqinCnYbIL3TpHsIKC0K2zuDMox0rt mtAJ3Ilpo77/PfOKlZJUSQkxqGoagkRN1vxijOHCapZvNsdVByoJacjOomMiSA9rcRgZ hYECPwURssylD6ITRH9nfvMXMpou710Zqj3XNfDgvRvEOK7gb16oczm0TCeDOZtq/tW1 ckng== X-Gm-Message-State: APjAAAWlaqGqSH5WmvWmvBZ1FwjflYkqp/CUlV2jVyHW2VeVhLtR9WDD UMOLC2c9jBTlD5W/l5HBH98= X-Google-Smtp-Source: APXvYqxTI+MD/D0kvl0k+/tjZfeKHHZWlWyAB8qP26s2p6gtSih/hYSQl8OXFDwnSnq2wB0zXiS2ug== X-Received: by 2002:aa7:90d5:: with SMTP id k21mr45284823pfk.178.1574832606794; Tue, 26 Nov 2019 21:30:06 -0800 (PST) Received: from anarsoul-thinkpad.lan (216-71-213-236.dyn.novuscom.net. [216.71.213.236]) by smtp.gmail.com with ESMTPSA id p38sm4360825pjp.27.2019.11.26.21.30.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2019 21:30:06 -0800 (PST) From: Vasily Khoruzhick To: Yangtao Li , Zhang Rui , Eduardo Valentin , Daniel Lezcano , Amit Kucheria , Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai , Mauro Carvalho Chehab , "David S. Miller" , Greg Kroah-Hartman , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?utf-8?q?Ond=C5=99ej_Jirman?= , linux-kernel@vger.kernel.org Cc: Vasily Khoruzhick Subject: [PATCH v6 5/7] arm64: dts: allwinner: sun50i-h5: Add thermal sensor and thermal zones Date: Tue, 26 Nov 2019 21:29:33 -0800 Message-Id: <20191127052935.1719897-6-anarsoul@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127052935.1719897-1-anarsoul@gmail.com> References: <20191127052935.1719897-1-anarsoul@gmail.com> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Ondrej Jirman There are two sensors, one for CPU, one for GPU. Signed-off-by: Ondrej Jirman Signed-off-by: Vasily Khoruzhick --- arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 32 ++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi index f002a496d7cb..27fb0d2fc9a7 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi @@ -167,6 +167,32 @@ assigned-clocks = <&ccu CLK_GPU>; assigned-clock-rates = <384000000>; }; + + ths: ths@1c25000 { + compatible = "allwinner,sun50i-h5-ths"; + reg = <0x01c25000 0x400>; + interrupts = ; + resets = <&ccu RST_BUS_THS>; + clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>; + clock-names = "bus", "mod"; + nvmem-cells = <&ths_calibration>; + nvmem-cell-names = "calibration"; + #thermal-sensor-cells = <1>; + }; + }; + + thermal-zones { + cpu_thermal: cpu-thermal { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&ths 0>; + }; + + gpu_thermal { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&ths 1>; + }; }; }; @@ -212,4 +238,10 @@ &sid { compatible = "allwinner,sun50i-h5-sid"; + #address-cells = <1>; + #size-cells = <1>; + + ths_calibration: thermal-sensor-calibration@34 { + reg = <0x34 4>; + }; };