Max14830, uart over spi, device tree overlay/kernel driver

736 views
Skip to first unread message

Laurits

unread,
Jul 20, 2016, 9:13:34 AM7/20/16
to BeagleBoard
I am trying to get MAX14830 to work with beaglebone black using max310x driver over spi. With my dts, the overlay gets loaded, but i dont get any new devices in /dev.  With my oscilloscope i can see that nothing happens and that CS is low (Active low, so something is wrong). I dont understand what I am doing wrong. I have the chip connected to a 4Mhz external crystal.

Output from dmesg after loading manually:
[  212.403551] bone_capemgr bone_capemgr: part_number 'BB-MAX14830-01', version 'N/A'
[  212.411232] bone_capemgr bone_capemgr: slot #6: override
[  212.416720] bone_capemgr bone_capemgr: Using override eeprom data at slot 6
[  212.423786] bone_capemgr bone_capemgr: slot #6: 'Override Board Name,00A0,Override Manuf,BB-MAX14830-01'
[  212.461917] bone_capemgr bone_capemgr: slot #6: dtbo 'BB-MAX14830-01-00A0.dtbo' loaded; overlay id #0

modalias:
debian@arm:~$ cat /sys/bus/spi/devices/*/modalias
spi:max14830

DTS:
/dts-v1/;
/plugin/;


/ {
        compatible = "ti,beaglebone", "ti,beaglebone-black";
        part-number = "BB-MAX14830-01";

        /* state the resources this cape uses */
        exclusive-use =
                /* the pin header uses */
                "P9.25",        /* spi irq: gpio3_21 */
                "P9.31",        /* spi: spi1_sclk */
                "P9.29",        /* spi: spi1_d0 */
                "P9.30",        /* spi: spi1_d1 */
                "P9.28",        /* spi: spi1_cs0 */
                /* the hardware IP uses */
                "gpio3_21",
                "spi1";

        fragment@0 {
                target = <&am33xx_pinmux>;
                __overlay__ {
                    bone_14830_spi1_pins: pinmux_bone_14830_spi1_pins {
                                pinctrl-single,pins = <
                                        0x190 0x33      /* mcasp0_aclkx.spi1_sclk, RX_ENABLED | PULLUP | MODE3 */
                                        0x194 0x33      /* mcasp0_fsx.spi1_d0, RX_ENABLED | PULLUP | MODE3 */
                                        0x198 0x13      /* mcasp0_axr0.spi1_d1, OUTPUT_PULLUP | MODE3 */
                                        0x19c 0x13      /* mcasp0_ahclkr.spi1_cs0, OUTPUT_PULLUP | MODE3 */
                                >;
                        };

                    bone_14830_pins: pinmux_bone_14830_pins {
                                pinctrl-single,pins = <
                                        0x1ac 0x37      /* mcasp0_ahclkx.gpio3_21, RX_ENABLED | PULLUP | MODE7 */
                                >;
                        };
                };
        };

        fragment@1 {
              target = <&spi1>;
                __overlay__ {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        status    = "okay";
                        pinctrl-names   = "default";
                        pinctrl-0       = <&bone_14830_spi1_pins>;
                        max14830@0 {
                                compatible = "maxim,max14830";
                                reg = <0>; /* cs0 */
                                mode=<0>;
                                spi-max-frequency=<1000000>;

                                pinctrl-names="default";
                                pinctrl-0 = <&bone_14830_pins>;
                                clocks=<&clk4m>;
                                clock-names="xtal";
                                interrupt-parent = <&gpio3>;
                                interrupts = <21 2>; // Edge Falling

                                clk4m: clk4m@10 {
                                        compatible = "fixed-clock";
                                        #clock-cells = <0>;
                                        clock-frequency = <4000000>;
                                };
                        };
                };
        };
};
 
 


sbha...@gmail.com

unread,
Jul 11, 2017, 8:13:30 AM7/11/17
to BeagleBoard
Hi,

Did you got this working ? If so please can you post the solution.

Jeff Andich

unread,
Jul 11, 2017, 12:07:52 PM7/11/17
to BeagleBoard, sbha...@gmail.com
We just received a Maxim 3107 evaluation board and WERE planning on interfacing it to the BeagleBoard-X15 to try to bring up extra UART ports over SPI/I2C on the BBX15, but then we found the room for a USB hub in place of the Maxim chips on our custom board.  Nonetheless, if there's anything you would like me (as a Linux newbie) to try on this setup (BBX15<->Maxim 3107 EVM) I will try to get around to it as a side project....  Thanks!
Reply all
Reply to author
Forward
0 new messages