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.

AM3352: MAX3421 SPI interface issue

Part Number: AM3352
Other Parts Discussed in Thread: SN65HVS882, WL1271

Hi,

I am trying to interface MAX3421 usb controller with AM3352. I am not able to communicate with controller via spi0.

.config enabled "CONFIG_USB_MAX3421_HCD=m"

did insmod with  max3421-hcd.ko

Please find below dts file

&spi0 {

pinctrl-names = "default";
pinctrl-0 = <&spi0_pins_default>;
compatible = "maxim,max3421";
reg = <0>;
maxim,vbus-en-pin = <3 1>;
spi-max-frequency = <26000000>;
// interrupt-parent = <&PIC>; // what is this PIC
interrupts = <42>;
};

spi0_pins_default: spi0_pins_default {
pinctrl-single,pins = <
AM33XX_IOPAD(0x150, PIN_INPUT | MUX_MODE0) /* (A17) spi0_sclk.spi0_sclk */

AM33XX_IOPAD(0x154, PIN_INPUT | MUX_MODE0) /* (B17) spi0_d0.spi0_d0 */

AM33XX_IOPAD(0x158, PIN_INPUT | MUX_MODE0) /* (B16) spi0_d1.spi0_d1 */

AM33XX_IOPAD(0x15c, PIN_INPUT | MUX_MODE0) /* (A16) spi0_cs0.spi0_cs0 */
>;
};

Please let me know above dts is perfect or not.

What is this &PIC to define in .dts file.

Checked with oscilloscope sclk is not generating.

Please help me to solve this problem.

How to probe sclk of spi0 in kernel. To check in oscilloscope.

Regards,

Subramanya 

  • Hi,

    I am using Kernel version 4.19.38-g4dae378bbe latest sdk.

    Regards,

    Subramanya

  • Hi Subramanya,

    I can only provide you below txt file for reference, try to align with it as much as you can.

    {PSDK6}/board-support/linux-4.19.38/Documentation/devicetree/bindings/usb/maxim,max3421.txt

    Your questions are specific for MAX3421 usb controller, thus you need to contact this chip vendor support team.

    Regarding AM335x McSPI module, I can provide you below user guides:

    linux-4.19.38/Documentation/devicetree/bindings/spi/omap-spi.txt
    linux-4.19.38/Documentation/devicetree/bindings/spi/spi-bus.txt

    For example AM335x McSPI DTS files you can check:

    linux-4.19.38/arch/arm/boot/dts/am335x-icev2.dts - SN65HVS882 digital-input serializer

    linux-4.19.38/arch/arm/boot/dts/am335x-cm-t335.dts - WL1271 WiFi module

    linux-4.19.38/arch/arm/boot/dts/am335x-pdu001.dts - cfaf240320a032t TFT LCD module

    Regards,
    Pavel