From patchwork Wed May 10 01:53:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Changhuang Liang X-Patchwork-Id: 91792 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3301493vqo; Tue, 9 May 2023 18:56:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7SmOLS6y99Ou9Hj5LDvsn+XwNoKfUgoF50prUwaOmvBCnwIOcrYjSBXNGzRUdAZQZy/vaB X-Received: by 2002:a05:6a00:ccc:b0:641:4d30:7922 with SMTP id b12-20020a056a000ccc00b006414d307922mr21647484pfv.4.1683683771214; Tue, 09 May 2023 18:56:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683683771; cv=none; d=google.com; s=arc-20160816; b=FE3YVKRbBWwXUIKZDDpO9qRcr5Y2S0MPSktDMi3/EtuKZ/YKZRcW32LyiiUyBMRugi 9a1dHNSUkQ6v1WT8M/wg/kxtHjkyHx4vcc/Dei8z8QOBp8VgqmSrDOFQYaiq/Tw568sn tTIH2751qAOLHnnodKzX7gKJqaANn5J1/qzjkiS8YYU9594nx+CIQi4UIzw7bK/xvbWX hewj5vFtJRaxFkW/bxSW+GAzoEaYrg5nQwkM5D5h8wIJnBfD3UtPf1nSd+W3fp/s3bZs dAWJegldlYI686oV+TOwJMn++bHbjnv+14ETlZwJ/a3ohF6L+E9TzDI7kWrD00rSnmaR u29w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=mMHMeDqzBD4h50GxPJI7Y6sYq9NDlOJGeLlOKDVZYnM=; b=G9qq+uSmeKXsD7x8cNbjKQQJPq0ivbxnM0NnLuHYSJNahQNleOOwAYRRJ/8OEzmrX4 P48D3zMlZVzgO2Gx/cvmpMQPvI0Q8/tdoVMnIbhINjEKsZ52AHVXATH8/a1iktyME/jY nHNnV4MD6LQu9xnZ81OK7LDKd3SgGpWvXV8U/4fWWxt3pVT7kn2k2czBZ6QgXzAItqyS HNrDwbTNUn0rzO02Zu9F600lSW8Z/HCM3gvz6t8BF9B+G7Ths4jQJWBowmECoGCNaAk9 aqGSCtflPcG3EohdxSnndvtYs5ODCb7coQO2F85O1l+5A/dbMq0OrkQW0kbQbcvtHdgb pZnA== 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 g6-20020a63b146000000b005303db0ebedsi2569927pgp.70.2023.05.09.18.55.56; Tue, 09 May 2023 18:56:11 -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 S229737AbjEJBxf convert rfc822-to-8bit (ORCPT + 99 others); Tue, 9 May 2023 21:53:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235364AbjEJBxW (ORCPT ); Tue, 9 May 2023 21:53:22 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20A1B35B3; Tue, 9 May 2023 18:53:21 -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 fd01.gateway.ufhost.com (Postfix) with ESMTP id B60DC24E289; 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:14 +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:13 +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 1/5] dt-bindings: power: Add JH7110 AON PMU support Date: Tue, 9 May 2023 18:53:07 -0700 Message-ID: <20230510015311.27505-2-changhuang.liang@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230510015311.27505-1-changhuang.liang@starfivetech.com> References: <20230510015311.27505-1-changhuang.liang@starfivetech.com> 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_PASS, 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?1765470393868706185?= X-GMAIL-MSGID: =?utf-8?q?1765470393868706185?= Add AON PMU for StarFive JH7110 SoC, it can be used to turn on/off DPHY rx/tx power switch, and it don't need the property of interrupts. It also can use syscon operation. Signed-off-by: Changhuang Liang --- .../bindings/power/starfive,jh7110-pmu.yaml | 28 +++++++++++++++++-- .../dt-bindings/power/starfive,jh7110-pmu.h | 5 +++- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/power/starfive,jh7110-pmu.yaml b/Documentation/devicetree/bindings/power/starfive,jh7110-pmu.yaml index 98eb8b4110e7..0591a4e9db6c 100644 --- a/Documentation/devicetree/bindings/power/starfive,jh7110-pmu.yaml +++ b/Documentation/devicetree/bindings/power/starfive,jh7110-pmu.yaml @@ -8,6 +8,7 @@ title: StarFive JH7110 Power Management Unit maintainers: - Walker Chen + - Changhuang Liang description: | StarFive JH7110 SoC includes support for multiple power domains which can be @@ -15,8 +16,13 @@ description: | properties: compatible: - enum: - - starfive,jh7110-pmu + oneOf: + - enum: + - starfive,jh7110-pmu + - items: + - enum: + - starfive,jh7110-aon-syscon + - const: syscon reg: maxItems: 1 @@ -30,9 +36,18 @@ properties: required: - compatible - reg - - interrupts - "#power-domain-cells" +allOf: + - if: + properties: + compatible: + contains: + const: starfive,jh7110-pmu + then: + required: + - interrupts + additionalProperties: false examples: @@ -43,3 +58,10 @@ examples: interrupts = <111>; #power-domain-cells = <1>; }; + + - | + aon_syscon: syscon@17010000 { + compatible = "starfive,jh7110-aon-syscon", "syscon"; + reg = <0x17010000 0x1000>; + #power-domain-cells = <1>; + }; diff --git a/include/dt-bindings/power/starfive,jh7110-pmu.h b/include/dt-bindings/power/starfive,jh7110-pmu.h index 132bfe401fc8..341e2a0676ba 100644 --- a/include/dt-bindings/power/starfive,jh7110-pmu.h +++ b/include/dt-bindings/power/starfive,jh7110-pmu.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ /* - * Copyright (C) 2022 StarFive Technology Co., Ltd. + * Copyright (C) 2022-2023 StarFive Technology Co., Ltd. * Author: Walker Chen */ #ifndef __DT_BINDINGS_POWER_JH7110_POWER_H__ @@ -14,4 +14,7 @@ #define JH7110_PD_ISP 5 #define JH7110_PD_VENC 6 +#define JH7110_PD_DPHY_TX 0 +#define JH7110_PD_DPHY_RX 1 + #endif