From: Andre Przywara <andre.przywara@arm.com>
To: Jernej Skrabec <jernej.skrabec@gmail.com>
Cc: jagan@amarulasolutions.com, u-boot@lists.denx.de,
linux-sunxi <linux-sunxi@lists.linux.dev>
Subject: Re: [PATCH 0/8] sunxi: Update H616 DRAM driver
Date: Mon, 12 Dec 2022 01:04:51 +0000 [thread overview]
Message-ID: <20221212010451.6fc99b11@slackpad.lan> (raw)
In-Reply-To: <20221211163213.98540-1-jernej.skrabec@gmail.com>
On Sun, 11 Dec 2022 17:32:05 +0100
Jernej Skrabec <jernej.skrabec@gmail.com> wrote:
Hi Jernej,
many thanks for putting this together!
I will have a more elaborate look at each patch later.
> Current H616 DRAM driver is completely customized to Orange Pi Zero2
> board, which is currently the only H616 board supported by U-Boot.
Not anymore, I merged the X96 Mate support lately, after the DT got
merged into the Linux tree.
Those are the values for the box I came up with:
CONFIG_DRAM_SUN50I_H616_DX_ODT=0x03030303
CONFIG_DRAM_SUN50I_H616_DX_DRI=0x0e0e0e0e
CONFIG_DRAM_SUN50I_H616_CA_DRI=0x1c12
CONFIG_DRAM_SUN50I_H616_TPR0=0xc0000c05
CONFIG_DRAM_SUN50I_H616_TPR10=0x2f0007
CONFIG_DRAM_SUN50I_H616_TPR11=0xffffdddd
CONFIG_DRAM_SUN50I_H616_TPR12=0xfedf7557
based on this boot0 found in some firmware update image:
00045400 be 02 00 ea 65 47 4f 4e 2e 42 54 30 cc ba f3 80 |....eGON.BT0....|
00045410 00 c0 00 00 30 00 00 00 00 00 00 00 00 00 02 00 |....0...........|
00045420 00 00 02 00 00 00 00 00 00 00 00 00 34 2e 30 00 |............4.0.|
00045430 00 00 00 00 03 00 00 00 88 02 00 00 03 00 00 00 |................|
00045440 03 03 03 03 0e 0e 0e 0e 12 1c 00 00 01 00 00 00 |................|
00045450 fb 30 00 00 00 00 00 00 40 08 00 00 04 00 00 00 |.0......@.......|
00045460 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00045470 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00045480 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00045490 05 0c 00 c0 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000454a0 80 80 80 33 07 00 2f 00 dd dd ff ff 57 75 df fe |...3../.....Wu..|
000454b0 40 00 00 00 00 00 00 00 00 00 00 00 08 00 02 01 |@...............|
I would be grateful if you could verify this.
I built it, and it reported the 4GB correctly, also managed to boot into
Linux just fine. No extensive testing, nor didn't I compare register
dumps or disassembly (yet).
Cheers,
Andre
P.S. Any plans on upstreaming support for your T95 <whatever> H616 TV
box? That would probably help the case here.
> Needless to say, this is not ideal for adding new boards. With changes
> in this series, all DDR3 boards are supported and all that is needed is
> just vendor DRAM values extracted from Android image. New DRAM types
> should also be easier to support, since a lot of constants used before
> are not really DRAM type dependent.
>
> Changes were verified by decompiling driver and generated values were
> compared to previous, hard coded ones. This was done without dram_para
> structures, so compiler was able to heavily optimize code and produce
> constants.
>
> Please take a look.
>
> Best regards,
> Jernej
>
> Jernej Skrabec (8):
> sunxi: Fix write to H616 DRAM CR register
> sunxi: cosmetic: Fix H616 DRAM driver code style
> sunxi: parameterize H616 DRAM ODT values
> sunxi: Convert H616 DRAM options to single setting
> sunxi: Always configure ODT on H616 DRAM
> sunxi: Make bit delay function in H616 DRAM code void
> sunxi: Parameterize bit delay code in H616 DRAM driver
> sunxi: Parameterize H616 DRAM code some more
>
> .../include/asm/arch-sunxi/dram_sun50i_h616.h | 18 +
> arch/arm/mach-sunxi/Kconfig | 67 +--
> arch/arm/mach-sunxi/dram_sun50i_h616.c | 445 +++++++++++-------
> configs/orangepi_zero2_defconfig | 8 +-
> 4 files changed, 348 insertions(+), 190 deletions(-)
>
next prev parent reply other threads:[~2022-12-12 1:06 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-11 16:32 [PATCH 0/8] sunxi: Update H616 DRAM driver Jernej Skrabec
2022-12-11 16:32 ` [PATCH 1/8] sunxi: Fix write to H616 DRAM CR register Jernej Skrabec
2023-01-04 0:35 ` Andre Przywara
2022-12-11 16:32 ` [PATCH 2/8] sunxi: cosmetic: Fix H616 DRAM driver code style Jernej Skrabec
2023-01-04 0:36 ` Andre Przywara
2022-12-11 16:32 ` [PATCH 3/8] sunxi: parameterize H616 DRAM ODT values Jernej Skrabec
2023-01-04 0:36 ` Andre Przywara
2022-12-11 16:32 ` [PATCH 4/8] sunxi: Convert H616 DRAM options to single setting Jernej Skrabec
2022-12-12 17:50 ` Andre Przywara
2022-12-13 16:23 ` Jernej Škrabec
2022-12-13 16:51 ` Andre Przywara
2022-12-13 17:08 ` Jernej Škrabec
2022-12-11 16:32 ` [PATCH 5/8] sunxi: Always configure ODT on H616 DRAM Jernej Skrabec
2023-01-04 0:37 ` Andre Przywara
2023-01-04 21:12 ` Jernej Škrabec
2022-12-11 16:32 ` [PATCH 6/8] sunxi: Make bit delay function in H616 DRAM code void Jernej Skrabec
2023-01-04 0:37 ` Andre Przywara
2022-12-11 16:32 ` [PATCH 7/8] sunxi: Parameterize bit delay code in H616 DRAM driver Jernej Skrabec
2023-01-04 0:37 ` Andre Przywara
2023-01-04 21:28 ` Jernej Škrabec
2022-12-11 16:32 ` [PATCH 8/8] sunxi: Parameterize H616 DRAM code some more Jernej Skrabec
2022-12-11 18:33 ` Jernej Škrabec
2023-01-04 0:38 ` Andre Przywara
2023-01-04 21:30 ` Jernej Škrabec
2022-12-12 1:04 ` Andre Przywara [this message]
2022-12-12 16:14 ` [PATCH 0/8] sunxi: Update H616 DRAM driver Jernej Škrabec
2023-01-04 0:47 ` Andre Przywara
2023-01-04 21:02 ` Jernej Škrabec
2023-01-04 23:21 ` Andre Przywara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221212010451.6fc99b11@slackpad.lan \
--to=andre.przywara@arm.com \
--cc=jagan@amarulasolutions.com \
--cc=jernej.skrabec@gmail.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox