Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp622147rwo; Wed, 2 Aug 2023 01:08:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlFYiWqTD/D7S9PMjDbwE9QJ0+1FGlByrXE8Duw+1I98757scdD9c3+lmJwNmGlWJX5wQyZi X-Received: by 2002:a05:6808:1a8e:b0:3a7:2487:e04a with SMTP id bm14-20020a0568081a8e00b003a72487e04amr10244794oib.46.1690963695485; Wed, 02 Aug 2023 01:08:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690963695; cv=none; d=google.com; s=arc-20160816; b=MXHXB35wuB9h7H3D78l+ktLObiWx250XGjffIIh+bTE0lmu1wwvlH0t+SEoF+5w7Tv eBwDacNDavI1WsFpKBjslKaUxRQuN9+IkvjYqZIUxrTfaUyOX7nkq/amnKXfP1WdsVL8 YyxoHYXWHIaKESDriBiNlonGP0aJIS2qpwcHWKRAQjcYRBw96JFkswh7kE+pLLSKzYpu OFfdW/X0Ljt1UEyYUa6L1G15UlgjEnkFyXpTNG6gonpd1BKJgfWrj2LVA2HVH8auGR37 L7r18CvA1dU1VQzhZfa752XdEu6RtzYwA2LzKxhEaQJQ1rLaXGwmVx/Z8Eo62XXVrWZF 7Rsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=MS9NR9NyW2l5ZRNfVnwcReozQ35YAEGcb8RhhHsTULc=; fh=lo1mUL/IWogdu11EyHA0ZE60b7McUfnPbZ+1viknJo4=; b=NC25gJxBMaygK3Ox/S0uW7BrSbxRgwyFqBfJL68k0qmyOTnblSMebOyrfMT1kvqYEr WpotyWkTF/SdDzeaYsaV7YVCdOTasryT9fIPtSj43BiCaDw5kYBoI+QRRx9HC9bWqBeh xLw+vguBIKjvEeFupn1JkaNHnX01oEYKqrGlDxM+8+mg6RaTj6RgU8bqK2P8hcZ20spv VLOIqgZUpz5I2pdzvHF4fPs3+0XCL4fZVs5o28G7ytF1rbGNzptHc3JOC8oiQ3JfmpVC Q2HRFVErl/HIq/kWsnfBuFGttK7fxWNukb2vPLHv4FJKXhLrvg1O5kQVRAwA/iBl1KtV kfQg== ARC-Authentication-Results: i=1; mx.google.com; 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 a4-20020a630b44000000b005347c4d09ddsi10220116pgl.678.2023.08.02.01.08.02; Wed, 02 Aug 2023 01:08:15 -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; 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 S232454AbjHBHsH (ORCPT + 99 others); Wed, 2 Aug 2023 03:48:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232005AbjHBHrY (ORCPT ); Wed, 2 Aug 2023 03:47:24 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0C47B5599; Wed, 2 Aug 2023 00:44:22 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.201]) by gateway (Coremail) with SMTP id _____8AxTetUCcpkWccOAA--.29284S3; Wed, 02 Aug 2023 15:44:20 +0800 (CST) Received: from [10.20.42.201] (unknown [10.20.42.201]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cx_c5RCcpkd0hFAA--.48568S3; Wed, 02 Aug 2023 15:44:18 +0800 (CST) Subject: Re: [PATCH v2 1/2] gpio: dt-bindings: add parsing of loongson gpio offset To: Conor Dooley Cc: Conor Dooley , Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jianmin Lv , wanghongliang@loongson.cn, Liu Peibao , loongson-kernel@lists.loongnix.cn, zhuyinbo@loongson.cn References: <20230731091059.17323-1-zhuyinbo@loongson.cn> <20230731091059.17323-2-zhuyinbo@loongson.cn> <20230731-setback-such-61815ee3ef51@spud> <041bf8a6-8d91-c2ce-6752-aa7255f946c7@loongson.cn> <20230801-whenever-imitation-b2759b212f6b@spud> <20230801-varsity-chemo-09cc5e250ded@spud> <26adb487-f8c5-9cf4-5b31-070e9161e761@loongson.cn> <20230802-jailer-pavilion-84fb17bb3710@wendy> From: Yinbo Zhu Message-ID: <3534f7b9-0e02-28c1-238a-5a6fdbb95e94@loongson.cn> Date: Wed, 2 Aug 2023 15:44:17 +0800 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20230802-jailer-pavilion-84fb17bb3710@wendy> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8Cx_c5RCcpkd0hFAA--.48568S3 X-CM-SenderInfo: 52kx5xhqerqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7 ZEXasCq-sGcSsGvfJ3UbIjqfuFe4nvWSU5nxnvy29KBjDU0xBIdaVrnUUvcSsGvfC2Kfnx nUUI43ZEXa7xR_UUUUUUUUU== X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 在 2023/8/2 下午3:22, Conor Dooley 写道: > On Wed, Aug 02, 2023 at 09:38:34AM +0800, Yinbo Zhu wrote: >> >> >> 在 2023/8/1 下午11:54, Conor Dooley 写道: >>> On Tue, Aug 01, 2023 at 04:34:30PM +0800, Yinbo Zhu wrote: >>>> >>>> >>>> 在 2023/8/1 下午3:23, Conor Dooley 写道: >>>>> On Tue, Aug 01, 2023 at 02:39:49PM +0800, Yinbo Zhu wrote: >>>>>> >>>>>> >>>>>> 在 2023/7/31 下午11:55, Conor Dooley 写道: >>>>>>> On Mon, Jul 31, 2023 at 05:10:58PM +0800, Yinbo Zhu wrote: >>>>>>>> Add parsing GPIO configure, input, output, interrupt register offset >>>>>>>> address and GPIO control mode support. >>>>>>> >>>>>>> This reeks of insufficient use of SoC specific compatibles. Do GPIO >>>>>>> controllers on the same SoC have different register offsets? >>>>>> >>>>>> >>>>>> Yes, >>>>>> >>>>>>> Where are the users for this? >>>>>> >>>>>> >>>>>> For example, ls2k500 contains multiple GPIO chips with different >>>>>> (configure, input, output, interrupt) offset addresses, but all others >>>>>> are the same. >>>>> >>>>> Right. That's admittedly not what I expected to hear! Can you firstly >>>>> explain this in the commit message, >>>> >>>> >>>> I will add following explain in the commit message. Do you think it's >>>> suitable? >>>> >>>> Loongson GPIO controllers come in multiple variants that are compatible >>>> except for certain register offset values. Add support in yaml file for >>>> device properties allowing to specify them in DT. >>> >>> Sure, that would be helpful. >>> >>>>> and secondly add a soc-specific >>>>> compatible for the ls2k500 and only allow these properties on that SoC? >>> >>>> Sorry, I may not have described it clearly before, the ls2k500 was only >>>> as a example, actually, Loongson GPIO controllers (2k500,2k1000,eg)come >>>> in multiple variants that are compatible except for certain register >>>> offset values. So above all offset device property was used to in all >>>> loongson gpio controller. >>> >>> But it would be good to know why they are different. Do they each >>> support some different features, or was there some other reason for >>> making controllers like this? >> >> >> There are no other reasons, just differences in these offset addresses. > > Huh. Do you have a link to a devicetree for the ls2k500? Yes, there was a link about ls2k500 dts, but that ls2k500 dts has not yet added a gpio node. this gpio node will be added later. Thanks, Yinbo