From owner-freebsd-arm@FreeBSD.ORG Sun Jul 6 02:01:49 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4353937B for ; Sun, 6 Jul 2014 02:01:49 +0000 (UTC) Received: from mail-oa0-f52.google.com (mail-oa0-f52.google.com [209.85.219.52]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 00078243B for ; Sun, 6 Jul 2014 02:01:48 +0000 (UTC) Received: by mail-oa0-f52.google.com with SMTP id j17so3049077oag.25 for ; Sat, 05 Jul 2014 19:01:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=euNZVdGEA8ksltTsViF7RqZeVx6ixs4VbwtHKDulPNs=; b=Yaf9cYhE+96XujYRLZFxzNGw5b2xlBeLfdz9cxvXRFivVfPUGuAwTmfFItUbvGWiq2 75pCZPpG60ArpqT6k7y7J9zMmzTdbSuz/laG5+zoqbmz2veH1wXoTyM2atJQxSlk4Ee9 L0dKiCTQ/m6eltafHAF7uussflgypukIqWDG/SeQLH9MX8cszdWu75sPXTs5cQ3+kvmS 7jyduIJi24mKaPa9DRGnpNDhO5FjW1YBoBwiRJ+j8AV3PteTTNJRPEU4orzmGbLn2omX 7gBqYnMdl4lFKqIwxH0p5yCjZTHN3UqsQkHo5SQW2UCGRiMsqBVVNUGz9AcQbalI/vpW scfg== X-Gm-Message-State: ALoCoQkqjay7ojnhA/rKnEu6uYM18MZN0lsBLlKXKu08ma+fl1EKmISGg9/nmSYS3Z4Vx1uUTbnH MIME-Version: 1.0 X-Received: by 10.182.3.10 with SMTP id 10mr21943917oby.22.1404612102481; Sat, 05 Jul 2014 19:01:42 -0700 (PDT) Received: by 10.182.96.101 with HTTP; Sat, 5 Jul 2014 19:01:42 -0700 (PDT) In-Reply-To: References: <1404326769.20883.396.camel@revolution.hippie.lan> Date: Sat, 5 Jul 2014 20:01:42 -0600 Message-ID: Subject: Re: Status of iic on wandboard From: Tom Everett To: Ian Lepore Content-Type: multipart/mixed; boundary=001a113487746a949d04fd7cbd86 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 Cc: "freebsd-arm@freebsd.org" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2014 02:01:49 -0000 --001a113487746a949d04fd7cbd86 Content-Type: text/plain; charset=UTF-8 After some help from Ian on IRC, I have a working kernel here , and a bootlog here . I've attached some patch files. On Sat, Jul 5, 2014 at 12:35 PM, Tom Everett wrote: > ok, so I enabled iic and iicbus in the IMX6 kernel config. I also added > this to imx6.dtsi (below). > > i2c@021a0000 { > > #address-cells = <1>; > > #size-cells = <0>; > > compatible = "fsl,imx-i2c"; > > reg = <0x021a0000 0x4000>; > > interrupt-parent = <&gic>; interrupts = > <68>; > > }; > > > i2c@021a4000 { > > #address-cells = <1>; > > #size-cells = <0>; > > compatible = "fsl,imx-i2c"; > > reg = <0x021a4000 0x4000>; > > interrupt-parent = <&gic>; interrupts = > <69>; > > }; > > > i2c@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@wandboard:/dev # ofwdump -a > > Node 0x38: > > Node 0xa8: cpus > > Node 0xd4: cpu@0 > > Node 0x190: aliases > > Node 0x1bc: soc@00000000 > > Node 0x230: generic-interrupt-controller@00a00100 > > Node 0x2cc: mp_tmr0@00a00200 > > Node 0x348: l2-cache@00a02000 > > Node 0x3d0: aips@02000000 > > Node 0x458: ccm@020c4000 > > Node 0x4b4: anatop@020c8000 > > Node 0x520: timer@02098000 > > Node 0x594: gpio@0209c000 > > Node 0x668: gpio@020a0000 > > Node 0x71c: gpio@020a4000 > > Node 0x7f0: gpio@020a8000 > > Node 0x8a4: gpio@020ac000 > > Node 0x958: gpio@020b0000 > > Node 0xa0c: gpio@020b4000 > > Node 0xac0: serial@02020000 > > Node 0xb4c: serial@021e8000 > > Node 0xbdc: serial@021ec000 > > Node 0xc6c: serial@021f0000 > > Node 0xcfc: serial@021f4000 > > Node 0xd8c: usbphy@020c9000 > > Node 0xe2c: usbphy@020ca000 > > Node 0xed0: aips@02100000 > > Node 0xf58: ethernet@02188000 > > Node 0xfec: usb@02184000 > > Node 0x1088: usb@02184200 > > Node 0x1124: usb@02184400 > > Node 0x11b4: usb@02184600 > > Node 0x1244: usbmisc@02184800 > > Node 0x12c4: usdhc@02190000 > > Node 0x1368: usdhc@02194000 > > Node 0x1404: usdhc@02198000 > > Node 0x14a8: usdhc@0219c000 > > Node 0x1538: i2c@021a0000 > > Node 0x15d0: i2c@021a4000 > > Node 0x1668: i2c@021a8000 > > Node 0x1700: ocotp@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 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 --001a113487746a949d04fd7cbd86 Content-Type: text/plain; charset=US-ASCII; name="files.imx6.diff" Content-Disposition: attachment; filename="files.imx6.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hx9pqetr0 LS0tIDExL2hlYWQvc3lzL2FybS9mcmVlc2NhbGUvaW14L2ZpbGVzLmlteDYJMjAxNC0wNy0wNSAx OTo1MTozMi40ODMxODM1MzYgLTA2MDAKKysrIEZyZWVCU0RIZWFkL2hlYWQvc3lzL2FybS9mcmVl c2NhbGUvaW14L2ZpbGVzLmlteDYJMjAxNC0wNy0wNSAxNzoxMjowNS4xODM4Njc2NDkgLTA2MDAK QEAgLTUyLDYgKzUyLDYgQEAKICNhcm0vZnJlZXNjYWxlL2lteC9pbXg1MV9pb211eC5jICAJb3B0 aW9uYWwgaW9tdXgKICNhcm0vZnJlZXNjYWxlL2lteC9pbXg1MV9ncGlvLmMgIAlvcHRpb25hbCBn cGlvCiAjZGV2L2F0YS9jaGlwc2V0cy9hdGEtZnNsLmMgIAkJb3B0aW9uYWwgaW14YXRhCi0jYXJt L2ZyZWVzY2FsZS9pbXgvaTJjLmMgIAkJb3B0aW9uYWwgZnNsaWljCithcm0vZnJlZXNjYWxlL2lt eC9pMmMuYyAgCQlvcHRpb25hbCBmc2xpaWMKICNhcm0vZnJlZXNjYWxlL2lteC9pbXg1MV9pcHV2 My5jICAJb3B0aW9uYWwgc2MKIAo= --001a113487746a949d04fd7cbd86 Content-Type: text/plain; charset=US-ASCII; name="IMX6.diff" Content-Disposition: attachment; filename="IMX6.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hx9pqeu01 LS0tIDExL2hlYWQvc3lzL2FybS9jb25mL0lNWDYJMjAxNC0wNy0wNSAxOTo1MTozMi4yNzMxODk5 ODUgLTA2MDAKKysrIEZyZWVCU0RIZWFkL2hlYWQvc3lzL2FybS9jb25mL0lNWDYJMjAxNC0wNy0w NSAxNzoxMDozOS4wOTg4NjA1NjQgLTA2MDAKQEAgLTE1MSw4ICsxNTEsOCBAQAogCiAjIFNvQy1z cGVjaWZpYyBkZXZpY2VzCiBkZXZpY2UgIAlmZmVjCQkJIyBGcmVlc2NhbGUgRmFzdCBFdGhlcm5l dCBDb250cm9sbGVyCi0jZGV2aWNlICAJZnNsaWljCQkJIyBGcmVlc2NhbGUgaTJjL2lpYyAobm90 IHJlYWR5IHlldCkKLSNkZXZpY2UgIAlpaWMJCQkjIGlpYyBwcm90b2NvbAotI2RldmljZSAgCWlp Y2J1cwkJCSMgaWljIGJ1cworZGV2aWNlICAJZnNsaWljCQkJIyBGcmVlc2NhbGUgaTJjL2lpYyAo bm90IHJlYWR5IHlldCkKK2RldmljZSAgCWlpYwkJCSMgaWljIHByb3RvY29sCitkZXZpY2UgIAlp aWNidXMJCQkjIGlpYyBidXMKICNkZXZpY2UgIAlpbXh3ZHQJCQkjIFdhdGNoZG9nLiBXQVJOSU5H OiBjYW4ndCBiZSBkaXNhYmxlZCEhIQogCg== --001a113487746a949d04fd7cbd86 Content-Type: text/plain; charset=US-ASCII; name="imx6.dtsi.diff" Content-Disposition: attachment; filename="imx6.dtsi.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hx9pqeu22 LS0tIDExL2hlYWQvc3lzL2Jvb3QvZmR0L2R0cy9hcm0vaW14Ni5kdHNpCTIwMTQtMDctMDUgMTk6 NTE6MjQuNTE5MTkxODE5IC0wNjAwCisrKyBGcmVlQlNESGVhZC9oZWFkL3N5cy9ib290L2ZkdC9k dHMvYXJtL2lteDYuZHRzaQkyMDE0LTA3LTA0IDE3OjA1OjQwLjI1NzgzMTM5OCAtMDYwMApAQCAt MzQ4LDYgKzM0OCwzMCBAQAogCQkJCXN0YXR1cyA9ImRpc2FibGVkIjsKIAkJCX07CiAKKwkJCWky Y0AwMjFhMDAwMCB7CisJCQkJI2FkZHJlc3MtY2VsbHMgPSA8MT47CisJCQkJI3NpemUtY2VsbHMg PSA8MD47CisJCQkJY29tcGF0aWJsZSA9ICJmc2wsaW14LWkyYyI7CisJCQkJcmVnID0gPDB4MDIx YTAwMDAgMHg0MDAwPjsKKwkJCQlpbnRlcnJ1cHQtcGFyZW50ID0gPCZnaWM+OyBpbnRlcnJ1cHRz ID0gPDY4PjsKKwkJCX07CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGkyY0AwMjFhNDAwMCB7 CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICNhZGRyZXNzLWNlbGxzID0gPDE+Owor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjc2l6ZS1jZWxscyA9IDwwPjsKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcGF0aWJsZSA9ICJmc2wsaW14LWkyYyI7Cisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZyA9IDwweDAyMWE0MDAwIDB4NDAwMD47 CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludGVycnVwdC1wYXJlbnQgPSA8Jmdp Yz47IGludGVycnVwdHMgPSA8Njk+OworICAgICAgICAgICAgICAgICAgICAgICAgfTsKKworICAg ICAgICAgICAgICAgICAgICAgICAgaTJjQDAyMWE4MDAwIHsKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgI2FkZHJlc3MtY2VsbHMgPSA8MT47CisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICNzaXplLWNlbGxzID0gPDA+OworICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBjb21wYXRpYmxlID0gImZzbCxpbXgtaTJjIjsKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgcmVnID0gPDB4MDIxYTgwMDAgMHg0MDAwPjsKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgaW50ZXJydXB0LXBhcmVudCA9IDwmZ2ljPjsgaW50ZXJydXB0cyA9IDw3MD47 CisgICAgICAgICAgICAgICAgICAgICAgICB9OworCiAJCQlvY290cDA6IG9jb3RwQDAyMWJjMDAw IHsKIAkJCQljb21wYXRpYmxlID0gImZzbCxpbXg2cS1vY290cCI7CiAJCQkJcmVnID0gPDB4MDIx YmMwMDAgMHg0MDAwPjsK --001a113487746a949d04fd7cbd86 Content-Type: text/plain; charset=US-ASCII; name="wandboard-quad.dts.diff" Content-Disposition: attachment; filename="wandboard-quad.dts.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hx9pqeu43 LS0tIDExL2hlYWQvc3lzL2Jvb3QvZmR0L2R0cy9hcm0vd2FuZGJvYXJkLXF1YWQuZHRzCTIwMTQt MDctMDUgMTk6NTE6MjQuNTM0MTg0MDYwIC0wNjAwCisrKyBGcmVlQlNESGVhZC9oZWFkL3N5cy9i b290L2ZkdC9kdHMvYXJtL3dhbmRib2FyZC1xdWFkLmR0cwkyMDE0LTA3LTA0IDE5OjU1OjQ4LjU2 OTEyOTIwMiAtMDYwMApAQCAtNzEsNiArNzEsOSBAQAogCQkJdXNkaGNAMDIxOTQwMDAJCXsgc3Rh dHVzID0gImRpc2FibGVkIjsgfTsKIAkJCXVzZGhjQDAyMTk4MDAwCQl7IHN0YXR1cyA9ICJva2F5 IjsgfTsKIAkJCXVzZGhjQDAyMTljMDAwCQl7IHN0YXR1cyA9ICJkaXNhYmxlZCI7IH07CisgICAg ICAgICAgICAgICAgICAgICAgICBpMmNAMDIxYTAwMDAgICAgICAgICAgICB7IHN0YXR1cyA9ICJv a2F5IjsgfTsJCQorICAgICAgICAgICAgICAgICAgICAgICAgaTJjQDAyMWE0MDAwICAgICAgICAg ICAgeyBzdGF0dXMgPSAib2theSI7IH07CisJCQlpMmNAMDIxYTgwMDAgICAgICAgICAgICB7IHN0 YXR1cyA9ICJva2F5IjsgfTsKIAkJfTsKIAl9OwogCg== --001a113487746a949d04fd7cbd86--