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.

Linux/AM3352: SPI configuration

Part Number: AM3352

Tool/software: Linux

Hi,

we have designed a customised Board withAM3352 Processor. In our Board we are using MAX14830(SPI to QUAD Uart). MAX14830 IC is connected to SPI1 of AM3352. We have enabled the driver in the Linux and we made the bellow changes in the DTS file.

spi1_pins: pinmux_spi1_pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x908, PIN_INPUT | MUX_MODE2)
AM33XX_IOPAD(0x90C, PIN_INPUT | MUX_MODE2)
AM33XX_IOPAD(0x910, PIN_INPUT | MUX_MODE2)
AM33XX_IOPAD(0x99C, PIN_INPUT | MUX_MODE3)
>;
};

&spi1 {
#address-cells = <1>;
#size-cells = <0>;

status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spi1_pins>;


max14830@0 {
#address-cells = <1>;
#size-cells = <0>;

compatible = "maxim,max14830";

reg = <0>;
spi-max-frequency = <10000>;
spi-cpha;
};


max14830@1 {
#address-cells = <1>;
#size-cells = <0>;

compatible = "maxim,max14830";

reg = <1>;
spi-max-frequency = <10000>;
};
};

Question:
---------
1. But During Kernel Booting we are not the Debug is not printed?
2. Any changes has to be done?
3. Can any one provide any suggestion to solve the issue ?

Regards,

Avinash N

  • Avinash Neethi1 said:

    max14830@0 {
    #address-cells = <1>;
    #size-cells = <0>;

    compatible = "maxim,max14830";

    reg = <0>;
    spi-max-frequency = <10000>;
    spi-cpha;
    };


    max14830@1 {
    #address-cells = <1>;
    #size-cells = <0>;

    compatible = "maxim,max14830";

    reg = <1>;
    spi-max-frequency = <10000>;
    };

    I do not see such properties like "spi-max-frequency" supported for max14830 DTS node. Refer to the below file for details:

    linux-4.9.59/Documentation/devicetree/bindings/serial/maxim,max310x.txt

    Avinash Neethi1 said:
    Question:
    ---------
    1. But During Kernel Booting we are not the Debug is not printed?
    2. Any changes has to be done?
    3. Can any one provide any suggestion to solve the issue ?

    If you want to see debug messages from kernel drivers (like max310x.c and spi-omap2-mcspi.c), you need to turn on kernel debug statements. Refer to the below pointers for details:

    Regards,
    Pavel

  • Hi Pavel, 

                We have made the changes in the DTS as per the linux-4.9.59/Documentation/devicetree/bindings/serial/maxim,max310x.txt. But still we are not cleared the Issue. Error occurred during Linux Booting 

    ERROR LOG:

    pi spi1.0: not using DMA for McSPI (-19)
    max310x spi1.0: not using DMA for McSPI (-19)
    max310x spi1.0: MAX14830 ID 0x00 does not match

    DTS Changed:

    &spi1 {
    #address-cells = <1>;
    #size-cells = <0>;

    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&spi1_pins>;

    max14830: max14830@1 {
    compatible = "maxim,max14830";
    spi-max-frequency = <26000000>;
    reg = <0>;
    clocks = <&clk24m0>;
    clock-names = "osc";
    clk24m0: clk24m0 {
    compatible = "fixed-clock";
    #clock-cells = <0>;
    clock-frequency = <24000000>;
    clock-accuracy = <100>;
    };
    };
    };

    We probed the Clock pin. No Clock is coming. Hence he have provided from an external oscillator (24 MHz). 

    Question:

    1. What Can be the Issue ?

    2. Any changes has to be done in driver?

    3. Can any one provide any suggestion to solve the issue ?

     

  • Avinash Neethi1 said:

    Error occurred during Linux Booting 

    ERROR LOG:

    pi spi1.0: not using DMA for McSPI (-19)
    max310x spi1.0: not using DMA for McSPI (-19)
    max310x spi1.0: MAX14830 ID 0x00 does not match

    Please provide the full boot log, not just part of it. You can put the log in txt file and attach it here in the forum.

    Avinash Neethi1 said:
    We probed the Clock pin. No Clock is coming. Hence he have provided from an external oscillator (24 MHz). 

    Which clock pin exactly? Please provide more details.

    Avinash Neethi1 said:
    1. What Can be the Issue ?

    The issue might be in improper DTS file update and/or wrong clock configuration.

    Avinash Neethi1 said:
    2. Any changes has to be done in driver?

    No, I do not think driver (max310x.c or spi-omap2-mcspi.c) should be changed.

    Avinash Neethi1 said:
    3. Can any one provide any suggestion to solve the issue ?

    I am the one that is trying to provide you suggestion to solve the issue.

    Regards,
    Pavel

  • Avinash Neethi1 said:
    pi spi1.0: not using DMA for McSPI (-19)
    max310x spi1.0: not using DMA for McSPI (-19)

    These messages means that you will use PIO mode, not DMA. This is just warning message, if you are not planning to use DMA for data transfer, you can ignore. See the below e2e threads for more info:

    Regards,
    Pavel

  • Hi Pavel,

    1. Please provide the full boot log, not just part of it. You can put the log in txt file and attach it here in the forum.

    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.14.0-rc8-dirty (cornet@cornet-desktop) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9)) #23 SMP Thu Mar 15 14:17:02 IST 2018
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] OF: fdt: Machine model: TI AM335x BeagleBone Black
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] efi: Getting EFI parameters from FDT:
    [    0.000000] efi: UEFI not found.
    [    0.000000] cma: Reserved 64 MiB at 0xbb800000
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM335X ES2.1 (neon)
    [    0.000000] random: fast init done
    [    0.000000] percpu: Embedded 17 pages/cpu @ef7c9000 s39372 r8192 d22068 u69632
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260096
    [    0.000000] Kernel command line: console=ttyO0,115200n8 root=PARTUUID=00000000-02 rw rootfstype=ext4 rootwait
    [    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
    [    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Memory: 953684K/1046528K available (9216K kernel code, 1316K rwdata, 3832K rodata, 2048K init, 323K bss, 27308K reserved, 65536K cma-reserved, 194560K highmem)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    [    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0xc0208000 - 0xc0c00000   (10208 kB)
    [    0.000000]       .init : 0xc1100000 - 0xc1300000   (2048 kB)
    [    0.000000]       .data : 0xc1300000 - 0xc14493d0   (1317 kB)
    [    0.000000]        .bss : 0xc14524d0 - 0xc14a3404   ( 324 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] Hierarchical RCU implementation.
    [    0.000000]  RCU event tracing is enabled.
    [    0.000000]  RCU restricting CPUs from NR_CPUS=16 to nr_cpu_ids=1.
    [    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
    [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    [    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [    0.000014] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [    0.000032] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [    0.000043] OMAP clocksource: timer1 at 24000000 Hz
    [    0.003576] timer_probe: no matching timers found
    [    0.003772] Console: colour dummy device 80x30
    [    0.003818] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
    [    0.089232] pid_max: default: 32768 minimum: 301
    [    0.089372] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.089389] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.090043] CPU: Testing write buffer coherency: ok
    [    0.090399] CPU0: thread -1, cpu 0, socket -1, mpidr 0
    [    0.090807] Setting up static identity map for 0x80300000 - 0x803000a0
    [    0.092167] Hierarchical SRCU implementation.
    [    0.094007] EFI services will not be available.
    [    0.094163] smp: Bringing up secondary CPUs ...
    [    0.094176] smp: Brought up 1 node, 1 CPU
    [    0.094185] SMP: Total of 1 processors activated (996.14 BogoMIPS).
    [    0.094193] CPU: All CPU(s) started in SVC mode.
    [    0.095524] devtmpfs: initialized
    [    0.102816] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    0.103375] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.103407] futex hash table entries: 256 (order: 2, 16384 bytes)
    [    0.107269] pinctrl core: initialized pinctrl subsystem
    [    0.109018] DMI not present or invalid.
    [    0.109544] NET: Registered protocol family 16
    [    0.111622] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.127612] omap_hwmod: debugss: _wait_target_disable failed
    [    0.180749] cpuidle: using governor menu
    [    0.186377] OMAP GPIO hardware version 0.1
    [    0.199605] No ATAGs?
    [    0.199622] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.200066] omap4_sram_init:Unable to allocate sram needed to handle errata I688
    [    0.200078] omap4_sram_init:Unable to get sram pool needed to handle errata I688
    [    0.204004] Serial: AMBA PL011 UART driver
    [    0.218555] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.219144] AT91: Could not find identification node
    [    0.220514] vgaarb: loaded
    [    0.221279] SCSI subsystem initialized
    [    0.221523] usbcore: registered new interface driver usbfs
    [    0.221577] usbcore: registered new interface driver hub
    [    0.221650] usbcore: registered new device driver usb
    [    0.222205] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
    [    0.222261] omap_i2c 4802a000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c1_pins, deferring probe
    [    0.222298] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring probe
    [    0.222969] pps_core: LinuxPPS API ver. 1 registered
    [    0.222978] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.223002] PTP clock support registered
    [    0.223150] EDAC MC: Ver: 3.0.0
    [    0.223600] dmi: Firmware registration failed.
    [    0.225408] clocksource: Switched to clocksource timer1
    [    0.273837] NET: Registered protocol family 2
    [    0.274490] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
    [    0.274567] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
    [    0.274675] TCP: Hash tables configured (established 8192 bind 8192)
    [    0.274789] UDP hash table entries: 512 (order: 2, 16384 bytes)
    [    0.274820] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
    [    0.274967] NET: Registered protocol family 1
    [    0.276120] hw perfevents: no interrupt-affinity property for /pmu, guessing.
    [    0.276306] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [    0.278813] workingset: timestamp_bits=30 max_order=18 bucket_order=0
    [    0.284156] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.284363] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.286539] bounce: pool size: 64 pages
    [    0.286639] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
    [    0.286652] io scheduler noop registered
    [    0.286659] io scheduler deadline registered
    [    0.286905] io scheduler cfq registered (default)
    [    0.286915] io scheduler mq-deadline registered
    [    0.286922] io scheduler kyber registered
    [    0.291710] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [    0.299100] pinctrl-single 44e10800.pinmux: Invalid number of rows: 0
    [    0.299124] pinctrl-single 44e10800.pinmux: no pins entries for backlight_pins
    [    0.299146] ecap: probe of 48300100.ecap failed with error -22
    [    0.300811] pwm-backlight ocp:l4_wkup@44c00000:backlight: ocp:l4_wkup@44c00000:backlight supply power not found, using dummy regulator
    [    0.354830] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
    [    0.357636] ***** Entered max310x_uart_init *****
    [    0.357704] SuperH (H)SCI(F) driver initialized
    [    0.358637] msm_serial: driver initialized
    [    0.358988] omap_uart 44e09000.serial: no wakeirq for uart0
    [    0.359069] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a OMAP UART0
    [    1.096788] console [ttyO0] enabled
    [    1.100960] omap_uart 48022000.serial: no wakeirq for uart1
    [    1.106966] 48022000.serial: ttyO1 at MMIO 0x48022000 (irq = 31, base_baud = 3000000) is a OMAP UART1
    [    1.117079] omap_uart 48024000.serial: no wakeirq for uart2
    [    1.122999] 48024000.serial: ttyO2 at MMIO 0x48024000 (irq = 32, base_baud = 3000000) is a OMAP UART2
    [    1.133133] omap_uart 481a8000.serial: no wakeirq for uart4
    [    1.139100] 481a8000.serial: ttyO4 at MMIO 0x481a8000 (irq = 33, base_baud = 3000000) is a OMAP UART4
    [    1.149166] STMicroelectronics ASC driver initialized
    [    1.156732] omap_rng 48310000.rng: Random Number Generator ver. 20
    [    1.176591] brd: module loaded
    [    1.186705] loop: module loaded
    [    1.194536] spi spi1.0: not using DMA for McSPI (-19)
    [    1.200253] ***** Entered max310x_spi_probe *****
    [    1.205215] max310x spi1.0: not using DMA for McSPI (-19)
    [    1.227647] max310x spi1.0: MAX14830 ID 0x00 does not match
    [    1.236233] libphy: Fixed MDIO Bus: probed
    [    1.315435] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [    1.323477] davinci_mdio 4a101000.mdio: detected phy mask ffffffc1
    [    1.333934] libphy: 4a101000.mdio: probed
    [    1.338217] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver unknown
    [    1.346627] davinci_mdio 4a101000.mdio: phy[2]: device 4a101000.mdio:02, driver unknown
    [    1.355011] davinci_mdio 4a101000.mdio: phy[3]: device 4a101000.mdio:03, driver unknown
    [    1.363413] davinci_mdio 4a101000.mdio: phy[4]: device 4a101000.mdio:04, driver unknown
    [    1.371814] davinci_mdio 4a101000.mdio: phy[5]: device 4a101000.mdio:05, driver unknown
    [    1.382188] cpsw 4a100000.ethernet: Detected MACID = 38:d2:69:ac:b1:a8
    [    1.390441] PPP generic driver version 2.4.2
    [    1.395251] PPP BSD Compression module registered
    [    1.400269] PPP Deflate Compression module registered
    [    1.405601] PPP MPPE Compression module registered
    [    1.410620] NET: Registered protocol family 24
    [    1.417031] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [    1.423881] ehci-pci: EHCI PCI platform driver
    [    1.428641] ehci-platform: EHCI generic platform driver
    [    1.434318] ehci-orion: EHCI orion driver
    [    1.438740] SPEAr-ehci: EHCI SPEAr driver
    [    1.443063] ehci-st: EHCI STMicroelectronics driver
    [    1.448328] ehci-exynos: EHCI EXYNOS driver
    [    1.452833] ehci-atmel: EHCI Atmel driver
    [    1.457174] tegra-ehci: Tegra EHCI driver
    [    1.461508] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
    [    1.468039] ohci-pci: OHCI PCI platform driver
    [    1.472746] ohci-platform: OHCI generic platform driver
    [    1.478425] SPEAr-ohci: OHCI SPEAr driver
    [    1.482742] ohci-st: OHCI STMicroelectronics driver
    [    1.488004] ohci-atmel: OHCI Atmel driver
    [    1.492794] usbcore: registered new interface driver cdc_acm
    [    1.498761] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
    [    1.507200] usbcore: registered new interface driver cdc_wdm
    [    1.513179] usbcore: registered new interface driver usb-storage
    [    1.519577] usbcore: registered new interface driver usbserial
    [    1.525737] usbcore: registered new interface driver usbserial_generic
    [    1.532597] usbserial: USB Serial support registered for generic
    [    1.538940] usbcore: registered new interface driver usb_debug
    [    1.545073] usbserial: USB Serial support registered for debug
    [    1.551223] usbserial: USB Serial support registered for xhci_dbc
    [    1.557647] usbcore: registered new interface driver garmin_gps
    [    1.563867] usbserial: USB Serial support registered for Garmin GPS usb/tty
    [    1.571200] usbcore: registered new interface driver navman
    [    1.577074] usbserial: USB Serial support registered for navman
    [    1.583295] usbcore: registered new interface driver option
    [    1.589168] usbserial: USB Serial support registered for GSM modem (1-port)
    [    1.596503] usbcore: registered new interface driver usb_serial_simple
    [    1.603364] usbserial: USB Serial support registered for carelink
    [    1.609786] usbserial: USB Serial support registered for zio
    [    1.615751] usbserial: USB Serial support registered for funsoft
    [    1.622062] usbserial: USB Serial support registered for flashloader
    [    1.628754] usbserial: USB Serial support registered for google
    [    1.634972] usbserial: USB Serial support registered for vivopay
    [    1.641301] usbserial: USB Serial support registered for moto_modem
    [    1.647903] usbserial: USB Serial support registered for novatel_gps
    [    1.654580] usbserial: USB Serial support registered for hp4x
    [    1.660639] usbserial: USB Serial support registered for suunto
    [    1.666880] usbserial: USB Serial support registered for siemens_mpi
    [    1.677698] i2c /dev entries driver
    [    1.691427] sdhci: Secure Digital Host Controller Interface driver
    [    1.698000] sdhci: Copyright(c) Pierre Ossman
    [    1.703688] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    1.813083] mmc0: host does not support reading read-only switch, assuming write-enable
    [    1.823551] mmc0: new high speed SDHC card at address 0003
    [    1.829864] pinctrl-single 44e10800.pinmux: pin PIN32 already requested by 481d8000.mmc; cannot claim for 47810000.mmc
    [    1.841133] pinctrl-single 44e10800.pinmux: pin-32 (47810000.mmc) status -22
    [    1.848537] pinctrl-single 44e10800.pinmux: could not request pin 32 (PIN32) from group pinmux_emmc_pins  on device pinctrl-single
    [    1.860849] omap_hsmmc 47810000.mmc: Error applying setting, reverse things back
    [    1.868626] omap_hsmmc: probe of 47810000.mmc failed with error -22
    [    1.876322] Synopsys Designware Multimedia Card Interface Driver
    [    1.883697] sdhci-pltfm: SDHCI platform and OF driver helper
    [    1.891550] pinctrl-single 44e10800.pinmux: Invalid number of rows: 0
    [    1.898358] pinctrl-single 44e10800.pinmux: no pins entries for user_leds_s0
    [    1.905775] leds-gpio: probe of leds failed with error -22
    [    1.912249] mmcblk0: mmc0:0003 SD4GB 3.68 GiB 
    [    1.918872] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.929390] NET: Registered protocol family 10
    [    1.936969]  mmcblk0: p1 p2
    [    1.941610] Segment Routing with IPv6
    [    1.945645] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    1.952496] NET: Registered protocol family 17
    [    1.962035] DCCP: Activated CCID 2 (TCP-like)
    [    1.966674] DCCP: Activated CCID 3 (TCP-Friendly Rate Control)
    [    1.973383] Key type dns_resolver registered
    [    1.978043] omap_voltage_late_init: Voltage driver support not added
    [    1.984706] ThumbEE CPU extension supported.
    [    1.989213] Registering SWP/SWPB emulation handler
    [    2.000454] pinctrl-single 44e10800.pinmux: Invalid number of rows: 0
    [    2.007348] pinctrl-single 44e10800.pinmux: no pins entries for pinmux_i2c0_pins
    [    2.015119] omap_i2c: probe of 44e0b000.i2c failed with error -22
    [    2.023559] pinctrl-single 44e10800.pinmux: Invalid number of rows: 0
    [    2.030406] pinctrl-single 44e10800.pinmux: no pins entries for pinmux_i2c1_pins
    [    2.038198] omap_i2c: probe of 4802a000.i2c failed with error -22
    [    2.046453] pinctrl-single 44e10800.pinmux: Invalid number of rows: 0
    [    2.053213] pinctrl-single 44e10800.pinmux: no pins entries for pinmux_i2c2_pins
    [    2.061040] omap_i2c: probe of 4819c000.i2c failed with error -22
    [    2.069612] pwm-backlight ocp:l4_wkup@44c00000:backlight: ocp:l4_wkup@44c00000:backlight supply power not found, using dummy regulator
    [    2.084926] hctosys: unable to open rtc device (rtc0)
    [    2.725734] EXT4-fs (mmcblk0p2): recovery complete
    [    2.835492] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [    2.844045] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [    2.852050] devtmpfs: mounted
    [    2.858196] Freeing unused kernel memory: 2048K
    [    3.078520] systemd[1]: System time before build time, advancing clock.
    [    3.127451] systemd[1]: systemd 229 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN)
    [    3.147065] systemd[1]: Detected architecture arm.
    
    Welcome to Ubuntu 16.04.2 LTS!
    
    [    3.186699] systemd[1]: Set hostname to <arm>.
    [    4.037706] systemd[1]: Reached target Remote File Systems (Pre).
    [  OK  ] Reached target Remote File Systems (Pre).
    [    4.075960] systemd[1]: Listening on Journal Socket (/dev/log).
    [  OK  ] Listening on Journal Socket (/dev/log).
    [    4.105974] systemd[1]: Started Trigger resolvconf update for networkd DNS.
    [  OK  ] Started Trigger resolvconf update for networkd DNS.
    [    4.145820] systemd[1]: Listening on udev Kernel Socket.
    [  OK  ] Listening on udev Kernel Socket.
    [    4.175862] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
    [  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
    [    4.215857] systemd[1]: Listening on udev Control Socket.
    [  OK  ] Listening on udev Control Socket.
    [    4.245892] systemd[1]: Listening on Syslog Socket.
    [  OK  ] Listening on Syslog Socket.
    [  OK  ] Reached target Swap.
    [  OK  ] Listening on Journal Socket.
    [  OK  ] Created slice System Slice.
             Mounting Debug File System...
             Starting Create Static Device Nodes in /dev...
             Starting Nameserver information manager...
             Starting Set console keymap...
             Starting Journal Service...
             Starting Load Kernel Modules...
    [  OK  ] Reached target Remote File Systems.
    [  OK  ] Reached target Encrypted Volumes.
    [  OK  ] Created slice system-serial\x2dgetty.slice.
             Starting Remount Root and Kernel File Systems...
    [  OK  ] Created slice User and Session Slice.
    [  OK  ] Reached target Slices.
    [  OK  ] Started Forward Password Requests to Wall Directory Watch.
    [  OK  ] Started Dispatch Password Requests to Console Directory Watch.
    [  OK  ] Mounted Debug File System.
    [  OK  ] Started Journal Service.
    [  OK  ] Started Create Static Device Nodes in /dev.
    [  OK  ] Started Set console keymap.
    [  OK  ] Started Load Kernel Modules.
    [  OK  ] Started Remount Root and Kernel File Systems.
    [  OK  ] Started Nameserver information manager.
    [  OK  ] Reached target Network (Pre).
             Starting udev Coldplug all Devices...
             Starting Load/Save Random Seed...
             Mounting Configuration File System...
             Starting Apply Kernel Variables...
             Starting udev Kernel Device Manager...
    [  OK  ] Reached target Local File Systems (Pre).
    [  OK  ] Reached target Local File Systems.
             Starting Set console font and keymap...
             Starting Flush Journal to Persistent Storage...
    [  OK  ] Mounted Configuration File System.
    [  OK  ] Started udev Kernel Device Manager.
    [  OK  ] Started Load/Save Random Seed.
    [  OK  ] Started Apply Kernel Variables.
    [  OK  ] Started Set console font and keymap.
    [  OK  ] Created slice system-getty.slice.
             Starting Raise network interfaces...
    [  OK  ] Started Flush Journal to Persistent Storage.
    [  OK  ] Found device /dev/ttyO0.
    [  OK  ] Started udev Coldplug all Devices.
             Starting Create Volatile Files and Directories...
    [  OK  ] Started Create Volatile Files and Directories.
             Starting Network Time Synchronization...
             Starting Update UTMP about System Boot/Shutdown...
    [  OK  ] Started Update UTMP about System Boot/Shutdown.
    [  OK  ] Started Network Time Synchronization.
    [  OK  ] Reached target System Time Synchronized.
    [  OK  ] Reached target System Initialization.
    [  OK  ] Started Daily apt activities.
    [  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
    [  OK  ] Started ACPI Events Check.
    [  OK  ] Reached target Paths.
    [  OK  ] Listening on D-Bus System Message Bus Socket.
    [  OK  ] Started Daily Cleanup of Temporary Directories.
    [  OK  ] Reached target Timers.
    [  OK  ] Listening on ACPID Listen Socket.
    [  OK  ] Reached target Sockets.
    [  OK  ] Reached target Basic System.
             Starting LSB: Load kernel modules needed to enable cpufreq scaling...
             Starting Connection service...
             Starting LSB: Set the CPU Frequency Scaling governor to "ondemand"...
    [  OK  ] Started D-Bus System Message Bus.
    [  OK  ] Started Connection service.
             Starting Avahi mDNS/DNS-SD Stack...
             Starting Cape Manager Service...
             Starting LSB: Start busybox udhcpd at boot time...
             Starting oFono Mobile telephony stack...
    [  OK  ] Started Regular background program processing daemon.
             Starting System Logging Service...
    [  OK  ] Started ACPI event daemon.
             Starting Restore /etc/resolv.conf i...re the ppp link was shut down...
             Starting Generic Board Startup...
             Starting Login Service...
             Starting Permit User Sessions...
    [  OK  ] Started Raise network interfaces.
    [  OK  ] Started Cape Manager Service.
    [  OK  ] Started Restore /etc/resolv.conf if...fore the ppp link was shut down.
    [  OK  ] Started Permit User Sessions.
    [  OK  ] Started System Logging Service.
    [  OK  ] Started LSB: Set the CPU Frequency Scaling governor to "ondemand".
    [  OK  ] Started Generic Board Startup.
    [  OK  ] Started LSB: Load kernel modules needed to enable cpufreq scaling.
    [  OK  ] Started LSB: Start busybox udhcpd at boot time.
    [  OK  ] Started Avahi mDNS/DNS-SD Stack.
    [  OK  ] Started oFono Mobile telephony stack.
    [  OK  ] Started Login Service.
             Starting WPA supplicant...
             Starting LSB: set CPUFreq kernel parameters...
             Starting Set console scheme...
    [  OK  ] Started Set console scheme.
    [  OK  ] Started WPA supplicant.
    [  OK  ] Started LSB: set CPUFreq kernel parameters.
    [  OK  ] Reached target Network.
             Starting OpenBSD Secure Shell server...
    [  OK  ] Reached target Network is Online.
             Starting /etc/rc.local Compatibility...
             Starting LSB: Advanced IEEE 802.11 management daemon...
             Starting LSB: Apache2 web server...
    [  OK  ] Started /etc/rc.local Compatibility.
    [  OK  ] Started LSB: Advanced IEEE 802.11 management daemon.
    [  OK  ] Started OpenBSD Secure Shell server.
    [  OK  ] Started Getty on tty1.
    [  OK  ] Started Serial Getty on ttyO0.
    [  OK  ] Reached target Login Prompts.
    [  OK  ] Started LSB: Apache2 web server.
    [  OK  ] Reached target Multi-User System.
    [  OK  ] Reached target Graphical Interface.
             Starting Update UTMP about System Runlevel Changes...
    [  OK  ] Started Update UTMP about System Runlevel Changes.
    
    Ubuntu 16.04.2 LTS arm ttyO0
    
    default username:password is [ubuntu:temppwd]
    
    

    2.Which clock pin exactly? Please provide more details.

    myspi1_pins_default: myspi1_pins_default {
    pinctrl-single,pins = <
    0x108 ( PIN_INPUT | MUX_MODE2 ) /* (H16) gmii1_col.spi1_sclk */
    0x10c ( PIN_INPUT | MUX_MODE2 ) /* (H17) gmii1_crs.spi1_d0 */
    0x110 ( PIN_INPUT | MUX_MODE2 ) /* (J15) gmii1_rxer.spi1_d1 */
    0x19c ( PIN_INPUT | MUX_MODE3 ) /* (C12) mcasp0_ahclkr.spi1_cs0 */
    >;
    };
    we probed in H16 of processor.
    3. The issue might be in improper DTS file update and/or wrong clock configuration.

    &spi1 {
    #address-cells = <1>;
    #size-cells = <0>;

    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&spi1_pins>;

    max14830: max14830@1 {
    compatible = "maxim,max14830";
    spi-max-frequency = <26000000>;
    reg = <0>;
    clocks = <&clk24m0>;
    clock-names = "osc";
    clk24m0: clk24m0 {
    compatible = "fixed-clock";
    #clock-cells = <0>;
    clock-frequency = <24000000>;
    clock-accuracy = <100>;
    };
    };
    };

    Thanks for the Support and waiting to resolve the Issue with your support.

    Regards,

    Avinash N 

  • Avinash Neethi1 said:

    1. Please provide the full boot log, not just part of it. You can put the log in txt file and attach it here in the forum.

    (Please visit the site to view this file)

    Regarding DMA warning messages, I have already explained in my previous post.

    Regarding "max310x spi1.0: MAX14830 ID 0x00 does not match" message, this is error message and should be fixed. As this error message comes from within Maxim Dallas MAX14830 driver, I would suggest you to check with maxim support team, they might be able to help you more regarding this error message.

    What I can tell is that issue might be in SPI communication between AM335x McSPI module and MAX14830 chip. I would suggest you to probe with oscilloscope AM335x McSPI pins and check if you have the expected signals there.

    Also I see you are using Ubuntu Linux distribution. Note that this forum support only Arago Linux distribution that comes with AM335x TI PSDK (link below). If you can switch to TI PSDK, we can be in better help.

    Avinash Neethi1 said:
    0x108 ( PIN_INPUT | MUX_MODE2 ) /* (H16) gmii1_col.spi1_sclk */

    Avinash Neethi1 said:
    we probed in H16 of processor.

    Do you have clock output signal on that pin?

    Avinash Neethi1 said:
    max14830: max14830@1 {
    compatible = "maxim,max14830";
    spi-max-frequency = <26000000>;
    reg = <0>;
    clocks = <&clk24m0>;
    clock-names = "osc";
    clk24m0: clk24m0 {
    compatible = "fixed-clock";
    #clock-cells = <0>;
    clock-frequency = <24000000>;
    clock-accuracy = <100>;
    };
    };

    From what I understand, you are supplying 24MHz fixed clock to MAX14830 chip, and this 24MHz clock is not generated from AM335x H16 pin. Note that AM335x McSPI kernel driver support only master mode, and you should provide the clock through the H16 pin.

    Regards,
    Pavel

  • Hi Pavel,

    We Have made the Changes,

    PIN-MUX:

    ---------------------------

    spi2_pins: myspi2_pins_default {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x908, PIN_OUTPUT_PULLUP | MUX_MODE2 ) /* (H16) gmii1_col.spi1_sclk */
    AM33XX_IOPAD(0x90c, PIN_OUTPUT_PULLUP | MUX_MODE2 ) /* (H17) gmii1_crs.spi1_d0 */
    AM33XX_IOPAD(0x910, PIN_INPUT_PULLUP | MUX_MODE2 ) /* (J15) gmii1_rxer.spi1_d1 */
    AM33XX_IOPAD(0x944, PIN_OUTPUT_PULLUP | MUX_MODE2 ) /* (H18) rmii1_refclk.spi1_cs0 */
    AM33XX_IOPAD(0x964, PIN_OUTPUT_PULLUP | MUX_MODE2 ) /* (C18) eCAP0_in_PWM0_out.spi1_cs1*/
    >;
    };

    DTS:

    ----------------------------------------------

    spi_uart_clk: spi_uart_clk {
    #clock-cells = <0>;
    compatible = "fixed-factor-clock";
    clocks = <&dpll_per_m2_div4_ck>;
    clock-mult = <10>;
    clock-div = <48>;
    };

    &spi1 {

    #address-cells = <1>;
    #size-cells = <0>;

    U4: max14830@0 {
    compatible = "maxim,max14830";
    reg = <0>;
    spi-max-frequency = <26000000>;
    clocks = <&spi_uart_clk>;
    clock-names = "osc";
    interrupt-parent = <&gpio3>;
    interrupts = <21 0x2>;
    gpio-controller;
    #gpio-cells = <2>;
    };

    U5: max14830@1 {
    compatible = "maxim,max14830";
    reg = <0>;
    spi-max-frequency = <26000000>;
    clocks = <&spi_uart_clk>;
    clock-names = "osc";
    interrupt-parent = <&gpio3>;
    interrupts = <21 0x2>;
    gpio-controller;
    #gpio-cells = <2>;
    };

    };

    ERROR ON LINUX BOOTING:

    --------------------------------------------------------------

    max310x spi1.0: not using DMA for McSPI (-19)
    max310x spi1.0: MAX14830 ID 0x00 does not match

    max310x spi1.1: not using DMA for McSPI (-19)
    max310x spi1.1: MAX14830 ID 0x00 does not match

    The clock Pin is High. Still the we cant able to access the MAX14830 IC

    Waiting for the Response. We are Hold the Production due to this issue.

    Regards,

    Avinash N

  • Avinash,

    Avinash Neethi1 said:
    spi2_pins: myspi2_pins_default {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x908, PIN_OUTPUT_PULLUP | MUX_MODE2 ) /* (H16) gmii1_col.spi1_sclk */
    AM33XX_IOPAD(0x90c, PIN_OUTPUT_PULLUP | MUX_MODE2 ) /* (H17) gmii1_crs.spi1_d0 */
    AM33XX_IOPAD(0x910, PIN_INPUT_PULLUP | MUX_MODE2 ) /* (J15) gmii1_rxer.spi1_d1 */
    AM33XX_IOPAD(0x944, PIN_OUTPUT_PULLUP | MUX_MODE2 ) /* (H18) rmii1_refclk.spi1_cs0 */
    AM33XX_IOPAD(0x964, PIN_OUTPUT_PULLUP | MUX_MODE2 ) /* (C18) eCAP0_in_PWM0_out.spi1_cs1*/
    >;
    };

    AM335x device has SPI0/0x48030000 and SPI1/0x481A0000. There is no SPI2 module. You can give proper name to "spi2_pins: myspi2_pins_default". Replace SPI2 with SPI1.

    Avinash Neethi1 said:
    spi_uart_clk: spi_uart_clk {
    #clock-cells = <0>;
    compatible = "fixed-factor-clock";
    clocks = <&dpll_per_m2_div4_ck>;
    clock-mult = <10>;
    clock-div = <48>;
    };

     

    Avinash Neethi1 said:
    U4: max14830@0 {
    compatible = "maxim,max14830";
    reg = <0>;
    spi-max-frequency = <26000000>;
    clocks = <&spi_uart_clk>;

    spi1_sclk clock (pin H16) and spi_uart_clk clock are different clock signals. From which AM335x device pin (if any) you supply that clock to MAX14830 chip?

    Avinash Neethi1 said:

    max310x spi1.0: not using DMA for McSPI (-19)
    max310x spi1.0: MAX14830 ID 0x00 does not match

    max310x spi1.1: not using DMA for McSPI (-19)
    max310x spi1.1: MAX14830 ID 0x00 does not match

    I already provided answers regarding these warning/error messages.

    Avinash Neethi1 said:
    The clock Pin is High. Still the we cant able to access the MAX14830 IC

    Do you mean pin H16 spi1_sclk? Note that this is clock pin, and should not be high all the time. This clock signal should toggle (low to high to low) in pre-defined frequency. See AM335x datasheet, section 7.12.1.2 McSPI—Master Mode

    Regards,
    Pavel

  • Hi Pavel,

    1. AM335x device has SPI0/0x48030000 and SPI1/0x481A0000. There is no SPI2 module. You can give proper name to "spi2_pins: myspi2_pins_default". Replace SPI2 with SPI1.

    I have made the changes in Pin Mux as you mentioned. 

    2. spi1_sclk clock (pin H16) and spi_uart_clk clock are different clock signals. From which AM335x device pin (if any) you supply that clock to MAX14830 chip?

    We have just named it as spi_uart_clk . By using the dpll_per_m2_div4_ck we have written a clock routine to generate clock to MAX14830. 

    3. Do you mean pin H16 spi1_sclk? Note that this is clock pin, and should not be high all the time. This clock signal should toggle (low to high to low) in pre-defined frequency.

    During the Power on condition the CLK signal is Low When Linux Booting It is High and after some tine it is getting low.

    Question:

    AM3352 Is the SPI Master, Can you provide some sample code to generate clock to MAX14830 IC.

    Regards,

    Avinash N

  • Avinash Neethi1 said:

    2. spi1_sclk clock (pin H16) and spi_uart_clk clock are different clock signals. From which AM335x device pin (if any) you supply that clock to MAX14830 chip?

    We have just named it as spi_uart_clk . By using the dpll_per_m2_div4_ck we have written a clock routine to generate clock to MAX14830. 

    It is still not clear to me. MAX14830 chip needs two clock signals, SCLK and XIN. You are using pin H16 spi1_sclk to supply SCLK. What about XIN, do you use spi_uart_clk? Please provide more details on that point.

    Avinash Neethi1 said:

    3. Do you mean pin H16 spi1_sclk? Note that this is clock pin, and should not be high all the time. This clock signal should toggle (low to high to low) in pre-defined frequency.

    During the Power on condition the CLK signal is Low When Linux Booting It is High and after some tine it is getting low.

    This does not look correct. spi1_sclk signal should toggle in 100KHz frequency minimum (standard mode).

    Avinash Neethi1 said:

    uestion:

    AM3352 Is the SPI Master, Can you provide some sample code to generate clock to MAX14830 IC.

    Refer to the below wiki:

    http://processors.wiki.ti.com/index.php/Linux_Core_SPI_User's_Guide#Linux_Userspace_Interface

    Regards,
    Pavel

  • Hi Pavel,

    1.It is still not clear to me. MAX14830 chip needs two clock signals, SCLK and XIN. You are using pin H16 spi1_sclk to supply SCLK. What about XIN, do you use spi_uart_clk? Please provide more details on that point.

    For XIN we have provided an 3.686 MHz external crystal oscillator .

    2. This does not look correct. spi1_sclk signal should toggle in 100KHz frequency minimum

    During power on condition the spi1_sclk is low and after some time it is changed to High. Still there is no clock generated.

    Question:

    1. linux,spidev is used as compatablie in DTS then in dev the node is created. But i am using maxim,max14830, There is no node created in dev. 

    2. I cant able to view the File attached for my reference

    What can be the issue?

    Regards,

    Avinash N

  • Avinash,

    Avinash Neethi1 said:
    For XIN we have provided an 3.686 MHz external crystal oscillator .

    I think this clock should be described in max14830 dts node:

    linux-4.9.59/Documentation/devicetree/bindings/serial/maxim,max310x.txt

    max14830: max14830@0 {
            compatible = "maxim,max14830";
            reg = <0>;
            clocks = <&clk20m>;
            clock-names = "osc";

    - clocks: phandle to the IC source clock.
    - clock-names: Should be "xtal" if clock is an external crystal or "osc" if an external clock source is used.

    You can double check this with MAX14830 support team.

     

    Avinash Neethi1 said:
    During power on condition the spi1_sclk is low and after some time it is changed to High. Still there is no clock generated.

    From what I understand you are using AM335x McSPI module in master transmit mode, is that correct? The first signal you should see is CS transition from high to low. Do you see it?

    Avinash Neethi1 said:

    Question:

    1. linux,spidev is used as compatablie in DTS then in dev the node is created. But i am using maxim,max14830, There is no node created in dev. 

    2. I cant able to view the File attached for my reference

    What can be the issue?


    I would suggest you to enable debug/warning messages in McSPI and MAX14830 linux kernel drivers and make sure everything runs fine, for example the probe functions are successful. Once this is fixed, you can proceed with user space test programs.

    Regards,
    Pavel