Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp206393ybl; Thu, 9 Jan 2020 20:11:10 -0800 (PST) X-Google-Smtp-Source: APXvYqxl9iuStJ+GzpZg1ZWtEbGEr1SkrHq09Ax2s158zQlS5S71zIaSMdPug8pL1rR8Z8pV6j1+ X-Received: by 2002:aca:aac3:: with SMTP id t186mr719419oie.71.1578629470533; Thu, 09 Jan 2020 20:11:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578629470; cv=none; d=google.com; s=arc-20160816; b=KgodCdHpi2eyvv6S2brlJbuFi+c63skY2QIOAIjdAFS33nrq8RdKkwctZFor9L2lwz 84ylDqT6uGOYw9KoCgAwEWlVU01Olw1Qm7z2lwtAFXANGSPVGH4qWP2Rfpy2XkbkdY4O eng4xi42SnGVqWA5T+REyxCoxqFYQbgZFhoL8AuueMQy+TnptCskErYpXLXSqPloQFXr OxiFMvmQo6aq613zja9gRIiKw2V8wALLhM4IRLAcp1q6Fqqj9F7C4XtsHQWFRXCRodGq 5F3xfgWnhI2WPrCSUwNfvGFitzwHunOmOgBM4EtVCpZdO76olgaZulTxK2ID0SXPF6+j 9EdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=MIRtH0Ic/N6k8CUbmUiOGxw7ELTF7ffNAJx1aSGUSCg=; b=H+Q8e2n6jh0xsrM6jOY8oDQ34NT+z8o7iS2oWs0uqv3g3BR+OsS7HeR5SiBCPTWcxg 0zTikjFgZj0KmcItJxWnt9p96BwLLNsXOmyB5LVpNP4xSe0W41I2k2uB9T0nMAVb5Asw IoTr2kEFRcGHT71OnCiDaZp0EyFo2WCd1ZHbl0vFFDOR1ov2Rpadbiiq5JikUFZ2Oi+u A01ogffmykuZsz3nHz7Uq7wsytQsp/S7qFJBOMqvbkuFX83f05EhhCSXAx0OtzZVwbiJ M8a3JeY8ez/310M+cvC+WP0HhOfsroG0m4Vej0aypmt2MbIq2yJ4q78LV0zsptg0X+bC JX+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l5si365241oil.96.2020.01.09.20.10.46; Thu, 09 Jan 2020 20:11:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731290AbgAJEJ2 (ORCPT + 99 others); Thu, 9 Jan 2020 23:09:28 -0500 Received: from inva020.nxp.com ([92.121.34.13]:44772 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731242AbgAJEJ1 (ORCPT ); Thu, 9 Jan 2020 23:09:27 -0500 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 967041A14F5; Fri, 10 Jan 2020 05:09:24 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 91FC91A0BB8; Fri, 10 Jan 2020 05:09:17 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 25DBE402D2; Fri, 10 Jan 2020 12:09:09 +0800 (SGT) From: Anson Huang To: aisheng.dong@nxp.com, festevam@gmail.com, shawnguo@kernel.org, stefan@agner.ch, kernel@pengutronix.de, linus.walleij@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, s.hauer@pengutronix.de, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH V2 3/3] dt-bindings: pinctrl: Convert i.MX8MN to json-schema Date: Fri, 10 Jan 2020 12:05:20 +0800 Message-Id: <1578629120-25793-3-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1578629120-25793-1-git-send-email-Anson.Huang@nxp.com> References: <1578629120-25793-1-git-send-email-Anson.Huang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the i.MX8MN pinctrl binding to DT schema format using json-schema Signed-off-by: Anson Huang --- Changes since V1: - use "grp$" instead of "-grp$"; - use space instead of tab for "ref$"; - add missed "reg" property; - remove the "maxItem" for "fsl,pins" to avoid build warning, as the item number is changable. --- .../bindings/pinctrl/fsl,imx8mn-pinctrl.txt | 39 ------------ .../bindings/pinctrl/fsl,imx8mn-pinctrl.yaml | 69 ++++++++++++++++++++++ 2 files changed, 69 insertions(+), 39 deletions(-) delete mode 100644 Documentation/devicetree/bindings/pinctrl/fsl,imx8mn-pinctrl.txt create mode 100644 Documentation/devicetree/bindings/pinctrl/fsl,imx8mn-pinctrl.yaml diff --git a/Documentation/devicetree/bindings/pinctrl/fsl,imx8mn-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/fsl,imx8mn-pinctrl.txt deleted file mode 100644 index 330716c..0000000 --- a/Documentation/devicetree/bindings/pinctrl/fsl,imx8mn-pinctrl.txt +++ /dev/null @@ -1,39 +0,0 @@ -* Freescale IMX8MN IOMUX Controller - -Please refer to fsl,imx-pinctrl.txt and pinctrl-bindings.txt in this directory -for common binding part and usage. - -Required properties: -- compatible: "fsl,imx8mn-iomuxc" -- reg: should contain the base physical address and size of the iomuxc - registers. - -Required properties in sub-nodes: -- fsl,pins: each entry consists of 6 integers and represents the mux and config - setting for one pin. The first 5 integers are specified using a PIN_FUNC_ID macro, which can be found in - . The last integer CONFIG is - the pad setting value like pull-up on this pin. Please refer to i.MX8M Nano - Reference Manual for detailed CONFIG settings. - -Examples: - -&uart1 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_uart1>; -}; - -iomuxc: pinctrl@30330000 { - compatible = "fsl,imx8mn-iomuxc"; - reg = <0x0 0x30330000 0x0 0x10000>; - - pinctrl_uart1: uart1grp { - fsl,pins = < - MX8MN_IOMUXC_UART1_RXD_UART1_DCE_RX 0x140 - MX8MN_IOMUXC_UART1_TXD_UART1_DCE_TX 0x140 - MX8MN_IOMUXC_UART3_RXD_UART1_DCE_CTS_B 0x140 - MX8MN_IOMUXC_UART3_TXD_UART1_DCE_RTS_B 0x140 - MX8MN_IOMUXC_SD1_DATA4_GPIO2_IO6 0x19 - >; - }; -}; diff --git a/Documentation/devicetree/bindings/pinctrl/fsl,imx8mn-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/fsl,imx8mn-pinctrl.yaml new file mode 100644 index 0000000..44c94fb --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/fsl,imx8mn-pinctrl.yaml @@ -0,0 +1,69 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/fsl,imx8mn-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale IMX8MN IOMUX Controller + +maintainers: + - Anson Huang + +description: + Please refer to fsl,imx-pinctrl.txt and pinctrl-bindings.txt in this directory + for common binding part and usage. + +properties: + compatible: + const: fsl,imx8mn-iomuxc + + reg: + maxItems: 1 + +# Client device subnode's properties +patternProperties: + 'grp$': + type: object + description: + Pinctrl node's client devices use subnodes for desired pin configuration. + Client device subnodes use below standard properties. + + properties: + fsl,pins: + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + description: + each entry consists of 6 integers and represents the mux and config + setting for one pin. The first 5 integers are specified using a PIN_FUNC_ID macro, which can + be found in . The last + integer CONFIG is the pad setting value like pull-up on this pin. Please + refer to i.MX8M Nano Reference Manual for detailed CONFIG settings. + + required: + - fsl,pins + + additionalProperties: false + +required: + - compatible + - reg + +additionalProperties: false + +examples: + # Pinmux controller node + - | + iomuxc: pinctrl@30330000 { + compatible = "fsl,imx8mn-iomuxc"; + reg = <0x30330000 0x10000>; + + pinctrl_uart2: uart2grp { + fsl,pins = < + 0x23C 0x4A4 0x4FC 0x0 0x0 0x140 + 0x240 0x4A8 0x000 0x0 0x0 0x140 + >; + }; + }; + +... -- 2.7.4