Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1040943lqb; Sat, 25 May 2024 03:29:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWzCNLse/MadLw473KkLC6Y+rnEqlrt/pLRqjBwP3k8UGSJdC6dgjiq55YPLOH3cIJL8mqR9I4B+UpLL81Hp8jzM8zz94gn9QKB+8NZ0w== X-Google-Smtp-Source: AGHT+IFdXf4b1LH0LyzCxSYhOkMvcmeOWkD1O7iOsmUaTUAe2it69oZb18MsNU526FQy8TlAohYy X-Received: by 2002:a05:620a:468b:b0:793:f24:c37e with SMTP id af79cd13be357-794ab097b32mr548424485a.46.1716632978072; Sat, 25 May 2024 03:29:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716632978; cv=pass; d=google.com; s=arc-20160816; b=OuMQKH+aeguZxE4CNxpsdB5+P3pJE9cbn6vXXDb5e9IWhl5aitWViSPoZNvxJPkpAc RGC51J67wGJgI0OCcT8v6Xd818Vd3+7LjxSWkWWHv6EIteJRHEweBpU7nwXZafluP7OL FYYIMUKmPlUupi5994cEBrp+vTxY0mNbEGFozcATIUH1IAYOlrzYxteDLteHGVJTYD8f 8Dgt9WjDBi1JihUhwB+LfYk+qRQSi7drn0UmJF4F4lgVpfGTW8hrtD1Mz5ot60EddQpe 2BLjEanpYHKwgmHpvNKqGjI4VGlPaNN5RoxUWvSfbbRZ32t8KnQGhHyudzPydJyILFTt NSFA== 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:message-id:date:subject:to:from :dkim-signature; bh=miLZb61bb6eHKVsGFJqgSUKqREuKVQ85VCQ63BLN4t4=; fh=jofCX+5j8RfkrroYFyg5D4N7Pjb5gVI7dxd+DMLIhVk=; b=An7x27DwCXtIvDY3w3/nlObP0IXCeRiT0tP+wPEnUBHH7H2FQVtSU8lCdsIdKqini8 qwIbxs8m5gK+m+BuurkKt1w1TCQlnDIo5j8NZGwdFHDJsUjLsIQ2+VmhvlkKXgCey7iJ hCjermsbFETBSrclDQjZmkc3/Lo2qjuJaT5fF1t1uvPBeHw1A5uSeAzyU3KPPqGxCJe3 VLK11TSudzE0qTluK8ggBu42sumpVgoCKGJCnM1yjPa/BhjW0o3/6dHu1Opv3DQz98Gm H/izHscPgs23oW8A5ADd5MzEuu1pFOwyGg+qpcHeTX1wy871veyavHGpCsge9mgY+iNS Vfhg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=H+KPAZI7; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-189330-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189330-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-794abd4ba10si341089985a.555.2024.05.25.03.29.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 May 2024 03:29:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189330-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=@gmail.com header.s=20230601 header.b=H+KPAZI7; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-189330-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189330-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 AD5A41C20AA5 for ; Sat, 25 May 2024 10:29:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E5266364D2; Sat, 25 May 2024 10:29:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="H+KPAZI7" Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3DDD12BB0A; Sat, 25 May 2024 10:29:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716632966; cv=none; b=KRVEiutZlfX/159gnSJ4EINytpD8t9L6Zq9jL+scLX8UQb8qAR6AxA4gWMZ8MM1jbvooClRxOcN+mrtFQCtGhiHIGTyHTtpH2yZLSfuUUMKiF4D7a4DaGDTbgxZB27GcI+8XWyS79iEFtFizI5zdCZOKNW90UhXySes/mcHXbZU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716632966; c=relaxed/simple; bh=kBxqKZt3yNiBobYLsd+AE4sKuvGrJdLiY2b+Bt+0qno=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=KgM4R0KzgZBrDOJavWNdDDKFtr0At8wnMz4FfbVHrP0xb3tWD2k7v0zbYCZzL/yyNZLpwfy2GPBRHK+p5uohZr9fdFNL8/kAvYuU9cgO7j4mhrsOpJrxk/FKzJMQbK0xOo+qGRAomlp509S/uj8jpTu7s06F5EyDri2aNM1YhSQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=H+KPAZI7; arc=none smtp.client-ip=209.85.221.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-351d309bbecso6866885f8f.2; Sat, 25 May 2024 03:29:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716632963; x=1717237763; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=miLZb61bb6eHKVsGFJqgSUKqREuKVQ85VCQ63BLN4t4=; b=H+KPAZI7ip822Jr+4PsnRAdtTVHfwbNM5ahPkSm73HvghqcVhAaUN5hbTfiQ/kLdq+ gKS28yi2yqFFB8FMiGR4a/vnW6DgtLOolKCBPjubU8TXAPMo9d76qchZytw7cyVJmAAA cD1mhGQ2UplxT5HIUp5OQlfnv1QsQLKd5lTWRcL7WSO3FHYv3xuWPmaQuwbSu2Z93Rk+ g7yx9s4brEUdwkmX+GhfI3e6O/YTviytQJLhwCsLIs5bD1qLs/zuoOwgCN2iZKXG9P8A kF+TbAmAiVS8JfZOGx3I8dgnsZQwi4vjVTtmaGWABxRfDc/8/WFxD86lWNXdQJK6KP05 ZMCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716632963; x=1717237763; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=miLZb61bb6eHKVsGFJqgSUKqREuKVQ85VCQ63BLN4t4=; b=DYq/bQdhvCg6EoH+EIiX9/lz/NZiInVae3rUz+cyGAHug+YvTYeF0Xz143BXYvvFbk brIY7cKbqV/rCkZZBLMyHz4mXO4fXnTfNFCUUQxPnSH+pdm1Tg76O7HYWJWLdRdsA8wU MWxOwECFHo8+u1b5W4ZMoAvJ1U6XMpw5/SpN+v08v2Rd0bD1N9/hApFePRKVUAcuqRM6 Ay/gzy3S8rb+6mFwZwhjiNZUeakjTFKPsXMacdk3lrAMSNsuWczkeMaiYdDacNqmaTYF KuSzGP7IyL2eaR9laUA+sSMa3Fy0evFOqjePoXPayWtidRVEO23KZM3xxrSMMRZYwlFv yThw== X-Forwarded-Encrypted: i=1; AJvYcCXdx9VHfxGhzifBjU2YAwoi5FHpyIFhhLxQHywZDler3hkSS/z8U+6nNMxr2AP5zijvwGp4meX0IcCmEp574Swtev9ttToRxF8k9nbzlTVTs2ILLelIv7UPwvMHc88XZvOaBSdR9GDCkRkejx206V+xFP7ERpDXN/jS7m/aCiN9FVrFWUgL X-Gm-Message-State: AOJu0YzKf/RtVEUJW4NalKNM7eVNiBIygwTyC7pIDt8KIY6nG9ruQZNz pHwBwR0WZLYPf+iIe2A6iv683NwvK00Un3j/0inKqvcXro5IgXSr X-Received: by 2002:adf:cd8a:0:b0:354:f9b4:e9b1 with SMTP id ffacd0b85a97d-3552f4fe99amr3850617f8f.27.1716632963208; Sat, 25 May 2024 03:29:23 -0700 (PDT) Received: from localhost.localdomain (93-34-90-105.ip49.fastwebnet.it. [93.34.90.105]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-3557a1c918csm3674651f8f.77.2024.05.25.03.29.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 May 2024 03:29:22 -0700 (PDT) From: Christian Marangi To: Jean Delvare , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Christian Marangi , linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] dt-bindings: hwmon: g762: Convert to yaml schema Date: Sat, 25 May 2024 12:29:10 +0200 Message-ID: <20240525102914.22634-1-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Convert g762 Documentation to yaml schema. Since it supports various device, change the name to g76x and add the vendor prefix. Signed-off-by: Christian Marangi --- .../devicetree/bindings/hwmon/g762.txt | 47 ----------- .../devicetree/bindings/hwmon/gmt,g76x.yaml | 83 +++++++++++++++++++ 2 files changed, 83 insertions(+), 47 deletions(-) delete mode 100644 Documentation/devicetree/bindings/hwmon/g762.txt create mode 100644 Documentation/devicetree/bindings/hwmon/gmt,g76x.yaml diff --git a/Documentation/devicetree/bindings/hwmon/g762.txt b/Documentation/devicetree/bindings/hwmon/g762.txt deleted file mode 100644 index 6d154c4923de..000000000000 --- a/Documentation/devicetree/bindings/hwmon/g762.txt +++ /dev/null @@ -1,47 +0,0 @@ -GMT G762/G763 PWM Fan controller - -Required node properties: - - - "compatible": must be either "gmt,g762" or "gmt,g763" - - "reg": I2C bus address of the device - - "clocks": a fixed clock providing input clock frequency - on CLK pin of the chip. - -Optional properties: - - - "fan_startv": fan startup voltage. Accepted values are 0, 1, 2 and 3. - The higher the more. - - - "pwm_polarity": pwm polarity. Accepted values are 0 (positive duty) - and 1 (negative duty). - - - "fan_gear_mode": fan gear mode. Supported values are 0, 1 and 2. - -If an optional property is not set in .dts file, then current value is kept -unmodified (e.g. u-boot installed value). - -Additional information on operational parameters for the device is available -in Documentation/hwmon/g762.rst. A detailed datasheet for the device is available -at http://natisbad.org/NAS/refs/GMT_EDS-762_763-080710-0.2.pdf. - -Example g762 node: - - clocks { - #address-cells = <1>; - #size-cells = <0>; - - g762_clk: fixedclk { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <8192>; - } - } - - g762: g762@3e { - compatible = "gmt,g762"; - reg = <0x3e>; - clocks = <&g762_clk> - fan_gear_mode = <0>; /* chip default */ - fan_startv = <1>; /* chip default */ - pwm_polarity = <0>; /* chip default */ - }; diff --git a/Documentation/devicetree/bindings/hwmon/gmt,g76x.yaml b/Documentation/devicetree/bindings/hwmon/gmt,g76x.yaml new file mode 100644 index 000000000000..bfefe49f54bf --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/gmt,g76x.yaml @@ -0,0 +1,83 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/gmt,g76x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: GMT G762/G763 PWM Fan controller + +maintainers: + - Christian Marangi + +description: | + GMT G762/G763 PWM Fan controller. + + If an optional property is not set in DT, then current value is kept + unmodified (e.g. bootloader installed value). + + Additional information on operational parameters for the device is available + in Documentation/hwmon/g762.rst. A detailed datasheet for the device is available + at http://natisbad.org/NAS/refs/GMT_EDS-762_763-080710-0.2.pdf. + +properties: + compatible: + enum: + - gmt,g762 + - gmt,g763 + + reg: + maxItems: 1 + + clocks: + description: a fixed clock providing input clock frequency on CLK + pin of the chip. + maxItems: 1 + + fan_startv: + description: Fan startup voltage step + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1, 2, 3] + + pwm_polarity: + description: PWM polarity (psotivie or negative duty) + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1] + + fan_gear_mode: + description: FAN gear mode. Configure High speed fan setting factor + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1, 2] + +required: + - compatible + - reg + - clocks + +additionalProperties: false + +examples: + - | + clocks { + #address-cells = <1>; + #size-cells = <0>; + + g762_clk: fixedclk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <8192>; + }; + }; + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + g762@3e { + compatible = "gmt,g762"; + reg = <0x3e>; + clocks = <&g762_clk>; + fan_gear_mode = <0>; + fan_startv = <1>; + pwm_polarity = <0>; + }; + }; -- 2.43.0