Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp69678imw; Mon, 4 Jul 2022 05:27:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tzEK8aXbaiDghq3CCcHvNCEcR2kYKdrkQTKZVwcdsNMWCRXnXo45zoZoWInUQfJHgZQQ2B X-Received: by 2002:a17:906:cc55:b0:72a:667b:2db1 with SMTP id mm21-20020a170906cc5500b0072a667b2db1mr22370057ejb.482.1656937669653; Mon, 04 Jul 2022 05:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656937669; cv=none; d=google.com; s=arc-20160816; b=cXuQ6z6Cg9ZVuTEekExEMMeaozABVYq4PNQv+NjSLOyCm+9mRiqK4D3o9xdVk3x461 u8EIjEtPIhS4bg8D0FwI3i6mVFl0MIfyPeIp2LIzP4WlCdyZ5yFykwVjqzD5f9Lq34tW 5UcGAIiU3H8LeOaEJJUPtKxsxLLNBjfpv0ylBtPMi41aJlTA2GxTOrefnJm0zy621o1I y5JoN6+6sziu3/DuUwnvMp80IkwCBza+1cBSA1vAPLAKdoJxLf3O0jgfEuUhvU0TjsdA CqugDspy7fWpVZWcSy2Cb7Ip6SmeqR3DiidLuoNbVN0JxEzCoJponcHaAZ4PdzjiRT+D Tymg== 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:dkim-signature; bh=2OHa86+dbCGrRcbd1tdYdEeuJ9zDrW66Tc+1k8UUJnU=; b=rVbQIQK7J1BgOHSnNpiksRdzebP9Urw2fN4aLsBuni1eGFuwibw31fJWa9heX422Z0 zi3Duful9Ay0203iKlbYS3UoMHeaL2IV1t3N5/56zyjhQKW0x/k70ItFJeZn1H1T5Sfx +at6uqaLYAdWbsMtDpC6GVVzJe37Q6ZEBw8Z6ayTImAZoKbVNHFVoUQ8wuxUEWqr/cXZ TW0PnX9cEA22p5M+a4K/SKFu7sk7X5Jgy/FZkH/I1a+9O9K8cGzIBY9tmqsmH/FAaXHp 7IR6nRbSi502S13KEzflDImfRq2ECF2NdzREATiD11UIAyQVfUrj3xG3SJIeRbiiGFYq R2jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=pjB08Xlq; 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gt43-20020a1709072dab00b007269f2170e3si29279215ejc.754.2022.07.04.05.27.24; Mon, 04 Jul 2022 05:27:49 -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; dkim=fail header.i=@microchip.com header.s=mchp header.b=pjB08Xlq; 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234073AbiGDMQY (ORCPT + 99 others); Mon, 4 Jul 2022 08:16:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231475AbiGDMQW (ORCPT ); Mon, 4 Jul 2022 08:16:22 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4621D4B; Mon, 4 Jul 2022 05:16:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1656936979; x=1688472979; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=UOXPiZdv2rmnkPsrp5Jw7thiJz4uNIawvmKSzDwY0tk=; b=pjB08Xlq+po3+ovGUTxk+nS79qfbwyItE0aIPzAH7Q9XT83Xl4GeUgHW KpLIrY4hx39oqKBWZVDvDai71kZNVDuW4hhA9coLt/yz28Uu14X+4MH19 iJ+XWO93h4zHl/UNIKWV2TA7LYrEIkuyO/yzNy8LqyOJ69Fiobxk41dzK v4xCa3/6qI8DfVCT3wkyvFseIKOMs4al4d+C7fvxcfaAP6Suz/kFG8hI4 EMCkorIg3RVe1PnYl2D1FQh8IzyxmspJIp7i6B6Tu4X0xHz00mJmWJQCt hB6zoJ++q+ayspXGHj+dbItkTNoV2W/jJoLf0qZd1M0oK6GqGvvxap/Ma g==; X-IronPort-AV: E=Sophos;i="5.92,243,1650956400"; d="scan'208";a="170953245" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 04 Jul 2022 05:16:19 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Mon, 4 Jul 2022 05:16:18 -0700 Received: from wendy.microchip.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Mon, 4 Jul 2022 05:16:16 -0700 From: Conor Dooley To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Palmer Dabbelt , Conor Dooley , Philipp Zabel , Daire McNamara CC: Paul Walmsley , Albert Ou , , , , Subject: [PATCH v2 00/12] PolarFire SoC reset controller & clock cleanups Date: Mon, 4 Jul 2022 13:15:47 +0100 Message-ID: <20220704121558.2088698-1-conor.dooley@microchip.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 Hey all, I know I have not sat on the RFC I sent about the aux. bus parts for too long, but figured I'd just send the whole thing anyway to all lists etc. Kinda two things happening in this series, but I sent it together to ensure the second part would apply correctly. The first is the reset controller that I promised after discovering the issue triggered by CONFIG_PM & the phy not coming up correctly. I have now removed all the messing with resets from clock enable/disable functions & now use the aux bus to set up a reset controller driver. Since I needed something to test it, I hooked up the reset for the Cadence MACB on PolarFire SoC. This has been split into a second series for v2: https://lore.kernel.org/all/20220704114511.1892332-1-conor.dooley@microchip.com/ The second part adds rate control for the MSS PLL clock, followed by some simplifications to the driver & conversions of some custom structs to the corresponding structs in the framework. Thanks, Conor. Changes since v1: - split off the net patches - clk: actually pass the spinlock to the converted dividers & gates - reset: added a spinlock around RMW access to registers - reset: switched to BIT(i) macros - reset: used local copies of some variables as pointed out by Philipp - reset: dropped the success printout Conor Dooley (12): dt-bindings: clk: microchip: mpfs: add reset controller support clk: microchip: mpfs: add reset controller reset: add polarfire soc reset support MAINTAINERS: add polarfire soc reset controller riscv: dts: microchip: add mpfs specific macb reset support clk: microchip: mpfs: add module_authors entries clk: microchip: mpfs: add MSS pll's set & round rate clk: microchip: mpfs: move id & offset out of clock structs clk: microchip: mpfs: simplify control reg access clk: microchip: mpfs: delete 2 line mpfs_clk_register_foo() clk: microchip: mpfs: convert cfg_clk to clk_divider clk: microchip: mpfs: convert periph_clk to clk_gate .../bindings/clock/microchip,mpfs.yaml | 17 +- MAINTAINERS | 1 + arch/riscv/boot/dts/microchip/mpfs.dtsi | 7 +- drivers/clk/microchip/Kconfig | 1 + drivers/clk/microchip/clk-mpfs.c | 379 +++++++++--------- drivers/reset/Kconfig | 7 + drivers/reset/Makefile | 2 +- drivers/reset/reset-mpfs.c | 157 ++++++++ include/soc/microchip/mpfs.h | 8 + 9 files changed, 386 insertions(+), 193 deletions(-) create mode 100644 drivers/reset/reset-mpfs.c base-commit: b13baccc3850ca8b8cccbf8ed9912dbaa0fdf7f3 -- 2.36.1