Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp1583707lkv; Wed, 19 May 2021 13:21:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8K9SdH2z919HI7gJc3zY2joVU9x+DeK2PK4A1zKM7/06gp0yP20CxdcUl40zwjTfHZIHL X-Received: by 2002:a05:6e02:1a0c:: with SMTP id s12mr876898ild.201.1621455691651; Wed, 19 May 2021 13:21:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621455691; cv=none; d=google.com; s=arc-20160816; b=XIDDo9n/e+MY/VS30YI+HpEdnX1eqFLprnvN9CZZXutWVDUtPncA2EgeH3lKQ45jSR NiB/EKxmYYtbiLsGIfaYMapmljfGFbSptuJBixwRqItbZ5qaNJEK/BLhS9Q/k1T5VagT VdvhSv/nGICidVq2Qgy6+G3z7pO56G5rKR+VjLtIVPkqHr0doSa69ySsRqTeQcwp6z4U 88GEf5zVn9fEVI1kOS7BeBIWLvAuWZjCe2NbN17i4f9mSpMeTZ858sGG3j/3RfUJIGR5 bneYe6D4mdn3y0U0p8J6k6OIYnPTaHcRmGmV7W7x7B1vwbxoxQZaQjrR7ruvPEMXzg9e spFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=3eV85aK6PAtwTIX7onsB2928ux3depQzquh9A03orMk=; b=jaiPBTZtRdEFwsYo8/BY7IrkeIzZUaTVCjxYUxALEysMr5/pN0+wvBT3DEYVgI3zIS 3bruhMptM6CsRPMSOhlrxg+QfvJTjDmG5TsoBFRuQR+cQ1s2Jnadbv3wYxsPJ6sAp1sG 9Nd49S1+PaHgkRimBFuyruy9twGDpm8d1ZZB9ujDqx3OeyhXVVtCP8X22HC8sKkE7ZFr PGBfVSziaHsFqwLnmA34qFKTTufzjA1L+X/GNf0+uYd1bzaz1NpD/knqLfjIE9b9pRmE y8orqtzbRhTc0/p+9+HNYZVjCk5wz88CkZFojvjvls76xos+wDFAiypoVf9yNzuqlKkZ VLYA== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b18si732281ile.24.2021.05.19.13.21.18; Wed, 19 May 2021 13:21:31 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231356AbhESSaK (ORCPT + 99 others); Wed, 19 May 2021 14:30:10 -0400 Received: from mail-oi1-f177.google.com ([209.85.167.177]:39914 "EHLO mail-oi1-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229652AbhESSaH (ORCPT ); Wed, 19 May 2021 14:30:07 -0400 Received: by mail-oi1-f177.google.com with SMTP id y76so4715572oia.6; Wed, 19 May 2021 11:28:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=3eV85aK6PAtwTIX7onsB2928ux3depQzquh9A03orMk=; b=cv8ycJq+tBflYwYQcZ4dhlKgpuoPTKcXQA/S83tT1Rgwlh8dl8z1TO/rCmSBgBJDlo 2Hx0hYBnVCv1xqUI33F2LscOe9GuaoDuq1FzRDyx0DC+pW7qZ8X1Agr15kUqW3rEYOVD 47zIJfBOD6z5rxHaqTs2KaH/KXewNCmrQmzmUqgrHwpnjTwqZLjaXGCeP8esZ1WMPAdS lXKM6gavGc04CrChNQ+k6uQaAfxC03bLNf7OKYgC/WFB9GI7NjjVbLijj8IQ+AaoWbhK Y4DpFpwIlg01eiAzAQd+0xjXXvaSVimkzSRH//BBkEdrkGWlM3Sf30kXkjz8jgkxlmZR BeZA== X-Gm-Message-State: AOAM53361LSmgfOoutDmSleyqCeT2s050OZOAU54LNqqqbEeADPT8/qx IqotPbBUK29hXX/BRxFULQ== X-Received: by 2002:aca:da89:: with SMTP id r131mr388538oig.3.1621448926930; Wed, 19 May 2021 11:28:46 -0700 (PDT) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id f9sm108444otq.27.2021.05.19.11.28.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 May 2021 11:28:46 -0700 (PDT) Received: (nullmailer pid 3405153 invoked by uid 1000); Wed, 19 May 2021 18:28:45 -0000 Date: Wed, 19 May 2021 13:28:45 -0500 From: Rob Herring To: Jamin Lin Cc: Joel Stanley , Andrew Jeffery , 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@aspeedtech.com, chiawei_wang@aspeedtech.com, troy_lee@aspeedtech.com, steven_lee@aspeedtech.com Subject: Re: [PATCH 3/3] dt-bindings: aspeed-i2c: Convert txt to yaml format Message-ID: <20210519182845.GA3400858@robh.at.kernel.org> References: <20210519080436.18975-1-jamin_lin@aspeedtech.com> <20210519080436.18975-4-jamin_lin@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210519080436.18975-4-jamin_lin@aspeedtech.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 19, 2021 at 04:04:29PM +0800, Jamin Lin wrote: > Add global-reg node for AST2600. Document the properties for > "aspeed,ast2600-i2c-global" compatible node. > > Signed-off-by: Jamin Lin > --- > .../devicetree/bindings/i2c/aspeed,i2c.yaml | 89 +++++++++++++++++++ > .../devicetree/bindings/i2c/i2c-aspeed.txt | 49 ---------- > 2 files changed, 89 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..f469487935bd > --- /dev/null > +++ b/Documentation/devicetree/bindings/i2c/aspeed,i2c.yaml > @@ -0,0 +1,89 @@ > +# 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 > + - aspeed,ast2600-i2c-global syscon "aspeed,ast2600-i2c-global syscon" is not a valid compatible value. What makes this a syscon? > + > + "#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: > + description: interrupt number > + > + clocks: > + description: > + root clock of bus, should reference the APB > + clock in the second cell How many clocks? Needs maxItems or items. > + > + reset: > + description: phandle to reset controller with the reset number in > + the second cell How many? > + > + bus-frequency: > + minimum: 10000 > + maximum: 3400000 > + default: 100000 > + description: frequency of the bus clock in Hz defaults to 100 kHz when not > + specified > + > + multi-master: > + maxItems: 1 multi-master is an array? > + description: > + states that there is another master active on this bus > + > +required: > + - reg > + - compatible > + - clocks > + - resets > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include > + #include > + i2c_gr: i2c-global-regs@0 { > + compatible = "aspeed,ast2600-i2c-global", "syscon"; > + reg = <0x0 0x20>; > + clocks = <&syscon ASPEED_CLK_APB2>; > + resets = <&syscon ASPEED_RESET_I2C>; > + }; > + > + i2c0: i2c-bus@80 { > + #address-cells = <1>; > + #size-cells = <0>; > + #interrupt-cells = <1>; > + reg = <0x80 0x80>; > + compatible = "aspeed,ast2600-i2c-bus"; > + clocks = <&syscon ASPEED_CLK_APB2>; > + resets = <&syscon ASPEED_RESET_I2C>; > + interrupts = ; > + bus-frequency = <100000>; > + }; > diff --git a/Documentation/devicetree/bindings/i2c/i2c-aspeed.txt b/Documentation/devicetree/bindings/i2c/i2c-aspeed.txt > deleted file mode 100644 > index b47f6ccb196a..000000000000 > --- a/Documentation/devicetree/bindings/i2c/i2c-aspeed.txt > +++ /dev/null > @@ -1,49 +0,0 @@ > -Device tree configuration for the I2C busses on the AST24XX, AST25XX, and AST26XX SoCs. > - > -Required Properties: > -- #address-cells : should be 1 > -- #size-cells : should be 0 > -- reg : address offset and range of bus > -- compatible : should be "aspeed,ast2400-i2c-bus" > - or "aspeed,ast2500-i2c-bus" > - or "aspeed,ast2600-i2c-bus" > -- clocks : root clock of bus, should reference the APB > - clock in the second cell > -- resets : phandle to reset controller with the reset number in > - the second cell > -- interrupts : interrupt number > - > -Optional Properties: > -- bus-frequency : frequency of the bus clock in Hz defaults to 100 kHz when not > - specified > -- multi-master : states that there is another master active on this bus. > - > -Example: > - > -i2c { > - compatible = "simple-bus"; > - #address-cells = <1>; > - #size-cells = <1>; > - ranges = <0 0x1e78a000 0x1000>; > - > - i2c_ic: interrupt-controller@0 { > - #interrupt-cells = <1>; > - compatible = "aspeed,ast2400-i2c-ic"; > - reg = <0x0 0x40>; > - interrupts = <12>; > - interrupt-controller; > - }; > - > - i2c0: i2c-bus@40 { > - #address-cells = <1>; > - #size-cells = <0>; > - #interrupt-cells = <1>; > - reg = <0x40 0x40>; > - compatible = "aspeed,ast2400-i2c-bus"; > - clocks = <&syscon ASPEED_CLK_APB>; > - resets = <&syscon ASPEED_RESET_I2C>; > - bus-frequency = <100000>; > - interrupts = <0>; > - interrupt-parent = <&i2c_ic>; > - }; > -}; > -- > 2.17.1 >