Message ID | 20221112143411.517906-6-maccraft123mc@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1297834wru; Sat, 12 Nov 2022 06:38:12 -0800 (PST) X-Google-Smtp-Source: AA0mqf4NYOlKFnPN3KMTd/byDnV9f5ba4pPJe9JT7K7qhq0CXyJSv4AgpVliYD5g2G05GbzaWPTI X-Received: by 2002:a50:baed:0:b0:461:46c7:53aa with SMTP id x100-20020a50baed000000b0046146c753aamr5493265ede.165.1668263891980; Sat, 12 Nov 2022 06:38:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668263891; cv=none; d=google.com; s=arc-20160816; b=ioR6Gca0pxowFl/f4+XvmNHBYAqabi0WaI7KaKuXRIOWMxN1j5ymvIvYbxFalAdIAg gVhhLsaIOad76L3+vRK1eFINpahFJNRiPHr6qBToaiA/0QB8TdhyJjmQZeLPjanECmME T29VV2LjmSf10Oe9psGl0Dlevdg1rUmpLMr6eS/u+wZEDb35K6uf8a/5iTtkh8gJVmPE 0Zd6Pcm0wFrBn4fNyERej0yKwVQf72hXOLXJ8kkQMLkiu1QZ2WciCP+GjYiU3P3nnm3H +YOqyWbM1Dsx3FUYPLKSrPqJLsEp9Enj75DX0W7N/5TcqZG4IMkAOa/QZYuFFbizCNZM fPiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Cr+7dkLsIQWkssfwSwIW2QDjIIkEwPc25TwB+Qcm5uo=; b=QhVesgBavd9cI50WKU/zLUJTQLwi04ZFRrpfojsLhzYymxpX1XUkgEE8mqhM/xNoLP WUICfOkyFx2zPQWFrBgZIPvLPSsUMwWRdIEfm7ShsEpTJloLKWpS9XggoxhBwwAFuS4J SofVw0EDstjAvFt0xhhVvw/K/qgxsPXXFbrs2UY8ryUTpIN8f3X3uX6ZitPJ/r0rCWOw 2cIqm3rBiMGRNzqooJumzmanv6MgH4kgaOWRRJZLgyNSGa47nGHLtzDH6utxUX5kepWy IELVqU7m02ehwgdXb/ETW8pc3lm9RFSMlHq9sM9LWBrUQSmfG4PfCa+uQvc3asOaPwye +FAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YKeasKfl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g7-20020a17090670c700b0078ded36fa42si3833653ejk.292.2022.11.12.06.37.48; Sat, 12 Nov 2022 06:38:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YKeasKfl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234947AbiKLOeq (ORCPT <rfc822;winker.wchi@gmail.com> + 99 others); Sat, 12 Nov 2022 09:34:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234747AbiKLOec (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 12 Nov 2022 09:34:32 -0500 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DF7E1C10A; Sat, 12 Nov 2022 06:34:31 -0800 (PST) Received: by mail-ej1-x62e.google.com with SMTP id i10so9876901ejg.6; Sat, 12 Nov 2022 06:34:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Cr+7dkLsIQWkssfwSwIW2QDjIIkEwPc25TwB+Qcm5uo=; b=YKeasKflZl4c3qMzSMsz2RorOL4VRVaj8/U3xQm+eVknrGNWTSYiZkzUube5tqAEFd RbXNhajc0myPH8IE0+D8K+lx3mrBlWfAihzHsZpKAXBL1zF5LSIInBLrU9dubZy1GNJB 78w4NlIHoq2IyA4YayFm31T36U5NEeBUTUQbDlfM+iq+GFd5gRhsc9TJTMI+tWg74t3j wq4UqZIUijtea8WYvi22KWB0At0WgMhK3bCBI3195FCncgIZ6BsVKU2e5PAPJI4wQ66j 3hfK+eoaOwOZqZygpRn7fbHvO4wqnoqXHZD+1zFPfl8wTMtHJaLirj584lX7XAwbMxwA t3hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Cr+7dkLsIQWkssfwSwIW2QDjIIkEwPc25TwB+Qcm5uo=; b=6b/C/Nk0UCzMsZXJdhmNLlQU5sLlkkIowUnsEBSfId5Qmnzt18gnWjJQExUZz0v3AJ cGffleCys5FsSQ3z1kHz8FoDuy5gJDerf3kYUmLvmIaB2TREENn8uFzlLEAxX/IID2Ug 6sEJ+lR2eLoNFlEBxuEuzr1DGOqsub6pJ1pCF6m5o0T8bAYI3EnEqTg9eOKF9pT/AE9z lSEqhx7e09K82/Nva0oDgF21E9RDubYG9vxzcRwd9TJ6Rk0wQTDZw7sC2qBlw2gSj5Jm +KgDJ9UO2oeV4iYKMFHDPc6/V/zY4OK383nU1B9ymxBKX6LIxCzGS9TcQH5MAMImM+HU 4zIQ== X-Gm-Message-State: ANoB5pnYUY158uDCT3n6RibIiAH+yYBiQeqKcaUNHmMxVg+0Na6oRzus LDiK4giLcM6NqV1mpVUVlSrLMHD/Qw7XrsLN X-Received: by 2002:a17:906:504a:b0:78d:6655:d12e with SMTP id e10-20020a170906504a00b0078d6655d12emr5328264ejk.260.1668263669639; Sat, 12 Nov 2022 06:34:29 -0800 (PST) Received: from localhost.localdomain (83.31.120.236.ipv4.supernova.orange.pl. [83.31.120.236]) by smtp.gmail.com with ESMTPSA id l9-20020a1709063d2900b0077a11b79b9bsm1974668ejf.133.2022.11.12.06.34.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Nov 2022 06:34:29 -0800 (PST) From: Maya Matuszczyk <maccraft123mc@gmail.com> To: linux-rockchip@lists.infradead.org, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Heiko Stuebner <heiko@sntech.de> Cc: =?utf-8?b?Sm/Do28gSCAuIFNwaWVz?= <jhlspies@gmail.com>, Chris Morgan <macroalpha82@gmail.com>, Maya Matuszczyk <maccraft123mc@gmail.com>, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 5/5] arm64: dts: rockchip: Add Anbernic RG351M Date: Sat, 12 Nov 2022 15:34:11 +0100 Message-Id: <20221112143411.517906-6-maccraft123mc@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221112143411.517906-1-maccraft123mc@gmail.com> References: <20221112143411.517906-1-maccraft123mc@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749301478449263367?= X-GMAIL-MSGID: =?utf-8?q?1749301478449263367?= |
Series |
[v3,1/5] arm64: dts: rockchip: Move most of Odroid Go Advance DTS into a DTSI
|
|
Commit Message
Maya Matuszczyk
Nov. 12, 2022, 2:34 p.m. UTC
This device is a clone of Odroid Go Advance, with added PWM motor, internal
gamepad connected on USB instead of just having it be on GPIO + ADC, and
missing battery shunt resistor.
There's also an LED on GPIO 77(I *guess* PB5 on &gpio2), that is controlled in a weird way:
- It is set to red by setting output value to 1
- Set to green by setting output value to 0
- Set to yellow by setting gpio direction to input
I have no idea how to describe that in DTS, without adding a custom
driver, for now it's just left out.
Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com>
---
arch/arm64/boot/dts/rockchip/Makefile | 1 +
.../dts/rockchip/rk3326-anbernic-rg351m.dts | 54 +++++++++++++++++++
2 files changed, 55 insertions(+)
create mode 100644 arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts
Comments
On Sat, Nov 12, 2022 at 03:34:11PM +0100, Maya Matuszczyk wrote: > This device is a clone of Odroid Go Advance, with added PWM motor, internal > gamepad connected on USB instead of just having it be on GPIO + ADC, and > missing battery shunt resistor. I have concerns about using the rk817 battery driver with no shunt resistor. For the moment, that would result in wrong values being given for battery capacity and current. What could be done is to update the driver to only check voltage values when the shunt resistor is missing (since it's the current values and columb counter that gets affected with no resistor in place). For now though, I'd just remove the battery and charger since it's going to report the wrong data to users. > > There's also an LED on GPIO 77(I *guess* PB5 on &gpio2), that is controlled in a weird way: > > - It is set to red by setting output value to 1 > - Set to green by setting output value to 0 > - Set to yellow by setting gpio direction to input > > I have no idea how to describe that in DTS, without adding a custom > driver, for now it's just left out. Check out this document, it says you'd group them together under a multicolor led node: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml > > Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com> > --- > arch/arm64/boot/dts/rockchip/Makefile | 1 + > .../dts/rockchip/rk3326-anbernic-rg351m.dts | 54 +++++++++++++++++++ > 2 files changed, 55 insertions(+) > create mode 100644 arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts > > diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile > index 142c83d2e5aa..b379516c15eb 100644 > --- a/arch/arm64/boot/dts/rockchip/Makefile > +++ b/arch/arm64/boot/dts/rockchip/Makefile > @@ -7,6 +7,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-evb.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-roc-cc.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-rock-pi-s.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3318-a95x-z2.dtb > +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-anbernic-rg351m.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2-v11.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go3.dtb > diff --git a/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts b/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts > new file mode 100644 > index 000000000000..7f4726d4130e > --- /dev/null > +++ b/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts > @@ -0,0 +1,54 @@ > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > +/* > + * Copyright (c) 2019 Hardkernel Co., Ltd > + * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH > + * Copyright (c) 2022 Maya Matuszczyk <maccraft123mc@gmail.com> > + */ > + > +/dts-v1/; > +#include "rk3326-odroid-go.dtsi" > + > +/ { > + model = "Anbernic RG351M"; > + compatible = "anbernic,rg351m", "rockchip,rk3326"; > + > + battery: battery { > + compatible = "simple-battery"; > + charge-full-design-microamp-hours = <3450000>; > + charge-term-current-microamp = <300000>; > + constant-charge-current-max-microamp = <2000000>; > + constant-charge-voltage-max-microvolt = <4200000>; > + factory-internal-resistance-micro-ohms = <100000>; > + voltage-max-design-microvolt = <4100000>; > + voltage-min-design-microvolt = <3500000>; > + > + ocv-capacity-celsius = <20>; > + ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>, > + <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>, > + <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>, > + <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>, > + <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>, > + <3574170 0>; > + }; > + > + vibrator { > + compatible = "pwm-vibrator"; > + pwms = <&pwm0 0 1000000 0>; > + pwm-names = "enable"; > + }; > +}; > + > +/delete-node/ &builtin_gamepad; > +/delete-node/ &vcc_host; /* conflicts with pwm vibration motor */ > + > +&internal_display { > + compatible = "elida,kd35t133"; > +}; > + > +&pwm0 { > + status = "okay"; > +}; > + > +&rk817_charger { > + monitored-battery = <&battery>; > +}; > -- > 2.38.1 >
pon., 14 lis 2022 o 15:23 Chris Morgan <macroalpha82@gmail.com> napisaĆ(a): > > On Sat, Nov 12, 2022 at 03:34:11PM +0100, Maya Matuszczyk wrote: > > This device is a clone of Odroid Go Advance, with added PWM motor, internal > > gamepad connected on USB instead of just having it be on GPIO + ADC, and > > missing battery shunt resistor. > > I have concerns about using the rk817 battery driver with no shunt > resistor. For the moment, that would result in wrong values being > given for battery capacity and current. What could be done is to > update the driver to only check voltage values when the shunt > resistor is missing (since it's the current values and columb counter > that gets affected with no resistor in place). For now though, I'd > just remove the battery and charger since it's going to report the > wrong data to users. I guess that's fair... the device literally has no shunt resistor and DT should reflect hardware. > > > > > There's also an LED on GPIO 77(I *guess* PB5 on &gpio2), that is controlled in a weird way: > > > > - It is set to red by setting output value to 1 > > - Set to green by setting output value to 0 > > - Set to yellow by setting gpio direction to input > > > > I have no idea how to describe that in DTS, without adding a custom > > driver, for now it's just left out. > > Check out this document, it says you'd group them together under a > multicolor led node: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml As far as I know there is no support to controlling LED in a way that this device requires the LED to be controlled. It's just one GPIO, and setting it to outputting 0, outputting 1 or to input changes the color and there's no way to turn it off. Best Regards, Maya Matuszczyk > > > > > Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com> > > --- > > arch/arm64/boot/dts/rockchip/Makefile | 1 + > > .../dts/rockchip/rk3326-anbernic-rg351m.dts | 54 +++++++++++++++++++ > > 2 files changed, 55 insertions(+) > > create mode 100644 arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts > > > > diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile > > index 142c83d2e5aa..b379516c15eb 100644 > > --- a/arch/arm64/boot/dts/rockchip/Makefile > > +++ b/arch/arm64/boot/dts/rockchip/Makefile > > @@ -7,6 +7,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-evb.dtb > > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-roc-cc.dtb > > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-rock-pi-s.dtb > > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3318-a95x-z2.dtb > > +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-anbernic-rg351m.dtb > > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2.dtb > > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2-v11.dtb > > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go3.dtb > > diff --git a/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts b/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts > > new file mode 100644 > > index 000000000000..7f4726d4130e > > --- /dev/null > > +++ b/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts > > @@ -0,0 +1,54 @@ > > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > > +/* > > + * Copyright (c) 2019 Hardkernel Co., Ltd > > + * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH > > + * Copyright (c) 2022 Maya Matuszczyk <maccraft123mc@gmail.com> > > + */ > > + > > +/dts-v1/; > > +#include "rk3326-odroid-go.dtsi" > > + > > +/ { > > + model = "Anbernic RG351M"; > > + compatible = "anbernic,rg351m", "rockchip,rk3326"; > > + > > + battery: battery { > > + compatible = "simple-battery"; > > + charge-full-design-microamp-hours = <3450000>; > > + charge-term-current-microamp = <300000>; > > + constant-charge-current-max-microamp = <2000000>; > > + constant-charge-voltage-max-microvolt = <4200000>; > > + factory-internal-resistance-micro-ohms = <100000>; > > + voltage-max-design-microvolt = <4100000>; > > + voltage-min-design-microvolt = <3500000>; > > + > > + ocv-capacity-celsius = <20>; > > + ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>, > > + <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>, > > + <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>, > > + <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>, > > + <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>, > > + <3574170 0>; > > + }; > > + > > + vibrator { > > + compatible = "pwm-vibrator"; > > + pwms = <&pwm0 0 1000000 0>; > > + pwm-names = "enable"; > > + }; > > +}; > > + > > +/delete-node/ &builtin_gamepad; > > +/delete-node/ &vcc_host; /* conflicts with pwm vibration motor */ > > + > > +&internal_display { > > + compatible = "elida,kd35t133"; > > +}; > > + > > +&pwm0 { > > + status = "okay"; > > +}; > > + > > +&rk817_charger { > > + monitored-battery = <&battery>; > > +}; > > -- > > 2.38.1 > >
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile index 142c83d2e5aa..b379516c15eb 100644 --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile @@ -7,6 +7,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-evb.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-roc-cc.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-rock-pi-s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3318-a95x-z2.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-anbernic-rg351m.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2-v11.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go3.dtb diff --git a/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts b/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts new file mode 100644 index 000000000000..7f4726d4130e --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 Hardkernel Co., Ltd + * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH + * Copyright (c) 2022 Maya Matuszczyk <maccraft123mc@gmail.com> + */ + +/dts-v1/; +#include "rk3326-odroid-go.dtsi" + +/ { + model = "Anbernic RG351M"; + compatible = "anbernic,rg351m", "rockchip,rk3326"; + + battery: battery { + compatible = "simple-battery"; + charge-full-design-microamp-hours = <3450000>; + charge-term-current-microamp = <300000>; + constant-charge-current-max-microamp = <2000000>; + constant-charge-voltage-max-microvolt = <4200000>; + factory-internal-resistance-micro-ohms = <100000>; + voltage-max-design-microvolt = <4100000>; + voltage-min-design-microvolt = <3500000>; + + ocv-capacity-celsius = <20>; + ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>, + <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>, + <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>, + <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>, + <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>, + <3574170 0>; + }; + + vibrator { + compatible = "pwm-vibrator"; + pwms = <&pwm0 0 1000000 0>; + pwm-names = "enable"; + }; +}; + +/delete-node/ &builtin_gamepad; +/delete-node/ &vcc_host; /* conflicts with pwm vibration motor */ + +&internal_display { + compatible = "elida,kd35t133"; +}; + +&pwm0 { + status = "okay"; +}; + +&rk817_charger { + monitored-battery = <&battery>; +};