From patchwork Sun Oct 25 00:59:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luka Kovacic X-Patchwork-Id: 11855077 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D641D157C for ; Sun, 25 Oct 2020 00:59:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BB25322281 for ; Sun, 25 Oct 2020 00:59:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=sartura-hr.20150623.gappssmtp.com header.i=@sartura-hr.20150623.gappssmtp.com header.b="xn4SrHuf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765983AbgJYA7h (ORCPT ); Sat, 24 Oct 2020 20:59:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1765985AbgJYA7g (ORCPT ); Sat, 24 Oct 2020 20:59:36 -0400 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63D33C0613D5 for ; Sat, 24 Oct 2020 17:59:36 -0700 (PDT) Received: by mail-ej1-x641.google.com with SMTP id p5so8198514ejj.2 for ; Sat, 24 Oct 2020 17:59:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sartura-hr.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aH5lWPXQedbYF5LSN3GmPneR24giitxJlZaOPlHn8X4=; b=xn4SrHufyIdk3ZW8fhVbEwY/Cfexu7XrDPDOsJs0k8hA+mzZMMAh1p9OlrTcqIKpuc HyikUU4gKtRsD3NFH5Cs1/C5Q2f5839USzyoESq3Eu+srs/r37rAOFy/u2rQIO2/bUMY aGikyb+iYKIiuzQv5PpB+rfPaqIqVDYcHdEaS3KxV0cBcoVD5VkFEgQOD/hmUmRHxd1F mP1pZdrPMrdPEQtOhT0H8gXLYn0PR/6TL7mLml+KPsH4N5eABgfuTjivGo+B2Ff2IrIc 2bMk7lwjntIgu+maPYKOVcbEeNm8GqPKcjM2LrDlAQgLxD8i4ZOPBh+mzwlaCeuN4gd+ h9qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aH5lWPXQedbYF5LSN3GmPneR24giitxJlZaOPlHn8X4=; b=qyPOu6NnzUPIH9qznehjr2SjzkKkQpBif828TQCBlQozrDYcSoModh3u8p6T6x4beA JRY8p1FI09CT4VrejtTPdSFFUjIdjW8+Saq7Q+lkfIbBed0qgvVI3kgCxbBHTkctyR8z Zo3y3XBhIkziCaC9Vu5hAdbqdo68qiQc3SfLbx1r/DN77oEYSEGCvJpyGTr4evV/e6g7 Hk2ZNvOxIjv8gbGVVFLJqjLROVsfDa4ci+59cVUHn1hQS+wE0rfIaZ2EuflK/RwGhEgs 9l/Lnml50E+c5xOmjCOHR4E5KxUzMIa7FRgKUptEFN/DZWpzJNRoZ4UcyKcEsof1IVHn 8Z3A== X-Gm-Message-State: AOAM531n2m49xY8+AKxWo0+WSEgxzHwd7p/VDwJFNFq2hrUre7smd8nV 7LYgd4BIe3FBhYrKT7l8iOk+uA== X-Google-Smtp-Source: ABdhPJylLKFGX7abLq0mKkvDiVjAO12knb97BYuUnm7XN8ZSdPRY3x1e9gk2+GW1ieunzok3TbhOEw== X-Received: by 2002:a17:906:3bd7:: with SMTP id v23mr9414507ejf.100.1603587572043; Sat, 24 Oct 2020 17:59:32 -0700 (PDT) Received: from localhost.localdomain ([2a00:ee2:4b0d:3001:fbc5:498b:ed6d:cfac]) by smtp.gmail.com with ESMTPSA id q5sm2797274edt.79.2020.10.24.17.59.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Oct 2020 17:59:31 -0700 (PDT) From: Luka Kovacic To: linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-leds@vger.kernel.org, devicetree@vger.kernel.org Cc: lee.jones@linaro.org, pavel@ucw.cz, dmurphy@ti.com, robh+dt@kernel.org, jdelvare@suse.com, linux@roeck-us.net, marek.behun@nic.cz, luka.perkov@sartura.hr, andy.shevchenko@gmail.com, robert.marko@sartura.hr, Luka Kovacic Subject: [PATCH v7 1/6] dt-bindings: Add IEI vendor prefix and IEI WT61P803 PUZZLE driver bindings Date: Sun, 25 Oct 2020 02:59:11 +0200 Message-Id: <20201025005916.64747-2-luka.kovacic@sartura.hr> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201025005916.64747-1-luka.kovacic@sartura.hr> References: <20201025005916.64747-1-luka.kovacic@sartura.hr> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Add the IEI WT61P803 PUZZLE Device Tree bindings for MFD, HWMON and LED drivers. A new vendor prefix is also added accordingly for IEI Integration Corp. Signed-off-by: Luka Kovacic Cc: Luka Perkov Cc: Robert Marko --- .../hwmon/iei,wt61p803-puzzle-hwmon.yaml | 53 ++++++++++++ .../leds/iei,wt61p803-puzzle-leds.yaml | 45 ++++++++++ .../bindings/mfd/iei,wt61p803-puzzle.yaml | 83 +++++++++++++++++++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + 4 files changed, 183 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/iei,wt61p803-puzzle-hwmon.yaml create mode 100644 Documentation/devicetree/bindings/leds/iei,wt61p803-puzzle-leds.yaml create mode 100644 Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml diff --git a/Documentation/devicetree/bindings/hwmon/iei,wt61p803-puzzle-hwmon.yaml b/Documentation/devicetree/bindings/hwmon/iei,wt61p803-puzzle-hwmon.yaml new file mode 100644 index 000000000000..c24a24e90495 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/iei,wt61p803-puzzle-hwmon.yaml @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/iei,wt61p803-puzzle-hwmon.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: IEI WT61P803 PUZZLE MCU HWMON module from IEI Integration Corp. + +maintainers: + - Luka Kovacic + +description: | + This module is a part of the IEI WT61P803 PUZZLE MFD device. For more details + see Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml. + + The HWMON module is a sub-node of the MCU node in the Device Tree. + +properties: + compatible: + const: iei,wt61p803-puzzle-hwmon + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^fan-group@[0-1]$": + type: object + properties: + reg: + minimum: 0 + maximum: 1 + description: + Fan group ID + + cooling-levels: + minItems: 1 + maxItems: 255 + description: + Cooling levels for the fans (PWM value mapping) + description: | + Properties for each fan group. + required: + - reg + +required: + - compatible + - "#address-cells" + - "#size-cells" + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/leds/iei,wt61p803-puzzle-leds.yaml b/Documentation/devicetree/bindings/leds/iei,wt61p803-puzzle-leds.yaml new file mode 100644 index 000000000000..bbf264c13189 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/iei,wt61p803-puzzle-leds.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/iei,wt61p803-puzzle-leds.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: IEI WT61P803 PUZZLE MCU LED module from IEI Integration Corp. + +maintainers: + - Luka Kovacic + +description: | + This module is a part of the IEI WT61P803 PUZZLE MFD device. For more details + see Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml. + + The LED module is a sub-node of the MCU node in the Device Tree. + +properties: + compatible: + const: iei,wt61p803-puzzle-leds + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + "led@0": + type: object + $ref: common.yaml + description: | + Properties for a single LED. + properties: + reg: + description: + Index of the LED. Only one LED is supported at the moment. + minimum: 0 + maximum: 0 + +required: + - compatible + - "#address-cells" + - "#size-cells" + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml b/Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml new file mode 100644 index 000000000000..64264c664c48 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml @@ -0,0 +1,83 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/iei,wt61p803-puzzle.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: IEI WT61P803 PUZZLE MCU from IEI Integration Corp. + +maintainers: + - Luka Kovacic + +description: | + IEI WT61P803 PUZZLE MCU is embedded in some IEI Puzzle series boards. + It's used for controlling system power states, fans, LEDs and temperature + sensors. + + For Device Tree bindings of other sub-modules (HWMON, LEDs) refer to the + binding documents under the respective subsystem directories. + +properties: + compatible: + const: iei,wt61p803-puzzle + + current-speed: + description: + Serial bus speed in bps + maxItems: 1 + + enable-beep: true + + hwmon: + $ref: ../hwmon/iei,wt61p803-puzzle-hwmon.yaml + + leds: + $ref: ../leds/iei,wt61p803-puzzle-leds.yaml + +required: + - compatible + - current-speed + +additionalProperties: false + +examples: + - | + #include + serial { + status = "okay"; + mcu { + compatible = "iei,wt61p803-puzzle"; + current-speed = <115200>; + enable-beep; + + leds { + compatible = "iei,wt61p803-puzzle-leds"; + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + function = LED_FUNCTION_POWER; + color = ; + }; + }; + + hwmon { + compatible = "iei,wt61p803-puzzle-hwmon"; + #address-cells = <1>; + #size-cells = <0>; + + fan-group@0 { + #cooling-cells = <2>; + reg = <0x00>; + cooling-levels = <64 102 170 230 250>; + }; + + fan-group@1 { + #cooling-cells = <2>; + reg = <0x01>; + cooling-levels = <64 102 170 230 250>; + }; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 63996ab03521..5f2595f0b2ad 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -467,6 +467,8 @@ patternProperties: description: IC Plus Corp. "^idt,.*": description: Integrated Device Technologies, Inc. + "^iei,.*": + description: IEI Integration Corp. "^ifi,.*": description: Ingenieurburo Fur Ic-Technologie (I/F/I) "^ilitek,.*":