Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp94992pxj; Thu, 27 May 2021 22:29:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3W+ENQASVDIYBCkcOJNYqauV7WcBisaieNMQGZtavfiS3qetCuQJC1C0yaUgbcWtvadFm X-Received: by 2002:a05:6402:3585:: with SMTP id y5mr8009847edc.121.1622179747354; Thu, 27 May 2021 22:29:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622179747; cv=none; d=google.com; s=arc-20160816; b=WhNFV7KkNUNc5BeXPGbz0RVILlVbjIbMltTE1bKXPkexekaSrVAN8Owso2eewOiLi8 w5I+kcqM7u80uCZphh8c1gwpN6dt/OZRl2FF8PXfOpaZk3q+EdhBcbaLE0rbyDus8lUj yWc1WGVLuaHuLaKUORvzXqZ5bfn8TKOLrjgNGG3VmIGAviwSNkxXxVFq/8ZL15Or/AKs DZiK0w5BrztWqKxnYpC7FvJxASSDYqAQv+g4EuLJJ/E5So9fKYdG8b9rpMWGdTi39CrR BnQEXdonEviow+stxLqNbkJaq/EmslP2a+qmVfublLilFjvhElN56oQqFZHewNoSKg3r T0Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=hxOMgZ2qfSPBJPI0al+SmHEtjkwUJLHWxcXsPsToo/A=; b=YJ4/CIBi00hTBoyjnpf5BFxwT+duJcHuB8f06M1felI46KsXdk00gI/crZl50hTZas isLhC2f+Q7vNP+Zykdh5W73cTz5lBcBweRXfBiuSyHMDzThkoSqqGCB97bBggTxoaQnb P15+0Xp5EbVCUTe8QyTXglC/Qd6Ic+twv+RQsZU9tbd+2MAqKKEm1R3R8/aa8YX7Fn+g 0aRkYS1VvGSyc3+SvliWEWkm5gV4p5Ici0W2n6xL8ZV9JnfUa7VB7e2vIZ+f+6L/hbKL UPihxsKYd17A4RCH8p6Yy55cCimhkr2ZTs6s3nD0174JkoJ2wIev8FHb4IoS0bt7jFTr CLqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ca28si3784454edb.453.2021.05.27.22.28.44; Thu, 27 May 2021 22:29:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234070AbhE1Bqe (ORCPT + 99 others); Thu, 27 May 2021 21:46:34 -0400 Received: from twspam01.aspeedtech.com ([211.20.114.71]:32985 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229749AbhE1Bqe (ORCPT ); Thu, 27 May 2021 21:46:34 -0400 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 14S1VC2k002352; Fri, 28 May 2021 09:31:12 +0800 (GMT-8) (envelope-from jamin_lin@aspeedtech.com) Received: from aspeedtech.com (192.168.100.253) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 28 May 2021 09:44:18 +0800 Date: Fri, 28 May 2021 09:44:17 +0800 From: Jamin Lin To: Andrew Jeffery CC: Rob Herring , Joel Stanley , "Brendan Higgins" , Benjamin Herrenschmidt , Rayn Chen , "open list:I2C SUBSYSTEM HOST DRIVERS" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , open list , "moderated list:ARM/ASPEED I2C DRIVER" , Ryan Chen , "Chin-Ting Kuo" , Troy Lee , Steven Lee Subject: Re: [PATCH v2 1/1] dt-bindings: aspeed-i2c: Convert txt to yaml format Message-ID: <20210528014416.GA3195@aspeedtech.com> References: <20210527102512.20684-1-jamin_lin@aspeedtech.com> <20210527102512.20684-2-jamin_lin@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [192.168.100.253] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 14S1VC2k002352 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The 05/27/2021 23:20, Andrew Jeffery wrote: > > > On Thu, 27 May 2021, at 19:55, Jamin Lin wrote: > > Convert aspeed i2c to yaml. > > > > Signed-off-by: Jamin Lin > > --- > > .../devicetree/bindings/i2c/aspeed,i2c.yaml | 86 +++++++++++++++++++ > > .../devicetree/bindings/i2c/i2c-aspeed.txt | 49 ----------- > > 2 files changed, 86 insertions(+), 49 deletions(-) > > create mode 100644 Documentation/devicetree/bindings/i2c/aspeed,i2c.yaml > > delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-aspeed.txt > > > > diff --git a/Documentation/devicetree/bindings/i2c/aspeed,i2c.yaml > > b/Documentation/devicetree/bindings/i2c/aspeed,i2c.yaml > > new file mode 100644 > > index 000000000000..1f7064d77708 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/i2c/aspeed,i2c.yaml > > @@ -0,0 +1,86 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/i2c/aspeed,i2c.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: ASPEED I2C on the AST24XX, AST25XX, and AST26XX SoCs Device > > Tree Bindings > > + > > +maintainers: > > + - Rayn Chen > > + > > +allOf: > > + - $ref: /schemas/i2c/i2c-controller.yaml# > > + > > +properties: > > + compatible: > > + enum: > > + - aspeed,ast2400-i2c-bus > > + - aspeed,ast2500-i2c-bus > > + - aspeed,ast2600-i2c-bus > > + > > + "#size-cells": > > + const: 0 > > + > > + "#address-cells": > > + const: 1 > > + > > + reg: > > + minItems: 1 > > + maxItems: 2 > > + items: > > + - description: address offset and range of bus > > + - description: address offset and range of bus buffer > > + > > + interrupts: > > + maxItems: 1 > > + description: interrupt number > > + > > + clocks: > > + maxItems: 1 > > + description: > > + root clock of bus, should reference the APB > > + clock in the second cell > > + > > + reset: > > + maxItems: 1 > > + description: phandle to reset controller with the reset number in > > + the second cell > > + > > + bus-frequency: > > + minimum: 500 > > + maximum: 4000000 > > + default: 100000 > > + description: frequency of the bus clock in Hz defaults to 100 kHz > > when not > > + specified > > + > > + multi-master: > > + type: boolean > > + description: > > + states that there is another master active on this bus > > + > > +required: > > + - reg > > + - compatible > > + - clocks > > + - resets > > + > > +unevaluatedProperties: false > > + > > +examples: > > + - | > > + #include > > + i2c0: i2c-bus@40 { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + #interrupt-cells = <1>; > > + reg = <0x40 0x40>; > > + compatible = "aspeed,ast2500-i2c-bus"; > > + clocks = <&syscon ASPEED_CLK_APB>; > > + resets = <&syscon ASPEED_RESET_I2C>; > > + bus-frequency = <100000>; > > + interrupts = <0>; > > + interrupt-parent = <&i2c_ic>; > > + status = "disabled"; > > + /* Does not need pinctrl properties */ > > Note this actually isn't right and someone (me?) needs to send a patch > to fix the devicetree(s) - the I2C mux properties for bus 0 and 1 just > don't have a group, and so SCL and SDA need to be muxed individually. > > I expect we wound up with this comment by a lack of a match for an > erroneous grep. > > Andrew Understand. Can I change the example as the following or can you give me any suggestion? i2c0: i2c-bus@40 { #address-cells = <1>; #size-cells = <0>; #interrupt-cells = <1>; reg = <0x40 0x40>; compatible = "aspeed,ast2500-i2c-bus"; clocks = <&syscon ASPEED_CLK_APB>; resets = <&syscon ASPEED_RESET_I2C>; bus-frequency = <100000>; interrupts = <0>; interrupt-parent = <&i2c_ic>; Thanks-Jamin