This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3352, Smartreflex

Other Parts Discussed in Thread: TPS65910A, AM3352

Hello,

 I'm having some issues getting smartreflex working on my custom board with an AM3352 and a TPS65910A PMIC. The error I'm getting at boot is:

[ 1.369079] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 1.369079] ThumbEE CPU extension supported.
[ 1.369171] mux: Failed to setup hwmod io irq -22
[ 1.369812] sr_dev_init: No voltage domain specified for smartreflex0.Cannot initialize
[ 1.378234] sr_dev_init: No voltage domain specified for smartreflex1.Cannot initialize
[ 1.386596] Power Management for AM33XX family
[ 1.386749] Trying to load am335x-pm-firmware.bin (60 secs timeout)
[ 1.386901] Copied the M3 firmware to UMEM
[ 1.386932] sr_init: No PMIC hook to init smartreflex
[ 1.386962] Cortex M3 Firmware Version = 0x181
[ 1.387420] sr_init: platform driver register failed for SR
[ 1.394805] clock: disabling unused clocks to save power

Anybody have any ideas on where to start looking?

BR

//Henrik

  • Hi Henrik,
     
    What is your processor package? Is I2C0 connected to PMIC pins 9, 11 (for I2C0_SCL) and 8, 10 (for I2C0_SDA). Processor should use I2C0 pins C16, C17.
  • Hello,

    The package is ZCZ, should have mentioned that. The PMIC is connected just like that. 

    //Henrik

  • Can you give your exact processor part number or post a picture of the package?

  • The part number is:

    AM3352BZCZA80

  • OK, that's a new part, should support Smart Reflex.
  • What is the Linux version you are using?

  • Have you tried the latest official release? It can be downloaded from here: http://software-dl.ti.com/sitara_linux/esd/AM335xSDK/latest/index_FDS.html

  • Hi Henrik,

    These errors occur during the Smartreflex device initialization inside <linux_dir>/arch/arm/mach-omap2/sr_device.c: sr_dev_init(), because the vdd_name member of the omap_hwmod structure is not initialized:

        if (!oh->vdd_name) {
            pr_err("%s: No voltage domain specified for %s."
                "Cannot initialize\n", __func__, oh->name);
            goto exit;
        }

    The omap_hwmod structures for "smartreflex0" and "smartreflex1" are initially filled inside <linux_dir>/arch/arm/mach-omap2/omap_hwmod_33xx_data.c:

    static struct omap_hwmod am33xx_smartreflex0_hwmod = {
        .name        = "smartreflex0",
        .class        = &am33xx_smartreflex_hwmod_class,
        .clkdm_name    = "l4_wkup_clkdm",
        .mpu_irqs    = am33xx_smartreflex0_irqs,
        .main_clk    = "smartreflex0_fck",
        .prcm        = {
            .omap4    = {
                .clkctrl_offs    = AM33XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET,
                .modulemode    = MODULEMODE_SWCTRL,
            },
        },
    };

    and

    static struct omap_hwmod am33xx_smartreflex1_hwmod = {
        .name        = "smartreflex1",
        .class        = &am33xx_smartreflex_hwmod_class,
        .clkdm_name    = "l4_wkup_clkdm",
        .mpu_irqs    = am33xx_smartreflex1_irqs,
        .main_clk    = "smartreflex1_fck",
        .prcm        = {
            .omap4    = {
                .clkctrl_offs    = AM33XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET,
                .modulemode    = MODULEMODE_SWCTRL,
            },
        },
    };

    The vdd_name member is not initialized here, but unfortunately I'm still having trouble finding who and where is doing it.

    I hope this points you in the right direction.

    I still recommend using the latest PSP as Biser suggested.

    Best regards,
    Miroslav

  • Hello,

     I updated the base to the latest released PSP release with ni changes. I had to fettle a bit with my board file to get am335x_opp_update() happen after regulator init but before smartreflex but I got it in the end.

    If I add the powerdomain into the smartreflex hwmod it goes a bit further but fails with:

    [1.435852] sr_dev_init: No Voltage table registerd fo VDD1.Something really wrong
    [ 1.435882]
    [ 1.445373] sr_dev_init: No Voltage table registerd fo VDD2.Something really wrong

    [1.454895] Power Management for AM33XX family
    [ 1.459686] Trying to load am335x-pm-firmware.bin (60 secs timeout)
    [ 1.466400] Copied the M3 firmware to UMEM
    [ 1.470703] sr_init: No PMIC hook to init smartreflex
    [ 1.475982] Cortex M3 Firmware Version = 0x181
    [ 1.481140] sr_init: platform driver register failed for SR

    The voltage tables are defined in mach-omap2/opp3xxx_data.c but I don't know where they are tied to the voltagedomain currently.

    //HEnrik

  • In your system the sr_device.c file is being built, but this file is intended for AM37x/OMAP3 SmartReflex.

    It appears you have selected the "SmartReflex support" option within the kernel configuration.  In menuconfig, navigate to System Type -> TI OMAP Common Features.  Make sure "AM33XX SmartReflex Support" is checked, and the "SmartReflex support" is unchecked.

    I have updated the following wiki to include this information:

    http://processors.wiki.ti.com/index.php/AM335x_Power_Management_User_Guide#SmartReflex

  • The smartreflex file that you want is in mach-omap2/am33xx-smartreflex-class2.c

    To see if the kernel is calling sr_init, you can add in sr_init() in the above file:

    printfk(KERN_INFO "sr_init class 2");

  • Hello,

     Now I'm not just a bit annoyed. This feature is not available in the TI git tree at arago-project but has to be separately patched in it seems. Even thou the SDK releases points to a specific tag in the PSP tree it is not everything. It makes maintaining our tree for all our AM335x platforms slightly problematic since it now means dissectin SDK releases for out of tree patches.

     Who thought this was a brilliant idea?

  • We started with PSP 04.06.00.07 which didn't meet our needs.  I decided not to patch and customized a fresh PSP 04.06.00.10 for our design.

  • Henrik Frilund said:

    Now I'm not just a bit annoyed. This feature is not available in the TI git tree at arago-project but has to be separately patched in it seems. Even thou the SDK releases points to a specific tag in the PSP tree it is not everything. It makes maintaining our tree for all our AM335x platforms slightly problematic since it now means dissectin SDK releases for out of tree patches.

     Who thought this was a brilliant idea?

    Sorry for that frustration.  We agree that is not the way it should be.  In fact, for much of the last year our software team has been focused on getting everything upstreamed to kernel.org.  They achieved that major milestone with the 3.12 kernel.  This greatly reduces the "extra patches" that need to be carried which should benefit everyone.  Our SDK 7.00 will be based on that 3.12 kernel and we hope your experience will be improved as a result.