From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dub0-omc3-s27.dub0.hotmail.com (dub0-omc3-s27.dub0.hotmail.com [157.55.2.36]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id D5BCEE003D3 for ; Tue, 13 Aug 2013 11:03:57 -0700 (PDT) Received: from DUB116-W48 ([157.55.2.9]) by dub0-omc3-s27.dub0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 13 Aug 2013 11:03:55 -0700 X-TMN: [dtrm7yyWMfkhzJTeH/IQJccumsGcb2oobDyiRmWPTVI=] X-Originating-Email: [djnass_18@hotmail.com] Message-ID: From: Thanassis Silis To: "meta-freescale@yoctoproject.org" Date: Tue, 13 Aug 2013 18:03:56 +0000 Importance: Normal MIME-Version: 1.0 X-OriginalArrivalTime: 13 Aug 2013 18:03:55.0789 (UTC) FILETIME=[7A0DDBD0:01CE984F] Subject: speed of /dev/i2c-2 in imx6q sabre-lite X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Aug 2013 18:03:59 -0000 Content-Type: multipart/alternative; boundary="_f06b24a4-01e4-4670-a5a4-5f342f97ee5d_" --_f06b24a4-01e4-4670-a5a4-5f342f97ee5d_ Content-Type: text/plain; charset="iso-8859-7" Content-Transfer-Encoding: quoted-printable Hello everyone=2C=20 I am unaware as to who sets clock speed on the i2c bus and specifically on = the /dev/i2c-2 which is exposed on the board so as to drive external equipm= ent. I am looking into the linux-boundary kernel files in yocto (dylan) build di= r=2C but I cannot figure out where that is set. To be honest I don't even know if i'll find that info there=2C but it seems= like the right place to start (after googling about it of course). So who determined the speed (standard mode=2C fast mode=2C etc) for the ext= ernal i2c? if it is a driver =2C which one should I be looking for? The reason is I am trying to drive some TMC222 low-power stepper motor cont= rol ICs=2C but they do not respond. Note I have successfully connected a number of other i2c ICs (among others = the pca9505x). An answer is not necessary. Any pointers as to how to go about it =2C so I = can learn about this is more than welcome. Thank you for your help. = --_f06b24a4-01e4-4670-a5a4-5f342f97ee5d_ Content-Type: text/html; charset="iso-8859-7" Content-Transfer-Encoding: quoted-printable
Hello everyone=2C
I am unawa= re as to who sets clock speed on the i2c bus and specifically on the /dev/i= 2c-2 which is exposed on the board so as to drive external equipment.
I = am looking into the linux-boundary kernel files in yocto (dylan) build dir= =2C but I cannot figure out where that is set.
To be honest I don't even= know if i'll find that info there=2C but it seems like the right place to = start (after googling about it of course).

So who determined the spe= ed (standard mode=2C fast mode=2C etc) for the external i2c? if it is a dri= ver =2C which one should I be looking for?

The reason is I am trying= to drive some TMC222 low-power stepper motor control ICs=2C but they do no= t respond.
Note I have successfully connected a number of other i2c ICs = (among others the pca9505x).

An answer is not necessary. Any pointer= s as to how to go about it =2C so I can learn about this is more than welco= me.
Thank you for your help.
= --_f06b24a4-01e4-4670-a5a4-5f342f97ee5d_-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 2CB2EE003D3 for ; Tue, 13 Aug 2013 11:30:07 -0700 (PDT) Received: by mail-pa0-f54.google.com with SMTP id kx10so3714631pab.13 for ; Tue, 13 Aug 2013 11:30:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=t+DnYyS1SHoXBfZwa76+CDyq5EGJYwjUpcnnsIqrj4M=; b=PEjZ2tfEjA3+GXJFjebYiRjmICXspowE0PjzkPLinKpBClAi/XO/gEd4Vn4gSzAv5y 5mujg6AOwTQss3yypvn1t1XSIm2ugSbvKMsXHzOpcHClGmnpuDqBOlszYWxeomPDAWxc Q+h9377hnpPRoBhGEgFIUI+SoSRY8r667e9MumGG9ICTcqo0BONsSHON8VkBoxufmLdN WTjtwBFAyc4ugmEQJgIz73eWJbvdfIDBM9R5OYVLnv9qKbTq6QWTy7jfyrvltn9gs+g0 bnqPHOLToRaFa6HmGsNrWTzRBmXLVafgqcIrgb8im+d91IIjPo39HlQfBsFnxWgBs2+g UI4g== X-Gm-Message-State: ALoCoQk2gGHat2BeD87v3K0wgwJwqicbwbCJeZo/3lpWK19/AhjrgE5yoB9zleoVP8Wto/nhw/84 X-Received: by 10.66.194.13 with SMTP id hs13mr4273926pac.163.1376418607478; Tue, 13 Aug 2013 11:30:07 -0700 (PDT) Received: from [192.168.0.15] ([70.96.116.236]) by mx.google.com with ESMTPSA id vz4sm11774626pab.11.2013.08.13.11.30.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 Aug 2013 11:30:06 -0700 (PDT) Message-ID: <520A7B28.3000604@boundarydevices.com> Date: Tue, 13 Aug 2013 11:30:00 -0700 From: Eric Nelson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 MIME-Version: 1.0 To: Thanassis Silis References: In-Reply-To: Cc: "meta-freescale@yoctoproject.org" Subject: Re: speed of /dev/i2c-2 in imx6q sabre-lite X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Aug 2013 18:30:12 -0000 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Thanassis, On 08/13/2013 11:03 AM, Thanassis Silis wrote: > Hello everyone, > I am unaware as to who sets clock speed on the i2c bus and specifically > on the /dev/i2c-2 which is exposed on the board so as to drive external > equipment. > > I am looking into the linux-boundary kernel files in yocto (dylan) build > dir, but I cannot figure out where that is set. > To be honest I don't even know if i'll find that info there, but it > seems like the right place to start (after googling about it of course). > > So who determined the speed (standard mode, fast mode, etc) for the > external i2c? if it is a driver , which one should I be looking for? > This structure defines the speed of the I2C bus: https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_3.0.35_4.0.0/arch/arm/mach-mx6/board-mx6_nitrogen6x.c#L434 To change it for i2c-2 by itself, you'll need to make a copy of that, change the speed value and pass the copy to the routine imx6q_add_imx_i2c(): https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_3.0.35_4.0.0/arch/arm/mach-mx6/board-mx6_nitrogen6x.c#L1320 > The reason is I am trying to drive some TMC222 low-power stepper motor > control ICs, but they do not respond. > Note I have successfully connected a number of other i2c ICs (among > others the pca9505x). > > An answer is not necessary. Any pointers as to how to go about it , so I > can learn about this is more than welcome. > Thank you for your help. > This should be straightforward. Let me know if you have any trouble. Regards, Eric From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dub0-omc4-s35.dub0.hotmail.com (dub0-omc4-s35.dub0.hotmail.com [157.55.2.110]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 357B9E00747 for ; Wed, 14 Aug 2013 05:25:16 -0700 (PDT) Received: from DUB116-W128 ([157.55.2.71]) by dub0-omc4-s35.dub0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 14 Aug 2013 05:25:14 -0700 X-TMN: [G1P87OeBrPtkNJ8NAQrj37fdNPFyMMIK62h5zkbwetY=] X-Originating-Email: [djnass_18@hotmail.com] Message-ID: From: Thanassis Silis To: Eric Nelson Date: Wed, 14 Aug 2013 12:25:14 +0000 Importance: Normal In-Reply-To: <520A7B28.3000604@boundarydevices.com> References: , <520A7B28.3000604@boundarydevices.com> MIME-Version: 1.0 X-OriginalArrivalTime: 14 Aug 2013 12:25:14.0294 (UTC) FILETIME=[53E98D60:01CE98E9] Cc: "meta-freescale@yoctoproject.org" Subject: Re: speed of /dev/i2c-2 in imx6q sabre-lite X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Aug 2013 12:25:19 -0000 Content-Type: multipart/alternative; boundary="_7e6d09d9-db70-416e-9937-33334f02265b_" --_7e6d09d9-db70-416e-9937-33334f02265b_ Content-Type: text/plain; charset="iso-8859-7" Content-Transfer-Encoding: quoted-printable Eric=2C thank you very much for the answer (I have compiled kernel 3.0.35_1.1.0 by = the way=2C but the code hasn't changed since then). I do have a question (in my limited kernel knowledge) :) https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_3.0.35_4.0.= 0/drivers/i2c/busses/i2c-imx.c#L63 this looks like a module=2C but as I see in my sabrelite's /lib/modules/3.= 0.35-1.1.0+g2dc5560 modules.builtin:92:kernel/drivers/i2c/busses/i2c-imx.ko it is built in the kernel. What is the purpose of i2c-imx and how does it relate to imx* boards? Thank you for your help! > Date: Tue=2C 13 Aug 2013 11:30:00 -0700 > From: eric.nelson@boundarydevices.com > To: djnass_18@hotmail.com > CC: meta-freescale@yoctoproject.org > Subject: Re: [meta-freescale] speed of /dev/i2c-2 in imx6q sabre-lite >=20 > Hi Thanassis=2C >=20 > On 08/13/2013 11:03 AM=2C Thanassis Silis wrote: > > Hello everyone=2C > > I am unaware as to who sets clock speed on the i2c bus and specifically > > on the /dev/i2c-2 which is exposed on the board so as to drive external > > equipment. > > > > I am looking into the linux-boundary kernel files in yocto (dylan) buil= d > > dir=2C but I cannot figure out where that is set. > > To be honest I don't even know if i'll find that info there=2C but it > > seems like the right place to start (after googling about it of course)= . > > > > So who determined the speed (standard mode=2C fast mode=2C etc) for the > > external i2c? if it is a driver =2C which one should I be looking for? > > >=20 > This structure defines the speed of the I2C bus: > https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_3.0.35_4= .0.0/arch/arm/mach-mx6/board-mx6_nitrogen6x.c#L434 >=20 > To change it for i2c-2 by itself=2C you'll need to make a copy of > that=2C change the speed value and pass the copy to the routine > imx6q_add_imx_i2c(): > https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_3.0.35_4= .0.0/arch/arm/mach-mx6/board-mx6_nitrogen6x.c#L1320 >=20 > > The reason is I am trying to drive some TMC222 low-power stepper motor > > control ICs=2C but they do not respond. > > Note I have successfully connected a number of other i2c ICs (among > > others the pca9505x). > > > > An answer is not necessary. Any pointers as to how to go about it =2C s= o I > > can learn about this is more than welcome. > > Thank you for your help. > > >=20 > This should be straightforward. >=20 > Let me know if you have any trouble. >=20 > Regards=2C >=20 >=20 > Eric >=20 >=20 = --_7e6d09d9-db70-416e-9937-33334f02265b_ Content-Type: text/html; charset="iso-8859-7" Content-Transfer-Encoding: quoted-printable
Eric=2C
thank you very much f= or the answer (I have compiled kernel 3.0.35_1.1.0 by the way=2C but the co= de hasn't changed since then).
I do have a question (in my limited kerne= l knowledge) :)
https://github.com/boundarydevices/linux-imx6/blob/bound= ary-imx_3.0.35_4.0.0/drivers/i2c/busses/i2c-imx.c#L63

this looks lik= e a module=2C but as I see in my sabrelite's =3B /lib/modules/3.0.35-1.= 1.0+g2dc5560
modules.builtin:92:kernel/drivers/i2c/busses/i2c-imx.ko
= it is built in the kernel.

What is the purpose of i2c-imx and how do= es it relate to imx* boards?

Thank you for your help!

&g= t=3B Date: Tue=2C 13 Aug 2013 11:30:00 -0700
>=3B From: eric.nelson@bo= undarydevices.com
>=3B To: djnass_18@hotmail.com
>=3B CC: meta-fr= eescale@yoctoproject.org
>=3B Subject: Re: [meta-freescale] speed of /= dev/i2c-2 in imx6q sabre-lite
>=3B
>=3B Hi Thanassis=2C
>= =3B
>=3B On 08/13/2013 11:03 AM=2C Thanassis Silis wrote:
>=3B &= gt=3B Hello everyone=2C
>=3B >=3B I am unaware as to who sets clock = speed on the i2c bus and specifically
>=3B >=3B on the /dev/i2c-2 wh= ich is exposed on the board so as to drive external
>=3B >=3B equipm= ent.
>=3B >=3B
>=3B >=3B I am looking into the linux-boundar= y kernel files in yocto (dylan) build
>=3B >=3B dir=2C but I cannot = figure out where that is set.
>=3B >=3B To be honest I don't even kn= ow if i'll find that info there=2C but it
>=3B >=3B seems like the r= ight place to start (after googling about it of course).
>=3B >=3B>=3B >=3B So who determined the speed (standard mode=2C fast mode=2C = etc) for the
>=3B >=3B external i2c? if it is a driver =2C which one= should I be looking for?
>=3B >=3B
>=3B
>=3B This struct= ure defines the speed of the I2C bus:
>=3B https://github.com/boundar= ydevices/linux-imx6/blob/boundary-imx_3.0.35_4.0.0/arch/arm/mach-mx6/board-= mx6_nitrogen6x.c#L434
>=3B
>=3B To change it for i2c-2 by itself= =2C you'll need to make a copy of
>=3B that=2C change the speed value = and pass the copy to the routine
>=3B imx6q_add_imx_i2c():
>=3B = https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_3.0.35_4.0.= 0/arch/arm/mach-mx6/board-mx6_nitrogen6x.c#L1320
>=3B
>=3B >= =3B The reason is I am trying to drive some TMC222 low-power stepper motor<= br>>=3B >=3B control ICs=2C but they do not respond.
>=3B >=3B N= ote I have successfully connected a number of other i2c ICs (among
>= =3B >=3B others the pca9505x).
>=3B >=3B
>=3B >=3B An answe= r is not necessary. Any pointers as to how to go about it =2C so I
>= =3B >=3B can learn about this is more than welcome.
>=3B >=3B Than= k you for your help.
>=3B >=3B
>=3B
>=3B This should be s= traightforward.
>=3B
>=3B Let me know if you have any trouble.>=3B
>=3B Regards=2C
>=3B
>=3B
>=3B Eric
>= =3B
>=3B
= --_7e6d09d9-db70-416e-9937-33334f02265b_-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id B2AFAE01575 for ; Wed, 14 Aug 2013 07:28:09 -0700 (PDT) Received: by mail-pb0-f54.google.com with SMTP id ro12so9426687pbb.41 for ; Wed, 14 Aug 2013 07:28:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=CjC65+zdfhBtgybthkooAHj1+YIRDBJ1uFpPlWz6xms=; b=lnfoLQWOZF+ISVnKTFAfsjUPmpf0iTeleoIEpqstuh5QP3Vb0f85cGJ4h0LtMkduDZ w9bBlOkZ64K4b1Am6aJhKgVGdbwyc4KtWAcUnMnG4JmVYmwIaf/52IdfvjNPp5BFuVlN KeWMLMksvU5vhamiguxse4ySWI+CRgydzVuvfw553O6d2zj+yr+0zyl8RVvlSL6BQddp tVMlYMokaTFZ7JCKuj5lnM/rIn15XxXV1Cu8NV9RdpEYdPa02YXvRib1Oh6htRshx0gO z3wbhDtLJF7Y6vkfSzr2qudeBdJOj/AdinVWYpXFmFaPB7XIgT7XXCfzXe1v12+EeNOS azog== X-Gm-Message-State: ALoCoQnYE2xF5C4Vtofvw/o7EiI3ZItxZGkiIul03oLhBEpvJgNzlSWl7qYRrkzVhuJm6DE+OTfb X-Received: by 10.66.179.143 with SMTP id dg15mr10250417pac.52.1376490488889; Wed, 14 Aug 2013 07:28:08 -0700 (PDT) Received: from [192.168.1.8] (ip98-167-230-131.ph.ph.cox.net. [98.167.230.131]) by mx.google.com with ESMTPSA id mz5sm19858960pbc.18.2013.08.14.07.28.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Aug 2013 07:28:07 -0700 (PDT) Message-ID: <520B93F4.9060306@boundarydevices.com> Date: Wed, 14 Aug 2013 07:28:04 -0700 From: Eric Nelson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 MIME-Version: 1.0 To: Thanassis Silis References: , <520A7B28.3000604@boundarydevices.com> In-Reply-To: Cc: "meta-freescale@yoctoproject.org" Subject: Re: speed of /dev/i2c-2 in imx6q sabre-lite X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Aug 2013 14:28:14 -0000 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Thanassis, On 08/14/2013 05:25 AM, Thanassis Silis wrote: > Eric, > thank you very much for the answer (I have compiled kernel 3.0.35_1.1.0 > by the way, but the code hasn't changed since then). > I do have a question (in my limited kernel knowledge) :) > https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_3.0.35_4.0.0/drivers/i2c/busses/i2c-imx.c#L63 > > this looks like a module, but as I see in my sabrelite's > /lib/modules/3.0.35-1.1.0+g2dc5560 > modules.builtin:92:kernel/drivers/i2c/busses/i2c-imx.ko > it is built in the kernel. > > What is the purpose of i2c-imx and how does it relate to imx* boards? > i2c-imx is the device driver for the i2c part on many i.MX processors, including i.MX6. Because it's needed for many internal operations, we compile it into the kernel, instead of as a separately loadable module. This is a bit of "kernel configuration 101", but when you configure drivers into the Linux kernel, you can generally choose either "*" or "M", shown as "y" or "m" in the .config file: https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_3.0.35_4.0.0/arch/arm/configs/nitrogen6x_defconfig#L144 When you choose '*' or 'y', the driver is included in the kernel itself (uImage on our normal usage). If you choose 'm', the external .ko file is built. This is mostly important at startup, since you have to have a working filesystem and utilities like 'modprobe' or 'insmod' to load a .ko file. Regards, Eric From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dub0-omc4-s14.dub0.hotmail.com (dub0-omc4-s14.dub0.hotmail.com [157.55.2.89]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id E0BCEE0043E for ; Wed, 14 Aug 2013 08:40:49 -0700 (PDT) Received: from DUB116-W137 ([157.55.2.71]) by dub0-omc4-s14.dub0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 14 Aug 2013 08:40:48 -0700 X-TMN: [3hoSQ46FLvLVnpi41IZRH571Sq90Dhz/ySkISptsRmE=] X-Originating-Email: [djnass_18@hotmail.com] Message-ID: From: Thanassis Silis To: Eric Nelson Date: Wed, 14 Aug 2013 15:40:48 +0000 Importance: Normal In-Reply-To: <520B93F4.9060306@boundarydevices.com> References: , <520A7B28.3000604@boundarydevices.com> , <520B93F4.9060306@boundarydevices.com> MIME-Version: 1.0 X-OriginalArrivalTime: 14 Aug 2013 15:40:48.0369 (UTC) FILETIME=[A5F74E10:01CE9904] Cc: "meta-freescale@yoctoproject.org" Subject: Re: speed of /dev/i2c-2 in imx6q sabre-lite X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Aug 2013 15:40:51 -0000 Content-Type: multipart/alternative; boundary="_bb1951db-85ac-43e4-9d84-c1025dcc7d92_" --_bb1951db-85ac-43e4-9d84-c1025dcc7d92_ Content-Type: text/plain; charset="iso-8859-7" Content-Transfer-Encoding: quoted-printable Hi Eric=2C kernel configuration is no stranger to me as I am a longtime slackware user= =2C but thank you for the info. It is always nice to know I have not unders= tood something the wrong way. What I do not know is how the IMX_I2C_BIT_RATE (which is 100kHz) is related= to the imxi2c_platform_data structure. The file drivers/i2c/busses/i2c_imx.c doesn't include arch/arm/mach-mx6/boa= rd_nitrogen6x.c (or _sabrelite.c for that matter) or vice-versa. So is it c= orrect to say that i2c-imx.c sets the bitrate earlier in the boot process a= nd then the platform specific code=2C overwrites/alters that value to what = is set in board_nitrogen6x.c ? Thank you! > Date: Wed=2C 14 Aug 2013 07:28:04 -0700 > From: eric.nelson@boundarydevices.com > To: djnass_18@hotmail.com > CC: meta-freescale@yoctoproject.org > Subject: Re: [meta-freescale] speed of /dev/i2c-2 in imx6q sabre-lite >=20 > Hi Thanassis=2C >=20 > On 08/14/2013 05:25 AM=2C Thanassis Silis wrote: > > Eric=2C > > thank you very much for the answer (I have compiled kernel 3.0.35_1.1.0 > > by the way=2C but the code hasn't changed since then). > > I do have a question (in my limited kernel knowledge) :) > > https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_3.0.35_= 4.0.0/drivers/i2c/busses/i2c-imx.c#L63 > > > > this looks like a module=2C but as I see in my sabrelite's > > /lib/modules/3.0.35-1.1.0+g2dc5560 > > modules.builtin:92:kernel/drivers/i2c/busses/i2c-imx.ko > > it is built in the kernel. > > > > What is the purpose of i2c-imx and how does it relate to imx* boards? > > > i2c-imx is the device driver for the i2c part on many i.MX > processors=2C including i.MX6. >=20 > Because it's needed for many internal operations=2C we compile it > into the kernel=2C instead of as a separately loadable module. >=20 > This is a bit of "kernel configuration 101"=2C but when you configure > drivers into the Linux kernel=2C you can generally choose either > "*" or "M"=2C shown as "y" or "m" in the .config file: > https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_3.0.35_4= .0.0/arch/arm/configs/nitrogen6x_defconfig#L144 >=20 > When you choose '*' or 'y'=2C the driver is included in the > kernel itself (uImage on our normal usage). >=20 > If you choose 'm'=2C the external .ko file is built. >=20 > This is mostly important at startup=2C since you have to have > a working filesystem and utilities like 'modprobe' or 'insmod' > to load a .ko file. >=20 > Regards=2C >=20 >=20 > Eric = --_bb1951db-85ac-43e4-9d84-c1025dcc7d92_ Content-Type: text/html; charset="iso-8859-7" Content-Transfer-Encoding: quoted-printable
Hi Eric=2C
kernel configurati= on is no stranger to me as I am a longtime slackware user=2C but thank you = for the info. It is always nice to know I have not understood something the= wrong way.

What I do not know is how the IMX_I2C_BIT_RATE (which is= 100kHz) is related to the imxi2c_platform_data structure.
The file driv= ers/i2c/busses/i2c_imx.c doesn't include arch/arm/mach-mx6/board_nitrogen6x.c (or _sabrelite.c= for that matter) or vice-versa. So is it correct to say that i2c-imx.c set= s the bitrate earlier in the boot process and then the platform specific co= de=2C overwrites/alters that value to what is set in board_nitrogen6x.c ?

Thank you!

>=3B Date: Wed=2C 14 Aug 2013 07:28:04 -0700
>=3B From: er= ic.nelson@boundarydevices.com
>=3B To: djnass_18@hotmail.com
>=3B= CC: meta-freescale@yoctoproject.org
>=3B Subject: Re: [meta-freescale= ] speed of /dev/i2c-2 in imx6q sabre-lite
>=3B
>=3B Hi Thanassis= =2C
>=3B
>=3B On 08/14/2013 05:25 AM=2C Thanassis Silis wrote:>=3B >=3B Eric=2C
>=3B >=3B thank you very much for the answer= (I have compiled kernel 3.0.35_1.1.0
>=3B >=3B by the way=2C but th= e code hasn't changed since then).
>=3B >=3B I do have a question (i= n my limited kernel knowledge) :)
>=3B >=3B https://github.com/bound= arydevices/linux-imx6/blob/boundary-imx_3.0.35_4.0.0/drivers/i2c/busses/i2c= -imx.c#L63
>=3B >=3B
>=3B >=3B this looks like a module=2C bu= t as I see in my sabrelite's
>=3B >=3B /lib/modules/3.0.35-1.1.0+g2d= c5560
>=3B >=3B modules.builtin:92:kernel/drivers/i2c/busses/i2c-imx= .ko
>=3B >=3B it is built in the kernel.
>=3B >=3B
>=3B = >=3B What is the purpose of i2c-imx and how does it relate to imx* boards= ?
>=3B >=3B
>=3B i2c-imx is the device driver for the i2c part = on many i.MX
>=3B processors=2C including i.MX6.
>=3B
>=3B = Because it's needed for many internal operations=2C we compile it
>=3B= into the kernel=2C instead of as a separately loadable module.
>=3B <= br>>=3B This is a bit of "kernel configuration 101"=2C but when you confi= gure
>=3B drivers into the Linux kernel=2C you can generally choose ei= ther
>=3B "*" or "M"=2C shown as "y" or "m" in the .config file:
&g= t=3B https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_3.0.3= 5_4.0.0/arch/arm/configs/nitrogen6x_defconfig#L144
>=3B
>=3B Whe= n you choose '*' or 'y'=2C the driver is included in the
>=3B kernel i= tself (uImage on our normal usage).
>=3B
>=3B If you choose 'm'= =2C the external .ko file is built.
>=3B
>=3B This is mostly imp= ortant at startup=2C since you have to have
>=3B a working filesystem = and utilities like 'modprobe' or 'insmod'
>=3B to load a .ko file.
= >=3B
>=3B Regards=2C
>=3B
>=3B
>=3B Eric
=
= --_bb1951db-85ac-43e4-9d84-c1025dcc7d92_-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com [209.85.217.175]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 0E60FE013A7 for ; Wed, 14 Aug 2013 09:12:57 -0700 (PDT) Received: by mail-lb0-f175.google.com with SMTP id 13so7005515lba.20 for ; Wed, 14 Aug 2013 09:12:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=MnUcGNHXOhPO6oQvaKbsk5tcLjJHL7uJy48nOkEJgpQ=; b=V3I7LYb8HEbFYmVkWO6MO1zv0WfrhYzgQhg44yBIw7zL8e/oKaukFQNF9ATzox0CWS q//qRKQuJamqLkNHqe1Y5eLxkZ+fDEwfvxiC9YgA2NVBVQl6BfwKRJZ4Q8jXwJp+ApI1 9FeIk67V8tYeDEaMkiKWxKVwtJSrq4bsf/zBCEcjRrKZ5mZaaLOR8fbEh+fSRZW590XY gJqU5Z2e74xeZHB6TTfyuOLraICGF2mZp0cJDH+ax0qcw5TsPBwb+WQvNjDWkSwMyUBg cYOFgxSP50pCdabfpSzxlrdwVlOFXtD3FYB+YhJmbmjPWNYPtIHXrv01yf6jqumxFIhD 4z8A== X-Gm-Message-State: ALoCoQma468v/gDmQ4IWcbRW689l6lIbRf3pgDNsoLOogeOErBCn+uNjqxl9qnzrO1ZEZxaBnrB4 X-Received: by 10.112.33.205 with SMTP id t13mr8769568lbi.22.1376496776128; Wed, 14 Aug 2013 09:12:56 -0700 (PDT) Received: from [192.168.0.15] ([70.96.116.236]) by mx.google.com with ESMTPSA id db5sm16468932lac.10.2013.08.14.09.12.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Aug 2013 09:12:55 -0700 (PDT) Message-ID: <520BAC84.3020906@boundarydevices.com> Date: Wed, 14 Aug 2013 09:12:52 -0700 From: Eric Nelson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 MIME-Version: 1.0 To: Thanassis Silis References: , <520A7B28.3000604@boundarydevices.com> , <520B93F4.9060306@boundarydevices.com> In-Reply-To: Cc: "meta-freescale@yoctoproject.org" Subject: Re: speed of /dev/i2c-2 in imx6q sabre-lite X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Aug 2013 16:13:00 -0000 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Thanassis, On 08/14/2013 08:40 AM, Thanassis Silis wrote: > Hi Eric, > kernel configuration is no stranger to me as I am a longtime slackware > user, but thank you for the info. It is always nice to know I have not > understood something the wrong way. > Sorry if I was being pedantic. I thought that's what you were asking and folks come in with all kinds of background. > What I do not know is how the IMX_I2C_BIT_RATE (which is 100kHz) is > related to the imxi2c_platform_data structure. > The file drivers/i2c/busses/i2c_imx.c doesn't include > arch/arm/mach-mx6/board_nitrogen6x.c (or _sabrelite.c for that matter) > or vice-versa. So is it correct to say that i2c-imx.c sets the bitrate > earlier in the boot process and then the platform specific code, > overwrites/alters that value to what is set in board_nitrogen6x.c ? Nope. The driver's "probe" routine gets handed the imxi2c_platform_data structure from the device registration procedure in board-mx6_nitrogen.c. IOW, there's a run-time path, not a compile-time path. Otherwise, every driver would need to know about every board that used it. If you look closely, all of the uses of IMX_I2C_BIT_RATE are conditional on either missing "pdata" (platform data) or a zero value for bitrate. Regards, Eric From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dub0-omc4-s25.dub0.hotmail.com (dub0-omc4-s25.dub0.hotmail.com [157.55.2.100]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 18BA9E013A7 for ; Wed, 14 Aug 2013 11:44:36 -0700 (PDT) Received: from DUB116-W47 ([157.55.2.71]) by dub0-omc4-s25.dub0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 14 Aug 2013 11:44:35 -0700 X-TMN: [6V2IIl8m52A+sZy7URCI1G8pNyrwpG6xgsNVx4W+Fm8=] X-Originating-Email: [djnass_18@hotmail.com] Message-ID: From: Thanassis Silis To: Eric Nelson Date: Wed, 14 Aug 2013 18:44:35 +0000 Importance: Normal In-Reply-To: <520BAC84.3020906@boundarydevices.com> References: , <520A7B28.3000604@boundarydevices.com> , <520B93F4.9060306@boundarydevices.com> , <520BAC84.3020906@boundarydevices.com> MIME-Version: 1.0 X-OriginalArrivalTime: 14 Aug 2013 18:44:35.0198 (UTC) FILETIME=[5277E1E0:01CE991E] Cc: "meta-freescale@yoctoproject.org" Subject: Re: speed of /dev/i2c-2 in imx6q sabre-lite X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Aug 2013 18:44:37 -0000 Content-Type: multipart/alternative; boundary="_76e0b0f3-4025-4fdd-ab44-4df479649877_" --_76e0b0f3-4025-4fdd-ab44-4df479649877_ Content-Type: text/plain; charset="iso-8859-7" Content-Transfer-Encoding: quoted-printable don=3Bt worry about it. and thank you for all the info :) > Date: Wed=2C 14 Aug 2013 09:12:52 -0700 > From: eric.nelson@boundarydevices.com > To: djnass_18@hotmail.com > CC: meta-freescale@yoctoproject.org > Subject: Re: [meta-freescale] speed of /dev/i2c-2 in imx6q sabre-lite >=20 > Hi Thanassis=2C >=20 > On 08/14/2013 08:40 AM=2C Thanassis Silis wrote: > > Hi Eric=2C > > kernel configuration is no stranger to me as I am a longtime slackware > > user=2C but thank you for the info. It is always nice to know I have no= t > > understood something the wrong way. > > >=20 > Sorry if I was being pedantic. I thought that's what you were asking > and folks come in with all kinds of background. >=20 > > What I do not know is how the IMX_I2C_BIT_RATE (which is 100kHz) is > > related to the imxi2c_platform_data structure. > > The file drivers/i2c/busses/i2c_imx.c doesn't include > > arch/arm/mach-mx6/board_nitrogen6x.c (or _sabrelite.c for that matter) > > or vice-versa. So is it correct to say that i2c-imx.c sets the bitrate > > earlier in the boot process and then the platform specific code=2C > > overwrites/alters that value to what is set in board_nitrogen6x.c ? >=20 > Nope. The driver's "probe" routine gets handed the imxi2c_platform_data > structure from the device registration procedure in > board-mx6_nitrogen.c. >=20 > IOW=2C there's a run-time path=2C not a compile-time path. Otherwise=2C e= very > driver would need to know about every board that used it. >=20 > If you look closely=2C all of the uses of IMX_I2C_BIT_RATE are conditiona= l > on either missing "pdata" (platform data) or a zero value for bitrate. >=20 > Regards=2C >=20 >=20 > Eric = --_76e0b0f3-4025-4fdd-ab44-4df479649877_ Content-Type: text/html; charset="iso-8859-7" Content-Transfer-Encoding: quoted-printable
don=3Bt worry about it. and than= k you for all the info :)

>=3B Date: Wed=2C 14 Aug 2013 09:12= :52 -0700
>=3B From: eric.nelson@boundarydevices.com
>=3B To: djn= ass_18@hotmail.com
>=3B CC: meta-freescale@yoctoproject.org
>=3B = Subject: Re: [meta-freescale] speed of /dev/i2c-2 in imx6q sabre-lite
&g= t=3B
>=3B Hi Thanassis=2C
>=3B
>=3B On 08/14/2013 08:40 AM= =2C Thanassis Silis wrote:
>=3B >=3B Hi Eric=2C
>=3B >=3B ker= nel configuration is no stranger to me as I am a longtime slackware
>= =3B >=3B user=2C but thank you for the info. It is always nice to know I = have not
>=3B >=3B understood something the wrong way.
>=3B >= =3B
>=3B
>=3B Sorry if I was being pedantic. I thought that's wh= at you were asking
>=3B and folks come in with all kinds of background= .
>=3B
>=3B >=3B What I do not know is how the IMX_I2C_BIT_RAT= E (which is 100kHz) is
>=3B >=3B related to the imxi2c_platform_data= structure.
>=3B >=3B The file drivers/i2c/busses/i2c_imx.c doesn't = include
>=3B >=3B arch/arm/mach-mx6/board_nitrogen6x.c (or _sabrelit= e.c for that matter)
>=3B >=3B or vice-versa. So is it correct to sa= y that i2c-imx.c sets the bitrate
>=3B >=3B earlier in the boot proc= ess and then the platform specific code=2C
>=3B >=3B overwrites/alte= rs that value to what is set in board_nitrogen6x.c ?
>=3B
>=3B N= ope. The driver's "probe" routine gets handed the imxi2c_platform_data
&= gt=3B structure from the device registration procedure in
>=3B board-m= x6_nitrogen.c.
>=3B
>=3B IOW=2C there's a run-time path=2C not a= compile-time path. Otherwise=2C every
>=3B driver would need to know = about every board that used it.
>=3B
>=3B If you look closely=2C= all of the uses of IMX_I2C_BIT_RATE are conditional
>=3B on either mi= ssing "pdata" (platform data) or a zero value for bitrate.
>=3B
&g= t=3B Regards=2C
>=3B
>=3B
>=3B Eric
<= /div> = --_76e0b0f3-4025-4fdd-ab44-4df479649877_--