Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 29 Oct 2014 02:31 PM by  Adam Ford
How to set vmmc1
 10 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Daniel Darden
New Member
New Member
Posts:16


--
28 Oct 2014 06:00 PM
    VMMC1 seems to default to 1.8V. I found a file "microvolts" under ./sys/devices/platform/reg-fixed-voltage.1/regulator/regulator.1/ which has 1800000, but this file is readonly. How do you configure vmmc1 for 3.0V?
    Adam Ford
    Advanced Member
    Advanced Member
    Posts:794


    --
    29 Oct 2014 07:04 AM
    I don't know which board you want to modify, but I have some examples on how to patch the files for the L138 to change the default voltages. Check out http://support.logicpd.co...ft/1839/Default.aspx

    I wouldn't necessarily apply those patches to other BSP's, but you can see the functions calls and structures used to define the voltages at start-up or if the speed changes.

    If you tell me which board you are using, I can be more help.

    adam
    Daniel Darden
    New Member
    New Member
    Posts:16


    --
    29 Oct 2014 10:03 AM
    Sorry I should have mentioned that. I am using the DM3730 Torpedo wireless with BSP 2.4-3.
    Adam Ford
    Advanced Member
    Advanced Member
    Posts:794


    --
    29 Oct 2014 10:42 AM
    VMMC1 is not ./sys/devices/platform/reg-fixed-voltage.1/regulator/regulator.1/

    If you type

    cat /sys/devices/platform/reg-fixed-voltage.1/regulator/regulator.1/name

    you will find that it returns vwl1271

    The voltage to MMC1 is already set to 3.15V

    You should be able to confirm this by measuring the voltage across C59 near the MMC socket on the bottom side of the eval board.

    I would suggest that you double check that, and let me know if you are still not seeing the correct voltage. If it booted from the SD card, I would expect VMMC1 to be correct or the SD card wouldn't have worked.

    adam



    Daniel Darden
    New Member
    New Member
    Posts:16


    --
    29 Oct 2014 10:54 AM
    Voltage is correct on the eval board. We have a custom board carrier board with some issues which made me think it was set to 1.8V. Thanks for the help.

    Out of curiosity, what would I need to modify to change this voltage? I gather from your example this is not a runtime configurable item. I have found many reference to vmmc1 in patch files in LPD-IP-package -pool and a ton of references in different files under rpm/BUILD.
    Adam Ford
    Advanced Member
    Advanced Member
    Posts:794


    --
    29 Oct 2014 11:08 AM
    For clarity, vmmc1 is located by this regulator:

    /sys/devices/platform/omap/omap_i2c.1/i2c-1/1-004b/twl_reg.6/regulator/regulator.7

    You can confirm this by:

    cat /sys/devices/platform/omap/omap_i2c.1/i2c-1/1-004b/twl_reg.6/regulator/regulator.7/name
    VMMC1

    VMMC1 is set to 3.15V when the SD card is inserted:

    cat /sys/devices/platform/omap/omap_i2c.1/i2c-1/1-004b/twl_reg.6/regulator/regulator.7/microvolts
    3150000

    Are you still wanting to change VMMC1?

    adam
    Adam Ford
    Advanced Member
    Advanced Member
    Posts:794


    --
    29 Oct 2014 11:17 AM
    the voltage ranges are set in board-omap3logic.c

    You can set the min and max voltages in there.

    the full path is: /home/logic/logic/Logic_BSPs/Linux_3.0/1026167_LogicPD_Linux_BSP_2.4-3/rpm/BUILD/linux-3.0/arch/arm/mach-omap2/board-omap3logic.c

    Please EXERCISE CAUTION as using voltage ratings outside of component specs can damage the components. That file should have most of the voltage ratings for the various nets.

    adam
    Daniel Darden
    New Member
    New Member
    Posts:16


    --
    29 Oct 2014 12:04 PM
    I see the voltage range definitions,
    
    /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
    static struct regulator_init_data omap3logic_vmmc1 = {
    	.constraints = {
    		.name			= "VMMC1",
    		.min_uV			= 1850000,
    		.max_uV			= 3150000,
    		.valid_modes_mask	= REGULATOR_MODE_NORMAL
    					| REGULATOR_MODE_STANDBY,
    		.valid_ops_mask		= REGULATOR_CHANGE_VOLTAGE
    					| REGULATOR_CHANGE_MODE
    					| REGULATOR_CHANGE_STATUS,
    	},
    	.num_consumer_supplies  = 1,
    	.consumer_supplies      = &omap3logic_vmmc1_supply,
    };
    


    but where is the actual voltage setting assigned? i.e. what makes the "microvolts" file read 3150000?
    Adam Ford
    Advanced Member
    Advanced Member
    Posts:794


    --
    29 Oct 2014 12:11 PM
    If you change .max_uV to 3000000 it will become 3.0V

    If the system boots off the NAND and there is no SD card in place, it will use the .min_uV instead of the max. As soon as you insert an SD card, it will switch to using the max value instead. If you boot off the SD card it will also use the max value.

    adam
    Daniel Darden
    New Member
    New Member
    Posts:16


    --
    29 Oct 2014 02:10 PM
    Ok that explains some. We are booting off nand flash. However I am not seeing it behave as you describe.

    Eval board behavior:
    - Boot with no SD card installed: VMMC1 (measured across C59) is 0V, /sys/devices/platform/omap/omap_i2c.1/i2c-1/1-004b/twl_reg.6/regulator/regulator.7/microvolts reads 3150000
    - Install SD card while running: VMMC1 becomes 3.15V, sys/devices/platform/omap/omap_i2c.1/i2c-1/1-004b/twl_reg.6/regulator/regulator.7/microvolts reads 3150000
    - Remove SD card: VMMC1 drops back to 0V, sys/devices/platform/omap/omap_i2c.1/i2c-1/1-004b/twl_reg.6/regulator/regulator.7/microvolts reads 3150000


    Our custom board, with no SD attached, outputs VMMC1: 3.15V during boot, then drops down to 1.2V. However we just realized our custom board left the chip detect floating, we are going to ground that and see if things start working.
    Adam Ford
    Advanced Member
    Advanced Member
    Posts:794


    --
    29 Oct 2014 02:31 PM
    If you want to hold vmmc1 on, I would suggest holding the CS pin low. I would believe it should think the card is there and hold the power level high. I'll see if I can find where the card detect mechanism toggles the power and get back to you if I can find it.

    adam
    You are not authorized to post a reply.