Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp42574pxp; Thu, 10 Mar 2022 22:01:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJzMi0heAE1vURLnEi1qg3XXTHec+bQZf//YKBJRlExXv0ZgTtObexSZjzMDEvLmnomXHCCV X-Received: by 2002:a17:902:eb88:b0:151:3de0:c624 with SMTP id q8-20020a170902eb8800b001513de0c624mr8941042plg.86.1646978493474; Thu, 10 Mar 2022 22:01:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646978493; cv=none; d=google.com; s=arc-20160816; b=NDaBlSxE9Ks/2ZA7s8f+zfKmHZ0H714ljbK4Of+QjteBmqjS19GLvkrAWKVMZON6zF TXqXWPZC4071jyiYX8osnMTpZFz8YAcQ42OL5HcyvF5q4wDgVC0eGbOrOWzH0ysifDiP 4pvM4J+OH/GSsPyypVhon6Ako+1I4uk7y2Mp9ZFXrE3eEd8NPmM5p3bR8jpC2DPdx42x wJ6uoG3cM/dFBSyg9YX3CNXXpNJesID5YeigGSGpDZtx3ZZ83n4uy5qb2LBqULN0x5FH W7aDT2I0K6kLAwMs3jeaQWswBejP+BtVm/x1vMmbiFhdz4tauPUcVfTKjRQQ+QwzsTD2 YMng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=EqxkVb67gGDdKh1qAAOU776fhGQMZtKjkW6ONAgjPtI=; b=pyTZMWZAxMw9kKRhmRRYqgF/14I1Rl8MU/ZwGxbyppBuP8111hBkHhBarHEoaRyW0Q Hy1cdQPXVnkJG6C3gIW8FT3FUDLo0EybAdcyT4mdUbojKOAV+KB5zxmyVAwcHNGmKbhe IJTTwN33JO0VRgs+bAqqoxH+UI53jV6UT7s/mTLE9d+x3feDu1ck/1ID8K6XMoTeQIa9 aVI3gHfZ6ufvjbOP5PvdUsC5AxswrYqa3jhYF/2SLjpRK5F4/l5zfH76sm0xUuHRirfE qGxt2xGay9DX/IEyEGjd10giJ4voLLtrCYzn2RSNBTPNpnfbznDfuNJnoUR5s1aE/W/q +ryw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=iJQn5ddp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i13-20020a17090ad34d00b001bd14e0303asi4019917pjx.18.2022.03.10.22.01.17; Thu, 10 Mar 2022 22:01:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=iJQn5ddp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238392AbiCJHWv (ORCPT + 99 others); Thu, 10 Mar 2022 02:22:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236590AbiCJHWs (ORCPT ); Thu, 10 Mar 2022 02:22:48 -0500 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E4EE131139 for ; Wed, 9 Mar 2022 23:21:47 -0800 (PST) Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 2ECD83F1A3 for ; Thu, 10 Mar 2022 07:21:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1646896906; bh=EqxkVb67gGDdKh1qAAOU776fhGQMZtKjkW6ONAgjPtI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=iJQn5ddp7FJODhH4OQG8AlX9dxSs+GwnYRpvVOXsodMYmsVArJJsd1akxF5bR/fEQ bTCYnjb62u82ShpfZvvOtDKuasE2K6YTlybDokVqHY7o0Wm0IA1R5vIEDb8a4bP3J4 6SsDgarq4k7Mc9CZh4hl9/QKoqXSwoz+OMJaGCxkQ8zOTj2rMjp4PXymAcqWGaboLE o4gXTGlVN/ZBxc4j34e/2F5yliifPGbrxbE/HHGC5nCpoTfCgFebwVFVfZ8V6WagyT ek+EXRzJvieUpO5Dpr+2ROWLGWb3LgkuJ1rOnXIdPOfwdE+MvHmQU03HVlE4WzqGC3 xih631Zwxx9qA== Received: by mail-ej1-f71.google.com with SMTP id h22-20020a1709060f5600b006b11a2d3dcfso2629222ejj.4 for ; Wed, 09 Mar 2022 23:21:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=EqxkVb67gGDdKh1qAAOU776fhGQMZtKjkW6ONAgjPtI=; b=dCokY92gkcQxD6gen3/99Pxz0hooWOCGqdQNiJs9X/0Xm/Mrg6PDPwZezDqjA9cTyc zbnBVWneDPgf0pxcxnaaxxwBcG8bcB17SvB+IUALOFn9IGtQxx7K/M49IpfiqQeHDdF+ GWJhxs9nnR7jhfF1rAuvH09oWArQWQog0QAAjUHT5NdUukJlY6IVzRWJYqpmIVG9Qj71 q2PC/Tlt2NuRsaMkjHFnr4UEBF2r94YeJ4pU4EZuROKv8/ao7omoJpU4MLPCSHWjzvZ4 ssNxAjJqvcnzDNSDT+15dqlfQqdr0+C7G/BZGw169NwuxigIdf+YGAP9DMPWX6osPnkA xWqA== X-Gm-Message-State: AOAM533Rdd9o4D9hw5fmoqUpXqg23KW32HTp2jAJuJoxgpfEhJZ+ouPY 4EaQdRnwR+rGdSYL+QeKekmZhIlM9eTSjN35cRzXWVhFsgcSwyrGO/pe5vei6xjK4h3MVTylvBY KbRUGv8JNKzbx/C0lNq2HIJUOgOb3QxDDPlrNbDBE6Q== X-Received: by 2002:a05:6402:4248:b0:416:9c69:4f80 with SMTP id g8-20020a056402424800b004169c694f80mr2982703edb.83.1646896905850; Wed, 09 Mar 2022 23:21:45 -0800 (PST) X-Received: by 2002:a05:6402:4248:b0:416:9c69:4f80 with SMTP id g8-20020a056402424800b004169c694f80mr2982692edb.83.1646896905665; Wed, 09 Mar 2022 23:21:45 -0800 (PST) Received: from [192.168.0.144] (xdsl-188-155-174-239.adslplus.ch. [188.155.174.239]) by smtp.gmail.com with ESMTPSA id fx13-20020a170906b74d00b006da9e406786sm1507452ejb.189.2022.03.09.23.21.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Mar 2022 23:21:45 -0800 (PST) Message-ID: <4ebce779-63f5-a7b4-6cd7-5152ce345531@canonical.com> Date: Thu, 10 Mar 2022 08:21:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH 2/3] dt-bindings: i2c: convert i2c-at91 to json-schema Content-Language: en-US To: Sergiu Moga , robh+dt@kernel.org, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, claudiu.beznea@microchip.com Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org References: <20220309120714.51393-1-sergiu.moga@microchip.com> <20220309120714.51393-3-sergiu.moga@microchip.com> From: Krzysztof Kozlowski In-Reply-To: <20220309120714.51393-3-sergiu.moga@microchip.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/03/2022 13:07, Sergiu Moga wrote: > Convert I2C binding for Atmel/Microchip SoCs to Device Tree Schema > format. > > Signed-off-by: Sergiu Moga > --- > .../bindings/i2c/atmel,at91sam-i2c.yaml | 144 ++++++++++++++++++ > .../devicetree/bindings/i2c/i2c-at91.txt | 82 ---------- > 2 files changed, 144 insertions(+), 82 deletions(-) > create mode 100644 Documentation/devicetree/bindings/i2c/atmel,at91sam-i2c.yaml > delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-at91.txt > > diff --git a/Documentation/devicetree/bindings/i2c/atmel,at91sam-i2c.yaml b/Documentation/devicetree/bindings/i2c/atmel,at91sam-i2c.yaml > new file mode 100644 > index 000000000000..d4aadbbd1a11 > --- /dev/null > +++ b/Documentation/devicetree/bindings/i2c/atmel,at91sam-i2c.yaml > @@ -0,0 +1,144 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +# Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/i2c/atmel,at91sam-i2c.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: I2C for Atmel/Microchip platforms > + > +maintainers: > + - Alexandre Belloni > + > +allOf: > + - $ref: "i2c-controller.yaml" > + - if: allOf with additional if: goes by convention after required:. > + properties: > + compatible: > + contains: > + enum: > + - atmel,sama5d4-i2c > + - atmel,sama5d2-i2c > + - microchip,sam9x60-i2c > + then: > + properties: > + i2c-sda-hold-time-ns: > + description: > + TWD hold time > + maxItems: 1 > + > +properties: > + compatible: > + enum: > + - atmel,at91rm9200-i2c > + - atmel,at91sam9261-i2c > + - atmel,at91sam9260-i2c > + - atmel,at91sam9g20-i2c > + - atmel,at91sam9g10-i2c > + - atmel,at91sam9x5-i2c > + - atmel,sama5d4-i2c > + - atmel,sama5d2-i2c > + - microchip,sam9x60-i2c > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 0 > + > + clocks: > + maxItems: 1 > + > + clock-frequency: > + default: 100000 > + > + dmas: > + items: > + - description: TX DMA Channel Specifier > + - description: RX DMA Channel Specifier > + > + dma-names: > + items: > + - const: tx > + - const: rx > + > + atmel,fifo-size: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: | > + Maximum number of data the RX and TX FIFOs can store for > + FIFO capable I2C controllers. > + > + scl-gpios: true > + > + sda-gpios: true > + > + pinctrl: > + description: | > + Add extra pinctrl to configure i2c pins to gpio function for i2c > + bus recovery, call it "gpio" state This is a generic property, you do not need it. > + > +required: > + - compatible > + - reg > + - interrupts > + - "#address-cells" > + - "#size-cells" > + - clocks > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include > + #include > + #include > + > + i2c0: i2c@fff84000 { > + compatible = "atmel,at91sam9g20-i2c"; > + reg = <0xfff84000 0x100>; > + interrupts = <12 IRQ_TYPE_LEVEL_HIGH 6>; > + #address-cells = <1>; > + #size-cells = <0>; > + clocks = <&twi0_clk>; > + clock-frequency = <400000>; > + > + eeprom@50 { > + compatible = "atmel,24c512"; > + reg = <0x50>; > + pagesize = <128>; > + }; > + }; > + > + i2c1: i2c@f8034600 { > + compatible = "atmel,sama5d2-i2c"; > + reg = <0xf8034600 0x100>; > + interrupts = <19 IRQ_TYPE_LEVEL_HIGH 7>; > + dmas = <&dma0 > + (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)) > + AT91_XDMAC_DT_PERID(11)>, > + <&dma0 > + (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)) > + AT91_XDMAC_DT_PERID(12)>; > + dma-names = "tx", "rx"; > + #address-cells = <1>; > + #size-cells = <0>; > + clocks = <&flx0>; > + atmel,fifo-size = <16>; > + i2c-sda-hold-time-ns = <336>; > + pinctrl-names = "default", "gpio"; > + pinctrl-0 = <&pinctrl_i2c0>; > + pinctrl-1 = <&pinctrl_i2c0_gpio>; > + sda-gpios = <&pioA 30 GPIO_ACTIVE_HIGH>; > + scl-gpios = <&pioA 31 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; > + > + eeprom@1a { > + compatible = "wm8731"; It seems this is undocumented compatible. Could you use something else, documented? Best regards, Krzysztof