Re: [PATCH] ARM: dts: omap3: Fix Reboot issue on Logic PD SOM-LV

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Woodruff, Richard <r-woodruff2@xxxxxx> [170126 06:11]:
> >  /* Set ACTIVE to SLEEP SEQ address in T2 memory*/
> > err = twl_i2c_write_u8(TWL_MODULE_PM_MASTER, address,
> > R_SEQ_ADD_A2S);
> > 
> > I am not an expert on the twl4030, but I am guessing that enables
> > sleep.
> 
> This PMIC at COLD reset uses internal OTP mask rom defaults for any sequencing needs.
> 
> After power up SW can programming in new sequences into PMIC internal SRAM. This flexibility is needed as the PMIC can control several different optional board level hook ups. To really program the PMIC correctly you have to know something about the boards requirements.
> 
> The above is telling the PMIC the address of the sequence to execute for an omap3 soc-level sleep event. The sequence is made up of internal write and delay commands.
> 
> If someone cares to understand, the PMIC memory can be dumped and the sequences examined. But as I said some of these sequences 'should' have a board-to-pmic hook up dependency.  Not all sequences will make sense for every board design. Generally to get OFF modes done correctly and optimized this level of detail needs to be handled.
> 
> Using trial and error maybe you can arrive with something which doesn't crash... but it might not really be doing the right thing. 

Well we do have off mode during idle working for quite a few omap3 based
boards just fine. And nothing prevents adding board specific configuration
as needed in addition to the three or four generic configurations we have.

Adam, you mentionend that MMC stops working on reboot. Care to try
something like the following patch? That's to keep VMMC1 from idling
assuming you're trying to boot from MMC1.

I recall playing with a SDIO WLAN card in MMC1 that I needed something
like this to keep the card enabled during off mode as otherwise VMMC1
would get scaled down to 1.8V during idle.

Note that's only set below for the osc_off mode, but you should be able
to verify this easily by measuring the VMMC1 from the slot pins. Also
something like that could be added to the reset sequence too if it helps.

Regards,

Tony

8< ------------------------

diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -174,6 +174,11 @@ enum {
 #define TWL_RESOURCE_GROUP_ACTIVE(group, type, type2)			\
 	{ MSG_BROADCAST(DEV_GRP_NULL, (group), (type), (type2),		\
 		RES_STATE_ACTIVE), TWL_DFLT_DELAY }
+#define TWL_REMAP_ON(res, devgrp, typ, typ2)				\
+	{ .resource = (res), .devgroup = (devgrp),			\
+	  .type = (typ), .type2 = (typ2),				\
+	  .remap_off = TWL_REMAP_SLEEP,					\
+	  .remap_sleep = TWL_REMAP_ACTIVE, }
 #define TWL_REMAP_SLEEP(res, devgrp, typ, typ2)				\
 	{ .resource = (res), .devgroup = (devgrp),			\
 	  .type = (typ), .type2 = (typ2),				\
@@ -822,6 +827,7 @@ static struct twl4030_power_data omap3_idle = {
 /* Disable 32 KiHz oscillator during idle */
 static struct twl4030_resconfig osc_off_rconfig[] = {
 	TWL_REMAP_OFF(RES_CLKEN, DEV_GRP_P1 | DEV_GRP_P3, 3, 2),
+	TWL_REMAP_ON(RES_VMMC1, TWL4030_RESCONFIG_UNDEF, 0, 0),
 	{ /* Terminator */ },
 };
 
-- 
2.11.0
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux