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.

GPIO mode of GREEN lines-DM-388

Other Parts Discussed in Thread: DM388, DM385

Hi guys,

I am working on DM-388 using IPNC_RDK_3.80.00

Actually I and my team have configured the Vout1 port for the camera sensor output.We have done all the related configurations and VENC settings.We are getting proper vout_clock,hsync and vsync.

The problem is that we are not getting data on GREEN lines but on RED and BLUE lines we are getting proper data.

Then I have checked the pin-mux settings and found that in kernel the GREEN lines are getting configured into gpio mode though we have done the correct pin-mux in devices.c file.In our reference board these lines are used as gpio but in our target board we are using these lines as camera out lines.

We have done all the pin-mux in arch/arm/mach-omap2/devices.c file.Please take a look at this



if (cpu_is_ti814x())     {

omap_mux_init_signal("vout1_clk", OMAP_MUX_MODE0 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_hsync", OMAP_MUX_MODE0 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_vsync", OMAP_MUX_MODE0 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_avid", OMAP_MUX_MODE0 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_fid", OMAP_MUX_MODE0 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_b_cb_c2", OMAP_MUX_MODE2 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_b_cb_c3", OMAP_MUX_MODE2 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_b_cb_c4", OMAP_MUX_MODE0 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_b_cb_c5", OMAP_MUX_MODE0 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_b_cb_c6", OMAP_MUX_MODE0 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_b_cb_c7", OMAP_MUX_MODE0 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_b_cb_c8", OMAP_MUX_MODE0 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_b_cb_c9", OMAP_MUX_MODE0 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_g_y_yc2", OMAP_MUX_MODE2 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_g_y_yc3", OMAP_MUX_MODE2 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_g_y_yc4", OMAP_MUX_MODE0 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_g_y_yc5", OMAP_MUX_MODE0 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_g_y_yc6", OMAP_MUX_MODE0 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_g_y_yc7", OMAP_MUX_MODE0 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_g_y_yc8", OMAP_MUX_MODE0 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_g_y_yc9", OMAP_MUX_MODE0 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_r_cr2", OMAP_MUX_MODE2 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_r_cr3", OMAP_MUX_MODE2 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_r_cr4", OMAP_MUX_MODE0 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_r_cr5", OMAP_MUX_MODE0 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_r_cr6", OMAP_MUX_MODE0 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_r_cr7", OMAP_MUX_MODE0 | TI814X_PULL_DIS);
                omap_mux_init_signal("vout1_r_cr8", OMAP_MUX_MODE0 | TI814X_PULL_DIS);

}

Instead of doing this pin-mux in kernel, when we are reading the mode register of GREEN lines it is always showing gpio mode.All the pin-mux is done in this file only.We are even unable to write the mode registers manually in kernel.

We seached a lot to find from where these pins are getting configured into gpio mode but we are unable to find it.We tried devmem2 utility to write on mode registers but it is also not working.

So can you please tell us what are the expected places to find where these pins are getting configured into gpio mode or tell us some alternate ways to write the mode registers ?

Waiting for your reply


Regards,
Hardik

  • Hardik,

    Hardik Patel89 said:
    I am working on DM-388

    Hardik Patel89 said:
    if (cpu_is_ti814x()

    Are you sure your DM388 device is detected from the cpu_is_ti814x() function? I see we have also cpu_is_ti81xx() and cpu_is_dm385() functions. Make sure that the if (cpu_is_ti814x()) is true.

    Hardik Patel89 said:
    We have done all the pin-mux in arch/arm/mach-omap2/devices.c file.

    Make sure you are aligned with the below wiki page (especially the TI813x part):

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_User_Guide#TI814X.2FTI813X

    Hardik Patel89 said:
    We seached a lot to find from where these pins are getting configured into gpio mode but we are unable to find it.

    Check if some firmware (if any) is overwriting your kernel settings. See the below e2e thread for more info:

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/378037.aspx

    Regards,
    Pavel

     

  • Hi Pavel,

    1.if (cpu_is_ti814x()) is true.We have checked it.

    2.Our pin-muxing is also fine and strictly according to TI81XX_PSP_User_Guide.

    3.We left with is some firmware is overriding our pin-mux ? YES

    Initially we disabled the complete mcfw camera application initialization script (Source/ipnc_rdk/ipnc_mcfw/bin/ti814x/init.sh) and loaded a linux image only to verify that the Pin multiplexing in kernel code is correct. After loading this image and reading back the pad configuration registers, We got the pin muxing same as we have done in kernel code.

    As init.sh is also invoking many scripts, we started disabling the cores one by one and in this  process we found out that by disabling the "load_vpss.sh" (Source/ipnc_rdk/ipnc_mcfw/bin/ti814x/scripts/load_vpss.sh) for M3 core initialization pin multiplexing is not getting changed.

    Now we are quite sure that M3 core initialization is affecting the pin-mux settings.Now I have searched in the source code but still I am unable to locate the exact location of file.

    Can u tell me how I get to know what are files which are getting invoked by this load_vpss.sh script ?

    Waiting for your reply !!

    Regards,
    Hardik

  • Hardik,

    Hardik Patel89 said:
    Can u tell me how I get to know what are files which are getting invoked by this load_vpss.sh script ?

    Sorry, I have no view over the IPNC RDK. Please check this with your local FAE.

    I have also notified the IPNC RDK team for help.

    Regards,
    Pavel

  • Hi,

    We have solved the issue.Actually our pin-muxing in the kernel is getting overridden by M3 core initialisation.I got pin-mux here in this file and make modification here.

    ti_tools/iss_03_80_00_00/packages/ti/psp/platforms/ti814x/src/iss_platformTI814x.c

    There's one more file where pin-mux is defined(given below).But in my case this pin-mux was not creating any problem.But for safe side I have commented this.Just commented CONFIG_PIN_MUX macro in below file.

    ti_tools/hdvpss_01_00_01_37/packages/ti/psp/platforms/ti814x/src/vps_platformTI814x.c

    The pin-mux defined in this RDK is very bad.I have faced lots of issue due to this pin-muxing.They doing pin-muxing anywhere in the code wherever they want.Nor they have added proper comments for that.Its very hard to find out from where your pin-muxing is done.Even TI is not providing proper support for this.

    Regards,
    Hardik