Hi,
If you will review the Linux kernel sources you will notice that there is absolutely no support for I2C slave - I guess this is logic since it is very rare to use a Linux base system as I2C device. It is also not simple because the Master may have timing issues.
But, unfortunately, sometimes it is required - so, if you are using Freescale's I2C controller (of course it can be done only with a controller - do it with GPIOs is much more complicated) I can help you.
I did it for device based on Freescale's PQII pro MPC8308 chip that is based on PPC core, but I believe it should not be a problem to do it also to other Freescale's chips that base on ARM core and has the same I2C controller unit.
I hope to expand the information on that issue here, but anyway if you need help, I'll be happy to assist.
Avner
The Flesch
Thursday, July 4, 2013
Wednesday, November 7, 2012
Linux USB host driver for Freescale's MPC83XX
Recently I got a project to set MPC8308RDB USB to host mode and support serial USB driver.
MPC8308RDB is evaluation board for PQII-Pro MPC8308 supplied by Freescale.
First of all I configured the Linuk kernel:
make ARCH=powerpc CROSS_COMPILE=ppc_6xx- mpc83xx_defconfig
Thus how I got the default .config file for my board.
Then I did:
make ARCH=powerpc CROSS_COMPILE=ppc_6xx- xconfig
And I changed the configuration according to my needs (USB, USB Host, USB Serial, etc.)
Then I burn this Kernel image to the flash - but got nothing...
I googled about it, tried to get answer in some related mailing list, ask for support request by Freescale - but no one really managed to help me solve this problem.
Eventually I checked my DTS file, and there were the answer - you must configure correctly the USB.
Unfortunately, there is no documentation for the DTS file (correct me if I am wrong).
Anyway, this is how USB Host should be configured in the DTS file for MPC83xx processors (I assume it is true also for other Freescale's processors):
usb@23000 {
compatible = "fsl-usb2-dr";
reg = <0x23000 0x1000>;
#address-cells = <1>;
#size-cells = <0>;
interrupt-parent = <&ipic>;
interrupts = <38 0x8>;
dr_mode = "host";
phy_type = "ulpi";
};
Good Luck
Avner
MPC8308RDB is evaluation board for PQII-Pro MPC8308 supplied by Freescale.
First of all I configured the Linuk kernel:
make ARCH=powerpc CROSS_COMPILE=ppc_6xx- mpc83xx_defconfig
Thus how I got the default .config file for my board.
Then I did:
make ARCH=powerpc CROSS_COMPILE=ppc_6xx- xconfig
And I changed the configuration according to my needs (USB, USB Host, USB Serial, etc.)
Then I burn this Kernel image to the flash - but got nothing...
I googled about it, tried to get answer in some related mailing list, ask for support request by Freescale - but no one really managed to help me solve this problem.
Eventually I checked my DTS file, and there were the answer - you must configure correctly the USB.
Unfortunately, there is no documentation for the DTS file (correct me if I am wrong).
Anyway, this is how USB Host should be configured in the DTS file for MPC83xx processors (I assume it is true also for other Freescale's processors):
usb@23000 {
compatible = "fsl-usb2-dr";
reg = <0x23000 0x1000>;
#address-cells = <1>;
#size-cells = <0>;
interrupt-parent = <&ipic>;
interrupts = <38 0x8>;
dr_mode = "host";
phy_type = "ulpi";
};
Good Luck
Avner
Subscribe to:
Posts (Atom)