On Tuesday 16 August 2022 21:38:51 Pali Rohár wrote: > Meanwhile I have found following email thread: > https://lore.kernel.org/linux-arm-kernel/20121020113800.gc21...@lunn.ch/t/#u > > Where are more 6281 boards with 166 MHz TCLK and there is interesting output: > $ dmesg | grep -i tclk > [ 5.851008] Kirkwood: MV88F6281-A0, TCLK=200000000 > > Which means that old kernel version had TCLK detection code. I grepped > git linux history and I successfully found it: > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm/mach-kirkwood/common.c?h=v3.15#n542 > > #define SAMPLE_AT_RESET (DEV_BUS_VIRT_BASE + 0x0030) > > static int __init kirkwood_find_tclk(void) > { > u32 dev, rev; > > kirkwood_pcie_id(&dev, &rev); > > if (dev == MV88F6281_DEV_ID || dev == MV88F6282_DEV_ID) > if (((readl(SAMPLE_AT_RESET) >> 21) & 1) == 0) > return 200000000; > > return 166666667; > } > > So for TCLK detection is used BIT 21 of already mentioned 0x10030 Sample > at Reset Register. > > I'm going to prepare a patch which will fix this issue for 88F6281 SoCs.
Done! Please test it! https://patchwork.ozlabs.org/project/uboot/patch/20220816200016.18288-1-p...@kernel.org/