All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacopo Mondi <jacopo+renesas@jmondi.org>
To: laurent.pinchart@ideasonboard.com, geert+renesas@glider.be,
	linus.walleij@linaro.org
Cc: linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org
Subject: [RFC 0/5] Renesas RZ series pinctrl driver
Date: Wed, 25 Jan 2017 19:09:42 +0100	[thread overview]
Message-ID: <1485367787-8109-1-git-send-email-jacopo+renesas@jmondi.org> (raw)

Hello,
   after having discussed in great detail the RZ series per-pin PFC hardware
peculiarities, this is a proposal for a possible pin-based pin controller
driver for SoC devices of Renesas RZ family.

This RFC series adds a minimal driver infrastructure which supports pin
multiplexing via explicit per-pin settings performed in device tree sources.

The driver is composed by a "core" module, which aims to be generic enough to
support different RZ SoC device, and a "SoC" module, which is instead specific
to the single device.
Right now, the only "SoC" module support implemented is for RZ/A1H (Genmai
and GR-Peach boards).

Why an "SoC" module, if a single SoC is supported then?
RZ devices with a pin-based PFC hardware have different register layouts and
available pin functions, the "SoC" module is requested to enumerate its pins,
and provide function for HW interfacing (currently only set_mux() is supported).
This should make adding support for new chips fairly easy.

One note on the current DT ABI:
right now a pin configuration is specified in DTS using utility macros defined
in the (currently undocumented)
arch/arm/boot/dts/include/dt-bindings/pinctrl/pinctrl-renesas-rz.h header file.
Each pin configuration is a triplet of u32 in the form of

<BANK PIN ALTERNATE_FUNC_#>

It should be fairly easy adding additional parameters to configure
what was missing in the original group-based PFC driver for RZ devices
(I'm thinking of IO mode control, input buffer configuration, bi-directional
configuration etc).
Once these configuration parameters have been retrieved from the DTS, they can
be passed down to the "SoC" module, and let it deal with them as it does right
now with mux settings.

Currently, there is no support for pinconfig operations, and no GPIO support.
I'm planning to work on GPIO integration as soon as I have sent this out, but
I wanted to send this first to start collecting comments as soon as I could.

I have tested the correctness of mux settings printing out register values,
and enabling/disabling the SCIF2 module connected to serial debug interface.

The series makes use of newly introduced pin[ctrl|mux]_generic functions,
currently only available in Linus Walleij's linux-pinctrl.git tree.
I have merged the devel/ branch of that tree on top of Geert's renesas-drivers
master one.
The merge is available for clone at git://jmondi.org/linux in
jmondi/renesas/pinctrl-devel branch, for the interested ones.

Sending out as RFC, as I do expect lot of comments both from Renesas people that
has a deeper knowledge of other RZ Series SoCs than me, and from gpio/pinctrl
people as this is the first pin control driver I send out (so please bear with
me on this :)

Thank you
   j

Jacopo Mondi (5):
  pinctrl: rz-pfc: Add Renesas RZ pinctrl core module
  pinctrl: rz-pfc: Add Renesas RZ/A1 pinctrl driver
  arm: dts: dt-bindings: Add Renesas RZ pinctrl header
  arm: dts: r7s1000: Add pincontroller node
  arm: dts: genmai: Add SCIF2 pin group

 arch/arm/boot/dts/r7s72100-genmai.dts            |  13 +
 arch/arm/boot/dts/r7s72100.dtsi                  |  12 +
 drivers/pinctrl/Kconfig                          |   1 +
 drivers/pinctrl/Makefile                         |   1 +
 drivers/pinctrl/rz-pfc/Kconfig                   |  25 ++
 drivers/pinctrl/rz-pfc/Makefile                  |   2 +
 drivers/pinctrl/rz-pfc/pinctrl-rz.c              | 433 +++++++++++++++++++++++
 drivers/pinctrl/rz-pfc/pinctrl-rz.h              | 114 ++++++
 drivers/pinctrl/rz-pfc/pinctrl-rza1.c            | 346 ++++++++++++++++++
 include/dt-bindings/pinctrl/pinctrl-renesas-rz.h |  19 +
 10 files changed, 966 insertions(+)
 create mode 100644 drivers/pinctrl/rz-pfc/Kconfig
 create mode 100644 drivers/pinctrl/rz-pfc/Makefile
 create mode 100644 drivers/pinctrl/rz-pfc/pinctrl-rz.c
 create mode 100644 drivers/pinctrl/rz-pfc/pinctrl-rz.h
 create mode 100644 drivers/pinctrl/rz-pfc/pinctrl-rza1.c
 create mode 100644 include/dt-bindings/pinctrl/pinctrl-renesas-rz.h

-- 
2.7.4

             reply	other threads:[~2017-01-25 18:09 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25 18:09 Jacopo Mondi [this message]
2017-01-25 18:09 ` [RFC 1/5] pinctrl: rz-pfc: Add Renesas RZ pinctrl core module Jacopo Mondi
2017-01-26  2:58   ` Chris Brandt
2017-01-26  9:08     ` jacopo mondi
2017-01-26 14:19       ` Chris Brandt
2017-01-26 19:43   ` Geert Uytterhoeven
2017-01-30 19:19   ` Chris Brandt
2017-01-31  9:00     ` jacopo mondi
2017-01-31 13:48       ` Chris Brandt
2017-02-01 12:47         ` Laurent Pinchart
2017-02-01 15:21   ` Laurent Pinchart
2017-02-06 18:15     ` jacopo mondi
2017-02-06 18:28       ` Tony Lindgren
2017-02-07 10:27         ` jacopo mondi
2017-01-25 18:09 ` [RFC 2/5] pinctrl: rz-pfc: Add Renesas RZ/A1 pinctrl driver Jacopo Mondi
2017-01-26 19:49   ` Geert Uytterhoeven
2017-01-30 19:19   ` Chris Brandt
2017-01-31 10:39     ` Laurent Pinchart
2017-01-31 14:11       ` Chris Brandt
2017-02-01 15:25   ` Laurent Pinchart
2017-01-25 18:09 ` [RFC 3/5] arm: dts: dt-bindings: Add Renesas RZ pinctrl header Jacopo Mondi
2017-01-26 19:52   ` Geert Uytterhoeven
2017-01-30 18:30     ` Laurent Pinchart
2017-01-31  9:12       ` jacopo mondi
2017-01-31  9:31         ` Geert Uytterhoeven
2017-01-31 14:00           ` Chris Brandt
2017-01-25 18:09 ` [RFC 4/5] arm: dts: r7s1000: Add pincontroller node Jacopo Mondi
2017-01-26  9:49   ` Sergei Shtylyov
2017-01-26 19:54   ` Geert Uytterhoeven
2017-01-31 10:24     ` jacopo mondi
2017-01-31 10:34       ` Geert Uytterhoeven
2017-01-30 18:29   ` Laurent Pinchart
2017-01-30 19:39     ` Chris Brandt
2017-01-31 10:35       ` Laurent Pinchart
2017-01-31 14:08         ` Chris Brandt
2017-01-25 18:09 ` [RFC 5/5] arm: dts: genmai: Add SCIF2 pin group Jacopo Mondi
2017-01-26  9:51   ` Sergei Shtylyov
2017-01-30 18:17     ` Laurent Pinchart
2017-01-30 18:55       ` Geert Uytterhoeven
2017-01-26  2:57 ` [RFC 0/5] Renesas RZ series pinctrl driver Chris Brandt
2017-01-26 19:56 ` Geert Uytterhoeven
2017-01-27 16:47 ` [RFC fixes 0/2] FIX: " Jacopo Mondi
2017-01-27 16:47   ` [RFC fixes 1/2] arm: dts: genmai: Configure RIIC2 pins Jacopo Mondi
2017-01-30 18:49     ` Laurent Pinchart
2017-01-27 16:47   ` [RFC fixes 2/2] pinctrl: rz-pfc: Fix RZ/A1 pin function configuration Jacopo Mondi
2017-01-27 21:09   ` [RFC fixes 0/2] FIX: Renesas RZ series pinctrl driver Chris Brandt
2017-01-30 15:47     ` jacopo mondi
2017-01-30 16:29       ` Chris Brandt
2017-01-30 13:51 ` [RFC 0/5] " Linus Walleij
2017-01-30 15:53   ` Tony Lindgren
2017-01-30 16:18     ` jacopo mondi
2017-01-30 16:08   ` Geert Uytterhoeven
2017-01-30 18:59     ` Laurent Pinchart
2017-01-30 19:49       ` Chris Brandt

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=1485367787-8109-1-git-send-email-jacopo+renesas@jmondi.org \
    --to=jacopo+renesas@jmondi.org \
    --cc=geert+renesas@glider.be \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.