From patchwork Wed May 10 01:53:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Changhuang Liang X-Patchwork-Id: 9110 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3301337vqo; Tue, 9 May 2023 18:55:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ72LYo0ryj2AVgqVuWGEo5edK1P36wmpCKN7TPveE/miLeorK4XBYDDMD5da6fQIVXGOA28 X-Received: by 2002:a05:6a20:9192:b0:f3:2d33:de72 with SMTP id v18-20020a056a20919200b000f32d33de72mr20038460pzd.21.1683683740937; Tue, 09 May 2023 18:55:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683683740; cv=none; d=google.com; s=arc-20160816; b=M54qj3aGI0jZkTotE0Ephta/kA+ZAf/vWXPbivUUDLrLNPC+0VIFGGGraENOqVkJV0 H48RMMsE9s9/21WgyM7WtPPui+gk5vZY3IU4ZAu3TLh09OIIDqkdkD5ftJ7atuNqEqeN EVezSlcr14MggPc5JqML6RuyjzOZJWejxgnZzcbWbGtRHVi7HEjdGHZrhvBHirF7R4/6 blMduu4/M9movIMy5pIoOvKa4Hm/OrnTunnoSIcldttmtlaAOj3pmMOFYl+Rqy/VhuNp wO/wFdwzKVl7DTncv0VhB7+7/GP3TNtZCeqmhpN+0s1MfFKmaPt+XTrFYLn9MRYc6jJz poXw== 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=780a1kTaE2I0OZWdmCRAtQct+eDaDx6IqHuBb+IkM5s=; b=EWKXNUFVK15g6ROBDgHoPm6p6GCVrkvjUqNlM2enHiqzCwXQGbqwEYsbcX0HL3iwDk uPBm2um+sN50xNBpkjII7O080le6nSSff9mb2V5AhY0S3/yFa4e4DhTEykiUaFDgwRlC +RVkQcjv1+dMNGuBZAAWJc5b4T4YV+9Da+L3gKDeIwmfUwMCoX3GZ+mX2MuhVNQxJgSw 3nsqJ8VTjQoTdfhqxhh2UnbMfv+TkIk3ejRwM2z0zQtCoEMuf7QO+f6oiseb88zti7bw eQxHaPJMuNza6Lem13yiXJLkxTfWoDYuqfukAuRjsb1UFaroRME3brfEG2GAHh6g5vQA FPIQ== 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 bv187-20020a632ec4000000b0050726756edesi2755774pgb.76.2023.05.09.18.55.25; Tue, 09 May 2023 18:55:40 -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 S235457AbjEJBxc convert rfc822-to-8bit (ORCPT + 99 others); Tue, 9 May 2023 21:53:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229549AbjEJBxW (ORCPT ); Tue, 9 May 2023 21:53:22 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BD231721; Tue, 9 May 2023 18:53:20 -0700 (PDT) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 066CF24E199; Wed, 10 May 2023 09:53:14 +0800 (CST) Received: from EXMBX062.cuchost.com (172.16.6.62) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 10 May 2023 09:53:13 +0800 Received: from ubuntu.localdomain (183.27.98.219) by EXMBX062.cuchost.com (172.16.6.62) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 10 May 2023 09:53:12 +0800 From: Changhuang Liang To: Rob Herring , Krzysztof Kozlowski , Emil Renner Berthing , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou CC: Walker Chen , Changhuang Liang , Hal Feng , , , Subject: [PATCH v3 0/5] Add JH7110 AON PMU support Date: Tue, 9 May 2023 18:53:06 -0700 Message-ID: <20230510015311.27505-1-changhuang.liang@starfivetech.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [183.27.98.219] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX062.cuchost.com (172.16.6.62) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765470362344745063?= X-GMAIL-MSGID: =?utf-8?q?1765470362344745063?= This patchset adds aon power domain driver for the StarFive JH7110 SoC. It is used to turn on/off dphy rx/tx power switch. It also can use syscon operation. The series has been tested on the VisionFive 2 board. This patchset should be applied after the patchset [1]: [1] https://lore.kernel.org/all/20230401111934.130844-1-hal.feng@starfivetech.com/ changes since v2: - Updated commit message. - Changed "starfive,jh7110-aon-pmu" to "starfive,jh7110-aon-syscon". - Dropped patch 3: Modify ioremap to regmap. - Changed "pmu_parse_dt" to "pmu_parse_irq". - Dropped "pmu_parse_dt" function in aon pmu. - Changed copyright to "2022-2023" in "starfive,jh7110-pmu.h". - Replaced regread/regwrite operation with io_read/io_write operation. v2: https://lore.kernel.org/all/20230419035646.43702-1-changhuang.liang@starfivetech.com/ changes since v1: - Updated commit message. - Changed "starfive,jh7110-pmu-dphy" to "starfive,jh7110-aon-pmu". - Put if condition under allOf in .yaml file. - Updated spelling error. - Dropped patch 4: Add pmu type operation. - Changed "jh71xx_pmu_general_set_state" to "jh7110_pmu_set_state" and moved it in call back. - Changed "jh7110_pmu_general_parse_dt" to "jh7110_pmu_parse_dt" and moved it in call back. - Used pmu_status save the pmu status offset. - Changed "JH71XX_PMU_DPHY_SWITCH" to "JH71XX_AON_PMU_SWITCH" - Changed copyright to "2022-2023" v1: https://lore.kernel.org/all/20230411064743.273388-1-changhuang.liang@starfivetech.com/ Changhuang Liang (5): dt-bindings: power: Add JH7110 AON PMU support soc: starfive: Replace SOC_STARFIVE with ARCH_STARFIVE soc: starfive: Extract JH7110 pmu private operations soc: starfive: Add JH7110 AON PMU support riscv: dts: starfive: jh7110: Add AON PMU node .../bindings/power/starfive,jh7110-pmu.yaml | 28 +++- MAINTAINERS | 1 + arch/riscv/boot/dts/starfive/jh7110.dtsi | 6 + drivers/soc/starfive/Kconfig | 4 +- drivers/soc/starfive/jh71xx_pmu.c | 138 ++++++++++++++---- .../dt-bindings/power/starfive,jh7110-pmu.h | 5 +- 6 files changed, 148 insertions(+), 34 deletions(-) base-commit: 197b6b60ae7bc51dd0814953c562833143b292aa --- 2.25.1