rk30_phone:update board file from sdk
authorlw@rock-chips.com <lw@rock-chips.com>
Thu, 3 May 2012 04:17:28 +0000 (12:17 +0800)
committerlw <lw@rock-chips.com>
Thu, 3 May 2012 05:57:50 +0000 (13:57 +0800)
arch/arm/configs/rk30_phone_defconfig
arch/arm/mach-rk30/board-rk30-phone.c

index c64e0a9d5740065cd210ba7ebb53f7105e3b79f2..29d9a275faf7e183cc6a8f6df85246ce8e376ece 100755 (executable)
@@ -22,6 +22,7 @@ CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 CONFIG_MODULE_FORCE_UNLOAD=y
 CONFIG_ARCH_RK30=y
+CONFIG_DDR_TYPE_LPDDR=y
 CONFIG_DDR_SDRAM_FREQ=300
 CONFIG_WIFI_CONTROL_FUNC=y
 CONFIG_MACH_RK30_PHONE=y
index ad0c9e1bfc07a3634a47e3add6b11452fb58b529..f22aff8b18affb8c26c6df4dfdaa7af0012645a8 100755 (executable)
@@ -985,17 +985,11 @@ static int l3g4200d_init_platform_hw(void)
 }
 
 static struct l3g4200d_platform_data l3g4200d_info = {
-       .fs_range = 1,
-
-       .axis_map_x = 0,
-       .axis_map_y = 1,
-       .axis_map_z = 2,
-
-       .negate_x = 1,
-       .negate_y = 1,
-       .negate_z = 0,
-
+       .orientation = {0, 1, 0, -1, 0, 0, 0, 0, 1},
        .init = l3g4200d_init_platform_hw,
+       .x_min = 40,//x_min,y_min,z_min = (0-100) according to hardware
+       .y_min = 40,
+       .z_min = 20,
 };
 
 #endif
@@ -1881,24 +1875,34 @@ static void __init rk30_reserve(void)
        board_mem_reserved();
 }
 
-static struct cpufreq_frequency_table cpu_dvfs_table[] = {
-       //{.frequency   = 126*1000, .index      = 980*1000},
-       //{.frequency   = 252*1000, .index      = 980*1000},
-       //{.frequency   = 504*1000, .index      = 980*1000},
-       {.frequency = 816*1000, .index  = 1050*1000},
-       {.frequency = 1008*1000,.index  = 1150*1000},
-       {.frequency = 1200*1000,.index  = 1250*1000},
-       //{.frequency = 1416*1000,.index        = 1280*1000},
-       //{.frequency = 1512*1000,.index        = 1320*1000},
-       //{.frequency = 1560*1000,.index        = 1350*1000},
-       //{.frequency = 1608*1000,.index        = 1350*1000},
-       {.frequency     = CPUFREQ_TABLE_END},
-};
+/**
+ * dvfs_cpu_logic_table: table for arm and logic dvfs 
+ * @frequency  : arm frequency
+ * @cpu_volt   : arm voltage depend on frequency
+ * @logic_volt : logic voltage arm requests depend on frequency
+ * comments    : min arm/logic voltage
+ */
+static struct dvfs_arm_table dvfs_cpu_logic_table[] = {
+       //{.frequency = 252 * 1000,     .cpu_volt = 1050 * 1000,        .logic_volt = 1050 * 1000},//0.975V/1.000V
+       //{.frequency = 504 * 1000,     .cpu_volt = 1050 * 1000,        .logic_volt = 1050 * 1000},//0.975V/1.000V
+       {.frequency = 816 * 1000,       .cpu_volt = 1100 * 1000,        .logic_volt = 1100 * 1000},
+       {.frequency = 1008 * 1000,      .cpu_volt = 1150 * 1000,        .logic_volt = 1100 * 1000},
+       {.frequency = 1200 * 1000,      .cpu_volt = 1200 * 1000,        .logic_volt = 1100 * 1000},
+       //{.frequency = 1272 * 1000,    .cpu_volt = 1200 * 1000,        .logic_volt = 1150 * 1000},//1.150V/1.100V
+       //{.frequency = 1416 * 1000,    .cpu_volt = 1275 * 1000,        .logic_volt = 1150 * 1000},//1.225V/1.100V
+       //{.frequency = 1512 * 1000,    .cpu_volt = 1325 * 1000,        .logic_volt = 1200 * 1000},//1.300V/1.150V
+       //{.frequency = 1608 * 1000,    .cpu_volt = 1350 * 1000,        .logic_volt = 1200 * 1000},//1.325V/1.175V
+       {.frequency = CPUFREQ_TABLE_END},
+};
+
+#define DVFS_CPU_TABLE_SIZE    (ARRAY_SIZE(dvfs_cpu_logic_table))
+static struct cpufreq_frequency_table cpu_dvfs_table[DVFS_CPU_TABLE_SIZE];
+static struct cpufreq_frequency_table dep_cpu2core_table[DVFS_CPU_TABLE_SIZE];
 
 void __init board_clock_init(void)
 {
-       rk30_clock_data_init(periph_pll_297mhz, codec_pll_360mhz, max_i2s_12288khz);
-       dvfs_set_freq_volt_table(clk_get(NULL, "cpu"), cpu_dvfs_table);
+       rk30_clock_data_init(periph_pll_default, codec_pll_default, RK30_CLOCKS_DEFAULT_FLAGS);
+       dvfs_set_arm_logic_volt(dvfs_cpu_logic_table, cpu_dvfs_table, dep_cpu2core_table);
 }
 
 MACHINE_START(RK30, "RK30board")