Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1306710rwb; Tue, 29 Nov 2022 11:39:15 -0800 (PST) X-Google-Smtp-Source: AA0mqf4JUjfmX9S7pN7H1WYAL15fyszFRULvGv6NdQlrSomptcb4J4jfgg7nNzLN3loDuyxkbVBl X-Received: by 2002:a63:5511:0:b0:477:ce06:6c94 with SMTP id j17-20020a635511000000b00477ce066c94mr24729841pgb.138.1669750755304; Tue, 29 Nov 2022 11:39:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669750755; cv=none; d=google.com; s=arc-20160816; b=PoSnXgbGSpl3FinjVyEnrKJnoNVkWl3mxPeSYNK2L0Ku1v2BJ1WNSFo4d/GT8YaD9r T8iftA2uoDBQ/2QKR14xCPvl/L2DIQoGxeeMQVtptasx6lo7OaESGT04RhV4nUqJJN1O Z0sCEV+n4E/AO84apnojkgrwtctspzxCXTE34EhfgYiIXGZpTKt/tscfm3TCtXCFQked lOE0gwcBetGi0ur9Iaz3OI6B1tsYrwKV7uNioFhsMBOh0HABgBuxISNqzX38UKLvW0av BpiwcUyB8rQDUTON0Gh9dResBfTd75n9uyZerTtdKBP0OXZK0fn+iwG+i6VKopAAF6TV g7qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=s+cQ20Tc33cAkypMyPgQs0SUl+Sssv7OH5X3r08sEug=; b=SjsF6YQawGxF+/ECXMP97f+sU3AYC8CaFGJfcisnJoyhmu9f41+UHxMQp4SxDUvphx PRnfYS0Wy21HwITqpy3I0FdV/yQUwFBifXa/dM/zTudMvqPUambTeC4UssLve0Ctde4s RxTbFn/luz7Wf/e+2ssTKYW3DcwO7Ir3qjgqk1z+Nq2WKGYBFNTRI6M/v193RLv7xH2S DWmG5x8ljyx4lKLjY3xMjXm0KQqIaplPj9rh+kW9e4QcYI4Ovy6PLotKliP/kPeL8lTo YOqmXeuvoVYcvUyDOWlkn5S0SPsLEKOBnN/fDmHIHwEQE+o3EJq+fZZ3UxhLrRvowoC5 eZSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EqVmxaBr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oo12-20020a17090b1c8c00b001fd70129092si2747332pjb.15.2022.11.29.11.39.04; Tue, 29 Nov 2022 11:39:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EqVmxaBr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236364AbiK2S50 (ORCPT + 84 others); Tue, 29 Nov 2022 13:57:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236294AbiK2S4p (ORCPT ); Tue, 29 Nov 2022 13:56:45 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11DB161BA1; Tue, 29 Nov 2022 10:56:18 -0800 (PST) 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 A129F61890; Tue, 29 Nov 2022 18:56:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A686AC433D6; Tue, 29 Nov 2022 18:56:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669748177; bh=RGuIOhXviKMq41t9CeKW7AFIl48krHdo1X9sgB4ZdIQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EqVmxaBrBK/XMgdJsfjXkBWJMoeKNTSD6JzHwzxEnFDViQ6xizXwo81TcHZGu4FIZ Utbh2JbHpkcwTIuMXC6hoxkUM+ZCRlNieNOWq6TcrVg4SWj8i/LqXVg99SzZYhvpBf s47s0MEJ3FtXp/ung6zU1M/CpE8euE0ZLLsc3qGAHEFTtopCJX/UYzhVRSByPFTGnS HSNRV7lidXOd2iZzCkzOVgGhPfwxvtAI7EZYPLlvpZe7iveych5nYEirbR9GPu6Udk HqYUzDqsas0wusqbQqT8oS4lfCVkYg0HRK1eJl9FHYDOt5UagIqkFQR8Jj3pTaXK8j FVMCAlodl4WiQ== Received: by pali.im (Postfix) id B3076898; Tue, 29 Nov 2022 19:56:13 +0100 (CET) Date: Tue, 29 Nov 2022 19:56:13 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Michael Ellerman Cc: Nicholas Piggin , Christophe Leroy , Marek =?utf-8?B?QmVow7pu?= , Josef Schlehofer , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org Subject: Re: [PATCH] powerpc: dts: turris1x.dts: Add channel labels for temperature sensor Message-ID: <20221129185613.gunub5hgjfgvroh5@pali> References: <20220930123901.10251-1-pali@kernel.org> <20220930124618.kyaansrl7ls5kn3i@pali> <20221009120506.itwa4n25nljn2tll@pali> <20221101224348.xkpzucskunn46i5z@pali> <87k03eblsr.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87k03eblsr.fsf@mpe.ellerman.id.au> User-Agent: NeoMutt/20180716 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 29 November 2022 12:18:28 Michael Ellerman wrote: > Pali Rohár writes: > > Michael, could you take this patch? > > Yep. > > With these dts patches it always helps if you tell me that it passes the > DT schema checks, so that I don't get yelled at by the DT people :) Mostly dt schemas for p1/p2 are incomplete, I sent more patches but they are waiting and I was not able to setup & run dt schema checker. Hence I tested everything on the hardware to ensure that it works correctly. And this patch works on Turris 1.1 board, I also tested sensors tool. So the important is what is in DTS file, the stuff which is used on HW. > cheers > > > On Sunday 09 October 2022 14:05:06 Pali Rohár wrote: > >> On Friday 30 September 2022 14:46:18 Pali Rohár wrote: > >> > + CC hwmon ML > >> > > >> > On Friday 30 September 2022 14:39:01 Pali Rohár wrote: > >> > > 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 routers") > >> > > Signed-off-by: Pali Rohár > >> > > --- > >> > > With this change userspace 'sensors' applications prints labels: > >> > > > >> > > $ sensors > >> > > sa56004-i2c-0-4c > >> > > Adapter: MPC adapter (i2c@3000) > >> > > board: +34.2°C (low = +0.0°C, high = +70.0°C) > >> > > (crit = +85.0°C, hyst = +75.0°C) > >> > > cpu: +58.9°C (low = +0.0°C, high = +70.0°C) > >> > > (crit = +85.0°C, hyst = +75.0°C) > >> > > > >> > > And without this change it prints just generic tempX names: > >> > > > >> > > $ sensors > >> > > sa56004-i2c-0-4c > >> > > Adapter: MPC adapter (i2c@3000) > >> > > temp1: +43.0°C (low = +0.0°C, high = +70.0°C) > >> > > (crit = +85.0°C, hyst = +75.0°C) > >> > > temp2: +63.4°C (low = +0.0°C, high = +70.0°C) > >> > > (crit = +85.0°C, hyst = +75.0°C) > >> > > --- > >> > > 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/turris1x.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 = <&gpio>; > >> > > interrupts = <12 IRQ_TYPE_LEVEL_LOW>, /* GPIO12 - ALERT pin */ > >> > > <13 IRQ_TYPE_LEVEL_LOW>; /* GPIO13 - CRIT pin */ > >> > > + #address-cells = <1>; > >> > > + #size-cells = <0>; > >> > > + > >> > > + /* Local temperature sensor (SA56004ED internal) */ > >> > > + channel@0 { > >> > > + reg = <0>; > >> > > + label = "board"; > >> > > + }; > >> > > + > >> > > + /* Remote temperature sensor (D+/D- connected to P2020 CPU Temperature Diode) */ > >> > > + channel@1 { > >> > > + reg = <1>; > >> > > + label = "cpu"; > >> > > + }; > >> > > >> > I'm not sure if you want UPPERCASE, lowercase, PascalCase, kebab-case > >> > or snake_case format of labels. Or if you want also "temp" or > >> > "temperature" keyword in the label. So please adjust label to the > >> > preferred one, if proposed format is not the correct. > >> > >> Ok, if nobody complains then please take this patch as is. > >> > >> > > }; > >> > > > >> > > /* DDR3 SPD/EEPROM */ > >> > > -- > >> > > 2.20.1 > >> > >