From patchwork Thu Sep 10 18:22:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 254739 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B397C43461 for ; Thu, 10 Sep 2020 18:24:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EC8AE207EA for ; Thu, 10 Sep 2020 18:24:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599762270; bh=vf3/2Ah6EEIFVEDc7rxh6WIcbRaV1jukW6ZgpYx8MBo=; h=From:To:Subject:Date:List-ID:From; b=bQlXsBQYBwRiVagsG06GeV/d9rPc3ooziNuc++LDtedtDBa2/3qhxgZqxSchzawsw m9IvrIJEGZ/CzBHfd4BbwRLaMJtjSNFOqx2HpquOv8sWdYyHNcPpzXrFyMXUZ61CxU iRnoCwdBvfUwfG2I+shDhz3/uR5qwoazbIftj8Fc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726872AbgIJSYR (ORCPT ); Thu, 10 Sep 2020 14:24:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:48288 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726932AbgIJSXI (ORCPT ); Thu, 10 Sep 2020 14:23:08 -0400 Received: from localhost.localdomain (unknown [194.230.155.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A26B12076C; Thu, 10 Sep 2020 18:22:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599762171; bh=vf3/2Ah6EEIFVEDc7rxh6WIcbRaV1jukW6ZgpYx8MBo=; h=From:To:Subject:Date:From; b=caAhTjA9m8qhS3qW41xW8P4YOygLHEsgNjo92qujXNQh1nEIfRkaitJKpBmvnV0Cm R4dtxtAua/TxQUqL0No+5urrSdnWeJgs7LaMeI3IgA8i8aMfgbhhAfRPjJPYQqfxlO KfWnyEMuySfAPdcMbbnQAyKI8jTwy90xALgnfkCo= From: Krzysztof Kozlowski To: Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Krzysztof Kozlowski , Wolfram Sang , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/4] dt-bindings: i2c: imx-lpi2c: Add properties and use unevaluatedProperties Date: Thu, 10 Sep 2020 20:22:41 +0200 Message-Id: <20200910182244.5815-1-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Additional properties actually might appear (e.g. power-domains) so describe all typical properties, reference generic i2c schema and use unevaluatedProperties to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8qxp-ai_ml.dt.yaml: i2c@5a800000: 'assigned-clock-rates', 'assigned-clocks', 'clock-names', 'power-domains' do not match any of the regexes: 'pinctrl-[0-9]+' arch/arm64/boot/dts/freescale/imx8qxp-colibri-eval-v3.dt.yaml: i2c@5a800000: 'touchscreen@2c' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski --- Changes since v2: 1. Add assigned-clock-parents Changes since v1: 1. Add more properties and include /schemas/i2c/i2c-controller.yaml# --- .../bindings/i2c/i2c-imx-lpi2c.yaml | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml b/Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml index ac0bc5dd64d6..918535b33384 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml +++ b/Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml @@ -9,6 +9,9 @@ title: Freescale Low Power Inter IC (LPI2C) for i.MX maintainers: - Anson Huang +allOf: + - $ref: /schemas/i2c/i2c-controller.yaml# + properties: compatible: enum: @@ -16,29 +19,42 @@ properties: - fsl,imx8qxp-lpi2c - fsl,imx8qm-lpi2c + '#address-cells': true + '#size-cells': true + reg: maxItems: 1 interrupts: maxItems: 1 + assigned-clock-parents: true + assigned-clock-rates: true + assigned-clocks: true + clock-frequency: true + + clock-names: + maxItems: 1 + clocks: maxItems: 1 + power-domains: true + required: - compatible - reg - interrupts - clocks -additionalProperties: false +unevaluatedProperties: false examples: - | #include #include - lpi2c7@40a50000 { + i2c@40a50000 { compatible = "fsl,imx7ulp-lpi2c"; reg = <0x40A50000 0x10000>; interrupt-parent = <&intc>; From patchwork Thu Sep 10 18:22:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 254738 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F156AC433E2 for ; Thu, 10 Sep 2020 18:30:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 97B61207EA for ; Thu, 10 Sep 2020 18:30:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599762625; bh=tBuZCR5xiv1qjye1QG9PxK9ZNp+DEVBnbx0PDmvTlWo=; h=From:To:Subject:Date:In-Reply-To:References:List-ID:From; b=ZAmYg1X+qf5XYO+dbZn3CyGGBupEjBsXp9R6KHcThb54ivKz5IuKsQmw2HuduxYMB GFnV6WLhKkeJ7iB1gRwShK6+ba4cOQ9fOEpFb3S6jK25QhxFBNQMpoRZNeYkMzPQUW hDAC1leA/FcpG9uVb/viMyklAr8JJ+7QEnpvj37I= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726443AbgIJSaV (ORCPT ); Thu, 10 Sep 2020 14:30:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:48360 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726973AbgIJSXZ (ORCPT ); Thu, 10 Sep 2020 14:23:25 -0400 Received: from localhost.localdomain (unknown [194.230.155.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9852B21D90; Thu, 10 Sep 2020 18:22:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599762181; bh=tBuZCR5xiv1qjye1QG9PxK9ZNp+DEVBnbx0PDmvTlWo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=w3cgk1iB7ZLIrA0yy4zGNS3HxFo56zh1fZWmQFAAtzadkDP21Fiv0SnhiZh+0WMJA AmzINdUfkal+hH3DceZI9B/uinG7Q+7UzDAwX+m29jbmdXd3siLtVhFF43ymTIka8/ Z+2utdvl4stghrFkNMjpUThswNFuPfs9H28bTn5E= From: Krzysztof Kozlowski To: Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Krzysztof Kozlowski , Wolfram Sang , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 4/4] dt-bindings: i2c: imx: Fix i.MX 7 compatible matching Date: Thu, 10 Sep 2020 20:22:44 +0200 Message-Id: <20200910182244.5815-4-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200910182244.5815-1-krzk@kernel.org> References: <20200910182244.5815-1-krzk@kernel.org> Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org The i.MX 7 DTSes use two compatibles so update the binding to fix dtbs_check warnings like: arch/arm/boot/dts/imx7d-cl-som-imx7.dt.yaml: i2c@30a20000: compatible: ['fsl,imx7d-i2c', 'fsl,imx21-i2c'] is not valid under any of the given schemas (Possible causes of the failure): arch/arm/boot/dts/imx7d-cl-som-imx7.dt.yaml: i2c@30a20000: compatible: ['fsl,imx7d-i2c', 'fsl,imx21-i2c'] is too long Signed-off-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/i2c/i2c-imx.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/i2c/i2c-imx.yaml b/Documentation/devicetree/bindings/i2c/i2c-imx.yaml index 19c9daba6e9f..3a0fbeea7aaf 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-imx.yaml +++ b/Documentation/devicetree/bindings/i2c/i2c-imx.yaml @@ -21,6 +21,9 @@ properties: - items: - const: fsl,imx35-i2c - const: fsl,imx1-i2c + - items: + - const: fsl,imx7d-i2c + - const: fsl,imx21-i2c - items: - enum: - fsl,imx25-i2c