Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp2706148rwo; Sun, 23 Jul 2023 23:04:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlFWh0PFu3SN+FbX5ADrp7pnHtWNydrBMIRaGIa1PTVWuKxV6ZVAxmoJDbxGUvSU0p1Ik5kd X-Received: by 2002:a17:906:292:b0:992:6064:f32b with SMTP id 18-20020a170906029200b009926064f32bmr9573656ejf.46.1690178647629; Sun, 23 Jul 2023 23:04:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690178647; cv=none; d=google.com; s=arc-20160816; b=Tq1AQK1fgdyMn9zBfIU6fB4x6uVURdTx+qpFkKsNEnuFHQNcA8VCeXeJwmMx4CIs3I Pj9T9li6vxvLUFE/opGjvPHQvvXmMhuvCk0f9zYBJo4TbfiJVVpF/1sKjwQU2hNXXG6x M3xPBKXtTWJ+zKSOamy5HqWFbEfsvxYz2GHI29Kn4PBpIIdLhehwoteaPchGKwLCaEg2 VaPOIOkkyC/r/J7adzJuGksD+Z+iQqwO8X7gW+rCU3CfyumIhl2y/He+nD5v0gjmmGIH wveAU82SoNHfvl2xLFwr8dqMn2Kwoz9DczYLkPUKedM8LOTnKpl5CoFtuMAHur1NV0ch DTLA== 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=q8m/9zMV3V4B26IFBd1L6aZlyA1ETQJ9whX4u2xyOQ0=; fh=/AxkkUzkQhSPtG0cXXCetSaboy2e7vU8QJbOPgoi2/s=; b=jSCASboLaVcmmSFJdWkoFB9WvmOKc7mW3O/S1dfrNHzmv+vWEKLxo6Yb9vzAwxBihI hRT95dy5TcHMY3KDOGlhts/lA9Yd1S/zfPsCJKwMRrmhVU6PIXSMSQx4MLuq2Oc2Av7r SSRkZLVrdQ9vz5txliVE7vvmvv011puL7I7KyVKCzlhOyx6DoiQcN+Dr2ppmZ87V8vjA pFeAMvFmpfObtEL6f6KFSZa8SBgr2wJ9jON+gJGbnMPKvVINhsrKFA7ECH+92Zu9u/z7 NuXh/M9D0lBghlojDBwPyRCFnvXJqa1szZF081G3sUaGEXE1cM64AnttII3JB9uyQFrI /udw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kk10-20020a170907766a00b00992d2630d08si5933193ejc.788.2023.07.23.23.03.34; Sun, 23 Jul 2023 23:04: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 S230130AbjGXF6y convert rfc822-to-8bit (ORCPT + 99 others); Mon, 24 Jul 2023 01:58:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229546AbjGXF6x (ORCPT ); Mon, 24 Jul 2023 01:58:53 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 466C5DE; Sun, 23 Jul 2023 22:58:51 -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 DAA2D80A8; Mon, 24 Jul 2023 13:58:46 +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; Mon, 24 Jul 2023 13:58:47 +0800 Received: from localhost.localdomain (183.27.99.135) by EXMBX061.cuchost.com (172.16.6.61) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 24 Jul 2023 13:58:46 +0800 From: Xingyu Wu To: , Michael Turquette , Stephen Boyd , Conor Dooley CC: Philipp Zabel , Palmer Dabbelt , Emil Renner Berthing , Hal Feng , Xingyu Wu , , Subject: [PATCH v1] reset: starfive: jh7110: Add StarFive STG/ISP/VOUT resets support Date: Mon, 24 Jul 2023 13:54:40 +0800 Message-ID: <20230724055440.100947-1-xingyu.wu@starfivetech.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [183.27.99.135] X-ClientProxiedBy: EXCAS061.cuchost.com (172.16.6.21) To EXMBX061.cuchost.com (172.16.6.61) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,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 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. Acked-by: Palmer Dabbelt Reviewed-by: Emil Renner Berthing Reviewed-by: Hal Feng Signed-off-by: Xingyu Wu --- Hi Stephen, I found that the PR sent by conor was missing this STG/ISP/VOUT resets patch: https://lore.kernel.org/all/20230719-trough-frisk-40b92acb485a@spud/ I resend this patch to make the CRG drivers completed. Thanks, 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..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); -- 2.25.1