3 Replies Latest reply on Mar 31, 2015 1:32 PM by Intel_Peter

    Configuring a MAX3107-family SPI UART

    Bunsen

      I'm looking to add a few UARTs, and it's a power-sensitive application so I'd rather not keep USB constantly on.  Maxim has a family of SPI/I2C-attached UARTs, the MAX3107/3109/14830 (single/dual/quad), that look just about perfect and have linux driver support (max310x.c).  What I can't figure out is how to tell the driver that it needs to use GPIOx for its chip select and GPIOy for the interrupt request.  Is this something specified at compile time?  Where?

        • 1. Re: Configuring a MAX3107-family SPI UART
          Intel_Peter

          Hello Bunsen,

           

          Can you give me a little more info about your project, are you using the Arduino Expansion Board or the Mini Breakout Board? You're trying to communicate to the MAX3107 using SPI, right?

          I'll try to investigate more about this and If I find out something I will post it here.

           

          Peter.

          • 2. Re: Configuring a MAX3107-family SPI UART
            Bunsen

            I'm making a custom board, and would indeed be using SPI (I don't have a particular objection to using I2C, but all the driver code seems to assume a SPI connecton).  I'd probably be using the MAX14830 (need 5 UARTs in total: two radios, a GPS, a UART-based motor controller, and a debug console), which max310x.c says is supported along with the actual 310x part numbers.

             

            The extra 16 GPIOs provided by that chip would be handy as well, since I was planning to drop a PCA9555 on I2C, taking advantage of the fact that the kernel already expects three of those on the Arduino board and knows how to configure them so they just show up as gpio2xx.  I believe the max310x driver supports those GPIOs, but I didn't get far into figuring out how those are configured, e.g. how the gpiochipxxx/gpioxxx numbers are set (I think I saw some hard-coded numbers in one of the really old versions, possibly before max3107.c was replaced with max301x.c, but that may not still be relevant).  Any advice that would save me a few hours of debugging and digging through the source code would be appreciated.

            • 3. Re: Configuring a MAX3107-family SPI UART
              Intel_Peter

              Since you are creating your own board you may have to build a kernel and add drivers to it, so I'd suggest you to take a look at Yocto Project Linux Kernel Development Manual it is a guide that will can follow in order to develop your custom kernel. If you have any questions about it I'd also suggest you to contact https://www.yoctoproject.org/.

               

              Peter.