From patchwork Thu Aug 3 07:42:41 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: 13339476 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 5486CC0015E for ; Thu, 3 Aug 2023 07:43:36 +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:References:In-Reply-To: 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: List-Owner; bh=yC2hFasBhN6GdxEUpcIoddafqg/zs8Sg53xRwuI5l5E=; b=oxNpcE3fjj4MFB bO3hotIXqCQithjzzJI1JsQsTkXK01Z2wfNtlNVZ8N+J8k2mkIdCoKJdwZ7NSVmOzXKF1eOPwQdkK ByLxwGDStj0p0r/x0yaWMYW9RCkXN1WilR4WMEjCjE8q/dsUyHO9fduDn0HjxRUrstQG8a6piYg9E w6SC7xXbFxBXnoqrGwkRlq1oAhX4ssOOaiyZT0CVtHMqCbGW9yDB7aHwci9rRVnLRVHA0SZLA5qQC pPwWc1LtQmpdvtCquAD7gXEdGn/DkCJnWZubxJb1ruAQR9uI/hCJYDDfKKa2kNI839fwItXceFFyv efjEOiDnWsksLQlyJocQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qRSzG-006uBT-1C; Thu, 03 Aug 2023 07:43:10 +0000 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qRSzC-006u7n-34 for linux-arm-kernel@lists.infradead.org; Thu, 03 Aug 2023 07:43:08 +0000 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1bc3d94d40fso5866535ad.3 for ; Thu, 03 Aug 2023 00:43:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1691048585; x=1691653385; 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=0qupwZObmmk0/sdY9oZ6qJIIOW7j+/1bq8fINDZIIlo=; b=iuw6BH7uxiaSd8Em4i2OVoxw9xOQqLbcZoPiSw5kiOmF8T+bhab7wAMcmOxJJ7Hmpi MNKPP/N4/aFleUK4RWH5+LhgCg5aL9Wt5DNlukiGWxm5GtOn8OEE1JXNQSmyJCIXyS8c tUXmKwYpnBorP0BECIRrJ9/KO1SX5Ir0MwtFE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691048585; x=1691653385; 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=0qupwZObmmk0/sdY9oZ6qJIIOW7j+/1bq8fINDZIIlo=; b=J22RE+WrMg55B6gi8TISGTP0G/L0BBaHGpCBlzyyk5LC/4dW+P+ZLS/Tz045yIFjNZ VFduNntiSxaIMfWsl/wGHSTj5b/RpyjSzvOBQaHmH9VWxfMvYAzPqPSvIt1JjUM/WVj4 yUwVZcHxdq8OUDwmtP4q2d6OTmFgaTXjibXB4LEb7cFjp9Dya/TeRzZVXoWCFdOpqERW duiln0hC0eUG35IapeRqsLjO6V/9qdDVXVa/Dc4X1jUdBY77TutdcXMW+ONqDJ8N2XmK x2lQazZixmdRRJkwDqq68fGmTaCMkx5NyB+WdfdRc96/hyQr5U+dmafXIVOhjFNeaBsF aoFA== X-Gm-Message-State: ABy/qLbwEiOtdQgO3Tdd3c0KBwKugnPlBMMJw2J7TKW3XD4xcJfa/+IY fsZQv5qwGHsXJ/926yJNihootg== X-Google-Smtp-Source: APBJJlG87/Ro7nZXzml9fmHTU6Ab8cH9lat6x4i0wjt2yZq9zHMRteYWrxBWgji+jke4gg8BS4lUxQ== X-Received: by 2002:a17:90a:7f8d:b0:263:72fe:3ef7 with SMTP id m13-20020a17090a7f8d00b0026372fe3ef7mr15974468pjl.42.1691048585544; Thu, 03 Aug 2023 00:43:05 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:6f3e:66ee:db46:473b]) by smtp.gmail.com with ESMTPSA id l11-20020a17090a72cb00b00262d079720bsm2095753pjk.29.2023.08.03.00.43.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Aug 2023 00:43:05 -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 3/9] mfd: mt6397: Split MediaTek MT6366 PMIC out of MT6358 Date: Thu, 3 Aug 2023 15:42:41 +0800 Message-ID: <20230803074249.3065586-4-wenst@chromium.org> X-Mailer: git-send-email 2.41.0.585.gd2178a4bd4-goog In-Reply-To: <20230803074249.3065586-1-wenst@chromium.org> References: <20230803074249.3065586-1-wenst@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230803_004306_994199_8A4EFFA2 X-CRM114-Status: GOOD ( 15.03 ) 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 The MT6366 PMIC is mostly, but not fully, compatible with MT6358. It has a different set of regulators. Specifically, it lacks the camera related VCAM* LDOs, but has additional VM18, VMDDR, and VSRAM_CORE LDOs. Add a separate compatible for the MT6366 PMIC. The regulator cell for this new entry uses a new compatible string matching MT6366. Fixes: c47383f84909 ("mfd: Add support for the MediaTek MT6366 PMIC") Signed-off-by: Chen-Yu Tsai --- drivers/mfd/mt6397-core.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c index f6c1f80f94a4..3f8dfe60a59b 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c @@ -206,6 +206,26 @@ static const struct mfd_cell mt6359_devs[] = { }, }; +static const struct mfd_cell mt6366_devs[] = { + { + .name = "mt6358-regulator", + .of_compatible = "mediatek,mt6366-regulator" + }, { + .name = "mt6358-rtc", + .num_resources = ARRAY_SIZE(mt6358_rtc_resources), + .resources = mt6358_rtc_resources, + .of_compatible = "mediatek,mt6358-rtc", + }, { + .name = "mt6358-sound", + .of_compatible = "mediatek,mt6358-sound" + }, { + .name = "mt6358-keys", + .num_resources = ARRAY_SIZE(mt6358_keys_resources), + .resources = mt6358_keys_resources, + .of_compatible = "mediatek,mt6358-keys" + }, +}; + static const struct mfd_cell mt6397_devs[] = { { .name = "mt6397-rtc", @@ -280,6 +300,14 @@ static const struct chip_data mt6359_core = { .irq_init = mt6358_irq_init, }; +static const struct chip_data mt6366_core = { + .cid_addr = MT6358_SWCID, + .cid_shift = 8, + .cells = mt6366_devs, + .cell_size = ARRAY_SIZE(mt6366_devs), + .irq_init = mt6358_irq_init, +}; + static const struct chip_data mt6397_core = { .cid_addr = MT6397_CID, .cid_shift = 0, @@ -358,6 +386,9 @@ static const struct of_device_id mt6397_of_match[] = { }, { .compatible = "mediatek,mt6359", .data = &mt6359_core, + }, { + .compatible = "mediatek,mt6366", + .data = &mt6366_core, }, { .compatible = "mediatek,mt6397", .data = &mt6397_core,