Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1723874pxj; Wed, 19 May 2021 12:22:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnXeGEsq5dvM9qUnNYgewTSTWf0bi6UZ8RgS1hGauDj6lmlfnqptfJ71FlXr+7Y3rKRsW1 X-Received: by 2002:a02:6d09:: with SMTP id m9mr651445jac.131.1621452131439; Wed, 19 May 2021 12:22:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621452131; cv=none; d=google.com; s=arc-20160816; b=qHvNLRtMMVarsqOnAaWlRr6R5rIy0gRVO1w/lqb0YGLZPVVsyuwSanqrLysK1cG6Ai L70w6u8GOzvMYsQ/SVhYTynUALaW6kxmIPAGC9hAPBrvrfo+uws0dob87utvGrMHTLGq 9aF9b81jnsmA0rv+DORt6ugrB1B/+SU1JaCOTwwww385JkPvRjS4iAIfn343zR8SkMXK qBvtNHBWj8XPKc6PEAR0Uc94a8nOVHEWxcBSwzDodj0pBPOh+FgO5HFmpuu/eb8rUcU6 rwUELgbxhlq8rAAlizc1m79M+oB0AX6MhkkB3+U4LhKrv4AJ02Exn5gWgbtWHwfu4M2t +T5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=/CQZ6bBPeVmNcNvyN+q2w7zgb1blExmloiA6OFKHn78=; b=xolDNZn93AbZjAXo+5VF7qitbG6vqHjSlQ/vHc3JRf1yPFFcKAqw+QX56MFXkpo5eQ NLdYuAYXyahDdktRpy1YO7t/w3heaKhXZgPdrA1UN82TLFmmLgbNMebwNDYfWdexMgKt XOFcSAtNEkgDO8O4lsizTjkKx1vgVOHSwy8UVvxLxqFGYBW47bvV4NkfFkWNHd1/dud3 kGbm1kMuWqBBYIXCnTPFINaSBrNq2R5u3RhMlnAJwMZWajaBg2R71FYmCK9HrwWba84h 8LtJXud2EPYz61XAJSBAiE92f1lYZa4yyeT1qxpAP3Exrw0t4WAI8kYurXuZoect1pHF RnFg== 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 n5si678272ilj.6.2021.05.19.12.21.58; Wed, 19 May 2021 12:22:11 -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 S245063AbhESI2y (ORCPT + 99 others); Wed, 19 May 2021 04:28:54 -0400 Received: from twspam01.aspeedtech.com ([211.20.114.71]:46534 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245047AbhESI2x (ORCPT ); Wed, 19 May 2021 04:28:53 -0400 Received: from twspam01.aspeedtech.com (localhost [127.0.0.2] (may be forged)) by twspam01.aspeedtech.com with ESMTP id 14J7tMok034027; Wed, 19 May 2021 15:55:22 +0800 (GMT-8) (envelope-from jamin_lin@aspeedtech.com) Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 14J7qPqH033740; Wed, 19 May 2021 15:52:25 +0800 (GMT-8) (envelope-from jamin_lin@aspeedtech.com) Received: from localhost.localdomain (192.168.100.253) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 19 May 2021 16:05:01 +0800 From: Jamin Lin To: Rob Herring , 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" CC: , , , , Subject: [PATCH 3/3] dt-bindings: aspeed-i2c: Convert txt to yaml format Date: Wed, 19 May 2021 16:04:29 +0800 Message-ID: <20210519080436.18975-4-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210519080436.18975-1-jamin_lin@aspeedtech.com> References: <20210519080436.18975-1-jamin_lin@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain 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 14J7qPqH033740 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 + + "#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 + + reset: + description: phandle to reset controller with the reset number in + the second cell + + 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 + 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