Skip to content

sunxi: Update H616 DRAM driver

Jernej Skrabec linux-sunxi u-boot 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest10 patches 8 repliesIn review
  2. v18 patches 20 repliesSuperseded

Changes in v2 from the cover letter

- added tags
- updated dram config macros to have 8 or 4 nibbles
- renamed unknown macros to something useful when known
- removed unknown macro when not known what it does
- added patch 9 and 10 which introduces TPR2 (needed on one h313 board)
- update commit subjects

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10sunxi: Fix write to H616 DRAM CR registerarch/arm/mach-sunxi/dram_sun50i_h616.c+1 -10 replies
2/10sunxi: cosmetic: Fix H616 DRAM driver code stylearch/arm/mach-sunxi/dram_sun50i_h616.c+37 -370 replies
3/10sunxi: parameterize H616 DRAM ODT valuesarch/arm/include/asm/arch-sunxi/dram_sun50i_h616.h arch/arm/mach-sunxi/Kconfig arch/arm/mach-sunxi/dram_sun50i_h616.c +2 more+61 -220 replies
4/10sunxi: Convert H616 DRAM options to single settingarch/arm/include/asm/arch-sunxi/dram_sun50i_h616.h arch/arm/mach-sunxi/Kconfig arch/arm/mach-sunxi/dram_sun50i_h616.c +2 more+117 -1332 replies
5/10sunxi: Always configure ODT on H616 DRAMarch/arm/mach-sunxi/Kconfig arch/arm/mach-sunxi/dram_sun50i_h616.c+2 -31 reply
6/10sunxi: Make bit delay function in H616 DRAM code voidarch/arm/mach-sunxi/dram_sun50i_h616.c+1 -30 replies
7/10sunxi: Parameterize bit delay code in H616 DRAM driverarch/arm/include/asm/arch-sunxi/dram_sun50i_h616.h arch/arm/mach-sunxi/Kconfig arch/arm/mach-sunxi/dram_sun50i_h616.c +1 more+163 -491 reply
8/10sunxi: Parameterize "unknown feature" in H616 DRAM driverarch/arm/include/asm/arch-sunxi/dram_sun50i_h616.h arch/arm/mach-sunxi/Kconfig arch/arm/mach-sunxi/dram_sun50i_h616.c +1 more+44 -111 reply
9/10sunxi: Parameterize some of H616 DDR3 timingsarch/arm/mach-sunxi/dram_timings/h616_ddr3_1333.c+5 -41 reply
10/10sunxi: Add TPR2 parameter for H616 DRAM driverarch/arm/include/asm/arch-sunxi/dram_sun50i_h616.h arch/arm/mach-sunxi/Kconfig arch/arm/mach-sunxi/dram_sun50i_h616.c +1 more+75 -241 reply

Reviews trailers per patch

All 10 patches have a Reviewed-by or Acked-by.

PatchAndre Przywara
1/10A-b
2/10R-b
3/10R-b
4/10R-b
5/10R-b
6/10R-b
7/10R-b
8/10A-b
9/10R-b
10/10R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/10] sunxi: Update H616 DRAM driver

Current H616 DRAM driver is completely customized to Orange Pi Zero2 board, which is only one of two H616 boards supported by U-Boot. 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

Changes from v1:
- added tags
- updated dram config macros to have 8 or 4 nibbles
- renamed unknown macros to something useful when known
- removed unknown macro when not known what it does
- added patch 9 and 10 which introduces TPR2 (needed on one h313 board)
- update commit subjects

Jernej Skrabec (10):
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 "unknown feature" in H616 DRAM driver
sunxi: Parameterize some of H616 DDR3 timings
sunxi: Add TPR2 parameter for H616 DRAM driver

 .../include/asm/arch-sunxi/dram_sun50i_h616.h |  17 +
 arch/arm/mach-sunxi/Kconfig                   |  83 +--
 arch/arm/mach-sunxi/dram_sun50i_h616.c        | 530 ++++++++++++------
 .../mach-sunxi/dram_timings/h616_ddr3_1333.c  |  20 +-
 configs/orangepi_zero2_defconfig              |   8 +-
 configs/x96_mate_defconfig                    |   7 +
 6 files changed, 442 insertions(+), 223 deletions(-)
Signature · 1 line
2.40.0