From owner-freebsd-mips@freebsd.org Fri Oct 20 11:27:35 2017 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96689E2F952 for ; Fri, 20 Oct 2017 11:27:35 +0000 (UTC) (envelope-from yamori813@yahoo.co.jp) Received: from nh604-vm2.bullet.mail.ssk.yahoo.co.jp (nh604-vm2.bullet.mail.ssk.yahoo.co.jp [182.22.90.59]) by mx1.freebsd.org (Postfix) with SMTP id 1674372B3A for ; Fri, 20 Oct 2017 11:27:34 +0000 (UTC) (envelope-from yamori813@yahoo.co.jp) Received: from [182.22.66.106] by nh604.bullet.mail.ssk.yahoo.co.jp with NNFMP; 20 Oct 2017 11:24:35 -0000 Received: from [182.22.91.130] by t604.bullet.mail.ssk.yahoo.co.jp with NNFMP; 20 Oct 2017 11:24:35 -0000 Received: from [127.0.0.1] by omp603.mail.ssk.yahoo.co.jp with NNFMP; 20 Oct 2017 11:24:35 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 869137.47574.bm@omp603.mail.ssk.yahoo.co.jp Received: (qmail 4787 invoked by uid 60001); 20 Oct 2017 11:24:35 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.jp; s=yj20110701; t=1508498675; bh=haxKiAMZZQ22YB4maZu4SbiIRVoTOLAX+IzcPxDBAfA=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:X-YMail-JAS:Date:From:Reply-To:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=mdeTmE3OcK0Px31hyJPgRdUdta8wbveDpNgwx5Tyrxz5zDWRx9kvXDmuQHhDtEhZoZsFS0C/qUlm22VbfgoVGSNUW/kaLEbt/63zcCLh3ZVwO4kLQipW10nxfdFgXBMMOrUUduvWpXfp8DpIi6s4eg+vcfds7LhJ+X48r3VtcN4= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=yj20110701; d=yahoo.co.jp; h=Message-ID:X-YMail-OSG:Received:X-Mailer:X-YMail-JAS:Date:From:Reply-To:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=HP+MxO6WmdIYmL50HadlSjjmizNTTqTDcY6/ELvZP/BBAnebD9i2SMcZOkLcgOBhpseoh4IdqeQ1q5DzqBAaqww94YtfEvxKS/9Gze5tWLDg8I5Z+F0RFCAv4jj/JzY3YIzO7zgQlxQvkqosGj1Ljrb3bcoi7fasa+6xrYbcZ0o=; Message-ID: <641147.96869.qm@web101704.mail.ssk.yahoo.co.jp> X-YMail-OSG: UMvhumIVM1kmKuKDNph1UZw1Dl83PpuDbCdYuzY8cNLvTh5fMtZ80G3hnzzqvGyUHoGwU7RIS9ocy_sesYr6hyyzQeLSTM3Jc0AhEJAr._eVRUJdLn4obhd1jbrDNgFnzM_5tCDKkHACr.TzPCAgR2F6GCPUrJCQlxpiTTSqPbkF255OtDfUVOciSD72XiXbCSwhqa7omFCuJR.I5wTJGLDLwZYomwnhmWogMvmSJMa2l_djj1L.Ue5uWQKsuZxQDzsgDc9_aXbB_LYl8UPNGFGn4RfBT1bDisTSH1ZPwKfe9T4JL6hN0OjrUGeO_u2vCyn8X7Gh4UVKswa7WbtN_KdRZWfxuSkaI_QGuXCb9Ky3KtGEAxrURTsCcIa6eJkaLgovxXR05cxPN.vAzXJu9zIeBmcINGHQKShaLiJ54L6705Bap0abMfQFqKVDauPFVwi2FMQzS2fpKvuiXqh0lP7ti.MIYtMqKBoUoa.wjxA5TybwjuY4YEnLHv4SojpuKvjgWNtfrR5VGai8N6QtCIU45EYa3aQgHlHQlpUAk.XKM9IybT8ujGhnRUDPQb8k2W8RpkM2upc4l1b4dO2vhM.7QdbniEzs1dWfUbWwvISr Received: from [61.23.25.155] by web101704.mail.ssk.yahoo.co.jp via HTTP; Fri, 20 Oct 2017 20:24:35 JST X-Mailer: YahooMailWebService/0.8.111_74 X-YMail-JAS: 9bEvqpEVM1mvcRSR3pjLYjRsZPj6bSFyzVOC5KEP3SR3OFakOtl_k_tTOS4W06FM3MDrVLWlt70bK639kWZkPC0dqfBs5VRF33scnoxNvDAKD9SMHUcD4aIoeS.rED0FsHGf Date: Fri, 20 Oct 2017 20:24:35 +0900 (JST) From: Mori Hiroki Reply-To: Mori Hiroki Subject: about iicdev_writeto() on ralink soc To: "ian@freebsd.org" Cc: "freebsd-mips@freebsd.org" MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Oct 2017 11:27:35 -0000 Hi=0A=0AI make mips mediatek iic driver. Mediatek(Ralink) soc(RT2880=A0and= =A0=0ART3050) is not support=A0nostop option at I2C device. This soc i2c=0A= device is set transfer=A0length and automatically=A0send stop. And=0AAlways= send device address at first byte.=0A=0Ayour added=A0iicdev_writeto() not = work in these soc i2c device.=0A=0A=0A=0Ahttps://svnweb.freebsd.org/base?vi= ew=3Drevision&revision=3D321583=0A=0A=0ACould you please change single tran= sfer in=A0iicdev_writeto() at iiconf.c.=0A=0ARegards=0A=0AHiroki Mori From owner-freebsd-mips@freebsd.org Fri Oct 20 15:00:35 2017 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBBBEE37D6E for ; Fri, 20 Oct 2017 15:00:35 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE46B7E30B for ; Fri, 20 Oct 2017 15:00:35 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 4e6bf308-b5a7-11e7-b50b-53dc5ecda239 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 4e6bf308-b5a7-11e7-b50b-53dc5ecda239; Fri, 20 Oct 2017 14:59:44 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v9KF0Rh8011250; Fri, 20 Oct 2017 09:00:27 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1508511627.1383.48.camel@freebsd.org> Subject: Re: about iicdev_writeto() on ralink soc From: Ian Lepore To: Mori Hiroki Cc: "freebsd-mips@freebsd.org" Date: Fri, 20 Oct 2017 09:00:27 -0600 In-Reply-To: <641147.96869.qm@web101704.mail.ssk.yahoo.co.jp> References: <641147.96869.qm@web101704.mail.ssk.yahoo.co.jp> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Oct 2017 15:00:36 -0000 On Fri, 2017-10-20 at 20:24 +0900, Mori Hiroki wrote: > Hi > > I make mips mediatek iic driver. Mediatek(Ralink) soc(RT2880 and  > RT3050) is not support nostop option at I2C device. This soc i2c > device is set transfer length and automatically send stop. And > Always send device address at first byte. > > your added iicdev_writeto() not work in these soc i2c device. > > > > https://svnweb.freebsd.org/base?view=revision&revision=321583 > > > Could you please change single transfer in iicdev_writeto() at > iiconf.c. > > Regards > > Hiroki Mori iicdev_writeto() does the correct sequence of operations. I think if you set the ADDRDIS bit in the device control register and ignore the NOSTOP flag in the messages, it will work for most slave devices.  Some slave devices require a repeat-start to work correctly, and those will never work right on a controller like this. -- Ian From owner-freebsd-mips@freebsd.org Fri Oct 20 23:06:16 2017 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7C6BE42564 for ; Fri, 20 Oct 2017 23:06:16 +0000 (UTC) (envelope-from yamori813@yahoo.co.jp) Received: from nh602-vm14.bullet.mail.ssk.yahoo.co.jp (nh602-vm14.bullet.mail.ssk.yahoo.co.jp [182.22.90.39]) by mx1.freebsd.org (Postfix) with SMTP id 71D1869817 for ; Fri, 20 Oct 2017 23:06:16 +0000 (UTC) (envelope-from yamori813@yahoo.co.jp) Received: from [182.22.66.103] by nh602.bullet.mail.ssk.yahoo.co.jp with NNFMP; 20 Oct 2017 23:04:22 -0000 Received: from [182.22.91.133] by t601.bullet.mail.ssk.yahoo.co.jp with NNFMP; 20 Oct 2017 23:04:22 -0000 Received: from [127.0.0.1] by omp606.mail.ssk.yahoo.co.jp with NNFMP; 20 Oct 2017 23:04:22 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 600578.53194.bm@omp606.mail.ssk.yahoo.co.jp Received: (qmail 35711 invoked by uid 60001); 20 Oct 2017 23:04:22 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.jp; s=yj20110701; t=1508540662; bh=MKMy+BW6G3u+PhKvdILWOcD2PStfbJZr9zNxb7DC3j4=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:X-YMail-JAS:References:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=rUaGRzxVZG/Taf+Q3tGuZMfjWNUyt9pdWA7FV1dNbIH8q6s+/kbdrUJjzxS6RM+5sh3E+Tmnjz9DeFFFJRsXo2H6kBVsmFIlNupcYLhRMExMwWX+Bv2jfJ/u2vkO/3uneaW49lGHKHTfiOoit7Xrh6b1oVM0TKBYtWOS9EKHgz4= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=yj20110701; d=yahoo.co.jp; h=Message-ID:X-YMail-OSG:Received:X-Mailer:X-YMail-JAS:References:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=ZOtfVMs8tyKPHAHlBLEViXQpI3xdk5Qw5uNolr+cXGj4A2IQn764ELcqhd7XwsH0GRaPtiOPyXy/YpmVWwiuxXcHL0RVfRjICs8cmQgRuwr7kjnPOVxHtal52nVOari6qr5WqlYcZ0N9arutDL+kaTVFJX1CKsZfofgKCTxELTs=; Message-ID: <405153.18836.qm@web101719.mail.ssk.yahoo.co.jp> X-YMail-OSG: 0wofEQYVM1l0Koz9H9ayBzr378yc9Ij2uKLP4xB6VWrGD_Q_x_n72EppAQUEfXbxbdCB4eyczbJCz9wLnbdJcHm.qYH2aixPLCLPuMS7Nv2N4yqf_FEoXVQ8GpUYTcxl2z41kn40PWX7YvMv5E.BAIv8TcLNgyZoCpyZRueBEbAGi9fLTvnhc0KCkC8RFtTPUZxms2bzyv30MpNsXZu.z4FP05klVaEOjYUcsvcMQg0KgFZAIyuGQ8AfaPpw2pMNoKCzXSvtPXBnwmkeCOwLSpjaiQlCjJSveLoWAEhFc5v.wToWhMcvtbk_xve1V7mCGdVxVx_f0uA.EqbMpEuTS1NKZMOmaQXOiqGK4iTpTKZnWifuTf_Nj31OyXsAymfextU.LFBx2_hWu2kS2aQHE7FCjMd9te7vhgk8bcBQz7dx0AiTCvID3gIomijbjS36PZu6sXe7Y95NKV5LqLSU_48FN2SA9A8Xs7uac24ZANZbR09fLW3udYQatCgFpj4Cv9e10okOm8kKQSmlIQh5i631J4vUF7pt47n_yhta3lFfKmJLHOfZg5CFDgBRQPtjnOypNxpmAL.3bV5uaXOrfR7yLcvlZoB_pcq82WoMOF9tHw-- Received: from [61.23.25.155] by web101719.mail.ssk.yahoo.co.jp via HTTP; Sat, 21 Oct 2017 08:04:21 JST X-Mailer: YahooMailWebService/0.8.111_74 X-YMail-JAS: uUd.l9MVM1lU5WyyD..vdSDue7OnGA5_2BMUyuTHEvgk7.P9NwTUrCOmnawoIb87ODjxM3jyOTz8if18f098WoS610ru7AKnCeTsOBIZnwGCgFg_rRjZbXVLIDc3g.ZFu.ZM References: <641147.96869.qm@web101704.mail.ssk.yahoo.co.jp> <1508511627.1383.48.camel@freebsd.org> Date: Sat, 21 Oct 2017 08:04:21 +0900 (JST) From: Mori Hiroki Reply-To: Mori Hiroki Subject: Re: about iicdev_writeto() on ralink soc To: Ian Lepore Cc: "freebsd-mips@freebsd.org" In-Reply-To: <1508511627.1383.48.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Oct 2017 23:06:17 -0000 Hi=0A=0A=0A----- Original Message -----=0A> From: Ian Lepore =0A> To: Mori Hiroki =0A> Cc: "freebsd-mips@freeb= sd.org" =0A> Date: 2017/10/21, Sat 00:00=0A> Subj= ect: Re: about iicdev_writeto() on ralink soc=0A> =0A> On Fri, 2017-10-20 a= t 20:24 +0900, Mori Hiroki wrote:=0A>> Hi=0A>> =0A>> I make mips mediatek= iic driver. Mediatek(Ralink) soc(RT2880=A0and=A0=0A>> RT3050) is not supp= ort=A0nostop option at I2C device. This soc i2c=0A>> device is set transfe= r=A0length and automatically=A0send stop. And=0A>> Always send device addr= ess at first byte.=0A>> =0A>> your added=A0iicdev_writeto() not work in th= ese soc i2c device.=0A>> =0A>> =0A>> =0A>> https://svnweb.freebsd.org/base= ?view=3Drevision&revision=3D321583=0A>> =0A>> =0A>> Could you please chang= e single transfer in=A0iicdev_writeto() at=0A>> iiconf.c.=0A>> =0A>> Rega= rds=0A>> =0A>> Hiroki Mori=0A>=A0=0A=0AThanks check RT datasheet.=0A=0A> i= icdev_writeto() does the correct sequence of operations.=0A> =0A> I think i= f you set the ADDRDIS bit in the device control register and=0A> ignore the= NOSTOP flag in the messages, it will work for most slave=0A> devices. =A0S= ome slave devices require a repeat-start to work correctly,=0A> and those w= ill never work right on a controller like this.=0A> =0A> -- Ian=0A> =0A=0AN= o.=0A=0ARalink Datasheet is very confuse. ADDRDIR is register address disab= le.=0ADEVADDIS is device address disable.=A0=0A=0AIf not set=A0DEVADDIS and= =A0ADDRDIR then=0A=0A=A0=A0 ...=0A= =0AIf set ADDRDIR then=A0=0A=0A ...=0A=0AIf set DEVA= DDIS then ignore ADDRDIR=0A=0A ...=0A=0Aalways two= more byte send this soc.=0A=0ADriver review is this.=0A=0Ahttps://reviews.= freebsd.org/D12736=0A=0A=0AThanks=0A=0AHiroki Mori From owner-freebsd-mips@freebsd.org Fri Oct 20 23:47:18 2017 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9EB1E42CD2 for ; Fri, 20 Oct 2017 23:47:18 +0000 (UTC) (envelope-from yamori813@yahoo.co.jp) Received: from nh501-vm4.bullet.mail.kks.yahoo.co.jp (nh501-vm4.bullet.mail.kks.yahoo.co.jp [183.79.56.134]) by mx1.freebsd.org (Postfix) with SMTP id 8467A6A468 for ; Fri, 20 Oct 2017 23:47:18 +0000 (UTC) (envelope-from yamori813@yahoo.co.jp) Received: from [183.79.100.139] by nh501.bullet.mail.kks.yahoo.co.jp with NNFMP; 20 Oct 2017 23:44:08 -0000 Received: from [183.79.101.63] by t502.bullet.mail.kks.yahoo.co.jp with NNFMP; 20 Oct 2017 23:44:08 -0000 Received: from [127.0.0.1] by omp507.mail.kks.yahoo.co.jp with NNFMP; 20 Oct 2017 23:44:08 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 465239.62174.bm@omp507.mail.kks.yahoo.co.jp Received: (qmail 95287 invoked by uid 60001); 20 Oct 2017 23:44:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.jp; s=yj20110701; t=1508543048; bh=/k4x8PPvkkFDorGhXhS6mxyrgN71H72+lCFUD9cht4M=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:X-YMail-JAS:References:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=pEUIHgm9KufqRJPF3q5/z50G56noCcCQpolw8Pb+AbChXrlE+Jrp3zyw17dfvBwz6V1Orzep1rkSnF1MihE4S0QbqHhheMp5gxAenZD3f4qFoLEnPeTcwLy2q9jAWi9qtbFCDfJMuM4U+NERJK+U3f/AZPehZlZojkpA8MNs5Ao= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=yj20110701; d=yahoo.co.jp; h=Message-ID:X-YMail-OSG:Received:X-Mailer:X-YMail-JAS:References:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=WYS4N6qEupMazwTTPvkIEA4gt0QmOLQ5wx6SbHgNoIoibjrPF0RcDz0IBOKBhV7Zs1EQ8JonlNKbSzMv89unCDpGoizopSqnPfi87zC+Hhm47kP303+ZOlVWMjKvUThrqZIK6rhvzT7BLTxYM8hcjx+5CBOExLGhapuuh1RL/YY=; Message-ID: <104081.95158.qm@web101711.mail.ssk.yahoo.co.jp> X-YMail-OSG: OrUPL.8VM1nJw.30P_Baz0lRd6mgi4RThMas8jGuxijXz07vradZFX9SBNt8tacMBpcNKVGm8IHPCBLlMr4p5dmZMjKkLfed44hWWXiUNb5BX5dlgEhc8mKNHKLsaSuIudtXx6dUfa_YVma8C8d5ZrkvFFy0uhautmUZq.jMaZmmBGce7gM_6j362ymGyRj_PloCXuP5G_jP4LKYVNX_MD1sFPXq.lbAgHeMLReRkitn532UxCrrzgYXFM0MkntVkrDco7fJ_3nALqwVbjTi20sPm6.RwHj7rxDt8IvWEr.SKpBDMZe4YAAdE5fXOahptzIuppTCVKHJQOqU16gCRHinavYd8bVkCP76iUwdV9PVSAAnH6.d1iKACXT1o9B_57nbjEd85jBCBoztz5bcyW464_3ROwHNuw7g6GGE3GCvO5ZvpcVamqts6hikb7wpfjstDPo.10bdc6sPhroXH7gq5urXsF7BNtj2SMEq3gBluCUHaUs_0Pc3bd6G63lZ6nk9CaKA0_ufXXP3F3LbGGnxKxfHbQ4jR.t5GNX8vL9r.h2xFzvZbryNSopdr7Yma7jzT_qCW0CHqc1z_l_RlPoCrUBjtPyWPX0O4Adj Received: from [61.23.25.155] by web101711.mail.ssk.yahoo.co.jp via HTTP; Sat, 21 Oct 2017 08:44:07 JST X-Mailer: YahooMailWebService/0.8.111_74 X-YMail-JAS: 1JIzb4IVM1kGzPnJpMOWIzgX1ZD1EnET0NLJp7Y2rIDAGiYkGfPAfWU19r7Fe477mWY59XUkH.UgqzZ1T4h9rx484_TYFr7H4JpzD8vghITM3vtyIyMQHKMnGdDVDEXYWQY4 References: <641147.96869.qm@web101704.mail.ssk.yahoo.co.jp> <1508511627.1383.48.camel@freebsd.org> <405153.18836.qm@web101719.mail.ssk.yahoo.co.jp> Date: Sat, 21 Oct 2017 08:44:07 +0900 (JST) From: Mori Hiroki Reply-To: Mori Hiroki Subject: Re: about iicdev_writeto() on ralink soc To: Ian Lepore Cc: "freebsd-mips@freebsd.org" In-Reply-To: <405153.18836.qm@web101719.mail.ssk.yahoo.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Oct 2017 23:47:19 -0000 Hi=0A=0AFYI=0A=0AThis is RT2880 i2c signal by my driver code.=0A=0Ahttps://= flic.kr/p/ZC3HQZ=0A=0A=0A----- Original Message -----=0A> From: Mori Hiroki= =0A> To: Ian Lepore =0A> Cc: "free= bsd-mips@freebsd.org" =0A> Date: 2017/10/21, Sat = 08:04=0A> Subject: Re: about iicdev_writeto() on ralink soc=0A> =0A> Hi=0A>= =0A> =0A> ----- Original Message -----=0A>> From: Ian Lepore =0A>> To: Mori Hiroki =0A>> Cc: "freebsd-mips= @freebsd.org" =0A>> Date: 2017/10/21, Sat 00:00= =0A>> Subject: Re: about iicdev_writeto() on ralink soc=0A>> =0A>> On Fri= , 2017-10-20 at 20:24 +0900, Mori Hiroki wrote:=0A>>> =A0 Hi=0A>>> =0A>>> = =A0 I make mips mediatek iic driver. Mediatek(Ralink) soc(RT2880=A0and=A0= =0A>>> =A0 RT3050) is not support=A0nostop option at I2C device. This soc i= 2c=0A>>> =A0 device is set transfer=A0length and automatically=A0send stop.= And=0A>>> =A0 Always send device address at first byte.=0A>>> =0A>>> =A0 y= our added=A0iicdev_writeto() not work in these soc i2c device.=0A>>> =0A>>>= =0A>>> =0A>>> =A0 https://svnweb.freebsd.org/base?view=3Drevision&revision= =3D321583=0A>>> =0A>>> =0A>>> =A0 Could you please change single transfer i= n=A0iicdev_writeto() at=0A>>> =A0 iiconf.c.=0A>>> =0A>>> =A0 Regards=0A>>> = =0A>>> =A0 Hiroki Mori=0A>> =A0=0A> =0A> Thanks check RT datasheet.=0A> =0A= >> iicdev_writeto() does the correct sequence of operations.=0A>> =0A>> I= think if you set the ADDRDIS bit in the device control register and=0A>> = ignore the NOSTOP flag in the messages, it will work for most slave=0A>> d= evices. =A0Some slave devices require a repeat-start to work correctly,=0A>= > and those will never work right on a controller like this.=0A>> =0A>> -= - Ian=0A>> =0A> =0A> No.=0A> =0A> Ralink Datasheet is very confuse. ADDRDIR= is register address disable.=0A> DEVADDIS is device address disable.=A0=0A= > =0A> If not set=A0DEVADDIS and=A0ADDRDIR then=0A> =0A> = =A0=A0 ...=0A> =0A> If set ADDRDIR then=A0=0A> =0A>= ...=0A> =0A> If set DEVADDIS then ignore ADDRDIR= =0A> =0A> ...=0A> =0A> always two more byte send = this soc.=0A> =0A> Driver review is this.=0A> =0A> https://reviews.freebsd.= org/D12736=0A> =0A> =0A> Thanks=0A> =0A> Hiroki Mori=0A> __________________= _____________________________=0A> freebsd-mips@freebsd.org mailing list=0A>= https://lists.freebsd.org/mailman/listinfo/freebsd-mips=0A> To unsubscribe= , send any mail to =0A> "freebsd-mips-unsubscribe@freebsd.org"=0A>