public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, v4, 50/66] rockchip: rk3368: add DRAM controller driver with DRAM initialisation
Date: Sun, 06 Aug 2017 19:18:21 +0200	[thread overview]
Message-ID: <E1dePC1-0006Xq-Rc@mail.theobroma-systems.com> (raw)
In-Reply-To: <1501706105-7490-51-git-send-email-philipp.tomsich@theobroma-systems.com>

> This adds a DRAM controller driver for the RK3368 and places it in
> drivers/ram/rockchip (where the other DM-enabled DRAM controller
> drivers for rockchip devices should also be moved eventually).
> 
> At this stage, only the following feature-set is supported:
>  - DDR3
>  - 32-bit configuration (i.e. fully populated)
>  - dual-rank (i.e. no auto-detection of ranks)
>  - DDR3-1600K speed-bin
> 
> This driver expects to run from a TPL stage that will later return to
> the RK3368 BROM.  It communicates with later stages through the
> os_reg2 in the pmugrf (i.e. using the same mechanism as Rockchip's DDR
> init code).
> 
> Unlike other DMC drivers for RK32xx and RK33xx parts, the required
> timings are calculated within the driver based on a target frequency
> and a DDR3 speed-bin (only the DDR3-1600K speed-bin is support at this
> time).
> 
> The RK3368 also has the DDRC0_CON0 (DDR ch. 0, control-register 0)
> register for controlling the operation of its (single-channel) DRAM
> controller in the GRF block.  This provides for selecting DDR3, mobile
> DDR modes, and control low-power operation.
> As part of this change, DDRC0_CON0 is also added to the GRF structure
> definition (at offset 0x600).
> 
> 
> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> ---
> 
> Changes in v4:
> - updates pctl and phy reset sequences per feedback from typ at rock-chips.com
> 
> Changes in v3:
> - correctly states the location of the driver in the commit message
> 
> Changes in v2: None
> 
>  arch/arm/include/asm/arch-rockchip/ddr_rk3368.h    |  187 ++++
>  arch/arm/include/asm/arch-rockchip/grf_rk3368.h    |    3 +
>  arch/arm/mach-rockchip/rk3368/Makefile             |    1 -
>  arch/arm/mach-rockchip/rk3368/sdram_rk3368.c       |   60 --
>  .../clock/rockchip,rk3368-dmc.txt                  |   67 ++
>  drivers/ram/Makefile                               |    2 +
>  drivers/ram/rockchip/Makefile                      |    7 +
>  drivers/ram/rockchip/dmc-rk3368.c                  | 1007 ++++++++++++++++++++
>  include/dt-bindings/memory/rk3368-dmc.h            |   30 +
>  9 files changed, 1303 insertions(+), 61 deletions(-)
>  create mode 100644 arch/arm/include/asm/arch-rockchip/ddr_rk3368.h
>  delete mode 100644 arch/arm/mach-rockchip/rk3368/sdram_rk3368.c
>  create mode 100644 doc/device-tree-bindings/clock/rockchip,rk3368-dmc.txt
>  create mode 100644 drivers/ram/rockchip/Makefile
>  create mode 100644 drivers/ram/rockchip/dmc-rk3368.c
>  create mode 100644 include/dt-bindings/memory/rk3368-dmc.h
> 

Applied to u-boot-rockchip, thanks!

  reply	other threads:[~2017-08-06 17:18 UTC|newest]

Thread overview: 150+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-02 20:33 [U-Boot] [PATCH v4 00/66] Support OF_PLATDATA in TPL, enable RK3368 DRAM init and add RK3368-uQ7 Philipp Tomsich
2017-08-02 20:33 ` [U-Boot] [PATCH v4 01/66] spl: add a 'return to bootrom' boot method Philipp Tomsich
2017-08-06 17:17   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:33 ` [U-Boot] [PATCH v4 02/66] spl: configure 'return to bootrom' separately for SPL and TPL Philipp Tomsich
2017-08-06 17:17   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:33 ` [U-Boot] [PATCH v4 03/66] rockchip: back-to-bootrom: add 'back-to-bootrom' support for AArch64 Philipp Tomsich
2017-08-06 17:17   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:33 ` [U-Boot] [PATCH v4 04/66] rockchip: back-to-bootrom: split BACK_TO_BOOTROM for TPL/SPL Philipp Tomsich
2017-08-03  7:40   ` Wadim Egorov
2017-08-06 17:17   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 05/66] rockchip: back-to-bootrom: simplify the #ifdef-check for LIBGENERIC in TPL/SPL Philipp Tomsich
2017-08-03  1:24   ` Andy Yan
2017-08-06 17:17   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 06/66] spl: use TPL_SYS_MALLOC_F_LEN for TPL Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 07/66] spl: dm: Kconfig: fix help text for SPL/TPL confusion Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 08/66] spl: dm: Kconfig: use more specific prereqs for SPL_REGMAP and SPL_SYSCON Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 09/66] spl: dm: Kconfig: split REGMAP/SYSCON support for TPL from SPL Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 10/66] spl: dm: Kconfig: SPL_RAM depends on SPL_DM Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 11/66] spl: dm: Kconfig: introduce TPL_RAM (in analogy to SPL_RAM) Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 12/66] spl: dm: Kconfig: SPL_CLK depends on SPL_DM Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 13/66] spl: dm: Kconfig: split CLK support for SPL and TPL Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 14/66] spl: dm: Kconfig: split OF_CONTROL and OF_PLATDATA between " Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 15/66] spl: dm: use CONFIG_IS_ENABLED to test for the DM option Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 16/66] armv8: move low-level assembly functions into function-sections Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 17/66] armv8: spl: Support separate stack for TPL Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 18/66] spl: allow a separate TEXT_BASE, LDSCRIPT and MAX_SIZE " Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 19/66] spl: Kconfig: split SYS_MALLOC_SIMPLE for TPL and SPL Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 20/66] lib: spl: differentiate between TPL and SPL for libfdt/of_control/of_platdata Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 21/66] spl: consistently use $(SPL_TPL_) to select features for SPL and TPL builds Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 22/66] spl: add TPL_DRIVER_MISC_SUPPORT option Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 23/66] drivers: spl: consistently use the $(SPL_TPL_) macro Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 24/66] rockchip: Makefile: allow selective inclusion of sdram_common.o from TPL/SPL/U-Boot Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 25/66] rockchip: rk3368: improve Kconfig text for the RK3368 Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 26/66] rockchip: rk3368: mkimage: add support " Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 27/66] rockchip: rk3368: pmugrf: add definitions for os_reg[0..3] Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 28/66] rockchip: rk3368: spl: define COUNTER_FREQUENCY to 24MHz Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 29/66] rockchip: rk3368: spl: add memory layout for TPL and SPL Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 30/66] rockchip: rk3368: syscon: MSCH/PMUGRF/GRF support for OF_PLATDATA Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 31/66] rockchip: rk3368: syscon: SGRF " Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 32/66] rockchip: rk3368: grf: use shifted-constants Philipp Tomsich
2017-08-03 15:23   ` Simon Glass
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 33/66] rockchip: rk3368: dts: add sgrf node Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 34/66] rockchip: pinctrl: rk3368: add GMAC (RGMII only) support Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 35/66] rockchip: pinctrl: rk3368: add support for configuring the MMC pins Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 36/66] rockchip: pinctrl: rk3368: move IOMUX bit-definitions to pinctrl driver Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 37/66] rockchip: pinctrl: rk3368: add SPI support Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 38/66] rockchip: clk: rk3368: implement bandwidth adjust for PLLs Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 39/66] rockchip: clk: rk3368: support OF_PLATDATA for the RK3368 clk driver Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 40/66] rockchip: clk: rk3368: do not change CPLL/GPLL before returning to BROM Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 41/66] rockchip: clk: rk3368: implement DPLL (DRAM PLL) support Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 42/66] rockchip: clk: rk3368: define DMA1_SRST_REQ and DMA2_SRST_REQ Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 43/66] rockchip: clk: rk3368: implement MMC/SD clock reparenting Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 44/66] rockchip: clk: rk3368: support configuring the DRAM PLL (from TPL) Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 45/66] rockchip: clk: rk3368: add support for GMAC (SLCK_MAC) clock Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 46/66] rockchip: clk: rk3368: mark 'priv' __maybe_unused in rk3368_clk_set_rate() Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 47/66] rockchip: clk: rk3368: add support for configuring the SPI clocks Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 48/66] net: gmac_rockchip: Add support for the RK3368 GMAC Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 49/66] rockchip: Makefile: streamline SPL/TPL configuration Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 50/66] rockchip: rk3368: add DRAM controller driver with DRAM initialisation Philipp Tomsich
2017-08-06 17:18   ` Philipp Tomsich [this message]
2017-08-02 20:34 ` [U-Boot] [PATCH v4 51/66] rockchip: rk3368: dts: add DMC node in rk3368.dtsi Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 52/66] rockchip: rk3368: spl: enable SPL_FRAMEWORK in rk3368_common.h Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 53/66] rockchip: rk3368: spl: add TPL support Philipp Tomsich
2017-08-03  1:18   ` Andy Yan
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 54/66] rockchip: spl: make spl-boot-order code reusable (split from rk3399) Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 55/66] rockchip: rk3368: spl: add SPL support Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 56/66] rockchip: rk3368: spl: mark SPL and TPL as supported for ROCKCHIP_RK3368 Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 57/66] rockchip: spi: enable support for the rk_spi driver for the RK3368 Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 58/66] rockchip: board: lion-rk3368: add support for the RK3368-uQ7 Philipp Tomsich
2017-08-03  1:13   ` Andy Yan
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 59/66] spl: Kconfig: migrate $(SPL_TPL_)LDSCRIPT to Kconfig Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 60/66] rockchip: Kconfig: preset TPL_LDSCRIPT via Kconfig for the RK3368 Philipp Tomsich
2017-08-03 15:24   ` Simon Glass
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-07  1:19     ` Andy Yan
2017-08-07  8:24       ` Dr. Philipp Tomsich
2017-08-07  8:38         ` Andy Yan
2017-08-07  8:39           ` Dr. Philipp Tomsich
2017-08-07  8:45             ` Andy Yan
2017-08-07  8:48           ` Dr. Philipp Tomsich
2017-08-07 14:05             ` Tom Rini
2017-08-07 20:03               ` Dr. Philipp Tomsich
2017-08-08 13:38               ` Dr. Philipp Tomsich
2017-08-09 21:45               ` Masahiro Yamada
2017-08-13 21:35                 ` Simon Glass
2017-08-02 20:34 ` [U-Boot] [PATCH v4 61/66] spl: support TPL_STACK, TPL_MAX_SIZE and TPL_TEXT_BASE via Kconfig Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 62/66] armv8: TPL_STACK will always be defined, so test CONFIG_TPL_NEEDS_SEPARATE_STACK Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 63/66] rockchip: rk3368: mark TPL as not inheriting its stack, text-base and size from SPL Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:34 ` [U-Boot] [PATCH v4 64/66] moveconfig: migrate TPL_STACK, TPL_TEXT_BASE and TPL_MAX_SIZE Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:35 ` [U-Boot] [PATCH v4 65/66] rockchip: board: puma-rk3399: fix warnings in puma_rk3399/fit_spl_atf.its Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2017-08-02 20:35 ` [U-Boot] [PATCH v4 66/66] rockchip: board: puma_rk3399: rename ATF firmware Philipp Tomsich
2017-08-06 17:18   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich

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=E1dePC1-0006Xq-Rc@mail.theobroma-systems.com \
    --to=philipp.tomsich@theobroma-systems.com \
    --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