Re: [PATCH v2 11/28] ram: rockchip: Add rv1126 lpddr4 support
On 2022/8/18 22:52, Jagan Teki wrote: Add LPDDR4 detection timings and support for RV1126. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang Thanks, - Kever --- Changes for v2: - none .../sdram-rv1126-lpddr4-detect-1056.inc | 78 +++ .../sdram-rv1126-lpddr4-detect-328.inc| 78 +++ .../sdram-rv1126-lpddr4-detect-396.inc| 78 +++ .../sdram-rv1126-lpddr4-detect-528.inc| 78 +++ .../sdram-rv1126-lpddr4-detect-664.inc| 78 +++ .../sdram-rv1126-lpddr4-detect-784.inc| 78 +++ .../sdram-rv1126-lpddr4-detect-924.inc| 78 +++ drivers/ram/rockchip/sdram_rv1126.c | 10 +++ 8 files changed, 556 insertions(+) create mode 100644 drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-1056.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-328.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-396.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-528.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-664.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-784.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-924.inc diff --git a/drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-1056.inc b/drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-1056.inc new file mode 100644 index 00..705cbfb5cb --- /dev/null +++ b/drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-1056.inc @@ -0,0 +1,78 @@ +{ + { + { + .rank = 0x1, + .col = 0xB, + .bk = 0x3, + .bw = 0x1, + .dbw = 0x1, + .row_3_4 = 0x0, + .cs0_row = 0x11, + .cs1_row = 0x11, + .cs0_high16bit_row = 0x0, + .cs1_high16bit_row = 0x0, + .ddrconfig = 0 + }, + { + {0x41241522}, + {0x15050b07}, + {0x0602}, + {0x}, + {0x0054}, + {0x}, + 0x00ff + } + }, + { + .ddr_freq = 1056, /* clock rate(MHz) */ + .dramtype = LPDDR4, + .num_channels = 1, + .stride = 0, + .odt = 1 + }, + { + { + {0x, 0x81081020}, /* MSTR */ + {0x0064, 0x00400094}, /* RFSHTMG */ + {0x00d0, 0x00030409}, /* INIT0 */ + {0x00d4, 0x0069}, /* INIT1 */ + {0x00d8, 0x0206}, /* INIT2 */ + {0x00dc, 0x0034001b}, /* INIT3 */ + {0x00e0, 0x0031}, /* INIT4 */ + {0x00e8, 0x0011}, /* INIT6 */ + {0x00ec, 0x}, /* INIT7 */ + {0x00f4, 0x000f033f}, /* RANKCTL */ + {0x0100, 0x14161217}, /* DRAMTMG0 */ + {0x0104, 0x00040422}, /* DRAMTMG1 */ + {0x0108, 0x050a0e0f}, /* DRAMTMG2 */ + {0x010c, 0x00808000}, /* DRAMTMG3 */ + {0x0110, 0x0a04060c}, /* DRAMTMG4 */ + {0x0114, 0x02040808}, /* DRAMTMG5 */ + {0x0118, 0x01010005}, /* DRAMTMG6 */ + {0x011c, 0x0401}, /* DRAMTMG7 */ + {0x0120, 0x0606}, /* DRAMTMG8 */ + {0x0130, 0x0002}, /* DRAMTMG12 */ + {0x0134, 0x0a12}, /* DRAMTMG13 */ + {0x0138, 0x0098}, /* DRAMTMG14 */ + {0x0180, 0x02100010}, /* ZQCTL0 */ + {0x0184, 0x01b0}, /* ZQCTL1 */ + {0x0190, 0x07070001}, /* DFITMG0 */ + {0x0198, 0x07000101}, /* DFILPCFG0 */ + {0x01a0, 0xc043}, /* DFIUPD0 */ + {0x0240, 0x0b050d3c}, /* ODTCFG */ + {0x0244, 0x0101}, /* ODTMAP */ + {0x0250, 0x1f00}, /* SCHED */ + {0x0490, 0x0001}, /* PCTRL_0 */ + {0x, 0x} + } + }, + { + { + {0x0004, 0x008d}, /* PHYREG01 */ +
[PATCH v2 11/28] ram: rockchip: Add rv1126 lpddr4 support
Add LPDDR4 detection timings and support for RV1126. Signed-off-by: Jagan Teki --- Changes for v2: - none .../sdram-rv1126-lpddr4-detect-1056.inc | 78 +++ .../sdram-rv1126-lpddr4-detect-328.inc| 78 +++ .../sdram-rv1126-lpddr4-detect-396.inc| 78 +++ .../sdram-rv1126-lpddr4-detect-528.inc| 78 +++ .../sdram-rv1126-lpddr4-detect-664.inc| 78 +++ .../sdram-rv1126-lpddr4-detect-784.inc| 78 +++ .../sdram-rv1126-lpddr4-detect-924.inc| 78 +++ drivers/ram/rockchip/sdram_rv1126.c | 10 +++ 8 files changed, 556 insertions(+) create mode 100644 drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-1056.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-328.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-396.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-528.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-664.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-784.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-924.inc diff --git a/drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-1056.inc b/drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-1056.inc new file mode 100644 index 00..705cbfb5cb --- /dev/null +++ b/drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-1056.inc @@ -0,0 +1,78 @@ +{ + { + { + .rank = 0x1, + .col = 0xB, + .bk = 0x3, + .bw = 0x1, + .dbw = 0x1, + .row_3_4 = 0x0, + .cs0_row = 0x11, + .cs1_row = 0x11, + .cs0_high16bit_row = 0x0, + .cs1_high16bit_row = 0x0, + .ddrconfig = 0 + }, + { + {0x41241522}, + {0x15050b07}, + {0x0602}, + {0x}, + {0x0054}, + {0x}, + 0x00ff + } + }, + { + .ddr_freq = 1056, /* clock rate(MHz) */ + .dramtype = LPDDR4, + .num_channels = 1, + .stride = 0, + .odt = 1 + }, + { + { + {0x, 0x81081020}, /* MSTR */ + {0x0064, 0x00400094}, /* RFSHTMG */ + {0x00d0, 0x00030409}, /* INIT0 */ + {0x00d4, 0x0069}, /* INIT1 */ + {0x00d8, 0x0206}, /* INIT2 */ + {0x00dc, 0x0034001b}, /* INIT3 */ + {0x00e0, 0x0031}, /* INIT4 */ + {0x00e8, 0x0011}, /* INIT6 */ + {0x00ec, 0x}, /* INIT7 */ + {0x00f4, 0x000f033f}, /* RANKCTL */ + {0x0100, 0x14161217}, /* DRAMTMG0 */ + {0x0104, 0x00040422}, /* DRAMTMG1 */ + {0x0108, 0x050a0e0f}, /* DRAMTMG2 */ + {0x010c, 0x00808000}, /* DRAMTMG3 */ + {0x0110, 0x0a04060c}, /* DRAMTMG4 */ + {0x0114, 0x02040808}, /* DRAMTMG5 */ + {0x0118, 0x01010005}, /* DRAMTMG6 */ + {0x011c, 0x0401}, /* DRAMTMG7 */ + {0x0120, 0x0606}, /* DRAMTMG8 */ + {0x0130, 0x0002}, /* DRAMTMG12 */ + {0x0134, 0x0a12}, /* DRAMTMG13 */ + {0x0138, 0x0098}, /* DRAMTMG14 */ + {0x0180, 0x02100010}, /* ZQCTL0 */ + {0x0184, 0x01b0}, /* ZQCTL1 */ + {0x0190, 0x07070001}, /* DFITMG0 */ + {0x0198, 0x07000101}, /* DFILPCFG0 */ + {0x01a0, 0xc043}, /* DFIUPD0 */ + {0x0240, 0x0b050d3c}, /* ODTCFG */ + {0x0244, 0x0101}, /* ODTMAP */ + {0x0250, 0x1f00}, /* SCHED */ + {0x0490, 0x0001}, /* PCTRL_0 */ + {0x, 0x} + } + }, + { + { + {0x0004, 0x008d}, /* PHYREG01 */ + {0x0014, 0x0014}, /* PHYREG05 */ + {0x0018, 0