From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B79EECAAD3 for ; Mon, 19 Sep 2022 16:06:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229592AbiISQGn (ORCPT ); Mon, 19 Sep 2022 12:06:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229563AbiISQGl (ORCPT ); Mon, 19 Sep 2022 12:06:41 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A58CBE3 for ; Mon, 19 Sep 2022 09:06:40 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id i26so47714061lfp.11 for ; Mon, 19 Sep 2022 09:06:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=iE9nxQEFInaL7XSikMpoXTZbHYoCnjZKoSz4CSYOZnA=; b=UAOja/FfrymFuV0xvicbL7PMXuUl4mPyof1Okb0o4luFMO529ZM+SZDfwGKYf+HTMf a/WaNIKZH+CCwzmVfwGBHNgDh6tyEE/4RCYW3s7Xy7CUDsPExVi8yVgN77oSpkFy1wP0 EZDoTz0wXXRlHxsk4U6dtvkL2742ktOiuNpmr9RmscpZCU5Du2ez6apYChpa26SOBuxd 8D5LRWj2h5/EJlkgEmYbAKihkayVc39iPARINK4Y7nQn0Yf6r8U/fwVO+POZ4Tm3kQed Czy0pCZbVQwwyLBIv33YaafZbPlkHahN7hk1BWUO99D62XnnMEsRLm6WG1yXMAoUug8l tELg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=iE9nxQEFInaL7XSikMpoXTZbHYoCnjZKoSz4CSYOZnA=; b=Cw42xYcQxh5akabm462hBSySMZrI+NcJ48M/JING2MV6Wa/TnTrCq043UwI4ZW6WTw xiJJGS1eC6sps1vHseA/1aqCXDeo0nVEXgbkHOFZvIpM0Sp4TedHXk64bmGchwrHEzCc neTkCVSlDWGTLLB95vDfJtRYwnjpTtl/qlvYJvC7/Tk1QAlSxE1VqQLYovhyA0+rlvZw A/tpUowGejV4wf0+dow7zvIgqz1Ru6PbXXpoYoZNbkq7ceJ8G1sS+5oYiNxYa9jUBj80 GlS4esP1jPhMQDSeeO8uZGZscBGQdVsq6KKMcr20yYieNMfbcygg4e91KSQp/NGfDlq5 tilg== X-Gm-Message-State: ACrzQf3Uae6snsvF9ocRkO6UrM3EoYJhlGkkrJouiInB7X5yFYSrffdU mbkBRNbzlyrvNQUyfTdmOdRPcQ== X-Google-Smtp-Source: AMsMyM65h0pq/i+FvwWdh8cUN9HdV6WWDFVY+wFWguOob0zVZcboRCwsVykWpVj97GAsCtp0S9YpTw== X-Received: by 2002:ac2:4bc7:0:b0:49a:dbf7:73e9 with SMTP id o7-20020ac24bc7000000b0049adbf773e9mr5964150lfq.529.1663603598864; Mon, 19 Sep 2022 09:06:38 -0700 (PDT) Received: from [192.168.0.21] (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id t22-20020a2e5356000000b00268b85321eesm3787302ljd.113.2022.09.19.09.06.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Sep 2022 09:06:38 -0700 (PDT) Message-ID: Date: Mon, 19 Sep 2022 18:06:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH v2 1/2] dt-binding: pinctrl: Add NPCM8XX pinctrl and GPIO documentation Content-Language: en-US To: Tomer Maimon Cc: Rob Herring , Avi Fishman , Tali Perry , Joel Stanley , Patrick Venture , Nancy Yuen , Benjamin Fair , Linus Walleij , Krzysztof Kozlowski , =?UTF-8?Q?Jonathan_Neusch=c3=a4fer?= , zhengbin13@huawei.com, OpenBMC Maillist , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , devicetree References: <20220714122322.63663-1-tmaimon77@gmail.com> <20220714122322.63663-2-tmaimon77@gmail.com> <20220718211046.GA3547663-robh@kernel.org> <3981e6e8-d4bb-b13d-7aaa-7aea83ffaad9@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On 19/09/2022 16:31, Tomer Maimon wrote: >>>>> +examples: >>>>> + - | >>>>> + #include >>>>> + #include >>>>> + >>>>> + soc { >>>>> + #address-cells = <2>; >>>>> + #size-cells = <2>; >>>>> + >>>>> + pinctrl: pinctrl@f0800000 { >>>>> + compatible = "nuvoton,npcm845-pinctrl"; >>>>> + ranges = <0x0 0x0 0xf0010000 0x8000>; >>>>> + #address-cells = <1>; >>>>> + #size-cells = <1>; >>>>> + nuvoton,sysgcr = <&gcr>; >>>>> + >>>>> + gpio0: gpio@f0010000 { >>>> >>>> gpio@0 >>>> >>>> Is this really a child block of the pinctrl? Doesn't really look like it >>>> based on addressess. Where are the pinctrl registers? In the sysgcr? If >>>> so, then pinctrl should be a child of it. But that doesn't really work >>>> too well with gpio child nodes... >>> the pin controller mux is handled by sysgcr this is why the sysgcr in >>> the mother node, >>> and the pin configuration are handled by the GPIO registers. each >>> GPIO bank (child) contains 32 GPIO. >>> this is why the GPIO is the child node. >> >> Then maybe pinctrl should be the sysgcr and expose regmap for other devices? > The pin controller using the sysgcr to handle the pinmux, this is why > the sysgcr is in the mother node, is it problematic? You said pin-controller mux registers are in sysgcr, so it should not be used via syscon. Please provide address map description to convince us that this is correct HW representation. Best regards, Krzysztof