Hi Chuanhua,
> > -Original Message-
> > From: Lukasz Majewski
> > Sent: 2019年6月4日 16:19
> > To: Chuanhua Han
> > Cc: h...@denx.de; u-boot@lists.denx.de; Biwen Li
> > Subject: Re: [EXT] Re: [U-Boot] [PATCH 1/2] dm: i2c: Add a flag
> > that not call i2c_setup_offset
> >
> > On Tue, 4 Jun
Fix checkpatch warninigs on sdram_rk3399.c like
- Avoid CamelCase
- Unnecessary parentheses
- Alignment should match open parenthesis
- multiple blank lines
- misspelled
- spaces preferred around that '>>'
Signed-off-by: Jagan Teki
---
drivers/ram/rockchip/sdram_rk3399.c | 48 ++-
This is the v2 set for supporting LPDDR4 with associated
features, wrt to previous series[1].
Thanks to
- YouMin Chen
- Akash Gajjar
- Kever Yang
for supporting all the help on this work.
On summary this series support
- Code warning and fixes
- rank detection, this would required to probe single
Add proper spaces in the code of
- data training functions
- rk3399_dmc_init
No functionality change.
Signed-off-by: Jagan Teki
---
drivers/ram/rockchip/sdram_rk3399.c | 24
1 file changed, 24 insertions(+)
diff --git a/drivers/ram/rockchip/sdram_rk3399.c
b/drivers/ra
Add space between string with format specifier on missing
print and debug calls.
Signed-off-by: Jagan Teki
---
drivers/ram/rockchip/sdram_rk3399.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/ram/rockchip/sdram_rk3399.c
b/drivers/ram/rockchip/sdram_rk3399.c
in
Rename variable name of struct rk3399_sdram_params
from sdram_params with params for more code readability.
No functionality change.
Signed-off-by: Jagan Teki
---
drivers/ram/rockchip/sdram_rk3399.c | 160 ++--
1 file changed, 78 insertions(+), 82 deletions(-)
diff --gi
Add simplified and meaningful macro for cs1_rw.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
arch/arm/include/asm/arch-rockchip/sdram_common.h | 2 ++
drivers/ram/rockchip/sdram_rk3399.c | 3 +--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/i
Add rank_mask based on the rank number, this would keep
the ca data training loop based on the desired rank mask
value instead of looping for all values.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 8 +++-
1 file changed, 7 insertions(+), 1
Order include files in ascending order, which would
avoid conflicting function definitions/prototypes if
any and also for better code readability.
Signed-off-by: Jagan Teki
---
drivers/ram/rockchip/sdram_rk3399.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/ram
data trainings calls like ca, wl, rg, rl, wdql have proper
return types with -EIO and the return type missed to handle
in data_training function.
This patch, add proper return type checks along with useful
debug statement on each data training calls.
Incidentally this would help to prevent the sd
Add simplified and meaningful macro for channel number.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
arch/arm/include/asm/arch-rockchip/sdram_common.h | 2 ++
drivers/ram/rockchip/sdram_rk3399.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch
Add simplified and meaningful macro for ddrtype macro.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
arch/arm/include/asm/arch-rockchip/sdram_common.h | 1 +
drivers/ram/rockchip/sdram_rk3399.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/a
Clear the PI_175 interrupts before processing actual
data training in all relevant calls.
This would help to clear interrupt from previous training.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 15 +++
1 file changed, 15 insertions(
Add simplified and meaningful macro for bw.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
arch/arm/include/asm/arch-rockchip/sdram_common.h | 1 +
drivers/ram/rockchip/sdram_rk3399.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/include/
Add rank_mask based on the rank number, this would keep
the wdql data training loop based on the desired rank mask
value instead of looping for all values.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 8 +++-
1 file changed, 7 insertions(+),
Move the macro definitions after include files for better
code readability and to satisfy coding style.
Signed-off-by: Jagan Teki
---
drivers/ram/rockchip/sdram_rk3399.c | 26 +-
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/ram/rockchip/sdram_rk
Add dram config macro for handling ddr version number.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
arch/arm/include/asm/arch-rockchip/sdram_common.h | 2 ++
drivers/ram/rockchip/sdram_rk3399.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/arch/arm/include/asm
Now we have IO settings available for all supported sdram
frequencies, so retrieve these IO settings and make used
for LPDDR4 ds odt configuration.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 42 -
1 file changed, 36
Add code to get the channel capacity, this would help to
print the capacity of specific channel.
Here is sample print on LPDDR4, 50MHz channel 0
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdra
dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.
Signed-off-by: Jagan Teki
---
arch/arm/include/asm/arch-rockchip/sdram.h| 6 --
arch/arm/include/asm/arch-rockchip/sdram_common.h | 8
arch/arm/include/asm/arc
cs1_row can handle the pmu via sys_reg2 and sys_reg3 while
configuring the dram instead of just sys_reg2.
So, update cs1_row macro to make use of both sys_reg2,
sys_reg3.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
arch/arm/include/asm/arch-rockchip/sdram_common.h | 10 --
Add printdec, this would help to print an
output a decimalism value.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
include/debug_uart.h | 19 +++
1 file changed, 19 insertions(+)
diff --git a/include/debug_uart.h b/include/debug_uart.h
index 34e8b2fc81..cd70ae1a04 10
Add pwrup_srefresh_exit to be part of dram_info so-that
the it can help to support pwrup_srefresh_exit in individual
channels while starting pctl in future.
No functionality change.
Signed-off-by: Jagan Teki
---
drivers/ram/rockchip/sdram_rk3399.c | 13 +++--
1 file changed, 7 insertion
Add support for setting 400MHz ddr clock.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/clk/rockchip/clk_rk3399.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/clk/rockchip/clk_rk3399.c
b/drivers/clk/rockchip/clk_rk3399.c
index 1de21c9f3e..79007b8682 100644
Add support for pctl start for both channel 0, 1 control
and phy registers.
This would also handle pwrup_srefresh_exit init based
on the channel number.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 75 +
1 file chang
Add sdram ddr info print support, this would help to
observe the sdram base parameters.
Here is sample print on LPDDR4, 50MHz channel 0
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
.../include/asm/arch-rockchip/sdram_common.h
Update vref_mode_ac for lpddr4 based on VDDQ/3/2=16.8%
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/ram/rockchip/sdram_rk3399.c
b/drivers/ram/rockchip/sdram_rk3399.c
in
Add rank_mask based on the rank number for lpddr4.
This would keep the ca data training loop based on the
desired rank mask value instead of looping for all values.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 5 -
1 file changed, 4 inserti
Add DDR4 enum number in common header.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
arch/arm/include/asm/arch-rockchip/sdram_common.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h
b/arch/arm/include/asm/arch-rockchip/sdram_com
Rename tsel_wr_select_n to tsel_wr_select_dq_n based
on the bsp code.
No functionality change.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/ram/rockchip/sdra
cs0_row can handle the pmu via sys_reg2 and sys_reg3 while
configuring the dram instead of just sys_reg2.
So, update cs0_row macro to make use of both sys_reg2,
sys_reg3.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
arch/arm/include/asm/arch-rockchip/sdram_common.h | 8 ++--
dr
For base.odt 1 the lpddr4 tsel_rd_en value is depending
on IO settings of rd_odt_en.
Add support for it.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/ram/rockchip
Add simplified and meaningful macro for cs0_rw.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
arch/arm/include/asm/arch-rockchip/sdram_common.h | 2 ++
drivers/ram/rockchip/sdram_rk3399.c | 3 +--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/i
LPDDR4 initialization start with at board selected frequency
and then it switches into 400MHz and 800MHz simultaneously to
make the proper sequence work on each channel with associated
training.
So, add LPDDR4-400 timings inc file in driver area so-that
these timings will take during LPDDR4 initia
Use dram config variable name as sys_reg2 instead of sys_reg
since the final variable value is to written into a pmugrf
register named as sys_reg2.
This reflect the both variable and associated register
names are same and also help to add next sys_reg's to
add it in future.
Signed-off-by: Jagan T
Add stride computation for the sdram which support
single channel a
This configuration available in NanoPi NEO4 and the
same can work with existing rk3399-sdram-ddr3-1866.dtsi
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 4
1 file changed,
Add rank_mask based on the rank number for lpddr4.
This would keep the wdql data training loop based on the
desired rank mask value instead of looping for all values.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 5 -
1 file changed, 4 inser
Add dram config macro for handling cs1 column.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
arch/arm/include/asm/arch-rockchip/sdram_common.h | 3 +++
drivers/ram/rockchip/sdram_rk3399.c | 1 +
2 files changed, 4 insertions(+)
diff --git a/arch/arm/include/asm/arch-ro
Add pmu compatible with relevant U_BOOT_DRIVER for rk3399
via syscon rk3399 driver.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
arch/arm/mach-rockchip/rk3399/syscon_rk3399.c | 8
1 file changed, 8 insertions(+)
diff --git a/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c
b
Add simplified and meaningful macro for dbw.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
arch/arm/include/asm/arch-rockchip/sdram_common.h | 1 +
drivers/ram/rockchip/sdram_rk3399.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/include
Add code to print the channel stride, this would help to
print the stride of associated channel.
Here is sample print on LPDDR4, 50MHz.
256B stride
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
.../include/asm/arch-rockchip/sdram_common.h | 5
drivers/ram/rockchip/sdram_debug
Add support for phy pctrl reset support for both channel 0, 1.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 29 +
1 file changed, 29 insertions(+)
diff --git a/drivers/ram/rockchip/sdram_rk3399.c
b/drivers/ram/rockc
Rename ca_tsel_wr_select_n to tsel_wr_select_ca_n based
on the bsp code.
No functionality change.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/ram/rockchip/sdr
Order tsel* variable declarations and assignment in proper
and meaningful way.
No functionality change.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 37 +
1 file changed, 22 insertions(+), 15 deletions(-)
diff --git
data training can be even required for lpddr4 and we
need to keep the lpddr4 code to compile only for relevant
boards which do support lpddr4.
For this requirement, and for code readability handle
data training via sdram_rk3399_ops and same will update
in future while supporting lpddr4 code.
Sign
The hardware for LPDDR4 with
- CLK0P/N connect to lower 16-bits
- CLK1P/N connect to higher 16-bits
and usually dfi dram clk is configured via CLK1P/N, so
disabling dfi dram clk will disable the CLK1P/N as well.
So, add patch to not to disable dfi dram clk for lpddr4,
with rank 1.
Signed-off-by:
Configure SLEWP_EN, SLEWN_EN for lpddr4 during phy IO config.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 21 +
1 file changed, 21 insertions(+)
diff --git a/drivers/ram/rockchip/sdram_rk3399.c
b/drivers/ram/rockchip/sdram
Add simplified and meaningful macro for bk.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
arch/arm/include/asm/arch-rockchip/sdram_common.h | 2 ++
drivers/ram/rockchip/sdram_rk3399.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm/include
Rename tsel_wr_select_p to tsel_wr_select_dq_p based
on the bsp code.
No functionality change.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/ram/rockchip/sdra
data training is using chan_info as first argument with
channel number as second argument instead of that use
dram_info as first argument so-that we can get the
chan_info at data training definition.
This was the argument handling is meaningful, readable
and it would help to add similar data train
Hi Marek,
> On 6/16/19 12:34 AM, Lukasz Majewski wrote:
> > The code responsible for setting proper values in the MUX registers
> > (in the mxs_pinctrl_set_state()) has been ported from Barebox
> > project (branch: master, SHA1:
> > eb3b0f7414cd8102844dd16b1c789e445e8947f8, file:
> > drivers/pinct
tsel contrl clock drives are required to configure PHY
929, 939 controls drive settings.
Add support for these control clock for all dramtype
sdrams.
Thse control clock drives are configure via tsel_ckcs_select_p
and tsel_ckcs_select_n variables.
tsel_ckcs_select_n is PHY_DRV_ODT_34_3 value wher
Add simplified and meaningful macro for row_3_4.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
arch/arm/include/asm/arch-rockchip/sdram_common.h | 1 +
drivers/ram/rockchip/sdram_rk3399.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/inc
Add simplified and meaningful macro for chip info.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
arch/arm/include/asm/arch-rockchip/sdram_common.h | 1 +
drivers/ram/rockchip/sdram_rk3399.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/i
Add sdram driver to handle debug across rockchip SoCs.
This would help to improve code debugging feature for
sdram drivers in rockchip family, whoever wants to
debug the driver should call these core debug code on
their respective platform sdram drivers.
Signed-off-by: Jagan Teki
Signed-off-by:
Set MR14 based identified controller in lpddr4
as part of LPDDR set rate initialization phase.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 50 +
1 file changed, 50 insertions(+)
diff --git a/drivers/ram/rockchip/sdr
The mode_sel on lpddr4 value is depending on IO settings
of rd_vref.
Add support for it.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/ram/rockchip/sdram_rk3399.c
Add simplified and meaningful macro for column.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
arch/arm/include/asm/arch-rockchip/sdram_common.h | 1 +
drivers/ram/rockchip/sdram_rk3399.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/incl
On Sun, Jun 16, 2019 at 07:34:57PM +0200, Martin Husemann wrote:
> On Sun, Jun 16, 2019 at 09:27:12PM +0200, Mian Yousaf Kaukab wrote:
> > > Hmm. Are you building your own copy of ATF (you mentioned 2.1; I can't
> > > recall what version we ship)?
> > No, I am using the one shipped with R32.1.
>
>
stride value from sdram timings can be computed dynamically
based on the determined capacity for the given channel.
Right now these stride values are taken as part of sdram timings
via dtsi, but it possible to use same timings dtsi for given
frequency even though the configured board sdram do supp
Add u-boot,dm-pre-reloc property for pmu in rk3399-u-boot.dtsi
so-that SPL can access pmu.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
arch/arm/dts/rk3399-u-boot.dtsi | 4
1 file changed, 4 insertions(+)
diff --git a/arch/arm/dts/rk3399-u-boot.dtsi b/arch/arm/dts/rk3399-u-boo
Add proper return type handling of pctl_cfg with
meaningful print statement.
Signed-off-by: Jagan Teki
---
drivers/ram/rockchip/sdram_rk3399.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/ram/rockchip/sdram_rk3399.c
b/drivers/ram/rockchip/sdram_rk3399.c
in
Set CA ODT based identified controller in lpddr4
as part of LPDDR set rate initialization phase.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 49 +
1 file changed, 49 insertions(+)
diff --git a/drivers/ram/rockchip/s
Select the correct Ethernet driver from Synopsis.
Initially, "Synopsys Designware Ethernet MAC" driver was wrongly
selected instead of "Synopsys DWC Ethernet QOS device" driver.
Fixes: commit f90b3f5b68ed ("configs: stm32mp15: Enable Ethernet feature")
Signed-off-by: Patrice Chotard
---
config
Use LPDDR4-100 sdram timings dtsi for RockPI-4 board.
All these timings are processed during TPL stage of rock-pi-4 board,
bootchain. This make TPL would replace rockchip in house rkbin in
current bootchain.
Bootchain after and before this change:
TPL -> SPL -> U-Boot proper
rkbin -> SPL ->
LPDDR4 initialization start with at board selected frequency
and then it switches into 400MHz and 800MHz simultaneously to
make the proper sequence work on each channel with associated
training.
So, add LPDDR4-800 timings inc file in driver area so-that
these timings will take during LPDDR4 initia
Add DdrMode structure with associated bit fields.
These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.
Signed-off-by: Jagan Teki
---
.../include/asm/arch-rockchip/sdram_rk3399.h| 17 -
drivers/ram/rockchip/sdram_rk3399.c | 2 +-
Add support for setting 50MHz ddr clock.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/clk/rockchip/clk_rk3399.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/clk/rockchip/clk_rk3399.c
b/drivers/clk/rockchip/clk_rk3399.c
index 5d1ad94e85..1de21c9f3e 100644
Add simplified and meaningful macro for rank.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
arch/arm/include/asm/arch-rockchip/sdram_common.h | 2 ++
drivers/ram/rockchip/sdram_rk3399.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm/inclu
Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig
into a common cap_info structure for more code readability and extend
if possible based on the new features.
Signed-off-by: Jagan Teki
---
.../include/asm/arch-rockchip/sdram_rk3399.h | 6 +
Due to foot-print issues, we have LPDDR4 code can be
marked as CONFIG_RAM_RK3399_LPDDR4.
So, enable it for Rockpro64 board.
Signed-off-by: Jagan Teki
---
configs/rockpro64-rk3399_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/configs/rockpro64-rk3399_defconfig
b/configs/rockpro6
mode_sel assignment is based on dram type.
In phy_io_config, already have vref setting based
on the dram type, so move this mode_sel assignment
on vref setting area.
No functionality change.
Signed-off-by: Jagan Teki
---
drivers/ram/rockchip/sdram_rk3399.c | 12 +++-
1 file changed, 3
Use LPDDR4-100 sdram timings dtsi for Rockpro64 board.
All these timings are processed during TPL stage of rockpro64 board,
bootchain. This make TPL would replace rockchip in house rkbin in
current bootchain.
Bootchain after and before this change:
TPL -> SPL -> U-Boot proper
rkbin -> SPL -
Set MR12 based identified controller in lpddr4
as part of LPDDR set rate initialization phase.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 50 +
1 file changed, 50 insertions(+)
diff --git a/drivers/ram/rockchip/sdr
Configure BOOSTP_EN, BOOSTN_EN for lpddr4 during phy IO config.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 24
1 file changed, 24 insertions(+)
diff --git a/drivers/ram/rockchip/sdram_rk3399.c
b/drivers/ram/rockchip/
Right now sdram drivers in rockchip SoC are built based
on the SoC configs which may not be an adequate solutions
while adding common or debug driver.
So, add meaningful Kconfig options start with rk3399.
Signed-off-by: Jagan Teki
---
drivers/ram/Kconfig | 1 +
drivers/ram/rockchip/K
tsel write ca_p and ca_n values need to write on PHY 544, 672
and 800 to configure ds odt.
Configure the same PHY register for lpddr4 would require a mask
value of (300 << 8).
Add support for it.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 15
- CHECK: spaces preferred around that '*'
- CHECK: spaces preferred around that '/'
- CHECK: space preferred before that '|'
- WARNING: macros should not use a trailing semicolon
- CHECK: Unnecessary parentheses around 'fbdiv <= min_fbdiv'
- CHECK: Unnecessary parentheses around 'parent->id == SCLK
Add pmu header file for rk3399 SoC, this will help
to configure pmu in sdram driver.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
.../include/asm/arch-rockchip/pmu_rk3399.h| 72 +++
1 file changed, 72 insertions(+)
create mode 100644 arch/arm/include/asm/arch-ro
Set MR3 based identified controller in lpddr4
as part of LPDDR set rate initialization phase.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 48 +
1 file changed, 48 insertions(+)
diff --git a/drivers/ram/rockchip/sdra
lpddr4 has PLL bypass mode during phy initialization phase,
which does all pll configurations.
So no need to wait explicitly during pctl config.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 26 --
1 file changed, 16 inse
Add sdram timings for LPDDR4-100 via rk3399-sdram-lpddr4-100.dtsi file.
all timings are dumped from rkbin/bin/rk33/rk3399_ddr_800MHz_v1.20.bin
Associated LPDDR4 board -u-boot.dtsi can include this to make these
timings available during SPL or TPL stages.
Signed-off-by: Jagan Teki
Signed-off-by:
It is possible in lpddr4 dram, where both the channels would
start at same time with ZQ Cal Start. If it uses ZQ Call start
then it will use RZQ.
For example LPDDR4 366 Dual-Die, Quad-Channel Package, RZQ maybe
connect to both channel. If ZQ Cal Start at the same time,
it will use the same RZQ.
I
Add DdrTimingC0 structure with associated bit fields.
These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.
Signed-off-by: Jagan Teki
---
arch/arm/include/asm/arch-rockchip/sdram_rk3399.h | 12 +++-
drivers/ram/rockchip/sdram_rk3399.c | 2
Configure PHY RX_CM_INPUT for lpddr4 during phy IO config.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 22 ++
1 file changed, 22 insertions(+)
diff --git a/drivers/ram/rockchip/sdram_rk3399.c
b/drivers/ram/rockchip/sdram_r
DDR set rate can be even required for lpddr4 and we
need to keep the lpddr4 code to compile only for relevant
boards which do support lpddr4.
For this requirement, and for code readability handle
data training via sdram_rk3399_ops with .set_rate and
same will update in future while supporting lpdd
Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.
So, rename the structure from rk3399_base_params into
sdram_base_params.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
arch/arm/include/asm/arch-
Since this request is a no-op, it is best to drop the
pinctrl_request_noflags(pinctrl, PERIPH_ID_PWM?) lines in
board/rockchip/evb_rk3399/evb-rk3399.c (there're no such code lines in other
rk3399 board files), which is tested to work with the Firefly-RK3399 board.
Therefore, are the PERIPH_ID_PWM
Rename ca_tsel_wr_select_p to tsel_wr_select_ca_p based
on the bsp code.
No functionality change.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/ram/rockchip/sdr
Like data training in other sdram types, mr detection need
to taken care for lpddr4 with looped rank and associated
channel to make sure the proper configuration held.
Once the mr detection successful for active and configured
rank with channel number, the same can later reused during
actual LPDDR
Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.
Signed-off-by: Jagan Teki
---
.../include/asm/arch-rockchip/sdram_common.h | 29 +++
.../include/asm/arch-rockchip/
Some dramtypes like lpddr4 initialization would required to
configure phy IO even after pctl_cfg and after set_ds_odt.
For those cases the set_ds_odt would be an initial call to
setup the phy.
To satisfy all the cases, trigger phy IO from set_ds_odt.
Signed-off-by: Jagan Teki
---
drivers/ram/r
Hi Tom,
Please pull this PR.
Summary:
- Drop zipitz2 board (Tom)
- Add DEPRECATED option (Tom)
- Mark legacy or non-dm drivers as DEPRECATED (Jagan)
thanks,
Jagan.
The following changes since commit 68b90e57bc034e237923b02acb633dc4e91d44cb:
configs: tinker-rk3288 disable CONFIG_SPL_I2C_SUPPO
This would help to debug the sdram base parameters while
debugging existing chip or while supporting new sdram type.
It require explicit enablement of CONFIG_RAM_ROCKCHIP_DEBUG
for showing the debug prints.
Signed-off-by: Jagan Teki
---
drivers/ram/rockchip/sdram_rk3399.c | 5 +
1 file chan
PHY_898, PHY_919 would require to configure PHY LP4 boot
pll control and ca for lpddr4.
So, configure the same in pctl_cfg for LPDDR4.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/r
On Wed, Jun 12, 2019 at 10:07:11PM +0800, Bin Meng wrote:
> On Wed, Jun 12, 2019 at 9:49 PM Andy Shevchenko
> wrote:
> > On Wed, Jun 12, 2019 at 04:23:37PM +0300, Andy Shevchenko wrote:
> > > On Wed, Jun 12, 2019 at 04:18:25PM +0300, Andy Shevchenko wrote:
> > commit 665cb18ea64aabbeb03d27a4c92dd
Trivial patch, add proper spaces in pctl_cfg.
Signed-off-by: Jagan Teki
---
drivers/ram/rockchip/sdram_rk3399.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/ram/rockchip/sdram_rk3399.c
b/drivers/ram/rockchip/sdram_rk3399.c
index ae9ba625bd..d5ff17ad4f 100644
--- a/drivers/ram/r
The vref_mode_dq, vref_value_dq on lpddr4 value is depending
on IO settings of rd_vref.
Add support for it.
Signed-off-by: Jagan Teki
Signed-off-by: YouMin Chen
---
drivers/ram/rockchip/sdram_rk3399.c | 19 ++-
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/driv
Add IO settings for dram ctl and phy.
IO settings are useful for configuring ctl, phy odt, vref,
mr5, mode select and other needed input output operations
for lpddr4 or any other dramtype sdram.
Right now, this patch added IO setting for all supported
sdram frequencies.
Signed-off-by: Jagan Teki
Use DDR3-1866 2GB ddr timings dtsi for 1GB NanoPi Neo4 board.
Since sdram rk3399 support dynamic stride and rank detection it
can able to detect 1GB ddr eventough the timings are meant for
dual channel, 2GB size.
Bootchain after and before this change are:
TPL -> SPL -> U-Boot proper
rkbin ->
1 - 100 of 207 matches
Mail list logo