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 X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9251BC433ED for ; Tue, 18 May 2021 13:49:55 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0F80F611AD for ; Tue, 18 May 2021 13:49:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F80F611AD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wRAlJBg4gx98y6+efoppO7L2H9YsI/QpOwOeBHjlaTc=; b=S+j5/EQuGZ9npKpsvkbjefiXt /Thy5FeMZwDUIQaSnEZBQahc27n1Dazzqc1naDLw/Dday7IkETyeUx2mmEND488rz2RO/njJUglDD UcyWlDtl4YzaKG/5LnOQB289Z7vsmVhV3SwOgGBN3gC6dHedVMwo2m1Q1TnWns0qSaUfcgQWi5DV3 zYtv+WmMlDzakPcNDIOFw+7jwnPALhVtAGaQD43OXZOZMd8Ghr+QuNfcGZVADL+Bg5/Ud2Qpkkzg1 XKsRr0gAnZljT9O8lh1oEq8+iInTYC3XVuJRWHsj7RiU82WNMyNROilLbtitflGqmcm9thK7ZzLhE w3ZIWv1lg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lj04u-000umO-SE; Tue, 18 May 2021 13:48:09 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj00w-000u4b-QQ for linux-arm-kernel@desiato.infradead.org; Tue, 18 May 2021 13:44:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=4jm0S8ddMwt/uhSM0T7FAx+DzX2TUerJKHM1uev3sJo=; b=SEL7mCpWNvvrgHLS4nL2vAb1Et qAqidADEO4/ptYnwX8Ac8XAlmcpCIg9Pc2hqXvUbvoxSgVMrSkaMxv1iAGaS9nEpoiUZDtCTUHUiG DecmW99xGi/5NIcyqB28UDbrXkxqVMOtjBTk14mr72L5FnGkMm07w3Fdq47HCYKp1+F5xWbyzmqwa g0q0sD6tqcqCEfSNPzEWdCD2A678tf3fAbXbvllW7/xgKEi2onxxxDxJUDOeZl4H3koXmiQI4d4QJ nLFNifu8gFbAEq/5XVopnWU1+y+hhVQ8JTHf7HXzF9UCvvb0rJM3ywWFjudAEdsGYXD69WA3lqHI6 AdQfAI3Q==; Received: from mail-ot1-f44.google.com ([209.85.210.44]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj00t-00EhCf-PN for linux-arm-kernel@lists.infradead.org; Tue, 18 May 2021 13:44:01 +0000 Received: by mail-ot1-f44.google.com with SMTP id t10-20020a05683022eab0290304ed8bc759so8626756otc.12 for ; Tue, 18 May 2021 06:43:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=4jm0S8ddMwt/uhSM0T7FAx+DzX2TUerJKHM1uev3sJo=; b=e4aCE+utJisIe5q+1b/qSYQwbMCCOx3DqTw6l9XkB3R1zM5KQaqS2LC3J7TX+xoTq0 Zy9ZSNaQ46T2H0aXvEun6/I/1Gdc2cbUOeGCEv8ax4UMHF0rjoaZ1gnGuegvc4vZcxtT ZHZD0PXNvCZja+0Lxjg2hdIv+MGWd0WK7A2cKUNZ3CxttAjMhPy43xIqzd3bnHq0yZc2 gZbNthLC54rXv+OSC4ARuR8tWvoua816XJvCKYHeATsgi6V+qQTnLsccasiSbMGKRhMj W7ZBIE3uzKMdEJ8Cm7W+vLxMfPxWXzw/prRBi2L0NLuYZx0OvF2SQuCZkOj4DZ9KwoOn 5lEw== X-Gm-Message-State: AOAM531lkfVNRjw//qUjyLqT4VCQ+ozuvS3in+NJgMsIzmWqaxkD74gv RzVzKmsZt6XStFZ2AyYxVw== X-Google-Smtp-Source: ABdhPJwqRh21mnQ7HNrbhfem5wZW2JCmKm+iiEQPID+joQ5Q/8Y/FKtUHNCGH2kOT/YhySo/mrnZzQ== X-Received: by 2002:a9d:4617:: with SMTP id y23mr4197255ote.71.1621345438482; Tue, 18 May 2021 06:43:58 -0700 (PDT) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id e20sm3610817oot.11.2021.05.18.06.43.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 06:43:57 -0700 (PDT) Received: (nullmailer pid 561495 invoked by uid 1000); Tue, 18 May 2021 13:43:56 -0000 Date: Tue, 18 May 2021 08:43:56 -0500 From: Rob Herring To: Mark Kettenis Cc: devicetree@vger.kernel.org, Mark Kettenis , Hector Martin , Linus Walleij , linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] dt-bindings: pinctrl: Add DT bindings for apple,pinctrl Message-ID: <20210518134356.GA553438@robh.at.kernel.org> References: <20210516183221.93686-1-mark.kettenis@xs4all.nl> <20210516183221.93686-2-mark.kettenis@xs4all.nl> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210516183221.93686-2-mark.kettenis@xs4all.nl> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_064359_857542_81DB402B X-CRM114-Status: GOOD ( 24.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, May 16, 2021 at 08:32:17PM +0200, Mark Kettenis wrote: > From: Mark Kettenis > > The Apple GPIO controller is a simple combined pin and GPIO conroller > present on Apple ARM SoC platforms, including various iPhone and iPad > devices and the "Apple Silicon" Macs. > > Signed-off-by: Mark Kettenis > --- > .../bindings/pinctrl/apple,pinctrl.yaml | 103 ++++++++++++++++++ > MAINTAINERS | 2 + > include/dt-bindings/pinctrl/apple.h | 13 +++ > 3 files changed, 118 insertions(+) > create mode 100644 Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml > create mode 100644 include/dt-bindings/pinctrl/apple.h > > diff --git a/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml > new file mode 100644 > index 000000000000..fae23e1d845e > --- /dev/null > +++ b/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml > @@ -0,0 +1,103 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/pinctrl/apple,pinctrl.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Apple GPIO controller > + > +maintainers: > + - Mark Kettenis > + > +description: | > + The Apple GPIO controller is a simple combined pin and GPIO > + controller present on Apple ARM SoC platforms, including various > + iPhone and iPad devices and the "Apple Silicon" Macs. > + > +properties: > + compatible: > + items: > + - const: apple,t8103-pinctrl > + - const: apple,pinctrl > + > + reg: > + maxItems: 1 > + > + clocks: > + maxItems: 1 > + > + gpio-controller: true > + > + '#gpio-cells': > + const: 2 > + > + gpio-ranges: > + maxItems: 1 > + > + interrupts: > + minItems: 1 > + maxItems: 7 Add some description about what each interrupt is. Is this really 1-7 or either 1 or 7? > + > + interrupt-controller: true > + > +patternProperties: > + '-pins$': > + type: object > + $ref: pinmux-node.yaml# > + > + properties: > + pinmux: > + description: > + Values are constructed from pin number and alternate function > + configuration number using the APPLE_PINMUX() helper macro > + defined in include/dt-bindings/pinctrl/apple.h. > + > + required: > + - pinmux > + > + additionalProperties: false > + > +required: > + - compatible > + - reg > + - gpio-controller > + - '#gpio-cells' > + - gpio-ranges > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + > + soc { > + #address-cells = <2>; > + #size-cells = <2>; > + > + pinctrl: pinctrl@23c100000 { > + compatible = "apple,t8103-pinctrl", "apple,pinctrl"; > + reg = <0x2 0x3c100000 0x0 0x100000>; > + clocks = <&gpio_clk>; > + > + gpio-controller; > + #gpio-cells = <2>; > + gpio-ranges = <&pinctrl 0 0 212>; > + > + interrupt-controller; > + interrupt-parent = <&aic>; > + interrupts = , > + , > + , > + , > + , > + , > + ; > + > + pcie_pins: pcie-pins { > + pinmux = , > + , > + ; > + }; > + }; > + }; > diff --git a/MAINTAINERS b/MAINTAINERS > index ad0e9be66885..7327c9b778f1 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -1654,9 +1654,11 @@ C: irc://chat.freenode.net/asahi-dev > T: git https://github.com/AsahiLinux/linux.git > F: Documentation/devicetree/bindings/arm/apple.yaml > F: Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml > +F: Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml > F: arch/arm64/boot/dts/apple/ > F: drivers/irqchip/irq-apple-aic.c > F: include/dt-bindings/interrupt-controller/apple-aic.h > +F: include/dt-bindings/pinctrl/apple.h > > ARM/ARTPEC MACHINE SUPPORT > M: Jesper Nilsson > diff --git a/include/dt-bindings/pinctrl/apple.h b/include/dt-bindings/pinctrl/apple.h > new file mode 100644 > index 000000000000..ea0a6f466592 > --- /dev/null > +++ b/include/dt-bindings/pinctrl/apple.h > @@ -0,0 +1,13 @@ > +/* SPDX-License-Identifier: GPL-2.0+ OR MIT */ > +/* > + * This header provides constants for Apple pinctrl bindings. > + */ > + > +#ifndef _DT_BINDINGS_PINCTRL_APPLE_H > +#define _DT_BINDINGS_PINCTRL_APPLE_H > + > +#define APPLE_PINMUX(pin, func) ((pin) | ((func) << 16)) > +#define APPLE_PIN(pinmux) ((pinmux) & 0xffff) > +#define APPLE_FUNC(pinmux) ((pinmux) >> 16) > + > +#endif /* _DT_BINDINGS_PINCTRL_APPLE_H */ > -- > 2.31.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel