Hm, you are correct. Patchset I have sent was based on u-boot/master without timer patches. Now, since those are merged, I need to adjust them a bit. It is not a big issue since I have some more optimisations to be added anyway. I will send an updated version within an hour if nothing interferes.
Thanks. Best Regards. Svyatoslav R. чт, 2 лют. 2023 р. о 19:54 Tom Warren <twar...@nvidia.com> пише: > > I've merged your 3 timer patches w/TOT u-boot-tegra, and sent a PR to Tom > Rini. > > However, your v1 16-patch series here does no apply cleanly on top of the new > u-boot-tegra/master (fast-forwarded to u-boot/master TOT, and then with your > 3 timer patches applied on top). PTAL, git am error spew below: > > git am -s --whitespace=strip > /home/tom/Downloads/bundle-23280-Svyatoslav-16-v1.mbox > Applying: tegra30: clock: add EXTPERIPH > Applying: ARM: t20/t30: swap host1x and disp1 clock parents > Applying: ARM: tegra: clock: add clk_id_to_pll_id helper > Applying: ARM: tegra: clock: add clock_decode_pair helper > Applying: ARM: tegra30: add PLLD to pll setup > error: patch failed: arch/arm/mach-tegra/clock.c:791 > error: arch/arm/mach-tegra/clock.c: patch does not apply > Patch failed at 0005 ARM: tegra30: add PLLD to pll setup > The copy of the patch that failed is found in: > /home/tom/denx/uboot-tegra/.git/rebase-apply/patch > When you have resolved this problem, run "git am --resolved". > If you prefer to skip this patch, run "git am --skip" instead. > To restore the original branch and stop patching, run "git am --abort". > > Tom > -----Original Message----- > From: Svyatoslav Ryhel <clamo...@gmail.com> > Sent: Tuesday, January 31, 2023 2:53 PM > To: Tom Warren <twar...@nvidia.com> > Cc: Thierry Reding <thierry.red...@gmail.com>; Rayagonda Kokatanur > <rayagonda.kokata...@broadcom.com>; Marek Vasut <ma...@denx.de>; Maxim > Schwalm <maxim.schw...@gmail.com>; Dmitry Osipenko <dig...@gmail.com>; Jonas > Schwöbel <jonasschwoe...@yahoo.de>; Agneli <po...@protonmail.ch>; Heinrich > Schuchardt <xypron.g...@gmx.de>; Michal Simek <michal.si...@amd.com>; Stefan > Roese <s...@denx.de>; Eugen Hristev <eugen.hris...@microchip.com>; Michael > Walle <mich...@walle.cc>; Simon Glass <s...@chromium.org>; Jim Liu > <jim.t90...@gmail.com>; William Zhang <william.zh...@broadcom.com>; Rick Chen > <r...@andestech.com>; Stefan Herbrechtsmeier > <stefan.herbrechtsme...@weidmueller.com>; Andre Przywara > <andre.przyw...@arm.com>; Jaehoon Chung <jh80.ch...@samsung.com>; > u-boot@lists.denx.de > Subject: Re: [PATCH v7 0/3] Timer support for ARM Tegra > > External email: Use caution opening links or attachments > > > I will upload v8 tomorrow once I have some time. > > Yes, Timer series should go first since some clock related commits of > "General Tegra improvements" may conflict. Those are not direct dependencies > but rather changed code overlaps. > > Thanks > > Best Regards. > Svyatoslav R. > > вт, 31 січ. 2023 р. о 22:27 Tom Warren <twar...@nvidia.com> пише: > > > > OK, I'll wait for your v8 with the adjusted timer enabling. > > > > Does this series need to go in first before your recent 16-patch series > > "General Tegra improvements"? i.e. are there any dependencies? > > > > Tom > > -----Original Message----- > > From: Svyatoslav Ryhel <clamo...@gmail.com> > > Sent: Tuesday, January 31, 2023 8:26 AM > > To: Tom Warren <twar...@nvidia.com> > > Cc: Thierry Reding <thierry.red...@gmail.com>; Rayagonda Kokatanur > > <rayagonda.kokata...@broadcom.com>; Marek Vasut <ma...@denx.de>; Maxim > > Schwalm <maxim.schw...@gmail.com>; Dmitry Osipenko <dig...@gmail.com>; > > Jonas Schwöbel <jonasschwoe...@yahoo.de>; Agneli > > <po...@protonmail.ch>; Heinrich Schuchardt <xypron.g...@gmx.de>; > > Michal Simek <michal.si...@amd.com>; Stefan Roese <s...@denx.de>; Eugen > > Hristev <eugen.hris...@microchip.com>; Michael Walle > > <mich...@walle.cc>; Simon Glass <s...@chromium.org>; Jim Liu > > <jim.t90...@gmail.com>; William Zhang <william.zh...@broadcom.com>; > > Rick Chen <r...@andestech.com>; Stefan Herbrechtsmeier > > <stefan.herbrechtsme...@weidmueller.com>; Andre Przywara > > <andre.przyw...@arm.com>; Jaehoon Chung <jh80.ch...@samsung.com>; > > u-boot@lists.denx.de > > Subject: Re: [PATCH v7 0/3] Timer support for ARM Tegra > > > > External email: Use caution opening links or attachments > > > > > > Yes, it works perfectly fine on the T20/T30/T124/T186 and T210, T114 board > > no one has on hand. Timer enabling has to be adjusted as Thierry suggested. > > > > вт, 31 січ. 2023 р. о 17:18 Tom Warren <twar...@nvidia.com> пише: > > > > > > Has this been tested yet? I want to get it into the next PR, and I need a > > > tested-by for V7 before I can do that. > > > > > > Thanks, > > > > > > Tom > > > > > > -----Original Message----- > > > From: Svyatoslav R. <clamo...@gmail.com> > > > Sent: Friday, January 27, 2023 1:28 PM > > > To: Thierry Reding <thierry.red...@gmail.com> > > > Cc: Rayagonda Kokatanur <rayagonda.kokata...@broadcom.com>; Tom > > > Warren <twar...@nvidia.com>; Marek Vasut <ma...@denx.de>; Maxim > > > Schwalm <maxim.schw...@gmail.com>; Dmitry Osipenko > > > <dig...@gmail.com>; Jonas Schwöbel <jonasschwoe...@yahoo.de>; Agneli > > > <po...@protonmail.ch>; Heinrich Schuchardt <xypron.g...@gmx.de>; > > > Michal Simek <michal.si...@amd.com>; Stefan Roese <s...@denx.de>; > > > Eugen Hristev <eugen.hris...@microchip.com>; Michael Walle > > > <mich...@walle.cc>; Simon Glass <s...@chromium.org>; Jim Liu > > > <jim.t90...@gmail.com>; William Zhang <william.zh...@broadcom.com>; > > > Rick Chen <r...@andestech.com>; Stefan Herbrechtsmeier > > > <stefan.herbrechtsme...@weidmueller.com>; Andre Przywara > > > <andre.przyw...@arm.com>; Jaehoon Chung <jh80.ch...@samsung.com>; > > > u-boot@lists.denx.de > > > Subject: Re: [PATCH v7 0/3] Timer support for ARM Tegra > > > > > > External email: Use caution opening links or attachments > > > > > > > > > On 1/27/23 19:15, Thierry Reding wrote: > > > > On Fri, Jan 27, 2023 at 09:13:09AM +0200, Svyatoslav Ryhel wrote: > > > >> - ARM: tegra: remap clock_osc_freq for all Tegra family Enum > > > >> clock_osc_freq was designed to use only with T20. > > > >> This patch remaps it to use additional frequencies, added in > > > >> T30+ SoC while maintaining backwards compatibility with T20. > > > >> > > > >> - drivers: timer: add timer driver for ARMv7 based Tegra devices > > > >> Add timer support for T20/T30/T114/T124 and T210 based devices. > > > >> Driver is based on DM, has device tree support and can be used on > > > >> SPL and early boot stage. > > > >> > > > >> Arm64 Tegra (apart T210) according to comment in tegra-common.h > > > >> use architected timer. > > > >> > > > >> - ARM: tegra: include timer as default option Enable TIMER as > > > >> default option for all Tegra devices and enable TEGRA_TIMER for > > > >> TEGRA_ARMV7_COMMON and TEGRA210. > > > >> Additionally enable SPL_TIMER if build as SPL part and drop > > > >> deprecated configs from common header. > > > >> > > > >> P. S. I have no arm64 Tegra and according to comment in > > > >> tegra-common.h Use the Tegra US timer on ARMv7, but the > > > >> architected timer on ARMv8. > > > >> > > > >> --- > > > >> Changeog from V6 > > > >> - use clk_m as timer calibration clock (this should properly fix > > > >> T210) > > > >> - enable timer for T210 > > > >> > > > >> Changed from v5: > > > >> - added paz00 tester > > > >> > > > >> Changed from v4: > > > >> - added comments > > > >> > > > >> Changed from v3: > > > >> - removed BOOTSTAGE ifdefs > > > >> - use early timer on boot stage unconditionally > > > >> --- > > > >> Svyatoslav Ryhel (3): > > > >> ARM: tegra: remap clock_osc_freq for all Tegra family > > > >> drivers: timer: add driver for ARMv7 based Tegra devices and T210 > > > >> ARM: tegra: include timer as default option > > > >> > > > >> arch/arm/Kconfig | 1 + > > > >> arch/arm/include/asm/arch-tegra/clock.h | 9 +- > > > >> arch/arm/mach-tegra/Kconfig | 3 + > > > >> arch/arm/mach-tegra/clock.c | 17 +++- > > > >> arch/arm/mach-tegra/cpu.c | 70 ++++++++++--- > > > >> arch/arm/mach-tegra/tegra114/clock.c | 13 +-- > > > >> arch/arm/mach-tegra/tegra124/clock.c | 13 +-- > > > >> arch/arm/mach-tegra/tegra20/clock.c | 4 +- > > > >> arch/arm/mach-tegra/tegra210/clock.c | 22 +--- > > > >> arch/arm/mach-tegra/tegra30/clock.c | 10 +- > > > >> drivers/timer/Kconfig | 8 ++ > > > >> drivers/timer/Makefile | 1 + > > > >> drivers/timer/tegra-timer.c | 130 > > > >> ++++++++++++++++++++++++ > > > >> drivers/usb/host/ehci-tegra.c | 46 +++++++-- > > > >> include/configs/tegra-common.h | 6 -- > > > >> 15 files changed, 274 insertions(+), 79 deletions(-) > > > >> create mode 100644 drivers/timer/tegra-timer.c > > > > Ugh... turns out I had completely messed up the testing on > > > > Tegra186 and it wasn't working at all. The problem is that the > > > > selection of the TIMER symbol for all of Tegra causes the driver > > > > model to be used, but there is no DM driver for the architected timer > > > > that's used on Tegra186. > > > > > > > > The quickest fix would be to do this: > > > > > > > > --- >8 --- > > > > diff --git a/arch/arm/mach-tegra/Kconfig > > > > b/arch/arm/mach-tegra/Kconfig index b50eec5b8c9b..05c8ce0e08dd > > > > 100644 > > > > --- a/arch/arm/mach-tegra/Kconfig > > > > +++ b/arch/arm/mach-tegra/Kconfig > > > > @@ -56,7 +56,6 @@ config TEGRA_COMMON > > > > select MISC > > > > select OF_CONTROL > > > > select SPI > > > > - select TIMER > > > > imply CMD_DM > > > > imply CRC32_VERIFY > > > > > > > > @@ -83,6 +82,7 @@ config TEGRA_ARMV7_COMMON > > > > select TEGRA_PINCTRL > > > > select TEGRA_PMC > > > > select TEGRA_TIMER > > > > + select TIMER > > > > > > > > config TEGRA_ARMV8_COMMON > > > > bool "Tegra 64-bit common options" > > > > @@ -137,6 +137,7 @@ config TEGRA210 > > > > select TEGRA_PMC > > > > select TEGRA_PMC_SECURE > > > > select TEGRA_TIMER > > > > + select TIMER > > > > > > > > config TEGRA186 > > > > bool "Tegra186 family" > > > > --- >8 --- > > > > > > > > So basically make TIMER selected on everything except Tegra186, so > > > > that on Tegra186 things are basically unmodified. > > > > > > I can propose to include 'select TIMER' directly into TEGRA_TIMER config > > > option. This will eliminate need of including it into mach-tegra Kconfigs. > > > > > > BTW, may you check current patch set on T124 and T210 if those work > > > properly. My T30 devices work fine and same as before after switch to > > > clk_m as timer calibration clock. > > > > > > Best Regards, Svyatoslav R. > > > > > > > Thierry