[PATCH v1 0/8] Convert Tegra pinctrl to DM

Svyatoslav Ryhel clamor95 at gmail.com
Mon Dec 4 15:45:38 CET 2023


пн, 4 груд. 2023 р. о 12:26 Thierry Reding <treding at nvidia.com> пише:
>
> On Mon, Dec 04, 2023 at 10:20:46AM +0200, Svyatoslav Ryhel wrote:
> > Create a DM supported wrapper arround existing Tegra pinmux logic.
> > This implementation is backwards compatible with all existing board
> > setups and early stages of setup. All new boards must be device tree
> > based. Linux dts pinmux nodes are fully compatible with this driver.
> >
> > As an example I have converted recently merged T30 boards to this
> > layout (I have those devices and was able to test them properly) and
> > Paz00 T20 board which was tested as well by owner.
> >
> > Svyatoslav Ryhel (8):
> >   ARM: mach-tegra: rearrange SPL configs
> >   drivers: pinctrl: create Tegra DM pinctrl driver
> >   drivers: pinctrl: tegra: incorporate existing code
> >   board: asus: grouper: switch to DM pinmux
> >   board: lg: x3-t30: switch to DM pinmux
> >   board: asus: transformer: switch to DM pinmux
> >   board: htc: endeavoru: switch to DM pinmux
> >   board: compal: paz00: clean up the board
> >
> >  arch/arm/dts/tegra20-paz00.dts                |    4 +-
> >  arch/arm/dts/tegra30-asus-grouper-common.dtsi |  712 ++++++++++
> >  .../dts/tegra30-asus-nexus7-grouper-E1565.dts |  113 ++
> >  .../dts/tegra30-asus-nexus7-grouper-PM269.dts |  113 ++
> >  .../dts/tegra30-asus-nexus7-tilapia-E1565.dts |  149 +++
> >  arch/arm/dts/tegra30-asus-p1801-t.dts         |  982 ++++++++++++++
> >  arch/arm/dts/tegra30-asus-tf201.dts           |   45 +
> >  arch/arm/dts/tegra30-asus-tf300t.dts          |   45 +
> >  arch/arm/dts/tegra30-asus-tf300tg.dts         |  128 ++
> >  arch/arm/dts/tegra30-asus-tf300tl.dts         |  163 +++
> >  arch/arm/dts/tegra30-asus-tf600t.dts          |  889 +++++++++++++
> >  arch/arm/dts/tegra30-asus-tf700t.dts          |   53 +
> >  arch/arm/dts/tegra30-asus-transformer.dtsi    |  984 ++++++++++++++
> >  arch/arm/dts/tegra30-htc-endeavoru.dts        | 1147 +++++++++++++++++
> >  arch/arm/dts/tegra30-lg-p880.dts              |   90 ++
> >  arch/arm/dts/tegra30-lg-p895.dts              |   93 ++
> >  arch/arm/dts/tegra30-lg-x3.dtsi               |  845 ++++++++++++
> >  arch/arm/include/asm/arch-tegra114/pinmux.h   |  303 +++++
> >  arch/arm/include/asm/arch-tegra124/pinmux.h   |  327 +++++
> >  arch/arm/include/asm/arch-tegra20/pinmux.h    |  291 +++++
> >  arch/arm/include/asm/arch-tegra210/pinmux.h   |  394 ++++++
> >  arch/arm/include/asm/arch-tegra30/pinmux.h    |  381 ++++++
> >  arch/arm/mach-tegra/Kconfig                   |   16 +-
> >  arch/arm/mach-tegra/Makefile                  |    1 -
> >  arch/arm/mach-tegra/board.c                   |    6 +-
> >  arch/arm/mach-tegra/board2.c                  |    2 +-
> >  arch/arm/mach-tegra/tegra114/Makefile         |    2 +-
> >  arch/arm/mach-tegra/tegra124/Makefile         |    2 -
> >  arch/arm/mach-tegra/tegra20/Makefile          |    2 +-
> >  arch/arm/mach-tegra/tegra210/Makefile         |    1 -
> >  arch/arm/mach-tegra/tegra30/Makefile          |    2 +-
> >  board/asus/grouper/grouper.c                  |   18 -
> >  board/asus/grouper/pinmux-config-grouper.h    |  362 ------
> >  .../pinmux-config-transformer.h               |  365 ------
> >  board/asus/transformer-t30/transformer-t30.c  |   23 -
> >  board/compal/paz00/Makefile                   |    8 -
> >  board/compal/paz00/paz00.c                    |   53 -
> >  board/htc/endeavoru/endeavoru.c               |   14 -
> >  board/htc/endeavoru/pinmux-config-endeavoru.h |  362 ------
> >  board/lg/x3-t30/Kconfig                       |   12 -
> >  board/lg/x3-t30/configs/p880.config           |    1 -
> >  board/lg/x3-t30/configs/p895.config           |    1 -
> >  board/lg/x3-t30/pinmux-config-x3.h            |  449 -------
> >  board/lg/x3-t30/x3-t30.c                      |   23 -
> >  configs/paz00_defconfig                       |    3 +
> >  drivers/pinctrl/Kconfig                       |    1 +
> >  drivers/pinctrl/Makefile                      |    1 +
> >  drivers/pinctrl/tegra/Kconfig                 |   18 +
> >  drivers/pinctrl/tegra/Makefile                |   16 +
> >  .../pinctrl/tegra/funcmux-tegra114.c          |    0
> >  .../pinctrl/tegra/funcmux-tegra124.c          |    0
> >  .../pinctrl/tegra/funcmux-tegra20.c           |    0
> >  .../pinctrl/tegra/funcmux-tegra210.c          |    0
> >  .../pinctrl/tegra/funcmux-tegra30.c           |    0
> >  drivers/pinctrl/tegra/pinctrl-tegra.c         |  248 ++++
> >  drivers/pinctrl/tegra/pinctrl-tegra20.c       |  177 +++
> >  .../pinctrl/tegra}/pinmux-common.c            |    0
> >  .../pinctrl/tegra/pinmux-tegra114.c           |    0
> >  .../pinctrl/tegra/pinmux-tegra124.c           |    0
> >  .../pinctrl/tegra/pinmux-tegra20.c            |    0
> >  drivers/pinctrl/tegra/pinmux-tegra210.c       |  190 +++
> >  .../pinctrl/tegra/pinmux-tegra30.c            |    0
> >  include/configs/x3-t30.h                      |   13 +-
> >  63 files changed, 8920 insertions(+), 1723 deletions(-)
>
> So we're adding 7000 extra lines here just to get the same level of
> functionality? Do we really want this?

Tom, as a project maintainer, may you answer? Does U-Boot really want
this? And ensure there will never ever be a forced pinmux DM
migration.

>
> For things like the kernel this makes a bit more sense because we can
> have generic kernel images for a wide variety of boards, and
> additionally we can have dynamic reconfiguration of the pinmux at
> runtime. We have neither of those in U-Boot, so do we really need to
> move all this into DT and add this extra overhead?

There would not be so much overhead if Linux kernel used numbers for
pin definitions, not strings.

Best regards,
Svyatoslav R.

> Thierry


More information about the U-Boot mailing list