From patchwork Mon Sep 18 09:37:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 13389332 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 767B2CD37B0 for ; Mon, 18 Sep 2023 09:38:57 +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=nL6jCnHqcdgREpFZx/cWSyFl9UYfkqDE2k5RDuBOlDU=; b=httZgW6k56i47Q rjtmWHPit3mqlZHZo/MR9d5zrvWMpIIYoXu6MnBPZx3/mNl2Agh/4Xiwi5goGK6vSAaH+OmtByCus klCLO4VPc+Z3JvrpfMf3wlcYXF17+CB38hZ1AD9NfhL5GvMmRfjnUrXIGoZ4uq2CA1gDwWsNEjvgp P77fyWRIEvDfWH6JKF8OV2JAiaByPitSGXiAOvBmRHiO34Sl8/U+Wd7RG0lerMGf9jDvOrj+F1n1h CZHnifvF3PfMUyuOfrzxkchoyWrzxuDmoDiB/dj45wjQwi2RtC6x7vygab6uBo7zXIfxQnuCHgfI5 VJouYXCnTdUa/5zUTpQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qiAi6-00Exui-0m; Mon, 18 Sep 2023 09:38:30 +0000 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qiAhz-00Exom-0S for linux-arm-kernel@lists.infradead.org; Mon, 18 Sep 2023 09:38:24 +0000 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2c00b37ad84so12354421fa.0 for ; Mon, 18 Sep 2023 02:38:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1695029898; x=1695634698; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=7qMynowtM6sO6WhIunL19I1lsaUMnQPIdw7sq9xV6Eg=; b=SSCQduHH/pXQ/+O//pCj7lpWnp5wk8wWDyKRQu5oN//hMQOGJKOjIAEHETJqJAmCOK iUvN+ae6/LfOApn9qTD0lnSnUMJ+uJ7C0egVN/jCAi0E46fnc0bDrQCdAxTvI46ke371 CPC4XYmz5euWTpz2sYBP8N9kjqiGCg1QVFuDMRQ8Qs9Mbbp/N8x5DgSAS+JbxXXc6TEB THkA+oDZzFIBI/t0LSFunikdOOHS0y5V0upWP9lsck3OwxHkwuxlxjuDg4IymvFU2FGx TUkuVpqsZ9reUym+UnU3b17zsSXDxrpK6sseGswJTavypE+AcCQvvKNcCSAeG1yKRuQX IbLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695029898; x=1695634698; 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=7qMynowtM6sO6WhIunL19I1lsaUMnQPIdw7sq9xV6Eg=; b=Pv/wC3CW+Zltj0ULMJEbpXcoAtb5Zm70Mmiq6bfB96JqUr8PUfJO1IRCEMh5tDDplp KwDXbK7pRoQNGfx0vGwFx3BHrUIfegru9hCNWOIx/WyANVQ0IlxtXdQBTWqI5Tu7SRLF ptk+0XFRY1Zs1P+PvYpP2b8cqyvek7GR390j9Co6u8VdlmcImKEHMcYQJe9t6seDjxJK bnDGBQ7dCmf0B0Y6kGZ0j1D07/AIYqd9DJWjfCyaW393t/ZOoT34Top/XSLUq6nUHHDL etjc1AdMDxZ+Tf3hv1QCj5X90o8+WhPpgWlT+tDeaNX5P11Ps7GmDTFovCkOGk2xqR9m 2OmA== X-Gm-Message-State: AOJu0Yx3VILkkAsn7Hy03tod2Mp/WwbPqlL+gCefhh72pk+0BrlVxJqo G4zXN0nCpigvx5dQ6IKWu+2X7g== X-Google-Smtp-Source: AGHT+IGp45ZVIMqUnpyNlGTjOczPJW9+COazaydZ4vg+A0aUFwj9VUvBstOriVWXiS7GXoKBhC6xIQ== X-Received: by 2002:a2e:a41c:0:b0:2bf:7dc5:884d with SMTP id p28-20020a2ea41c000000b002bf7dc5884dmr6984504ljn.21.1695029897811; Mon, 18 Sep 2023 02:38:17 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:8222:872:4a5b:b69c:1318]) by smtp.gmail.com with ESMTPSA id o10-20020a1709061d4a00b0099293cdbc98sm6251164ejh.145.2023.09.18.02.38.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 02:38:17 -0700 (PDT) From: Markus Schneider-Pargmann To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger Cc: Ulf Hansson , Alexandre Mergnat , Chun-Jie Chen , AngeloGioacchino Del Regno , Tinghan Shen , Fabien Parent , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Markus Schneider-Pargmann Subject: [PATCH v8 0/8] soc: mediatek: MT8365 power support Date: Mon, 18 Sep 2023 11:37:44 +0200 Message-Id: <20230918093751.1188668-1-msp@baylibre.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230918_023823_179012_250D9BAA X-CRM114-Status: GOOD ( 17.23 ) 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, no real changes in this update. Rebase to v6.6-rc2 and according change of directory. Thanks for any feedback! Best, Markus Based on v6.6-rc2 Changes in v8: - Rebased to v6.6-rc2 - Moved changes from drivers/soc to drivers/pmdomain Changes in v7: - Rebased to v6.5-rc1 - Fixed a couple of small style issues pointed out by Angelo Changes in v6: - Change flags field to be u8 instead of u32 - Use macro concatenation to simplify BUS_PROT macros: BUS_PROT_WR(_hwip, ...) etc. - Use the final bit values for scpsys_bus_prot_flags from the beginning of the series. - Changed scpsys_domain_data->caps to be u16 to accommodate the new flag MTK_SCPD_STRICT_BUS_PROTECTION. Changes in v5: - Create defines for all registers and bits in mt8365 power domain patch - Redesign scpsys_bus_prot_data to use flags to store reg_update, clr_ack as well as the difference between SMI and INFRACFG. The code uses the appropriate regmap depending on the flags. - The WAY_EN patch now uses two flags, one for inverted operations 'BUS_PROT_INVERTED' and one to use infracfg-nao for the status flags 'BUS_PROT_STA_COMPONENT_INFRA_NAO'. Changes in v4: - Redesigned WAY_EN patch and split it up in smaller patches. - Added two documentation patches. - Added mediatek,infracfg-nao field to the binding. Changes in v3: - Mainly redesigned WAY_EN patch to be easier to understand - Rebased onto v6.0-rc1 - Several other stuff that is described in the individual patches Changes in v2: - Updated error handling path for scpsys_power_on() - Minor updates described in each patch Previous versions: v1 - https://lore.kernel.org/linux-mediatek/20220530204214.913251-1-fparent@baylibre.com/ v2 - https://lore.kernel.org/linux-mediatek/20220725081853.1636444-1-msp@baylibre.com/ v3 - https://lore.kernel.org/linux-mediatek/20220822144303.3438467-1-msp@baylibre.com/ v4 - https://lore.kernel.org/linux-arm-kernel/20230105170735.1637416-1-msp@baylibre.com/ v5 - https://lore.kernel.org/linux-arm-kernel/20230619085344.2885311-1-msp@baylibre.com/ v6 - https://lore.kernel.org/linux-arm-kernel/20230627131040.3418538-1-msp@baylibre.com/ v7 - https://lore.kernel.org/linux-arm-kernel/20230713150414.891893-1-msp@baylibre.com Alexandre Bailon (2): soc: mediatek: Add support for WAY_EN operations soc: mediatek: Add support for MTK_SCPD_STRICT_BUS_PROTECTION cap Fabien Parent (2): dt-bindings: power: Add MT8365 power domains soc: mediatek: pm-domains: Add support for MT8365 Markus Schneider-Pargmann (4): soc: mediatek: pm-domains: Move bools to a flags field soc: mediatek: pm-domains: Split bus_prot_mask soc: mediatek: pm-domains: Create bus protection operation functions soc: mediatek: pm-domains: Unify configuration for infracfg and smi .../power/mediatek,power-controller.yaml | 6 + drivers/pmdomain/mediatek/mt6795-pm-domains.h | 16 +- drivers/pmdomain/mediatek/mt8167-pm-domains.h | 20 +- drivers/pmdomain/mediatek/mt8173-pm-domains.h | 16 +- drivers/pmdomain/mediatek/mt8183-pm-domains.h | 125 ++++++---- drivers/pmdomain/mediatek/mt8186-pm-domains.h | 236 ++++++++++-------- drivers/pmdomain/mediatek/mt8188-pm-domains.h | 223 +++++++++++------ drivers/pmdomain/mediatek/mt8192-pm-domains.h | 112 ++++++--- drivers/pmdomain/mediatek/mt8195-pm-domains.h | 199 +++++++++------ drivers/pmdomain/mediatek/mt8365-pm-domains.h | 197 +++++++++++++++ drivers/pmdomain/mediatek/mtk-pm-domains.c | 157 ++++++++---- drivers/pmdomain/mediatek/mtk-pm-domains.h | 51 ++-- .../dt-bindings/power/mediatek,mt8365-power.h | 19 ++ include/linux/soc/mediatek/infracfg.h | 41 +++ 14 files changed, 972 insertions(+), 446 deletions(-) create mode 100644 drivers/pmdomain/mediatek/mt8365-pm-domains.h create mode 100644 include/dt-bindings/power/mediatek,mt8365-power.h base-commit: ce9ecca0238b140b88f43859b211c9fdfd8e5b70