From patchwork Sat Sep 5 13:03:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luka Kovacic X-Patchwork-Id: 11759079 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 6475913B6 for ; Sat, 5 Sep 2020 13:05:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4548C2072D for ; Sat, 5 Sep 2020 13:05:51 +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="uG8Z/mCu" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728565AbgIENFs (ORCPT ); Sat, 5 Sep 2020 09:05:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728481AbgIENFm (ORCPT ); Sat, 5 Sep 2020 09:05:42 -0400 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE9E9C061245 for ; Sat, 5 Sep 2020 06:05:41 -0700 (PDT) Received: by mail-ed1-x543.google.com with SMTP id i1so8411325edv.2 for ; Sat, 05 Sep 2020 06:05:41 -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=uKWBtpHLx5ebCGy42kAG2ZWIT9t2rOu4eUwV1Q0jhr4=; b=uG8Z/mCuOhUUAM9FEcXJVwlgZZwNTNd91zXiYRENeBaBjO8x7DM4CQAZGjLvm2g2na Ua5coi+eQMmWNToNpnPoMRTGYxTuZUbh5+bSEIB+8Iq0GSrttE4H8DJwXHGlutATNK+Y XE2OkByscyc7YmRPEsVTijMicX46aHYZYSNB6lOEuQeyhrtoQRcPPj4/I2tGOTaKgpxQ 0wcUFRlDFz/DxWDnfpxL1mlqjxlD7TmTPlNgv/BwLvHMJa88cxJRIBzWJXsx4gv+9orF QmtG0cApows9ZEk8KI3LFRi4m7alrOrwjLlt57BkTJkKplKtrEIZ/WsyxBrXhS1TWAuM 1jLw== 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=uKWBtpHLx5ebCGy42kAG2ZWIT9t2rOu4eUwV1Q0jhr4=; b=MSxinwhJCnxVcpSYwHWxD6gSTT7Z7E1GbzYv4HtGCCG4yVGJ5yKa1BvySAoQwfzzor f6Nkq84Y87g7auRKKVPKPlISXjIIAjCPfrxcWkE3YEBSa0w7KspNZoW971NFmgfXzBKI 3zuEQQr0EhSPoCE3fa0rXp/WPKyRIb+tIbi6hXuSs9vMJrjBiclsohiGO1FwiRjhysJ3 9kwBWDLVJoRZK4YvLNvvvYq03RlLJ4cnR2PtAEG51/rZtL9Q/Czv74ZhRLOLH3Msd0ma xjibyh6QZPEg2riKNmn7uXD0BdrWILM7HcNaRPa3XoZfwfbRTQXe+GOLZCs60+s179Oc OK6A== X-Gm-Message-State: AOAM532r9y3SbO0xb4HrI5aViN0ptqL+QTiPs3BbVe3n4WhvNs5d3Q+0 IizbAjHGNpaMR3d7tgfz4GSKTg== X-Google-Smtp-Source: ABdhPJz2LuX2CVpUMAtOxTddak94tg6xVlFlEn8SH5yB1sZXMOOl8cXvXD05KnIj4+iOM3by/5TqyQ== X-Received: by 2002:a50:a44a:: with SMTP id v10mr11984908edb.133.1599311140227; Sat, 05 Sep 2020 06:05:40 -0700 (PDT) Received: from localhost.localdomain ([2a00:ee2:4b0d:3002:290:faff:fe54:449c]) by smtp.gmail.com with ESMTPSA id s18sm9372655ejd.54.2020.09.05.06.05.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Sep 2020 06:05:39 -0700 (PDT) From: Luka Kovacic To: linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-leds@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, andrew@lunn.ch, jason@lakedaemon.net, gregory.clement@bootlin.com, luka.perkov@sartura.hr, Luka Kovacic Subject: [PATCH 1/7] dt-bindings: Add iEi vendor prefix and iEi WT61P803 PUZZLE driver bindings Date: Sat, 5 Sep 2020 15:03:30 +0200 Message-Id: <20200905130336.967622-2-luka.kovacic@sartura.hr> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200905130336.967622-1-luka.kovacic@sartura.hr> References: <20200905130336.967622-1-luka.kovacic@sartura.hr> MIME-Version: 1.0 Sender: linux-hwmon-owner@vger.kernel.org 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 --- .../hwmon/iei,wt61p803-puzzle-hwmon.yaml | 41 ++++++++++ .../leds/iei,wt61p803-puzzle-leds.yaml | 48 +++++++++++ .../bindings/mfd/iei,wt61p803-puzzle.yaml | 82 +++++++++++++++++++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + 4 files changed, 173 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..37f0030df237 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/iei,wt61p803-puzzle-hwmon.yaml @@ -0,0 +1,41 @@ +# 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 + +patternProperties: + "^fan-group@[0-1]$": + type: object + properties: + reg: + minimum: 0 + maximum: 1 + description: + Fan group ID + cooling-levels: + maxItems: 255 + description: + Cooling levels for the fans (PWM value mapping) + description: | + Properties for each fan group. + required: + - reg + +required: + - compatible 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..502d97630ecc --- /dev/null +++ b/Documentation/devicetree/bindings/leds/iei,wt61p803-puzzle-leds.yaml @@ -0,0 +1,48 @@ +# 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 + +patternProperties: + "^led@0$": + type: object + 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 + + label: true + + linux,default-trigger: true + +required: + - compatible + - "#address-cells" + - "#size-cells" 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..a1a155f19557 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml @@ -0,0 +1,82 @@ +# 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-probe-beep: true + + iei-wt61p803-hwmon: + $ref: ../hwmon/iei,wt61p803-puzzle-hwmon.yaml + + leds: + $ref: ../leds/iei,wt61p803-puzzle-leds.yaml + +required: + - compatible + - current-speed + +examples: + - | + #include + serial { + status = "okay"; + mcu { + compatible = "iei,wt61p803-puzzle"; + current-speed = <115200>; + enable-probe-beep; + + leds { + compatible = "iei,wt61p803-puzzle-leds"; + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + color = ; + label = "front-power-led"; + }; + }; + + iei-wt61p803-puzzle-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,.*":