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.

AM6442: Is there a Linux (A53) driver for the EQEP peripheral in AM64X

Part Number: AM6442

I saw the AM62x posting from earlier this year? Has anyone in TI did a 64 bit Linux (A53 core) driver for the EQEP periphery in AM6x ? (I am asking for AM64x)

  • Hello Jim,

    Good question. We added an EQEP driver (in SDK 9.1 I believe), and when I check SDK 9.2 I see the eqep devicetree node defined for AM62x, AM62Ax, AM62Px, and AM64x.

    However, I do NOT see any documentation in the Linux SDK docs, and the AM64x SW Build Sheet for SDK 9.2 still lists EQEP as "not enabled in Linux".

    So my assumption is that the driver exists and was tested on AM64x, and we just have not finished adding the documentation. I'll check with the developer, and file some internal tickets to get the documentation updated.

    Regards,

    Nick

  • Actually, it looks like the driver might only be available starting in SDK 9.2.

    Regards,

    Nick

  • edited May 22, 2024: the final version of the documentation has been pushed. See https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1363410/am6442-is-there-a-linux-a53-driver-for-the-eqep-peripheral-in-am64x/5210141#5210141 

    Final followup, the documentation got stalled out in the draft/review state. I'll include the source code to generate the documentation here. There might be issues, since this is not a "finished" product.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    EQEP
    ---------------------------------
    .. rubric:: Introduction
    :name: introduction-linux-eqep
    Linux has support for EQEP (enhanced Quadature Encoder Pulse).
    EQEP channels can be used to interface with rotary encoder hardware.
    #. AM62x SK: EQEP0: k3-am62x-sk-eqep.dtso
    #. AM62Ax SK: EQEP0: k3-am62x-sk-eqep.dtbo
    #. AM64x SK: EQEP0: k3-am642-sk.dts
    #. AM62p SK: EQEP0: k3-am62p5-sk-eqep.dtso
    |
    .. rubric:: Kernel Configuration
    :name: driver-configuration-eqep
    .. rubric:: Enable the eHRPWM driver
    :name: enable-the-eqep-driver
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Regards,

    Nick

  • Nick: did that implementation go through some form of regression testing?

    Would it be fairly simple to take the MCU+ SDK's eqep_capture example on the R5 in FreeRTOS and morph that into Linuc on the A53?

    thanks

    Jim

  • Hello Jim,

    The code was tested on AM64x, but I am not sure exactly what tests were run. I can ask the developer if needed.

    I cannot comment on porting MCU+ SDK EQEP example to Linux. I would start with trying to run an example in Linux as per the draft documentation above, and if things do not work as expected you can ask followup questions:
    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1363410/am6442-is-there-a-linux-a53-driver-for-the-eqep-peripheral-in-am64x/5205034#5205034

    Regards,

    Nick

  • Nick - we should ask the developer to disclose what tests were run - that way you can ascertain what may be necessary and sufficient to qualify for the Linux representation to be a "finished" product in AM6x. I suspect someone from Houston Stafford (Paula Carrillo?) should be involved?

    Meanwhile I will look at the representation that you had supplied.

    thanks

    Jim

  • Hello Jim,

    Paula is focused more on the MCU+ side of things, I'll continue handling the Linux EQEP questions for now.

    The developer told me since this driver is so new, they are still working on setting up the EQEP test infrastructure for future SDK releases. I would expect that in the future, you will be able to see test outputs for the CICD snapshots here:
    https://software-dl.ti.com/cicd-report/linux/index.html?section=platform&platform=am64xx 

    They also finished merging in the EQEP driver documentation for the Linux SDK docs last night. I'll attach the updated source code here, since I'm not sure if the AM64x SDK 9.2 docs will be regenerated again in the near term, or if this update will show up for the first time in SDK 10.0 documentation:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    EQEP
    ----
    .. rubric:: Introduction
    :name: introduction-linux-eqep
    Linux has support for EQEP (Enhanced Quadature Encoder Pulse).
    EQEP channels can be used to interface with rotary encoder hardware.
    .. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX')
    - AM62x SK: EQEP0: k3-am62x-sk-eqep.dtso
    .. ifconfig:: CONFIG_part_variant in ('AM64X')
    - AM64x SK: EQEP0: k3-am642-sk.dts
    .. ifconfig:: CONFIG_part_variant in ('AM62PX')
    - AM62p SK: EQEP0: k3-am62p5-sk-eqep.dtso
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Regards,

    Nick