Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 77a8c7e5 authored by Patrick Menschel's avatar Patrick Menschel
Browse files

Fix: Rework pull-configuration for ehrpwm and eqep based on schematics.


The previous Fix was a mistake!

TB6612 has pull-downs, so disable pulls on all pins going there.

EQEP1 has external pull-downs, so disable pulls there again.
EQEP0,2 and the PRU emulated Encoder should mimic EQEP1 electrical
behaviour, so set pull-downs there.

Signed-off-by: default avatarPatrick Menschel <menschel.p@posteo.de>
parent 89acc476
Branches
1 merge request!104k3-am625-pocketbeagle2: Enable epwm2
Pipeline #8802 passed with stage
in 10 seconds
......@@ -160,7 +160,9 @@
>;
};
/* PWM1 for Motor 1 and 2 */
/* PWM1 for Motor 1 and 2
* Note: The Motor driver TB6612FNG has internal pull-downs, therefore disable internal pulls.
*/
ehrpwm1_pins: pinmux_ehrpwm1_pins {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_GPMC_A2, PIN_OUTPUT, MUX_MODE6) /* (U14) gpmc_a2.ehrpwm1a - PWM_1A */
......@@ -168,7 +170,9 @@
>;
};
/* PWM2 for Motor 3 and 4 */
/* PWM2 for Motor 3 and 4
* Note: The Motor driver TB6612FNG has internal pull-downs, therefore disable internal pulls.
*/
ehrpwm2_pins: pinmux_ehrpwm2_pins {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_GPMC_AD8, PIN_OUTPUT, MUX_MODE4) /* (U10) gpmc_ad8.ehrpwm2a - PWM_2A */
......@@ -176,15 +180,20 @@
>;
};
/* E1 */
/* E1
* Note: No external pull-down, therefore enable internal pull-down.
*/
eqep0_pins: pinmux_eqep0_pins {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_MCASP0_ACLKR, PIN_INPUT, MUX_MODE1) /* (B12) mcasp0_aclkr.eQEP0A_in */
AM33XX_PADCONF(AM335X_PIN_MCASP0_FSR, PIN_INPUT, MUX_MODE1) /* (C13) mcasp0_fsr.eQEP0B_in */
AM33XX_PADCONF(AM335X_PIN_MCASP0_ACLKR, PIN_INPUT_PULLDOWN, MUX_MODE1) /* (B12) mcasp0_aclkr.eQEP0A_in */
AM33XX_PADCONF(AM335X_PIN_MCASP0_FSR, PIN_INPUT_PULLDOWN, MUX_MODE1) /* (C13) mcasp0_fsr.eQEP0B_in */
>;
};
/* E2 */
/* E2
* Note: according to schematics, both pins have external 100k pull-down resistors,
* therefore disable the internal pull.
*/
eqep1_pins: pinmux_eqep1_pins {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_LCD_DATA12, PIN_INPUT, MUX_MODE2) /* (V2) lcd_data12.eQEP1A_in */
......@@ -192,18 +201,25 @@
>;
};
/* E3 */
/* E3
* Note: No external pull-down, therefore enable internal pull-down,
* mimic E2 behaviour.
*/
eqep2_pins: pinmux_eqep2_pins {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_GPMC_AD12, PIN_INPUT, MUX_MODE4) /* (T12) gpmc_ad12.eQEP2A_in */
AM33XX_PADCONF(AM335X_PIN_GPMC_AD13, PIN_INPUT, MUX_MODE4) /* (R12) gpmc_ad13.eQEP2B_in */
AM33XX_PADCONF(AM335X_PIN_GPMC_AD12, PIN_INPUT_PULLDOWN, MUX_MODE4) /* (T12) gpmc_ad12.eQEP2A_in */
AM33XX_PADCONF(AM335X_PIN_GPMC_AD13, PIN_INPUT_PULLDOWN, MUX_MODE4) /* (R12) gpmc_ad13.eQEP2B_in */
>;
};
/* E4 - Fake Encoder using PRU */
/* E4
* Note: Emulated Encoder by using PRU,
* no external pull-down, therefore enable internal pull-down,
* mimic E2 behaviour.
*/
pru_encoder_pins: pinmux_pru_encoder_pins {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_GPMC_AD14, PIN_INPUT_PULLUP, MUX_MODE6) /* (V13) gpmc_ad14.pr1_pru0_pru_r31_14 */
AM33XX_PADCONF(AM335X_PIN_GPMC_AD14, PIN_INPUT_PULLDOWN, MUX_MODE6) /* (V13) gpmc_ad14.pr1_pru0_pru_r31_14 */
/* Note: That is only PRU_E_A. PRU_E_B is nowhere to be found in 4.14 dts but it's (U13) */
>;
};
......@@ -256,7 +272,9 @@
>;
};
/* Onboard Motor Driver Control Pins */
/* Onboard Motor Driver Control Pins
* Note: The Motor driver TB6612FNG has internal pull-downs, therefore disable internal pulls.
*/
motor_pins: pinmux_motor_pins {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_GPMC_CSN3, PIN_OUTPUT, MUX_MODE7) /* (T13) gpmc_csn3.gpio2[0] - MDIR_1A */
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment