Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp674835rwo; Wed, 2 Aug 2023 02:13:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlGWpO9B84uUqYNKhXptEnNDKhmhFrf+UzVCMJw/PrlhmTwUzIGFnyABmXf+SZ44unYNWxa+ X-Received: by 2002:a05:6402:643:b0:522:214c:516 with SMTP id u3-20020a056402064300b00522214c0516mr4107949edx.42.1690967608136; Wed, 02 Aug 2023 02:13:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690967608; cv=none; d=google.com; s=arc-20160816; b=t6ujjNZkdyFkyJuCjeFRxqKV3C17b5JAql/bRRV3pOP6FLTmA2BDa4Y/wb8tJJaytv Au+wyGd5p+PLyax8dh/O359sCes6RRfKiG1lGdu3NsgJhN6P1jBknDMsbNlMRg0PrE+L 1ZSUixt6xYcYBkd/TgKdG/JqWNE2FDjWRhRon21Yx7zKN27e6qBmZ4myXeY0zZLnbhfn CkSH1kV/c9XjjxSAqGRhtZv5PHcB373tp/t/2jOY+jrQd/gd2SvURT68gGoStO0xe21t 8CN3qh+TmDGsbd8FcH9MEqOPO8dGbV/5mI//+hjkieMQZZMgjRGPhy6Dp5XUJ4vWIk4i e99w== 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=qYJ/mQwkIsGLV8BK6zsNDV8woRik3o4GHxVYtZOef18=; fh=lo1mUL/IWogdu11EyHA0ZE60b7McUfnPbZ+1viknJo4=; b=msRDJFywixqfOWJq63/gVlYjeHAzIfYNdaiy2qiR0M6E3OIhjtrORdAXHdIrmkBrIi tfzPaTaw9/pLlS7uDi6I4L4MxotQm6zBCCnC+ndaHl6B+3W9YC0HMjjQnkfuBVnHQJA4 6aXUVWjtUFlSmo7jLyz6uq6vlESEIv8WEAjGCD+y5g+42wOaW2+IcVLQZpHfybEQuk0j ylXPPRLaZnQBsoWhq5hoaHLO1vK0+o5ypgbCIy+Qo/XWeRcVbF4P2VAoyLEGlS9X/dsc rRtco32Sn+No7Vci+4d5rJUPgH7q5kjEpqbEoruJQwk13RjvIhf3s5wnmxuWlSkgx3ml CgzA== 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 l27-20020a056402345b00b0052026a148cesi286310edc.44.2023.08.02.02.13.01; Wed, 02 Aug 2023 02:13:28 -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 S233394AbjHBIiB (ORCPT + 99 others); Wed, 2 Aug 2023 04:38:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232468AbjHBIiA (ORCPT ); Wed, 2 Aug 2023 04:38:00 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3C751A8; Wed, 2 Aug 2023 01:37:57 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.201]) by gateway (Coremail) with SMTP id _____8BxY_DkFcpk084OAA--.34853S3; Wed, 02 Aug 2023 16:37:56 +0800 (CST) Received: from [10.20.42.201] (unknown [10.20.42.201]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxLCPeFcpk1V1FAA--.29839S3; Wed, 02 Aug 2023 16:37:54 +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> <3534f7b9-0e02-28c1-238a-5a6fdbb95e94@loongson.cn> <20230802-bunkbed-siamese-57ee53bdf273@wendy> From: Yinbo Zhu Message-ID: Date: Wed, 2 Aug 2023 16:37:50 +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-bunkbed-siamese-57ee53bdf273@wendy> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8CxLCPeFcpk1V1FAA--.29839S3 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:50, Conor Dooley 写道: > On Wed, Aug 02, 2023 at 03:44:17PM +0800, Yinbo Zhu wrote: >> 在 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: > >>>>>> 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. > > You must have something that you used to test with, no? I don't mind if > it is not a patch, but rather is some WIP - I'd just like to see user of > the binding :) yes, I have a test, for 2k0500, that gpio dts as follows: gpio0:gpio@0x1fe10430 { compatible = "loongson,ls2k-gpio"; reg = <0 0x1fe10430 0 0x20>; gpio-controller; #gpio-cells = <2>; interrupt-parent = <&liointc1>; ngpios = <64>; loongson,gpio-conf-offset = <0>; loongson,gpio-out-offset = <0x10>; loongson,gpio-in-offset = <0x8>; loongson,gpio-inten-offset = <0xb0>; loongson,gpio-ctrl-mode = <0x0>; ... } gpio1:gpio@0x1fe10450 { compatible = "loongson,ls2k-gpio"; reg = <0 0x1fe10450 0 0x20>; gpio-controller; #gpio-cells = <2>; interrupt-parent = <&liointc1>; ngpios = <64>; loongson,gpio-conf-offset = <0>; loongson,gpio-out-offset = <0x10>; loongson,gpio-in-offset = <0x8>; loongson,gpio-inten-offset = <0x98>; loongson,gpio-ctrl-mode = <0x0>; ... } Thanks, Yinbo. >