|
@@ -624,3 +624,105 @@ static struct regulator_init_data z2_tps65021_info[] = {
|
|
.name = "vcc_core range",
|
|
.name = "vcc_core range",
|
|
.min_uV = 800000,
|
|
.min_uV = 800000,
|
|
.max_uV = 1600000,
|
|
.max_uV = 1600000,
|
|
|
|
+ .always_on = 1,
|
|
|
|
+ .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
|
|
|
|
+ },
|
|
|
|
+ .consumer_supplies = z2_tps65021_consumers,
|
|
|
|
+ .num_consumer_supplies = ARRAY_SIZE(z2_tps65021_consumers),
|
|
|
|
+ }, {
|
|
|
|
+ .constraints = {
|
|
|
|
+ .name = "DCDC2",
|
|
|
|
+ .min_uV = 3300000,
|
|
|
|
+ .max_uV = 3300000,
|
|
|
|
+ .always_on = 1,
|
|
|
|
+ },
|
|
|
|
+ }, {
|
|
|
|
+ .constraints = {
|
|
|
|
+ .name = "DCDC3",
|
|
|
|
+ .min_uV = 1800000,
|
|
|
|
+ .max_uV = 1800000,
|
|
|
|
+ .always_on = 1,
|
|
|
|
+ },
|
|
|
|
+ }, {
|
|
|
|
+ .constraints = {
|
|
|
|
+ .name = "LDO1",
|
|
|
|
+ .min_uV = 1000000,
|
|
|
|
+ .max_uV = 3150000,
|
|
|
|
+ .always_on = 1,
|
|
|
|
+ },
|
|
|
|
+ }, {
|
|
|
|
+ .constraints = {
|
|
|
|
+ .name = "LDO2",
|
|
|
|
+ .min_uV = 1050000,
|
|
|
|
+ .max_uV = 3300000,
|
|
|
|
+ .always_on = 1,
|
|
|
|
+ },
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct i2c_board_info __initdata z2_pi2c_board_info[] = {
|
|
|
|
+ {
|
|
|
|
+ I2C_BOARD_INFO("tps65021", 0x48),
|
|
|
|
+ .platform_data = &z2_tps65021_info,
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static void __init z2_pmic_init(void)
|
|
|
|
+{
|
|
|
|
+ pxa27x_set_i2c_power_info(NULL);
|
|
|
|
+ i2c_register_board_info(1, ARRAY_AND_SIZE(z2_pi2c_board_info));
|
|
|
|
+}
|
|
|
|
+#else
|
|
|
|
+static inline void z2_pmic_init(void) {}
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+#ifdef CONFIG_PM
|
|
|
|
+static void z2_power_off(void)
|
|
|
|
+{
|
|
|
|
+ /* We're using deep sleep as poweroff, so clear PSPR to ensure that
|
|
|
|
+ * bootloader will jump to its entry point in resume handler
|
|
|
|
+ */
|
|
|
|
+ PSPR = 0x0;
|
|
|
|
+ local_irq_disable();
|
|
|
|
+ pxa27x_set_pwrmode(PWRMODE_DEEPSLEEP);
|
|
|
|
+ pxa27x_cpu_pm_enter(PM_SUSPEND_MEM);
|
|
|
|
+}
|
|
|
|
+#else
|
|
|
|
+#define z2_power_off NULL
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+/******************************************************************************
|
|
|
|
+ * Machine init
|
|
|
|
+ ******************************************************************************/
|
|
|
|
+static void __init z2_init(void)
|
|
|
|
+{
|
|
|
|
+ pxa2xx_mfp_config(ARRAY_AND_SIZE(z2_pin_config));
|
|
|
|
+
|
|
|
|
+ pxa_set_ffuart_info(NULL);
|
|
|
|
+ pxa_set_btuart_info(NULL);
|
|
|
|
+ pxa_set_stuart_info(NULL);
|
|
|
|
+
|
|
|
|
+ z2_lcd_init();
|
|
|
|
+ z2_mmc_init();
|
|
|
|
+ z2_mkp_init();
|
|
|
|
+ z2_i2c_init();
|
|
|
|
+ z2_spi_init();
|
|
|
|
+ z2_nor_init();
|
|
|
|
+ z2_pwm_init();
|
|
|
|
+ z2_leds_init();
|
|
|
|
+ z2_keys_init();
|
|
|
|
+ z2_pmic_init();
|
|
|
|
+
|
|
|
|
+ pm_power_off = z2_power_off;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+MACHINE_START(ZIPIT2, "Zipit Z2")
|
|
|
|
+ .atag_offset = 0x100,
|
|
|
|
+ .map_io = pxa27x_map_io,
|
|
|
|
+ .nr_irqs = PXA_NR_IRQS,
|
|
|
|
+ .init_irq = pxa27x_init_irq,
|
|
|
|
+ .handle_irq = pxa27x_handle_irq,
|
|
|
|
+ .timer = &pxa_timer,
|
|
|
|
+ .init_machine = z2_init,
|
|
|
|
+ .restart = pxa_restart,
|
|
|
|
+MACHINE_END
|