From patchwork Mon Sep 30 12:15:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 13816410 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4737ECE8340 for ; Mon, 30 Sep 2024 13:25:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=iIUXvhb/6k8yqNTOTdXI2a7OI1BOudVjy0G7Tj0oLuI=; b=MoZVUaQa+CvrdFJXaiMRzgNIJX rziFQe9faS43cZvr/IbohgTSEndgD6Jj/e3VURpikcQUVct3XsfIRDkpx7ygs5hm3KM8cpdacxdAx JWZQZMNsYwEzVKdsFH8tqpRS6ZnEl3yxnt3Gqs98i3mfiXbATsOl5BWLcTLXRmUvmY1LMayQcaMZA 1oloZLfq5cWSrG2Pu4urtGazluoEgkevsxOj4UJk2paKnXLebMCbucmxpnO4YcQZPEwT01e8FQu/E 71Wa7NfEPc4E8GxdlTLvab7QF2f23TEEQUKpq8YSEcaiLagjA9+Iql0ItKPx4QyfBOkojkxwXQnc/ VZjaJWug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1svGOa-0000000HHeF-0oPA; Mon, 30 Sep 2024 13:25:00 +0000 Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1svFK1-0000000GzY3-3aec for linux-arm-kernel@lists.infradead.org; Mon, 30 Sep 2024 12:16:15 +0000 Received: by mail.gandi.net (Postfix) with ESMTPA id 0AA661C000C; Mon, 30 Sep 2024 12:16:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1727698570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iIUXvhb/6k8yqNTOTdXI2a7OI1BOudVjy0G7Tj0oLuI=; b=iPyFyaZBRSQHcfBM6plb3imzKRhhMZ4pFC5Ep0FBPNoxVtqEe8QOoJoGX7g31p359cFOs+ PtJyHi7tDuUeGPzmfM7TCUBL59DNMosUcny6kK2gtQAfO1KGKEhj96Z1jvR0z8pRIwDy/+ rp750AIK/2X+TicfiPuwSresKuFoqlwDrbZ0rq/UV95Kwj+J3xP4VJiRMLqc0YSS03xv0w k/CNAMqIi75Irf6cpzqzIjUCSoUK04+o/CmFn+YDm9O+V/WuhfA8NNsj0TPZ/CFNyKUOCg Cb8Edr4NGRYkfH01GAA+EC9sx9aAqtq+r1MMhy8b2Sf+nxi1+765dDeVYmGQZg== From: Herve Codina To: Geert Uytterhoeven , Andy Shevchenko , Simon Horman , Lee Jones , Arnd Bergmann , Derek Kiernan , Dragan Cvetic , Greg Kroah-Hartman , Herve Codina , Bjorn Helgaas , Philipp Zabel , Lars Povlsen , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Saravana Kannan Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Horatiu Vultur , Andrew Lunn , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Allan Nielsen , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v6 1/7] dt-bindings: reset: microchip,rst: Allow to replace cpu-syscon by an additional reg item Date: Mon, 30 Sep 2024 14:15:41 +0200 Message-ID: <20240930121601.172216-2-herve.codina@bootlin.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240930121601.172216-1-herve.codina@bootlin.com> References: <20240930121601.172216-1-herve.codina@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: herve.codina@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240930_051614_188574_B7D9ABCE X-CRM114-Status: GOOD ( 17.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In the LAN966x PCI device use case, syscon cannot be used as syscon devices do not support removal [1]. A syscon device is a core "system" device and not a device available in some addon boards and so, it is not supposed to be removed. In order to remove the syscon device usage, allow the reset controller to have a direct access to the address range it needs to use. Link: https://lore.kernel.org/all/20240923100741.11277439@bootlin.com/ [1] Signed-off-by: Herve Codina --- .../bindings/reset/microchip,rst.yaml | 35 ++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/reset/microchip,rst.yaml b/Documentation/devicetree/bindings/reset/microchip,rst.yaml index f2da0693b05a..5164239a372c 100644 --- a/Documentation/devicetree/bindings/reset/microchip,rst.yaml +++ b/Documentation/devicetree/bindings/reset/microchip,rst.yaml @@ -25,12 +25,16 @@ properties: - microchip,lan966x-switch-reset reg: + minItems: 1 items: - description: global control block registers + - description: cpu system block registers reg-names: + minItems: 1 items: - const: gcb + - const: cpu "#reset-cells": const: 1 @@ -39,12 +43,29 @@ properties: $ref: /schemas/types.yaml#/definitions/phandle description: syscon used to access CPU reset +allOf: + # Allow to use the second reg item instead of cpu-syscon + - if: + required: + - cpu-syscon + then: + properties: + reg: + maxItems: 1 + reg-names: + maxItems: 1 + else: + properties: + reg: + minItems: 2 + reg-names: + minItems: 2 + required: - compatible - reg - reg-names - "#reset-cells" - - cpu-syscon additionalProperties: false @@ -57,3 +78,15 @@ examples: #reset-cells = <1>; cpu-syscon = <&cpu_ctrl>; }; + + /* + * The following construction can be used if the cpu-syscon device is not + * present. This is the case when the LAN966x is used as a PCI device. + */ + reset-controller@22010008 { + compatible = "microchip,lan966x-switch-reset"; + reg = <0xe200400c 0x4>, + <0xe00c0000 0xa8>; + reg-names = "gcb", "cpu"; + #reset-cells = <1>; + };