SOLVED-ish - getting i2c_1 working

Discussion in 'Kernels' started by peter247, May 8, 2014.

  1. TomFreudenberg

    TomFreudenberg Member

    Joined:
    May 12, 2014
    Messages:
    59
    Likes Received:
    2
    Re: getting i2c_1 working

    J21 PIN 9/10 - SCL1/SDA1 - SAM3X only => Wire1.begin()

    J5 PIN 1/2 - SCL/SDA - SAM3X => Wire.begin(); ####### iMX6 - I2C1 => smbus(0) !!!! ONLY WHEN ENABLED IN KERNEL

    HDMI CN8 - KEY_COL3/ROW3 - I2C2 SCL/SDA - iMX6 ONLY => smbus(1)

    CN13 PIN 12/19 - CN11 PIN 11/15 - I2C3 SCL/SDA - iMX6 ONLY => smbus(2)

    ----

    So there are 4 times I2C bus on UDOO

    1 only for SAM

    1 shared between SAM and iMX6 (if enabled in kernel)

    2 only for iMX6, a.) HDMI, b.) Extensions and CAM
     
  2. larryhartman50

    larryhartman50 New Member

    Joined:
    Jun 6, 2014
    Messages:
    6
    Likes Received:
    0
    Re: getting i2c_1 working

    I did some extensive testing for i2c on a dual this week.

    At present I am unconcerned with the LVDS and HDMI i2c ports.

    My goal is to use i2c on the J5 pins 1/2 (labled 20/21 on the board) with the imx6 processor. Preferrably python with smbus but would be happy to see it work on C++.

    I followed the steps in the manual to remark the relevant GPIO pins and recompile the kernel. I also downloaded i2c-tools. To date I have not been able to see any activity in this configuration. This was done using Linaro Beta.

    I could not get Arduino to compile on Linaro Beta nor could I get the mini usb CN6 serial port to accept incoming Arduino programming. At this point I wiped the SD card clean and installed Debian Wheezy HFP. The Arduino HFP compiles on Debian Wheezy but still flashes some errors. Simple test code to Serial executes properly.

    Next I programmed the SAM3 via Arduino to look for activity on the SCL/SDA ports. I do not see any activity on this port with the Wire1 commands.

    Lastly I programmed the SAM3 via Arduino to look for activity on the J5 pins 1/2 ports. I can send and receive i2c data with the Wire commands.

    So basically what I have is activity on the targeted pins but processed via SAM3 rather than desired imx6.

    My next step is to recompile the kernel on Debian Wheezy to disable the GPIOs on JP5 pins 1/2.

    Curious has anyone determined if these issues exist on Android variant?
     
  3. peter247

    peter247 New Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    Re: getting i2c_1 working

    My support ticket is now a month ago without reply, on getting i2c working on the imx6 side.

    I`ve tried that :-

    As a phrase goes , tried that , gone that , all I got was a kernel panic and I non booting system !!!!!

    For the last bit I`ve been using the LVDS socket method which I know is temporary , but does work quite well.

    If you do get it to compile and get i2c working , can you post your kernel / modules ?

    The sam side works ( wire and wire1 ), but is missing parts of the library ,eg the ack don`t work.
     
  4. larryhartman50

    larryhartman50 New Member

    Joined:
    Jun 6, 2014
    Messages:
    6
    Likes Received:
    0
    Re: getting i2c_1 working

    My Debian Wheezy compile worked ok but no joy on i2c via imx6. However I did get i2c working on J5 pins 20/21 on SAM3 using Arduino Wire library. Interestingly I still cannot get the SAM3 J21 SDA/SCL pins to talk on i2c via the Arduino Wire library. The Arduino package that I used was Hard Floating Point.

    I did some digging in the kernel source code and wish to call attention to a few lines. Please note the lines that are labeled as "not set." These have my attention for the moment as potential sources of the problem.

    <kernel>/arch/arm/configs/UDOO_defconfig

    Line 0277: CONFIG_IMX_HAVE_PLATFORM_IMX_I2C=y
    Line 1462: CONFIG_I2C=y
    Line 1463: CONFIG_I2C_BOARDINFO=y
    Line 1464: CONFIG_I2C_COMPAT=y
    Line 1465: CONFIG_I2C_CHARDEV=y
    Line 1466: # CONFIG_I2C_MUX is not set
    Line 1467: CONFIG_I2C_HELPER_AUTO=y
    Line 1468: CONFIG_I2C_ALGOBIT=m
    Line 1496: # CONFIG_I2C_GPIO is not set
    Line 1497: CONFIG_I2C_IMX=y
    Line 1519: # CONFIG_I2C_DEBUG_ALGO is not set
     
  5. larryhartman50

    larryhartman50 New Member

    Joined:
    Jun 6, 2014
    Messages:
    6
    Likes Received:
    0
    Re: getting i2c_1 working

    Before going down into the kernel, I waded back through the files mentioned in the user's guide and searched for "i2c" related lines. I missed something, reread the manual, and gained some understanding. It seems the folks who posted the first two posts may have missed what I missed. I am going to change some lines (specified below) and recompile the kernel. May take a day or so before I know for sure the results.

    The manual portion I am referring to is Chapter 6 i.mx6 Pin Muxing. The coding example provided (for changing UART pins) with a left pane and right pane is not easy to read due to tab spacing and formatting. The left pane is the the "before" changes are made and the right pane is the "after" changes are made.

    The line numbers below refer to the dual file. They will be a bit different in the quad version.

    <kernel>/arch/arm/mach-mx6/board-mx6sdl_seco_UDOO.h

    Line 0127: static iomux_v3_cfg_t mx6sdl_seco_UDOO_pads[] = {

    Line 0345: MX6DL_PAD_EIM_D28__GPIO_3_28
    Line 0346: // MX6DL_PAD_EIM_D28__GPIO_I2C1_SCL
    Line 0347: MX6DL_PAD_EIM_D21__GPIO_3_21
    Line 0348: // MX6DL_PAD_EIM_D21__GPIO_I2C1_SDA

    Line 0443: static unsigned int mx6dl_set_in_inputmode[] = {

    Line 0480: MX6DL_PAD_EIM_D21__GPIO_MODE
    Line 0481: MX6DL_PAD_EIM_D28__GPIO_MODE

    According to the instructions what needs to be done in the array mx6sdl_seco_UDOO_pads[] is that the GPIOs are disabled by commenting out the GPIO lines (0345 and 0347) and I2C1 enabled by uncommenting out those lines (0346 and 0348). Additionally the input mode of the original GPIOs must be disabled in the array mx6dl_set_in_inputmode[] by commenting out those lines (0480 and 0481).

    In my original recompile all I did was comment out lines 0480 and 0481. I will redo this the correct way and report back the outcome.
     
  6. peter247

    peter247 New Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    Re: getting i2c_1 working

    I think there is a fault somewhere in the kernel than if you try making it a i2c pin it really mixes up the compile.
    I understand what I should be gone from the manual , but there is something clearly wrong when you try it.

    I can only wonder if the udoo team have every tried to see if it does really work ? and not just a copy of the chip manufactures work without any understanding.
     
  7. larryhartman50

    larryhartman50 New Member

    Joined:
    Jun 6, 2014
    Messages:
    6
    Likes Received:
    0
    Re: getting i2c_1 working

    Peter,

    I am happy to report success on Linaro Beta by following the steps in the manual to change the lines of code and recompile. I conducted a successful test on i2c0 with i2cdetect and was able to access the port write data to it and read it back using python smbus(0). A lot of wrangling to get it to work--about 50 hours over the past week.

    I will check back here every couple of days to lend assistance where I can.

    Larry
     
  8. fetcher

    fetcher Member

    Joined:
    Mar 9, 2014
    Messages:
    166
    Likes Received:
    20
    Re: getting i2c_1 working

    I have the i.MX6's I2C1 (/dev/i2c-0, header pins 20-21) working under Debian Wheezy, and don't remember it giving me any trouble. I think I only had to change these pin mappings, around line 304-308 of "board-mx6qd_seco_UDOO.h":

    Code:
    //      MX6Q_PAD_EIM_D28__GPIO_3_28,                                                    // pin 20
                    MX6Q_PAD_EIM_D28__I2C1_SDA,  // enabled, disabled GPIO
    //      MX6Q_PAD_EIM_D21__GPIO_3_21,                                                    // pin 21
                    MX6Q_PAD_EIM_D21__I2C1_SCL,  // enabled, disabled GPIO
                    // MX6Q_PAD_EIM_D21__SPDIF_IN1,
    
    Unlike with UARTs, or the SD1 controller, all three I2C buses are already enabled at the driver level, so unless I'm forgetting a step (it's been a couple of months) it shouldn't be necessary to edit the "board-mx6_seco_UDOO.c" file just for I2C. There's also no need to mess with the MX6{Q,DL}_PAD_EIM_D2*__GPIO_MODE lines in the *UDOO.h file-- those are still set at their defaults on my board, and aren't interfering with I2C function. Maybe I should take them out to remove the unusable /sys/class/gpio/gpio85 and gpio92 ('unexporting' those from userland would work too), but those aren't interfering, especially being set as inputs (and the mux change should have them disconnected from any actual pins anyway).
     
  9. peter247

    peter247 New Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    Re: getting i2c_1 working

    I will have to try and compile the kernel again , but I`ve tried 3 or 4 times before without any luck.
    when I did a dry run kernel without any changes I didn`t had any problem , but after changing the pads , no boot kernel panic ...

    Code:
    	MX6Q_PAD_CSI0_DAT13__GPIO_5_31,							// pin 19
    		// MX6Q_PAD_CSI0_DAT13__UART4_RXD,
    		// MX6Q_PAD_EIM_D28__GPIO_3_28,							// pin 20
    	MX6Q_PAD_EIM_D28__I2C1_SDA,
    		// MX6Q_PAD_EIM_D21__GPIO_3_21,							// pin 21
    	MX6Q_PAD_EIM_D21__I2C1_SCL,
    		// MX6Q_PAD_EIM_D21__SPDIF_IN1,
    	MX6Q_PAD_DISP0_DAT6__GPIO_4_27,							// pin 22
    	MX6Q_PAD_DISP0_DAT7__GPIO_4_28,							// pin 23
    
    I guess it wasn`t my week !!!!!

    What kernel are you using ?
     
  10. fetcher

    fetcher Member

    Joined:
    Mar 9, 2014
    Messages:
    166
    Likes Received:
    20
    Re: getting i2c_1 working

    I'm still running 3.0.35, checked out from the git repository back in March or so... hope to try 3.10.17 soon (especially if there are improvements in the audio drivers), but haven't yet.

    Could you catch any specifics from the kernel panic, maybe by logging serial console output? The lines you pasted above look good, but I wonder if another part of your board-mx6qd_seco_UDOO.h file, unrelated to i2c or pin muxing was somehow corrupted during editing. Normally something like that would cause errors during the compile attempt, though.

    I'll try to attach my board-mx6qd_seco_UDOO.h and board-mx6_seco_UDOO.c files, in case those are of any help. These contain other changes unrelated to I2C, like enabling all UARTS, SDHC1 (secondary SD card), exporting some GPIOs not brought out to pin headers, and reducing reserved GPU memory to 16MB to free up more system RAM-- best to skip that last one unless you want to set matching uBoot kernel parameters also (I use fbmem=6M gpu_reserved=8M). All edits should be marked with a "// jnh" comment.

    Edit: the goofy board software here doesn't allow upload of files with a *.h or *.c extension! Nor .txt, on renaming them to that... those text files are apparently too dangerous! I'll try putting them in a ZIP ... maybe that will pacify the silly thing.
     

    Attached Files:

  11. peter247

    peter247 New Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    Re: getting i2c_1 working

    Thanks for the files , I found about the not been able to attach c and h and txt file too.

    From my records this is what I did to compile the kernel just I case I`m using the wrong method.
    I think I may have missing some obvious steps like cd - ing into the directory .


    apt-get install build-essential libncurses5-dev
    apt-get install git
    apt-get install uboot-mkimage

    git clone https://github.com/UDOOboard/Kernel_Unico kernel
    make ARCH=arm UDOO_defconfig
    make menuconfig
    make -j4 ARCH=arm uImage modules
    make -j4 ARCH=arm INSTALL_MOD_PATH=.. modules_install

    I compiled the kernel native , did you do it cross platform ?
     
  12. fetcher

    fetcher Member

    Joined:
    Mar 9, 2014
    Messages:
    166
    Likes Received:
    20
    Re: getting i2c_1 working

    I built my kernel directly on the Udoo also. After working with some smaller ARM boards, it feels kind of luxurious to have one that can host its own development toolchain.

    Looking at your command sequence, I did nearly the same thing except for copying the default config manually (cp arch/arm/configs/UDOO_defconfig .config from kernel-tree root), and I didn't specify ARCH=arm to any of the make commands, since I wasn't cross-compiling. I think I just did 'make -j4 uImage && make -j4 modules && make modules_install'. If you were in the wrong directory to start, the make should have immediately failed.
     
  13. peter247

    peter247 New Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    Re: getting i2c_1 working

    I think my udoo hates me.

    I`ve tried again still kernel panic with your files ... ,
    I added the arch = arm after it didn`t boot , So that was a try it and see .


    Code:
    Starting kernel ...
    
    [    0.000000] Initializing cgroup subsys cpu
    [    0.000000] Linux version 3.0.35-g6559a52-dirty (root@Udoo) (gcc version 4.8.2 (Debian 4.8.2-16) ) #1 SMP PREEM                           PT Tue Jun 10 12:20:04 BST 2014
    [    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
    [    0.000000] CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] Machine: SECO i.Mx6 UDOO Board
    [    0.000000] Kernel ver:
    [    0.000000] Memory policy: ECC disabled, Data cache writealloc
    [    0.000000] CPU identified as i.MX6Q, silicon rev 1.2
    [    0.000000] PERCPU: Embedded 7 pages/cpu @8c008000 s5504 r8192 d14976 u32768
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 256000
    [    0.000000] Kernel command line: console=ttymxc1,115200 root=/dev/sda1 fbmem=24M video=mxcfb0:dev=hdmi,1920x1080M@60,b                           pp=32
    [    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: 752MB 256MB = 1008MB total
    [    0.000000] Memory: 1010600k/1010600k available, 37976k reserved, 0K highmem
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    [    0.000000]     DMA     : 0xf4600000 - 0xffe00000   ( 184 MB)
    [    0.000000]     vmalloc : 0xc0800000 - 0xf2000000   ( 792 MB)
    [    0.000000]     lowmem  : 0x80000000 - 0xc0000000   (1024 MB)
    [    0.000000]     pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)
    [    0.000000]     modules : 0x7f000000 - 0x7fe00000   (  14 MB)
    [    0.000000]       .init : 0x80008000 - 0x8003a000   ( 200 kB)
    [    0.000000]       .text : 0x8003a000 - 0x80b6f0b0   (11477 kB)
    [    0.000000]       .data : 0x80b70000 - 0x80bd71a0   ( 413 kB)
    [    0.000000]        .bss : 0x80bd71c4 - 0x80c28ba0   ( 327 kB)
    [    0.000000] SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
    [    0.000000] Preemptible hierarchical RCU implementation.
    [    0.000000] NR_IRQS:624
    [    0.000000] MXC GPIO hardware
    [    0.000000] sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655ms
    [    0.000000] arm_max_freq=1GHz
    [    0.000000] MXC_Early serial console at MMIO 0x21e8000 (options '115200')
    [    0.000000] bootconsole [ttymxc1] enabled
    [    0.000000] Console: colour dummy device 80x30
    [    0.219083] Calibrating delay loop... 1581.05 BogoMIPS (lpj=7905280)
    [    0.307411] pid_max: default: 32768 minimum: 301
    [    0.312382] Mount-cache hash table entries: 512
    [    0.317801] Initializing cgroup subsys cpuacct
    [    0.322321] Initializing cgroup subsys devices
    [    0.326780] Initializing cgroup subsys freezer
    [    0.331269] Initializing cgroup subsys blkio
    [    0.335604] CPU: Testing write buffer coherency: ok
    [    0.340764] hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
    [    0.441311] CPU1: Booted secondary processor
    [    0.521308] CPU2: Booted secondary processor
    [    0.601330] CPU3: Booted secondary processor
    [    0.640799] Brought up 4 CPUs
    [    0.656627] SMP: Total of 4 processors activated (6324.22 BogoMIPS).
    [    0.663510] devtmpfs: initialized
    [    0.684426] print_constraints: dummy:
    [    0.688407] NET: Registered protocol family 16
    [    0.697249] print_constraints: vddpu: 725 <--> 1300 mV at 1150 mV fast normal
    [    0.704835] print_constraints: vddcore: 725 <--> 1300 mV at 1150 mV fast normal
    [    0.712577] print_constraints: vddsoc: 725 <--> 1300 mV at 1200 mV fast normal
    [    0.720245] print_constraints: vdd2p5: 2000 <--> 2775 mV at 2400 mV fast normal
    [    0.728010] print_constraints: vdd1p1: 800 <--> 1400 mV at 1100 mV fast normal
    [    0.735689] print_constraints: vdd3p0: 2625 <--> 3400 mV at 3000 mV fast normal
    [    0.744796]
    [    0.744802] > UDOO quad
    [    0.748576] > rev C Called set_gpios_direction
    [    0.753253] Test and set gpios directions and values by Gionji feat. Ekirei test
    [    0.777811] failed to get MX6_SECO_UDOO_LVDS_BLT_CTRL: -16
    [    0.783341] failed to get MX6_SECO_UDOO_LVDS_PNL_CTRL: -16
    [    0.794986] Resetting ethernet physical layer.
    [    0.837766] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
    [    0.844601] hw-breakpoint: 1 breakpoint(s) reserved for watchpoint single-step.
    [    0.851959] hw-breakpoint: maximum watchpoint size is 4 bytes.
    [    0.857842] L310 cache controller enabled
    [    0.861882] l2x0: 16 ways, CACHE_ID 0x410000c7, AUX_CTRL 0x02070000, Cache size: 1048576 B
    [    0.899609] bio: create slab <bio-0> at 0
    [    0.907178] mxs-dma mxs-dma-apbh: initialized
    [    0.911906] print_constraints: vmmc: 3300 mV
    [    0.917012] vgaarb: loaded
    [    0.920555] SCSI subsystem initialized
    [    0.925509] usbcore: registered new interface driver usbfs
    [    0.931160] usbcore: registered new interface driver hub
    [    0.936655] usbcore: registered new device driver usb
    [    0.941737] Freescale USB OTG Driver loaded, $Revision: 1.55 $
    [    0.960795] imx-ipuv3 imx-ipuv3.0: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
    [    0.980791] imx-ipuv3 imx-ipuv3.1: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
    [    0.988619] mxc_mipi_csi2 mxc_mipi_csi2: i.MX MIPI CSI2 driver probed
    [    0.995098] mxc_mipi_csi2 mxc_mipi_csi2: i.MX MIPI CSI2 dphy version is 0x3130302a
    [    1.002820] MIPI CSI2 driver module loaded
    [    1.007180] Advanced Linux Sound Architecture Driver Version 1.0.24.
    [    1.014431] Bluetooth: Core ver 2.16
    [    1.018139] NET: Registered protocol family 31
    [    1.022608] Bluetooth: HCI device and connection manager initialized
    [    1.028984] Bluetooth: HCI socket layer initialized
    [    1.033883] Bluetooth: L2CAP socket layer initialized
    [    1.039025] Bluetooth: SCO socket layer initialized
    [    1.044367] cfg80211: Calling CRDA to update world regulatory domain
    [    1.051817] i2c-core: driver [max17135] using legacy suspend method
    [    1.058103] i2c-core: driver [max17135] using legacy resume method
    [    1.064333] Switching to clocksource mxc_timer1
    [    1.083629] Unable to handle kernel paging request at virtual address 22002100
    [    1.090875] pgd = 80004000
    [    1.093591] [22002100] *pgd=00000000
    [    1.097196] Internal error: Oops: 5 [#1] PREEMPT SMP
    [    1.102176] Modules linked in:
    [    1.105257] CPU: 0    Not tainted  (3.0.35-g6559a52-dirty #1)
    [    1.111648] PC is at kmem_cache_alloc+0xa8/0x100
    [    1.116291] LR is at con_insert_unipair+0x74/0x104
    [    1.121099] pc : [<800f4b70>]    lr : [<802c534c>]    psr: 60000093
    [    1.121104] sp : bff8bed8  ip : 8003b5e0  fp : 00000000
    [    1.132621] r10: 00000001  r9 : 80b85cc0  r8 : 000000d0
    [    1.137862] r7 : 0bfd0000  r6 : bff8a000  r5 : bfff9300  r4 : 22002100
    [    1.144408] r3 : 80b85cc0  r2 : 802c534c  r1 : 00002d90  r0 : 20000013
    [    1.150957] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
    [    1.158375] Control: 10c53c7d  Table: 1000404a  DAC: 00000015
    [    1.164138] Process swapper (pid: 1, stack limit = 0xbff8a2f0)
    [    1.169989] Stack: (0xbff8bed8 to 0xbff8c000)
    [    1.174361] bec0:                                                       80be62e8 0000f804
    [    1.182566] bee0: bfe3ba80 0000005f 0000001f 80ba9ef6 80ba9ef0 0000005f 00000003 802c534c
    [    1.190770] bf00: 80baa054 00000000 00000001 bfe3ba80 0000005f 802c5fc0 80bf415c 80baa054
    [    1.198973] bf20: 80bf433c bfff0000 00000000 00000001 00000014 80bf4560 00000002 00000004
    [    1.207176] bf40: 00000000 80020f84 00000000 800204a0 00000000 80bf443c 00000001 80020998
    [    1.215380] bf60: 80acb9cc 801484d0 80bf3f38 00000000 80040a7c 00000013 80bd71e0 8001fde4
    [    1.223584] bf80: 80a977f0 00000013 8002dc84 8002dc84 8002e17c 8003a5c0 800b4814 80be0d74
    [    1.231787] bfa0: 80b81080 bff8a018 000001df 00000013 00000000 37340f80 00000039 00000000
    [    1.239990] bfc0: 00000270 8002dc84 8002e17c 80040a7c 00000013 00000000 00000000 00000000
    [    1.248193] bfe0: 00000000 80008930 00000000 00000000 80008870 80040a7c 0a00000f e5923000
    [    1.256410] [<800f4b70>] (kmem_cache_alloc+0xa8/0x100) from [<802c534c>] (con_insert_unipair+0x74/0x104)
    [    1.265929] [<802c534c>] (con_insert_unipair+0x74/0x104) from [<802c5fc0>] (con_set_default_unimap+0xe4/0x16c)
    [    1.275973] [<802c5fc0>] (con_set_default_unimap+0xe4/0x16c) from [<800204a0>] (console_map_init+0x44/0x50)
    [    1.285750] [<800204a0>] (console_map_init+0x44/0x50) from [<80020998>] (vty_init+0x18c/0x19c)
    [    1.294393] [<80020998>] (vty_init+0x18c/0x19c) from [<8001fde4>] (tty_init+0x12c/0x144)
    [    1.302526] [<8001fde4>] (tty_init+0x12c/0x144) from [<8003a5c0>] (do_one_initcall+0x11c/0x174)
    [    1.311260] [<8003a5c0>] (do_one_initcall+0x11c/0x174) from [<80008930>] (kernel_init+0xc0/0x144)
    [    1.320171] [<80008930>] (kernel_init+0xc0/0x144) from [<80040a7c>] (kernel_thread_exit+0x0/0x8)
    [    1.328987] Code: 1afffff3 e595b014 e2811004 e3a0a001 (e794b00b)
    [    1.335150] ---[ end trace 60f60b23e6fa95d6 ]---
    [    1.339815] Kernel panic - not syncing: Attempted to kill init!
    [    1.345776] [<80046bc8>] (unwind_backtrace+0x0/0xf4) from [<805b3c44>] (panic+0x84/0x198)
    [    1.354012] [<805b3c44>] (panic+0x84/0x198) from [<80078480>] (complete_and_exit+0x0/0x1c)
    [    1.362333] [<80078480>] (complete_and_exit+0x0/0x1c) from [<bff8bcb8>] (0xbff8bcb8)
    [    1.370116] CPU2: stopping
    [    1.372854] [<80046bc8>] (unwind_backtrace+0x0/0xf4) from [<8003a338>] (do_IPI+0x144/0x154)
    [    1.381240] [<8003a338>] (do_IPI+0x144/0x154) from [<8003f9cc>] (__irq_svc+0x4c/0xe8)
    [    1.389093] Exception stack(0xbffb5ed8 to 0xbffb5f20)
    [    1.394161] 5ec0:                                                       80bdce00 0000000a
    [    1.402364] 5ee0: 00000000 80bdce40 00000202 00000002 80038c00 bffb4000 80b72040 bffb4000
    [    1.410568] 5f00: 800381c8 00000000 0000001f bffb5f20 8007a768 8007a150 20000113 ffffffff
    [    1.418776] [<8003f9cc>] (__irq_svc+0x4c/0xe8) from [<8007a150>] (__do_softirq+0x98/0x188)
    [    1.427070] [<8007a150>] (__do_softirq+0x98/0x188) from [<8007a768>] (irq_exit+0xa4/0xa8)
    [    1.435276] [<8007a768>] (irq_exit+0xa4/0xa8) from [<8003a304>] (do_IPI+0x110/0x154)
    [    1.443047] [<8003a304>] (do_IPI+0x110/0x154) from [<8003f9cc>] (__irq_svc+0x4c/0xe8)
    [    1.450898] Exception stack(0xbffb5f90 to 0xbffb5fd8)
    [    1.455967] 5f80:                                     80bde780 80000093 bffb5fc0 00000000
    [    1.464170] 5fa0: bffb4000 80b88ed4 80bd7284 805bd3e0 1000406a 412fc09a 00000000 00000000
    [    1.472372] 5fc0: 00000000 bffb5fd8 8004ea98 80040b5c 40000013 ffffffff
    [    1.479013] [<8003f9cc>] (__irq_svc+0x4c/0xe8) from [<80040b5c>] (default_idle+0x24/0x28)
    [    1.487219] [<80040b5c>] (default_idle+0x24/0x28) from [<80040cb8>] (cpu_idle+0xa0/0x104)
    [    1.495425] [<80040cb8>] (cpu_idle+0xa0/0x104) from [<105b05d4>] (0x105b05d4)
    [    1.502581] CPU3: stopping
    [    1.505314] [<80046bc8>] (unwind_backtrace+0x0/0xf4) from [<8003a338>] (do_IPI+0x144/0x154)
    [    1.513698] [<8003a338>] (do_IPI+0x144/0x154) from [<8003f9cc>] (__irq_svc+0x4c/0xe8)
    [    1.521550] Exception stack(0xbff01f90 to 0xbff01fd8)
    [    1.526619] 1f80:                                     80bde780 80000093 bff01fc0 00000000
    [    1.534823] 1fa0: bff00000 80b88ed4 80bd7284 805bd3e0 1000406a 412fc09a 00000000 00000000
    [    1.543025] 1fc0: 00000000 bff01fd8 8004ea98 80040b5c 40000013 ffffffff
    [    1.549666] [<8003f9cc>] (__irq_svc+0x4c/0xe8) from [<80040b5c>] (default_idle+0x24/0x28)
    [    1.557872] [<80040b5c>] (default_idle+0x24/0x28) from [<80040cb8>] (cpu_idle+0xa0/0x104)
    [    1.566077] [<80040cb8>] (cpu_idle+0xa0/0x104) from [<105b05d4>] (0x105b05d4)
    [    1.573234] CPU1: stopping
    [    1.575971] [<80046bc8>] (unwind_backtrace+0x0/0xf4) from [<8003a338>] (do_IPI+0x144/0x154)
    [    1.584355] [<8003a338>] (do_IPI+0x144/0x154) from [<8003f9cc>] (__irq_svc+0x4c/0xe8)
    [    1.592206] Exception stack(0xbffaded8 to 0xbffadf20)
    [    1.597273] dec0:                                                       80bdce00 0000000a
    [    1.605476] dee0: 00000000 80bdce20 00000202 00000001 80038c00 bffac000 80b72040 bffac000
    [    1.613680] df00: 800381c8 00000000 0000001f bffadf20 8007a768 8007a150 20000113 ffffffff
    [    1.621886] [<8003f9cc>] (__irq_svc+0x4c/0xe8) from [<8007a150>] (__do_softirq+0x98/0x188)
    [    1.630178] [<8007a150>] (__do_softirq+0x98/0x188) from [<8007a768>] (irq_exit+0xa4/0xa8)
    [    1.638384] [<8007a768>] (irq_exit+0xa4/0xa8) from [<8003a304>] (do_IPI+0x110/0x154)
    [    1.646155] [<8003a304>] (do_IPI+0x110/0x154) from [<8003f9cc>] (__irq_svc+0x4c/0xe8)
    [    1.654006] Exception stack(0xbffadf90 to 0xbffadfd8)
    [    1.659073] df80:                                     80bde780 60000093 bffadfc0 00000000
    [    1.667276] dfa0: bffac000 80b88ed4 80bd7284 805bd3e0 1000406a 412fc09a 00000000 00000000
    [    1.675478] dfc0: 00000000 bffadfd8 8004ea98 80040b5c 40000013 ffffffff
    [    1.682118] [<8003f9cc>] (__irq_svc+0x4c/0xe8) from [<80040b5c>] (default_idle+0x24/0x28)
    [    1.690324] [<80040b5c>] (default_idle+0x24/0x28) from [<80040cb8>] (cpu_idle+0xa0/0x104)
    [    1.698529] [<80040cb8>] (cpu_idle+0xa0/0x104) from [<105b05d4>] (0x105b05d4)

    I will have to try step by step more logically until I find what giving me a kernel panic, I`ve made enough kernels in my time and this is the first one which has given this sort of problems.
     
  14. TomFreudenberg

    TomFreudenberg Member

    Joined:
    May 12, 2014
    Messages:
    59
    Likes Received:
    2
    Re: getting i2c_1 working

    Hi Peter,

    maybe you should completly drop the src files and start with fresh load from GitHub.
    Also, if possible, create a second and very simple (minimized) installation SD-Card based on debian or ubuntu-core and try again.

    Good luck
    Tom
     
  15. fetcher

    fetcher Member

    Joined:
    Mar 9, 2014
    Messages:
    166
    Likes Received:
    20
    Re: getting i2c_1 working

    I'd go with Tom's suggestion also. It does seem like something might have become corrupted in your kernel source tree.
     
  16. peter247

    peter247 New Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    Re: getting i2c_1 working

    I keep downloading a new copy of the kernel source tree.

    I know it works if I don`t make any changes to the board-mx6qd_seco_UDOO.h file , so what I`m trying now so edit the board-mx6qd_seco_UDOO.h file without making any real changes , just adding a couple extra stars to the comments
     
  17. fetcher

    fetcher Member

    Joined:
    Mar 9, 2014
    Messages:
    166
    Likes Received:
    20
    Re: getting i2c_1 working

    Are you running Debian Wheezy? What output does 'gcc -v' give? Mine is

    $ gcc -v
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper
    Target: arm-linux-gnueabihf
    Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-14' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
    Thread model: posix
    gcc version 4.6.3 (Debian 4.6.3-14)
     
  18. peter247

    peter247 New Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    Re: getting i2c_1 working

    Yes I`m on the "udoo_quad_debian_wheezy_armhf_v1.1.zip" image.

    root@Udoo:/mnt/kernel# gcc -v
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.8/lto-wrapper
    Target: arm-linux-gnueabihf
    Configured with: ../src/configure -v --with-pkgversion='Debian 4.8.2-16' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
    Thread model: posix
    gcc version 4.8.2 (Debian 4.8.2-16)
    root@Udoo:/mnt/kernel#

    It looks like I`m on a later version of the gcc compiler !!!
     
  19. fetcher

    fetcher Member

    Joined:
    Mar 9, 2014
    Messages:
    166
    Likes Received:
    20
    Re: getting i2c_1 working

    Ah, I'm still on the 1.0 release. Wonder if this is significant? I have 1.1 sitting on another SD card, but had postponed upgrading to it since so many customizations need to be moved over.
     
  20. peter247

    peter247 New Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    Re: getting i2c_1 working

    I`m going to start with a fresh sd version of 1.1 and if that don`t work try 1.0.
    another fact which I don`t know if it`s involved is that I`m running headless via ssh and its booting off sata.

    I know it never going to work on my system now.
     

Share This Page