From patchwork Thu Aug 3 06:37:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinbo Zhu X-Patchwork-Id: 13045 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp958814vqx; Thu, 3 Aug 2023 00:03:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlF1I+yDT0DZNb0tBGqyGt32nhF3z4MbU20dMC/pTC1P92F5k0jkLV6RqDGUWbEl38Ng+8+9 X-Received: by 2002:a05:6870:6494:b0:1ba:2e90:cc52 with SMTP id cz20-20020a056870649400b001ba2e90cc52mr13849838oab.5.1691046187515; Thu, 03 Aug 2023 00:03:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691046187; cv=none; d=google.com; s=arc-20160816; b=KbMk/NAeXCi1YT3Gk6knpgGab48HRRtf541bUaD9+LwLHoi6IRGFB/aIa9aENMpUqo 1XjE6yoX/CDGPL88k4Tw5Rx/GG4NR4oIfLlCY0Ne2+rn2f1an7t+IGozjOV+t8lCu35/ oC7GQS+WJgcVIifc6x8Q21pGnRP9N507jCYD49I+ZQgVLwR41MdVWzSP9ARIUzndlu4n cxUunny3fncm1S2RNS11Mz+PcAdapZn8X3YIkR/fAR+MJouVkkL1Pnvui/YaZgY2n2L9 6KVZkTiQ241TnReQJsZ4C+pzpsG1vPSSugKQaWRtARBQWGxlNI3rtAqyG9qPt1JZopMl jSVg== 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=cCwYYRoRSUkmFwNov4TsSsdQgpEwmNmqMhYp+frd1Fs=; fh=CDMdV8YNZllEoBj6x+BWdOQhWms+kWk61lPoBAFESPs=; b=DltKY0kic+rH6mHgubDzowYFP4VuMJOw1dYZ8x7nyw0QXyj0sgrylbNFvJnh2+7SKW fpeKCSIWTHUpA8JAsghQEuqgEyi3brlKv7x7xXERczuj2H8aUPOctY/MAJZXoCDQajo0 Fm8VaDTN1P6Er+NECtmw7tK1wnLR+e3Cf/JjtSZXVlJdsg6l8QbD4Kdnlf5kzXkgfCwa ATLIHdRb5h1j3Tf5/8obj69j/TFZObpLp2zK3PDhCXiYpLg3FnrQZ+FUsQgqyihYrCpI ds/vtcEp7Ivd6NPlnh5o2TCmX1bbKglcNdwQvGE49RUIUU30tIrcD6Kd+8Pj80n8Ly+I bAWg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u6-20020a17090a410600b00263a985aba5si2491400pjf.149.2023.08.03.00.02.54; Thu, 03 Aug 2023 00:03:07 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233417AbjHCGhf (ORCPT + 99 others); Thu, 3 Aug 2023 02:37:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233352AbjHCGh1 (ORCPT ); Thu, 3 Aug 2023 02:37:27 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 04D7130ED; Wed, 2 Aug 2023 23:37:22 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.201]) by gateway (Coremail) with SMTP id _____8AxCPIgS8tkD4YPAA--.35983S3; Thu, 03 Aug 2023 14:37:20 +0800 (CST) Received: from localhost.localdomain (unknown [10.20.42.201]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxF80aS8tkMsZGAA--.49295S2; Thu, 03 Aug 2023 14:37:17 +0800 (CST) From: Yinbo Zhu To: Arnd Bergmann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, soc@kernel.org, Ulf Hansson Cc: Jianmin Lv , wanghongliang@loongson.cn, Liu Peibao , loongson-kernel@lists.loongnix.cn, Yinbo Zhu , loongarch@lists.linux.dev, Liu Yun Subject: [PATCH v6 0/2] soc: loongson2_pm: add power management support Date: Thu, 3 Aug 2023 14:37:01 +0800 Message-Id: <20230803063703.5659-1-zhuyinbo@loongson.cn> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CM-TRANSID: AQAAf8CxF80aS8tkMsZGAA--.49295S2 X-CM-SenderInfo: 52kx5xhqerqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7 ZEXasCq-sGcSsGvfJ3UbIjqfuFe4nvWSU5nxnvy29KBjDU0xBIdaVrnUUvcSsGvfC2Kfnx nUUI43ZEXa7xR_UUUUUUUUU== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: INBOX X-GMAIL-THRID: 1773190442236258462 X-GMAIL-MSGID: 1773190446596936454 Loongson-2 platform support Power Management Controller (ACPI) and this series patch was to add PM driver that base on dts and PM binding support. Change in v6: 1. The patch "[PATCH v3 1/3] loongarch: export some arch-specific pm interfaces" had been merged into mainline tree in v6.5-rc1 thus this v6 series patch need drop it and need depend on it and it's patch link was: https://lore.kernel.org/all/20230615091757.24686-2-zhuyinbo@loongson.cn/ 2. Adding Ulf Hansson to Cc. 3. Adding soc@kernel.org to Cc. 4. Keep indented with one tab +2 spaces in Kconfig help text. Change in v5: 1. The patch "[PATCH v3 1/3] loongarch: export some arch-specific pm interfaces" had been merged into linux-next tree thus this v4 series patch need drop it and need depend on it and it's patch link was: https://lore.kernel.org/all/20230615091757.24686-2-zhuyinbo@loongson.cn/ 2. Swap the positions of compatible for 2k1000 and 2k0500. Change in v4: 1. The patch "[PATCH v3 1/3] loongarch: export some arch-specific pm interfaces" had been merged into linux-next tree thus this v4 series patch need drop it and need depend on it and it's patch link was: https://lore.kernel.org/all/20230615091757.24686-2-zhuyinbo@loongson.cn/ 2. Remove the pmc label in dt-binding patch. 3. Add the Co-developed-by for driver patch. 4. Simplify the loongson2_suspend_valid_state that "return (state == PM_SUSPEND_MEM)". 5. Use Using loongson2_pm_irq_enable() to replace. loongson2_power_button_irq_enable(). 6. Remove the "oneOf" in dt-bindings patch. 7. Replace "suspend-address" that use "loongson,suspend-address". 8. Use u64 type that for "loongson,suspend-address". 9. Rename "pm" to "power-mangement" in dt-bindings patch. 10. Add the reivewed-by for dt-bindings patch. Change in v3: 1. Reword the [1/3] patch commit log and title. 2. Use the old naming for suspend interface for the [1/3] and [3/3] patch. 3. Combine some small function in the driver patch. 4. Rename 'pwrbt' to 'button' in the driver patch. 5. Use the specific compatible in yaml file. Change in v2: 1. Fixup the "suspend-address" description. 2. Remove the "return -EINVAL" in PM driver probe when firmware no configure "suspend-address" property in dts in oder to other PM state to work. Yinbo Zhu (2): soc: dt-bindings: add loongson-2 pm soc: loongson2_pm: add power management support .../soc/loongson/loongson,ls2k-pmc.yaml | 52 +++++ MAINTAINERS | 7 + drivers/soc/loongson/Kconfig | 10 + drivers/soc/loongson/Makefile | 1 + drivers/soc/loongson/loongson2_pm.c | 215 ++++++++++++++++++ 5 files changed, 285 insertions(+)