Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp971258lqb; Wed, 17 Apr 2024 17:08:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWE1eaxikcCIhZ8qHlaa/9l8O/6H7U8l1dZ7VcXgyMDBBU6O93DsAx2ZGQYXeXRHpBL91xAkGRdMyeU0VSV8FQBRnFh/nfAcguM5jrvaQ== X-Google-Smtp-Source: AGHT+IHVDmyXz9uPUoQpNP+dg9HeFNdDiZvAmTSm3DEcZAdzxpczNEoNuLYaWsoLkodgPJ7OMoxY X-Received: by 2002:a37:f501:0:b0:78d:73f4:d100 with SMTP id l1-20020a37f501000000b0078d73f4d100mr1005747qkk.27.1713398930344; Wed, 17 Apr 2024 17:08:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713398930; cv=pass; d=google.com; s=arc-20160816; b=UodCZWhpyQsFnGNlM/b1q/UJ3Rh6vOSMDDQ+V4cwRJcLoqq/xroozZFmLY4X+M9zEr sp3lf8lBJPfDMLA4MaS18LQzfcBE38ay7UjSwn02ihSiy5MYAPKUrrFzMnkpOO1JLc53 SNPRQfQZ9SJfDSCK9gCqJ4I/dC6NEUooBfamp/jUgJPfHszd99siQZVQ4J3cut3DFGFF Imiin7A+924QWPCmEB5ZgHfy+uOBUvXdGbvtVdBfXgVKjHuT2ym4Zzu6fVmhXfxxvaJS 2dNQO2k3E3L8B7/GiGLkJ1ovY0KTyv5M7bjG/ZlZwKsC4TQurqvJs+CU9/NXcDI6Kk1t FtIQ== 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=3FUTAUOALxfOxdNBxGIUlnUuIxjLjo3yB2oR0ZKfu3U=; fh=pHEgU8vIZ2dKZDfo5+HnJ4jYKuwiESD1XRMEK8rBrI8=; b=rVw2UzW9iJst8IpL2Dt14zfIu0S6Ylj0g1/+f1V0ANqAOnbuSih60L19hZ3DutiUgx RD87uzosasLuI1Wf1DofeeAswDdH0SBgUGpjSbz73lsP6Q/NwlsLOzK0NuDon3f+8g1w XXXirzcM9CvSNwoesQa8kI3T5lOtsMQ3Oy/K2GZj4kYfqwTThyaOWqbkoH40jxAcKssv ZtkUNfgbAoGeQ/HwxtM+ddd3WafJe6L1yValhhxf3c2UtQJvcYMwnZa9cCGJ02T4uXs1 0P6uzrQWte2wUsYSTdANNyZ+tqivZf+Kt4qSwl0xHKgAYnTIdrMAoPADuGp8a5lJRvNc xQHA==; 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-149343-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149343-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. [147.75.199.223]) by mx.google.com with ESMTPS id bp34-20020a05620a45a200b0078ef8a52fdbsi356504qkb.723.2024.04.17.17.08.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 17:08:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-149343-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; 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-149343-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149343-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 14A631C2135F for ; Thu, 18 Apr 2024 00:08:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B5BA71E521; Thu, 18 Apr 2024 00:08:01 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 735FA15D1; Thu, 18 Apr 2024 00:07:58 +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=1713398881; cv=none; b=rQNzAAO+8soZYZyQLXUULPOLxI7GV4e5xXWp3hUj+lzOOxwX32BgjEEiSgX8xIOfn3z7sd53SoCPYIC8IAC+mBMod9Un8guMKe+m0cAz/UUgtlBLXyaYYUrEn2DawA8S8Nx7zyT77csCgxecIG+SRlnwUeAzd4MyniP9QA7ey4s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713398881; c=relaxed/simple; bh=Lx03dY0JM0T6hiG7Bo7KzhBJEfq4unQIvgy+uBgmf3s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=eoRLQ/O37sI4m7prohtrafM6C0RzXcwC5UIvWm+Ux4bPWg+ZHSV978hJKTdidda0oruhtBexB6EzoifHN9XoB3KIBKnZfPCgPxX0hJPbR0IUeAyTHOaZmDjkkoSu212ahvf1WLnjG54+FablshUpMcyIKR8/HFnK2hoD2Zp7myQ= 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 CA4AF339; Wed, 17 Apr 2024 17:08:25 -0700 (PDT) Received: from localhost.localdomain (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 132823F64C; Wed, 17 Apr 2024 17:07:55 -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 v2 4/5] mfd: axp20x: AXP717: Add support for boost regulator Date: Thu, 18 Apr 2024 01:07:35 +0100 Message-Id: <20240418000736.24338-5-andre.przywara@arm.com> X-Mailer: git-send-email 2.35.8 In-Reply-To: <20240418000736.24338-1-andre.przywara@arm.com> References: <20240418000736.24338-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 Reviewed-by: John Watts --- 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 d8ad4e120d379..02513b1eff2e8 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_IRQ0_STATE, AXP717_IRQ4_STATE), 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