Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2278004rdb; Wed, 21 Feb 2024 02:42:17 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVPvFP3AVyZduhRT2wle9hHKxf9CFKgQ+soMoQi/4+BbKLWem0l/I/LlXPGfPO8oQoqXNl54UdJhC/HmVwPExgdOPC5NgC84liuWiXhJA== X-Google-Smtp-Source: AGHT+IFA577w4YVgY7TgqF0CKej++kicAdMVIZpxaNvTZjQFV/91kW7gWKMLOVkllTZWI44g0Ehw X-Received: by 2002:a05:6214:21ad:b0:68f:a738:61f0 with SMTP id t13-20020a05621421ad00b0068fa73861f0mr1433758qvc.23.1708512137512; Wed, 21 Feb 2024 02:42:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708512137; cv=pass; d=google.com; s=arc-20160816; b=MwC9hMXjWbbBuhyp1kRIGyrvSga4aqmyf6Iw1J01MfTmVUlUSIufgxYtDmlo4D3HxO 7jaULEj1wSy8eFQI/95KynknNExEzsCLiKCtRroovhP2r8vaNBhCDeW+R0xXqbmMHpW5 2gjosxo5by0PcZtRhoiAWXQ2nhWK3QLMnQmeOiOGAxZY+ZKFp8x0BkMcu9Cv9VaYaCxp en4xb6VDwEXkGykMURG6PuFSyIGHstmdegrkbu0CxgRIlFWwSib/T22HT2+Qz5JaPB18 VuBa1SOd3DkxLJbmtNLjlTKhj39h51McxCMfLzitDaFQvHz5BJjJKGceeikTyNKdZopr LkOw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=sfrLJMedXrBJW1FkkaRTUX3nzPIoaNpBqlEg/hrdOmo=; fh=eDu/Y18L2I6ikEBNg8+bEs5lw4EORv2/oUMk9KYg1Cc=; b=kdlbGtwlBXqDZWxND7dOrjBg/BoN6WoxGETBOLun6x6iwK6BJMBKBH8Rf8jlS/VdYu xykIevT3i666gFy0fwUfGKD8IjRYjP5NkiRTPY434xrkncDAJsJJVHNWJmdrOiB0cfAy 7e2zsTyA+ZuESUGPg8Y34OxtGzldzA6r03KewBj0pj7ozz2fUjp0rpwAIf9pWepnIDvc 0tzC79pvNETE2pFHFe+yE1DmxmQ0jrdLmLtsNd8BF5Cn91lrAmuuGCzobBOncOQ5n7zT 34QHJ+/SekeJvxXleiQyRTOa8KbcVsdEwPbh6mQCI3OAQ69VZ8R+vUzIPgPvV/C2LymB F89g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=aspeedtech.com dmarc=pass fromdomain=aspeedtech.com); spf=pass (google.com: domain of linux-kernel+bounces-74552-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74552-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=aspeedtech.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u11-20020a0562141c0b00b0068efb72bf51si10122813qvc.329.2024.02.21.02.42.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 02:42:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74552-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; arc=pass (i=1 spf=pass spfdomain=aspeedtech.com dmarc=pass fromdomain=aspeedtech.com); spf=pass (google.com: domain of linux-kernel+bounces-74552-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74552-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=aspeedtech.com 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 490B61C21062 for ; Wed, 21 Feb 2024 10:42:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4C6273F8C3; Wed, 21 Feb 2024 10:41:47 +0000 (UTC) Received: from TWMBX02.aspeed.com (mail.aspeedtech.com [211.20.114.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7B723C493; Wed, 21 Feb 2024 10:41:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.20.114.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708512106; cv=none; b=HZYYup0lvmD5rtCsLxb8DvQ7QhOtHmSAg8PjwmfhywLFNyVyI6cPnBJNQu6cuSDav/M8BVXN7nSDTeNiV/vqo3+4LoyKDpWTdNcOzQyXO0YO51BJj1U0em9JWuuv/ifaDgc68RHw5DBuJkXTTgrhjZjRuUIk03M9sFCd2VciRLU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708512106; c=relaxed/simple; bh=viQZv/B9XrZoukqJQ4ztqopYr/poAC3x+wc+de/dLM4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Hmyf3C8PhgzQdOozS1TYvorQo73EE6LiTdSCsV4EAiBwy1Qev27Td0tFbUb4aiI5gXkUHqxW7IOIEEHQWxNhMXMuEqYf+26JmoEFnYx5Pw0qT1+ldSpcnquaPiciA5tb8i7vvFr5kPNo2qnAKXGHUcnQbVlEu6G9yB1djef4s/s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com; spf=pass smtp.mailfrom=aspeedtech.com; arc=none smtp.client-ip=211.20.114.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aspeedtech.com Received: from TWMBX03.aspeed.com (192.168.0.62) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 21 Feb 2024 18:40:28 +0800 Received: from TWMBX02.aspeed.com (192.168.0.24) by TWMBX03.aspeed.com (192.168.0.62) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 21 Feb 2024 18:41:17 +0800 Received: from twmbx02.aspeed.com (192.168.10.10) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 21 Feb 2024 18:40:27 +0800 From: Billy Tsai To: , , , , , , , , , , , , , , , , , , , , CC: Rob Herring Subject: [PATCH v14 1/3] dt-bindings: hwmon: fan: Add fan binding to schema Date: Wed, 21 Feb 2024 18:40:23 +0800 Message-ID: <20240221104025.1306227-2-billy_tsai@aspeedtech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240221104025.1306227-1-billy_tsai@aspeedtech.com> References: <20240221104025.1306227-1-billy_tsai@aspeedtech.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain From: Naresh Solanki Add common fan properties bindings to a schema. Bindings for fan controllers can reference the common schema for the fan child nodes: patternProperties: "^fan@[0-2]": type: object $ref: fan-common.yaml# unevaluatedProperties: false Reviewed-by: Rob Herring Signed-off-by: Naresh Solanki Signed-off-by: Billy Tsai --- .../devicetree/bindings/hwmon/fan-common.yaml | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/fan-common.yaml diff --git a/Documentation/devicetree/bindings/hwmon/fan-common.yaml b/Documentation/devicetree/bindings/hwmon/fan-common.yaml new file mode 100644 index 000000000000..0fb738081699 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/fan-common.yaml @@ -0,0 +1,79 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/fan-common.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Common Fan Properties + +maintainers: + - Naresh Solanki + - Billy Tsai + +properties: + max-rpm: + description: + Max RPM supported by fan. + $ref: /schemas/types.yaml#/definitions/uint32 + maximum: 100000 + + min-rpm: + description: + Min RPM supported by fan. + $ref: /schemas/types.yaml#/definitions/uint32 + maximum: 1000 + + pulses-per-revolution: + description: + The number of pulse from fan sensor per revolution. + $ref: /schemas/types.yaml#/definitions/uint32 + maximum: 4 + + tach-div: + description: + Divisor for the tach sampling clock, which determines the sensitivity of the tach pin. + $ref: /schemas/types.yaml#/definitions/uint32 + + target-rpm: + description: + The default desired fan speed in RPM. + $ref: /schemas/types.yaml#/definitions/uint32 + + fan-driving-mode: + description: + Select the driving mode of the fan.(DC, PWM and so on) + $ref: /schemas/types.yaml#/definitions/string + enum: [ dc, pwm ] + + pwms: + description: + PWM provider. + maxItems: 1 + + "#cooling-cells": + const: 2 + + cooling-levels: + description: + The control value which correspond to thermal cooling states. + $ref: /schemas/types.yaml#/definitions/uint32-array + + tach-ch: + description: + The tach channel used for the fan. + $ref: /schemas/types.yaml#/definitions/uint8-array + + label: + description: + Optional fan label + + fan-supply: + description: + Power supply for fan. + + reg: + maxItems: 1 + +additionalProperties: true + +... -- 2.25.1