From patchwork Mon Apr 24 13:54:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xingyu Wu X-Patchwork-Id: 87051 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2763318vqo; Mon, 24 Apr 2023 06:58:35 -0700 (PDT) X-Google-Smtp-Source: AKy350b2h2zpyDFOVTZl9OFon158SPu2g97wkjRkM3VFJM6XaZWXn4ee7FKZg5jIgNLQpvfMoZEH X-Received: by 2002:a05:6a20:938a:b0:f2:e4c1:af7a with SMTP id x10-20020a056a20938a00b000f2e4c1af7amr10441433pzh.7.1682344715621; Mon, 24 Apr 2023 06:58:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682344715; cv=none; d=google.com; s=arc-20160816; b=BwymrU9tjoOa3Ca1fbPG3fEBuJxoXdPXFOdItjwhX5kN+TZhHq+7iNBl4DXEAr6Z1j YtUB+Pzub2YZGaf6UyjFEJCTjDp04ti0I9zBgIX/cZzjXWEMSKpOZyhsNb2kcemAd6Fi +b4eNwELyFmJeyn0QgIFWiq28VNFNBZuXs/bIGdZEIe7AK+pc3ldgRkNNQZwfGX85iHg Q6706xF2fUdhY9JQfAgHkx6aGs9BIV/89g1Ac0usBHicki1lX/rzJDj9rOv6rFFX1o5o 7nxcM3zXyxQ06gMyfnWPCTAUq/fMoH2t0sX089puqQ1QE35GHARtksAoHH2O90nfDNT/ 3Wjg== 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=cYPfujCho7r30R8ZPXGZsPeHZJEf6Kh4qkyNg82vZo8=; b=SHeDM3DgAb+zF6SYRs8wGR3cb+oNIQ2ZAFtrKseHijJhfrSYlt0BSBuoRtoCxB2SFa DCsh7kCW2LQxOPmVFqq2f27NYwOg3bZDdgPYy5QixcNX2oXpd/lqywmMuLL5G1ps8AIU YxD8U3tcoUWaSzjNPcA8FXfuI8AxaotePA0cncNn54/fHPWcafPEToSLwayTYlVGCZRI /5w27vfJGvmfk02CT67M0H8pe9GqmLNjB+Awyr613AhlwpY2Xoz/TRsBjUIdlCA0HUdB xWTnQOgFfQ7KQuWyVl5Ln2DaKVCv/2MyXcBFi/63k39TuNWe0L3wbtriHlSOXXU+Xxwx m9Pg== 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 m14-20020a656a0e000000b0051b930ef847si12389158pgu.134.2023.04.24.06.58.23; Mon, 24 Apr 2023 06:58:35 -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 S231997AbjDXNys convert rfc822-to-8bit (ORCPT + 99 others); Mon, 24 Apr 2023 09:54:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230471AbjDXNy3 (ORCPT ); Mon, 24 Apr 2023 09:54:29 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37CC87AB8; Mon, 24 Apr 2023 06:54:26 -0700 (PDT) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 665CE24E1F3; Mon, 24 Apr 2023 21:54:22 +0800 (CST) Received: from EXMBX061.cuchost.com (172.16.6.61) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 24 Apr 2023 21:54:22 +0800 Received: from localhost.localdomain (113.72.145.137) by EXMBX061.cuchost.com (172.16.6.61) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 24 Apr 2023 21:54:21 +0800 From: Xingyu Wu To: , , "Michael Turquette" , Stephen Boyd , Krzysztof Kozlowski , Philipp Zabel , Conor Dooley , "Emil Renner Berthing" CC: Rob Herring , Paul Walmsley , Palmer Dabbelt , Albert Ou , Hal Feng , Xingyu Wu , , Subject: [PATCH v5 08/10] reset: starfive: jh7110: Add StarFive STG/ISP/VOUT resets support Date: Mon, 24 Apr 2023 21:54:07 +0800 Message-ID: <20230424135409.6648-9-xingyu.wu@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230424135409.6648-1-xingyu.wu@starfivetech.com> References: <20230424135409.6648-1-xingyu.wu@starfivetech.com> MIME-Version: 1.0 X-Originating-IP: [113.72.145.137] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX061.cuchost.com (172.16.6.61) 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?1764066292676337291?= X-GMAIL-MSGID: =?utf-8?q?1764066292676337291?= Add new struct members and auxiliary_device_id of resets to support System-Top-Group, Image-Signal-Process and Video-Output on the StarFive JH7110 SoC. Signed-off-by: Xingyu Wu --- .../reset/starfive/reset-starfive-jh7110.c | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/drivers/reset/starfive/reset-starfive-jh7110.c b/drivers/reset/starfive/reset-starfive-jh7110.c index 2d26ae95c8cc..1e44fe7551f5 100644 --- a/drivers/reset/starfive/reset-starfive-jh7110.c +++ b/drivers/reset/starfive/reset-starfive-jh7110.c @@ -31,6 +31,24 @@ static const struct jh7110_reset_info jh7110_aon_info = { .status_offset = 0x3C, }; +static const struct jh7110_reset_info jh7110_stg_info = { + .nr_resets = JH7110_STGRST_END, + .assert_offset = 0x74, + .status_offset = 0x78, +}; + +static const struct jh7110_reset_info jh7110_isp_info = { + .nr_resets = JH7110_ISPRST_END, + .assert_offset = 0x38, + .status_offset = 0x3C, +}; + +static const struct jh7110_reset_info jh7110_vout_info = { + .nr_resets = JH7110_VOUTRST_END, + .assert_offset = 0x48, + .status_offset = 0x4C, +}; + static int jh7110_reset_probe(struct auxiliary_device *adev, const struct auxiliary_device_id *id) { @@ -58,6 +76,18 @@ static const struct auxiliary_device_id jh7110_reset_ids[] = { .name = "clk_starfive_jh7110_sys.rst-aon", .driver_data = (kernel_ulong_t)&jh7110_aon_info, }, + { + .name = "clk_starfive_jh7110_sys.rst-stg", + .driver_data = (kernel_ulong_t)&jh7110_stg_info, + }, + { + .name = "clk_starfive_jh7110_sys.rst-isp", + .driver_data = (kernel_ulong_t)&jh7110_isp_info, + }, + { + .name = "clk_starfive_jh7110_sys.rst-vout", + .driver_data = (kernel_ulong_t)&jh7110_vout_info, + }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(auxiliary, jh7110_reset_ids);