From owner-freebsd-current@freebsd.org Fri Nov 16 22:29:46 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 22AF711065C5 for ; Fri, 16 Nov 2018 22:29:46 +0000 (UTC) (envelope-from johalun0@gmail.com) Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (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 42DC56C3A2; Fri, 16 Nov 2018 22:29:44 +0000 (UTC) (envelope-from johalun0@gmail.com) Received: by mail-wr1-x434.google.com with SMTP id e3-v6so26380171wrs.5; Fri, 16 Nov 2018 14:29:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZQcFWSYlE+1D9BWVyAXbxw+pwVnr57sgCu5ZkyvbByc=; b=SUOcXNC+XNtKb675eH5btVPMn8dPVFkKEg6b71S+aNOn7xnnFnUXdBARYKBGhqp4TA R8tPcSbASuaNlgX3DK2eC7XbcIUr+mz+0CP2av5HDNlWDh6hxuG16SkBvxhAP6nj4Ce6 ZO9uZIU3IRVIgCVKGjyP9zWuoz3pGG4yiU8GhN5b4Zx+ZiX7uNiav0/NGPpaLob/By1d MwyJf+vwsQkd//zP4kzF3iLCn78eKeVJOHXokGSIiii5wqxaCbb3p06XQBwakBgbLY0W PFwvyd7Xspys26PWRmfdcAgzIrUHfnE/H9sdPj28kIgnuEZCFXMo8mQlM5IW0n3HlmVp 3Peg== 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=ZQcFWSYlE+1D9BWVyAXbxw+pwVnr57sgCu5ZkyvbByc=; b=baqa0mn7eGZSwFU5iqxeSOyLevxuL8GHnqrUtMbOVCR5lNY8juJcQg1/nB+rf4NDEn iKt76sHwvaXnf9Lq542feoNcUUzvMdQCDhXVVo16b0zgxMAUD4Cfq+0rpXU7ElJ9MJZS ok49zLRPasdrND20Mm/d6ZU+um81GjYWgk2QSDwFMkp+7S62rDtm+PIt8zfCxK2IZVXn +5CigKVOQqBXD4EUkrgMbqyb9BRjs+D5PqZznswbj8RJBqxRekmoHmlSZCQn0c69Cndq lOEWXU+M+qEF+LjB/krTioUVX4OGwqlXtzaNfkJ8VfMmAWkmC64O2Cjc5zQ8lV+EXkx8 J6fA== X-Gm-Message-State: AGRZ1gKRcOf2XIvKsrpEakkce6aXEFe/tS7VfTg9CnlYOoU/qJufOt6j 5pihQyG8wqyFk9hlAfCXQDCt1SU4ezNKCgm64uoe96Zk X-Google-Smtp-Source: AJdET5fpPH+N9hVpJQ/fOnH6DaVcUJ51tYviMs4Xub6erRQbJ34hBp2YWLz4ObpfCJQi4lIBvCvzzozlQ6X3vl62Chw= X-Received: by 2002:adf:e84e:: with SMTP id d14-v6mr10967801wrn.51.1542407382078; Fri, 16 Nov 2018 14:29:42 -0800 (PST) MIME-Version: 1.0 References: <7b4b26b3-8e2a-daa3-82f4-eac83c71ade5@FreeBSD.org> In-Reply-To: <7b4b26b3-8e2a-daa3-82f4-eac83c71ade5@FreeBSD.org> From: Johannes Lundberg Date: Fri, 16 Nov 2018 22:29:05 +0000 Message-ID: Subject: Re: axp288 on Intel HW To: jhb@freebsd.org Cc: freebsd-current , manu@freebsd.org X-Rspamd-Queue-Id: 42DC56C3A2 X-Spamd-Result: default: False [-3.61 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_DKIM_ALLOW(-0.20)[gmail.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; URI_COUNT_ODD(1.00)[7]; IP_SCORE(-0.77)[ipnet: 2a00:1450::/32(-1.91), asn: 15169(-1.82), country: US(-0.10)]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[4.3.4.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.83)[-0.832,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Fri, 16 Nov 2018 22:29:46 -0000 On Fri, Nov 16, 2018 at 5:11 PM John Baldwin wrote: > On 11/16/18 12:51 AM, 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? > > > > 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?) > > > > Datasheet for the pmic can be found here > > http://download.bbs.ickey.cn/201707/cfe88ee7ef01eed7a4586ce340165da0.pdf > > Have you looked to see why ACPI isn't reporting battery status? Maybe we > need to be invoking some specific method like DSM or OSC before your > battery > devices work? Maybe your battery devices don't have a _STA method and you > need the change in > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227191? > On Linux the axp288 driver is needed to make this happen so I haven't considered any other options. https://www.normalesup.org/~george/comp/linux_lenovo_miix3/#s_7_9 > -- > John Baldwin > > > >