From patchwork Thu May 18 10:12:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xingyu Wu X-Patchwork-Id: 95744 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp382661vqo; Thu, 18 May 2023 03:24:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6/fT/b6G4yb73AguP9exck+gMJbKcyJDT+EnHgrvI16DV8gq2iTFBo4hnbKWHObjUV/tqP X-Received: by 2002:a17:90a:b395:b0:24e:31bd:5079 with SMTP id e21-20020a17090ab39500b0024e31bd5079mr1973211pjr.18.1684405465298; Thu, 18 May 2023 03:24:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684405465; cv=none; d=google.com; s=arc-20160816; b=i877PV8ZQKJGFp94R1+6V+sIhPtXU4WcFkgSXOnWBTriqPMZJPfL6ZJ5dYsvleROz1 cQYPqCYoJtp5E7fGpHqLTt/4moo4zAT0obwEUdRkkgs6Apt46E0tJ1aMbb+QivZql+W6 Nx9pTixQwM3uEI146Y2WCQBHwqo+6XEWsf87iJs8O3CIHYhbBhooIk4+fdPKNSWYSMEU 1IjodqBtfMoe9Bwh6TVuIp8zWJ/caesUNPIDMivJLPVnZf6MeiAXsck/jWDyKSW8qKQv 85Wm0Rr3SPm6y6z+2pHwdMFBSdCYdzGpSTiSC7vB+l1qpuONGNmiaWAj8pYPlwTdIvJQ dZ4Q== 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=6HQyOfDYg2aBHz+Vw3fjsDFJFUalESD86xbeZNg0rT0=; b=eeMdV0zQeZpgN1VLhPpkdPmQmE8hDKUbesdl1mW0Ku1s+/MXvbsP/gfv5JPj6Gvy09 Jj97CrQViVW7B0onUN17DOsjVYpeWn0npU7sbUdq8X+CdzX0rP5DSPDEXOFxPQC0WOZM IlKZBKAnwEEQ6gHUCtI5msMhpTeYPrbMdVtqJYButrEq6O3mCoCQtWW9x2YtFflFA6Ke W8lbtz8qWGZafkK3Rs+j94yGw1m61RHyWWsfxuXe+8KKCxxZv4xwGMUHlf9ed3g0Ok5f fR+obbYm5YDlTSxhIHqZ9I101kStgsLuZxFyBw+EJ9g2OyQacwwLqwUY6S2k5E8sIpic 9pnA== 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 i185-20020a6387c2000000b004fb95253a18si1034972pge.376.2023.05.18.03.24.11; Thu, 18 May 2023 03:24:25 -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 S230444AbjERKNK convert rfc822-to-8bit (ORCPT + 99 others); Thu, 18 May 2023 06:13:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230309AbjERKMo (ORCPT ); Thu, 18 May 2023 06:12:44 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACA8D1BD3; Thu, 18 May 2023 03:12:43 -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 CB02924E257; Thu, 18 May 2023 18:12:41 +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; Thu, 18 May 2023 18:12:41 +0800 Received: from localhost.localdomain (113.72.146.100) by EXMBX061.cuchost.com (172.16.6.61) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 18 May 2023 18:12:40 +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 v6 08/11] reset: starfive: jh7110: Add StarFive STG/ISP/VOUT resets support Date: Thu, 18 May 2023 18:12:31 +0800 Message-ID: <20230518101234.143748-9-xingyu.wu@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230518101234.143748-1-xingyu.wu@starfivetech.com> References: <20230518101234.143748-1-xingyu.wu@starfivetech.com> MIME-Version: 1.0 X-Originating-IP: [113.72.146.100] X-ClientProxiedBy: EXCAS062.cuchost.com (172.16.6.22) 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?1766227145309759232?= X-GMAIL-MSGID: =?utf-8?q?1766227145309759232?= 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 Reviewed-by: Hal Feng --- .../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);