From patchwork Thu Dec 31 12:39:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Campion Kang X-Patchwork-Id: 1421560 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=advantech.com.tw Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4D67Mg33Rbz9sRN for ; Thu, 31 Dec 2020 23:51:59 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726540AbgLaMv6 (ORCPT ); Thu, 31 Dec 2020 07:51:58 -0500 Received: from aclms3.advantech.com.tw ([125.252.70.86]:53893 "EHLO aclms3.advantech.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726354AbgLaMv6 (ORCPT ); Thu, 31 Dec 2020 07:51:58 -0500 X-Greylist: delayed 672 seconds by postgrey-1.27 at vger.kernel.org; Thu, 31 Dec 2020 07:51:57 EST Received: from taipei09.ADVANTECH.CORP (unverified [172.20.0.236]) by ACLMS4.ADVANTECH.CORP (Clearswift SMTPRS 5.6.0) with ESMTP id ; Thu, 31 Dec 2020 20:39:55 +0800 Received: from localhost (172.16.12.146) by taipei09.ADVANTECH.CORP (172.20.0.236) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 31 Dec 2020 20:40:05 +0800 From: Campion Kang To: , Lee Jones , Rob Herring , , Jean Delvare , Guenter Roeck , , Wim Van Sebroeck , , AceLan Kao , Campion Kang Subject: [PATCH v5 2/6] mfd: ahc1ec0: Add Advantech EC include file used by dt-bindings Date: Thu, 31 Dec 2020 20:39:44 +0800 Message-ID: <20201231123948.10473-2-campion.kang@advantech.com.tw> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201231123948.10473-1-campion.kang@advantech.com.tw> References: <20201231123948.10473-1-campion.kang@advantech.com.tw> MIME-Version: 1.0 X-Originating-IP: [172.16.12.146] X-ClientProxiedBy: aclcas3.ADVANTECH.CORP (172.20.1.12) To taipei09.ADVANTECH.CORP (172.20.0.236) X-TM-SNTS-SMTP: B7B5DBBB43FA564B5F1D5ED6E35EA3EC905DDB5A33808C502E567074A96B11ED2000:8 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This files defines the sud-device types and hwmon profiles support by Advantech embedded controller. Signed-off-by: Campion Kang --- include/dt-bindings/mfd/ahc1ec0-dt.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 include/dt-bindings/mfd/ahc1ec0-dt.h diff --git a/include/dt-bindings/mfd/ahc1ec0-dt.h b/include/dt-bindings/mfd/ahc1ec0-dt.h new file mode 100644 index 000000000000..389a7a7f8f02 --- /dev/null +++ b/include/dt-bindings/mfd/ahc1ec0-dt.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Device Tree defines for Advantech Embedded Controller (AHC1EC0) + */ + +#ifndef _DT_BINDINGS_MFD_AHC1EC0_H +#define _DT_BINDINGS_MFD_AHC1EC0_H + +/* Sub-device Definitions */ +#define AHC1EC0_SUBDEV_BRIGHTNESS 0x0 +#define AHC1EC0_SUBDEV_EEPROM 0x1 +#define AHC1EC0_SUBDEV_GPIO 0x2 +#define AHC1EC0_SUBDEV_HWMON 0x3 +#define AHC1EC0_SUBDEV_LED 0x4 +#define AHC1EC0_SUBDEV_WDT 0x5 + +/* HWMON Profile Definitions */ +#define AHC1EC0_HWMON_PRO_TEMPLATE 0x0 +#define AHC1EC0_HWMON_PRO_TPC5XXX 0x1 +#define AHC1EC0_HWMON_PRO_PRVR4 0x2 +#define AHC1EC0_HWMON_PRO_UNO2271G 0x3 +#define AHC1EC0_HWMON_PRO_UNO1172A 0x4 +#define AHC1EC0_HWMON_PRO_UNO1372G 0x5 + +#endif /* _DT_BINDINGS_MFD_AHC1EC0_H */ From patchwork Thu Dec 31 12:39:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Campion Kang X-Patchwork-Id: 1421561 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=advantech.com.tw Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4D67NK53Glz9sRN for ; Thu, 31 Dec 2020 23:52:33 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726749AbgLaMw2 (ORCPT ); Thu, 31 Dec 2020 07:52:28 -0500 Received: from aclms1.advantech.com.tw ([61.58.41.199]:52393 "EHLO aclms1.advantech.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726348AbgLaMw2 (ORCPT ); Thu, 31 Dec 2020 07:52:28 -0500 X-Greylist: delayed 686 seconds by postgrey-1.27 at vger.kernel.org; Thu, 31 Dec 2020 07:52:09 EST Received: from taipei09.ADVANTECH.CORP (unverified [172.20.0.236]) by ACLMS2.ADVANTECH.CORP (Clearswift SMTPRS 5.6.0) with ESMTP id ; Thu, 31 Dec 2020 20:39:57 +0800 Received: from localhost (172.16.12.146) by taipei09.ADVANTECH.CORP (172.20.0.236) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 31 Dec 2020 20:40:07 +0800 From: Campion Kang To: , Lee Jones , Rob Herring , , Jean Delvare , Guenter Roeck , , Wim Van Sebroeck , , AceLan Kao , Campion Kang Subject: [PATCH v5 3/6] dt-bindings: mfd: ahc1ec0.yaml: Add Advantech embedded controller - AHC1EC0 Date: Thu, 31 Dec 2020 20:39:45 +0800 Message-ID: <20201231123948.10473-3-campion.kang@advantech.com.tw> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201231123948.10473-1-campion.kang@advantech.com.tw> References: <20201231123948.10473-1-campion.kang@advantech.com.tw> MIME-Version: 1.0 X-Originating-IP: [172.16.12.146] X-ClientProxiedBy: aclcas3.ADVANTECH.CORP (172.20.1.12) To taipei09.ADVANTECH.CORP (172.20.0.236) X-TM-SNTS-SMTP: FE1F84DD2CDD6A7C207A62C48E14381FFEF41B577E08027541A82567DAE4FA542000:8 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add DT binding schema for Advantech embedded controller AHC1EC0. Signed-off-by: Campion Kang --- .../devicetree/bindings/mfd/ahc1ec0.yaml | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/ahc1ec0.yaml diff --git a/Documentation/devicetree/bindings/mfd/ahc1ec0.yaml b/Documentation/devicetree/bindings/mfd/ahc1ec0.yaml new file mode 100644 index 000000000000..da57d782ea77 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/ahc1ec0.yaml @@ -0,0 +1,69 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/ahc1ec0.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Advantech Embedded Controller (AHC1EC0) + +maintainers: + - Campion Kang + +description: | + AHC1EC0 is one of the embedded controllers used by Advantech to provide several + functions such as watchdog, hwmon, brightness, etc. Advantech related applications + can control the whole system via these functions. + +properties: + compatible: + const: advantech,ahc1ec0 + + advantech,sub-dev-nb: + description: + The number of sub-devices specified in the platform. + $ref: /schemas/types.yaml#/definitions/uint32 + maxItems: 1 + + advantech,sub-dev: + description: + A list of the sub-devices supported in the platform. Defines for the + appropriate values can found in dt-bindings/mfd/ahc1ec0.h. + $ref: "/schemas/types.yaml#/definitions/uint32-array" + minItems: 1 + maxItems: 6 + + advantech,hwmon-profile: + description: + The number of sub-devices specified in the platform. Defines for the + hwmon profiles can found in dt-bindings/mfd/ahc1ec0. + $ref: /schemas/types.yaml#/definitions/uint32 + maxItems: 1 + +required: + - compatible + - advantech,sub-dev-nb + - advantech,sub-dev + +if: + properties: + advantech,sub-dev: + contains: + const: 0x3 +then: + required: + - advantech,hwmon-profile + +additionalProperties: false + +examples: + - | + #include + ahc1ec0 { + compatible = "advantech,ahc1ec0"; + + advantech,sub-dev-nb = <2>; + advantech,sub-dev = ; + + advantech,hwmon-profile = ; + };