From patchwork Thu Jul 12 08:39:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 10521311 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F30D2602C8 for ; Thu, 12 Jul 2018 08:40:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D138E29528 for ; Thu, 12 Jul 2018 08:40:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CEA0929401; Thu, 12 Jul 2018 08:40:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 721CB294CD for ; Thu, 12 Jul 2018 08:40:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=/Ac8+30xTB5ifcOBkmieVoHWppTmz4i3NyCz/cRbwi8=; b=DBlZtCB4sSDVJ/EEkggw00Ljv9 bd226Xqstw2PB6utPGk/PONPCpUT7+2tG2Zu+k6RXgMK9gUs/qaYcEwxojE0DV6Q/EMW/h/MTl668 aFr1RDcSbqWq1JNLvFgj3gGEm9k4jeouoPkdlaz1jkS75+5vG3HKP+QUvckGmydaUCc8TKZH+nYoo cWH9/Ve1R2g1VvnkkPMMyvbuUkYkPA2XvrswILQSuamUGhzHJCar0b/04ae0QYc8hq5bynCOcUhgD F6aBm1BlIQDmZoEKokk/idSVSXxrXPD5DannAmaOtDcwDQt6xdobfiSermeN7LBjoJKjQnlX5f4D1 NHWaUM8w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fdX97-0005VH-RG; Thu, 12 Jul 2018 08:40:17 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fdX92-0004Bp-3v for linux-arm-kernel@lists.infradead.org; Thu, 12 Jul 2018 08:40:15 +0000 Received: by mail-wr1-x442.google.com with SMTP id s11-v6so20783454wra.13 for ; Thu, 12 Jul 2018 01:40:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=ZzpPOX6HBv8psnc5B12jO2LM/pMBPBiDKEZDZJj29Fs=; b=Dt25UugJfUcDrC8jI0eto6dR1LNDIhQU3TA9bAiyOL9fLyHjtMTeJ0BTqMhcu2bQIa 0xf1PldJugHUqSZElVHVrHEsSAQ5SrPrFmLl9zW9hXPpAb+f5e1nv9EMgHpRhyCuS8u7 3RG7Lum2+YdkpqQ4rm9yhUCSqgvbN1GvkwKT8= 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:in-reply-to:references; bh=ZzpPOX6HBv8psnc5B12jO2LM/pMBPBiDKEZDZJj29Fs=; b=XlettLpiaM/zEAZ72mYvKOBHk9s4kOPI7tnmUGyhDZvDa7pU+F8vZATzkA79j9iVum ayQ7cZ+OuJ49BG3bG99ZyOvaVLfyg/VkPlrHY4hyIJyC8YWOdpRAs4TPO++WITs4+ms1 W89jbtjPvxk2QfGMVil80OxL/9RSaYTkSHsdb5XDLEvGJYGjCL9vaZL9odi1ddBPz9Jf 6qCpeLO34Maq7Qe7Mx4bU9fSeNsF29ujNlTKh34R5YvByroISdhKHnfjlKcHPLWpVaL0 dvG2RWtYffOp3xh4EH+XT7K8Q9OPkdebhgjxZvhIcyaeUMQJMGaoz4DmrDAoqprmPYQj Vc9A== X-Gm-Message-State: AOUpUlHwP6+GAIGcXgvwsu8jxH0CF0kR5nCZyVlduxc7YK8rWCMIg8FG 2gK3ikvrRWMIh9jv2WKNd81dKg== X-Google-Smtp-Source: AAOMgpeLbvqjs1FH4W86ThLSU1LnxUvBxFdqokeHQkWK0gOqquSQf6Ll8ofjlTE8QXFc0Ue1Sn6rMg== X-Received: by 2002:adf:d142:: with SMTP id b2-v6mr961799wri.17.1531384798662; Thu, 12 Jul 2018 01:39:58 -0700 (PDT) Received: from localhost ([103.249.91.93]) by smtp.gmail.com with ESMTPSA id r194-v6sm4336410wmd.36.2018.07.12.01.39.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jul 2018 01:39:57 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org Subject: [PATCH v7 3/7] arm64: dts: msm8996: thermal: Initialise via DT and add second controller Date: Thu, 12 Jul 2018 14:09:04 +0530 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180712_014012_267333_C29D7C2B X-CRM114-Status: GOOD ( 14.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, dianders@chromium.org, rnayak@codeaurora.org, linux-arm-msm@vger.kernel.org, Will Deacon , smohanad@codeaurora.org, Rob Herring , bjorn.andersson@linaro.org, edubezval@gmail.com, David Brown , mka@chromium.org, vivek.gautam@codeaurora.org, Catalin Marinas , andy.gross@linaro.org, linux-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP We also split up the regmap address space into two, for the TM and SROT registers. This was required to deal with different address offsets for the TM and SROT registers across different SoC families. 8996 has two TSENS IP blocks, initialise the second one too. Since tsens-common.c/init_common() currently only registers one address space, the order is important (TM before SROT). This is OK since the code doesn't really use the SROT functionality yet. Signed-off-by: Amit Kucheria Reviewed-by: Bjorn Andersson Tested-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index 8c7f9ca..688e752 100644 --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi @@ -459,9 +459,19 @@ status = "disabled"; }; - tsens0: thermal-sensor@4a8000 { + tsens0: thermal-sensor@4a9000 { compatible = "qcom,msm8996-tsens"; - reg = <0x4a8000 0x2000>; + reg = <0x4a9000 0x1000>, /* TM */ + <0x4a8000 0x1000>; /* SROT */ + #qcom,sensors = <13>; + #thermal-sensor-cells = <1>; + }; + + tsens1: thermal-sensor@4ad000 { + compatible = "qcom,msm8996-tsens"; + reg = <0x4ad000 0x1000>, /* TM */ + <0x4ac000 0x1000>; /* SROT */ + #qcom,sensors = <8>; #thermal-sensor-cells = <1>; };