From patchwork Mon Jan 16 14:24:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 4065 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1231819wrn; Mon, 16 Jan 2023 06:52:40 -0800 (PST) X-Google-Smtp-Source: AMrXdXuUCQWSKxSyb2jbi1zxNePssylSESaihB40rdA4fp0JFpbF09zYSSr54lzFoKX8zqW+MjBU X-Received: by 2002:a17:902:7c8d:b0:194:9c02:6ea1 with SMTP id y13-20020a1709027c8d00b001949c026ea1mr139051pll.0.1673880760301; Mon, 16 Jan 2023 06:52:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673880760; cv=none; d=google.com; s=arc-20160816; b=GG2QI7MEmy57L4Cz0FAC8He+3orO/bt4n5xdnFNd2VLxOqj1+2fJdalAiQwspK9Jxc Ne3ymY5WHk4++8opVWgXKPAIeD/8wumM0YGIlI3YHTtYrvOA6kfEJdD+wjX7EYxw4hE5 mMmjNd06oepqFOd8uLZ09vCr6YWgy6OzXvkpjcj3NTW2uwweKB//TzHh2GCvFE+DKQS8 c07N17US3HmS4TMQI6JYUIEwllRQzvVdio0UlIAcXAMJvLBSrCm5GEItl8xvcvxP2QsI bQGfAkas4CaO3aBO4WRzcjXwFI8LeDQpMwgg2SG3z1EZrZLZN5SR6y0mbSsBLnfKVbxK Qw5Q== 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 :message-id:date:subject:cc:to:from; bh=5ATn2lpTN1nr1ak4GdcluMppOU3Z3rEs4imz+LMiH+Q=; b=B1gxrtyzRK3iet71B86FLC0+ywWvIRROs0MQE9+iOiC/5sF8nUPd3cs7NQ1uzDLuc5 buJIWBXZToy/aCnK4peeRbNwKgj2G1Pu6cKU0vBfY6oGg0nScREjfC+tdvGVulVCPEQG GUGetZeAcjkaCX956DVx/EEzRAA8IJH27IS7PsPerbgacWhgH8j5aWoCHidG0jbI0JBU 4+w97BOlg16flbp7Fau0jcIsSB75spiu5x3rgWQX8X51n5w/XUhJK33qN6zTbiwjRqL9 SyqA0KNMKuWR2I9et48zkTtyRcHOm5Z9br//4N1Rj3I4/ZCxIC1mSLDTfGp2DoqikkYR Bx2w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bf1-20020a170902b90100b0019332c24afasi21633706plb.166.2023.01.16.06.52.28; Mon, 16 Jan 2023 06:52:40 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229596AbjAPOpw (ORCPT + 99 others); Mon, 16 Jan 2023 09:45:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230074AbjAPOpS (ORCPT ); Mon, 16 Jan 2023 09:45:18 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 11E6D27497 for ; Mon, 16 Jan 2023 06:25:24 -0800 (PST) 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 C7FB8C14; Mon, 16 Jan 2023 06:26:06 -0800 (PST) Received: from donnerap.cambridge.arm.com (donnerap.cambridge.arm.com [10.1.197.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 086C23F67D; Mon, 16 Jan 2023 06:25:22 -0800 (PST) From: Andre Przywara To: Liam Girdwood , Chen-Yu Tsai , Mark Brown , Lee Jones , Martin Botka Cc: Rob Herring , Krzysztof Kozlowski , martin.botka1@gmail.com, Samuel Holland , Jernej Skrabec , linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v6 0/3] regulator: Add X-Powers AXP313a PMIC support Date: Mon, 16 Jan 2023 14:24:58 +0000 Message-Id: <20230116142501.767142-1-andre.przywara@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755191192020904697?= X-GMAIL-MSGID: =?utf-8?q?1755191192020904697?= This patch series adds support for the X-Powers AXP313a PMIC, which is often bundled with Allwinner H616 or H313 SoCs. I have taken over from Martin at least for this revision, as he is busy at the moment. Up to v5 this was speaking of the AXP1530, which seems to be some internal name. The chips we have seen in the wild are all labeled AXP313a, so we go with this name here, from now on. This is supported by the fact that there is an AXP313a datasheet, but none for the AXP1530. Patch 1 is the binding documentation (just the new compatible string), patch 2 adds the MFD bits (mostly describing the extent of the regmap), while patch 3 describes the actual AXP313a register definitions. Since this ties neatly into the existing AXP and generic regulator framework, the patches are indeed only structure definitions, there is no new code. For now I papered over this "fixed customizable" RTC-LDO regulator in the same way this was done before for other PMICs (AXP803, for instance), I think we can fix this properly with a follow-up patch, for all instances. Please have a look! Cheers, Andre Changelog: v5 .. v6: - change name from AXP1530 to AXP313a - extend commit messages - drop AXP*_FREQUENCY register (not used anyway) - better vertically align struct definitions - rename IRQs to match names used for other PMICs - add RTC_LDO regulator - use decimal numbers for selector ranges - use macro definitions to name some values - force DC/DC switching frequency to be fixed at 3 MHz - change LDO source supply to VIN1 (as per datasheet) v4 .. v5: - Use alphabetical ordering in mfd - Correct { placement line - Replace spaces with tabs in 1 struct v3 .. v4: - Fix indentation v2 .. v3: - Move AXP1530 dt-binding to alphabetical order v1 .. v2: - Remove RSB support. - Drop .id = 0 - Add dt-binding for the AXP1530 Martin Botka (3): dt-bindings: mfd: x-powers,axp152: Document the AXP313a variant mfd: axp20x: Add suppport for AXP313a PMIC regulator: axp20x: Add support for AXP313a variant .../bindings/mfd/x-powers,axp152.yaml | 1 + drivers/mfd/axp20x-i2c.c | 2 + drivers/mfd/axp20x.c | 61 +++++++++++++++++++ drivers/regulator/axp20x-regulator.c | 60 ++++++++++++++++++ include/linux/mfd/axp20x.h | 32 ++++++++++ 5 files changed, 156 insertions(+)