From patchwork Tue Apr 11 13:55:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xingyu Wu X-Patchwork-Id: 81983 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2603953vqo; Tue, 11 Apr 2023 07:08:43 -0700 (PDT) X-Google-Smtp-Source: AKy350bmPWA4u882F9glIR32QM8P8XP+HWpQodadYeooieK/ZPXgpniRN8gt3J3vnjaXRoD75qpN X-Received: by 2002:a17:902:c70b:b0:1a5:2371:a64f with SMTP id p11-20020a170902c70b00b001a52371a64fmr12899363plp.12.1681222122897; Tue, 11 Apr 2023 07:08:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681222122; cv=none; d=google.com; s=arc-20160816; b=t/Kl/dE3RuRQDmwoQoaWiSpUgRucJWzreNN0Iy1hIQPA9DUW/SjxavLl2ttbHz+Aki FvXNGIvf4UQG1wQpzXbGrwY4CyVKCxod/6nJKoELkj0JJAzJUUyDZ5xQgcfWCJu4YixY KDQ4AwuwgStAU8wjsvPveSR+V6p82PhW2yJds7BKMbEPY9tRp+37TK4zf3niXTc/qfsk q6kqLaC27KcUaHUmd2w//4fsS0cB42SlytlU/iVlUFDDFlLGhmUOLfXEnUNXxPJVoCRv /R2GDr5UkndDgZdPgY/hq3ybrKikS5o2/08YJWFhEGBBKpWrCOj3ly+sJu7bKnNlkPRp U3Aw== 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=ezfp2rTM/YeenwGbPumfTrmSGPIT7t0HEvqhM9H9KtU=; b=n1whYFtFtv6iXDtKtSAW36ytz2szCqH571DgfSeRStMXTIt509gSjhWoSW/HYrm4JS T+BCS2eMeKpgrhWkgTK1VqScUTq++0/2pRJ733p7CZtX1l/1EOd8y8PrNjuG5BnFSAiJ 70LNWu8DFYJKieJOkneRMKqr/y0VeVgVu6ybPPEFGTAymDqCWNXQzWDAM1sNI3whEysm UFhl6sZKIc/Q8O7Z6QbGExxR8qxj9LUAu1s818Zx3BV44gFsweCrRNU4r/u8FtgErGLe Z/37t4pASdk++FyM0OQioId/qTioDKMWV8ttp0lV6uGAIoXs83JAlCTPjU7YPZEliaTY ql8Q== 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 j5-20020a17090ac48500b0023fc361b03asi13149659pjt.96.2023.04.11.07.08.29; Tue, 11 Apr 2023 07:08:42 -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 S231162AbjDKN4X convert rfc822-to-8bit (ORCPT + 99 others); Tue, 11 Apr 2023 09:56:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230493AbjDKN4N (ORCPT ); Tue, 11 Apr 2023 09:56:13 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 750D32D50; Tue, 11 Apr 2023 06:56:09 -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 8781E24E1D4; Tue, 11 Apr 2023 21:56:05 +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; Tue, 11 Apr 2023 21:56:05 +0800 Received: from localhost.localdomain (113.72.145.176) by EXMBX061.cuchost.com (172.16.6.61) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 11 Apr 2023 21:56:04 +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 v4 01/10] reset: starfive: jh7110: Add StarFive STG/ISP/VOUT resets support Date: Tue, 11 Apr 2023 21:55:49 +0800 Message-ID: <20230411135558.44282-2-xingyu.wu@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230411135558.44282-1-xingyu.wu@starfivetech.com> References: <20230411135558.44282-1-xingyu.wu@starfivetech.com> MIME-Version: 1.0 X-Originating-IP: [113.72.145.176] 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=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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?1762889168759587296?= X-GMAIL-MSGID: =?utf-8?q?1762889168759587296?= 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 c1b3a490d951..4eb2da4a22c4 100644 --- a/drivers/reset/starfive/reset-starfive-jh7110.c +++ b/drivers/reset/starfive/reset-starfive-jh7110.c @@ -29,6 +29,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) { @@ -55,6 +73,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);