From patchwork Tue Aug 22 08:45:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 13360365 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 CD605EE49AC for ; Tue, 22 Aug 2023 08:46:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=KGq45fMEIak5yzYlKu5sacHL+jquWn3f7ZVmDvau/tI=; b=pWMc5KdgUj9Qnj L1R90YpMdqSAUDg1ITnH2PPejBwhr7iw5sW5wTfwsmIRRk18L274HTVvbKHYMUcAwScE6TI/yebiu oR/523Dma+iyAqs4sYYEtYjdvNEJSYbOjfk8acYddXFMmsy6LuHpBAsYX/4jn5Q/7OALhWJF3+CnI iwFNbj0A355BO2lqNyaBBl0rdMc7LEGZpPsIVz198DVoNTNcdse4AnST7M8u237ExCHgCTLi9EdjL 47kezzku/3hmUX8JeRbwSZ1ZQ73cEpu9hwX8Cx8aUglQoESSned2NAh7GhZ/awTXd76suxdXDEjdY Mn4r8wnlfZqKNPWjFxSQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qYN18-00FU5f-1j; Tue, 22 Aug 2023 08:45:38 +0000 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qYN14-00FU2e-30 for linux-arm-kernel@lists.infradead.org; Tue, 22 Aug 2023 08:45:36 +0000 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-689f9576babso2746263b3a.0 for ; Tue, 22 Aug 2023 01:45:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1692693930; x=1693298730; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=l4e8PiVON5BPxeakGTSUHXhgF5XGViH7EDdI7UeL+GU=; b=a7utS6SkklK51hKqpdsgD/pL/5tiCWABxQrWN+tmBd/pYSitBnMC6dkpENe7hllgc3 Tdv+f/Gw2xkhqAZHwjg6so6jBzT1+3azaTNLcDn7D3kxMTN1nfj+pS1mz2SqtUo0vo0V jG80BWmyWsbONaKs8igg1RoyMw6Iy/+VdixR0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692693930; x=1693298730; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=l4e8PiVON5BPxeakGTSUHXhgF5XGViH7EDdI7UeL+GU=; b=AjhZunJwOG7rW2hjnjJFh9/TYWfrIwEFvnvDytUEsMczbyyq+dT4/wf3Tj9TnSO86n 1lbXxGtcCcrWdKg1zwgj8uZuqlqlIIsyJ+k/fSjgjQhVxoy2UwZZ2ZDT5NVVTupZah9a zFQCP5MCZ0P6rrxzkfLiyX4tdFh86IBtmeUKLT3CAk+KC6BX724gLKtK3HrxZPjd97Fd o95CHSeX6KPtp06j1Jp1ujPSY4Tx/WD3wZQ3RHHLOEHcLdlLEQeULZsZl2c+jqcqfqtB ag9sH1uWfYJrGTbo0BuT5OcOw9EALDPBbRecAq8np6X/tIE0petFNzMV60Xz2Q3aWdfD 9+BA== X-Gm-Message-State: AOJu0YzlIwvUoNNBjPU+PBrLQLCgcq2vl/wIx/Aqj5t0nn/5hU2CtFwC H8lprrELDDqJCfUmV6xmc85Ps6Y92n1AunBIOKM= X-Google-Smtp-Source: AGHT+IHrUJp3u16TQLqsQBn/YzOe1/lMaTSHKy4q2aDEAGU4yyXKLxhonCzC+Uan8vuJoILuBL3rXw== X-Received: by 2002:a05:6a20:650:b0:13e:8ce5:bedd with SMTP id 16-20020a056a20065000b0013e8ce5beddmr7786724pzm.1.1692693930539; Tue, 22 Aug 2023 01:45:30 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:e619:3fa0:1a90:6bb0]) by smtp.gmail.com with ESMTPSA id s26-20020aa78d5a000000b00666b012baedsm7304790pfe.158.2023.08.22.01.45.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Aug 2023 01:45:30 -0700 (PDT) From: Chen-Yu Tsai To: Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Mark Brown Cc: Chen-Yu Tsai , Zhiyong Tao , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH v2 00/11] regulator: mt6366: Split out of MT6358 and cleanup Date: Tue, 22 Aug 2023 16:45:08 +0800 Message-ID: <20230822084520.564937-1-wenst@chromium.org> X-Mailer: git-send-email 2.42.0.rc1.204.g551eb34607-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230822_014534_967445_7FAAFB90 X-CRM114-Status: GOOD ( 23.14 ) 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 Hi everyone, This is v2 of my MT6366 PMIC split-out-of-MT6358 cleanup series. The two PMICs are mostly identical, except for the regulator bits. The MT6366 is missing the VCAM* (camera related) LDOs, but in their place has a few other ones. This thus requires a separate compatible to handle the differences. Changes since v1: - Switched to using MT6358 compatible as fallback compatible Differences are detected through chip ID register - MT6366 regulator binding merged with MT6358 one instead of having two separate ones - Added patches - regulator: dt-bindings: mt6358: Convert to DT schema - regulator: dt-bindings: mt6358: Add regulator supplies - regulator: mt6358: Add supply names for MT6358 regulators - arm64: dts: mediatek: mt8183-kukui: Add PMIC regulator supplies These bring MT6358 regulators to the same completeness level as MT6366 - Dropped patch "mfd: mt6397: Split MediaTek MT6366 PMIC out of MT6358" - Dropped patch "soc: mediatek: pwrap: add support for MT6366 PMIC" This depends on my previous "regulator: mt6358: Remove bogus regulators and improvements" series [1]. The series is still in flight, but I think posting this earlier would help get reviews underway. Patch 1 add a compatible string for the MT6366 PMIC, with a fallback to the MT6358 one. Patch 2 adds new register definitions for the MT6366-specific regulators. These two should go through the MFD tree and put on an immutable branch for the regulator tree to consume patch 2. Patch 3 converts the existing MT6358 regulator DT binding to DT schema. Patch 4 adds regulator supply properties to the MT6358 regulator binding. Patch 5 adds MT6366 regulators to the MT6358 regulator binding. This was previously done by Zhiyong Tao [2] from MediaTek as a separate binding file. I cleaned up the patch based on previous review comments, simplified the regulator names, and added regulator supplies. Bogus regulators were also dropped, like what was done for the MT6358 [1]. In v2 this was merged with the MT6358 binding, now converted to DT schema. Patch 6 adds support for the regulator supplies to the MT6358 regulator driver. Patch 7 simplifies the MT6366 regulator names to match the new names specified in the binding. Patch 8 makes the MT6366 VCN18 LDO regulator configurable. This is one of the differences between the MT6358 and MT6366. Patch 9 adds regulators that were missing from the originally proposed binding and driver. Patch 10 adds regulator supply names to the MT6366 regulators Patch 11 adds regulator supplies to MT8183 Kukui boards. As mentioned, patches 1 and 2 should go through the mfd tree on an immutable branch. patches 3 through 10 should go through the regulator tree, on top of the aforementioned immutable branch. Patch 11 should go through the MediaTek tree. [1] https://lore.kernel.org/linux-arm-kernel/20230721082903.2038975-1-wenst@chromium.org/ [2] https://lore.kernel.org/linux-arm-kernel/20220823123745.14061-1-zhiyong.tao@mediatek.com/ Chen-Yu Tsai (10): dt-bindings: mfd: mt6397: Split out compatible for MediaTek MT6366 PMIC mfd: mt6358: Add registers for MT6366 specific regulators regulator: dt-bindings: mt6358: Convert to DT schema regulator: dt-bindings: mt6358: Add regulator supplies regulator: mt6358: Add supply names for MT6358 regulators regulator: mt6358: fix and drop type prefix in MT6366 regulator node names regulator: mt6358: Make MT6366 vcn18 LDO configurable regulator: mt6358: Add missing regulators for MT6366 regulator: mt6358: Add supply names for MT6366 regulators arm64: dts: mediatek: mt8183-kukui: Add PMIC regulator supplies Zhiyong Tao (1): regulator: dt-bindings: mediatek: Add MT6366 PMIC .../devicetree/bindings/mfd/mt6397.txt | 4 +- .../regulator/mediatek,mt6358-regulator.yaml | 249 +++++++++++++ .../bindings/regulator/mt6358-regulator.txt | 350 ------------------ .../arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 28 ++ drivers/regulator/mt6358-regulator.c | 237 +++++++----- include/linux/mfd/mt6358/registers.h | 17 + include/linux/regulator/mt6358-regulator.h | 3 + 7 files changed, 436 insertions(+), 452 deletions(-) create mode 100644 Documentation/devicetree/bindings/regulator/mediatek,mt6358-regulator.yaml delete mode 100644 Documentation/devicetree/bindings/regulator/mt6358-regulator.txt