Addding MAX14830 as a SPI1 Node for verdin am62


i am trying to add MAx14830 as a SPI node with MCU_gpio as a parent interrupt node with GPIO1 as interrupt source in verdin am62.

kindly help me in creating this?

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


To add the MAX14830 as a SPI node in your device tree with an MCU GPIO as the parent interrupt node and using GPIO1 as the interrupt source, you will need to modify your device tree source file (.dts). Here’s an example of how you can define the MAX14830 SPI node:

&spi1 {
    /* Make sure SPI1 is enabled and properly configured */
    status = "okay";

    max14830: max14830@0 {
        compatible = "maxim,max14830";
        reg = <0>; /* SPI chip select 0 */
        spi-max-frequency = <10000000>; /* Adjust the max frequency as needed */

        interrupt-parent = <&gpio1>;
        interrupts = <YOUR_INTERRUPT_PIN IRQ_TYPE_EDGE_FALLING>; /* Replace YOUR_INTERRUPT_PIN with the actual GPIO pin number used for interrupt */

        /* Configure the clocks */
        clocks = <&clk20m>;
        clock-names = "xtal";

        /* Add GPIO controller properties if needed */
        #gpio-cells = <2>;

        /* Specify the UART line properties if necessary */
        maxim,num-uarts = <4>; /* MAX14830 supports 4 UART lines */
        /* Example for one UART line */
        uart0: uart@0 {
            reg = <0>;
            maxim,brg-divisor = <13>;
            maxim,clk-multiplier = <1>;
            maxim,auto-sleep-ms = <1000>;
        /* Repeat the above block for other UART lines as needed */

This example assumes you’re using SPI1 (&spi1 node) and that your device tree already defines &gpio1 for GPIO interrupts. You’ll need to replace YOUR_INTERRUPT_PIN with the actual GPIO pin number you’re using for the MAX14830 interrupt line. Also, adjust the spi-max-frequency and other parameters according to your specific requirements and the MAX14830 datasheet.

Remember, the exact configuration might vary depending on your hardware setup and the Linux kernel version you’re using. Ensure that the SPI and GPIO configurations match your hardware design and that the interrupt pin is correctly defined in your system.

After modifying the device tree, recompile it and deploy it to your device. Test the configuration to ensure the MAX14830 is correctly recognized and functioning as expected.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

CAN (Linux) | Toradex Developer Center.

Hi @naveenkumar.muthusam,

Please do not post multiple question for similar topic.
Use below thread for discussing MAZ14830 support
Issue in adding MAX14830

Best Regards
Ritesh Kumar