From owner-freebsd-arm@freebsd.org Sat Aug 11 16:46:23 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF1BB10738F3 for ; Sat, 11 Aug 2018 16:46:23 +0000 (UTC) (envelope-from alydiomc@yahoo.com) Received: from sonic301-8.consmr.mail.ne1.yahoo.com (sonic301-8.consmr.mail.ne1.yahoo.com [66.163.184.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 298DD88C76 for ; Sat, 11 Aug 2018 16:46:23 +0000 (UTC) (envelope-from alydiomc@yahoo.com) X-YMail-OSG: SJMHFgoVM1lEJNOzXvT4WEUZKXF9EYIxWCrpinDaM3EYJiqi3EMI79999euJ38x LIY4gY48UQV2h9Xn7DrjBjrc67FXP_uruo2NjzVPm6NNlElkGhQcDNqiyGA2e1l.TiDyhzhw6q19 m.SxuSOZxsPVdkK_VJxx8.evu2VqHoOmTdLLbXGMuXjQQNLkn_Uekg2qzTi6dLyBmpVzxNlkk5Ar F.JKYeb7nj90aPTwuE0X2KenV5.GTJR2VylwBzlOCj5sgbO3YjZ69Da3_RRotoSjtN0EmNXp5V15 NJ.vKe.hqlrCS1LzxCM5pu5tHWFTEx5H.8IM0NTXGcJeEcbV4A9LKjv33Ih3zW1Cx9JvxohnepV4 bAlWFJsRsOjfE590eahDA3Ok0jW2xL7UUvl4zLiP6m7eKzXw9JZvzVMFLfFIzrL7S4WJcDaFn8mn zwyxG4a3nt9dxniekw2I_YlJaPnarDPzTVEPGV5znaG_vCgVBfE6j2eMehJfDQB_NjWfSwtucZMr sWR31HMWOhuo7HnanPMuf5eRSM3omFOkTj5kXUm9jKk6X5X0pwgZ2oXSblM.reRvqnesLQ8N50yH 6AmAMVqINJDqn35AAf8EUamfQ1ojCSLKKDZ7eWcenu4rG0_VMdiAbxwtQ9ptxhGg1QmerxO03R5c 6nvWm4bSTpS5Pjg0vIGT1E8Nu4y6y5rkGdoOdQPzGCOnnyFfpsj7b9ZlMp.OtCQRZcANy2WGUNff v_zgaRSG5tcSxUHTvptldtkP4wLtC_EUQ0xvpWtJGBOsXSTdHPDpZ.deUvUypDsY1MeIlynifmvj iAG8abezXcwzpK44w.iC3LZoWXYL_1UXba5hog8fVziQ3BxS_YWhyD7oFUB_ZPkCES33_w_aowGr 5nP8Xr..S8CxGTGnVk_t_tw1841rY5i.aeSem29qTdeKwrvsVPKQj_YX.j3r0RLTW4ak6cF_x5TZ rm8VGUNnyVQPF4iyJGnOq4nRw0CGgVYOKLPI8Tt5pQ0BUggntrBaK8x7DOtTU0.iwMZ0- Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.ne1.yahoo.com with HTTP; Sat, 11 Aug 2018 16:46:22 +0000 Date: Sat, 11 Aug 2018 16:01:52 +0000 (UTC) From: lyd mc To: Daniel Braniss , "ian@freebsd.org" Cc: "freebsd-arm@freebsd.org" , eval@iptk.ru, Milan Obuch Message-ID: <289384556.5384363.1534003312078@mail.yahoo.com> In-Reply-To: <5E1DB0F5-EF98-46A8-8D33-11052834E35C@cs.huji.ac.il> References: <165877705.5351934.1533988165694.ref@mail.yahoo.com> <165877705.5351934.1533988165694@mail.yahoo.com> <1533999888.31375.6.camel@freebsd.org> <2122126425.5355832.1534000914963@mail.yahoo.com> <5E1DB0F5-EF98-46A8-8D33-11052834E35C@cs.huji.ac.il> Subject: Re: Nanopi Neo I2C MIME-Version: 1.0 X-Mailer: WebService/1.1.12206 YMailNorrin Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Aug 2018 16:46:24 -0000 =20 Thanks Danny and Ian! Regards,Alyd On Saturday, August 11, 2018, 11:50:37 PM GMT+8, Daniel Braniss wrote: =20 =20 =20 > On 11 Aug 2018, at 18:21, lyd mc via freebsd-arm wrote: >=20 > Hi Ian, > The iic bus seem to be working on linux image. I can detect the device at= 0x18. > root@nanopi-neo:~/prog/I2C #=C2=A0 i2c -f /dev/iic0 -s > Hardware may not support START/STOP scanning; trying less-reliable read m= ethod. > Scanning I2C devices on /dev/iic0: >=20 > some kdump output of above command:=C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 CAL= L=C2=A0 ioctl(0x3,I2CRSTCARD,0xbfbfec64) >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl 0 >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 CALL=C2=A0 ioctl(0x3,I2CSTART,0x= bfbfec64) >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl -1 errno 2 No su= ch file or directory >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 CALL=C2=A0 ioctl(0x3,I2CSTOP,0xb= fbfec64) >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl 0 > .=C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 CALL=C2=A0 ioctl(0x3,I2CRSTCARD= ,0xbfbfec64) >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl 0 >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 CALL=C2=A0 ioctl(0x3,I2CRDWR,0xb= fbfec50) >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl -1 errno 2 No su= ch file or directory >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 CALL=C2=A0 ioctl(0x3,I2CRSTCARD,= 0xbfbfec64) >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl 0 >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 CALL=C2=A0 ioctl(0x3,I2CRDWR,0xb= fbfec50) >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl -1 errno 2 No su= ch file or directory > Seems I2CRSTCARD and I2CSTOP are the only working ioctl on me. > I activated i2c0 using below dts code: >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 i2c@1c2ac00 { >=20 >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 compatible =3D "allwinner,sun6i-a31-i2c"; >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 reg =3D <0x1c2ac00 0x400>; >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 interrupts =3D <0x0 0x6 0x4>; >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 clocks =3D <0x1d 0x3b>; >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 resets =3D <0x1d 0x2e>; >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 pinctrl-names =3D "default"; >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 pinctrl-0 =3D <0x20>; >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 status =3D "okay"; >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 #address-cells =3D <0x1>; >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 #size-cells =3D <0x0>; >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 phandle =3D <0x41>; >=20 >=20 > Regards,Alyd >=C2=A0 =C2=A0 On Saturday, August 11, 2018, 11:04:54 PM GMT+8, Ian Lepore = wrote:=C2=A0=20 >=20 > On Sat, 2018-08-11 at 11:49 +0000, lyd mc via freebsd-arm wrote: >> Hi List, >> Can you help me make I2C work in this board? >> I can detect the controller but cannot access it through iic ioctl.=20 >>=20 >> root@nanopi-neo:~/prog/I2C # dmesg |grep iic >> iichb0: mem 0x1c2ac00- >> 0x1c2afff irq 34 on simplebus0 >> iicbus0: on iichb0 >> iichb1: mem 0x1c2b000- >> 0x1c2b3ff irq 35 on simplebus0 >> iicbus1: on iichb1 >> iichb2: mem 0x1c2b400- >> 0x1c2b7ff irq 36 on simplebus0 >> iicbus2: on iichb2 >> iic0: on iicbus0 >> iic1: on iicbus1 >> iic2: on iicbus2 >>=20 >> kdump output: >>=20 >>=C2=A0 1290 mcp=C2=A0 =C2=A0 =C2=A0 NAMI=C2=A0 "/dev/iic0" >>=C2=A0 1290 mcp=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 openat 3 >>=C2=A0 1290 mcp=C2=A0 =C2=A0 =C2=A0 CALL=C2=A0 ioctl(0x3,I2CRDWR,0xbfbfec= d4) >>=C2=A0 1290 mcp=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl -1 errno 2 No such fi= le or directory >>=20 >> This seems to work on my RPI. >>=20 >=20 > In this case, I wonder if the "errno 2" is not ENOENT, but > rather IIC_ENOACK which has not been translated to a proper errno > before returning. IIC_ENOACK is basically a timeout and can happen if > the slave address is wrong, or if the pinmux is wrong so that the bus > is electrically inactive. >=20 > Is the bus working in general? Do any devices show up on a scan with >=20 >=C2=A0 i2c -f /dev/iic0 -s >=20 > -- Ian >=20 the driver has timing issues (among others :-). I=E2=80=99m cc=E2=80=99ing = the guys I got a =E2=80=98working=E2=80=99=C2=A0 twsi stuff=20 to see if I can pass it on. danny =20 From owner-freebsd-arm@freebsd.org Sat Aug 11 16:58:19 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE1F11073D16 for ; Sat, 11 Aug 2018 16:58:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 644908912B for ; Sat, 11 Aug 2018 16:58:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x236.google.com with SMTP id w11-v6so10509441iob.2 for ; Sat, 11 Aug 2018 09:58:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1QLuUpyF4QExTPSy3xXbuSqQGA+XNY/7IAwNQFr2U7Q=; b=x8x8De5EBuVanWhAHR19gmaUXBSAV8Nlh7nLl/UqQTpf7TqriG6Z3KCsnWjKw46tpH kYLSfj+wxn01xP5b+zUksLJvkOA7VIaPXEFXGjxT4tLsVKxh8/vDQEiYcficlh5Q7NnO V0v5bc2PaDYUfevCWU6EnKb54mZmdZDnGg7sk+3kqAeWpvBS6QsemiFien45mXX7XI2V 0h9y+aRLb1Cgt7uX84dfXoc57RGH4+1bCVj7zm49BVec+4388p35g5dwWOJRM7Af9Vd1 WE1ZmiGZsqVOgKlZGzzq6fgd0Kj1ryN9YF052ESTrsBsEdCciEAR3uKZDfaIfvdffQRY Cg1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1QLuUpyF4QExTPSy3xXbuSqQGA+XNY/7IAwNQFr2U7Q=; b=csFOMs4+1TStKdwht/uZtJ0WUwHjegAU2k//KuCozkuBsNAIzPg+1NUMod+pfs6dpj KFY4f0RZsbw+1ekepDQtkD/N0eiZ6770up+g3ZaPPcvTjoOH37Az/jcw9p8MZICc31Tj 4W4Ql246VqG2BWqssMJrunXnLzb2u4W8T03m1FGAWYhWnsWchf3cnuj7gqqa02owzb3m eN/98s+LSYsesWkMndIGonNt31ug3xzQ7t2QVq/nHm5YEhaObvOWntof4ZzktwFdpOuJ 8ZpDSfT25jXV7RkDkHntYjbnQ4Jr5F9KKi0RdLgRn9ruIWGwFC5YrLL21PktvvXqUfPn I78Q== X-Gm-Message-State: AOUpUlFVnS2xIM9VuIZfUKTbadXdmH82l3aFhsIAmy6frx6nwpTPfEIF fr+KKcvuLDA2kcXNcF/9LA4nPm/oISO2qdBemdwOAXy0 X-Google-Smtp-Source: AA+uWPy5fKPPDrxrnGhvpVHRVRnRdUCQHWdKZCuwrKg9NPUvzV6EMZq13aMqBde/mz37U+ATvUc9CIqCue93R9ZQRmA= X-Received: by 2002:a6b:3902:: with SMTP id g2-v6mr9347418ioa.168.1534006698486; Sat, 11 Aug 2018 09:58:18 -0700 (PDT) MIME-Version: 1.0 References: <201808111507.w7BF7Fmi028163@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201808111507.w7BF7Fmi028163@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Sat, 11 Aug 2018 10:33:16 -0600 Message-ID: Subject: Re: Kill old, non-INTRNG code on ARM To: "Rodney W. Grimes" Cc: freebsd-arm@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Aug 2018 16:58:20 -0000 On Sat, Aug 11, 2018, 9:07 AM Rodney W. Grimes < freebsd-rwg@pdx.rh.cn85.dnsmgr.net> wrote: > > One last thing, even though we're in a slush, is to kill the pre-INTRNG > > code. > > > > It's required for armv6 and v7 for some time (only the Amlogic 8726 > boards > > remain broken there). And we're down to two families of chips which > support > > armv5: rt1310 and the Marvel gear. Both of them support INTRNG. > > > > I propose we eliminate the INTRNG option and unifdef the code to remove > the > > undefined case. > > > > Comments? > > Where is the deprication policy? > This is dead code elimination only... ;) Warner >