From nobody Thu Mar 28 18:16:10 2024 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 486ACC433F5 for ; Fri, 30 Sep 2022 12:39:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231276AbiI3Mj1 (ORCPT ); Fri, 30 Sep 2022 08:39:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229735AbiI3MjY (ORCPT ); Fri, 30 Sep 2022 08:39:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DD4CBF1D9 for ; Fri, 30 Sep 2022 05:39:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 59DAB6232B for ; Fri, 30 Sep 2022 12:39:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 842DAC433D6; Fri, 30 Sep 2022 12:39:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664541560; bh=tEozaHb1EwOmstcpCIwRRiZp1C/9JrsLwcpTdb1k3X8=; h=From:To:Cc:Subject:Date:From; b=T0EDgfQgvmYBLSv9OrSpIhvmkwN+cWf/8vnijeB9huu7k23C/E2npmMu5p0yqlJDv 7zbLhr/LsNqRWQTGiwiffhTTay64/BnX5D1QgpKMUiSP7mt/IzNqs+lVptZ6UsS/rq pBl4lccFcMZgFH/egtOFkxwL49p2szeq16mQDZlkNc1JoF1DzOs2CKvZbhOuF67Ubw nXkFFnDSlEjsNwbgxxRZYe4LyTtxxzPtprtEsNi4iBkZFym/8D/0FKhQHEBODt0pGS b2oATA/+7srrbyvYnUbW811ftd0J/tq8c14dH2PZzPlUJbga04YvjcaniyUtW7wEMF K+eYli43Ks7DA== Received: by pali.im (Postfix) id A685D93F; Fri, 30 Sep 2022 14:39:17 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Michael Ellerman , Nicholas Piggin , Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Marek=20Beh=C3=BAn?= , Josef Schlehofer Subject: [PATCH] powerpc: dts: turris1x.dts: Add channel labels for temperature sensor Date: Fri, 30 Sep 2022 14:39:01 +0200 Message-Id: <20220930123901.10251-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Channel 0 of SA56004ED chip refers to internal SA56004ED chip sensor (chip itself is located on the board) and channel 1 of SA56004ED chip refers to external sensor which is connected to temperature diode of the P2020 CPU. Fixes: 54c15ec3b738 ("powerpc: dts: Add DTS file for CZ.NIC Turris 1.x rout= ers") Signed-off-by: Pali Roh=C3=A1r Reviewed-by: Marek Beh=C3=BAn --- With this change userspace 'sensors' applications prints labels: $ sensors sa56004-i2c-0-4c Adapter: MPC adapter (i2c@3000) board: +34.2=C2=B0C (low =3D +0.0=C2=B0C, high =3D +70.0=C2= =B0C) (crit =3D +85.0=C2=B0C, hyst =3D +75.0=C2=B0C) cpu: +58.9=C2=B0C (low =3D +0.0=C2=B0C, high =3D +70.0=C2= =B0C) (crit =3D +85.0=C2=B0C, hyst =3D +75.0=C2=B0C) And without this change it prints just generic tempX names: $ sensors sa56004-i2c-0-4c Adapter: MPC adapter (i2c@3000) temp1: +43.0=C2=B0C (low =3D +0.0=C2=B0C, high =3D +70.0=C2= =B0C) (crit =3D +85.0=C2=B0C, hyst =3D +75.0=C2=B0C) temp2: +63.4=C2=B0C (low =3D +0.0=C2=B0C, high =3D +70.0=C2= =B0C) (crit =3D +85.0=C2=B0C, hyst =3D +75.0=C2=B0C) --- arch/powerpc/boot/dts/turris1x.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/powerpc/boot/dts/turris1x.dts b/arch/powerpc/boot/dts/tur= ris1x.dts index 4033c554b06a..5b5278c32e43 100644 --- a/arch/powerpc/boot/dts/turris1x.dts +++ b/arch/powerpc/boot/dts/turris1x.dts @@ -69,6 +69,20 @@ interrupt-parent =3D <&gpio>; interrupts =3D <12 IRQ_TYPE_LEVEL_LOW>, /* GPIO12 - ALERT pin */ <13 IRQ_TYPE_LEVEL_LOW>; /* GPIO13 - CRIT pin */ + #address-cells =3D <1>; + #size-cells =3D <0>; + + /* Local temperature sensor (SA56004ED internal) */ + channel@0 { + reg =3D <0>; + label =3D "board"; + }; + + /* Remote temperature sensor (D+/D- connected to P2020 CPU Temperature= Diode) */ + channel@1 { + reg =3D <1>; + label =3D "cpu"; + }; }; =20 /* DDR3 SPD/EEPROM */ --=20 2.20.1