Status of iic on wandboard
Tom Everett
tom at khubla.com
Sun Jul 6 02:01:49 UTC 2014
After some help from Ian on IRC, I have a working kernel here
<http://files.khubla.com/freebsd-wandboard/FreeBSD-armv6-11.0-IMX6-r268304.img.gz>,
and a bootlog here
<http://files.khubla.com/freebsd-wandboard/FreeBSD-armv6-11.0-IMX6-r268304.log>
.
I've attached some patch files.
On Sat, Jul 5, 2014 at 12:35 PM, Tom Everett <tom at khubla.com> wrote:
> ok, so I enabled iic and iicbus in the IMX6 kernel config. I also added
> this to imx6.dtsi (below).
>
> i2c at 021a0000 {
>
> #address-cells = <1>;
>
> #size-cells = <0>;
>
> compatible = "fsl,imx-i2c";
>
> reg = <0x021a0000 0x4000>;
>
> interrupt-parent = <&gic>; interrupts =
> <68>;
>
> };
>
>
> i2c at 021a4000 {
>
> #address-cells = <1>;
>
> #size-cells = <0>;
>
> compatible = "fsl,imx-i2c";
>
> reg = <0x021a4000 0x4000>;
>
> interrupt-parent = <&gic>; interrupts =
> <69>;
>
> };
>
>
> i2c at 021a8000 {
>
> #address-cells = <1>;
>
> #size-cells = <0>;
>
> compatible = "fsl,imx-i2c";
>
> reg = <0x021a8000 0x4000>;
>
> interrupt-parent = <&gic>; interrupts =
> <70>;
>
> };
>
> kldstat shows that the modules are there:
>
>
> $ kldstat -v | grep iic
>
> 13 iichb/iicbus
>
> 12 iicbus/iic
>
> 55 iichb/ofw_iicbus
>
> 54 iicbb/ofw_iicbus
>
>
> and opfwdump shows that the DTS data is there:
>
> root at wandboard:/dev # ofwdump -a
>
> Node 0x38:
>
> Node 0xa8: cpus
>
> Node 0xd4: cpu at 0
>
> Node 0x190: aliases
>
> Node 0x1bc: soc at 00000000
>
> Node 0x230: generic-interrupt-controller at 00a00100
>
> Node 0x2cc: mp_tmr0 at 00a00200
>
> Node 0x348: l2-cache at 00a02000
>
> Node 0x3d0: aips at 02000000
>
> Node 0x458: ccm at 020c4000
>
> Node 0x4b4: anatop at 020c8000
>
> Node 0x520: timer at 02098000
>
> Node 0x594: gpio at 0209c000
>
> Node 0x668: gpio at 020a0000
>
> Node 0x71c: gpio at 020a4000
>
> Node 0x7f0: gpio at 020a8000
>
> Node 0x8a4: gpio at 020ac000
>
> Node 0x958: gpio at 020b0000
>
> Node 0xa0c: gpio at 020b4000
>
> Node 0xac0: serial at 02020000
>
> Node 0xb4c: serial at 021e8000
>
> Node 0xbdc: serial at 021ec000
>
> Node 0xc6c: serial at 021f0000
>
> Node 0xcfc: serial at 021f4000
>
> Node 0xd8c: usbphy at 020c9000
>
> Node 0xe2c: usbphy at 020ca000
>
> Node 0xed0: aips at 02100000
>
> Node 0xf58: ethernet at 02188000
>
> Node 0xfec: usb at 02184000
>
> Node 0x1088: usb at 02184200
>
> Node 0x1124: usb at 02184400
>
> Node 0x11b4: usb at 02184600
>
> Node 0x1244: usbmisc at 02184800
>
> Node 0x12c4: usdhc at 02190000
>
> Node 0x1368: usdhc at 02194000
>
> Node 0x1404: usdhc at 02198000
>
> Node 0x14a8: usdhc at 0219c000
>
> Node 0x1538: i2c at 021a0000
>
> Node 0x15d0: i2c at 021a4000
>
> Node 0x1668: i2c at 021a8000
>
> Node 0x1700: ocotp at 021bc000
>
> Node 0x1750: memory
>
> Node 0x1774: chosen
>
>
> However, the device is not detected on boot. Where do I look next?
>
>
>
>
>
>
> On Wed, Jul 2, 2014 at 12:46 PM, Ian Lepore <ian at freebsd.org> wrote:
>
>> On Sun, 2014-06-29 at 18:47 -0600, Tom Everett wrote:
>> > I see that there is an i2c driver for imx on the source tree, and there
>> are
>> > iic kernel options in /conf/IMX6, commented out. Does anyone know the
>> > status of i2c for IMX?
>> >
>> >
>>
>> It works. I used it to write values to an i2c eeprom and read them back
>> a few weeks ago. I haven't tested any other devices yet.
>>
>> -- Ian
>>
>>
>>
>
>
> --
> A better world shall emerge based on faith and understanding - Douglas
> MacArthur
>
--
A better world shall emerge based on faith and understanding - Douglas
MacArthur
-------------- next part --------------
--- 11/head/sys/arm/freescale/imx/files.imx6 2014-07-05 19:51:32.483183536 -0600
+++ FreeBSDHead/head/sys/arm/freescale/imx/files.imx6 2014-07-05 17:12:05.183867649 -0600
@@ -52,6 +52,6 @@
#arm/freescale/imx/imx51_iomux.c optional iomux
#arm/freescale/imx/imx51_gpio.c optional gpio
#dev/ata/chipsets/ata-fsl.c optional imxata
-#arm/freescale/imx/i2c.c optional fsliic
+arm/freescale/imx/i2c.c optional fsliic
#arm/freescale/imx/imx51_ipuv3.c optional sc
-------------- next part --------------
--- 11/head/sys/arm/conf/IMX6 2014-07-05 19:51:32.273189985 -0600
+++ FreeBSDHead/head/sys/arm/conf/IMX6 2014-07-05 17:10:39.098860564 -0600
@@ -151,8 +151,8 @@
# SoC-specific devices
device ffec # Freescale Fast Ethernet Controller
-#device fsliic # Freescale i2c/iic (not ready yet)
-#device iic # iic protocol
-#device iicbus # iic bus
+device fsliic # Freescale i2c/iic (not ready yet)
+device iic # iic protocol
+device iicbus # iic bus
#device imxwdt # Watchdog. WARNING: can't be disabled!!!
-------------- next part --------------
--- 11/head/sys/boot/fdt/dts/arm/imx6.dtsi 2014-07-05 19:51:24.519191819 -0600
+++ FreeBSDHead/head/sys/boot/fdt/dts/arm/imx6.dtsi 2014-07-04 17:05:40.257831398 -0600
@@ -348,6 +348,30 @@
status ="disabled";
};
+ i2c at 021a0000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "fsl,imx-i2c";
+ reg = <0x021a0000 0x4000>;
+ interrupt-parent = <&gic>; interrupts = <68>;
+ };
+
+ i2c at 021a4000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "fsl,imx-i2c";
+ reg = <0x021a4000 0x4000>;
+ interrupt-parent = <&gic>; interrupts = <69>;
+ };
+
+ i2c at 021a8000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "fsl,imx-i2c";
+ reg = <0x021a8000 0x4000>;
+ interrupt-parent = <&gic>; interrupts = <70>;
+ };
+
ocotp0: ocotp at 021bc000 {
compatible = "fsl,imx6q-ocotp";
reg = <0x021bc000 0x4000>;
-------------- next part --------------
--- 11/head/sys/boot/fdt/dts/arm/wandboard-quad.dts 2014-07-05 19:51:24.534184060 -0600
+++ FreeBSDHead/head/sys/boot/fdt/dts/arm/wandboard-quad.dts 2014-07-04 19:55:48.569129202 -0600
@@ -71,6 +71,9 @@
usdhc at 02194000 { status = "disabled"; };
usdhc at 02198000 { status = "okay"; };
usdhc at 0219c000 { status = "disabled"; };
+ i2c at 021a0000 { status = "okay"; };
+ i2c at 021a4000 { status = "okay"; };
+ i2c at 021a8000 { status = "okay"; };
};
};
More information about the freebsd-arm
mailing list