>From the following error message, I2C controller can't receive ACK from I2C client, so please make sure that the pins of I2C have been initialized properly, or you can measure the tx signal and rx signal on the right pins. B.R, Hongjun
________________________________ From: Uma Kanta Patro [mailto:upa...@implantaire.com] Sent: Wednesday, September 09, 2009 9:13 PM To: Chen Hongjun-R66092; linuxppc-dev@lists.ozlabs.org Subject: RE: Queries regarding I2C and GPIO driver for Freescale MPC5121e in Linux2.6.24 of BSP: MPC512xADS_20090603-ltib.iso Hi Chen Hongjun-R66092, Thanks for your response. Actually for the GPIO driver I am having some success and it is in progress. But regarding the I2C chip(client) driver I am running witout any progress. Actually I followed the existing driver $(LINUX)\drivers\rtc\rtc-m41t80.c (for the RTC M41T62 existing on the ADS5121Rev4.1 board). I made a legacy style driver with attach_adapter and detach_client functions defined. For testing purpose I geve the chip address as 0x68(address of M41T62 existing on the board). But when I tried ot insert my driver I get the error message as: [r...@freescale chips]# insmod dis_fpc.ko [ 177.808848] i2c 0-0068: uevent [ 498.528032] In dis_fpc_init [ 498.531851] i2c-core: driver [dis_fpc] registered [ 498.532446] In dis_fpc_attach_adapter [ 498.536827] i2c-adapter i2c-0: found normal entry for adapter 0, addr 0x55 [ 498.537730] i2c-adapter i2c-0: master_xfer[0] W, addr=0x55, len=0 [ 498.538533] Doing write 0 bytes to 0x55 - 1 of 1 messages [ 498.539770] I2C: No RXAK [ 498.540970] In dis_fpc_attach_adapter [ 498.554500] i2c-adapter i2c-1: found normal entry for adapter 1, addr 0x55 [ 498.555166] i2c-adapter i2c-1: master_xfer[0] W, addr=0x55, len=0 [ 498.555872] Doing write 0 bytes to 0x55 - 1 of 1 messages [ 498.556785] I2C: MAL [ 498.557476] In dis_fpc_attach_adapter [ 498.565733] i2c-adapter i2c-2: found normal entry for adapter 2, addr 0x55 [ 498.566377] i2c-adapter i2c-2: master_xfer[0] W, addr=0x55, len=0 [ 498.567082] Doing write 0 bytes to 0x55 - 1 of 1 messages [ 498.568240] I2C: No RXAK So can you tell me what other places do I need to change the configurations( like i2c_platform_data definition, linking the chip to the specific I2C module(0/1/2) with the adapter, configuring the speed of I2C communication etc). I would like to get any suggestion on making the I2C chip driver inpowerpc platform. Thanks & Regards, Uma From: Chen Hongjun-R66092 [mailto:hong-jun.c...@freescale.com] Sent: Wednesday, September 09, 2009 5:39 AM To: Uma Kanta Patro; linuxppc-dev@lists.ozlabs.org Subject: RE: Queries regarding I2C and GPIO driver for Freescale MPC5121e in Linux2.6.24 of BSP: MPC512xADS_20090603-ltib.iso One I2C driver has been included in 0603 bsp, you can refer to it. It has no specific driver for GPIO, but you can find some initializing code for GPIO in arch/powerpc/platforms/512x/mpc5125_ads.c. and mpc512x_pm_test.c. ________________________________ From: linuxppc-dev-bounces+hong-jun.chen=freescale....@lists.ozlabs.org [mailto:linuxppc-dev-bounces+hong-jun.chen=freescale....@lists.ozlabs.or g] On Behalf Of Uma Kanta Patro Sent: Tuesday, September 08, 2009 6:56 PM To: linuxppc-dev@lists.ozlabs.org Subject: Queries regarding I2C and GPIO driver for Freescale MPC5121e in Linux2.6.24 of BSP: MPC512xADS_20090603-ltib.iso Hi all, I am a newbie to the powerpc linux kernel, but I have worked on some drivers in arm architecture. I am finding powerpc architecture to be fully different than that. I am working on Freescale MPC5121e with the BSP MPC512xADS_20090603-ltib.iso running in it on the ADS512101 Rev4.1 development kit. Can anyone help me in finding some documentation for understanding and working on the powerpc kernel. Any links to the powerpc forums will also be appreciable. -> Currently I am going to develop an I2C client driver for one slave microcontroller of our project. I have some knowledge in the I2C client driver making(legacy style and new style). I made a basic I2C client driver to probe for the chip address and for testing I gave it the chip address 0x68(I2C chip address of the M4T162 RTC, present on the board). But while inserting my driver I am getting failure message for the detection of my chip. So I would like to know what other formalities am I lagging in my I2C chip driver. -> Also I am in a need for the GPIO driver for my controller ot get interrupt on ht estate change. When I searched in the kernel code I could not find any procedure to do that, also I could not find out the procedure to access either any GPIO pin macros or any register to remap with ioremap(). So please guide me in finding the proper way to do the GPIO accessing and interrupt registration. Will the ioremap() work on powerpc arch? If yes where can I find the memory mapping(register definitions) to use for my GPIO driver making. Thanks for patience in reading my queries. Any help is appreciable. Thanks & Regards, Uma
_______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev