Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp463361lqr; Wed, 5 Jun 2024 10:54:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWdHaq3hhsf2f68x+KSO7hrKO2ON2VbJIVnf+nQPcaHTZf2iu51s4ibEe0tzfESndb/HSSq7VYldLLJOdG3EmAydUgb4wAiChPWcBstfg== X-Google-Smtp-Source: AGHT+IFKv7dXAfHY+Yfwxf+mxMUGlSSICUflS7GuUC7nmfVI06vfEYnofk5UyhxzfcAyHGSbTW39 X-Received: by 2002:a05:620a:70e8:b0:795:15ed:1fcb with SMTP id af79cd13be357-79523fc2b5fmr332200785a.59.1717610072943; Wed, 05 Jun 2024 10:54:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717610072; cv=pass; d=google.com; s=arc-20160816; b=P/BC8H6bMr5dncxzfvX2G6jmL7/Gpk1u6D/POMSYJjBdvC/k6coYKZSqcZjMACIACa 7GJKiw+7hmuKPOsyWdl9K6GZXkfjsSPM92MqqyHz48VUJnD7otAi7x4WCwL6fhbjsKYY hQ4WWZlOK6IGJD3hyqLJXFQQpsQj3QP2XHdbvczijExGWd9i11F3KGviUxY9XH1mZrl1 IcuE0z8UOPgsK8hoSD0OjXcpc4AFPjKrUN3MIyR1w3Zgjvwuu80P8ELRYBuPjsKmGFex VCGaFREZXwZo7ljMqARvL6WCuraslVY8UOC05w4g13BO2ikk+nJosfF4PjaewsPFh4wZ 3QIA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=9DvzUhXFVK+psXhvth9gSOojco570PGoGqY20a5jDWg=; fh=NWGlNPIJ+gqU7ycWdfEJGHy8mCB3J46PZ3IseuSnPm4=; b=w0zqRd7FArDcg/0EmghX8eBuCHsDJtZRDtC7ztrDyAZhdjdJOO+c31ggEC+xGVWcOJ JSJA/OpngCEiySpCslMoW1KhhnJKZcGaRWovxWmak2ZK6obELkEO8lGaiMbrsroPY1+X T0QQ5kg3MRxULi+zBlYRc65brRh7gj23aPkOxJV5l23Vh5LLhWNTWo6g6IUoY+pGk+up u7/Ni1LJMX0RSfOr0vIwpxEPJCWOxOZOxZo1gdHWkgcJdUcK+CXfrkvCf5XKduTvm++m v8w85jMngvcyIMd3rjZpPJ5dFEySBcOOAF6dbyEwGTJadeoFSOkUSy1mlwW3CRSExfpQ +vww==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kzecBLOc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202992-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202992-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43ff246900dsi6183801cf.389.2024.06.05.10.54.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 10:54:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202992-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kzecBLOc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202992-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202992-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 98AB91C218CB for ; Wed, 5 Jun 2024 17:54:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 925A8194AF7; Wed, 5 Jun 2024 17:54:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kzecBLOc" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A1471139D00; Wed, 5 Jun 2024 17:54:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717610063; cv=none; b=NhvOC+iaXtLUoBHFQEzjKt5JwTaM+FIbLWltUzkUeNdxIzYn7g44LwKeUPuVPcJrap6fFhkFSxJwUNauZisUsh1kMfcLS3KjEm0POMuvkMcUFJI8qhSfi9qWgBeePVpaLF5LSTkDo+h6hMQQZfVJqQ/tjCuXyliqVOzJitrz76k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717610063; c=relaxed/simple; bh=A8lg5hz+MBOmGn5ya8/fL07rjZlvK77wfF8N5N6s7aA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Zw7l+VPUFnMy9cweBbFe61Z97h6x0dEbNEISpPzADJyKHLROg3eHtbQCPSi35BW3WTd0KQ+ZiXRwPUNgWT6RsgyXsbVGhKXiJe7tZR3tbR4hzE3eFlS9YRAWQpHZCs5XxA1xtH1ZMtiO1QFTowWC7dJgPYT16+HYUMz5hhvuZuE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kzecBLOc; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83FD8C2BD11; Wed, 5 Jun 2024 17:54:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717610063; bh=A8lg5hz+MBOmGn5ya8/fL07rjZlvK77wfF8N5N6s7aA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kzecBLOcSILnskzdHSvhm2It8XC1bmx/lcsBrKDsKX86PvaXgBWRFa+xUD+26xIDJ SFLQxn9UDgsrp4y3e0Z5nFYhTT7ekyNHbCLr0SdhIW65m2vpMRx6F0d/NPshS8EMrx zqb/c+X8v94QIWOmN2HEBoNa6qS4LwJ975bk9cvo5njY6qQeBc5ZMhMgyeGXH7XZQg Ef1v0hQqrcvRZllDwbxnBId9n/YCOlQBVNMy8AILyg9CSA0KxGSID5u/smQ7CTXpBY clssyHfC1PN+jDBiD/uEHld7OX9xG2nBBuLqc4TYAEVS0JX179I6RUhDBubBIjDPM0 935ce12yzNZIA== Date: Wed, 5 Jun 2024 18:54:17 +0100 From: Conor Dooley To: Inochi Amaoto Cc: Haylen Chu , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen Wang , Paul Walmsley , Palmer Dabbelt , Albert Ou , Jisheng Zhang , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v2 1/3] dt-bindings: thermal: sophgo,cv180x-thermal: Add Sophgo CV180x thermal Message-ID: <20240605-tightwad-janitor-82cfceb1469d@spud> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="zOo6vMANsZN3Leyq" Content-Disposition: inline In-Reply-To: --zOo6vMANsZN3Leyq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 05, 2024 at 11:40:32AM +0800, Inochi Amaoto wrote: > On Tue, Jun 04, 2024 at 12:54:19PM GMT, Haylen Chu wrote: > > Add devicetree binding documentation for thermal sensors integrated in > > Sophgo CV180X SoCs. > >=20 > > Signed-off-by: Haylen Chu > > --- > > .../thermal/sophgo,cv180x-thermal.yaml | 82 +++++++++++++++++++ > > 1 file changed, 82 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/thermal/sophgo,cv= 180x-thermal.yaml > >=20 > > diff --git a/Documentation/devicetree/bindings/thermal/sophgo,cv180x-th= ermal.yaml b/Documentation/devicetree/bindings/thermal/sophgo,cv180x-therma= l.yaml > > new file mode 100644 > > index 000000000000..1c3a6f74ff1d > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/thermal/sophgo,cv180x-thermal.y= aml > > @@ -0,0 +1,82 @@ > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/thermal/sophgo,cv180x-thermal.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Sophgo CV180x on-SoC Thermal Sensor > > + > > +maintainers: > > + - Haylen Chu > > + > > +description: Binding for Sophgo CV180x on-SoC thermal sensor > > + > > +properties: > > + compatible: > > + enum: > > + - sophgo,cv1800-thermal > > + - sophgo,cv180x-thermal > > + >=20 > Is this necessary? I don't find any change between the sensor of these. "cv180x" isn't even a real device. Either we have a compatible that matches an actual SoC and use it everywhere, or we add ones for each SoC and have a fallback to cv1800. > > + reg: > > + maxItems: 1 > > + > > + clocks: > > + description: The thermal sensor clock > > + > > + clock-names: > > + const: clk_tempsen clock-names is not useful here as there's only one clock. "clk_tempsen" sounds more like the name for this clock at the provider than at the consumer anyway. > > + > > + accumulation-period: > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + description: Accumulation period for a sample > > + oneOf: > > + - const: 0 > > + description: 512 ticks > > + - const: 1 > > + description: 1024 ticks > > + - const: 2 > > + description: 2048 ticks > > + - const: 3 > > + description: 4096 ticks > > + default: 2 > > + > > + chop-period: > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + description: ADC chop period What's a "chop" and why is either this or the accumulation-period a fixed property of the hardware? Shouldn't this choice really be up to the user? > > + oneOf: > > + - const: 0 > > + description: 128 ticks > > + - const: 1 > > + description: 256 ticks > > + - const: 2 > > + description: 512 ticks > > + - const: 3 > > + description: 1024 ticks Can we just make the number of ticks the unit here, and above? Also, a "oneOf: - const" structure is just an enum. > > + default: 3 > > + > > + sample-cycle-us: > > + description: Period between samples > > + default: 1000000 No constraints? Thanks, Conor. > > + > > + '#thermal-sensor-cells': > > + const: 0 > > + > > +required: > > + - compatible > > + - reg > > + - clocks > > + - clock-names > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + #include > > + thermal-sensor@30e0000 { > > + compatible =3D "sophgo,cv180x-thermal"; > > + reg =3D <0x30e0000 0x100>; > > + clocks =3D <&clk CLK_TEMPSEN>; > > + clock-names =3D "clk_tempsen"; > > + #thermal-sensor-cells =3D <0>; > > + }; > > +... >=20 > Where is the interrupt number? The sensors does support the interrupt, > but I don't see you describe it in the binding. >=20 > > --=20 > > 2.45.2 > >=20 --zOo6vMANsZN3Leyq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZmCmSQAKCRB4tDGHoIJi 0lO6AP9sW5xE2Dz5LvNJjPgXDWtF96Y9pG6mweRGMoUn50K5aQEAibhcLwbeJFd5 S4Ye7d9hhxUVcwTpWFotGEFVBPZPlAk= =GiCK -----END PGP SIGNATURE----- --zOo6vMANsZN3Leyq--