Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp270154lqz; Fri, 29 Mar 2024 16:51:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUYDDfH3o+semlfNZUpXusL//iDZ/FMe365Lrr1RD8yF3xkEyEW5snspjgJvWO+H9qG2Mam6GStstkTrm8HIZRYq3d2C25+JS4YwzptFw== X-Google-Smtp-Source: AGHT+IE1WSbRFyVNVua04hVPdO/3HDUBWbw6yrS5ElGv0d3MQRfn/PYWdXlJXVN8s+gKOdKlGjcb X-Received: by 2002:a05:622a:2d1:b0:432:b6d3:293a with SMTP id a17-20020a05622a02d100b00432b6d3293amr4273500qtx.58.1711756295419; Fri, 29 Mar 2024 16:51:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711756295; cv=pass; d=google.com; s=arc-20160816; b=xMbKMHqeQDoqIRajJWayojR2J7RALNlCxneEtdXhujUcG9md2QiTDF8nTlVsGtOfvU eFW1pAX6FGf8ShgSim5xb8auTazmIAKMKAM5sKepVP0/sx8KsNrDSFxrKeQN9Iq9dSwB ZFNLhVfKnHQCo4YLI4MtviCxI5Tdl3DtKjmqYqRrfOCyShrkhwZsKhftKDxIoRB0egq/ A/JBseLPIK7cMUKSdNY/3mcX4hfe85pHip49BAVWJ2qGw8X06Hu9AZiWkGcs9Iv3lzQp 4EEKYuhVohSc96otGV8seA8Pd3RKqrM6i5MOqnaUMqHdnC9rDV3fy/nd8x9zkkzOjMN3 TLIQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=LSQ5mekzVo2IRcaEZrdq2otXSswChXYWmSaByQ3NKu4=; fh=pHEgU8vIZ2dKZDfo5+HnJ4jYKuwiESD1XRMEK8rBrI8=; b=cT3ky6stB8HBw7KOIhzNMQ/UxBb9UftZCQ6rP3oaKvcAH6OxvM8MPmYRlXVokNGlYT 7MaY0fH8AHywhq6eNCTEdHorU8ykFjaPht2i37ZrQf0qdmo6bgUh1QPSG/M2Q8LJlqEZ M3N3VnUdOt0oE3yAgz4SWT84+UoiMK89j5tYfamc0isfKCmoSbfj7EaFpDSHlHFITnha iJqPXsBGAD3iwr9/sr7bvo5PVYJ2zyo0v9J2WBG/hiBYWRsZlIm002I04dWNciTPASB6 tKmvadq94O3e9VbTa8QNhBwzmQyYAB10g9AfY345dYW8aN6Yi9Rryu1D2/Q3tNZReSRB Vm6A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-125536-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125536-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ge15-20020a05622a5c8f00b00432b45cbbd9si4822661qtb.228.2024.03.29.16.51.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 16:51:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-125536-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-125536-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125536-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 289781C20C9B for ; Fri, 29 Mar 2024 23:51:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 390FF13F44C; Fri, 29 Mar 2024 23:50:57 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0D00613F425; Fri, 29 Mar 2024 23:50:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711756256; cv=none; b=hM/bXwJPATiCRNlng3DoPICrnA35G2b5Ilbp1Mx+uIR2LK5PGAw9Dzzp4zwhmeLsvZ9UhqJ4TZcHC/+9B0l1IV8TZgy0mZ/R4OuuV2ImfPgkCm33m3Cn0I8LZGYDLPRrvMXfVxgrNzj85eYr42IzefpU8P752ODwvHmYQJIc+Dg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711756256; c=relaxed/simple; bh=rlQEKxVzgYYSYVWFuLPv1VGy4M/P7nf9VBaUGEusVLs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=GjvGyW/uUNVJz/s7mj7A/DLVe+xFiXQRg1N7nquavcNsswKq9NXud4t6NzXKup28v0aO6n2dXiZrhWhT7U9QSi5c2nUbrMxllP1c1vXQUNHNXSQiAt0gfBcWrkuiObUJgFSrSQv8dPfL6NaX0OChvTDYzSMVHf+jbSx3htwdhqM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8827AFEC; Fri, 29 Mar 2024 16:51:27 -0700 (PDT) Received: from localhost.localdomain (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 800203F64C; Fri, 29 Mar 2024 16:50:52 -0700 (PDT) From: Andre Przywara To: Chen-Yu Tsai , Lee Jones , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, Jernej Skrabec , Samuel Holland , Ryan Walklin , Chris Morgan Subject: [PATCH 3/4] mfd: axp20x: AXP717: Add support for boost regulator Date: Fri, 29 Mar 2024 23:50:32 +0000 Message-Id: <20240329235033.25309-4-andre.przywara@arm.com> X-Mailer: git-send-email 2.35.8 In-Reply-To: <20240329235033.25309-1-andre.przywara@arm.com> References: <20240329235033.25309-1-andre.przywara@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The AXP717 also contains a boost regulator, to provide the 5V USB VBUS rail when running on battery. Add the registers to the MFD description to be able to use them from the regulator driver. Signed-off-by: Andre Przywara --- drivers/mfd/axp20x.c | 2 ++ include/linux/mfd/axp20x.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index 48ce6ea693cea..62f3dd254d57b 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c @@ -209,6 +209,8 @@ static const struct regmap_access_table axp313a_volatile_table = { }; static const struct regmap_range axp717_writeable_ranges[] = { + regmap_reg_range(AXP717_MODULE_EN_CONTROL, AXP717_MODULE_EN_CONTROL), + regmap_reg_range(AXP717_BOOST_CONTROL, AXP717_BOOST_CONTROL), regmap_reg_range(AXP717_IRQ0_EN, AXP717_IRQ4_EN), regmap_reg_range(AXP717_DCDC_OUTPUT_CONTROL, AXP717_CPUSLDO_CONTROL), }; diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h index 8c0a33a2e9ce2..4dad54fdf67ee 100644 --- a/include/linux/mfd/axp20x.h +++ b/include/linux/mfd/axp20x.h @@ -115,6 +115,8 @@ enum axp20x_variants { #define AXP313A_IRQ_STATE 0x21 #define AXP717_ON_INDICATE 0x00 +#define AXP717_MODULE_EN_CONTROL 0x19 +#define AXP717_BOOST_CONTROL 0x1e #define AXP717_IRQ0_EN 0x40 #define AXP717_IRQ1_EN 0x41 #define AXP717_IRQ2_EN 0x42 -- 2.35.8