Received: by 2002:ac0:b7d5:0:0:0:0:0 with SMTP id v21csp118959ime; Thu, 28 Jul 2022 19:33:53 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s+FqwB/hAQUg6prcgql82MWZCjZcxU9avm5NMpBF0+vu0lkgha1+haEVtmihr/eKQyvrFP X-Received: by 2002:a17:906:8a4d:b0:72b:6b8d:3779 with SMTP id gx13-20020a1709068a4d00b0072b6b8d3779mr1216267ejc.759.1659062033035; Thu, 28 Jul 2022 19:33:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659062033; cv=none; d=google.com; s=arc-20160816; b=F2tigH9Xi83aDZgy3eMyayL53Yi9w9UjEBn84WE6zDkp91ctaEJRhNgL8LHNTCukqN OAtxrB4B4oz7C57JGbbj/4IAfb1VqrxtHXHKYybgJTDkbxTPvU45Pp0fLRz7egw6Kgyl kQJrLzRvU170HVJhqTpFhKXJDE6nsShaN+VVRE98nUng3SVfKMXR3RqL0Wsrt2NZNq7j mOei8SRWbX2kMvKdx/3F5z3eZw8IEqU/vQljnmBkVMqsRFl5peKB4UCW21T2X3HHra1U LI1QrUZenUPsBZgxve3rbnHmpYhDsY+Gy/jVdxp5kkH+pYU/DEf6Ojio7h/LE7hr0/ez UjHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=iM6rPyrBSSv1gLxYpyLmgkE2Xy8DoM8IAvlqobbDAXc=; b=fgoXn8JrEpclcIGBSpp6eZGurSFfbBPTim7Yh+oTkxooLsB3b1ljS3Rmx5aOqdPI1V LNN1XoAufd1txSF5U2Fo6rUZpUD5Cd+YPKwZFv9DmMdslLGlS4Qy/4Q1H5CK4nbT1Rik DP1HpogX7QiHaew3A8pAc/ePBJi87OfvSN1YSDyD6b1bt41G/YJAvpBR59zCOq2JR5WG T16H5gd+BzGFYWsh1Upl8PUpzPGkYYyZsrPuEy5hH2GffQHl+YnMI9n7CVuAsWyM8uJC iaXF7Hmssu0Vhj4U0bm5Gm3dpBlngMvMrSNBwWv203/evC4vYo6R9jjyGXgtb86/06DV zcyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aj.id.au header.s=fm2 header.b=CV1+kb4O; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="DRkTB/VZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n9-20020a170906688900b007276779b9dfsi1842349ejr.599.2022.07.28.19.33.28; Thu, 28 Jul 2022 19:33:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@aj.id.au header.s=fm2 header.b=CV1+kb4O; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="DRkTB/VZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233933AbiG2C3I (ORCPT + 99 others); Thu, 28 Jul 2022 22:29:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233806AbiG2C3D (ORCPT ); Thu, 28 Jul 2022 22:29:03 -0400 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C69027B354 for ; Thu, 28 Jul 2022 19:28:59 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 48E885C0131; Thu, 28 Jul 2022 22:28:56 -0400 (EDT) Received: from imap50 ([10.202.2.100]) by compute3.internal (MEProxy); Thu, 28 Jul 2022 22:28:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; t=1659061736; x=1659148136; bh=iM6rPyrBSS v1gLxYpyLmgkE2Xy8DoM8IAvlqobbDAXc=; b=CV1+kb4OZ1C7Wm9O6iLUtPTOIl zmskcBwCvUteypiQ8aL60+UYIViyoFa4W9WtXGHJQ/JJeB+4EPhdPUtbps3cE2p0 4vO+hjlPPHKdWQaPw7qJHAaz+IPlNpnVebtCO4YFC2IyrHKxKm0ADDk3LzNtaI5a KUXeVECr4jECJWSfIWT9voeFOU4K9sr5AzY+OLhlrrZWA05t5SORhxpdmqPfiZM5 9rKT2iyp8cwKbipXPbZFrehQAuo5Xu68e9lJEELQ1HPYq/R6qIhrg4/nJTg3OgKR zslV9DhUTcX6RvexiEVXp/H7tSgsdSva/NVbALVnvtqBkSKC1zoLHB8yf99Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1659061736; x=1659148136; bh=iM6rPyrBSSv1gLxYpyLmgkE2Xy8D oM8IAvlqobbDAXc=; b=DRkTB/VZ0ruLb6K7zvJIhVX53t4JvtxE06k/xe2d2Xvb mf+W5KWfA6n1K12sGCb4HNeUJ+xKd3bxR+SMpJH1FEaL/PLXJIZobO5ufjI44h9Y V+ptcYRB0kb9FIR01nrJZKIjHmr0qNh8Nu+vBCtgVfn9l9xnT2L8w9y+BmVGJjX8 0rUXKsFzCquuxwBfFJZgKEsZmHZY9WlEAwpgVQBDBcvy5y+gJF8tbuQVWxIy6eI6 man3aXDCKTYYT84CS5RlvMsrYMzoneLoYG8F/V+ZvkehykeI6KvbvSosaZWX5EYu mxFd/iLSJ5kLxQxD1UlmJAcKOg00trEuXZDsL4pIZA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdduiedgtdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehn ughrvgifucflvghffhgvrhihfdcuoegrnhgurhgvfiesrghjrdhiugdrrghuqeenucggtf frrghtthgvrhhnpeeffeejgfefieetueeffeeiiedthffghefhtdffveegudegffduuddt hfelleeludenucffohhmrghinhepuggvvhhitggvthhrvggvrdhorhhgnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvgifsegrjhdr ihgurdgruh X-ME-Proxy: Feedback-ID: idfb84289:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id DCEE21700083; Thu, 28 Jul 2022 22:28:54 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-758-ge0d20a54e1-fm-20220729.001-ge0d20a54 Mime-Version: 1.0 Message-Id: <5d863bc1-4f27-48b6-89ab-c3f02bc09057@www.fastmail.com> In-Reply-To: <20220516064900.30517-3-ryan_chen@aspeedtech.com> References: <20220516064900.30517-1-ryan_chen@aspeedtech.com> <20220516064900.30517-3-ryan_chen@aspeedtech.com> Date: Fri, 29 Jul 2022 11:58:34 +0930 From: "Andrew Jeffery" To: "Ryan Chen" , "Joel Stanley" , "Philipp Zabel" , linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org Cc: BMC-SW@aspeedtech.com Subject: Re: [PATCH v3 2/3] dt-bindings: i2c-ast2600: Add bindings for AST2600 i2C driver Content-Type: text/plain X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ryan, On Mon, 16 May 2022, at 16:18, ryan_chen wrote: > AST2600 support new register set for I2C controller, add bindings document > to support driver of i2c new register mode controller > > Signed-off-by: ryan_chen > --- > .../bindings/i2c/aspeed,i2c-ast2600.ymal | 78 +++++++++++++++++++ > 1 file changed, 78 insertions(+) > create mode 100644 > Documentation/devicetree/bindings/i2c/aspeed,i2c-ast2600.ymal > > diff --git > a/Documentation/devicetree/bindings/i2c/aspeed,i2c-ast2600.ymal > b/Documentation/devicetree/bindings/i2c/aspeed,i2c-ast2600.ymal > new file mode 100644 > index 000000000000..7c75f5bac24f > --- /dev/null > +++ b/Documentation/devicetree/bindings/i2c/aspeed,i2c-ast2600.ymal > @@ -0,0 +1,78 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/i2c/aspeed,i2c-ast2600.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: AST2600 I2C Controller on the AST26XX SoCs Device Tree Bindings > + > +maintainers: > + - Ryan Chen > + > +allOf: > + - $ref: /schemas/i2c/i2c-controller.yaml# > + > +properties: > + compatible: > + enum: > + - aspeed,ast2600-i2c The original driver uses e.g. aspeed,ast2500-i2c-bus for the subordinate controllers. While the register layout changes, I'd prefer we try to use the existing compatibles rather than introducing a new set and causing some confusion. Further, what you're proposing here is effectively being used to select the driver implementation, which isn't the purpose of the devicetree. My preference would be to reuse the existing compatibles and instead select the driver implementation via Kconfig. Or, if we can figure out some way to do so, support both register interfaces in the one driver implementation and fall back to the old register interface where the new one isn't available (I don't think this is feasible though). > + > + reg: > + minItems: 1 > + items: > + - description: address offset and range of bus > + - description: address offset and range of bus buffer > + > + interrupts: > + maxItems: 1 > + > + clocks: > + maxItems: 1 > + description: > + root clock of bus, should reference the APB > + clock in the second cell > + > + resets: > + maxItems: 1 > + > + bus-frequency: > + minimum: 500 > + maximum: 2000000 > + 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 > + #include > + > + i2c_gr: i2c-global-regs@0 { > + compatible = "aspeed,ast2600-i2c-global", "syscon"; > + reg = <0x0 0x20>; > + resets = <&syscon ASPEED_RESET_I2C>; > + }; > + > + i2c0: i2c-bus@80 { > + #address-cells = <1>; > + #size-cells = <0>; > + #interrupt-cells = <1>; > + compatible = "aspeed,ast2600-i2c-bus"; This isn't quite right with respect to your binding description above :) Andrew