From patchwork Mon Aug 19 16:46:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13768711 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9B3D7C52D7C for ; Mon, 19 Aug 2024 16:59:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pDgCKdCvmsY03Pik3wYi9u14QEc+d2Lmm2q5fMkp+bI=; b=OaqAKU+F4m90TEfH+t3Lmifg6D Y5b+BOamacp1xcxIuW92ftRMUp/1YSDwBFDYIQXbSqtDmRgveLCy8tw2NgsjS7nnt3xTnBKlNrTkR +96u8o8RJCPzxJB37DDi689JgeccVUeoDZlCrzb2VmsmOaTMSxPlqQRaLFd6eLOpSjKpzAWec7e0T mbY+rxukEBYFHU6tUgMHOsifHP4IiJhzKItRV/ck49TzgnKMYMD80swqlv7gUL/RNhKaOAYH8sm68 1C//8a/L5MbHMLbT8ILlTgQDZtekQtyAOfD4BUXq3pjknhqZjnQc54iDFbQnRfGa09W5ZE9hptaMD N1q6HFuw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sg5jI-00000002HpM-0j3W; Mon, 19 Aug 2024 16:59:40 +0000 Received: from mail-ot1-x32b.google.com ([2607:f8b0:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sg5Yu-00000002EkF-2LQG for linux-arm-kernel@lists.infradead.org; Mon, 19 Aug 2024 16:48:57 +0000 Received: by mail-ot1-x32b.google.com with SMTP id 46e09a7af769-70949118d26so3724846a34.0 for ; Mon, 19 Aug 2024 09:48:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724086135; x=1724690935; darn=lists.infradead.org; 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=pDgCKdCvmsY03Pik3wYi9u14QEc+d2Lmm2q5fMkp+bI=; b=keqV+d7ks1eOa4nxT78tq4qN2xH67gSC/A05HcjCpUhMWzjva9ndEjhGRzwn/MLBGF FcbV8BVAiGiJ1OdKXX5GushHOsRAOqryNtiXR/AohSWibq19arRF2DnWk3ujz0bjxpfH A8OJa1E2+c5XgOCNEjS2z2AZm9SCO0emrNzPEg9DtuvE8TpZ+NGGLxhGKGDajfOUoOjM 3pPbV3OBSuljWFv29he+EfMdzNoV0f56CAqOufa2ro2LJARyHp0sgb41SSj63EYsRYIj 7x/aEV9LoARMJ6/w7LJztfUJOjXJ/JB027uWxwTbalLBLCvyRk6cDEOEYRdWghk+djzK OnSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724086135; x=1724690935; 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=pDgCKdCvmsY03Pik3wYi9u14QEc+d2Lmm2q5fMkp+bI=; b=tgCMLODg0QOmPHHMLeFn5DsVsv6m+uM9U+XhYFRDvuaZcrQJTGaJmLX/yji6vXaRfQ on3/6c4NIlhQM496mHEhb0iZ+ASaZ8xMlXL4yIp0+m8ZShPFJMl214VCz3U/tEKuis3x Ak5T4xRiUCBj6d6sPlADeXOrXEomYVZI5mYX9tuHPgzMfrWOG4J5dcqE938WqYJ2fofR nxtUYVwDGkWar5xX/rb/gBlP6pDevljcyYNdMDfrOBjkFMFmY6Rj85pIrIIFqyljtXf8 BRzwvCQHA/Lod6P1V2ZVPp91/gdf/3Y9IUcFdlzRzZtg35zjDd6b8QfPWHXQ5WjHd8fM FmZw== X-Forwarded-Encrypted: i=1; AJvYcCWIj9KtU9ayg0zEAsuWNESe1UCyF+FGYbwVCwMeqKSkvFKaF/H3tK3QVvuGR5r8IIk9R4YOmG1OOtKxdf+nZLikWTXS0RS+3YFJ5m7+DnahjsalC90= X-Gm-Message-State: AOJu0YyIjy/1TcW9k9cdQmkzEWn9+t6uN3TVhvYxBly4i9j4ChCDnSDG Q3JSeDXO1O111U4KquBpeN0ScTO4ojG7/tjbirHla0FoluJbzLHY X-Google-Smtp-Source: AGHT+IEOCZLpFVa3etUE3cD8cEJLVRhuC8dwY9gXtzaL2mwue40C2B/W2Rq9aJPon4OTO+dgphhnHQ== X-Received: by 2002:a05:6830:358f:b0:709:4e4f:931a with SMTP id 46e09a7af769-70cac8a3c81mr16674258a34.22.1724086135220; Mon, 19 Aug 2024 09:48:55 -0700 (PDT) Received: from localhost.localdomain ([2600:1700:fb0:1bcf::54]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca649c61csm2332428a34.26.2024.08.19.09.48.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2024 09:48:55 -0700 (PDT) From: Chris Morgan To: linux-sunxi@lists.linux.dev Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-iio@vger.kernel.org, quentin.schulz@free-electrons.com, mripard@kernel.org, tgamblin@baylibre.com, aidanmacdonald.0x0@gmail.com, u.kleine-koenig@pengutronix.de, lee@kernel.org, samuel@sholland.org, jernej.skrabec@gmail.com, sre@kernel.org, wens@csie.org, conor+dt@kernel.org, krzk+dt@kernel.org, robh@kernel.org, lars@metafoo.de, jic23@kernel.org, jonathan.cameron@huawei.com, Chris Morgan Subject: [PATCH V3 15/15] arm64: dts: allwinner: h700: Add charger for Anbernic RG35XX Date: Mon, 19 Aug 2024 11:46:19 -0500 Message-Id: <20240819164619.556309-16-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240819164619.556309-1-macroalpha82@gmail.com> References: <20240819164619.556309-1-macroalpha82@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240819_094856_693332_8F84C1DC X-CRM114-Status: GOOD ( 12.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Chris Morgan Add the necessary nodes for the AXP717 to allow for monitoring the USB and battery charger. Signed-off-by: Chris Morgan --- .../sun50i-h700-anbernic-rg35xx-2024.dts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts b/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts index 078b9ea3d9d0..18b63efae083 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts @@ -21,6 +21,12 @@ aliases { serial0 = &uart0; }; + battery: battery { + compatible = "simple-battery"; + constant-charge-current-max-microamp = <1024000>; + voltage-max-design-microvolt = <4200000>; + }; + chosen { stdout-path = "serial0:115200n8"; }; @@ -217,6 +223,16 @@ axp717: pmic@34 { vin3-supply = <®_vcc5v>; vin4-supply = <®_vcc5v>; + axp_adc: adc { + compatible = "x-powers,axp717-adc"; + #io-channel-cells = <1>; + }; + + battery_power: battery-power { + compatible = "x-powers,axp717-battery-power-supply"; + monitored-battery = <&battery>; + }; + regulators { reg_dcdc1: dcdc1 { regulator-always-on; @@ -307,6 +323,11 @@ reg_cpusldo: cpusldo { /* unused */ }; }; + + usb_power: usb-power { + compatible = "x-powers,axp717-usb-power-supply"; + input-current-limit-microamp = <1500000>; + }; }; };