Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp397346pxb; Thu, 14 Jan 2021 08:29:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJxeEd+l1+g+ULL4zV6DcnVAZn0nJCBs5DibjaGU1FtW02yKo+JcyMMQeieOWpj4G00D5u+k X-Received: by 2002:a50:9e8b:: with SMTP id a11mr6232835edf.276.1610641759914; Thu, 14 Jan 2021 08:29:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610641759; cv=none; d=google.com; s=arc-20160816; b=ing/J/VMzIu6RjrmuwK6YCFI16kIcZ/Jce+yNGkgk9uGOwAJiid/I230PTDGZVAqMU 1k7QaZsR55f0/NdEIwHRKA0+/6u3yrp+i1erOSC1/QdQ3kiG3sBERq+WE91UcE93AXZF VjJeFKEYvpMrg9Esxx928/oq9QKZlwh0xEOoK7dGf0/1UZI5lznngoivJxj/HjZx8lMB quAudcYs1qB/XBNdwUi9Az5qTxVA8Yumrlk+P0Ir/FBZ2TPjtmc2sWJxpowjqNa7wDbj Aq5AhDwtFJ2wE1NOc5gZOWKJscYlTDykNtjxkpsZuWW5unK+fj6k90L7Mh1hsCPn/hqs XW/w== 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:ironport-sdr:dkim-signature; bh=WeVELNnQai7uZPdew7/i77DTkk42dD05x6mlbpxcs+A=; b=DybVcH32yL7LFkRX20Y1Jb03ORj4Xm9l1DVgwHbHPV08os7qVJTZvz5yGJLuAvS6TE +sAjn9vWQloIeL+kjTAVsMWp0mImtMjjeNpq45pPpb5Zs/4ampsBRNWYFR0IEU49SbV0 gPWTbHtur6GZzZ6a0dACJkn7CB877y0BHuh6AwcsLz7r6x6VUa3DFXh0hhktZhDDB12H BiJlHNxX7GLByev7EG7KHmSywWAxZgGF1TkfU4owP8M3cZGk+6WLjeP10yjKEtrzk3xc egKH3UM1SmCJNR/AwaFZtdsMQBYZO94u0XCwSYtUxTyC75yyWkHB5Qv9QKln9+bSEKb5 lcNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=iJ8+CcQc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v24si2991211edy.573.2021.01.14.08.28.55; Thu, 14 Jan 2021 08:29:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=iJ8+CcQc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727590AbhANQZ5 (ORCPT + 99 others); Thu, 14 Jan 2021 11:25:57 -0500 Received: from esa.microchip.iphmx.com ([68.232.153.233]:35650 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726882AbhANQZ5 (ORCPT ); Thu, 14 Jan 2021 11:25:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1610641556; x=1642177556; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=GRKQZk3reL+yFIk84UhkwWjIL34yFjzkRsFwyfLowZ4=; b=iJ8+CcQcSCzPo8wT1TYjsgpQxbzemWNoZjjGJmGpx9hqXXg8++ykMGqK BUzgE/g9xHd9oorc45lPrnLfeGsDvjcp6ng5gT/R47IqqMzKnGFP6xk7s Bcw4yUIZZUaqqJJUF+hJ5eHcLVJ2yH/ZvgAsry8+pFZaOOtNoilS69BkV ZAZLzxLMyGt64y5iz6uhTMrFbBx2Obs8W69RJGhktab38YlNdLMiPVk+K rRWZ+VsvJ3ilrIuM+SG3iRIbK/AhYKFcNpM6v4ySwwA6lpWaFj/47cd/I NxbCGsiUt7E/1ZwToOaXtJVQO0DQlbbC8OTb5Z8x2MAwe9h8U/kGO1LgD Q==; IronPort-SDR: 2t8mbM6CD555mZgsyC5FhpZLOkabEA2Gudy5CWufhmC147YTlOGTVsgIuIk9z3tg5BG4u20S7F w/zgjZ0d4seKqLEdhlwdHUyPofI68n1XWLxzqx/+RvwXI6RZpWU30npVDuqOWI1qC/RvvC4+SX d+OdooYJVc4hJbJnCdWlBxkUC5lkH7YIV4ZvOUZqWXvxlQlNawQJAVjsbLEHzyLyPyciO/0gUd zNcKiCw5ZLJTzrNS6mjErRT/Tz4dbCN4SeSBF9ZS6USRdEL3XhQxWv4Ac/f05T+4t3pPqKHwsA qOo= X-IronPort-AV: E=Sophos;i="5.79,347,1602572400"; d="scan'208";a="105991452" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 14 Jan 2021 09:24:40 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Thu, 14 Jan 2021 09:24:39 -0700 Received: from mchp-dev-shegelun.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Thu, 14 Jan 2021 09:24:37 -0700 From: Steen Hegelund To: Philipp Zabel CC: Steen Hegelund , Andrew Lunn , Microchip Linux Driver Support , Alexandre Belloni , Gregory Clement , , Subject: [PATCH v3 0/3] Adding the Sparx5 Switch Reset Driver Date: Thu, 14 Jan 2021 17:24:29 +0100 Message-ID: <20210114162432.3039657-1-steen.hegelund@microchip.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series provides the Microchip Sparx5 Switch Reset Driver The Sparx5 Switch SoC has a number of components that can be reset individually, but at least the Switch Core needs to be in a well defined state at power on, when any of the Sparx5 drivers starts to access the Switch Core, this reset driver is available. The reset driver is loaded early via the postcore_initcall interface, and will then be available for the other Sparx5 drivers (SGPIO, SwitchDev etc) that are loaded next, and the first of them to be loaded can perform the one-time Switch Core reset that is needed. The driver has protection so that the system busses, DDR controller, PCI-E and ARM A53 CPU and a few other subsystems are not touched by the reset. The Sparx5 Chip Register Model can be browsed at this location: https://github.com/microchip-ung/sparx-5_reginfo History: v2 - v3: Removed unused headers Renamed the reset controller dev member. Use regmap_read_poll_timeout instead of polling a function. Used two separate syscon entries in the binding Simplified the syscon error handling. Simplified the devm_reset_controller_register error handling. Moved the contents of the mchp_sparx5_reset_config function into the probe function. v1 - v2: Removed debug prints Changed the error handling to save the error code before jumping. Steen Hegelund (3): dt-bindings: reset: microchip sparx5 reset driver bindings reset: mchp: sparx5: add switch reset driver arm64: dts: reset: add microchip sparx5 switch reset driver .../bindings/reset/microchip,rst.yaml | 59 +++++++++ arch/arm64/boot/dts/microchip/sparx5.dtsi | 14 +- drivers/reset/Kconfig | 8 ++ drivers/reset/Makefile | 1 + drivers/reset/reset-microchip-sparx5.c | 120 ++++++++++++++++++ 5 files changed, 199 insertions(+), 3 deletions(-) create mode 100644 Documentation/devicetree/bindings/reset/microchip,rst.yaml create mode 100644 drivers/reset/reset-microchip-sparx5.c -- 2.29.2