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.

Compiler/TDA2EVM5777: How can i calculate the register address of pin muxing?

Part Number: TDA2EVM5777

Tool/software: TI C/C++ Compiler

Hi,

I want to know how to set pin muxing in dts file.

For example, i am using TDA2x board in linux and it uses dra7-evm-infoadas.dtb. 

In dra7.dtsi file, dra7_pmx_core is defined as below.

dra7_pmx_core: pinmux@1400 {
compatible = "ti,dra7-padconf",
"pinctrl-single";
reg = <0x1400 0x0468>;
#address-cells = <1>;
#size-cells = <0>;
#interrupt-cells = <1>;
interrupt-controller;
pinctrl-single,register-width = <32>;
pinctrl-single,function-mask = <0x3fffffff>;
};

If then, the offset of pinmux of dra7 is 1400. right?

Also, in dra7-evm.dts file, the pinctrl of mmc1 is defined as below.

The below is schematic of TDA2x SD card sheet.

Could you let me know why the register values of mmc1 are 0x354 / 0x358 / 0x35c / 0x360 / 0x364 / 0x368?

Thanks and Regards,

Yoo

  • Hi,

    In the device tree, nodes translate addresses based on the parent node.

    Refer to "arch/arm/boot/dts/dra7.dtsi"   The dra7_pmx_core node is under scm@2000 which is under  l4@4a000000 as part of the toplevel ocp interconnect.

    To calculate the address for the pinmux registers, you need to add following:

    0x4a000000 + //reg value for l4_cfg

    0x2000 + //reg value for scm

    0x1400 + //reg value for dra7_pmx_core

    0x354 //reg value for mmc1_clk pad register

    = 0x4a003754 

    Regards,

    Nikhil D