From owner-freebsd-current@freebsd.org Thu Nov 22 05:17:52 2018 Return-Path: Delivered-To: freebsd-current@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 186C51137B55 for ; Thu, 22 Nov 2018 05:17:52 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id EAF818AAC5; Thu, 22 Nov 2018 05:17:50 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id d0b5399e; Thu, 22 Nov 2018 06:17:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=dvMxDOncAE8SHDH8oQLFyd93Sn8=; b=am5qWbXGX4Kdboq3rO2Smm96nPxR kYOcqhwGVGzNm6odfKqoFLK0O7TqtZcDSZb7nsJ2oaoda56fZgTi8xJH5eoMG98Z JcNS8mCxSzxr95C5hWKvLre8HcDz3BfIzsO1oHGADawjRcp3XZJNNvIp8yMeXN3L W3Pk/vPmkt5bohM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=MPJa4i6xaA7SyThS7zWbL/rUE9kMMvWmedU0HY89HtDt2tXdGqGc6J25 iXrSb1EBW5CVRBgyOjFjHfiE29R8NVtjb5gx/jdl1nFoEcvhw3Vh8aaZNmipx9PK Gc/V/DnafaqPNsAlnqx2Ldge2pzhWyFYCWjlSP9y3vnnhY+j1ME= Received: from knuckles.blih.net (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 5647da5e TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Thu, 22 Nov 2018 06:17:45 +0100 (CET) Date: Thu, 22 Nov 2018 06:17:45 +0100 From: Emmanuel Vadot To: Johannes Lundberg Cc: freebsd-current , manu@freebsd.org Subject: Re: axp288 on Intel HW Message-Id: <20181122061745.98faaa8b790e97c7da019588@bidouilliste.com> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: EAF818AAC5 X-Spamd-Result: default: False [-0.82 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com]; NEURAL_HAM_MEDIUM(-0.45)[-0.446,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:212.83.177.182/32]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[bidouilliste.com]; NEURAL_HAM_LONG(-0.65)[-0.652,0]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.07)[0.073,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bidouilliste.com:+]; MX_GOOD(-0.01)[cached: mx-backup.blih.net]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.12)[ipnet: 212.83.160.0/19(0.58), asn: 12876(0.04), country: FR(-0.02)]; ASN(0.00)[asn:12876, ipnet:212.83.160.0/19, country:FR]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 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: Thu, 22 Nov 2018 05:17:52 -0000 Hi, Allwinner PMIC on X86, interesting :) On Fri, 16 Nov 2018 08:51:31 +0000 Johannes Lundberg wrote: > Hi > > I have a Lenovo Ideapad Miix 310 that has a Intel CherryTrail CPU and it > runs FreeBSD quite nicely (with accelerated graphics). What I'm missing is > battery life status.. > > I can get this information using smb (for some reason i2c just returns > error sending start condition) > smbmsg -f /dev/smb6 -s 0x68 -c 0xB9 -i 1 -F %d > > In emergency this works but it would be nice to have a kernel driver for > it. > > I found the axp2xx driver for Allwinner in the tree. Would it be possible > to share this with amd64 with not too much effort? The first step would be to add acpi attach functions (no idea how this works), then compare the registers with the pmics supported by the axp2xx driver to check what regulators are present and controllable (if any) and also checking the registers for talking to the battery controller part. I don't see why it wouldn't work but I haven't checked details on how supported chips differs with this one. > > If not, all I'm really interested in is battery status so I might just hack > together a simple driver for that report values to hw.acpi.battery (because > I don't think there is a sysctl for battery info that aggregates different > sources?) We don't have a generic battery/power supply framework yes. > > Datasheet for the pmic can be found here > http://download.bbs.ickey.cn/201707/cfe88ee7ef01eed7a4586ce340165da0.pdf > > Cheers > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" -- Emmanuel Vadot