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.

TDA4VM: SDK8.6 is unable to set registers on the linux side

Part Number: TDA4VM


The above is to set the register in SDK8.6, you can see that after setting and reading, the value does not change

The above is to set the register on SDK8.4, you can find the set after reading, the value can be set successfully

The above can cause in A72 device tree can't make pinmux function

  • Hi,

    I believe you are trying this on j721e/TDA4vm:

    It seems like this is being used for SPI3_CS0.

    SPI3_CS0. Can you double check in Device tree if this is being used in 8.6? Also is this a custom board or a TI EVM?

    - Keerthy

  • yes , i trying this on j721e/tda4vm.

    I did not find any other peripherals in the device tree that use the AA24 terminal

    Is currently configured for spi3_cs0 reason is in "psdkra/pdk_jacinto_08_06_00_31 / packages/ti/board/SRC/j721e_evm/J721E_c801soc1_pinmux_data c" initialization AA24 for s pi

  • Hi

    I believe you are trying this on j721e/TDA4vm:

              >> Yes.

    Also is this a custom board or a TI EVM?

              >> This problem exists in both custom board and TI EVM.

    We found this problem only exists when SBL boot, and SPL boot does not have this problem.

    We use SBL boot, and the boot flow is as follows:
    Boot Flow:tiboot3(SBL)-> can_boot_app_mcu_rtos(MCU1_0) -> lateapp1
                                                                                                     -> lateapp2
                                                                                                     -> atf_optee.appimage
                                                                                                     -> tikernelimage_linux.appimage
                                                                                                     -> tidtb_linux.appimage

    We want to set AA24/AA28 muxmode to MCAN11_TX/MCAN11_RX

    We found that they were set in SBL:
    pdk_jacinto_08_06_00_31/packages/ti/board/src/j721e_evm/J721E_pinmux_data_info.c

    /* MySPI3 -> SPI3_CS0 -> AA24 */
    {
        PIN_PRG0_PRU1_GPO7, PIN_MODE(4) | \
        ((PIN_PULL_DISABLE | PIN_INPUT_ENABLE) & (~PIN_PULL_DIRECTION))
    },

    /* MyMCASP1 -> MCASP1_AFSX -> AA28 */
    {
        PIN_PRG0_PRU1_GPO8, PIN_MODE(12) | \
        ((PIN_PULL_DISABLE | PIN_INPUT_ENABLE) & (~PIN_PULL_DIRECTION))
    },

    In SDK8.4, we can override muxmode as MCAN in Linux dts

    But in SDK8.6, Muxmod cannot be overwritten in Linux dts.
    Using devmem2 also cannot modify pinmux.


    Is there any restriction in SDK 8.6? Such as Firewall.

  • Hi,

    Typically if there is a firewall and you try to write then there will be a firewall exception and should cause a hang. You are observing that there is no crash. So can you try to write any other pinmux register from Linux using devmem2?

    Best Regards,

    Keerthy

  • Hi Keerthy

    I tried to write another pinmux register: V27, it also failed.

    we found CTRLMMR_MCU_SPI1_CTRL will also fail to write

    and can_boot_app_mcu_rtos(run on MCU1_0) writing this register will also failed.

  • Hi Zhang,

    I suspect this because of the SBL locking the pin mux register. Since you are able to read but not write to it.

    There are 2 lock registers.

    U-Boot explicitly unlocks. Check the file: arch/arm/mach-k3/common.c

    void mmr_unlock(phys_addr_t base, u32 partition)
    {
            /* Translate the base address */
            phys_addr_t part_base = base + partition * CTRL_MMR0_PARTITION_SIZE;
    
            /* Unlock the requested partition if locked using two-step sequence */
            writel(CTRLMMR_LOCK_KICK0_UNLOCK_VAL, part_base + CTRLMMR_LOCK_KICK0);
            writel(CTRLMMR_LOCK_KICK1_UNLOCK_VAL, part_base + CTRLMMR_LOCK_KICK1);
    }
    
    

    You will have do this manually and then try to write to the pin mux register. Please try and let  me know if you can proceed with this.

    Best Regards,
    Keerthy

  • Hi Keerthy
    Thank you very much!
    After unlocking, writing to the CTRLMMR register succeeded.

    We found SBL board library add CTRLMMR lock processing in SDK8.6.

    I added the following at the end of SBL board init processing to unlock all MMR register:

    Board_init(BOARD_INIT_UNLOCK_MMR);

  • Perfect! That is now clear.

    Thanks,
    Keerthy