From patchwork Fri Aug 2 19:20:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13751928 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 C3E6FC3DA4A for ; Fri, 2 Aug 2024 19:30:09 +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=6bljFmiJkhPU7BKEtswdXuPsqQ0+QMylW7jPglHY9Uc=; b=RDOtR+PKSOeq6tUcsNtXopDC4m C4AlTIkTqMwZ5at4QNu6bVu8lJlKtCxjHf9twTbBySQ5xxNc5MtwhwNJQIsgGTjJtJkRDWjJp6HVx swLb+U3Wlh7PJ8ZYPtAfqLnyQthm9ywTWnKLD8q9qv1TKQ1OqOVM+bJLEkTM0RkBt9ZIXKC8NP2HH uNdOv8JuUOiTvLnwWxvl9Cb89BeNFNR4lYU7FKHEelq+jQYKsgYAgSUOkLOp8N9mWFs3IEJR7MM6B SOqqPJOyRO2gD5bcVKjSvd3hQFfOhy88/CRFHFP/FMTZo5H54YBPMU81urWSTKJ8qpRwDM76NKuvt c/QzOhHA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZxyP-00000009s2G-3QoB; Fri, 02 Aug 2024 19:29:57 +0000 Received: from mail-oi1-x22f.google.com ([2607:f8b0:4864:20::22f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZxri-00000009qbb-3Put for linux-arm-kernel@lists.infradead.org; Fri, 02 Aug 2024 19:23:04 +0000 Received: by mail-oi1-x22f.google.com with SMTP id 5614622812f47-3db51133978so1670904b6e.3 for ; Fri, 02 Aug 2024 12:23:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722626582; x=1723231382; 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=6bljFmiJkhPU7BKEtswdXuPsqQ0+QMylW7jPglHY9Uc=; b=lSD3onk9+MaqIg2VexHDvlRNYNP129H3oBkzKFw2+WKHqPy7GanP5v7EA69kn6b6pf fbCQzqN+uuGqg4IIGo8v5iEkqZGpS0Hl3cp4Hadyb3Hz0C6dx0dcdrcuUYllcLPTncPw 8+7AamKvboGWqDCt8sYwqFHUmusvaZLK/KGG+Ee/7d3sCxdQiKbWHBDW1ce2Lh4Jaazy Xs0Fgm7dFsUEjG2+acgh7xcx48muja3lVH5hDv6QwaZwPgFaoYUaapGjrV+LhW9AqJxs 7oyn0lkLNJW5OQRM/iWZkuWz1knBoRRavRRQovgG4eJq9Zpp0KEmVF8/EmT7k7AuVtT2 n55g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722626582; x=1723231382; 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=6bljFmiJkhPU7BKEtswdXuPsqQ0+QMylW7jPglHY9Uc=; b=E0JPkv/1RsL0fDfMqOhsgj4Gjt2Ym5QF2eNyMv7mDQ0YWpm+Kl86H6uethhv4/leRF yW5ZdVCOfvRmCayZEJfuiiIDpAwHGVO3PIdPAlEZPoJ6Sy6XW0VZfJNvQHSLzEDeTOUS 2TsuJUoB6yQP22Mtu8lmAGvKgIujGlIw/pvool4IQxJNI9W76CTqbHoVTPwO4FZ2sViV lkfVUIXQtjUVzG7SsUuBf0fJ4Nf5smvOWfojf6K1AJK3xGK//FH14lQOQXLtBdhw5vIC uFl5DFF3IoPtSuIaVelZkC25DUaHtZqvBVUNany0nQLTWDazhxr2N7INrQHAjn73T3fd CWfQ== X-Forwarded-Encrypted: i=1; AJvYcCVSYxLrL2aj89IV+Vy3itwNClWw2P/6MDYVY8+fTE7J0VjYFFAjgli8b3Hltvb4p60cCbjBlKjSw+PnS7imn6T9@lists.infradead.org X-Gm-Message-State: AOJu0YxbU5QkYAX/GHRWtut9lyh7OUa9krv5x4X0/k32jc1qkXTZz1rK UeMIzA83LNeUAHwxZJu4Z/Ae6MlPh6uByYEeSnQmeBEMFUtmX3dP X-Google-Smtp-Source: AGHT+IGjBzlQxgg8C+yv67X9RvusG8E8mOEP2cJ31NbvBUQRSj0BF+eewV39CvF2RjsSsdpKP8J97A== X-Received: by 2002:a05:6808:23c4:b0:3da:b3b3:191 with SMTP id 5614622812f47-3db5583db96mr4810309b6e.48.1722626582119; Fri, 02 Aug 2024 12:23:02 -0700 (PDT) Received: from localhost.localdomain ([2600:1700:fb0:1bcf::54]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3db563b7065sm584592b6e.46.2024.08.02.12.23.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Aug 2024 12:23:01 -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, Chris Morgan Subject: [PATCH V2 15/15] arm64: dts: allwinner: h700: Add charger for Anbernic RG35XX Date: Fri, 2 Aug 2024 14:20:26 -0500 Message-Id: <20240802192026.446344-16-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240802192026.446344-1-macroalpha82@gmail.com> References: <20240802192026.446344-1-macroalpha82@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240802_122302_974203_AF3B7524 X-CRM114-Status: GOOD ( 12.02 ) 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 to 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 afb49e65859f..83b5c03b1bb8 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@3a3 { 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>; + }; }; };