From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 80B6B345CB5 for ; Wed, 17 Dec 2025 09:59:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765965543; cv=none; b=nkT7kvCDHaDrRMRj9tc7qFk99bX13ptmQiE8wkkkZBUnEKDMA61RKDI2f0jJaLS5sMfNT5KTYm29YptVbg+xSRTzGvBjsyh1BbbFP6FH35GkWRzXuTKxtQ0vtXLo6+6vYGeTvFk/UPBiL5uRsiEfYKUdRffchXr6M+YCzE+F9ls= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765965543; c=relaxed/simple; bh=jXr4jE9q0RPJ5l9ZO2welI2KAwlOwkq/FLEItP4YTZY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Xr1/1C+tSsxdWoGon9FTAyXY7AbRO/SRrUypctqC6iBCRyOJ1bxhc9NZ9hxyTv9VfncfFqxwPwxZmmTDuicqhQ+eKNscjo0m7BAxJRgBPFUY4kBUYbUO9U+P6tqeiY1zpg8gO6AsqqRGmk+FkGp/JoDRHvhoISgqsvconsq/AxM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=cfTTo32t; arc=none smtp.client-ip=209.85.221.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cfTTo32t" Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-42e33956e76so2557088f8f.3 for ; Wed, 17 Dec 2025 01:59:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765965540; x=1766570340; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=3jc3whUaBr7zlktBSv49rtqSYWkEekv2gEydX/NzBm8=; b=cfTTo32tqwbRgmAxi7T6/K3Q0c2L4yDgNHxrt5P/I5nvdxD4YQsnTov+mvS2vRmlJn hzO0/frP+SDa2cZFpeFQl39Mw0kqWpJbafSVqHDiwspTu44IY1HkMboBq5vrPoWJ/57s 5yXIWcKC3M8aMQRnfuV9O0LyZwAydJo1m6AZELd2XCEe6Q/gwYCmGCHdgNjJYAM7u0y5 V921zvnW/ak6oY8k6TZfNaOSTWDfWACZxd+3xKr1rRMOMa6wsHfp+0Rax/EJ0bFRbmbO 2KvtstlL6D2QJ52HKyPIjZ945oJZkXEZFuWntJacmmQW9WMYSV0YSAZFDtzq7vP86+iJ yNRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765965540; x=1766570340; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3jc3whUaBr7zlktBSv49rtqSYWkEekv2gEydX/NzBm8=; b=gsIKyqWAA5dR8nJZEhNyitelo+/VhOUPJU1bkamggMSW4KGGS7lwDCZuLk9P1JMgj5 wMtZGIYwUmdltHlMrt+cWfafIRsisU6TdUGgjDioQY1kL7Vx8u/yiW28DudxvjgNTXaq G15X7zUvs7pz1sMgzu1OsqdjJuw5RR3O1h/DsfcTUVdqZNklT6vrH/MSQMnfkcq+RRb+ gI7PIKAic/IFc5lIqH57VFJM+chK/s4y37AMx0P1PSBrxOT2TWef/37A8gMWJspZOwgr xc4t366zNo3pF1m1qqbNAO93gsc6J1v22kr9FTGw1XP8gib6iy7Zmu6RcOZ3ZtTzphip N73Q== X-Forwarded-Encrypted: i=1; AJvYcCUqLex18/hLBn1+tiq9mTgx/3ViCzNba+YkxlioYHZliZy7cA0Fy7Yi8ugFQIXXKzup0UbknP60koP1K30=@vger.kernel.org X-Gm-Message-State: AOJu0Yy+DXBN1mK1aUgdxPBugggMKgOSV26/4WPM4vSVCAa49w4pA6kJ Rf6s+nNfWxKL6a78pihw4XfTBuhCxNDZ4tagkfUrx4I3uuHg33m99kwO X-Gm-Gg: AY/fxX4L1JRL6tKVqQMBnEb8R72mulv08epUc6mIgyjIyo4ADrQ47GDyy4LCitdB1Zx snQjdQlAzHvZnOTbBvBL9aahhvJOl7HNiPqLt06MogL8ApPj6Ot3oWxBgrh7i6Zm/W+VBFboprf fndfv2CvP3dutQ5Nf76zbqOcf/Hwq6E2gNWVsqQWHl6lqurciPLuukdjxhX8gfTs9Nv7Mx5D5Vl L5qlOlHKokcxU934tLhcl4EXmOYMq8yIMk1jrJmHAGC2l83Z/PJUKq/gJY50vYjrk5pKrTDTuRR Wyot7WpSq0A7G7j05jARKpC5Kj7DhYCkKUmnvhxw7myxXDoN/oUhtsqwTkIBp9T7n44jOdH7kWP s2JiWX/ZXZNibKUBSo9wqxe/MxNMk815w28ASr1GEzramevZnOEo/MHavc78bejxnuz+9DuorxH HqdHD33i3wY+FDa2HQ141wcA== X-Google-Smtp-Source: AGHT+IE0TpHDZKDDpv8f/WTGsH3kkUcjmw8BbJKHsuXuqCvvog6Xf4zlav8LM2abYWjss5eG+OPWMg== X-Received: by 2002:a05:6000:a:b0:431:488:b9a8 with SMTP id ffacd0b85a97d-4310488ba7fmr4767326f8f.33.1765965539531; Wed, 17 Dec 2025 01:58:59 -0800 (PST) Received: from eichest-laptop ([2a02:168:af72:0:b288:1a0e:e6f7:d63a]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4310adeeef6sm3845307f8f.32.2025.12.17.01.58.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Dec 2025 01:58:57 -0800 (PST) Date: Wed, 17 Dec 2025 10:58:54 +0100 From: Stefan Eichenberger To: Rob Herring Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, krzk+dt@kernel.org, conor+dt@kernel.org, hkallweit1@gmail.com, linux@armlinux.org.uk, geert+renesas@glider.be, ben.dooks@codethink.co.uk, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, francesco.dolcini@toradex.com, rafael.beims@toradex.com, Stefan Eichenberger Subject: Re: [PATCH net-next v1 2/3] dt-bindings: net: micrel: Add keep-preamble-before-sfd Message-ID: References: <20251212084657.29239-1-eichest@gmail.com> <20251212084657.29239-3-eichest@gmail.com> <20251215140330.GA2360845-robh@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251215140330.GA2360845-robh@kernel.org> On Mon, Dec 15, 2025 at 08:03:30AM -0600, Rob Herring wrote: > On Fri, Dec 12, 2025 at 09:46:17AM +0100, Stefan Eichenberger wrote: > > From: Stefan Eichenberger > > > > Add a property to activate a Micrel PHY feature that keeps the preamble > > enabled before the SFD (Start Frame Delimiter) is transmitted. > > > > This allows to workaround broken Ethernet controllers as found on the > > NXP i.MX8MP. Specifically, errata ERR050694 that states: > > ENET_QOS: MAC incorrectly discards the received packets when Preamble > > Byte does not precede SFD or SMD. > > It doesn't really work right if you have to change the DT to work-around > a quirk in the kernel. You should have all the information needed > already in the DT. The compatible string for the i.MX8MP ethernet > controller is not sufficient? Is doing something like this acceptable in a phy driver? if (of_machine_is_compatible("fsl,imx8mp")) { ... } That would be a different option, rather than having to add a new DT property. Unfortunately, the workaround affects the PHY rather than the MAC driver. This is why we considered adding a DT property. > > > > The bit which disables this feature is not documented in the datasheet > > from Micrel, but has been found by NXP and Micrel following this > > discussion: > > https://community.nxp.com/t5/i-MX-Processors/iMX8MP-eqos-not-working-for-10base-t/m-p/2151032 > > > > It has been tested on Verdin iMX8MP from Toradex by forcing the PHY to > > 10MBit. Withouth this property set, no packets are received. With this > > property set, reception works fine. > > What's the impact of just unconditionally setting this bit? Seems like > any impact would be minimal given 10MBit is probably pretty rare now. In theory it shouldn't have any negative impact. According to the Errata: The IEEE 802.3 standard states that, in MII/GMII modes, the byte preceding the SFD (0xD5), SMD-S (0xE6,0x4C, 0x7F, or 0xB3), or SMD-C (0x61, 0x52, 0x9E, or 0x2A) byte can be a non-PREAMBLE byte or there can be no preceding preamble byte. The MAC receiver must successfully receive a packet without any preamble(0x55) byte preceding the SFD, SMD-S, or SMD-C byte. However, since Micrel didn't document this bit and because the driver is already older, we are afraid to break something for other users if we enable it unconditionally. Regards, Stefan