From patchwork Wed Jul 12 09:20:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xingyu Wu X-Patchwork-Id: 119003 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1021073vqm; Wed, 12 Jul 2023 02:25:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlGYdAwjmUIvLEQqLjUmY+uki1ECefmnmdSUH5NTOI0dEnHCLiYXUiVdO9YKS3P4V//Y0rOw X-Received: by 2002:a05:6358:90f:b0:132:fcf6:f311 with SMTP id r15-20020a056358090f00b00132fcf6f311mr20344170rwi.0.1689153902102; Wed, 12 Jul 2023 02:25:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689153902; cv=none; d=google.com; s=arc-20160816; b=vkBLsNXc7IysnKaNx8UPsjdo1gH3UU1QjatKaVWKkM+Y2wBpD778JLldvKG2E3TXpn Z2HTtA6nwGYEBrlrVsBgC4tDBa8FKzAdcRxe46ct6K8mY7vKvcMFh3DJekxmdLTu4EQ2 4oDMZ1QT1VYhacaUzHHEn3rI2JsYeVel/Jm4xGnEIKtfPSDONTCCa3OmnXsTbcxuGnPY l4IaOpFAUd5puPk+K0kp62xIVIgydtTzX6JMEv8fCu1xgmoh+2fXgz3ROfm9J6p+TJje jpefkHbaPoOyFSnihZbdz4i5RLTwGNj0ajyzE4HQcPhj3pSKNlWT7iNIvXGHi+4I61re bfUg== 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=VYj8IVFTfZZGS+bqT6Sxq5x+4G/Vx21MI7NE8/QvQ/A=; fh=5cl3iG0LmTJQlIdlGUTOohNdvt3KyCXtFkKzNbo7a74=; b=n6tk/CIyBTBHH6JdK3VxddtfK++qZ99FIExP52txlxigpgvm6JluT3XotiiEOYWFz0 KnMc6al63dXOy5dpS3c1Rj1q37FeGHu2KwSh7xe0iSsnxEHk3J+TAnyn6acdZv3EIlmN gj+LWBf4KmTwFSqcLnXofnrzdW9Rw6mOqjyllKXMNEgSOp1uxQEkYMhPD7w4B86V40xT tn21WldnUMtERRFq+KZ1Z2w1lYseKH3NmcfW8RQaYbyOPloh2L4jwGtef1ccJaspIBZa ROE+WHyBFbV3AG+Md0vR3QNKAeNTqsxOSFG1O9MaGRUjXrrFZvq3O7wxy3v3hkGMeshP CdLA== 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 z126-20020a636584000000b0055c2b42a66esi2902693pgb.394.2023.07.12.02.24.46; Wed, 12 Jul 2023 02:25:02 -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 S232273AbjGLJVH convert rfc822-to-8bit (ORCPT + 99 others); Wed, 12 Jul 2023 05:21:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232365AbjGLJUZ (ORCPT ); Wed, 12 Jul 2023 05:20:25 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BB18E65; Wed, 12 Jul 2023 02:20: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 1A3B424E2E5; Wed, 12 Jul 2023 17:20:14 +0800 (CST) Received: from EXMBX061.cuchost.com (172.16.6.61) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 12 Jul 2023 17:20:13 +0800 Received: from localhost.localdomain (183.27.98.46) by EXMBX061.cuchost.com (172.16.6.61) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 12 Jul 2023 17:20:13 +0800 From: Xingyu Wu To: , , "Michael Turquette" , Stephen Boyd , "Philipp Zabel" , Conor Dooley , "Emil Renner Berthing" CC: Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Hal Feng , Xingyu Wu , , Subject: [PATCH v7 7/9] reset: starfive: jh7110: Add StarFive STG/ISP/VOUT resets support Date: Wed, 12 Jul 2023 17:20:05 +0800 Message-ID: <20230712092007.31013-8-xingyu.wu@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230712092007.31013-1-xingyu.wu@starfivetech.com> References: <20230712092007.31013-1-xingyu.wu@starfivetech.com> MIME-Version: 1.0 X-Originating-IP: [183.27.98.46] X-ClientProxiedBy: EXCAS064.cuchost.com (172.16.6.24) To EXMBX061.cuchost.com (172.16.6.61) X-YovoleRuleAgent: yovoleflag 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: 1771206242003648676 X-GMAIL-MSGID: 1771206242003648676 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. Reviewed-by: Hal Feng Signed-off-by: Xingyu Wu Reviewed-by: Emil Renner Berthing --- .../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..29a43f0f2ad6 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-vo", + .driver_data = (kernel_ulong_t)&jh7110_vout_info, + }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(auxiliary, jh7110_reset_ids);