From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans de Goede Date: Thu, 3 Nov 2016 10:35:27 +0100 Subject: [U-Boot] [RFC PATCH 03/10] sunxi: provide default DRAM config for sun50i in Kconfig In-Reply-To: References: <1478137001-847-1-git-send-email-andre.przywara@arm.com> <1478137001-847-4-git-send-email-andre.przywara@arm.com> <581AFB61.8070403@suse.de> <73d5ce12-da71-4a4f-f71f-cbac656a40c8@redhat.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On 03-11-16 10:17, Andre Przywara wrote: > Hi Hans, > > thanks for having a look. > > On 03/11/16 09:13, Hans de Goede wrote: >> Hi, >> >> On 03-11-16 10:10, Andre Przywara wrote: >>> Hi, >>> >>> On 03/11/16 08:54, Alexander Graf wrote: >>>> On 11/03/2016 02:36 AM, Andre Przywara wrote: >>>>> To avoid enumerating the very same DRAM values in defconfig files >>>>> for each and every Allwinner A64 board out there, let's put some sane >>>>> default values in the Kconfig file. >>>>> Boards with different needs can override them at any time. >>>>> >>>>> Signed-off-by: Andre Przywara >>>>> --- >>>>> board/sunxi/Kconfig | 3 +++ >>>>> configs/pine64_plus_defconfig | 2 -- >>>>> 2 files changed, 3 insertions(+), 2 deletions(-) >>>>> >>>>> diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig >>>>> index e1d4ab1..d281a65 100644 >>>>> --- a/board/sunxi/Kconfig >>>>> +++ b/board/sunxi/Kconfig >>>>> @@ -145,6 +145,7 @@ config DRAM_CLK >>>>> default 792 if MACH_SUN9I >>>>> default 312 if MACH_SUN6I || MACH_SUN8I >>>>> default 360 if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I >>>>> + default 672 if MACH_SUN50I >>>>> ---help--- >>>>> Set the dram clock speed, valid range 240 - 480 (prior to sun9i), >>>>> must be a multiple of 24. For the sun9i (A80), the tested values >>>>> @@ -164,6 +165,7 @@ config DRAM_ZQ >>>>> default 123 if MACH_SUN4I || MACH_SUN5I || MACH_SUN6I || >>>>> MACH_SUN8I >>>>> default 127 if MACH_SUN7I >>>>> default 4145117 if MACH_SUN9I >>>>> + default 3881915 if MACH_SUN50I >>>>> ---help--- >>>>> Set the dram zq value. >>>>> @@ -171,6 +173,7 @@ config DRAM_ODT_EN >>>>> bool "sunxi dram odt enable" >>>>> default n if !MACH_SUN8I_A23 >>>>> default y if MACH_SUN8I_A23 >>>>> + default y if MACH_SUN50I >>>> >>>> This change isn't obvious. It's not mentioned in the patch description >>>> or removed from the defconfig. >>> >>> Oh, right, looks like a rebase artifact, since I juggled the patches >>> around quite a bit. It belongs to patch 10/10, I guess. >> >> It is setting a DRAM default, so it is fine, as for it not being >> removed from the defconfig, it is not yet present in the one defconfig >> we have for a64. OTOH it would be food to remove the > > No breakfast yet? ;-) ^^^^ > >> DRAM_CLK and DRAM_ZQ values from configs/pine64_plus_defconfig as >> part of this patch. > > Like the hunk below? Ugh, yes like that one, so from my pov this patch is good to go :) Regards. Hans > > Cheers, > Andre. > >>>>> ---help--- >>>>> Select this to enable dram odt (on die termination). >>>>> diff --git a/configs/pine64_plus_defconfig >>>>> b/configs/pine64_plus_defconfig >>>>> index 6d0198f..a53e968 100644 >>>>> --- a/configs/pine64_plus_defconfig >>>>> +++ b/configs/pine64_plus_defconfig >>>>> @@ -2,8 +2,6 @@ CONFIG_ARM=y >>>>> CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK=y >>>>> CONFIG_ARCH_SUNXI=y >>>>> CONFIG_MACH_SUN50I=y >>>>> -CONFIG_DRAM_CLK=672 >>>>> -CONFIG_DRAM_ZQ=3881915 >>>>> CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus" >>>>> # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set >>>>> CONFIG_CONSOLE_MUX=y >>>>