On sabresd board, PMIC_ON_REQ control pmic power on/off, we can set TOP and
DP_EN of SNVS_LPCR to implement power off by software. On this way,SNVS RTC
alarm can work after power off. The description of register can be found on
other SNVS block document which provided by IC team, not i.MX6 RM.
Signed-off-by: Robin Gong <B38343@freescale.com>
.pixel_clk = "emi_clk",
};
+#define SNVS_LPCR 0x38
+static void mx6_snvs_poweroff(void)
+{
+
+ void __iomem *mx6_snvs_base = MX6_IO_ADDRESS(MX6Q_SNVS_BASE_ADDR);
+ u32 value;
+ value = readl(mx6_snvs_base + SNVS_LPCR);
+ /*set TOP and DP_EN bit*/
+ writel(value | 0x60, mx6_snvs_base + SNVS_LPCR);
+}
+
/*!
* Board specific initialization.
*/
gps_power_on(true);
/* Register charger chips */
platform_device_register(&sabresd_max8903_charger_1);
+ pm_power_off = mx6_snvs_poweroff;
+
}
extern void __iomem *twd_base;