Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1421234pxj; Sat, 8 May 2021 17:29:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNhnUm6232n/EPKu+HEkead21//yAYvSLP1MyIEBexv4Z3U/8UEDXLzGJ8mra6PklFrspo X-Received: by 2002:a5d:9619:: with SMTP id w25mr13316644iol.2.1620520144669; Sat, 08 May 2021 17:29:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620520144; cv=none; d=google.com; s=arc-20160816; b=1B1qHduFk9WmU81xxrJJp8DlLFvVsiauRsJ2/TMxwZ71Nq4dwy4/uIIV9NrBOvC42B pnNcP4A2Qd6ubm2DqTK7GDqtSZCIiTF3LlPafQ+JC+NZNqCxuRHdTi7Of6Be7Mzjo8D7 Y/+ZMqgvUfgt+znHR06sqijTBCkMEfwhisNgInL6tBHQr8tXRHr/AIqJ2iTUkvJylo7I I7cxihr5kSgdTMfzO/8RgQKORHWIhbfIhjBjRhQLbtE8YJ/eGrlVWv9uD6B8pHn/wOgM ezJVDc4G7b6o/lyNHqx2Kh2h9xBGabR6o/Irisj24COuJn3TuCvZl2UsJ8tRwznAi7ac eu0g== 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=sOG7GoczpFfze5AyMT4RluOASRTehzGf0LNWttOKk5c=; b=Cp0wz1kop0D9o6X4mxOEqYqsrvFeDTJ9Fm06bOPGD0OtT06rcdULL/eXGoFNXpZl5e 75mmF/0GvLV2BTV9qYCK0MS23v8GB6i6a0E0SL1p4prcEv8dAztTvUgwIZv71YM5J/F1 dOEm8F/p1aoZnt44LKtrD75v1ZfzXALt7NG/eDUUt3xusbdvS3WcXPOj4PTg9oh1X1mR bXh55OmRnoob7ZeRjResDdWjglJFTDsDYgBnVD047Yiwjn2Duqrgdf9gqP3qb7sgtmeh Se5ZgFvMIavF1OiVaYcxSnPSrlqg0BJn/lfxgLEO209uJBBzaSM3qpLiAYCCFA1hGsWn k/fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="fd/VQghy"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c13si12197901ilq.55.2021.05.08.17.28.51; Sat, 08 May 2021 17:29:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="fd/VQghy"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229601AbhEIA26 (ORCPT + 99 others); Sat, 8 May 2021 20:28:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229594AbhEIA25 (ORCPT ); Sat, 8 May 2021 20:28:57 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1602C061573 for ; Sat, 8 May 2021 17:27:52 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id o16so16339296ljp.3 for ; Sat, 08 May 2021 17:27:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sOG7GoczpFfze5AyMT4RluOASRTehzGf0LNWttOKk5c=; b=fd/VQghyl1il11WcKIahjTpti38ABPOV+dWJY++N6qi+RgRaK1GW8Sk7C+ltz/7Xga z0doL14X6Ldz+/jney8rR8LcRGt+D2mcXm9tdfOGM6mOugc45rNXotg+pcpI6ZU/Tuex uG4xC2vISLas1g8vYAfDvc/8Vwhd6Rdc/JSw5APFXzlTg+j3aXEKzb2YGGeHPcTbK+Zz qaDpZ7G34rsLW5ylHIuAe5pKPqjvDpmVNXKM8lnDzNkxYjZWOua/S1Cml+oCCo6j343y cKeiz60axq1J9KfnYqCtYJfJxfVXxyJ1JA0Pl6fAzDQdiOBkEMgO3cW4jlJ4Mn16HamA RMng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sOG7GoczpFfze5AyMT4RluOASRTehzGf0LNWttOKk5c=; b=El3MLm7zI8toZC3woiH6pv/h6+Ti/Z5ysBRuj+YJwEvudY+dc+E95WBHAiyv7/jNpH ToWl9UG02zkgccpHpRSf0OicO6VBgemNm8XYMzSdP3F3kMLB8gNEKh8P6TTqFt9SjORR aSSTjSW0CwYynG67/ECOxsoE3NRHp+L5N0AvJjk7imiB9/ofqCPyDkdlNEIFOWptDM3k nGFG3pK1HQXwxZPpaGgJkzz5Ho1qL3TUlbnNXACj6w1vbok0U2xJrCZJj4UiibQOJk1k pGzh4tyVorHmIuvaChlEDQBAibxX1+BySdmcZbcWBuVFLsFck3KGwv5l5NQ19DoeOnNW A/Iw== X-Gm-Message-State: AOAM533mHUaBSAhIOpx3O6IBczx4zZfLEoOayTIqxkv1i7PNNfpImAEX bBVQokBlny0eFFz+AOXATlEaHfeiDvlRoDk5+u1ttA== X-Received: by 2002:a2e:22c3:: with SMTP id i186mr5939134lji.273.1620520071392; Sat, 08 May 2021 17:27:51 -0700 (PDT) MIME-Version: 1.0 References: <20210508142000.85116-1-kettenis@openbsd.org> <20210508142000.85116-2-kettenis@openbsd.org> In-Reply-To: From: Linus Walleij Date: Sun, 9 May 2021 02:27:40 +0200 Message-ID: Subject: Re: [PATCH 1/2] dt-bindings: pinctrl: Add DT bindings for apple,pinctrl To: Mark Kettenis Cc: kettenis@openbsd.org, Krzysztof Kozlowski , Tomasz Figa , Marc Zyngier , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Hector Martin , Rob Herring , Linux ARM , "open list:GPIO SUBSYSTEM" , linux-kernel , Bartosz Golaszewski , sven@svenpeter.dev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 9, 2021 at 1:02 AM Mark Kettenis wrote: > [Me] > > On Sat, May 8, 2021 at 4:20 PM Mark Kettenis wrote: > My U-Boot driver is here: Thanks! Looks nice. > > > +description: | > > > + The Apple GPIO controller is a simple combined pin and GPIO controller > > > > spelling > > Not sure I'm seeing a spelling mistake here. Do you want a comma > inserted somewhere? Your original mail says "conroller" but the helpful google mail editor autocorrected the mistake when I hit enter after it. > > So is this an entirely Apple thing now, and not based on some Samsung > > block from S3C like what we have seen before? > > As far as I can tell, yes. This Apple controller has a single > register per pin that controls the muxing and gpio functions, whereas > the S3C controller seems to have 4 registers per pin. Fair enough. > > What I am really wondering is if these interrupts are hierarchical, > > i.e. that they match 1-to-1 to a GPIO line. > > They don't match 1-1. The GPIOs can be assigned to one of > (apparently) 7 interrupt groups. Aha so it is a 1-to-1..* thing. How delicate. > I haven't looked to closely at this > yet since U-Boot doesn't need/use the interrupt capability. But I > suspect that pins don't have to be assigned to a interrupt group and > that explains why there are only 7 interrupt groups as the 8th state > is reserved for "unasigned". The number of pins per controller > varies, but one of them has 212 pins. Wow. > Multiple pins can be assigned to the same interrupt group as far as I > can tell. So in that case the driver will have to look at status > bits. OK then this is not hierarchical. > > Marc Zyngier can probably tell the story of why it is handled > > like this, > > Ok, hopefully Marc can say something sensible here, but I'd say the > interrupts on this hardware are cascaded. Yes looks like so, it will be an interesting interrupt driver when you get to that. I have only the question in my second mail (just sent) but in any case you are not doing anything out of the ordinary (it looks very similar to the STM32) so I'm pleased with this binding. I wanna give the DT reviewers some time to look at it as well but I imagine we can soon merge this. Yours. Linus Walleij