Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp87015rdb; Tue, 31 Oct 2023 01:12:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHhLinqrwmgjMXGuVeERWY+fjNsxSthwLkFLXT+N8DDAhomSCBbNbSCgLhqFCukz9iYK+x+ X-Received: by 2002:a17:903:11c8:b0:1cc:511d:eb43 with SMTP id q8-20020a17090311c800b001cc511deb43mr4842798plh.61.1698739942114; Tue, 31 Oct 2023 01:12:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698739942; cv=none; d=google.com; s=arc-20160816; b=ZUlaUK0tYluPx3M9tcoa2FjO0zJw30ftv5+frkextCbU1dkawSiIiSmbj9dznerXZA tGNKsbUbvnRVsWAxWyF8Z7QMClZJ6dGkSrhiV7Nb8vqYNVPeP95ZN7zn2lBZ7O+kHwOY 9ACBm/9mmYFFdhBFZubf1DWHa4L7wd0NrjCm2MJkBzxLAnPSVMIrKMzd8RrlY8rATWzP oHHAZTKm76bPqm8eIQGCZ0NWxc2B6gS1hotOBkFPeQmHEh9XNHsLMnn2exLKvsdDqVyy GQyxzHuv2McuSMNF/M9OT0M+QfwlouhoQ9XnB4sopI67vd640oaiTEa1nobw7+gLlIYc wXvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=TKUrNGaDDSe/H1lFvqM9N1S18Yky0BB1uY/h79EXe00=; fh=Qsitj9rDdFBC6d+kAgGCFuMOpO+ZxYe+/z4DKIEWylo=; b=k9mmQP+DfY1NrV8zC2RbCY7tkjONCHXRJ2Ps5efSYP1gIOd4gkLCft2KxiI9W14af9 AJbH80KW/j267orRBQrCSCFGUWE/Snko5TsY+Ip1+biob2wj1EWkThIXR7hxGBxBRBgw Hc7TbCUXKWKhwNFIeaD8f+ADuBV4PONfa/SpLgb5hv7/R27Kbncw33EwqZbcd+Hsv9RB X1JaAJylmIKYSptrr6hTaD8Gv24wuSMvhhuuDigqBJAxxvhGVkKj9A6kkw+AGIa9Co9a VNDjeqBse3S310Ob/NOJeTQmzvViiV+bnc31TLrBa6QX61AWmBSTUvpV1eFjQXT47SwG Rl4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id s18-20020a170903321200b001c413905d87si658530plh.49.2023.10.31.01.12.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 01:12:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id AF0768051BAA; Tue, 31 Oct 2023 01:12:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233295AbjJaIMK (ORCPT + 99 others); Tue, 31 Oct 2023 04:12:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232480AbjJaIMI (ORCPT ); Tue, 31 Oct 2023 04:12:08 -0400 Received: from SHSQR01.spreadtrum.com (unknown [222.66.158.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2ACC3120; Tue, 31 Oct 2023 01:12:01 -0700 (PDT) Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 39V8BQ6C062104; Tue, 31 Oct 2023 16:11:26 +0800 (+08) (envelope-from Huangzheng.Lai@unisoc.com) Received: from SHDLP.spreadtrum.com (shmbx04.spreadtrum.com [10.0.1.214]) by dlp.unisoc.com (SkyGuard) with ESMTPS id 4SKN5N3bqfz2LVtP5; Tue, 31 Oct 2023 16:06:48 +0800 (CST) Received: from xm9614pcu.spreadtrum.com (10.13.2.29) by shmbx04.spreadtrum.com (10.0.1.214) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 31 Oct 2023 16:11:25 +0800 From: Huangzheng Lai To: Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: Orson Zhai , Baolin Wang , Chunyan Zhang , , , , huangzheng lai , Huangzheng Lai , Xiongpeng Wu Subject: [PATCH] dt-bindings: i2c: Add yaml for Spreadtrum I2C controller Date: Tue, 31 Oct 2023 16:08:20 +0800 Message-ID: <20231031080820.5588-1-Huangzheng.Lai@unisoc.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.13.2.29] X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To shmbx04.spreadtrum.com (10.0.1.214) X-MAIL: SHSQR01.spreadtrum.com 39V8BQ6C062104 X-Spam-Status: No, score=-0.8 required=5.0 tests=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 groat.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 (groat.vger.email [0.0.0.0]); Tue, 31 Oct 2023 01:12:16 -0700 (PDT) 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 +++++++++++++++++++ 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 + +properties: + compatible: + items: + - const: sprd,sc9860-i2c + + reg: + maxItems: 2 + + interrupts: + maxItems: 1 + + clock-names: + items: + - const: i2c + - const: source + - const: enable + + clocks: + items: + - description: Clock specifier for "i2c" in clock-names + - 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 + + "#address-cells": + const: 1 + description: Address cells for I2C device address + + "#size-cells": + const: 0 + description: Size cell for I2C device address + + reset-names: + const: i2c_rst + + resets: + maxItems: 1 + description: Phandle to the reset controller. + +required: + - compatible + - reg + - interrupts + - clock-names + - clocks + - "#address-cells" + - "#size-cells" + +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>; + }; + -- 2.17.1