linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: lakshmi.sowjanya.d@intel.com
To: linus.walleij@linaro.org
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	andriy.shevchenko@linux.intel.com,
	lakshmi.bai.raja.subramanian@intel.com, tamal.saha@intel.com,
	lakshmi.sowjanya.d@intel.com
Subject: [PATCH v3 0/2] Add pinctrl support for Intel Keem Bay SoC
Date: Fri, 16 Jul 2021 21:57:22 +0530	[thread overview]
Message-ID: <20210716162724.26047-1-lakshmi.sowjanya.d@intel.com> (raw)

From: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>

Hi,

This patch set enables the support for the integrated pin controller in
the Intel Keem Bay SoC.

Patch 1 holds the implementation of pinctrl driver.
Patch 2 holds the relevant Device Tree bindings documentation and an
entry in MAINTAINERS file

High-Level Architecture:
-----------------------

                                   +----------------------------+
     ------------------------------|MODE 0 -                    |
      -----------------------------|MODE 1      PIN MUX         |
       ----------------------------|...                         |
        ---------------------------|...                         | PAD M
         +-------------------------|MODE 7(GPIO)		---------
         |                         |                            |    .
         |                         |  +---------------------+   |    .
         |                         |  |  GPIO_MODE (0-79)   |   |    .
         |                         |  | INV|PU|PD|DIR|MODE  |   |    .
         |                         |  +---------------------+   |    .
         |                         |    PIN CONFIGURATION       |    .
         |                         +----------------------------+    .
         |                                                           .
         |                         +----------------------------+    .
         |        -----------------|MODE 0 -                    |    .
         |         ----------------|MODE 1      PIN MUX         |    .
         |          ---------------|...                         |
         |            -------------|...                         | PAD N
         |                +--------|MODE 7(GPIO)		---------
         |                |        |                            |
         |                |        |  +---------------------+   |
         |                |        |  |  GPIO_MODE (0-79)   |   |
         |                |        |  | INV|PU|PD|DIR|MODE  |   |
         |                |        |  +---------------------+   |
         |                |        |    PIN CONFIGURATION       |
         |                |        +----------------------------+
         |                |
         |                |
         |                |
         |                |	   +------------------------------------+
         |                |        |       GPIO PIN CONTROL		|
         |                |        |					|
         |                |        |    +-------------------------+	|
         |                |        |    | GPIO_DATA_IN (0-2)      |	|
         |                |        |    +-------------------------+	|
     0   1..28   29  30  31  -------    +-------------------------+	|
     |   |   |   |   |    |        |    | GPIO_DATA_OUT_HIGH (0-2)|	|
     \   \   \   \   \    |        |    | GPIO_DATA_OUT_LOW (0-2) |	|
      |   |   |   |   |   |        |    +-------------------------+	|
      |   |   |   |   |   |        |					|
      |   |   |   |   |   |	   +------------------------------------+
      \   \   \   \   \   |
       |   |   |   |   |  |              GPIO_INT_CFG (Bits)
       |   |   |   |   |  |	+---|-------|--|------|--|----|--|---+
      +-------------------+-+   |31   30     23    16  15 14-8 7 6-0 |
      | GPIO_INT_CFG(0-7)   |	+---|-------|--|------^--|----|--|---+
      +---------------------+   |En   Idx   |En| Idx  |En| Idx|En|Idx|
        |   |    |  |		+---|-------|--|------|--|----|--|---+
       0|  1|...6| 7|
        |   |    |  |
     +-------------------+
     |                   |
     |                   |
     |                   |
     |                   |
     |  Interrupt        |
     |  Control          |
     |                   |
     |                   |
     |                   |
     |                   |
     +-------------------+

Explored registering GPIOCHIP per 32 bits, from the IP there are
registers
for set/clear and read pins which falls under the category of per
register
handling 32 bits, but for other functionality like direction, config,
interrupt mux, there is a need to have customised solution.

Using gpiochip per 32 bits involves additional data structures, and
it has an impact in the device tree for all the users of these
PADs.

Spinlock is not required for all the operations like set/get as there
are separate for each. Configuring all the registers in a single driver
is preferred as it is easy to debug.

Please help to review this patch set.

Thanks in advance,
Sowjanya

Changes from v2:
 - Removed unused variable trig

Changes from v1:
 - Changed the boolean to true in yaml
 - Removed spinlock for all the transactions except irq transactions
 - Added standard ngpios instead of num-gpios
 - Added gpiochip_generic_config() api
 - Added check for IRQ_ENABLE and removed the check for the mask
   IRQ_TYPE_SENSE_MASK

Lakshmi Sowjanya D (2):
  dt-bindings: pinctrl: Add bindings for Intel Keembay pinctrl driver
  pinctrl: Add Intel Keem Bay pinctrl driver

 .../pinctrl/intel,pinctrl-keembay.yaml        |  134 ++
 MAINTAINERS                                   |    5 +
 drivers/pinctrl/Kconfig                       |   19 +
 drivers/pinctrl/Makefile                      |    1 +
 drivers/pinctrl/pinctrl-keembay.c             | 1731 +++++++++++++++++
 5 files changed, 1890 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/intel,pinctrl-keembay.yaml
 create mode 100644 drivers/pinctrl/pinctrl-keembay.c

-- 
2.17.1


             reply	other threads:[~2021-07-16 16:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16 16:27 lakshmi.sowjanya.d [this message]
2021-07-16 16:27 ` [PATCH v3 1/2] dt-bindings: pinctrl: Add bindings for Intel Keembay pinctrl driver lakshmi.sowjanya.d
2021-07-30  9:05   ` Linus Walleij
2021-07-30 11:29     ` Andy Shevchenko
2021-07-30 11:58       ` Linus Walleij
2021-07-30  9:15   ` Linus Walleij
2021-07-30 11:06     ` D, Lakshmi Sowjanya
2021-07-16 16:27 ` [PATCH v3 2/2] pinctrl: Add Intel Keem Bay " lakshmi.sowjanya.d
2021-07-28 19:16   ` [kbuild] " Dan Carpenter
2021-07-30 11:05     ` D, Lakshmi Sowjanya
2021-07-30  9:13   ` Linus Walleij
2021-07-30  9:32     ` Andy Shevchenko
2021-07-30 11:06       ` D, Lakshmi Sowjanya
2021-07-30 11:30         ` Andy Shevchenko

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=20210716162724.26047-1-lakshmi.sowjanya.d@intel.com \
    --to=lakshmi.sowjanya.d@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=lakshmi.bai.raja.subramanian@intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tamal.saha@intel.com \
    --subject='Re: [PATCH v3 0/2] Add pinctrl support for Intel Keem Bay SoC' \
    /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

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).