From mboxrd@z Thu Jan 1 00:00:00 1970 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 7A53DD216B2 for ; Thu, 4 Dec 2025 16:48:18 +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: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xjinBqQteehGM6jaRBiqXNFnQoRix6VxRiUOtQ6uvBI=; b=C5HT4RL6PgpulPKRjg90wyFu0y EFwkTVN55JwNNqVO+dAyAKHuqNkuyBFSJACeZKI58GtdTvtJPRDTLNQfFsN4U7Mdcgk8Dpmg+2/Vc zQinjxoAgVDtM+4n5albyLypwnpAu7sfN8vVbupvNPTTpqv6FRMdcsBFflrK17RIc6rD3AI20xtwi B6Lwz8rmDueG7QwrzjIa50NF7URnNe0RRRPChvrOWMvtjzxzIoqjOIroWAFzX6OfZHMuaqTEdGaHy g6yP70HrUdg7+RLPkHLyhDNZOEzmIIQnJsd3Ze5YyWiRcXqzobWBXjInza1/xxiS3m/G9kCs+kMV9 VT254LtQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vRCV5-00000008Jae-2yiH; Thu, 04 Dec 2025 16:48:15 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vRCV4-00000008JaS-2M4j; Thu, 04 Dec 2025 16:48:14 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id A51D960200; Thu, 4 Dec 2025 16:48:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C59AEC116B1; Thu, 4 Dec 2025 16:48:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764866893; bh=UkC+QMQ4k9lCMANWG3quk95RKaYDeofbdrxNz9Jdz/M=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=a10rYX0xwCL5ATxmQuGOKfiv0qz690sWMLTqCrGvIcebZOvyRvBHwg2VH22vaet03 QGl4P+7uvAuCbk/SI4IctgZTbmm55y2uDb+9Y8vPuOW96LDra9PB2Ml0hPDWdpqa56 6Wpgu2DyYI9t5gdU/tk0QgNJKlj810pUK7Qcn4RpWs6m5UuZ786A5o26M4sph8vp7K j8Wac6zwZjPpqG0I+oTf+mZ5xXKDGUWIs6ype/4nc5vq7ghHK/hx75mzSN1XMbqOr2 Vh0URcOOa9ewEbEx0r/uMU6d9lrUR7ytU+4AFNBM6KlkVHssjOAn01WtqoA3WoEbDH 8Og2CEFf1Yf2w== Message-ID: <66d080f1-e989-451f-9d5e-34460e5eb1b0@kernel.org> Date: Thu, 4 Dec 2025 17:48:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 2/2] net: dsa: mt7530: Use GPIO polarity to generate correct reset sequence To: Vladimir Oltean Cc: Daniel Golle , Frank Wunderlich , Andrew Lunn , Chen Minqiang , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , "Chester A. Unal" , DENG Qingfang , Sean Wang , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, netdev@vger.kernel.org References: <20251129234603.2544-1-ptpt52@gmail.com> <20251129234603.2544-2-ptpt52@gmail.com> <0675b35f-217d-4261-9e3f-2eb24753d43c@lunn.ch> <20251130080731.ty2dlxaypxvodxiw@skbuf> <3fbc4e67-b931-421c-9d83-2214aaa2f6ed@lunn.ch> <0d85e1e6-ea75-4f20-aef1-90d446b4bfa1@kernel.org> <00f308a1-a4b1-4f20-8d8e-459ddf4c39b1@gmx.de> <20251204131626.upw77jncqfwxydww@skbuf> <4170c560-1edd-4ff8-96af-a479063be4a5@kernel.org> <20251204160247.yz42mnxvzhxas5jc@skbuf> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoV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87ecuHlpL3uuQ0ZZNWqHgZoQLXoqC2ZV5KrtKWb/jyiFX/sxSrodALf0zf+tfHv0FZWT2 zHjUqd0t4njD/UOsuIMOQn4Ig0SdivYPfZukb5cdasKJukG1NOpbW7yRNivaCnfZz6dTawXw XRIV/KDsHQiyVxKvN73bThKhONkcX2LWuD928tAR6XMM2G5ovxLe09vuOzzfTWQDsm++9UKF a/A= In-Reply-To: <20251204160247.yz42mnxvzhxas5jc@skbuf> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 On 04/12/2025 17:02, Vladimir Oltean wrote: > On Thu, Dec 04, 2025 at 03:49:52PM +0100, Krzysztof Kozlowski wrote: >> On 04/12/2025 14:16, Vladimir Oltean wrote: >>> I get the feeling that we're complicating a simple solution because of a >>> theoretical "what if" scenario. The "NOT" gate is somewhat contrived >> >> You downplay this case and suggest (if I get it right) that NOT gate is >> something unusual. >> >> I mentioned "line inverter" but it's not about NOT gate. There is no >> need for NOT gate at all, like some magical component which no one puts >> to the board. The only thing needed is just to pull the GPIO up or down, >> that's it. It's completely normal design thus it CAN happen. >> >> Of course "can" does not mean it actually does, because certain >> configurations like powerdown-fail-safe are more likely and I am not an >> electric circuit designer to tell which one is better, but that >> downplaying does not help here. > > I don't want to dismiss this comment, but I don't really understand it. > What do you mean by "line inverter", is it the component inside the GPIO > pin which makes it active low? I mentioned much earlier "line inverter" and here the "NOT gate" appeared and both suggest you need some dedicated component. What I want to say that it is not true. You do not need dedicated component to have different polarity, because it is as simple as connecting the wire to ground or to voltage and moving a resistor from one place to another. > > I thought that the premise of this patch set is that old device trees > are all (incorrectly) defined as GPIO_ACTIVE_HIGH, but someone familiar > with the matter needs to fact-check this statement. Yes, that's most likely true. > > Anyway, you and Andrew are talking about different things, you haven't > made it clear (or at least it wasn't clear to me) that the inverter you > are talking about isn't his NOT gate (that isn't described in the device > tree at all, as opposed to your inverter which would make the GPIO line > GPIO_ACTIVE_LOW - that's something verifiable). Both are the same - inverter or NOT gate, same stuff. It is just connecting wire to pull up, not actual component on the board (although one could make and buy such component as well...). We never describe these inverters in the DTS, these are just too trivial circuits, thus the final GPIO_ACTIVE_XXX should already include whatever is on the wire between SoC and device. > >> Just to clarify: I expect clear communication that some users will be >> broken with as good as you can provide analysis of the impact (which >> users). I only object the clame here "no one can ever pull down a GPIO >> line thus I handled all possible cases and made it backward compatible". >> >> And that claim to quote was: >> "Therefore, regardless of whether a DTS is old or new, correct or >> incorrect, the driver now generates the correct electrical reset pulse." >> >> which is 100% false and I am surprised how one could claim that. > > Agree, the communication should be better. Best regards, Krzysztof