From patchwork Tue Aug 9 11:22:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 12939546 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 28732C25B07 for ; Tue, 9 Aug 2022 11:23:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=3EpCt276dQs9Mcwz6laf4erxFEs60bhhS5rhVm2kvgI=; b=u/AgS9uA6vQo2L GWzURj7eYqw1EaA7KtxWI7BQj7fUomeDa6G1kE7VNd7angfYOm43AcY9rRsFzo2yjn5XeIR8qXqp5 TuiJ/W2LhswaJXK5bIq+eISu/xGAGItV9hvHPfcsnvAUVBp1JZxJjYio+q/YuPA1i1J6FtKHVH14q TmYZ5B0vKjOjTfS3t8OAGgKGw39Dq838PCq5yzjYuAKb7rQ0uV/Hx1f9jyb5TKp94p2JBsCzts3HD /LxejWW3G+0DNjm3iZit6G1J1h0Wo73H/jT9i2K68v+1CpY0v6WxJaHxMvRmcRUyzO3ntV8nYUnG0 3aQvf6aVEmMOwgBNHP5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLNJX-003Voe-Dz; Tue, 09 Aug 2022 11:22:23 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLNJT-003VmX-NV for linux-arm-kernel@lists.infradead.org; Tue, 09 Aug 2022 11:22:21 +0000 Received: by mail-ej1-x633.google.com with SMTP id uj29so21738259ejc.0 for ; Tue, 09 Aug 2022 04:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sartura-hr.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bs2fGCCkc2i9GgsvwKl491tj5ookRO+wJSTW2OEqR3M=; b=VJb9zJ/PZhORR9RBOkdVYOzLGPQtXBAhAx60nCXdVCdzLiU5rxjtt9t3SP68aJzPLf mJtLb2jPrL39bWcQUUUMs843YToAwhK13dbbbj4mugqcp+qRSO20fHbDAXmU8TRauV/F nSguaulCuRFKGL9hyMQm3T9Ch7pXUqseq5Wfm0Y6nIsWbf3MygTRna/8P79qNZZgePQQ aojxIxk4+gTbCDuFqFOZO1Yc/mR+nvQPeXNUs+71y0K5l7zEIxephLNe8A3pkvFsamuc dMW169eVljYxqeZ5aG/EFYGuVK7+yWIdsDuf2iKg0utAcZ7dWpAcelr9GRAmYz+bwd2M SupA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bs2fGCCkc2i9GgsvwKl491tj5ookRO+wJSTW2OEqR3M=; b=stulRaNH1ZKBi9ae0HE8w9vD8N7Y6dGBSRlsnghu3RlJdHQYsoerwVnDBIJt7LMqTh 49vO2lZTY+5UAJHzBcdevwOjHuQ+9Kc3yAwqtfRzoscH03/H6pufe2pE7O/lzdKKrrRh xAQX1jZkHO94jtrDI+NxEnJ1KkCTjD2Yx+zn7+cs1NKp6aTTyq3gTEaTkmGZSKB+W+o1 bIpyHkgWeljidCMgL7yqsORJHxH9cqRBR7+XAKV0Q2G1YnSTLGMyrn6sYx280NWylGhx +87SkxkqLe76hgYEOgXe9m2w1qgLnfXf9Sl0RVAcaqQTuc4xz6OjQazpOGM4YmceTN0g +9Eg== X-Gm-Message-State: ACgBeo0FtchlajcQFBCMBf7spLUzEufWmXQX5Z4fEJdEmV5gdsxQzGmL 5J2mXr4OrQ3PTo6LIVJW02/5IA== X-Google-Smtp-Source: AA6agR78Z7HuD7og8dYS+mFbUdm3BH5S3Gw88EcrwaztVepcpvssJmeElwyEOWkYNPDlYQlEuuuWGA== X-Received: by 2002:a17:907:9491:b0:72f:2827:37c3 with SMTP id dm17-20020a170907949100b0072f282737c3mr16629419ejc.306.1660044136529; Tue, 09 Aug 2022 04:22:16 -0700 (PDT) Received: from fedora.robimarko.hr (cpe-188-129-118-148.dynamic.amis.hr. [188.129.118.148]) by smtp.googlemail.com with ESMTPSA id me25-20020a170906aed900b007317f017e64sm1007581ejb.134.2022.08.09.04.22.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Aug 2022 04:22:16 -0700 (PDT) From: Robert Marko To: jdelvare@suse.com, linux@roeck-us.net, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, lars.povlsen@microchip.com, Steen.Hegelund@microchip.com, UNGLinuxDriver@microchip.com, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: luka.perkov@sartura.hr, Robert Marko Subject: [PATCH 1/2] dt-bindings: hwmon: sparx5: use correct clock Date: Tue, 9 Aug 2022 13:22:08 +0200 Message-Id: <20220809112209.241045-1-robert.marko@sartura.hr> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220809_042220_008331_8F6EF1E8 X-CRM114-Status: GOOD ( 11.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org SparX-5 temperature sensor uses system reference clock and not the AHB bus clock as indicated by the register information [1]. So, correct the clock description as well the included example. [1] https://microchip-ung.github.io/sparx-5_reginfo/reginfo_sparx-5.html?select=hsiowrap,temp_sensor,temp_sensor_cfg,clk_cycles_1us Fixes: f5520753c16f ("dt-bindings: hwmon: Add Sparx5 temperature sensor") Signed-off-by: Robert Marko Acked-by: Krzysztof Kozlowski --- .../devicetree/bindings/hwmon/microchip,sparx5-temp.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/hwmon/microchip,sparx5-temp.yaml b/Documentation/devicetree/bindings/hwmon/microchip,sparx5-temp.yaml index 76be625d5646..51e8619dbf3c 100644 --- a/Documentation/devicetree/bindings/hwmon/microchip,sparx5-temp.yaml +++ b/Documentation/devicetree/bindings/hwmon/microchip,sparx5-temp.yaml @@ -22,7 +22,7 @@ properties: clocks: items: - - description: AHB reference clock + - description: System reference clock '#thermal-sensor-cells': const: 0 @@ -40,5 +40,5 @@ examples: compatible = "microchip,sparx5-temp"; reg = <0x10508110 0xc>; #thermal-sensor-cells = <0>; - clocks = <&ahb_clk>; + clocks = <&sys_clk>; }; From patchwork Tue Aug 9 11:22:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 12939545 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D8F0CC19F2D for ; Tue, 9 Aug 2022 11:23:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=H2dRSI/B5SYYnzsvt6fTDMiTPMrO3ssNC/AUZyshkSU=; b=dH3YWQiHtUX+kV QqQv4DhC7ipgS+zXQ6gygDdFNZZFVg+1FGr5IkxD2CAkmxAupjJnTP5hIkzr9UKrB7u/ynDWXgW02 dIUI71C67RwjKhFMEpdD18B2L89Spx2nvyH/OFsAHe/BqG50R8so4pzj4QiFerU4aYsXn41HgMCT/ 1q5uvNOkFpSgT3OTYpLj8WYoJuwap6qxGnCjWv4QLDJpZcpj9as049mGO2CdtsEjCoKXyRT3X/6vI 4Swzh07KlbwvZV6eNm24PHJF7cPxKx3JVSF7oUDKc7a2M+k6gRSzlSmgavuqZU3KnqO5z++Ag1ZZ5 AuShZhsbwUjZf60hP6og==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLNJg-003Vs6-N8; Tue, 09 Aug 2022 11:22:32 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLNJU-003Vmw-6W for linux-arm-kernel@lists.infradead.org; Tue, 09 Aug 2022 11:22:21 +0000 Received: by mail-ed1-x529.google.com with SMTP id a89so14687485edf.5 for ; Tue, 09 Aug 2022 04:22:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sartura-hr.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pOc3Bz12pMayO94jwlOggCztVRhbn75rrJuEq+4iDRs=; b=5nanClqC7gUGBRKJRyyMG18QqI95z4Gf6/LlUYQBrhTiIWMxnbDYTfqUri3vFf2aP7 c38UBafW7cy8UtpEilMVcJ/GzYRI4s2DwD7csWAYMF13Z2PIf4op3Zhq5rqLJEIqps/w aPXczj8EKwBpBHfDPH+yKAmMtwifXhRwajVGpKNVtDMMLR7dT/d0b0wra+JRhMRxCMrc Yyxa2cwKe1g1vqb4kApbYuQxiRtBnSprDT9WhC10dEZ//huH4mKYIMR6xLDeQnNZrriO iw/pkIm1RfABTPXduw06gYBtvQZDlH0wB9gU0um8bSruNWPSqvsfo/FIaTYTTwd7VeEb pnFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pOc3Bz12pMayO94jwlOggCztVRhbn75rrJuEq+4iDRs=; b=jxwaUFDu2jGOeFx4vJ972Y53HkI4gbLypVMvEEwNypTQMzBX2mMETNIF0FW/4swf2T E5+Hiyo/g1WR3SELGsIyJu1SQxn+D86XN3cdrrrzdDPoaLrVtRKsTbkP4DAebmf5XdII YwbrHtxyvXOyaFgOoFpdsl+vq3VibiJVVXVT3Rbr5882g280ZKQkYibMepWIHsKFwm1s YbA+dzyEfO1sJt5/bgTRXOHHakqPqnID9nc4vstqbNngLlkRYy7HeB1tABmt4nw1Z67f 2mBhLG/IiuOQMq+7hSlnkV+r9YViauZKy5IZ6Ef+57o1vTb/WzhX+/rPnnUUS7u2xrzh EUPg== X-Gm-Message-State: ACgBeo10B4sgFe74LOw/eqGjJLQwoonGPp/2JGCke7GDu67go74l5Mkt W/e7e0V5Md7/OLi6pb8a4tG32g== X-Google-Smtp-Source: AA6agR7vtXurWB1a07/O+GNYr9tc4q9IST9idRSP6HWjaX2/KN7WGXZ7PlkRaaKef32KAQSZH/eAvw== X-Received: by 2002:a05:6402:424d:b0:43e:95d8:eb46 with SMTP id g13-20020a056402424d00b0043e95d8eb46mr21158481edb.306.1660044137704; Tue, 09 Aug 2022 04:22:17 -0700 (PDT) Received: from fedora.robimarko.hr (cpe-188-129-118-148.dynamic.amis.hr. [188.129.118.148]) by smtp.googlemail.com with ESMTPSA id me25-20020a170906aed900b007317f017e64sm1007581ejb.134.2022.08.09.04.22.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Aug 2022 04:22:17 -0700 (PDT) From: Robert Marko To: jdelvare@suse.com, linux@roeck-us.net, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, lars.povlsen@microchip.com, Steen.Hegelund@microchip.com, UNGLinuxDriver@microchip.com, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: luka.perkov@sartura.hr, Robert Marko Subject: [PATCH 2/2] arm64: dts: microchip: sparx5: use correct clock for tmon Date: Tue, 9 Aug 2022 13:22:09 +0200 Message-Id: <20220809112209.241045-2-robert.marko@sartura.hr> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220809112209.241045-1-robert.marko@sartura.hr> References: <20220809112209.241045-1-robert.marko@sartura.hr> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220809_042220_292715_9A96C951 X-CRM114-Status: GOOD ( 12.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org SparX-5 temperature sensor uses system reference clock and not the AHB bus clock as indicated by the register information [1]. Configured number of system clock cycles in one 1us is now almost spot on to the default register value. [1] https://microchip-ung.github.io/sparx-5_reginfo/reginfo_sparx-5.html?select=hsiowrap,temp_sensor,temp_sensor_cfg,clk_cycles_1us Fixes: d14f6a1ae07f ("arm64: dts: sparx5: Add hwmon temperature sensor") Signed-off-by: Robert Marko --- arch/arm64/boot/dts/microchip/sparx5.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/microchip/sparx5.dtsi b/arch/arm64/boot/dts/microchip/sparx5.dtsi index 6f6aab48516e..c9367127670b 100644 --- a/arch/arm64/boot/dts/microchip/sparx5.dtsi +++ b/arch/arm64/boot/dts/microchip/sparx5.dtsi @@ -421,7 +421,7 @@ tmon0: tmon@610508110 { compatible = "microchip,sparx5-temp"; reg = <0x6 0x10508110 0xc>; #thermal-sensor-cells = <0>; - clocks = <&ahb_clk>; + clocks = <&sys_clk>; }; mdio0: mdio@6110102b0 {