From owner-freebsd-current@freebsd.org Mon Oct 3 16:14:42 2016 Return-Path: Delivered-To: freebsd-current@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 47B53AF473F for ; Mon, 3 Oct 2016 16:14:42 +0000 (UTC) (envelope-from grembo@freebsd.org) Received: from mail.grem.de (outcast.grem.de [213.239.217.27]) by mx1.freebsd.org (Postfix) with SMTP id 86F77A85 for ; Mon, 3 Oct 2016 16:14:40 +0000 (UTC) (envelope-from grembo@freebsd.org) Received: (qmail 36129 invoked by uid 89); 3 Oct 2016 16:07:52 -0000 Received: from unknown (HELO bsd64.grem.de) (mg@grem.de@185.17.205.219) by mail.grem.de with ESMTPA; 3 Oct 2016 16:07:52 -0000 Date: Mon, 3 Oct 2016 18:07:50 +0200 From: Michael Gmelin To: Andriy Gapon Cc: FreeBSD Current , freebsd-mobile@FreeBSD.org Subject: Re: [request for testing] isl, cyapa on chromebooks Message-ID: <20161003180750.744dae0a@bsd64.grem.de> In-Reply-To: <1e66fc64-cdff-e94b-4b0c-55cb05e2b5a1@FreeBSD.org> References: <1e66fc64-cdff-e94b-4b0c-55cb05e2b5a1@FreeBSD.org> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; amd64-portbld-freebsd10.2) X-Face: $wrgCtfdVw_H9WAY?S&9+/F"!41z'L$uo*WzT8miX?kZ~W~Lr5W7v?j0Sde\mwB&/ypo^}> +a'4xMc^^KroE~+v^&^#[B">soBo1y6(TW6#UZiC]o>C6`ej+i Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEWJBwe5BQDl LASZU0/LTEWEfHbyj0Txi32+sKrp1Mv944X8/fm1rS+cAAAACXBIWXMAAAsTAAAL EwEAmpwYAAAAB3RJTUUH3wESCxwC7OBhbgAAACFpVFh0Q29tbWVudAAAAAAAQ3Jl YXRlZCB3aXRoIFRoZSBHSU1QbbCXAAAAAghJREFUOMu11DFvEzEUAGCfEhBVFzuq AKkLd0O6VrIQsLXVSZXoWE5N1K3DobBBA9fQpRWc8OkWouaIjedWKiyREOKs+3PY fvalCNjgLVHeF7/3bMtBzV8C/VsQ8tecEgCcDgrzjekwKZ7TwsJZd/ywEKwwP+ZM 8P3drTsAwWn2mpWuDDuYiK1bFs6De0KUUFw0tWxm+D4AIhuuvZqtyWYeO7jQ4Aea 7jUqI+ixhQoHex4WshEvSXdood7stlv4oSuFOC4tqGcr0NjEqXgV4mMJO38nld4+ xKNxRDon7khyKVqY7YR4d+Cg0OMrkWXZOM7YDkEfKiilCn1qYv4mighZiynuHHOA Wq9QJq+BIES7lMFUtcikMnkDGHUoncA+uHgrP0ctIEqfwLHzeSo+eUA66AqzwN6n 2ZHJhw6Qh/PoyC/QENyEyC/AyNjq74Bs+3UH0xYwzDUC4B97HgLocg1QLYgDDO1v f3UX9Y307Ew4AHh67YAFFsxEpkXwpXY3eIgMhAAE3R19L919nNnuD2wlPcDE3UeT L2ytEICQib9BXgS2fU8PrD82ToYO1OEmMSnYTjSqSv9wdC0tPYC+rQRQD9ESnldF CyqfmiYW+tlALt8gH2xrMdC/youbjzPXEun+/ReXsMCDyve3dZc09fn2Oas8oXGc Jj6/fOeK5UmSMPmf/jL+GD8BEj0k/Fn6IO4AAAAASUVORK5CYII= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 16:14:42 -0000 On Mon, 3 Oct 2016 14:05:52 +0300 Andriy Gapon wrote: > If you have a Chromebook where you are currently able to use isl and > cyapa drivers, could you please test the following code change? > https://people.freebsd.org/~avg/ig4-i2c.diff > > The change moves the drivers from the SMBus to the I2C bus and as > such some configuration changes are required. > Namely, you will now need iicbus driver either in the kernel > configuration or as a module. For now the smbus driver is also > required. You also need to add some entries to /boot/device.hints: > hint.isl.0.at="iicbus0" > hint.isl.0.addr=0x88 > hint.isl.1.at="iicbus1" > hint.isl.1.addr=0x88 > hint.cyapa.0.at="iicbus0" > hint.cyapa.0.addr=0xce > hint.cyapa.1.at="iicbus1" > hint.cyapa.1.addr=0xce > > The hints are required because auto-probing (either via the bus > enumeration or self-identification) is disabled for now for safety > reason. Also, as I understand, the Intel chipset used in the > supported Chromebooks provides to i2c buses (possibly in addition in > an smbus) and I am not sure on which of the i2c buses the devices > reside. > > The changes are build tested only, because I do not have access to > the hardware. So, kernel panics, etc are not unexpected. > > Please let me know if drivers attach at all and if there are any > issues with them. A verbose dmesg would be of great help. That could > be obtained by booting in a verbose mode if the drivers are > auto-loaded or by setting debug.bootverbose=1 before loading the > drivers if that's done manually. > > Please also note that ig4 driver is changed, so it too has to be > rebuilt if you are going to build individual modules rather than do a > kernel + modules build. > > I will appreciate your testing and feedback. > Thank you! Thanks for working on this. I have currently access to two c720 Chromebooks, one with a cyapa touchpad, the other with a (yet) unsupported replacement I'm planning to work on. I upgraded the latter the r306641, applied your patches (cleanly) and ran "make kernel" (GENERIC kernel), added the entries to device.hints and rebooted. Unfortunately ig4 won't load: # kldload ig4 link_elf_obj: symbol iicbus_transfer_desc undefined linker_load_file: Unsupported file type I also noticed that isl cannot be built from the module source directory: # cd /usr/src/sys/modules/i2c/isl # make ... /usr/src/sys/sys/vnode.h:571:10: fatal error: 'vnode_if.h' file not found #include "vnode_if.h" ^ 1 error generated *** Error code 1 This can be easily fixed by removing "#include " from isl.c (line 56). Best, Michael -- Michael Gmelin