From owner-freebsd-arm@freebsd.org Fri Aug 14 16:23:37 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A397C3C351A for ; Fri, 14 Aug 2020 16:23:37 +0000 (UTC) (envelope-from soren.schmidt@gmail.com) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4BSpf130LTz3crR for ; Fri, 14 Aug 2020 16:23:37 +0000 (UTC) (envelope-from soren.schmidt@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id 64E093C3519; Fri, 14 Aug 2020 16:23:37 +0000 (UTC) Delivered-To: arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 649FA3C3690 for ; Fri, 14 Aug 2020 16:23:37 +0000 (UTC) (envelope-from soren.schmidt@gmail.com) Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BSpf04LmXz3csp for ; Fri, 14 Aug 2020 16:23:36 +0000 (UTC) (envelope-from soren.schmidt@gmail.com) Received: by mail-wr1-x42b.google.com with SMTP id f12so8826392wru.13 for ; Fri, 14 Aug 2020 09:23:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:message-id:date:cc:to; bh=D1LJv/ZP1Q2z8UZwGzhfk8mY9punr4BntfHN4vjj/7E=; b=OZ41v5Y29O5YS1pxuWSO/J4D1Z0TTGHm4a04D7zg46le8blTKxE5aPK61VkVWdD2wL DvZN6siFkoNfdGiPK9Ocv2O2nisJ95b4EaofIHzCNw/qQ5lecPDAAwOjkaqkJKZncG3d v4owEDFlzceqQbzD+PMneRFgn47X6r6ymJnLZjCboxp8U3N+42QA1rJAPeNyztsSUgSg Oitt8IaosAM0bnUcjyT6/R1Urraz+GABbGH5pTRtRahD4pJ/C6s7KnG15ZX18KEKCmj2 aKUBvSLkMdh0haGX02jyTyZorDD76L1yv44hyLQjgM49cqCR51IozZ2uwURuENC8GKI2 27bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:message-id:date:cc:to; bh=D1LJv/ZP1Q2z8UZwGzhfk8mY9punr4BntfHN4vjj/7E=; b=El+DoOYhJ15tavKC/m0P1A70nrinYcueYFdhcpYvTb2gLjGqUX7qNEN5Kntb9KDnkM lfoQMcWYuDxe9uhJNTyDRoNcMMbF9y+7V1vgcGik5F0rUf/9GYmzd/xsSLgXfOUdK1Ci Zgoa6NSMZDkXSPbbXkWFT/1IHSFi5wqCMh0yYufQ+SJS1li7knffjFHzGwpYVwTsT/sa RbFQL557EyQAhcyjnhCYxRCKNhmU03r3sO9+dvHdiIjVWNN/er/VsATJf3dAlmKOcZI5 nB4nEdG45A+WXTNo2iu5g0dXAtJiW0du9KQwEYln8NTL+oOQsu85LXZzu6Evq7si0/FB WYRg== X-Gm-Message-State: AOAM533fRndQ+6KKwPi3M9/vFySuoUFJ7AGo7UhYrbnxkPyMBbZtMKSg 60h+sSKnoLSJvnjL/jjbeaIEkMkNtOI= X-Google-Smtp-Source: ABdhPJx807ktWk3H6nz00eHndY4qFRU9fJYuDV2RmcRocB798X6i7P4Zjt981zuuxOeSKcq911VkEQ== X-Received: by 2002:adf:e911:: with SMTP id f17mr3328206wrm.397.1597422214876; Fri, 14 Aug 2020 09:23:34 -0700 (PDT) Received: from mac.deepcore.dk ([85.27.186.9]) by smtp.gmail.com with ESMTPSA id w1sm15184819wmc.18.2020.08.14.09.23.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Aug 2020 09:23:34 -0700 (PDT) From: =?utf-8?Q?S=C3=B8ren_Schmidt?= Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Pinebook Pro battery fuel-gauge driver.. Message-Id: Date: Fri, 14 Aug 2020 18:23:33 +0200 To: "freebsd-arm@freebsd.org" X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 4BSpf04LmXz3csp X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=OZ41v5Y2; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of sorenschmidt@gmail.com designates 2a00:1450:4864:20::42b as permitted sender) smtp.mailfrom=sorenschmidt@gmail.com X-Spamd-Result: default: False [-0.80 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MV_CASE(0.50)[]; HAS_ATTACHMENT(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.46)[-0.463]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:~,4:~,5:~,6:~,7:~]; R_MIXED_CHARSET(0.62)[subject]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.06)[-1.065]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.995]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain,multipart/mixed]; PREVIOUSLY_DELIVERED(0.00)[arm@freebsd.org]; MIME_BAD_ATTACHMENT(1.60)[c]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::42b:from]; FREEMAIL_CC(0.00)[gmail.com]; RCVD_TLS_ALL(0.00)[] X-Spam: Yes Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2020 16:23:37 -0000 Hi Now that we have display and all working I hacked up a driver for the = cw2015 chip that can tell how much battery is left so I know when to = seek an outlet :) It consists of a patch to the dts (from linux) where all I need is the = chiplocation but for compats sake, and the driver. Access is via sysctl, as we have no real way of handling this info on = ARM (no acpi, apm etc) AFAIK. Enjoy! -- S=C3=B8ren Schmidt sos@deepcore.dk / sos@freebsd.org "So much code to hack, so little time"