Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1138698pxb; Thu, 4 Feb 2021 06:08:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJx9KNXx9zJxT/MDre5svQS+y7X9Cg3Ar5o9J3YxSVI3Gn3griTebb+O7V4Y4zg/cra+5xcn X-Received: by 2002:a17:906:719:: with SMTP id y25mr7976092ejb.180.1612447698518; Thu, 04 Feb 2021 06:08:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612447698; cv=none; d=google.com; s=arc-20160816; b=s7AuWbrmVcIFd4J+MEaMdEJG2mkSzAuhOq/9o9tDkXAyUh8MsX7c/QERg29NKoCBW1 zPA/tnk7mKWUndFAj8JtqvlhJrz/5xRr4m51WnF8myiPyWAG/hMmfkfCDOfzJSSCv9UH dmFJXk+5RvM38tpp3iuDw6T675uP7tpObBy/7yv2y8E08FMjBpryTe25ebNukRBkD8vl Pmy4mjqcuzZsfG9Y4ZhaeSzM0l5v5OMr9G71PAPi2nJbOn2P+2y6dnLqSSAQEmvbN56/ 34IBcZGQLET68FeTv4gF8DkSJ5Ff3v2bJKtK8bLYo0LjmYpQ5BzqIj49jw1+k2TnYL2J jq+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=lBKAQ1HsH/ZAVgA/IWh8CgaUESLQFu0aTMnYjWNZz4k=; b=A6MuKWGPcSwXSWfo16+TQYStOPmm4FL9etKoc9ew16tECeMuxAiPqrGjM8TJY2ppd1 GuoMlkPYhu5E9kUlmj+quSfO+Sb0r01UaNisdpoAyn2/y5z/bVZuObAXOzKt15TW92RL /xA2o15GJFvBPxoJDAGpnEC17rHmRr+AoUshpgIRp+HN9ghfAJF5+uPVU3+peNZEpKpT w3yJyghwe2NpPpl0iE83A+H0zE94YcNdiG3klGMBYesXLGD9NYl5PKWYHr1PcdaWwj1Y hm41ito5pSDm6gMKjYw+7PNARaOfdE+CrGvZnYQLnlgjfyWMm+ZMxiIKQrELdIu2GYvU bbSw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a29si600282edm.271.2021.02.04.06.07.31; Thu, 04 Feb 2021 06:08:18 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236614AbhBDOE5 (ORCPT + 99 others); Thu, 4 Feb 2021 09:04:57 -0500 Received: from elvis.franken.de ([193.175.24.41]:52100 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236475AbhBDOBV (ORCPT ); Thu, 4 Feb 2021 09:01:21 -0500 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1l7fBQ-0004tX-00; Thu, 04 Feb 2021 15:00:32 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id 1AEF7C0D53; Thu, 4 Feb 2021 14:59:19 +0100 (CET) Date: Thu, 4 Feb 2021 14:59:19 +0100 From: Thomas Bogendoerfer To: Sander Vanheule Cc: linux-mips@vger.kernel.org, John Crispin , linux-kernel@vger.kernel.org Subject: Re: [PATCH] MIPS: ralink: manage low reset lines Message-ID: <20210204135919.GA13761@alpha.franken.de> References: <20210203092140.12458-1-sander@svanheule.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210203092140.12458-1-sander@svanheule.net> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 03, 2021 at 10:21:41AM +0100, Sander Vanheule wrote: > Reset lines with indices smaller than 8 are currently considered invalid > by the rt2880-reset reset controller. > > The MT7621 SoC uses a number of these low reset lines. The DTS defines > reset lines "hsdma", "fe", and "mcm" with respective values 5, 6, and 2. > As a result of the above restriction, these resets cannot be asserted or > de-asserted by the reset controller. In cases where the bootloader does > not de-assert these lines, this results in e.g. the MT7621's internal > switch staying in reset. > > Change the reset controller to only ignore the system reset, so all > reset lines with index greater than 0 are considered valid. > > Signed-off-by: Sander Vanheule > --- > This patch was tested on a TP-Link EAP235-Wall, with an MT7621DA SoC. > The bootloader on this device would leave reset line 2 ("mcm") asserted, > which caused the internal switch to be unresponsive on an uninterrupted > boot from flash. > > When tftpboot was used in the bootloader to load an initramfs, it did > initialise the internal switch, and cleared the mcm reset line. In this > case the switch could be used from the OS. With this patch applied, the > switch works both in an initramfs, and when (cold) booting from flash. > > arch/mips/ralink/reset.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) applied to mips-next. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]