* TQM5200 I2C Second bus
@ 2008-09-19 10:25 Jani.Sarkijarvi
2008-09-19 13:57 ` Juergen Beisert
0 siblings, 1 reply; 4+ messages in thread
From: Jani.Sarkijarvi @ 2008-09-19 10:25 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 2908 bytes --]
Hi,
I'm using TQM5200 (MPC5200) chip with linux-2.6-denx. Problem is to get second I2c bus to work (/dev/i2c-0) . /dev/i2c-1 seems to be internal bus and I can read ex. lm75 temperature sensor, also I can see traffic in oscilloscope (only error is "I2C: No RXAK", but it seems to be working). My .dts setup is:
i2c@3d00 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,mpc5200-i2c","fsl-i2c";
reg = <0x3d00 0x40>; // mapped to /dev/i2c-0
cell-index = <0>;
interrupts = <2 16 0>; //neather <2 15 0> is not working says: I2C: MAL
interrupt-parent = <&mpc5200_pic>;
fsl5200-clocking;
};
i2c@3d40 {
#address-cells = <1>;
#size-cells = <0>; // mapped to /dev/i2c-1
compatible = "fsl,mpc5200-i2c","fsl-i2c";
reg = <0x3d40 0x40>;
cell-index = <1>;
interrupts = <2 16 0>;
interrupt-parent = <&mpc5200_pic>;
fsl5200-clocking;
rtc@68 {
device_type = "rtc";
compatible = "dallas,ds1307";
reg = <0x68>;
};
};
And kernel says in boot:
[ 1.270973] i2c /dev entries driver
[ 1.275664] i2c-core: driver [dev_driver] registered
[ 1.276395] i2c-adapter i2c-0: adapter [MPC adapter] registered
[ 1.277066] i2c-dev: adapter [MPC adapter] registered as minor 0
[ 1.277802] i2c-adapter i2c-1: adapter [MPC adapter] registered
[ 1.277975] i2c 1-0068: uevent
[ 1.278415] i2c-adapter i2c-1: client [ds1307] registered with bus id 1-0068
[ 1.279042] i2c-dev: adapter [MPC adapter] registered as minor 1
And:
# ls -la /dev/i2c-*
crwxrwxrwx 1 root root 89, 0 Aug 13 2008 /dev/i2c-0
crwxrwxrwx 1 root root 89, 1 Aug 14 2008 /dev/i2c-1
#
If I try read something from /dev/i2c-0, it says:
# dmesg
[ 2628.107343] i2c-adapter i2c-0: ioctl, cmd=0x703, arg=0x01
[ 2628.107880] i2c-dev: i2c-0 reading 2 bytes.
[ 2628.107934] i2c-adapter i2c-0: master_xfer[0] R, addr=0x01, len=2
[ 2628.107956] Doing read 2 bytes to 0x01 - 1 of 1 messages
[ 2629.105411] I2C: wait timeout
Any ideas?
Best Regards,
Jani Särkijärvi
----------------------------------------------------------------
Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.
[-- Attachment #2: Type: text/html, Size: 6610 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: TQM5200 I2C Second bus
2008-09-19 10:25 TQM5200 I2C Second bus Jani.Sarkijarvi
@ 2008-09-19 13:57 ` Juergen Beisert
2008-09-23 14:39 ` Jani.Sarkijarvi
0 siblings, 1 reply; 4+ messages in thread
From: Juergen Beisert @ 2008-09-19 13:57 UTC (permalink / raw)
To: linuxppc-embedded; +Cc: Jani.Sarkijarvi
On Freitag, 19. September 2008, Jani.Sarkijarvi@elektrobit.com wrote:
> Hi,
>
> I'm using TQM5200 (MPC5200) chip with linux-2.6-denx. Problem is to get
> second I2c bus to work (/dev/i2c-0) . /dev/i2c-1 seems to be internal bus
> and I can read ex. lm75 temperature sensor, also I can see traffic in
> oscilloscope (only error is "I2C: No RXAK", but it seems to be working). =
My
> .dts setup is:
Is your "GPS Port Configuration Register" setting correct?
jbe
=2D-=20
Dipl.-Ing. Juergen Beisert | http://www.pengutronix.de
=A0Pengutronix - Linux Solutions for Science and Industry
=A0 Handelsregister: Amtsgericht Hildesheim, HRA 2686
=A0 =A0 =A0 Vertretung Sued/Muenchen, Germany
Phone: +49-8766-939 228 | Fax: +49-5121-206917-9
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: TQM5200 I2C Second bus
2008-09-19 13:57 ` Juergen Beisert
@ 2008-09-23 14:39 ` Jani.Sarkijarvi
2008-09-23 14:53 ` Grant Likely
0 siblings, 1 reply; 4+ messages in thread
From: Jani.Sarkijarvi @ 2008-09-23 14:39 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1513 bytes --]
It is very possible that, setting are not right. I found from mpc5200 manual this register: (MBAR + 0x0B00, GPS, GPIO Standard registers). Where should be right place to modify those register?
BR,
Jani Särkijärvi
-----Original Message-----
From: Juergen Beisert [mailto:jbe@pengutronix.de]
Sent: 19 September 2008 16:58
To: linuxppc-embedded@ozlabs.org
Cc: Särkijärvi, Jani
Subject: Re: TQM5200 I2C Second bus
On Freitag, 19. September 2008, Jani.Sarkijarvi@elektrobit.com wrote:
> Hi,
>
> I'm using TQM5200 (MPC5200) chip with linux-2.6-denx. Problem is to
> get second I2c bus to work (/dev/i2c-0) . /dev/i2c-1 seems to be
> internal bus and I can read ex. lm75 temperature sensor, also I can
> see traffic in oscilloscope (only error is "I2C: No RXAK", but it
> seems to be working). My .dts setup is:
Is your "GPS Port Configuration Register" setting correct?
jbe
--
Dipl.-Ing. Juergen Beisert | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Vertretung Sued/Muenchen, Germany
Phone: +49-8766-939 228 | Fax: +49-5121-206917-9
----------------------------------------------------------------
Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: TQM5200 I2C Second bus
2008-09-23 14:39 ` Jani.Sarkijarvi
@ 2008-09-23 14:53 ` Grant Likely
0 siblings, 0 replies; 4+ messages in thread
From: Grant Likely @ 2008-09-23 14:53 UTC (permalink / raw)
To: Jani.Sarkijarvi; +Cc: linuxppc-embedded
On Tue, Sep 23, 2008 at 05:39:05PM +0300, Jani.Sarkijarvi@elektrobit.com wrote:
>
> It is very possible that, setting are not right. I found from mpc5200 manual this register: (MBAR + 0x0B00, GPS, GPIO Standard registers). Where should be right place to modify those register?
Ideally, your U-Boot port should set the correct value for port config.
If you are unable to modify U-Boot, then you can clone
arch/powerpc/platform/52xx/mpc5200_simple.c for the tqm5200 board and
put the port_config fixup in there.
arch/powerpc/platform/52xx/lite5200.c exists for the exact same reason.
Look at the lite5200_fix_port_config() function.
g.
>
> BR,
>
> Jani Särkijärvi
>
> -----Original Message-----
> From: Juergen Beisert [mailto:jbe@pengutronix.de]
> Sent: 19 September 2008 16:58
> To: linuxppc-embedded@ozlabs.org
> Cc: Särkijärvi, Jani
> Subject: Re: TQM5200 I2C Second bus
>
> On Freitag, 19. September 2008, Jani.Sarkijarvi@elektrobit.com wrote:
> > Hi,
> >
> > I'm using TQM5200 (MPC5200) chip with linux-2.6-denx. Problem is to
> > get second I2c bus to work (/dev/i2c-0) . /dev/i2c-1 seems to be
> > internal bus and I can read ex. lm75 temperature sensor, also I can
> > see traffic in oscilloscope (only error is "I2C: No RXAK", but it
> > seems to be working). My .dts setup is:
>
> Is your "GPS Port Configuration Register" setting correct?
>
> jbe
>
> --
> Dipl.-Ing. Juergen Beisert | http://www.pengutronix.de
> Pengutronix - Linux Solutions for Science and Industry
> Handelsregister: Amtsgericht Hildesheim, HRA 2686
> Vertretung Sued/Muenchen, Germany
> Phone: +49-8766-939 228 | Fax: +49-5121-206917-9
>
>
> ----------------------------------------------------------------
> Please note: This e-mail may contain confidential information
> intended solely for the addressee. If you have received this
> e-mail in error, please do not disclose it to anyone, notify
> the sender promptly, and delete the message from your system.
> Thank you.
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-09-23 14:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-19 10:25 TQM5200 I2C Second bus Jani.Sarkijarvi
2008-09-19 13:57 ` Juergen Beisert
2008-09-23 14:39 ` Jani.Sarkijarvi
2008-09-23 14:53 ` Grant Likely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).