Re: [U-Boot] [RFC 0/2] Add cdns-i2c driver as drop in for zynq-i2c
On Tue, Jan 5, 2016 at 11:53 PM, Michal Simekwrote: > On 5.1.2016 18:30, Moritz Fischer wrote: >> Hi Michal, >> >> On Tue, Jan 5, 2016 at 7:44 AM, Michal Simek wrote: >> >>> I have looked at these patches and I don't know why there is 100k >>> limitation in cdns_i2c_set_bus_speed. DTS is using 400k in Linux without >>> any problem. >> >> Well I could statically calculate the values for 400K, too but anyway that >> works >> only if your CPU_CLK_1X is 111MHz. Is there a way to figure out the >> CPU_CLK_1X >> frequency? > > Check the clock driver. Wouldn't that nececitate dm capable clk drivers? Were you talking about arch/arm/mach-zynq/clk.c? > It is simple to create that mux drivers but I am scared about that need > for aliases and also i2c-parent has to go out of mux class too. > I see that it is used in the mainline kernel but it has be changed. I'll need to further investigate that. > > >>> Also I have found that there is eeprom dependency which needs to be >>> resolved to be able to use this driver instead of old one. >> >> Yeah I realized that. Do any of the zynq boards actually use CMD_EEPROM? > > We have a code for zc702 to save internal variables to EEPROM. zc706 > should have that memory too. Ok, I'll look into it. Moritz ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC 0/2] Add cdns-i2c driver as drop in for zynq-i2c
Hi Michal, On Tue, Jan 5, 2016 at 7:44 AM, Michal Simekwrote: > I have looked at these patches and I don't know why there is 100k > limitation in cdns_i2c_set_bus_speed. DTS is using 400k in Linux without > any problem. Well I could statically calculate the values for 400K, too but anyway that works only if your CPU_CLK_1X is 111MHz. Is there a way to figure out the CPU_CLK_1X frequency? > Unfortunately I found that i2c muxes like pca9548 are not supported yet > but I have create sort of skeleton for that but it looks like that there > is no standard binding where i2c-parent is required. Also every muxes > bus needs to have correct label and alias. Yeah, I realized that last night when I started playing around with it. I was trying to pull in the linux one but didn't get around to finish that yet. > Also I have found that there is eeprom dependency which needs to be > resolved to be able to use this driver instead of old one. Yeah I realized that. Do any of the zynq boards actually use CMD_EEPROM? Thanks for you feedback, Moritz ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC 0/2] Add cdns-i2c driver as drop in for zynq-i2c
On 28.12.2015 18:47, Moritz Fischer wrote: > Hi all, > > I spent some time moving over the zynq-i2c.c to support dm. > While doing that I realized that renaming it to cdns-i2c might > make sense since it now could be used with other SoCs that also use the > the Cadence IP. > > This is a first shot, but I'd like to get some early feedback ;-) > > Cheers, > > Moritz > > PS: I skipped touching the Zynq board files for now, since I wanted to make > sure > I get the driver right first ;-) > > Moritz Fischer (2): > i2c: Describe Cadence I2C devicetree bindings > dm: i2c: Add driver for Cadence I2C IP > > doc/device-tree-bindings/i2c/i2c-cdns.txt | 20 ++ > drivers/i2c/Kconfig | 7 + > drivers/i2c/Makefile | 1 + > drivers/i2c/i2c-cdns.c| 339 > ++ > 4 files changed, 367 insertions(+) > create mode 100644 doc/device-tree-bindings/i2c/i2c-cdns.txt > create mode 100644 drivers/i2c/i2c-cdns.c > I have looked at these patches and I don't know why there is 100k limitation in cdns_i2c_set_bus_speed. DTS is using 400k in Linux without any problem. Unfortunately I found that i2c muxes like pca9548 are not supported yet but I have create sort of skeleton for that but it looks like that there is no standard binding where i2c-parent is required. Also every muxes bus needs to have correct label and alias. Also I have found that there is eeprom dependency which needs to be resolved to be able to use this driver instead of old one. Thanks, Michal ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC 0/2] Add cdns-i2c driver as drop in for zynq-i2c
On 5.1.2016 18:30, Moritz Fischer wrote: > Hi Michal, > > On Tue, Jan 5, 2016 at 7:44 AM, Michal Simekwrote: > >> I have looked at these patches and I don't know why there is 100k >> limitation in cdns_i2c_set_bus_speed. DTS is using 400k in Linux without >> any problem. > > Well I could statically calculate the values for 400K, too but anyway that > works > only if your CPU_CLK_1X is 111MHz. Is there a way to figure out the CPU_CLK_1X > frequency? Check the clock driver. >> Unfortunately I found that i2c muxes like pca9548 are not supported yet >> but I have create sort of skeleton for that but it looks like that there >> is no standard binding where i2c-parent is required. Also every muxes >> bus needs to have correct label and alias. > > Yeah, I realized that last night when I started playing around with > it. I was trying > to pull in the linux one but didn't get around to finish that yet. It is simple to create that mux drivers but I am scared about that need for aliases and also i2c-parent has to go out of mux class too. I see that it is used in the mainline kernel but it has be changed. >> Also I have found that there is eeprom dependency which needs to be >> resolved to be able to use this driver instead of old one. > > Yeah I realized that. Do any of the zynq boards actually use CMD_EEPROM? We have a code for zc702 to save internal variables to EEPROM. zc706 should have that memory too. Thanks, Michal ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC 0/2] Add cdns-i2c driver as drop in for zynq-i2c
Hi all, I spent some time moving over the zynq-i2c.c to support dm. While doing that I realized that renaming it to cdns-i2c might make sense since it now could be used with other SoCs that also use the the Cadence IP. This is a first shot, but I'd like to get some early feedback ;-) Cheers, Moritz PS: I skipped touching the Zynq board files for now, since I wanted to make sure I get the driver right first ;-) Moritz Fischer (2): i2c: Describe Cadence I2C devicetree bindings dm: i2c: Add driver for Cadence I2C IP doc/device-tree-bindings/i2c/i2c-cdns.txt | 20 ++ drivers/i2c/Kconfig | 7 + drivers/i2c/Makefile | 1 + drivers/i2c/i2c-cdns.c| 339 ++ 4 files changed, 367 insertions(+) create mode 100644 doc/device-tree-bindings/i2c/i2c-cdns.txt create mode 100644 drivers/i2c/i2c-cdns.c -- 2.4.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC 0/2] Add cdns-i2c driver as drop in for zynq-i2c
Hi, 2015-12-28 18:47 GMT+01:00 Moritz Fischer: > Hi all, > > I spent some time moving over the zynq-i2c.c to support dm. > ok then where is the series for converting orgin driver to this DM one? > While doing that I realized that renaming it to cdns-i2c might > make sense since it now could be used with other SoCs that also use the > the Cadence IP. > No problem with renaming but I would like to see change from origin driver to this new one instead of just adding completely new one and keeping old one there. > This is a first shot, but I'd like to get some early feedback ;-) > I will look at it and test it in January. Thanks, Michal ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC 0/2] Add cdns-i2c driver as drop in for zynq-i2c
Hi Michal, On Mon, Dec 28, 2015 at 10:35 AM, Michal Simekwrote: > ok then where is the series for converting orgin driver to this DM one? Umhh, well it would look like: $ git rm drivers/i2c/zynq-i2c.c $ git add drivers/i2c/i2c-cdns.c Do you want me to add that to the v1? > No problem with renaming but I would like to see change from origin driver > to this new one > instead of just adding completely new one and keeping old one there. See above. To clarify you mean I should also add the edits to convert the actual zynq boards over? I need to take a look which ones actually use i2c. > I will look at it and test it in January. Thanks. Cheers, Moritz ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot