From patchwork Mon Jul 24 05:54:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xingyu Wu X-Patchwork-Id: 124628 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp1597542vqg; Sun, 23 Jul 2023 23:07:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlHA1/kERoMBIo1byOMSnGnXyG9RViRNlq3b6FaYeA58NXhT31rxqy5vjAzUXIcxW6D8fGs4 X-Received: by 2002:a05:6358:290b:b0:135:85ec:a080 with SMTP id y11-20020a056358290b00b0013585eca080mr3206005rwb.32.1690178843558; Sun, 23 Jul 2023 23:07:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690178843; cv=none; d=google.com; s=arc-20160816; b=ZdhDHScHJbYbLVnChMavWdemFQ+OJDT0IrSZuWHIaBR6U37bc20AECF4yPiHs43V43 SHjJtm/lQ+4+XfKSKExyzKjCjMWOgdyyi3mGF0ENT2Sh1sPtj54YZb6HJ5yJJOzYd/8B IQ+KCw1UnljgJnhJVvXqtuRwvoaLmMfo0HjzAcBlU4F0WwzuAlASLcyjDzieFgzInLgK w5dHRUQ0wIy+56wXznIPL0KNnqFQmoXAtWTFhDBHXuLrdUExMisVOc5Yf2TZCNV9y6a5 ZqU6JdUEIlTnfmCIN90VMhxa/jbHfJlYI4NsPKmZ+Lg65oj/lsIII4L3+nF/K7o0flm5 Gt6Q== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i18-20020a632212000000b00557221f00c7si8392930pgi.335.2023.07.23.23.07.10; Sun, 23 Jul 2023 23:07:23 -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 S230133AbjGXF6y 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 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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772280970682158996 X-GMAIL-MSGID: 1772280970682158996 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);