linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joey Gouly <joey.gouly@arm.com>
To: <linux-gpio@vger.kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Hector Martin <marcan@marcan.st>, Marc Zyngier <maz@kernel.org>,
	Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>,
	Sven Peter <sven@svenpeter.dev>, <nd@arm.com>,
	Joey Gouly <joey.gouly@arm.com>
Subject: [PATCH v1 0/1] pinctrl/GPIO driver for Apple SoCs
Date: Tue, 21 Sep 2021 23:29:55 +0100	[thread overview]
Message-ID: <20210921222956.40719-1-joey.gouly@arm.com> (raw)

Hi all,

This is a driver for the combined pinctrl / GPIO hw in the Apple M1 computers.
The driver is based on Corellium's driver [1], and has been rebased and cleaned up.
The bindings are in Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml

This has been tested with out-of-tree patches for the keyboard on the Macbook
Air, it has also been tested with i2c for the USB PD driver and PCIe (all
out-of-tree drivers currently).

I left two defines at the top 'USE_PINMUX_GENERIC_FN' and
'USE_PINCTRL_GENERIC_FN', I wasn't sure if I should use the generic functions for
getting the groups/functions, so I left both approaches in and will remove one
of them for the next version! Which approach should I use?

There is a branch here with the driver:
  https://gitlab.arm.com/linux-arm/jg-open/-/commits/pinctrl_apple_v1

There is also a branch which contains all the commits as I was
developing here (and keyboard drivers):
  https://gitlab.arm.com/linux-arm/jg-open/-/commits/m1-keyboard

I look forward to feedback!

Thanks,
Joey

note: I'm sending this from my arm work e-mail address, however it was done on
personal time.

note2: For those that have been testing this with PCIe etc, you will probably
want to also include the last commit in the following branch, as I dropped the
clock references in the code (due to the switch to power domains):
https://gitlab.arm.com/linux-arm/jg-open/-/commits/pinctrl_apple_v1_clock

[1]
https://github.com/corellium/linux-m1/blob/d5ec2a737e64de23a21025f9eddc554588deb23f/drivers/pinctrl/pinctrl-apple-gpio.c

Stan Skowronek (1):
  pinctrl: add pinctrl/GPIO driver for Apple SoCs

 MAINTAINERS                          |   1 +
 drivers/pinctrl/Kconfig              |  13 +
 drivers/pinctrl/Makefile             |   1 +
 drivers/pinctrl/pinctrl-apple-gpio.c | 652 +++++++++++++++++++++++++++
 4 files changed, 667 insertions(+)
 create mode 100644 drivers/pinctrl/pinctrl-apple-gpio.c

-- 
2.17.1


             reply	other threads:[~2021-09-21 22:30 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21 22:29 Joey Gouly [this message]
2021-09-21 22:29 ` [PATCH v1 1/1] pinctrl: add pinctrl/GPIO driver for Apple SoCs Joey Gouly
2021-09-22  7:20   ` Andy Shevchenko
2021-09-25 13:44     ` Joey Gouly
2021-09-26  5:08       ` Andy Shevchenko
2021-09-26 12:48         ` Linus Walleij
2021-09-26 12:56           ` Sven Peter
2021-09-26 13:10             ` Linus Walleij
2021-09-26 14:35               ` Sven Peter
2021-09-26 16:28                 ` Andy Shevchenko
2021-09-27  5:45                   ` Sven Peter
2021-09-27  9:00                     ` Andy Shevchenko
2021-09-27  9:27                       ` Hans de Goede
2021-09-27  9:43                         ` Andy Shevchenko
2021-09-27  8:46                   ` Alyssa Rosenzweig
2021-09-27  8:55                     ` Andy Shevchenko
2021-09-27 23:34                 ` Linus Walleij
2021-09-28 21:20                   ` Joey Gouly
2021-09-28 18:21           ` Joey Gouly
2021-09-28 21:50             ` Linus Walleij
2021-09-22 13:09   ` Marc Zyngier
2021-09-22 23:58     ` Linus Walleij
2021-09-22  6:59 ` [PATCH v1 0/1] " Andy Shevchenko
2021-09-23  0:10 ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210921222956.40719-1-joey.gouly@arm.com \
    --to=joey.gouly@arm.com \
    --cc=alyssa.rosenzweig@collabora.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=marcan@marcan.st \
    --cc=maz@kernel.org \
    --cc=nd@arm.com \
    --cc=sven@svenpeter.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).