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.

TDA4VH-Q1: pinmux MCU_ADC0 out of range

Part Number: TDA4VH-Q1
Other Parts Discussed in Thread: SYSCONFIG

Hi

We are seeing the following Linux kernel errors on our board:

pinctrl-single 4301c068.pinctrl: mux offset out of range: 0x134 (0x120)
pinctrl-single 4301c068.pinctrl: could not add functions for mcu-adc0-pins-default 308x

Pinmux configuration generated with SysConfig (Version 1.18.0+3266) looks like:

&wkup_pmx2 {
	mcu_adc0_pins_default: mcu-adc0-pins-default { /* xqq: verified that put it in wkup_pmx0 is also ok. will check if in wkup_pmx2 is ok */
		pinctrl-single,pins = <
			J784S4_WKUP_IOPAD(0x134, PIN_INPUT, 0) /* (P36) MCU_ADC0_AIN0 */ /* WKUP_PADCONFIG_77 */
			J784S4_WKUP_IOPAD(0x138, PIN_INPUT, 0) /* (V36) MCU_ADC0_AIN1 */ /* WKUP_PADCONFIG_78 */
			J784S4_WKUP_IOPAD(0x13c, PIN_INPUT, 0) /* (T34) MCU_ADC0_AIN2 */ /* WKUP_PADCONFIG_79 */
			J784S4_WKUP_IOPAD(0x140, PIN_INPUT, 0) /* (T36) MCU_ADC0_AIN3 */ /* WKUP_PADCONFIG_80 */
			J784S4_WKUP_IOPAD(0x144, PIN_INPUT, 0) /* (P34) MCU_ADC0_AIN4 */ /* WKUP_PADCONFIG_81 */
			J784S4_WKUP_IOPAD(0x148, PIN_INPUT, 0) /* (R37) MCU_ADC0_AIN5 */ /* WKUP_PADCONFIG_82 */
			J784S4_WKUP_IOPAD(0x14c, PIN_INPUT, 0) /* (R33) MCU_ADC0_AIN6 */ /* WKUP_PADCONFIG_83 */
		>;
	};
};

Pinctrl configuration (from SDK) looks like:

wkup_pmx2: pinctrl@4301c068 {
	compatible = "pinctrl-single";
	/* Proxy 0 addressing */
	reg = <0x00 0x4301c068 0x00 0x128>;
    #pinctrl-cells = <1>;
	pinctrl-single,register-width = <32>;
	pinctrl-single,function-mask = <0xffffffff>;
}

Could you please help us solve the issue?

Best Regards

Daniel

  • Hello Daniel,

    PROCESSOR-SDK-LINUX-J784S4 v09.00.01.03 has an updated J784S4 EVM device tree file with the correct offsets.

    Please let me know if you have any questions.

    Regards,
    Mark

  • Hi Mark

    Whit your changes our device tree looks like this

    &wkup_pmx2 {
    	ac_loss_detect_pins_default: ac-loss-detect-pins-default {
    		pinctrl-single,pins = <
    			J784S4_WKUP_IOPAD(0x0d0, PIN_INPUT, 7) /* (H35) WKUP_GPIO0_4 */  /* WKUP_PADCONFIG_52 */ /* AC Loss Detect */
    		>;
    	};
    
    	vdd_mmc1_pins_default: vdd-mmc1-pins-default {
    		pinctrl-single,pins = <
    			J784S4_WKUP_IOPAD(0x0e0, PIN_OUTPUT, 7) /* (L35) WKUP_GPIO0_8 */  /* WKUP_PADCONFIG_56 */
    		>;
    	};
    
    	mcu_adc0_pins_default: mcu-adc0-pins-default {
    		pinctrl-single,pins = <
    			J784S4_WKUP_IOPAD(0x0cc, PIN_INPUT, 0) /* (P36) MCU_ADC0_AIN0 */ /* WKUP_PADCONFIG_77 */
    			J784S4_WKUP_IOPAD(0x0d0, PIN_INPUT, 0) /* (V36) MCU_ADC0_AIN1 */ /* WKUP_PADCONFIG_78 */
    			J784S4_WKUP_IOPAD(0x0d4, PIN_INPUT, 0) /* (T34) MCU_ADC0_AIN2 */ /* WKUP_PADCONFIG_79 */
    			J784S4_WKUP_IOPAD(0x0d8, PIN_INPUT, 0) /* (T36) MCU_ADC0_AIN3 */ /* WKUP_PADCONFIG_80 */
    			J784S4_WKUP_IOPAD(0x0dc, PIN_INPUT, 0) /* (P34) MCU_ADC0_AIN4 */ /* WKUP_PADCONFIG_81 */
    			J784S4_WKUP_IOPAD(0x0e0, PIN_INPUT, 0) /* (R37) MCU_ADC0_AIN5 */ /* WKUP_PADCONFIG_82 */
    			J784S4_WKUP_IOPAD(0x0e8, PIN_INPUT, 0) /* (R33) MCU_ADC0_AIN6 */ /* WKUP_PADCONFIG_83 */
    		>;
    	};
    };

    Can you tell me the correct values for H35 and L35? I think they are wrong, too.

    Are you going to update the processor data sheet? We are seeing the old values there (Revision A).

    And are you going to update the sysconfig tool, too?

    Best Regards

    Daniel

  • Hi Daniel,

    Thanks for your response.

    The SysConfig tool generates WKUP PADCONFIG mux offsets using 0x4301C000 as the base address. The SDK splits the WKUP pinmux up into four regions and thus have four base addresses: 0x4301C000, 0x4301C038, 0x4301C068, and 0x4301C190.

    H35 and L35 belong to wkup_pmx2 (base address is 0x4301C068); therefore, the current mux offsets of 0x0D0 and 0x0E0 should actually be 0x0D0 - 0x068 (H35 mux offset = 0x068) and 0x0E0 - 0x068 (L35 mux offset = 0x078).

    I will reach out to the PROCESSORS SDK team to investigate the mux offset, and let you know our plans for the datasheet and SysConfig tool by end of business next Monday.

    Regards,
    Mark

  • Daniel,

    The datasheet will not be updated, because this multi-base address and offset is a Linux-specific addressing scheme. A base address + its proper offset will be equivalent to its PADCONFIG address in the datasheet (eg. WKUP_PADCONFIG_77: 0x4301C068 + 0x0CC = 0x4301C134).

    In the next SysConfig release, the devicetree.dtsi file will reflect the correct mux offset corresponding to each base address. In the meantime, please manually adjust the offset depending on which region the PADCONFIG address belongs to similar to my above post.

    • 0x4301C000: no adjustment
    • 0x4301C038: offset = offset from 0x4301C000 - 0x038
    • 0x4301C068: offset = offset from 0x4301C000 - 0x068
    • 0x4301C190: offset  = offset from 0x4301C000 - 0x190

    Regards,
    Mark