/* Boards included:
	a2bub
	a2bub_1gb
	a2evk
	a2evk_1gb
	a2ipc
	a2sbub
	a3bub
	a5bub
	a5a2bub
	camry
	civet
	dv5090
	hd747
	omijia
	quail
	quail2
	serpent
	wow3
	z5x2
	a2s_512Mb
	a2s_1Gb
*/

/* Sync on 2007/05/28 */
[a2bub]
#define ARCH_VER		2000
#define DRAM_SIZE		0x04000000	/* 512 Mbit */
#define DRAM_CFG_VAL		0x10000009
#define DRAM_EXT_MODE_VAL	0x00000004

#define DRAM_MODE____135MHZ	0x00001442
#define DRAM_TIMING1_135MHZ	0x1c5244a5
#define DRAM_TIMING2_135MHZ	0x00000006
#define DRAM_REF_CTL_135MHZ	0x0000883b

#define DRAM_MODE____182MHZ	0x00001442
#define DRAM_TIMING1_182MHZ	0x265254a5
#define DRAM_TIMING2_182MHZ	0x00000009
#define DRAM_REF_CTL_182MHZ	0x00008b1f

#define DRAM_MODE____216MHZ	0x00001642
#define DRAM_TIMING1_216MHZ	0x2c5b5db9
#define DRAM_TIMING2_216MHZ	0x0000000a
#define DRAM_REF_CTL_216MHZ	0x00008d2f

#define DRAM_MODE____229MHZ	0x00001642
#define DRAM_TIMING1_229MHZ	0x305b65b9
#define DRAM_TIMING2_229MHZ	0x0000000b
#define DRAM_REF_CTL_229MHZ	0x00008e01

#define DRAM_MODE____243MHZ	0x00001642
#define DRAM_TIMING1_243MHZ	0x325b6db9
#define DRAM_TIMING2_243MHZ	0x0000000c
#define DRAM_REF_CTL_243MHZ	0x00008ed3

#define DRAM_MODE____256MHZ	0x00001642
#define DRAM_TIMING1_256MHZ	0x345b75b9
#define DRAM_TIMING2_256MHZ	0x0000000c
#define DRAM_REF_CTL_256MHZ	0x00008f9f

#define DRAM_MODE____270MHZ	0x00001842
#define DRAM_TIMING1_270MHZ	0x38a476c9
#define DRAM_TIMING2_270MHZ	0x0000000d
#define DRAM_REF_CTL_270MHZ	0x00009045

#define DRAM_MODE____283MHZ	0x00001842
#define DRAM_TIMING1_283MHZ	0x38a476c9
#define DRAM_TIMING2_283MHZ	0x0000000e
#define DRAM_REF_CTL_283MHZ	0x00009045

#define RCT_DLL0_135MHZ		0x000d0d78
#define RCT_DLL1_135MHZ		0x000d0d78
#define RCT_DLL0_182MHZ		0x000d0d78
#define RCT_DLL1_182MHZ		0x000d0d78
#define RCT_DLL0_216MHZ		0x000d0d78
#define RCT_DLL1_216MHZ		0x000d1478
#define RCT_DLL0_230MHZ		0x000a0a78
#define RCT_DLL1_230MHZ		0x000a0a78
#define RCT_DLL0_243MHZ		0x00070778
#define RCT_DLL1_243MHZ		0x00070778
#define RCT_DLL0_256MHZ		0x00070778
#define RCT_DLL1_256MHZ		0x00070778
#define RCT_DLL0_270MHZ		0x00050578
#define RCT_DLL1_270MHZ		0x00050578
#define RCT_DLL0_283MHZ		0x001c1cc8
#define RCT_DLL1_283MHZ		0x001c1cc8

#define CORE_PLL_FINE_ADJUST	0x00029c0a

/* Sync on 2008/03/07 */
[a2bub_1gb]
#define ARCH_VER		2000
#define DRAM_SIZE		0x08000000	/* 1 Gbit */
#define DRAM_CFG_VAL		0x1000000a
#define DRAM_EXT_MODE_VAL	0x00000004

#define DRAM_MODE____135MHZ	0x00001442
#define DRAM_TIMING1_135MHZ	0x225244a5
#define DRAM_TIMING2_135MHZ	0x00000006
#define DRAM_REF_CTL_135MHZ	0x0000883b

#define DRAM_MODE____182MHZ	0x00001442
#define DRAM_TIMING1_182MHZ	0x2e5254a5
#define DRAM_TIMING2_182MHZ	0x00000009
#define DRAM_REF_CTL_182MHZ	0x00008b1f

#define DRAM_MODE____189MHZ	0x00001642
#define DRAM_TIMING1_189MHZ	0x365b65b9
#define DRAM_TIMING2_189MHZ	0x0000000a
#define DRAM_REF_CTL_189MHZ	0x00008d2f

#define DRAM_MODE____216MHZ	0x00001652
#define DRAM_TIMING1_216MHZ	0x365b5e3a
#define DRAM_TIMING2_216MHZ	0x0000000a
#define DRAM_REF_CTL_216MHZ	0x00008d2f

#define DRAM_MODE____229MHZ	0x00001642
#define DRAM_TIMING1_229MHZ	0x3a5b65b9
#define DRAM_TIMING2_229MHZ	0x0000000b
#define DRAM_REF_CTL_229MHZ	0x00008e01

#define DRAM_MODE____243MHZ	0x00001642
#define DRAM_TIMING1_243MHZ	0x3c5b6db9
#define DRAM_TIMING2_243MHZ	0x0000000c
#define DRAM_REF_CTL_243MHZ	0x00008ed3

#define DRAM_MODE____256MHZ	0x00001642
#define DRAM_TIMING1_256MHZ	0x405b75b9
#define DRAM_TIMING2_256MHZ	0x0000000c
#define DRAM_REF_CTL_256MHZ	0x00008f9f

#define DRAM_MODE____270MHZ	0x00001842
#define DRAM_TIMING1_270MHZ	0x44a476c9
#define DRAM_TIMING2_270MHZ	0x0000000d
#define DRAM_REF_CTL_270MHZ	0x00009079

#define DRAM_MODE____283MHZ	0x00001842
#define DRAM_TIMING1_283MHZ	0x44a476c9
#define DRAM_TIMING2_283MHZ	0x0000000d
#define DRAM_REF_CTL_283MHZ	0x00009079

#define RCT_DLL0_135MHZ		0x000d0d78
#define RCT_DLL1_135MHZ		0x000d0d78
#define RCT_DLL0_182MHZ		0x000d0d78
#define RCT_DLL1_182MHZ		0x000d0d78
#define RCT_DLL0_189MHZ		0x000d0d78
#define RCT_DLL1_189MHZ		0x000d0d78
#define RCT_DLL0_216MHZ		0x000000c8
#define RCT_DLL1_216MHZ		0x000000c8
#define RCT_DLL0_230MHZ		0x000a0a78
#define RCT_DLL1_230MHZ		0x000a0a78
#define RCT_DLL0_243MHZ		0x00070778
#define RCT_DLL1_243MHZ		0x00070778
#define RCT_DLL0_256MHZ		0x00070778
#define RCT_DLL1_256MHZ		0x00070778
#define RCT_DLL0_270MHZ		0x00050578
#define RCT_DLL1_270MHZ		0x00050578
#define RCT_DLL0_283MHZ		0x001c1cc8
#define RCT_DLL1_283MHZ		0x001c1cc8

#define CORE_PLL_FINE_ADJUST	0x00029c0a

/* Sync on 2007/05/28 */
[a2evk]
#define ARCH_VER		2000
#define DRAM_SIZE		0x04000000	/* 512 Mbit */
#define DRAM_CFG_VAL		0x10000009
#define DRAM_EXT_MODE_VAL	0x00000004

#define DRAM_MODE____135MHZ	0x00001442
#define DRAM_TIMING1_135MHZ	0x1c5244a5
#define DRAM_TIMING2_135MHZ	0x00000006
#define DRAM_REF_CTL_135MHZ	0x0000883b

#define DRAM_MODE____182MHZ	0x00001442
#define DRAM_TIMING1_182MHZ	0x265254a5
#define DRAM_TIMING2_182MHZ	0x00000009
#define DRAM_REF_CTL_182MHZ	0x00008b1f

#define DRAM_MODE____216MHZ	0x00001642
#define DRAM_TIMING1_216MHZ	0x2c5b5db9
#define DRAM_TIMING2_216MHZ	0x0000000a
#define DRAM_REF_CTL_216MHZ	0x00008d2f

#define DRAM_MODE____229MHZ	0x00001642
#define DRAM_TIMING1_229MHZ	0x305b65b9
#define DRAM_TIMING2_229MHZ	0x0000000b
#define DRAM_REF_CTL_229MHZ	0x00008e01

#define DRAM_MODE____243MHZ	0x00001642
#define DRAM_TIMING1_243MHZ	0x325b6db9
#define DRAM_TIMING2_243MHZ	0x0000000c
#define DRAM_REF_CTL_243MHZ	0x00008ed3

#define DRAM_MODE____256MHZ	0x00001642
#define DRAM_TIMING1_256MHZ	0x345b75b9
#define DRAM_TIMING2_256MHZ	0x0000000c
#define DRAM_REF_CTL_256MHZ	0x00008f9f

#define DRAM_MODE____270MHZ	0x00001842
#define DRAM_TIMING1_270MHZ	0x38a476c9
#define DRAM_TIMING2_270MHZ	0x0000000d
#define DRAM_REF_CTL_270MHZ	0x00009045

#define DRAM_MODE____283MHZ	0x00001842
#define DRAM_TIMING1_283MHZ	0x38a476c9
#define DRAM_TIMING2_283MHZ	0x0000000e
#define DRAM_REF_CTL_283MHZ	0x00009045

#define RCT_DLL0_135MHZ		0x000d0d78
#define RCT_DLL1_135MHZ		0x000d0d78
#define RCT_DLL0_182MHZ		0x000d0d78
#define RCT_DLL1_182MHZ		0x000d0d78
#define RCT_DLL0_216MHZ		0x000d0d78
#define RCT_DLL1_216MHZ		0x000d0d78
#define RCT_DLL0_230MHZ		0x000a0a78
#define RCT_DLL1_230MHZ		0x000a0a78
#define RCT_DLL0_243MHZ		0x00070778
#define RCT_DLL1_243MHZ		0x00070778
#define RCT_DLL0_256MHZ		0x00070778
#define RCT_DLL1_256MHZ		0x00070778
#define RCT_DLL0_270MHZ		0x00050578
#define RCT_DLL1_270MHZ		0x00050578
#define RCT_DLL0_283MHZ		0x001c1cc8
#define RCT_DLL1_283MHZ		0x001c1cc8

#define CORE_PLL_FINE_ADJUST	0x00029c0a

/* Sync on 2008/03/07 */
[a2evk_1gb]
#define ARCH_VER		2000
#define DRAM_SIZE		0x08000000	/* 1 Gbit */
#define DRAM_CFG_VAL		0x1000000a
#define DRAM_EXT_MODE_VAL	0x00000004

#define DRAM_MODE____135MHZ	0x00001452
#define DRAM_TIMING1_135MHZ	0x22524d26
#define DRAM_TIMING2_135MHZ	0x00000026
#define DRAM_REF_CTL_135MHZ	0x0000883b

#define DRAM_MODE____182MHZ	0x00001452
#define DRAM_TIMING1_182MHZ	0x2e525526
#define DRAM_TIMING2_182MHZ	0x00000029
#define DRAM_REF_CTL_182MHZ	0x00008b1f

#define DRAM_MODE____216MHZ	0x00001652
#define DRAM_TIMING1_216MHZ	0x365b663a
#define DRAM_TIMING2_216MHZ	0x0000002a
#define DRAM_REF_CTL_216MHZ	0x00008d2f

#define DRAM_MODE____229MHZ	0x00001652
#define DRAM_TIMING1_229MHZ	0x3a5b6e3a
#define DRAM_TIMING2_229MHZ	0x0000002b
#define DRAM_REF_CTL_229MHZ	0x00008e01

#define DRAM_MODE____243MHZ	0x00001652
#define DRAM_TIMING1_243MHZ	0x3c5b763a
#define DRAM_TIMING2_243MHZ	0x0000002c
#define DRAM_REF_CTL_243MHZ	0x00008ed3

#define DRAM_MODE____256MHZ	0x00001652
#define DRAM_TIMING1_256MHZ	0x405b7e3a
#define DRAM_TIMING2_256MHZ	0x0000002c
#define DRAM_REF_CTL_256MHZ	0x00008f9f

#define DRAM_MODE____270MHZ	0x00001852
#define DRAM_TIMING1_270MHZ	0x44a4874a
#define DRAM_TIMING2_270MHZ	0x0000004d
#define DRAM_REF_CTL_270MHZ	0x00009079

#define DRAM_MODE____283MHZ	0x00001842
#define DRAM_TIMING1_283MHZ	0x44a476c9
#define DRAM_TIMING2_283MHZ	0x0000000d
#define DRAM_REF_CTL_283MHZ	0x00009079

#define RCT_DLL0_135MHZ		0x000d0d78
#define RCT_DLL1_135MHZ		0x000d0d78
#define RCT_DLL0_182MHZ		0x000d0d78
#define RCT_DLL1_182MHZ		0x000d0d78
#define RCT_DLL0_216MHZ		0x000000bf
#define RCT_DLL1_216MHZ		0x000000bf
#define RCT_DLL0_230MHZ		0x000a0a78
#define RCT_DLL1_230MHZ		0x000a0a78
#define RCT_DLL0_243MHZ		0x00070778
#define RCT_DLL1_243MHZ		0x00070778
#define RCT_DLL0_256MHZ		0x00070778
#define RCT_DLL1_256MHZ		0x00070778
#define RCT_DLL0_270MHZ		0x00050578
#define RCT_DLL1_270MHZ		0x00050578
#define RCT_DLL0_283MHZ		0x001c1cc8
#define RCT_DLL1_283MHZ		0x001c1cc8

#define CORE_PLL_FINE_ADJUST	0x00029c0a

/* Sync on 2007/08/08 */
[a2ipc]
#define ARCH_VER		2000
#define DRAM_SIZE		0x04000000	/* 512 Mbit */
#define DRAM_CFG_VAL		0x10000009
#define DRAM_EXT_MODE_VAL	0x00000004

#define DRAM_MODE____135MHZ	0x00001442
#define DRAM_TIMING1_135MHZ	0x1c5244a5
#define DRAM_TIMING2_135MHZ	0x00000006
#define DRAM_REF_CTL_135MHZ	0x0000883b

#define DRAM_MODE____182MHZ	0x00001442
#define DRAM_TIMING1_182MHZ	0x265254a5
#define DRAM_TIMING2_182MHZ	0x00000009
#define DRAM_REF_CTL_182MHZ	0x00008b1f

#define DRAM_MODE____189MHZ	0x00001442
#define DRAM_TIMING1_189MHZ	0x26525ca5
#define DRAM_TIMING2_189MHZ	0x00000009
#define DRAM_REF_CTL_189MHZ	0x00008b87

#define DRAM_MODE____216MHZ	0x00001642
#define DRAM_TIMING1_216MHZ	0x2c5b5db9
#define DRAM_TIMING2_216MHZ	0x0000000a
#define DRAM_REF_CTL_216MHZ	0x00008d2f

#define DRAM_MODE____229MHZ	0x00001642
#define DRAM_TIMING1_229MHZ	0x305b65b9
#define DRAM_TIMING2_229MHZ	0x0000000b
#define DRAM_REF_CTL_229MHZ	0x00008e01

#define DRAM_MODE____243MHZ	0x00001642
#define DRAM_TIMING1_243MHZ	0x325b6db9
#define DRAM_TIMING2_243MHZ	0x0000000c
#define DRAM_REF_CTL_243MHZ	0x00008ed3

#define DRAM_MODE____256MHZ	0x00001642
#define DRAM_TIMING1_256MHZ	0x345b75b9
#define DRAM_TIMING2_256MHZ	0x0000000c
#define DRAM_REF_CTL_256MHZ	0x00008f9f

#define DRAM_MODE____270MHZ	0x00001842
#define DRAM_TIMING1_270MHZ	0x38a476c9
#define DRAM_TIMING2_270MHZ	0x0000000d
#define DRAM_REF_CTL_270MHZ	0x00009045

#define DRAM_MODE____283MHZ	0x00001842
#define DRAM_TIMING1_283MHZ	0x38a476c9
#define DRAM_TIMING2_283MHZ	0x0000000e
#define DRAM_REF_CTL_283MHZ	0x00009045

#define RCT_DLL0_135MHZ		0x000d0d78
#define RCT_DLL1_135MHZ		0x000d0d78
#define RCT_DLL0_182MHZ		0x000d0d78
#define RCT_DLL1_182MHZ		0x000d0d78
#define RCT_DLL0_189MHZ		0x00000778
#define RCT_DLL1_189MHZ		0x00000778
#define RCT_DLL0_216MHZ		0x00000078
#define RCT_DLL1_216MHZ		0x00000078
#define RCT_DLL0_230MHZ		0x000a0a78
#define RCT_DLL1_230MHZ		0x000a0a78
#define RCT_DLL0_243MHZ		0x000000a8
#define RCT_DLL1_243MHZ		0x000000a8
#define RCT_DLL0_256MHZ		0x00070778
#define RCT_DLL1_256MHZ		0x00070778
#define RCT_DLL0_270MHZ		0x00050578
#define RCT_DLL1_270MHZ		0x00050578
#define RCT_DLL0_283MHZ		0x001c1cc8
#define RCT_DLL1_283MHZ		0x001c1cc8

#define CORE_PLL_FINE_ADJUST	0x00029c0a

/* Sync on 2008/08/29 (a2sbub_20) */
[a2sbub]
#define ARCH_VER		2100
#define DRAM_SIZE		0x08000000	/* 1024 Mbit */
#define DRAM_CFG_VAL		0x1000000a
#define DRAM_EXT_MODE_VAL	0x00000004

#define DRAM_MODE____108MHZ	0x00001452
#define DRAM_TIMING1_108MHZ	0x22524d26
#define DRAM_TIMING2_108MHZ	0x00000026
#define DRAM_REF_CTL_108MHZ	0x0000883b

#define DRAM_MODE____135MHZ	0x00001452
#define DRAM_TIMING1_135MHZ	0x22524d26
#define DRAM_TIMING2_135MHZ	0x00000026
#define DRAM_REF_CTL_135MHZ	0x0000883b

#define DRAM_MODE____216MHZ	0x00001652
#define DRAM_TIMING1_216MHZ	0x365b663a
#define DRAM_TIMING2_216MHZ	0x0000002a
#define DRAM_REF_CTL_216MHZ	0x00008d2f

#define DRAM_MODE____243MHZ	0x00001652
#define DRAM_TIMING1_243MHZ	0x3c5b763a
#define DRAM_TIMING2_243MHZ	0x0000002c
#define DRAM_REF_CTL_243MHZ	0x00008ed3

#define RCT_DLL0_108MHZ		0x00100620
#define RCT_DLL1_108MHZ		0x00100620
#define RCT_DLL0_135MHZ		0x00100620
#define RCT_DLL1_135MHZ		0x00100620
#define RCT_DLL0_216MHZ		0x00100620
#define RCT_DLL1_216MHZ		0x00100620
#define RCT_DLL0_243MHZ		0x00100620
#define RCT_DLL1_243MHZ		0x00100620

#define RCT_DLL_CTRL_SEL_VAL	0x00007000
#define RCT_DLL_OCD_BITS_VAL	0x00091556

/* Sync on 2007/07/03 */
[a3bub]
#define ARCH_VER		3000
#define PLL_CORE_216MHZ_VAL	0x1003fa0a
#define DRAM_SIZE		0x10000000	/* 2G bit */
#define DRAM_CFG_VAL		0x1000000a
#define DRAM_EXT_MODE_VAL	0x00000004

#define DRAM_MODE____135MHZ	0x00001442
#define DRAM_TIMING1_135MHZ	0x1c5244a5
#define DRAM_TIMING2_135MHZ	0x00000006
#define DRAM_REF_CTL_135MHZ	0x0000883b

#define DRAM_MODE____182MHZ	0x00001442
#define DRAM_TIMING1_182MHZ	0x265254a5
#define DRAM_TIMING2_182MHZ	0x00000009
#define DRAM_REF_CTL_182MHZ	0x00008b1f

#define DRAM_MODE____216MHZ	0x00001642
#define DRAM_TIMING1_216MHZ	0x0024a425
#define DRAM_TIMING2_216MHZ	0x00001a09
#define DRAM_REF_CTL_216MHZ	0x00008349

#define DRAM_MODE____229MHZ	0x00001642
#define DRAM_TIMING1_229MHZ	0x305b65b9
#define DRAM_TIMING2_229MHZ	0x0000000b
#define DRAM_REF_CTL_229MHZ	0x00008e01

#define DRAM_MODE____243MHZ	0x00001642
#define DRAM_TIMING1_243MHZ	0x325b6db9
#define DRAM_TIMING2_243MHZ	0x0000000c
#define DRAM_REF_CTL_243MHZ	0x00008ed3

#define DRAM_MODE____256MHZ	0x00001642
#define DRAM_TIMING1_256MHZ	0x345b75b9
#define DRAM_TIMING2_256MHZ	0x0000000c
#define DRAM_REF_CTL_256MHZ	0x00008f9f

#define DRAM_MODE____270MHZ	0x00001842
#define DRAM_TIMING1_270MHZ	0x38a476c9
#define DRAM_TIMING2_270MHZ	0x0000000d
#define DRAM_REF_CTL_270MHZ	0x00009045

#define DRAM_MODE____283MHZ	0x00001842
#define DRAM_TIMING1_283MHZ	0x38a476c9
#define DRAM_TIMING2_283MHZ	0x0000000e
#define DRAM_REF_CTL_283MHZ	0x00009045

#define RCT_DLL0_135MHZ		0x00000078
#define RCT_DLL1_135MHZ		0x00000078
#define RCT_DLL2_135MHZ		0x00000078
#define RCT_DLL3_135MHZ		0x00000078
#define RCT_DLL0_182MHZ		0x00000078
#define RCT_DLL1_182MHZ		0x00000078
#define RCT_DLL2_182MHZ		0x00000078
#define RCT_DLL3_182MHZ		0x00000078
#define RCT_DLL0_216MHZ		0x00000078
#define RCT_DLL1_216MHZ		0x00000078
#define RCT_DLL2_216MHZ		0x00000078
#define RCT_DLL3_216MHZ		0x00000078
#define RCT_DLL0_230MHZ		0x00000078
#define RCT_DLL1_230MHZ		0x00000078
#define RCT_DLL2_230MHZ		0x00000078
#define RCT_DLL3_230MHZ		0x00000078
#define RCT_DLL0_243MHZ		0x00000078
#define RCT_DLL1_243MHZ		0x00000078
#define RCT_DLL2_243MHZ		0x00000078
#define RCT_DLL3_243MHZ		0x00000078
#define RCT_DLL0_256MHZ		0x00000078
#define RCT_DLL1_256MHZ		0x00000078
#define RCT_DLL2_256MHZ		0x00000078
#define RCT_DLL3_256MHZ		0x00000078
#define RCT_DLL0_270MHZ		0x00000078
#define RCT_DLL1_270MHZ		0x00000078
#define RCT_DLL2_270MHZ		0x00000078
#define RCT_DLL3_270MHZ		0x00000078
#define RCT_DLL0_283MHZ		0x00000078
#define RCT_DLL1_283MHZ		0x00000078
#define RCT_DLL2_283MHZ		0x00000078
#define RCT_DLL3_283MHZ		0x00000078

/* Sync to 2008/12/3 */
[a5bub]
#define ARCH_VER		5000
#define PLL_CORE_108MHZ_VAL	0x0f021100
#define PLL_CORE_121MHZ_VAL	0x11021100
#define DRAM_SIZE		0x08000000	/* 1G bit */
#define DRAM_CFG_VAL		0x00018424

#define DRAM_EXT_MODE0_216MHZ	0x00001643
#define DRAM_EXT_MODE1_216MHZ	0x00000004
#define DRAM_EXT_MODE2_216MHZ	0x00000000
#define DRAM_EXT_MODE3_216MHZ	0x00000000
#define DRAM_TIMING1_216MHZ	0x023a8921
#define DRAM_TIMING2_216MHZ	0x0320d048
#define RCT_DLL0_216MHZ		0x00060620
#define RCT_DLL1_216MHZ		0x00060620
#define RCT_DLL_CTRL_SEL_216MHZ	0x00005ef2
#define RCT_DLL_OCD_216MHZ	0x00000002

#define DRAM_EXT_MODE0_270MHZ	0x00001a43
#define DRAM_EXT_MODE1_270MHZ	0x00000004
#define DRAM_EXT_MODE2_270MHZ	0x00000000
#define DRAM_EXT_MODE3_270MHZ	0x00000000
#define DRAM_TIMING1_270MHZ	0x146c9b41
#define DRAM_TIMING2_270MHZ	0x05797189
#define RCT_DLL0_270MHZ		0x00060620
#define RCT_DLL1_270MHZ		0x00060620
#define RCT_DLL_CTRL_SEL_270MHZ	0x00005ef2
#define RCT_DLL_OCD_270MHZ	0x00000002

#define DRAM_EXT_MODE0_297MHZ	0x00001843
#define DRAM_EXT_MODE1_297MHZ	0x00000004
#define DRAM_EXT_MODE2_297MHZ	0x00000000
#define DRAM_EXT_MODE3_297MHZ	0x00000000
#define DRAM_TIMING1_297MHZ	0x1353d221
#define DRAM_TIMING2_297MHZ	0x04612069
#define RCT_DLL0_297MHZ		0x0010062A
#define RCT_DLL1_297MHZ		0x0010062A
#define RCT_DLL_CTRL_SEL_297MHZ	0x00005ef2
#define RCT_DLL_OCD_297MHZ	0x00050f02

#define DRAM_EXT_MODE0_324MHZ	0x00001843
#define DRAM_EXT_MODE1_324MHZ	0x00000004
#define DRAM_EXT_MODE2_324MHZ	0x00000000
#define DRAM_EXT_MODE3_324MHZ	0x00000000
#define DRAM_TIMING1_324MHZ	0x135c1241
#define DRAM_TIMING2_324MHZ	0x04c94079
#define RCT_DLL0_324MHZ		0x0010062A
#define RCT_DLL1_324MHZ		0x0010062A
#define RCT_DLL_CTRL_SEL_324MHZ	0x00005ef2
#define RCT_DLL_OCD_324MHZ	0x00050f02

#define DRAM_EXT_MODE0_337MHZ	0x00001a43
#define DRAM_EXT_MODE1_337MHZ	0x00000004
#define DRAM_EXT_MODE2_337MHZ	0x00000000
#define DRAM_EXT_MODE3_337MHZ	0x00000000
#define DRAM_TIMING1_337MHZ	0x14645b41
#define DRAM_TIMING2_337MHZ	0x04f94979
#define RCT_DLL0_337MHZ		0x0010062A
#define RCT_DLL1_337MHZ		0x0010062A
#define RCT_DLL_CTRL_SEL_337MHZ	0x00005ef2
#define RCT_DLL_OCD_337MHZ	0x00050f02

/* Sync to 2008/12/8 */
[a5a2bub]
#define ARCH_VER		5002
#define PLL_CORE_108MHZ_VAL	0x0f021100
#define PLL_CORE_121MHZ_VAL	0x11021100
#define DRAM_SIZE		0x08000000	/* 1G bit */
#define DRAM_CFG_VAL		0x00018424

/* 216MHz */
#define DRAM_EXT_MODE0_216MHZ	0x00001863
#define DRAM_EXT_MODE1_216MHZ	0x00000004
#define DRAM_EXT_MODE2_216MHZ	0x00000000
#define DRAM_EXT_MODE3_216MHZ	0x00000000
#define DRAM_TIMING1_216MHZ	0x134b1b43
#define DRAM_TIMING2_216MHZ	0x0320d949
#define RCT_DLL0_216MHZ		0x00060620
#define RCT_DLL1_216MHZ		0x00060620
#define RCT_DLL_CTRL_SEL_216MHZ	0x00005ef2
#define RCT_DLL_OCD_216MHZ	0x00000002

/* 270MHz */
#define DRAM_EXT_MODE0_270MHZ	0x00001a63
#define DRAM_EXT_MODE1_270MHZ	0x00000004
#define DRAM_EXT_MODE2_270MHZ	0x00000000
#define DRAM_EXT_MODE3_270MHZ	0x00000000
#define DRAM_TIMING1_270MHZ	0x24642443
#define DRAM_TIMING2_270MHZ	0x03f91162
#define RCT_DLL0_270MHZ		0x00060620
#define RCT_DLL1_270MHZ		0x00060620
#define RCT_DLL_CTRL_SEL_270MHZ	0x00005ef2
#define RCT_DLL_OCD_270MHZ	0x00000002

/* 297MHz */
#define DRAM_EXT_MODE0_297MHZ	0x00001a63
#define DRAM_EXT_MODE1_297MHZ	0x00000004
#define DRAM_EXT_MODE2_297MHZ	0x00000000
#define DRAM_EXT_MODE3_297MHZ	0x00000000
#define DRAM_TIMING1_297MHZ	0x246c6443
#define DRAM_TIMING2_297MHZ	0x0461296a
#define RCT_DLL0_297MHZ		0x0010062A
#define RCT_DLL1_297MHZ		0x0010062A
#define RCT_DLL_CTRL_SEL_297MHZ	0x00005ef2
#define RCT_DLL_OCD_297MHZ	0x00050f02

/* 324MHz */
#define DRAM_EXT_MODE0_324MHZ	0x00001a63
#define DRAM_EXT_MODE1_324MHZ	0x00000004
#define DRAM_EXT_MODE2_324MHZ	0x00000000
#define DRAM_EXT_MODE3_324MHZ	0x00000000
#define DRAM_TIMING1_324MHZ	0x2474e463
#define DRAM_TIMING2_324MHZ	0x04c94972
#define RCT_DLL0_324MHZ		0x0010062A
#define RCT_DLL1_324MHZ		0x0010062A
#define RCT_DLL_CTRL_SEL_324MHZ	0x00005ef2
#define RCT_DLL_OCD_324MHZ	0x00050f02

/* 337MHz */
#define DRAM_EXT_MODE0_337MHZ	0x00001c63
#define DRAM_EXT_MODE1_337MHZ	0x00000004
#define DRAM_EXT_MODE2_337MHZ	0x00000000
#define DRAM_EXT_MODE3_337MHZ	0x00000000
#define DRAM_TIMING1_337MHZ	0x257d2d63
#define DRAM_TIMING2_337MHZ	0x04f9517a
#define RCT_DLL0_337MHZ		0x0010062A
#define RCT_DLL1_337MHZ		0x0010062A
#define RCT_DLL_CTRL_SEL_337MHZ	0x00005ef2
#define RCT_DLL_OCD_337MHZ	0x00050f02

/* Sync on 2007/05/28 */
[camry]
#define ARCH_VER		2000
#define DRAM_SIZE		0x08000000	/* 1 Gbit */
#define DRAM_CFG_VAL		0x1000000a
#define DRAM_EXT_MODE_VAL	0x00000004

#define DRAM_MODE____135MHZ	0x00001442
#define DRAM_TIMING1_135MHZ	0x1c5244a5
#define DRAM_TIMING2_135MHZ	0x00000006
#define DRAM_REF_CTL_135MHZ	0x0000883b

#define DRAM_MODE____182MHZ	0x00001442
#define DRAM_TIMING1_182MHZ	0x265254a5
#define DRAM_TIMING2_182MHZ	0x00000009
#define DRAM_REF_CTL_182MHZ	0x00008b1f

#define DRAM_MODE____216MHZ	0x00001642
#define DRAM_TIMING1_216MHZ	0x365b65b9
#define DRAM_TIMING2_216MHZ	0x0000000a
#define DRAM_REF_CTL_216MHZ	0x00008d2f

#define DRAM_MODE____229MHZ	0x00001642
#define DRAM_TIMING1_229MHZ	0x305b6db9
#define DRAM_TIMING2_229MHZ	0x0000000b
#define DRAM_REF_CTL_229MHZ	0x00008e01

#define DRAM_MODE____243MHZ	0x00001642
#define DRAM_TIMING1_243MHZ	0x325b75b9
#define DRAM_TIMING2_243MHZ	0x0000000c
#define DRAM_REF_CTL_243MHZ	0x00008ed3

#define DRAM_MODE____256MHZ	0x00001642
#define DRAM_TIMING1_256MHZ	0x345b75b9
#define DRAM_TIMING2_256MHZ	0x0000000c
#define DRAM_REF_CTL_256MHZ	0x00008f9f

#define DRAM_MODE____270MHZ	0x00001842
#define DRAM_TIMING1_270MHZ	0x38a476c9
#define DRAM_TIMING2_270MHZ	0x0000000d
#define DRAM_REF_CTL_270MHZ	0x00009045

#define DRAM_MODE____283MHZ	0x00001842
#define DRAM_TIMING1_283MHZ	0x38a476c9
#define DRAM_TIMING2_283MHZ	0x0000000e
#define DRAM_REF_CTL_283MHZ	0x00009045

#define RCT_DLL0_135MHZ		0x000d0d78
#define RCT_DLL1_135MHZ		0x000d0d78
#define RCT_DLL0_182MHZ		0x000d0d78
#define RCT_DLL1_182MHZ		0x000d0d78
#define RCT_DLL0_216MHZ		0x00050578
#define RCT_DLL1_216MHZ		0x00050578
#define RCT_DLL0_230MHZ		0x000a0a78
#define RCT_DLL1_230MHZ		0x000a0a78
#define RCT_DLL0_243MHZ		0x00070778
#define RCT_DLL1_243MHZ		0x00070778
#define RCT_DLL0_256MHZ		0x00070778
#define RCT_DLL1_256MHZ		0x00070778
#define RCT_DLL0_270MHZ		0x00050578
#define RCT_DLL1_270MHZ		0x00050578
#define RCT_DLL0_283MHZ		0x001c1cc8
#define RCT_DLL1_283MHZ		0x001c1cc8

#define CORE_PLL_FINE_ADJUST	0x00029c0a

/* Sync on 2007/10/25 */
[civet]
#define ARCH_VER		2000
#define DRAM_SIZE		0x04000000	/* 512 Mbit */
#define DRAM_CFG_VAL		0x10000009
#define DRAM_EXT_MODE_VAL	0x00000004

#define DRAM_MODE____135MHZ	0x00001442
#define DRAM_TIMING1_135MHZ	0x1c5244a5
#define DRAM_TIMING2_135MHZ	0x00000006
#define DRAM_REF_CTL_135MHZ	0x0000883b

#define DRAM_MODE____182MHZ	0x00001442
#define DRAM_TIMING1_182MHZ	0x265254a5
#define DRAM_TIMING2_182MHZ	0x00000009
#define DRAM_REF_CTL_182MHZ	0x00008b1f

#define DRAM_MODE____189MHZ	0x00001642
#define DRAM_TIMING1_189MHZ	0x365b65b9
#define DRAM_TIMING2_189MHZ	0x0000000a
#define DRAM_REF_CTL_189MHZ	0x00008d2f

#define DRAM_MODE____216MHZ	0x00001652
#define DRAM_TIMING1_216MHZ	0x2c5b663a
#define DRAM_TIMING2_216MHZ	0x0000000a
#define DRAM_REF_CTL_216MHZ	0x00008d2f

#define DRAM_MODE____229MHZ	0x00001642
#define DRAM_TIMING1_229MHZ	0x305b65b9
#define DRAM_TIMING2_229MHZ	0x0000000b
#define DRAM_REF_CTL_229MHZ	0x00008e01

#define DRAM_MODE____243MHZ	0x00001642
#define DRAM_TIMING1_243MHZ	0x325b6db9
#define DRAM_TIMING2_243MHZ	0x0000000c
#define DRAM_REF_CTL_243MHZ	0x00008ed3

#define DRAM_MODE____256MHZ	0x00001642
#define DRAM_TIMING1_256MHZ	0x345b75b9
#define DRAM_TIMING2_256MHZ	0x0000000c
#define DRAM_REF_CTL_256MHZ	0x00008f9f

#define DRAM_MODE____270MHZ	0x00001842
#define DRAM_TIMING1_270MHZ	0x38a476c9
#define DRAM_TIMING2_270MHZ	0x0000000d
#define DRAM_REF_CTL_270MHZ	0x00009045

#define DRAM_MODE____283MHZ	0x00001842
#define DRAM_TIMING1_283MHZ	0x38a476c9
#define DRAM_TIMING2_283MHZ	0x0000000e
#define DRAM_REF_CTL_283MHZ	0x00009045

#define RCT_DLL0_135MHZ		0x000d0d78
#define RCT_DLL1_135MHZ		0x000d0d78
#define RCT_DLL0_182MHZ		0x000d0d78
#define RCT_DLL1_182MHZ		0x000d0d78
#define RCT_DLL0_189MHZ		0x000d0d78
#define RCT_DLL1_189MHZ		0x000d0d78
#define RCT_DLL0_216MHZ		0x000e0e78
#define RCT_DLL1_216MHZ		0x000e0e78
#define RCT_DLL0_230MHZ		0x000a0a78
#define RCT_DLL1_230MHZ		0x000a0a78
#define RCT_DLL0_243MHZ		0x000000c8
#define RCT_DLL1_243MHZ		0x000000c8
#define RCT_DLL0_256MHZ		0x00070778
#define RCT_DLL1_256MHZ		0x00070778
#define RCT_DLL0_270MHZ		0x00050578
#define RCT_DLL1_270MHZ		0x00050578
#define RCT_DLL0_283MHZ		0x001c1cc8
#define RCT_DLL1_283MHZ		0x001c1cc8

#define CORE_PLL_FINE_ADJUST	0x00029c0a

/* Sync on 2007/10/25 */
[dv5090]
#define ARCH_VER		2000
#define DRAM_SIZE		0x04000000	/* 512 Mbit */
#define DRAM_CFG_VAL		0x10000009
#define DRAM_EXT_MODE_VAL	0x00000004

#define DRAM_MODE____135MHZ	0x00001442
#define DRAM_TIMING1_135MHZ	0x1c5244a5
#define DRAM_TIMING2_135MHZ	0x00000006
#define DRAM_REF_CTL_135MHZ	0x0000883b

#define DRAM_MODE____182MHZ	0x00001442
#define DRAM_TIMING1_182MHZ	0x265254a5
#define DRAM_TIMING2_182MHZ	0x00000009
#define DRAM_REF_CTL_182MHZ	0x00008b1f

#define DRAM_MODE____189MHZ	0x00001642
#define DRAM_TIMING1_189MHZ	0x365b65b9
#define DRAM_TIMING2_189MHZ	0x0000000a
#define DRAM_REF_CTL_189MHZ	0x00008d2f

#define DRAM_MODE____216MHZ	0x00001652
#define DRAM_TIMING1_216MHZ	0x2c5b663a
#define DRAM_TIMING2_216MHZ	0x0000000a
#define DRAM_REF_CTL_216MHZ	0x00008d2f

#define DRAM_MODE____229MHZ	0x00001642
#define DRAM_TIMING1_229MHZ	0x305b65b9
#define DRAM_TIMING2_229MHZ	0x0000000b
#define DRAM_REF_CTL_229MHZ	0x00008e01

#define DRAM_MODE____243MHZ	0x00001642
#define DRAM_TIMING1_243MHZ	0x325b6db9
#define DRAM_TIMING2_243MHZ	0x0000000c
#define DRAM_REF_CTL_243MHZ	0x00008ed3

#define DRAM_MODE____256MHZ	0x00001642
#define DRAM_TIMING1_256MHZ	0x345b75b9
#define DRAM_TIMING2_256MHZ	0x0000000c
#define DRAM_REF_CTL_256MHZ	0x00008f9f

#define DRAM_MODE____270MHZ	0x00001842
#define DRAM_TIMING1_270MHZ	0x38a476c9
#define DRAM_TIMING2_270MHZ	0x0000000d
#define DRAM_REF_CTL_270MHZ	0x00009045

#define DRAM_MODE____283MHZ	0x00001842
#define DRAM_TIMING1_283MHZ	0x38a476c9
#define DRAM_TIMING2_283MHZ	0x0000000e
#define DRAM_REF_CTL_283MHZ	0x00009045

#define RCT_DLL0_135MHZ		0x000d0d78
#define RCT_DLL1_135MHZ		0x000d0d78
#define RCT_DLL0_182MHZ		0x000d0d78
#define RCT_DLL1_182MHZ		0x000d0d78
#define RCT_DLL0_189MHZ		0x000d0d78
#define RCT_DLL1_189MHZ		0x000d0d78
#define RCT_DLL0_216MHZ		0x000a0a78
#define RCT_DLL1_216MHZ		0x000a0a78
#define RCT_DLL0_230MHZ		0x000a0a78
#define RCT_DLL1_230MHZ		0x000a0a78
#define RCT_DLL0_243MHZ		0x00070778
#define RCT_DLL1_243MHZ		0x00070778
#define RCT_DLL0_256MHZ		0x00070778
#define RCT_DLL1_256MHZ		0x00070778
#define RCT_DLL0_270MHZ		0x00050578
#define RCT_DLL1_270MHZ		0x00050578
#define RCT_DLL0_283MHZ		0x001c1cc8
#define RCT_DLL1_283MHZ		0x001c1cc8

#define CORE_PLL_FINE_ADJUST	0x00029c0a

/* Sync on 2007/08/29 */
[hd747]
#define ARCH_VER		2000
#define DRAM_SIZE		0x04000000	/* 512 Mbit */
#define DRAM_CFG_VAL		0x10000009
#define DRAM_EXT_MODE_VAL	0x00000004

#define DRAM_MODE____135MHZ	0x00001442
#define DRAM_TIMING1_135MHZ	0x1c5244a5
#define DRAM_TIMING2_135MHZ	0x00000006
#define DRAM_REF_CTL_135MHZ	0x0000883b

#define DRAM_MODE____182MHZ	0x00001442
#define DRAM_TIMING1_182MHZ	0x265254a5
#define DRAM_TIMING2_182MHZ	0x00000009
#define DRAM_REF_CTL_182MHZ	0x00008b1f

#define DRAM_MODE____189MHZ	0x00001642
#define DRAM_TIMING1_189MHZ	0x365b65b9
#define DRAM_TIMING2_189MHZ	0x0000000a
#define DRAM_REF_CTL_189MHZ	0x00008d2f

#define DRAM_MODE____216MHZ	0x00001642
#define DRAM_TIMING1_216MHZ	0x2c5b5db9
#define DRAM_TIMING2_216MHZ	0x0000000a
#define DRAM_REF_CTL_216MHZ	0x00008d2f

#define DRAM_MODE____229MHZ	0x00001642
#define DRAM_TIMING1_229MHZ	0x305b65b9
#define DRAM_TIMING2_229MHZ	0x0000000b
#define DRAM_REF_CTL_229MHZ	0x00008e01

#define DRAM_MODE____243MHZ	0x00001642
#define DRAM_TIMING1_243MHZ	0x325b6db9
#define DRAM_TIMING2_243MHZ	0x0000000c
#define DRAM_REF_CTL_243MHZ	0x00008ed3

#define DRAM_MODE____256MHZ	0x00001642
#define DRAM_TIMING1_256MHZ	0x345b75b9
#define DRAM_TIMING2_256MHZ	0x0000000c
#define DRAM_REF_CTL_256MHZ	0x00008f9f

#define DRAM_MODE____270MHZ	0x00001842
#define DRAM_TIMING1_270MHZ	0x38a476c9
#define DRAM_TIMING2_270MHZ	0x0000000d
#define DRAM_REF_CTL_270MHZ	0x00009045

#define DRAM_MODE____283MHZ	0x00001842
#define DRAM_TIMING1_283MHZ	0x38a476c9
#define DRAM_TIMING2_283MHZ	0x0000000e
#define DRAM_REF_CTL_283MHZ	0x00009045

#define RCT_DLL0_135MHZ		0x000d0d78
#define RCT_DLL1_135MHZ		0x000d0d78
#define RCT_DLL0_182MHZ		0x000d0d78
#define RCT_DLL1_182MHZ		0x000d0d78
#define RCT_DLL0_189MHZ		0x000d0d78
#define RCT_DLL1_189MHZ		0x000d0d78
#define RCT_DLL0_216MHZ		0x000000c8
#define RCT_DLL1_216MHZ		0x000000c8
#define RCT_DLL0_230MHZ		0x000a0a78
#define RCT_DLL1_230MHZ		0x000a0a78
#define RCT_DLL0_243MHZ		0x00070778
#define RCT_DLL1_243MHZ		0x00070778
#define RCT_DLL0_256MHZ		0x00070778
#define RCT_DLL1_256MHZ		0x00070778
#define RCT_DLL0_270MHZ		0x00050578
#define RCT_DLL1_270MHZ		0x00050578
#define RCT_DLL0_283MHZ		0x001c1cc8
#define RCT_DLL1_283MHZ		0x001c1cc8

#define CORE_PLL_FINE_ADJUST	0x00029c0a

/* Sync on 2008/04/08 */
[omijia]
#define ARCH_VER		2000
#define DRAM_SIZE		0x04000000     /* 512 Mbit */
#define DRAM_CFG_VAL		0x10000009
#define DRAM_EXT_MODE_VAL	0x00000004

#define DRAM_MODE____135MHZ	0x00001442
#define DRAM_TIMING1_135MHZ	0x1c5244a5
#define DRAM_TIMING2_135MHZ	0x00000006
#define DRAM_REF_CTL_135MHZ	0x0000883b

#define DRAM_MODE____182MHZ	0x00001442
#define DRAM_TIMING1_182MHZ	0x265254a5
#define DRAM_TIMING2_182MHZ	0x00000009
#define DRAM_REF_CTL_182MHZ	0x00008b1f

#define DRAM_MODE____216MHZ	0x00001642
#define DRAM_TIMING1_216MHZ	0x2c5b5db9
#define DRAM_TIMING2_216MHZ	0x0000000a
#define DRAM_REF_CTL_216MHZ	0x00008d2f

#define DRAM_MODE____229MHZ	0x00001642
#define DRAM_TIMING1_229MHZ	0x305b65b9
#define DRAM_TIMING2_229MHZ	0x0000000b
#define DRAM_REF_CTL_229MHZ	0x00008e01

#define DRAM_MODE____243MHZ	0x00001642
#define DRAM_TIMING1_243MHZ	0x325b6db9
#define DRAM_TIMING2_243MHZ	0x0000000c
#define DRAM_REF_CTL_243MHZ	0x00008ed3

#define DRAM_MODE____256MHZ	0x00001642
#define DRAM_TIMING1_256MHZ	0x345b75b9
#define DRAM_TIMING2_256MHZ	0x0000000c
#define DRAM_REF_CTL_256MHZ	0x00008f9f

#define DRAM_MODE____270MHZ	0x00001842
#define DRAM_TIMING1_270MHZ	0x38a476c9
#define DRAM_TIMING2_270MHZ	0x0000000d
#define DRAM_REF_CTL_270MHZ	0x00009045

#define DRAM_MODE____283MHZ	0x00001842
#define DRAM_TIMING1_283MHZ	0x38a476c9
#define DRAM_TIMING2_283MHZ	0x0000000e
#define DRAM_REF_CTL_283MHZ	0x00009045

#define RCT_DLL0_135MHZ		0x00000088
#define RCT_DLL1_135MHZ		0x00000088
#define RCT_DLL0_182MHZ		0x00000088
#define RCT_DLL1_182MHZ		0x00000088
#define RCT_DLL0_189MHZ		0x00000088
#define RCT_DLL1_189MHZ		0x00000088
#define RCT_DLL0_216MHZ		0x00000088
#define RCT_DLL1_216MHZ		0x00000088
#define RCT_DLL0_230MHZ		0x00000088
#define RCT_DLL1_230MHZ		0x00000088
#define RCT_DLL0_243MHZ		0x00000088
#define RCT_DLL1_243MHZ		0x00000088
#define RCT_DLL0_256MHZ		0x00000088
#define RCT_DLL1_256MHZ		0x00000088
#define RCT_DLL0_270MHZ		0x00000088
#define RCT_DLL1_270MHZ		0x00000088
#define RCT_DLL0_283MHZ		0x00000088
#define RCT_DLL1_283MHZ		0x00000088

#define CORE_PLL_FINE_ADJUST	0x00029c0a

/* Sync on 2007/08/08 */
[quail]
#define ARCH_VER		2000
#define DRAM_SIZE		0x04000000	/* 512 Mbit */
#define DRAM_CFG_VAL		0x10000009
#define DRAM_EXT_MODE_VAL	0x00000028

#define DRAM_MODE____135MHZ	0x00001442
#define DRAM_TIMING1_135MHZ	0x1c5244a5
#define DRAM_TIMING2_135MHZ	0x00000006
#define DRAM_REF_CTL_135MHZ	0x0000883b

#define DRAM_MODE____182MHZ	0x00001442
#define DRAM_TIMING1_182MHZ	0x265254a5
#define DRAM_TIMING2_182MHZ	0x00000009
#define DRAM_REF_CTL_182MHZ	0x00008b1f

#define DRAM_MODE____189MHZ	0x00001442
#define DRAM_TIMING1_189MHZ	0x26525ca5
#define DRAM_TIMING2_189MHZ	0x00000009
#define DRAM_REF_CTL_189MHZ	0x00008b87

#define DRAM_MODE____216MHZ	0x00001652
#define DRAM_TIMING1_216MHZ	0x2c5b663a
#define DRAM_TIMING2_216MHZ	0x0000000a
#define DRAM_REF_CTL_216MHZ	0x00008d2f

#define DRAM_MODE____229MHZ	0x00001642
#define DRAM_TIMING1_229MHZ	0x305b6db9
#define DRAM_TIMING2_229MHZ	0x0000000b
#define DRAM_REF_CTL_229MHZ	0x00008e01

#define DRAM_MODE____243MHZ	0x00001632
#define DRAM_TIMING1_243MHZ	0x325b7538
#define DRAM_TIMING2_243MHZ	0x0000000a
#define DRAM_REF_CTL_243MHZ	0x00008ed3

#define DRAM_MODE____256MHZ	0x00001642
#define DRAM_TIMING1_256MHZ	0x345b75b9
#define DRAM_TIMING2_256MHZ	0x0000000c
#define DRAM_REF_CTL_256MHZ	0x00008f9f

#define DRAM_MODE____270MHZ	0x00001842
#define DRAM_TIMING1_270MHZ	0x38a476c9
#define DRAM_TIMING2_270MHZ	0x0000000d
#define DRAM_REF_CTL_270MHZ	0x00009045

#define DRAM_MODE____283MHZ	0x00001842
#define DRAM_TIMING1_283MHZ	0x38a476c9
#define DRAM_TIMING2_283MHZ	0x0000000e
#define DRAM_REF_CTL_283MHZ	0x00009045

#define RCT_DLL0_135MHZ		0x000d0d78
#define RCT_DLL1_135MHZ		0x000d0d78
#define RCT_DLL0_182MHZ		0x00000078
#define RCT_DLL1_182MHZ		0x00000078
#define RCT_DLL0_189MHZ		0x00000778
#define RCT_DLL1_189MHZ		0x00000778
#define RCT_DLL0_216MHZ		0x00000778
#define RCT_DLL1_216MHZ		0x00000778
#define RCT_DLL0_230MHZ		0x00000078
#define RCT_DLL1_230MHZ		0x00000078
#define RCT_DLL0_243MHZ		0x00070778
#define RCT_DLL1_243MHZ		0x00070778
#define RCT_DLL0_256MHZ		0x00070778
#define RCT_DLL1_256MHZ		0x00070778
#define RCT_DLL0_270MHZ		0x00050578
#define RCT_DLL1_270MHZ		0x00050578
#define RCT_DLL0_283MHZ		0x001c1cc8
#define RCT_DLL1_283MHZ		0x001c1cc8

#define CORE_PLL_FINE_ADJUST	0x00029c0a

/* Sync on 2008/08/01 */
[quail2]
#define ARCH_VER		2000
#define DRAM_SIZE		0x04000000	/* 512 Mbit */
#define DRAM_CFG_VAL		0x10000009
#define DRAM_EXT_MODE_VAL	0x00000028

#define DRAM_MODE____135MHZ	0x00001442
#define DRAM_TIMING1_135MHZ	0x1c5244a5
#define DRAM_TIMING2_135MHZ	0x00000006
#define DRAM_REF_CTL_135MHZ	0x0000883b

#define DRAM_MODE____182MHZ	0x00001442
#define DRAM_TIMING1_182MHZ	0x265254a5
#define DRAM_TIMING2_182MHZ	0x00000009
#define DRAM_REF_CTL_182MHZ	0x00008b1f

#define DRAM_MODE____189MHZ	0x00001442
#define DRAM_TIMING1_189MHZ	0x26525ca5
#define DRAM_TIMING2_189MHZ	0x00000009
#define DRAM_REF_CTL_189MHZ	0x00008b87

#define DRAM_MODE____216MHZ	0x00001652
#define DRAM_TIMING1_216MHZ	0x2c5b663a
#define DRAM_TIMING2_216MHZ	0x0000000a
#define DRAM_REF_CTL_216MHZ	0x00008d2f

#define DRAM_MODE____229MHZ	0x00001642
#define DRAM_TIMING1_229MHZ	0x305b6db9
#define DRAM_TIMING2_229MHZ	0x0000000b
#define DRAM_REF_CTL_229MHZ	0x00008e01

#define DRAM_MODE____243MHZ	0x00001632
#define DRAM_TIMING1_243MHZ	0x325b7538
#define DRAM_TIMING2_243MHZ	0x0000000a
#define DRAM_REF_CTL_243MHZ	0x00008ed3

#define DRAM_MODE____256MHZ	0x00001642
#define DRAM_TIMING1_256MHZ	0x345b75b9
#define DRAM_TIMING2_256MHZ	0x0000000c
#define DRAM_REF_CTL_256MHZ	0x00008f9f

#define DRAM_MODE____270MHZ	0x00001842
#define DRAM_TIMING1_270MHZ	0x38a476c9
#define DRAM_TIMING2_270MHZ	0x0000000d
#define DRAM_REF_CTL_270MHZ	0x00009045

#define DRAM_MODE____283MHZ	0x00001842
#define DRAM_TIMING1_283MHZ	0x38a476c9
#define DRAM_TIMING2_283MHZ	0x0000000e
#define DRAM_REF_CTL_283MHZ	0x00009045

#define RCT_DLL0_135MHZ		0x000d0d78
#define RCT_DLL1_135MHZ		0x000d0d78
#define RCT_DLL0_182MHZ		0x00000078
#define RCT_DLL1_182MHZ		0x00000078
#define RCT_DLL0_189MHZ		0x00000088
#define RCT_DLL1_189MHZ		0x00000088
#define RCT_DLL0_216MHZ		0x00000088
#define RCT_DLL1_216MHZ		0x00000088
#define RCT_DLL0_230MHZ		0x00000078
#define RCT_DLL1_230MHZ		0x00000078
#define RCT_DLL0_243MHZ		0x00070778
#define RCT_DLL1_243MHZ		0x00070778
#define RCT_DLL0_256MHZ		0x00070778
#define RCT_DLL1_256MHZ		0x00070778
#define RCT_DLL0_270MHZ		0x00050578
#define RCT_DLL1_270MHZ		0x00050578
#define RCT_DLL0_283MHZ		0x001c1cc8
#define RCT_DLL1_283MHZ		0x001c1cc8

#define CORE_PLL_FINE_ADJUST	0x00029c0a

/* Sync on 2007/08/08 */
[serpent]
#define ARCH_VER		2000
#define DRAM_SIZE		0x04000000	/* 512 Mbit */
#define DRAM_CFG_VAL		0x10000009
#define DRAM_EXT_MODE_VAL	0x00000028

#define DRAM_MODE____135MHZ	0x00001442
#define DRAM_TIMING1_135MHZ	0x1c5244a5
#define DRAM_TIMING2_135MHZ	0x00000006
#define DRAM_REF_CTL_135MHZ	0x0000883b

#define DRAM_MODE____182MHZ	0x00001442
#define DRAM_TIMING1_182MHZ	0x265254a5
#define DRAM_TIMING2_182MHZ	0x00000009
#define DRAM_REF_CTL_182MHZ	0x00008b1f

#define DRAM_MODE____189MHZ	0x00001442
#define DRAM_TIMING1_189MHZ	0x26525ca5
#define DRAM_TIMING2_189MHZ	0x00000009
#define DRAM_REF_CTL_189MHZ	0x00008b87

#define DRAM_MODE____216MHZ	0x00001652
#define DRAM_TIMING1_216MHZ	0x2c5b663a
#define DRAM_TIMING2_216MHZ	0x0000000a
#define DRAM_REF_CTL_216MHZ	0x00008d2f

#define DRAM_MODE____229MHZ	0x00001642
#define DRAM_TIMING1_229MHZ	0x305b6db9
#define DRAM_TIMING2_229MHZ	0x0000000b
#define DRAM_REF_CTL_229MHZ	0x00008e01

#define DRAM_MODE____243MHZ	0x00001632
#define DRAM_TIMING1_243MHZ	0x325b7538
#define DRAM_TIMING2_243MHZ	0x0000000a
#define DRAM_REF_CTL_243MHZ	0x00008ed3

#define DRAM_MODE____256MHZ	0x00001642
#define DRAM_TIMING1_256MHZ	0x345b75b9
#define DRAM_TIMING2_256MHZ	0x0000000c
#define DRAM_REF_CTL_256MHZ	0x00008f9f

#define DRAM_MODE____270MHZ	0x00001842
#define DRAM_TIMING1_270MHZ	0x38a476c9
#define DRAM_TIMING2_270MHZ	0x0000000d
#define DRAM_REF_CTL_270MHZ	0x00009045

#define DRAM_MODE____283MHZ	0x00001842
#define DRAM_TIMING1_283MHZ	0x38a476c9
#define DRAM_TIMING2_283MHZ	0x0000000e
#define DRAM_REF_CTL_283MHZ	0x00009045

#define RCT_DLL0_135MHZ		0x000d0d78
#define RCT_DLL1_135MHZ		0x000d0d78
#define RCT_DLL0_182MHZ		0x00000078
#define RCT_DLL1_182MHZ		0x00000078
#define RCT_DLL0_189MHZ		0x000000A0
#define RCT_DLL1_189MHZ		0x000000A0
#define RCT_DLL0_216MHZ		0x00000778
#define RCT_DLL1_216MHZ		0x00000778
#define RCT_DLL0_230MHZ		0x00000078
#define RCT_DLL1_230MHZ		0x00000078
#define RCT_DLL0_243MHZ		0x00070778
#define RCT_DLL1_243MHZ		0x00070778
#define RCT_DLL0_256MHZ		0x00070778
#define RCT_DLL1_256MHZ		0x00070778
#define RCT_DLL0_270MHZ		0x00050578
#define RCT_DLL1_270MHZ		0x00050578
#define RCT_DLL0_283MHZ		0x001c1cc8
#define RCT_DLL1_283MHZ		0x001c1cc8

#define CORE_PLL_FINE_ADJUST	0x00029c0a

/* Sync on 2007/05/28 */
[wow3]
#define ARCH_VER		2000
#define DRAM_SIZE		0x08000000	/* 1 Gbit */
#define DRAM_CFG_VAL		0x1000000a
#define DRAM_EXT_MODE_VAL	0x00000004

#define DRAM_MODE____135MHZ	0x00001442
#define DRAM_TIMING1_135MHZ	0x225244a5
#define DRAM_TIMING2_135MHZ	0x00000006
#define DRAM_REF_CTL_135MHZ	0x0000883b

#define DRAM_MODE____182MHZ	0x00001442
#define DRAM_TIMING1_182MHZ	0x2e5254a5
#define DRAM_TIMING2_182MHZ	0x00000009
#define DRAM_REF_CTL_182MHZ	0x00008b1f

#define DRAM_MODE____216MHZ	0x00001642
#define DRAM_TIMING1_216MHZ	0x365b65b9
#define DRAM_TIMING2_216MHZ	0x0000000a
#define DRAM_REF_CTL_216MHZ	0x00008d2f

#define DRAM_MODE____229MHZ	0x00001642
#define DRAM_TIMING1_229MHZ	0x3a5b6db9
#define DRAM_TIMING2_229MHZ	0x0000000b
#define DRAM_REF_CTL_229MHZ	0x00008e01

#define DRAM_MODE____243MHZ	0x00001642
#define DRAM_TIMING1_243MHZ	0x3c5b75b9
#define DRAM_TIMING2_243MHZ	0x0000000c
#define DRAM_REF_CTL_243MHZ	0x00008ed3

#define DRAM_MODE____256MHZ	0x00001642	/* FIXME */
#define DRAM_TIMING1_256MHZ	0x345b75b9	/* FIXME */
#define DRAM_TIMING2_256MHZ	0x0000000c	/* FIXME */
#define DRAM_REF_CTL_256MHZ	0x00008f9f	/* FIXME */

#define DRAM_MODE____270MHZ	0x00001842	/* FIXME */
#define DRAM_TIMING1_270MHZ	0x38a476c9	/* FIXME */
#define DRAM_TIMING2_270MHZ	0x0000000d	/* FIXME */
#define DRAM_REF_CTL_270MHZ	0x00009045	/* FIXME */

#define DRAM_MODE____283MHZ	0x00001842	/* FIXME */
#define DRAM_TIMING1_283MHZ	0x38a476c9	/* FIXME */
#define DRAM_TIMING2_283MHZ	0x0000000e	/* FIXME */
#define DRAM_REF_CTL_283MHZ	0x00009045	/* FIXME */

#define RCT_DLL0_135MHZ		0x000d0d78
#define RCT_DLL1_135MHZ		0x000d0d78
#define RCT_DLL0_182MHZ		0x000d0d78
#define RCT_DLL1_182MHZ		0x000d0d78
#define RCT_DLL0_216MHZ		0x000d0d78
#define RCT_DLL1_216MHZ		0x000d0d78
#define RCT_DLL0_230MHZ		0x000a0a78
#define RCT_DLL1_230MHZ		0x000a0a78
#define RCT_DLL0_243MHZ		0x00070778
#define RCT_DLL1_243MHZ		0x00070778
#define RCT_DLL0_256MHZ		0x00070778
#define RCT_DLL1_256MHZ		0x00070778
#define RCT_DLL0_270MHZ		0x00050578
#define RCT_DLL1_270MHZ		0x00050578
#define RCT_DLL0_283MHZ		0x001c1cc8
#define RCT_DLL1_283MHZ		0x001c1cc8

#define CORE_PLL_FINE_ADJUST	0x00029c0a

/* Sync on 2007/05/28 */
[z5x2]
#define ARCH_VER		2000
#define DRAM_SIZE		0x04000000	/* 512 Mbit */
#define DRAM_CFG_VAL		0x10000009
#define DRAM_EXT_MODE_VAL	0x00000040

#define DRAM_MODE____135MHZ	0x00001442
#define DRAM_TIMING1_135MHZ	0x1c5244a5
#define DRAM_TIMING2_135MHZ	0x00000006
#define DRAM_REF_CTL_135MHZ	0x0000883b

#define DRAM_MODE____162MHZ	0x00001442
#define DRAM_TIMING1_162MHZ	0x22524ca5
#define DRAM_TIMING2_162MHZ	0x00000008
#define DRAM_REF_CTL_162MHZ	0x000089e1

#define DRAM_MODE____182MHZ	0x00001442
#define DRAM_TIMING1_182MHZ	0x265254a5
#define DRAM_TIMING2_182MHZ	0x00000009
#define DRAM_REF_CTL_182MHZ	0x00008b1f

#define DRAM_MODE____202MHZ	0x00001642
#define DRAM_TIMING1_202MHZ	0x365b65b5
#define DRAM_TIMING2_202MHZ	0x00000009
#define DRAM_REF_CTL_202MHZ	0x00008d31

#define DRAM_MODE____216MHZ	0x00001642
#define DRAM_TIMING1_216MHZ	0x365b65b5
#define DRAM_TIMING2_216MHZ	0x00000009
#define DRAM_REF_CTL_216MHZ	0x00008d31

#define DRAM_MODE____229MHZ	0x00001642
#define DRAM_TIMING1_229MHZ	0x305b6db9
#define DRAM_TIMING2_229MHZ	0x0000000b
#define DRAM_REF_CTL_229MHZ	0x00008e01

#define DRAM_MODE____243MHZ	0x00001642
#define DRAM_TIMING1_243MHZ	0x345b8eb9
#define DRAM_TIMING2_243MHZ	0x0000000c
#define DRAM_REF_CTL_243MHZ	0x00008ed3

#define DRAM_MODE____250MHZ	0x00001642
#define DRAM_TIMING1_250MHZ	0x345b75b9
#define DRAM_TIMING2_250MHZ	0x0000000c
#define DRAM_REF_CTL_250MHZ	0x00008f3d

#define DRAM_MODE____256MHZ	0x00001642
#define DRAM_TIMING1_256MHZ	0x345b7db9
#define DRAM_TIMING2_256MHZ	0x0000000c
#define DRAM_REF_CTL_256MHZ	0x00008f9f

#define DRAM_MODE____263MHZ	0x00001642
#define DRAM_TIMING1_263MHZ	0x365b7db9
#define DRAM_TIMING2_263MHZ	0x0000000d
#define DRAM_REF_CTL_263MHZ	0x0000900b

#define DRAM_MODE____270MHZ	0x00001842
#define DRAM_TIMING1_270MHZ	0x38a486c9
#define DRAM_TIMING2_270MHZ	0x0000000d
#define DRAM_REF_CTL_270MHZ	0x00009079

#define DRAM_MODE____283MHZ	0x00001842
#define DRAM_TIMING1_283MHZ	0x3aa486c9
#define DRAM_TIMING2_283MHZ	0x0000000e
#define DRAM_REF_CTL_283MHZ	0x00009145

#define DRAM_MODE____290MHZ	0x00001842
#define DRAM_TIMING1_290MHZ	0x3ca48ec9
#define DRAM_TIMING2_290MHZ	0x0000000e
#define DRAM_REF_CTL_290MHZ	0x000091b1

#define RCT_DLL0_135MHZ		0x000d0d78
#define RCT_DLL1_135MHZ		0x000d0d78
#define RCT_DLL0_182MHZ		0x000d0d78
#define RCT_DLL1_182MHZ		0x000d0d78
#define RCT_DLL0_216MHZ		0x00000078
#define RCT_DLL1_216MHZ		0x00000078
#define RCT_DLL0_230MHZ		0x000a0a78
#define RCT_DLL1_230MHZ		0x000a0a78
#define RCT_DLL0_243MHZ		0x00070778
#define RCT_DLL1_243MHZ		0x00070778
#define RCT_DLL0_256MHZ		0x00070778
#define RCT_DLL1_256MHZ		0x00070778
#define RCT_DLL0_270MHZ		0x00050578
#define RCT_DLL1_270MHZ		0x00050578
#define RCT_DLL0_283MHZ		0x001c1cc8
#define RCT_DLL1_283MHZ		0x001c1cc8

/* Sync on 2009/03/23 */
[a2s_512Mb]
#define ARCH_VER		2100
#define DRAM_SIZE		0x04000000	/* 512 Mbit */
#define DRAM_CFG_VAL		0x10000009//0x1000000a
#define DRAM_EXT_MODE_VAL	0x00000004

#define DRAM_MODE____108MHZ	0x00001442
#define DRAM_TIMING1_108MHZ	0x22513c15
#define DRAM_TIMING2_108MHZ	0x00000026
#define DRAM_REF_CTL_108MHZ	0x0000883b

#define DRAM_MODE____135MHZ	0x00001442
#define DRAM_TIMING1_135MHZ	0x1c5244a5//0x22513c15
#define DRAM_TIMING2_135MHZ	0x00000026//0x00000026
#define DRAM_REF_CTL_135MHZ	0x0000883b

#define DRAM_MODE____216MHZ	0x00001642
#define DRAM_TIMING1_216MHZ	0x2c5b65b9//0x365a5d29
#define DRAM_TIMING2_216MHZ	0x0000002a
#define DRAM_REF_CTL_216MHZ	0x00008d2f

#define DRAM_MODE____243MHZ	0x00001642
#define DRAM_TIMING1_243MHZ	0x3c5a6d29
#define DRAM_TIMING2_243MHZ	0x0000002c
#define DRAM_REF_CTL_243MHZ	0x00008ed3

#define RCT_DLL0_108MHZ		0x00242424
#define RCT_DLL1_108MHZ		0x00242424
#define RCT_DLL0_135MHZ		0x00242424
#define RCT_DLL1_135MHZ		0x00242424
#define RCT_DLL0_216MHZ		0x00242424
#define RCT_DLL1_216MHZ		0x00242424
#define RCT_DLL0_243MHZ		0x00242424
#define RCT_DLL1_243MHZ		0x00242424

#define RCT_DLL_CTRL_SEL_VAL	0x00007000
#define RCT_DLL_OCD_BITS_VAL	0x00091556

/* Sync on 2009/03/23 */
[a2s_1Gb]
#define ARCH_VER		2100
#define DRAM_SIZE		0x08000000	/* 1024 Mbit */
#define DRAM_CFG_VAL		0x1000000a
#define DRAM_EXT_MODE_VAL	0x00000004

#define DRAM_MODE____108MHZ	0x00001452
#define DRAM_TIMING1_108MHZ	0x22524d26
#define DRAM_TIMING2_108MHZ	0x00000026
#define DRAM_REF_CTL_108MHZ	0x0000883b

#define DRAM_MODE____135MHZ	0x00001452
#define DRAM_TIMING1_135MHZ	0x22524d26
#define DRAM_TIMING2_135MHZ	0x00000026
#define DRAM_REF_CTL_135MHZ	0x0000883b

#define DRAM_MODE____216MHZ	0x00001652
#define DRAM_TIMING1_216MHZ	0x365b663a
#define DRAM_TIMING2_216MHZ	0x0000002a
#define DRAM_REF_CTL_216MHZ	0x00008d2f

#define DRAM_MODE____243MHZ	0x00001652
#define DRAM_TIMING1_243MHZ	0x3c5b763a
#define DRAM_TIMING2_243MHZ	0x0000002c
#define DRAM_REF_CTL_243MHZ	0x00008ed3

#define RCT_DLL0_108MHZ		0x00100620
#define RCT_DLL1_108MHZ		0x00100620
#define RCT_DLL0_135MHZ		0x00100620
#define RCT_DLL1_135MHZ		0x00100620
#define RCT_DLL0_216MHZ		0x00100620
#define RCT_DLL1_216MHZ		0x00100620
#define RCT_DLL0_243MHZ		0x00100620
#define RCT_DLL1_243MHZ		0x00100620

#define RCT_DLL_CTRL_SEL_VAL	0x00007000
#define RCT_DLL_OCD_BITS_VAL	0x00091556

/* Sync on 2008/08/29 */
[yamaha_1G]
#define ARCH_VER		2100
#define DRAM_SIZE		0x08000000	/* 1024 Mbit */
#define DRAM_CFG_VAL		0x1000000a
#define DRAM_EXT_MODE_VAL	0x00000004

#define DRAM_MODE____216MHZ	0x00001652
#define DRAM_TIMING1_216MHZ	0x365b663a
#define DRAM_TIMING2_216MHZ	0x0000002a
#define DRAM_REF_CTL_216MHZ	0x00008d2f

#define RCT_DLL0_216MHZ		0x00100620
#define RCT_DLL1_216MHZ		0x00100620

#define RCT_DLL_CTRL_SEL_VAL	0x00007000
#define RCT_DLL_OCD_BITS_VAL	0x00091556

/* Sync on 2009/03/27 */
[yamaha_512]
#define ARCH_VER		2100
#define DRAM_SIZE		0x04000000	/* 512 Mbit */
#define DRAM_CFG_VAL		0x10000009
#define DRAM_EXT_MODE_VAL	0x00000004

#define DRAM_MODE____135MHZ	0x00001452
#define DRAM_TIMING1_135MHZ	0x22524d26
#define DRAM_TIMING2_135MHZ	0x00000026
#define DRAM_REF_CTL_135MHZ	0x0000883b	/* 0x00008d2d */

#define RCT_DLL0_135MHZ		0x00100620
#define RCT_DLL1_135MHZ		0x00100620

#define RCT_DLL_CTRL_SEL_VAL	0x00005ef2	/* 0x00007000 */
#define RCT_DLL_OCD_BITS_VAL	0x00010202	/* 0x00091556 */