All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 00/34] pinctrl: mvebu: numerous fixes, cleanups and improvements
Date: Tue,  9 Jun 2015 18:46:52 +0200	[thread overview]
Message-ID: <1433868446-11028-1-git-send-email-thomas.petazzoni@free-electrons.com> (raw)

Hello,

This fairly long series of patches implement numerous fixes, cleanups
and improvements to the description of the MPP pins on Armada 370,
375, 38x, 39x and XP.

The original motivation was a bug report mentioning some
inconsistencies between the Armada 38x HW datasheet and the
corresponding pinctrl driver. Even though I had already written some
basic Python script to extract the MPP data from the datasheet, and do
some of the code generation steps automatically, a good part of the
process was still manual, which means: 1/ mistakes can be made, 2/
it's not easy to update with new versions of the datasheets that fix
bugs in the MPP description.

Therefore, I improved my Python scripts, and now the MPP tables in the
pinctrl drivers are automatically generated from the datasheet HW
information. The script in question is quite ugly, as it takes into
account some existing inconsistencies in the formatting of the
different pinctrl drivers, and also different naming choices between
Linux and the HW datasheet. But nonetheless, it has been very useful
to bring all the pinctrl drivers in sync with the datasheet, and to
detect inconsistencies between the pinctrl drivers.

This long series of patches is the result of this work, and can be
separated in three parts:

 * The "fixes", which are marked for stable because they fix some real
   potential problems. These are patches 1 to 9 included.

 * The "cleanups", which are not doing anything really interesting
   except renaming things to progressively make drivers more
   consistent with each other and with the datasheets. These are
   patches 10 to 24 included.

 * The "improvements", which are actually adding pin functions that
   were not supported earlier, or even a new SoC completely such as
   the Armada 395 (as part of the armada-39x driver). These are
   patches 25 to 34 included.

Some of the patches are breaking the DT backward compatibility, but
most of them are doing that on pins that are highly unlikely to be
used with a mainline kernel. The only real concern could be with patch
21 that renames the function "spi" on Armada XP to "spi0" to match the
datasheet and to prepare for the addition of the "spi1" function. If
that is considered to be a too serious breakage, then we can imagine
leaving "spi" for the first SPI bus and use "spi1" for the second SPI
bus. I can rework the patch series to adjust this if deemed necessary.

In some cases, I have decided to not make drivers match to not break
the DT backward compatibility. For example, some drivers use
uart0/uart1, while some others use ua0/ua1 (like in the Marvell
datasheets), and I've left this inconsistency as is (my script copes
with it).

In addition to the fixes to the MPP lists themselves, two patches are
fixing the pinctrl_gpio_range[] definitions, which were wrong for
Armada 38x and Armada 39x.

I wish you good luck when reviewing this. It was boring to do, so I
guess it is going to be horribly boring to review :-)

Best regards,

Thomas

Thomas Petazzoni (34):
  pinctrl: mvebu: armada-38x: fix PCIe functions
  pinctrl: mvebu: armada-370: fix spi0 pin description
  pinctrl: mvebu: armada-375: remove non-existing NAND re/we pins
  pinctrl: mvebu: armada-xp: remove non-existing NAND pins
  pinctrl: mvebu: armada-xp: remove non-existing VDD cpu_pd functions
  pinctrl: mvebu: armada-xp: fix functions of MPP48
  pinctrl: mvebu: armada-375: remove incorrect space in pin description
  pinctrl: mvebu: armada-38x: fix incorrect total number of GPIOs
  pinctrl: mvebu: armada-39x: fix incorrect total number of GPIOs
  pinctrl: mvebu: armada-{375,38x,39x}: normalize naming of PTP subnames
  pinctrl: mvebu: armada-{38x,39x,xp}: normalize naming of DRAM
    functions
  pinctrl: mvebu: armada-39x: normalize SATA present functionality
    naming
  pinctrl: mvebu: armada-39x: normalize SDIO pin naming
  pinctrl: mvebu: armada-{370,375,38x,39x}: normalize dev pins
  pinctrl: mvebu: armada-39x: align NAND pin naming
  pinctrl: mvebu: armada-{370,375,38x,39x,xp}: normalize TDM pins
  pinctrl: mvebu: armada-{370,375}: normalize PCIe pins
  pinctrl: mvebu: armada-{370,375}: normalize audio pins
  pinctrl: mvebu: armada-{370,xp}: normalize ethernet txclkout pins
  pinctrl: mvebu: armada-xp: fix binding documentation of ge1 pins
  pinctrl: mvebu: armada-370: align VDD cpu-pd pin naming with datasheet
  pinctrl: mvebu: armada-370: align spi1 clock pin naming
  pinctrl: mvebu: armada-xp: rename spi to spi0
  pinctrl: mvebu: armada-39x: normalize ref clock naming
  pinctrl: mvebu: armada-xp: add spi1 function
  pinctrl: mvebu: armada-xp: add nand rb function
  pinctrl: mvebu: armada-xp: add dram functions
  pinctrl: mvebu: armada-38x: add sata functions
  pinctrl: mvebu: armada-38x: add nand functions
  pinctrl: mvebu: armada-38x: add ua1 functions
  pinctrl: mvebu: armada-38x: add ptp functions
  pinctrl: mvebu: armada-39x: add missing PCIe functions
  pinctrl: mvebu: armada-39x: add missing SATA functions
  pinctrl: mvebu: armada-39x: add support for Armada 395 variant

 .../pinctrl/marvell,armada-370-pinctrl.txt         |  18 +--
 .../pinctrl/marvell,armada-375-pinctrl.txt         |  34 +++---
 .../pinctrl/marvell,armada-38x-pinctrl.txt         |  66 +++++------
 .../pinctrl/marvell,armada-39x-pinctrl.txt         |  84 +++++++------
 .../bindings/pinctrl/marvell,armada-xp-pinctrl.txt |  80 ++++++-------
 drivers/pinctrl/mvebu/pinctrl-armada-370.c         |  22 ++--
 drivers/pinctrl/mvebu/pinctrl-armada-375.c         |  50 ++++----
 drivers/pinctrl/mvebu/pinctrl-armada-38x.c         | 120 ++++++++++---------
 drivers/pinctrl/mvebu/pinctrl-armada-39x.c         | 131 ++++++++++++---------
 drivers/pinctrl/mvebu/pinctrl-armada-xp.c          |  98 +++++++--------
 10 files changed, 363 insertions(+), 340 deletions(-)

-- 
2.1.0

             reply	other threads:[~2015-06-09 16:46 UTC|newest]

Thread overview: 95+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-09 16:46 Thomas Petazzoni [this message]
2015-06-09 16:46 ` [PATCH 01/34] pinctrl: mvebu: armada-38x: fix PCIe functions Thomas Petazzoni
2015-06-09 16:46   ` Thomas Petazzoni
2015-06-10  8:51   ` Linus Walleij
2015-06-10  8:51     ` Linus Walleij
2015-06-09 16:46 ` [PATCH 02/34] pinctrl: mvebu: armada-370: fix spi0 pin description Thomas Petazzoni
2015-06-09 16:46   ` Thomas Petazzoni
2015-06-10  8:52   ` Linus Walleij
2015-06-10  8:52     ` Linus Walleij
2015-06-09 16:46 ` [PATCH 03/34] pinctrl: mvebu: armada-375: remove non-existing NAND re/we pins Thomas Petazzoni
2015-06-09 16:46   ` Thomas Petazzoni
2015-06-09 16:58   ` Andrew Lunn
2015-06-09 16:58     ` Andrew Lunn
2015-06-16 13:17     ` Thomas Petazzoni
2015-06-16 13:17       ` Thomas Petazzoni
2015-06-10  8:54   ` Linus Walleij
2015-06-10  8:54     ` Linus Walleij
2015-06-09 16:46 ` [PATCH 04/34] pinctrl: mvebu: armada-xp: remove non-existing NAND pins Thomas Petazzoni
2015-06-09 16:46   ` Thomas Petazzoni
2015-06-09 16:46 ` [PATCH 05/34] pinctrl: mvebu: armada-xp: remove non-existing VDD cpu_pd functions Thomas Petazzoni
2015-06-09 16:46   ` Thomas Petazzoni
2015-06-10  8:55   ` Linus Walleij
2015-06-10  8:55     ` Linus Walleij
2015-06-09 16:46 ` [PATCH 06/34] pinctrl: mvebu: armada-xp: fix functions of MPP48 Thomas Petazzoni
2015-06-09 16:46   ` Thomas Petazzoni
2015-06-09 16:46 ` [PATCH 07/34] pinctrl: mvebu: armada-375: remove incorrect space in pin description Thomas Petazzoni
2015-06-09 16:46   ` Thomas Petazzoni
2015-06-09 16:47 ` [PATCH 08/34] pinctrl: mvebu: armada-38x: fix incorrect total number of GPIOs Thomas Petazzoni
2015-06-09 16:47   ` Thomas Petazzoni
2015-06-10  8:57   ` Linus Walleij
2015-06-10  8:57     ` Linus Walleij
2015-06-09 16:47 ` [PATCH 09/34] pinctrl: mvebu: armada-39x: " Thomas Petazzoni
2015-06-09 16:47   ` Thomas Petazzoni
2015-06-09 16:47 ` [PATCH 10/34] pinctrl: mvebu: armada-{375, 38x, 39x}: normalize naming of PTP subnames Thomas Petazzoni
2015-06-10  8:59   ` [PATCH 10/34] pinctrl: mvebu: armada-{375,38x,39x}: " Linus Walleij
2015-06-09 16:47 ` [PATCH 11/34] pinctrl: mvebu: armada-{38x, 39x, xp}: normalize naming of DRAM functions Thomas Petazzoni
2015-06-10  9:08   ` [PATCH 11/34] pinctrl: mvebu: armada-{38x,39x,xp}: " Linus Walleij
2015-06-09 16:47 ` [PATCH 12/34] pinctrl: mvebu: armada-39x: normalize SATA present functionality naming Thomas Petazzoni
2015-06-10  9:09   ` Linus Walleij
2015-06-09 16:47 ` [PATCH 13/34] pinctrl: mvebu: armada-39x: normalize SDIO pin naming Thomas Petazzoni
2015-06-10  9:10   ` Linus Walleij
2015-06-09 16:47 ` [PATCH 14/34] pinctrl: mvebu: armada-{370, 375, 38x, 39x}: normalize dev pins Thomas Petazzoni
2015-06-10  9:11   ` Linus Walleij
2015-06-09 16:47 ` [PATCH 15/34] pinctrl: mvebu: armada-39x: align NAND pin naming Thomas Petazzoni
2015-06-10  9:12   ` Linus Walleij
2015-06-10  9:15   ` Linus Walleij
2015-06-09 16:47 ` [PATCH 16/34] pinctrl: mvebu: armada-{370, 375, 38x, 39x, xp}: normalize TDM pins Thomas Petazzoni
2015-06-10 11:36   ` [PATCH 16/34] pinctrl: mvebu: armada-{370,375,38x,39x,xp}: " Linus Walleij
2015-06-09 16:47 ` [PATCH 17/34] pinctrl: mvebu: armada-{370,375}: normalize PCIe pins Thomas Petazzoni
2015-06-10 11:43   ` [PATCH 17/34] pinctrl: mvebu: armada-{370, 375}: " Linus Walleij
2015-06-09 16:47 ` [PATCH 18/34] pinctrl: mvebu: armada-{370,375}: normalize audio pins Thomas Petazzoni
2015-06-10 11:44   ` [PATCH 18/34] pinctrl: mvebu: armada-{370, 375}: " Linus Walleij
2015-06-09 16:47 ` [PATCH 19/34] pinctrl: mvebu: armada-{370, xp}: normalize ethernet txclkout pins Thomas Petazzoni
2015-06-10 11:50   ` Linus Walleij
2015-06-09 16:47 ` [PATCH 20/34] pinctrl: mvebu: armada-xp: fix binding documentation of ge1 pins Thomas Petazzoni
2015-06-10 11:56   ` Linus Walleij
2015-06-09 16:47 ` [PATCH 21/34] pinctrl: mvebu: armada-370: align VDD cpu-pd pin naming with datasheet Thomas Petazzoni
2015-06-10 11:57   ` Linus Walleij
2015-06-09 16:47 ` [PATCH 22/34] pinctrl: mvebu: armada-370: align spi1 clock pin naming Thomas Petazzoni
2015-06-10 12:00   ` Linus Walleij
2015-06-09 16:47 ` [PATCH 23/34] pinctrl: mvebu: armada-xp: rename spi to spi0 Thomas Petazzoni
2015-06-09 16:53   ` Andrew Lunn
2015-06-10 12:02     ` Linus Walleij
2015-06-10 12:01   ` Linus Walleij
2015-06-09 16:47 ` [PATCH 24/34] pinctrl: mvebu: armada-39x: normalize ref clock naming Thomas Petazzoni
2015-06-10 12:09   ` Linus Walleij
2015-06-09 16:47 ` [PATCH 25/34] pinctrl: mvebu: armada-xp: add spi1 function Thomas Petazzoni
2015-06-10 12:10   ` Linus Walleij
2015-06-09 16:47 ` [PATCH 26/34] pinctrl: mvebu: armada-xp: add nand rb function Thomas Petazzoni
2015-06-10 12:11   ` Linus Walleij
2015-06-09 16:47 ` [PATCH 27/34] pinctrl: mvebu: armada-xp: add dram functions Thomas Petazzoni
2015-06-10 12:12   ` Linus Walleij
2015-06-09 16:47 ` [PATCH 28/34] pinctrl: mvebu: armada-38x: add sata functions Thomas Petazzoni
2015-06-10 12:24   ` Linus Walleij
2015-06-09 16:47 ` [PATCH 29/34] pinctrl: mvebu: armada-38x: add nand functions Thomas Petazzoni
2015-06-10 12:25   ` Linus Walleij
2015-06-09 16:47 ` [PATCH 30/34] pinctrl: mvebu: armada-38x: add ua1 functions Thomas Petazzoni
2015-06-10 12:30   ` Linus Walleij
2015-06-09 16:47 ` [PATCH 31/34] pinctrl: mvebu: armada-38x: add ptp functions Thomas Petazzoni
2015-06-10 12:31   ` Linus Walleij
2015-06-09 16:47 ` [PATCH 32/34] pinctrl: mvebu: armada-39x: add missing PCIe functions Thomas Petazzoni
2015-06-10 12:32   ` Linus Walleij
2015-06-09 16:47 ` [PATCH 33/34] pinctrl: mvebu: armada-39x: add missing SATA functions Thomas Petazzoni
2015-06-10 12:35   ` Linus Walleij
2015-06-09 16:47 ` [PATCH 34/34] pinctrl: mvebu: armada-39x: add support for Armada 395 variant Thomas Petazzoni
2015-06-10 12:37   ` Linus Walleij
2015-06-09 17:01 ` [PATCH 00/34] pinctrl: mvebu: numerous fixes, cleanups and improvements Andrew Lunn
2015-06-09 19:22   ` Thomas Petazzoni
2015-06-09 19:47     ` Andrew Lunn
2015-06-09 20:34       ` Thomas Petazzoni
2015-06-09 21:36         ` Andrew Lunn
2015-06-10  8:08           ` Thomas Petazzoni
2015-06-10 12:39 ` Linus Walleij
2015-06-13 15:53   ` Gregory CLEMENT
2015-06-29 10:49     ` 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=1433868446-11028-1-git-send-email-thomas.petazzoni@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.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.