Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp90662rdb; Tue, 31 Oct 2023 01:22:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFAhiVABc6xmMqvTtGQ6alxz1c5WJQ+h7VY+mlyrkHeO9CgVVjr9cs8EhIcaANHmaIF+ECV X-Received: by 2002:a05:6e02:1c2c:b0:351:4f0c:b95c with SMTP id m12-20020a056e021c2c00b003514f0cb95cmr16100975ilh.24.1698740539540; Tue, 31 Oct 2023 01:22:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698740539; cv=none; d=google.com; s=arc-20160816; b=xOIXDdubOYilj96HtXFHGerua3P04TyHESpl+uShfyu+288Zw0Z+rQUmIWJjgQyLOl yk9H2wCILwzJ2AyoW2p+oOXNdCoVhOcwjpxLyWOIH/3Z3utlFAvyexI8exfqaCQjH3AQ xn55pvNFOt1NbEYYHq1f+1xpzx8H/f9Nrmc5bZTF+CYj8mPb3n8LcSiYG5a2eF1C0ZkP dScC7m917BNCcYBprbLKN33IshZGOWyBxgFzXetcZGINzJPqZRqsOnV5ZR0CP2+opMW8 HP/U6tl9Ehyq/128WA/K2r5ALwAOvIaKgAr0gwEwbyDtNagH134zC8LW88a1WaURHtko 57oA== 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=9fiIztG3yV+Rle2yiPUeMRHRyVQUODxvOfbzllDGbK4=; fh=ry1pWlfsd+nFq492f7WL4xf/S5n5k4BH3B8PKlMQK0o=; b=iVfJShvoo5+1N0zRJip9kF2ddHv1p3ry5rKtNJlyuDcZTPHvyjB6uchoOfuIds1Vm9 aVUSrSWHCC06OxJ0+Ul2H06g+dkXgQ82HaBVSppdU1n6Ezw4uKpvQsSMbzr16DhyLbEX JZbDpByK+fhcOH12gg15bCDRvJFBzuqCVWe4ft4wl3i2/d+b62/e06rVnbT/5QTIEvCu XbxfwsLXhhEQ/Bx2WYGl+rOAuL5mWIdbA8D3XRRZPuIFfrin2WXqGZQ8Ypkn+2cZ79E1 UIv5P5ji4XaSms5cAHXoRc7l5j5RU9V1dP3KyruiOd+ZNtaVDik4KL22ysOQmCpPcIYR Pk3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="KGre/aTH"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id q26-20020a631f5a000000b005b967ddd984si583740pgm.781.2023.10.31.01.22.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 01:22:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="KGre/aTH"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id C535180447D8; Tue, 31 Oct 2023 01:22:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233650AbjJaIWE (ORCPT + 99 others); Tue, 31 Oct 2023 04:22:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231301AbjJaIWD (ORCPT ); Tue, 31 Oct 2023 04:22:03 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CF13C1 for ; Tue, 31 Oct 2023 01:22:00 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-40850b244beso41521635e9.2 for ; Tue, 31 Oct 2023 01:22:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698740518; x=1699345318; 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=9fiIztG3yV+Rle2yiPUeMRHRyVQUODxvOfbzllDGbK4=; b=KGre/aTH60AimNRnKWQmWYkSET2HaD1io2PZ7K31hRJHHHTAn3PjJWKI0ADdV/Upjr ekLzysI5lDOPB93wSJjhDBpcLQY6IJfc7WhluOwQLPMeBUDZX6btHoHtqqsg1RmaBr+L 3ZXM32uIFyJZAyV9H9Ohs3BMyeUyR4Gw1l2LIAoXqhNZQqfG/XCsPOKGd6wJJIhiNNqR RxaiPrpQ1rnFgzeNYLoondk/e4KbrV8uHtZgrYAqbgZrYXRFpScMxAbkVkDchuY7+sHE bNTO7F6RWJrZRpBosZbuie6CFFmMEL9dFj8wad0icDwFE8gjAkZ7Mq4sC0sTgZ6xKpwq A0bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698740518; x=1699345318; 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=9fiIztG3yV+Rle2yiPUeMRHRyVQUODxvOfbzllDGbK4=; b=qbbC6J8gMpuBAfO+KOcKE3o277AqzP2xr4E0p9jYsb4MsQxBcQjXzrk7YdWmZHKvvo UhS0QIRypdkuUCDqsBKfLK3IsFHKUmCybV6L6M5Oy9W1meTi08o8mJ+suE1IVJPjQt6i tKlGQUVHQX670WcjEN3XVH62Jg2ST6fAkL8uxjTR6mVkf3P6+5Wpf4Irx6ECgXB2WHTz eSlLdpsQazrmXP3RFpKgCe1jArS+wlpAM95Jj3WUNhnRFtBe6hzjvZCfVSu/wBtBQJk3 pQ+aFMn6FLO4Mcci9+Pc9OYPmy5Cxlts6pSl60OLZeQ/zF/sZgRkjIO1FdpVipyRAFPt DT1A== X-Gm-Message-State: AOJu0Yx52cnNa28v17z0pghhz1wcg1jx2ggsDWzkgF17QN/pZsW1lKSE JLuZuqVmtAeK2WAEkv0T7/ANCg== X-Received: by 2002:a05:600c:a06:b0:409:51c2:1199 with SMTP id z6-20020a05600c0a0600b0040951c21199mr889474wmp.28.1698740518588; Tue, 31 Oct 2023 01:21:58 -0700 (PDT) Received: from [192.168.1.20] ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id e13-20020a5d594d000000b00327bf4f2f14sm887919wri.88.2023.10.31.01.21.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 31 Oct 2023 01:21:57 -0700 (PDT) Message-ID: <82d76f96-331d-465d-9159-e9473a02f957@linaro.org> Date: Tue, 31 Oct 2023 09:21:55 +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: <20231031080820.5588-1-Huangzheng.Lai@unisoc.com> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVD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Zepj41oVq FPSVE+Ni2tNrW/e16b8mgXNngHSnbsr6pAIXZH3qFW+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: <20231031080820.5588-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 pete.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 (pete.vger.email [0.0.0.0]); Tue, 31 Oct 2023 01:22:16 -0700 (PDT) On 31/10/2023 09:08, Huangzheng Lai wrote: > Add yaml file to replace txt file, and added description and > example of reset attribute for Spreadtrum I2C controller. > > Signed-off-by: Huangzheng Lai > --- > .../devicetree/bindings/i2c/i2c-sprd.txt | 31 -------- > .../devicetree/bindings/i2c/i2c-sprd.yaml | 79 +++++++++++++++++++ Filename matching compatible. > 2 files changed, 79 insertions(+), 31 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-sprd.txt > create mode 100644 Documentation/devicetree/bindings/i2c/i2c-sprd.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/i2c-sprd.yaml b/Documentation/devicetree/bindings/i2c/i2c-sprd.yaml > new file mode 100644 > index 000000000000..54378afe8419 > --- /dev/null > +++ b/Documentation/devicetree/bindings/i2c/i2c-sprd.yaml > @@ -0,0 +1,79 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +# Copyright 2020 Unisoc Inc. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/i2c/i2c-sprd.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Unisoc I2C Controller Device > + > +maintainers: > + - Huangzheng Lai > + Missing ref to i2c-controller. Open existing bindings and use them as template instead of making something on your own with known bugs. > +properties: > + compatible: > + items: You can drop the items. > + - const: sprd,sc9860-i2c > + > + reg: > + maxItems: 2 You need to describe the items (items with description) > + > + interrupts: > + maxItems: 1 > + > + clock-names: > + items: > + - const: i2c > + - const: source > + - const: enable > + > + clocks: > + items: > + - description: Clock specifier for "i2c" in clock-names This description is useless and redundant. Instead, say what clock is it. If you do not know, then just maxItems: 3 > + - description: Clock specifier for "source" in clock-names > + - description: Clock specifier for "enable" in clock-names > + > + clock-frequency: > + description: Constains desired I2C bus clock frequency in Hz Typo, Contains > + > + "#address-cells": > + const: 1 > + description: Address cells for I2C device address Drop, why do you need it? > + > + "#size-cells": > + const: 0 > + description: Size cell for I2C device address Drop > + > + reset-names: > + const: i2c_rst Drop, wasn't in original binding. Or explain in commit msg what you changed and why. > + > + resets: > + maxItems: 1 > + description: Phandle to the reset controller. Drop, wasn't in original binding. Or explain in commit msg what you changed and why. Description is also quite redundant/useless. > + > +required: > + - compatible > + - reg > + - interrupts > + - clock-names > + - clocks > + - "#address-cells" > + - "#size-cells" Really... Open existing bindings. > + > +additionalProperties: false > + > +examples: > + - | > + i2c0: i2c@2240000 { > + compatible = "sprd,sc9860-i2c"; > + reg = <0 0x2240000 0 0x1000>; > + interrupts = <11>; > + clock-names = "i2c", "source", "enable"; > + clocks = <&clk_i2c3>, <&ext_26m>, <&clk_ap_apb_gates 11>; > + clock-frequency = <400000>; > + #address-cells = <1>; > + #size-cells = <0>; > + reset-names = "i2c_rst"; > + resets = <&apahb_gate 3>; Incomplete. Add child node. > + }; > + Best regards, Krzysztof