Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1888172rwb; Fri, 11 Nov 2022 01:44:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf6vTQfCdacMO8zU6KG2O8lFH8HlT5JYn5IC1Zn11LbIpS590T3pfxs/Kfw4P9wA+hKpzEcn X-Received: by 2002:aa7:d90f:0:b0:461:ac11:2df6 with SMTP id a15-20020aa7d90f000000b00461ac112df6mr729671edr.284.1668159876612; Fri, 11 Nov 2022 01:44:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668159876; cv=none; d=google.com; s=arc-20160816; b=HilVfZBAnpG0fAJ9/y1qHvo3IQG3kBQCwZEBmU7NqaFzOSgSDFD+06YRk4Sav+9cPR qUoY2a8gOyJCp19ZS776jiS72WHVJHLgAMRRB1vHYo4AE1kH6GagKhDIlfCMvBeqoaP3 OrbUAd4aKW6Z+2Sa6wxHQo2jmB43rloySzaZsp9DypXryYCbhs8c+IfMbAoobquPMDpm KS2LCo2c9t9RJ0NpNBpGwVnZKfEwSnTXngbYELsPFqwuuTeKxBQPeCyyFcP21gSL88I4 DJXZyjx/Ep6ndH8QZFGfcHdKWH/igbN7NkHvsSS1yKyCQfaZ45sgqz1S8h1XWzvBaeM5 2XUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=VcplOxG0knUnUxNr+LPhGG5rifvaq3v/b4kjjm7Hk9U=; b=bndkX1Yjrv/4ulPV1V2ZY7jFEhMsrXW7ILoz84XKihdruzYH5X6XQn+JJKo3YIPVE8 Pwx2GNByiXecqd+HRVECeD1MbP3VQUlczA2WNAkr3kygyEsI3+4/pZYc+4beFhBxPA6k rCpRhDemFCU5Ctl68p7WhbO35dAaPezEQl8bHyGOvoRAqHwvMsesZuuYb8tAT71YOUhP 0t4Q40iXC2aFljUQ/gpLRjTnpl+2NUp1IAU3UT0aVmqPBhgV22nz8ujnKhI117WHnnG9 PFdEtIIfOib05pqXb57t7oZP8TqiqfZfW24PmJ4Q+uW94moWs6YvGgYDl0D0Ncj1PUDf asJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=gMWqAgtl; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dt13-20020a170907728d00b0078db18d796dsi1670776ejc.982.2022.11.11.01.44.14; Fri, 11 Nov 2022 01:44:36 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=gMWqAgtl; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233354AbiKKJaa (ORCPT + 92 others); Fri, 11 Nov 2022 04:30:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233449AbiKKJa2 (ORCPT ); Fri, 11 Nov 2022 04:30:28 -0500 Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6967AD48; Fri, 11 Nov 2022 01:30:27 -0800 (PST) Received: by mail-qt1-x82b.google.com with SMTP id c15so2402399qtw.8; Fri, 11 Nov 2022 01:30:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VcplOxG0knUnUxNr+LPhGG5rifvaq3v/b4kjjm7Hk9U=; b=gMWqAgtlwha7T0RuWBUIAhI8hmWUr58eKaXkF867nIpBNQBPjol+/ErwjP9ZEiZDS5 OxkyhvY64ZJt5QGK4qGoF0r1Bnol5QeE0dpZJ0xA5soNX8RacKIVeQXfZuB7/vx80fLb ylGeQv7DAMBFa8EfYdlk/yrwHIe+NRU02Rrykj/bFOkr0/D6LHT+17C2abxOmttGhsrW zeqtIBo8xm5MTPznLqui3aL8/fthEGYH+FR434zi3D9/E0JDssTjODasKNwrLcnBmEtT M87E/kPleNKORbDL5ADhi2VlHUBvuO9wg95K7/LrgDcdm4Jk0MVOwyg0t9c7lHCyfso3 RM5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VcplOxG0knUnUxNr+LPhGG5rifvaq3v/b4kjjm7Hk9U=; b=bVuB1rrQdl8v9IJr4cWwxgnAn38gOWD2qs4i9jVC8Vo1xGGLm5c3BvJdhArY4t0O9i bZ1B/Ihvi1sCFsXd7O/7gfqFHzQWemeUpFwUenIp6RMRwOtOa1Pl2sCNfL4RvPkovFMY oCVuV/hD2hgmUmp1e8Dn33OBXBjZiV6MlAEAHtRMrPlDSEy2VMzBolBXfAw7PADtfCIe kTCwnd39jcYpG3ZisA146O4zBZRlvx7+MNJEj4d2aTgyLYkN8troxEbP+eu39wOlt3Ch UxJaURGPgzsTAwIIrZAltfvyrirZ+T9MbFQ6fNQtVbqS2C31nhflMU55L2s7RvskH/aT 4xEA== X-Gm-Message-State: ANoB5pkowfLd8HBQ05k1V7SG6KUKaiP82sb/nXJK9p7+uPxh1Qn50Szi 1Wvt+UlvKoTSvaQBGWeFEftRQMPaUh0pdMtbZYk= X-Received: by 2002:ac8:6905:0:b0:3a5:8423:ebb7 with SMTP id bt5-20020ac86905000000b003a58423ebb7mr508480qtb.593.1668159026522; Fri, 11 Nov 2022 01:30:26 -0800 (PST) MIME-Version: 1.0 References: <20221108092840.14945-1-JJLIU0@nuvoton.com> <20221108092840.14945-4-JJLIU0@nuvoton.com> In-Reply-To: From: Jim Liu Date: Fri, 11 Nov 2022 17:30:15 +0800 Message-ID: Subject: Re: [PATCH v2 3/3] dt-bindings: gpio: Add Nuvoton NPCM750 serial I/O expansion interface(SGPIO) To: Linus Walleij Cc: JJLIU0@nuvoton.com, KWLIU@nuvoton.com, brgl@bgdev.pl, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, openbmc@lists.ozlabs.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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 Linus and Krzysztof This is a special feature of npcm750. it's not a normal gpio. It's similar to aspeed sgpio. The spec as below: The full name is "serial I/O expansion" interface. The NPCM7xx and NPCM8xx include two SGPIO modules. This interface has 4 pins (D_out , D_in, S_CLK, LDSH). Each module includes eight input ports and eight output ports. Each port can control eight pins. Input ports only can be input ,output is so on. So support up to 64 input pins and 64 output pins. -S_CLK: The clock is generated by APB3, so users can set the bus frequency and the driver will set the spgio divided reg to generate a similar clock to sgpio bus. -D_out: the output data is the serial data needed to connect to hc595 and the data will output to hc595 parallel pins. you can use dts nout_gpios to create the number of pins. -D_in this pin need to connect to hc165 and get the serial data from hc165. you can use dts nin_gpios to create the number of pins. LDSH: this pin is used to get input data or send output data. the user can't control this pin. one operation cycle is include input and output beginning the signal, the LDSH is low and now will send output serial data , after finished output serial data the LDSH will be high and get serial input data. If you have any questions or are confused please let me know. Your comments are most welcome. Best regards, Jim On Wed, Nov 9, 2022 at 5:14 PM Linus Walleij wrote: > > On Tue, Nov 8, 2022 at 10:29 AM Jim Liu wrote: > > > + nin_gpios: true > > + > > + nout_gpios: true > > My comment from v1 still holds. > I'd say just drop these two, it's too much trying to protect > the users from themselves. > > > + bus-frequency: true > > Given that you have clocks already, what does this actually specify? > Which bus? The one the GPIO is connected to? Why is it different > from the frequency from the clocks? And what is it used for, why does > it need to be specified? So many questions. > > A description is necessary. > > I guess the : true means it is picked up from the core schemas somehow > but that doesn't make me smarter. > > Yours, > Linus Walleij