Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp416973rdf; Fri, 3 Nov 2023 04:54:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHtAk3/Pa9l0qAe5RzZq+f6FDQdnRo7z2dNF/+KLbuxIGUc5VWGwj9rLK0MqQ0TTZzBYx0L X-Received: by 2002:a17:90a:c7c7:b0:27d:10b1:5deb with SMTP id gf7-20020a17090ac7c700b0027d10b15debmr18189464pjb.31.1699012498982; Fri, 03 Nov 2023 04:54:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699012498; cv=none; d=google.com; s=arc-20160816; b=0iXQ3yzgTQ1+fTDl+1pBA92tXQipsR+eaIU3MmRNS82LpoqtksUij7LtQhJM3cIjGu kUjXIJclSqAJi5jrgC+X5bmrMmaXYLq4FSmKxW2Hu3N/YjGc8A76RmMhJwQ7NIXVtk1P w5KaNXBkKxnnKn1DHZbpcww57xxRVUQNsYTGjVu2q2gxMKetjaDVOd1h1H0q9Kaf2Ns4 bYIV/8911x3VngKj1ppMJNpSWHKfrhpgPrDIhPW3wVl/EshEyh9yINCbbgN0qc8eLKHa fD+eIRJvxHpEpC8mmFU1xH8+wLPSHzEdLTo1uppVR0jQZ+7pK0QtF6DxwT4/Xl8RaI0J K0Lg== 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:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=a9kNRf0CsSUO5sRqZg+at1j9P6cp/urULOMMSKC1Rrw=; fh=ry1pWlfsd+nFq492f7WL4xf/S5n5k4BH3B8PKlMQK0o=; b=LdjjmpTomZo+4J/DD57nzo6jFhsb9YE4SHT/F13DoGY5fjmsbQ3LFHIyebH/NPLpTu lIWp/bxcCaFYV5sh0FjWo1Lw0vse9LFh9GiMnrir8XlFN6UBv3GMJ06kNsBziCD+jmfY lkK5origZ1yi3eKX3h+bNC5ecDL/D5qlHT8hQeOvDsAQIt+AmRglfaVNftIeA3PzD2ob GS6DrOl0l0raxDWiy1BCwgJLv+Qn9M9ECENlqLjYlX854ZNevj/Rq8HZktMqaHoJb7HM M18iEPoDWk7nDKL32JdVviQm5zP4JT6asarEsYX8gtgRYtQn5LVnyeiHa+YC7wb2HwXq na7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T2X3NYna; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id q9-20020a17090a178900b00280216d7e36si1449726pja.171.2023.11.03.04.54.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 04:54:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T2X3NYna; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 8DA7F81DDBE3; Fri, 3 Nov 2023 04:54:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229940AbjKCLyg (ORCPT + 99 others); Fri, 3 Nov 2023 07:54:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbjKCLye (ORCPT ); Fri, 3 Nov 2023 07:54:34 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE5041BC for ; Fri, 3 Nov 2023 04:54:24 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-5435336ab0bso3290256a12.1 for ; Fri, 03 Nov 2023 04:54:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699012463; x=1699617263; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=a9kNRf0CsSUO5sRqZg+at1j9P6cp/urULOMMSKC1Rrw=; b=T2X3NYnaYbJlhn7eqDeyyO4fCllTs+iVzd/ry5l4pgD7ih+wJ3Lzk+hqZxqPe03B+C r6kF3InH+2YL/LLZC5MsdDeU7t118ApFcg5B4tj03RbcUqhYvOSIL9NyQ4fJJPS2xKXQ Bh+qKFW75DRDqPUG8VovetVXyU+732f+64TFerzlgWyAgDdQwjamgXiXVFtp9brYTThD STI96VGay9EEPdyUPhTQZmAQfQChIBTyasVsTe6KynuTxyaRo0qifeq3bk0qdFF8fCR5 uHobVODQlTCeA4K6S7xAPBJ8OAbcTQIssbsxhpNmVBiygrN+Zy6wDfI+LLeiBFqBwInr Tzhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699012463; x=1699617263; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=a9kNRf0CsSUO5sRqZg+at1j9P6cp/urULOMMSKC1Rrw=; b=i8uem/UsXUJhwWmhXJjK1vZYlrCOif1E8S/3fXyVkJm0ru8BVs9XPLn2SJDhMXyeeg HlLMDm4XB8o0u6+PeJiNhEbFmMuD4S6fl/XU+K4XzhnEvHVR/gmZPCq7V3y6vNqKzBvu lCskZ92lcbtx2ZkKDHokiF7ixm0MdBNbLFpGo4kfSxb/NrwJvDtJM+MORoira5dcreTU VCjy2qFxgR2b4dNPALcYpSIe1v0uM2zwPnI2LzVB7FLfnD/Ylcbbu0yjPjqIErv1mI+K B4/N+JlC1JMgrw2E3GqVMN+pFjuLBH5ar0vwhmQK8YPYnIW0hsEKdZQ+vjqdxzkxzPQE /EIA== X-Gm-Message-State: AOJu0YzOVtUiBcS7osJA0ycKZYmckkcoR+H3NOjQ/hS02gAPHTtualF2 /YX5yN2j6I/kNCmtgPKc85nlFA== X-Received: by 2002:aa7:d61a:0:b0:53e:1825:be92 with SMTP id c26-20020aa7d61a000000b0053e1825be92mr16659684edr.31.1699012463081; Fri, 03 Nov 2023 04:54:23 -0700 (PDT) Received: from [192.168.1.20] ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id eo12-20020a056402530c00b00530a9488623sm873380edb.46.2023.11.03.04.54.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Nov 2023 04:54:22 -0700 (PDT) Message-ID: Date: Fri, 3 Nov 2023 12:54:20 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] dt-bindings: i2c: Add yaml for Spreadtrum I2C controller Content-Language: en-US To: Huangzheng Lai , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Orson Zhai , Baolin Wang , Chunyan Zhang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, huangzheng lai , Xiongpeng Wu References: <20231103091653.4591-1-Huangzheng.Lai@unisoc.com> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ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8mgXNngHSnbsr6pAIXZH3qFW+4TKPMGZ2rZ6zITrMip+12jgw4mGjy 5y06JZvA02rZT2k9aa7i9dUUFggaanI09jNGbRA/ABEBAAHCwXwEGAEKACYCGwwWIQSb0H4O DFH41ZZ3t1Qbk0N9O0FimwUCYDzvagUJFF+UtgAKCRAbk0N9O0Fim9JzD/0auoGtUu4mgnna oEEpQEOjgT7l9TVuO3Qa/SeH+E0m55y5Fjpp6ZToc481za3xAcxK/BtIX5Wn1mQ6+szfrJQ6 59y2io437BeuWIRjQniSxHz1kgtFECiV30yHRgOoQlzUea7FgsnuWdstgfWi6LxstswEzxLZ Sj1EqpXYZE4uLjh6dW292sO+j4LEqPYr53hyV4I2LPmptPE9Rb9yCTAbSUlzgjiyyjuXhcwM qf3lzsm02y7Ooq+ERVKiJzlvLd9tSe4jRx6Z6LMXhB21fa5DGs/tHAcUF35hSJrvMJzPT/+u /oVmYDFZkbLlqs2XpWaVCo2jv8+iHxZZ9FL7F6AHFzqEFdqGnJQqmEApiRqH6b4jRBOgJ+cY qc+rJggwMQcJL9F+oDm3wX47nr6jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <20231103091653.4591-1-Huangzheng.Lai@unisoc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 03 Nov 2023 04:54:55 -0700 (PDT) On 03/11/2023 10:16, Huangzheng Lai wrote: > Add a yaml file to replace the txt file. Due to the recent addition > of the 'reset' framework to the Spreadtrum I2C driver to reset the Where? I don't see it. Don't mix new properties with conversion. > controller, information related to the 'reset' attribute has been > added to the bindings file. > Mark/version your patches correctly (git format-patch -v2). Your subject claims it is v1. > Change in V2 Changelog goes to changelog place, so after ---. > -Rename 'i2c-sprd.txt' to 'sprd,sc9860-i2c.yaml'. > -Add ref to i2c-controller. > -Drop items in 'compatible'. > -Add describe for 'reg' items. > -Drop 'clocks' description and just maxItems: 3. > -Fix typo in 'clo-frequency': Contains. > -Add explanation in commit message explaining why 'resets' be added. > -Drop '#size-cells' and 'address-cells' in properties and required. > -Drop description of 'resets'. > -Add child node in examples. > > Signed-off-by: Huangzheng Lai > --- > .../devicetree/bindings/i2c/i2c-sprd.txt | 31 -------- > .../bindings/i2c/sprd,sc9860-i2c.yaml | 75 +++++++++++++++++++ > 2 files changed, 75 insertions(+), 31 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-sprd.txt > create mode 100644 Documentation/devicetree/bindings/i2c/sprd,sc9860-i2c.yaml > > diff --git a/Documentation/devicetree/bindings/i2c/i2c-sprd.txt b/Documentation/devicetree/bindings/i2c/i2c-sprd.txt > deleted file mode 100644 > index 7b6b3b8d0d11..000000000000 > --- a/Documentation/devicetree/bindings/i2c/i2c-sprd.txt > +++ /dev/null > @@ -1,31 +0,0 @@ > -I2C for Spreadtrum platforms > - > -Required properties: > -- compatible: Should be "sprd,sc9860-i2c". > -- reg: Specify the physical base address of the controller and length > - of memory mapped region. > -- interrupts: Should contain I2C interrupt. > -- clock-names: Should contain following entries: > - "i2c" for I2C clock, > - "source" for I2C source (parent) clock, > - "enable" for I2C module enable clock. > -- clocks: Should contain a clock specifier for each entry in clock-names. > -- clock-frequency: Contains desired I2C bus clock frequency in Hz. > -- #address-cells: Should be 1 to describe address cells for I2C device address. > -- #size-cells: Should be 0 means no size cell for I2C device address. > - > -Optional properties: > -- Child nodes conforming to I2C bus binding > - > -Examples: > -i2c0: i2c@70500000 { > - compatible = "sprd,sc9860-i2c"; > - reg = <0 0x70500000 0 0x1000>; > - interrupts = ; > - clock-names = "i2c", "source", "enable"; > - clocks = <&clk_i2c3>, <&ext_26m>, <&clk_ap_apb_gates 11>; > - clock-frequency = <400000>; > - #address-cells = <1>; > - #size-cells = <0>; > -}; > - > diff --git a/Documentation/devicetree/bindings/i2c/sprd,sc9860-i2c.yaml b/Documentation/devicetree/bindings/i2c/sprd,sc9860-i2c.yaml > new file mode 100644 > index 000000000000..f7dd5f116e0c > --- /dev/null > +++ b/Documentation/devicetree/bindings/i2c/sprd,sc9860-i2c.yaml > @@ -0,0 +1,75 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +# Copyright 2020 Unisoc Inc. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/i2c/sprd,sc9860-i2c.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Unisoc I2C Controller Device > + > +maintainers: > + - Huangzheng Lai > + > +allOf: > + - $ref: /schemas/i2c/i2c-controller.yaml# > + > +properties: > + compatible: > + const: sprd,sc9860-i2c > + > + reg: > + description: physical base address of the controller, length of memory mapped region. > + maxItems: 2 > + > + interrupts: > + maxItems: 1 > + > + clock-names: > + items: > + - const: i2c > + - const: source > + - const: enable > + > + clocks: > + maxItems: 3 > + > + clock-frequency: > + description: Contains desired I2C bus clock frequency in Hz. > + minimum: 100000 > + maximum: 3400000 > + > + reset-names: > + const: i2c_rst This is not a conversion. Drop the names, not really useful for one entry. > + > + resets: > + maxItems: 1 > + > +required: > + - compatible > + - reg > + - interrupts > + - clock-names > + - clocks > + > +additionalProperties: false Still not tested. Please test patches before sending. Due to untested code, I am not performing full review. > + > +examples: > + - | > + i2c0: i2c@2240000 { > + compatible = "sprd,sc9860-i2c"; Use 4 spaces for example indentation. > + reg = <0 0x2240000 0 0x1000>; Best regards, Krzysztof