сб, 9 груд. 2023 р. о 16:14 Tom Rini <tr...@konsulko.com> пише: > > On Mon, Dec 04, 2023 at 04:45:38PM +0200, Svyatoslav Ryhel wrote: > > пн, 4 груд. 2023 р. о 12:26 Thierry Reding <tred...@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. > > Well, yes, this is the right direction. One of the goals is to be able > to use the linux device trees as-is and be able to pass that along to > the OS to use. And so we move a little away from the absolute thinnest > case that we used to be and a bit more towards a generic case just like > Linux did. In some cases, one can just change the device tree passed to > U-Boot and re-use the same binary. And if Tegra platforms moved in that > direction that's nice too. > > -- > Tom
Tom and Thierry. I have examined the size increase of the produced u-boot binary. With only conversion code binary size increased by around 15 kb (based on cardhu board examination). While, if dts conversion is performed as well I have got a 27.5 kb binary increase (based on lg-x3 board examination). Yes, this is a lot so it is up to you to decide if these patches should be implemented in any way or if they should be rejected. >From my perspective this increase is acceptable since even the oldest devices should have 2 mb of bootloader size reserved. Devices I own can easily have a 2 mb bootloader extendable to 3.5 mb and even further if use stages. Same time header pinmux setup is preserved and DM wrapper should protect Tegra from being dropped as it was in case of timer DM conversion. Best regards, Svyatoslav R.