🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #17228

Re: [PATCH net-next v3 2/2] net: stmmac: dwmac-rk: Add RK3572 support

#17228
From: Andrew Lunn
Date: Mon, 16 Nov 2026 13:55
34 lines
9926 bytes
> +static void rk3572_set_to_rgmii(struct rk_priv_data *bsp_priv,
> +				int tx_delay, int rx_delay)
> +{
> +	u32 val = GRF_FIELD(14, 8, rx_delay) | GRF_FIELD(6, 0, tx_delay) |
> +		  GRF_FIELD(15, 15, !!rx_delay) | GRF_FIELD(7, 7, !!tx_delay);
> +
> +	if (bsp_priv->id == 1) {
> +		regmap_write(bsp_priv->php_grf, RK3572_VCCIO0_3_VO_IOC_CON1, val);
> +		regmap_write(bsp_priv->php_grf, RK3572_VCCIO5_6_IOC_MISC0, val);
> +	} else {
> +		regmap_write(bsp_priv->php_grf, RK3572_VCCIO1_2_4_VI_IOC_CON1, val);
> +	}
> +}
> +
> +static const struct rk_gmac_ops rk3572_ops = {
> +	.init = rk3572_init,
> +	.set_to_rgmii = rk3572_set_to_rgmii,
> +	.gmac_phy_intf_sel_mask = GENMASK_U16(11, 9),
> +	.gmac_rmii_mode_mask = BIT_U16(3),
> +	.clock.io_clksel_io_mask = BIT_U16(7),
> +	.clock.gmii_clk_sel_mask = GENMASK_U16(6, 5),
> +	.clock.rmii_clk_sel_mask = BIT_U16(5),
> +	.clock.rmii_gate_en_mask = BIT_U16(4),
> +	.supports_rmii = true,
> +	.php_grf_required = true,
> +	.regs_valid = true,
> +	.regs = { 0x29d20000, 0x2a040000, 0 },
> +};

Just looking at this, it is not obvious that rx_delay and tx_delay are
actually not used.

	 Andrew
Technical Details
Message-ID: <f8d4b637-1818-419c-ac51-fb2ded1f9b3e@lunn.ch>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364401-linux-kernel-netdev=dewy.ru
References: <20261116-add-board-ok3572-c-net-v3-0-a957fdcd9c7a@qq.com> <20261116-add-board-ok3572-c-net-v3-2-a957fdcd9c7a@qq.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364401-linux-kernel-netdev=dewy.ru
From: andrew@lunn.ch (Andrew Lunn)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v3 2/2] net: stmmac: dwmac-rk: Add RK3572 support
Date: Mon, 16 Nov 2026 14:55:15 +0100
Organization: Usenet Network
Message-ID: <f8d4b637-1818-419c-ac51-fb2ded1f9b3e@lunn.ch>
References: <20261116-add-board-ok3572-c-net-v3-0-a957fdcd9c7a@qq.com>
 <20261116-add-board-ok3572-c-net-v3-2-a957fdcd9c7a@qq.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="2079607"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:qp8b5R8OTCcJ6Q29YgwRahzrdoo= sha256:IiXBlW0ID2PCPYVy69CqlaB9XHvQwMSiVPwlYNG0iVc=
	sha1:Zk+JYloIEYKikQvgVlBNJfjibq0= sha256:OgnPBGnWz7qeYOejGI/OkwZvVUEozDQkmiXuPP+dxOo=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id C1454114C60; Mon, 16 Nov 2026 16:57:29 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.151
X-Spam-Status: No, score=-3.151 tagged_above=-9999 required=6.31
	tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=lunn.ch
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id pJ2kZY22qFFq;
	Mon, 16 Nov 2026 16:57:26 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-364401-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 953E6114C5A; Mon, 16 Nov 2026 16:57:16 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id 340FA603394; Mon, 16 Nov 2026 13:57:16 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794837335;
	b=H5x1EwhAgu38tQwZ6KcKcQF6/6mJMdBjbd9ChHqmqO8vBsLG+OvZx+3u7T27/xmbZiS5
	 j/lfFo2iiKDXz4nWaBWrsowc+afdCteN3PhtQF8Wac2aXL4d0FY7wiQPVTiBf3WZGsrHN
	 oZZBpgSNmxfLzrZkAFbi67bQArEEO5KTJ7QTiICVkohsGI8hwsd6JP8DZO3vDK3ahNIZv
	 f9TpjP4TEAjbIFhLD3Wccxo2yCiJTG5n+Hern+Tp70sIeqEMdoCIhmdnHYLM9zi2PrAlD
	 N0g+ND04YJYGd3F7PeGpBjfoBY7hSPx596oSLkqgj2HhxJVShLpWJ1OdWAFGyYyqtug==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794837335;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date:
	 From:To:Cc:Subject:Message-ID:References:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=FCGOa3XrFIfDpttYvQ7K/eFdh+Q44Gu+ztj0XVelAZ0=;
	b=FFoL8hu1deXCB/7z2DQCOUMumgiRJIZHzhxYCLZSKBDkdGt8NnVUXRNrhc66ZsVf9ykz
	 05PaPRFRlF//SpFrAE+3aRIwBs6c91tgslq3OApEC7kUwStpVkKzv39pqH5ebKUJjv+1l
	 P6Q6JDvJpV+NhM4Cn/oFKRsvWEmS9maXeXM3vIsKJA75up2dQevcJNM8G15dWunKd4bBo
	 V2WZk1bj0IFuJKWVK0846mWnPCwj1mTjE/tI7ZavvYPnUicIN8lVE8WM6RBrtVSq9j6Q0
	 ZLGaTUq+qD+2Oagb1s2Dul5bUStNG9oIil0p/hAe0tHyFDsLFbDuf9t0iXzsjVlQCRg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=T04CbP61;
	dmarc=pass header.from=lunn.ch;
	spf=pass smtp.mailfrom=lunn.ch;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C1A560A263F;
	Mon, 16 Nov 2026 13:55:35 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=T04CbP61
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794837334;
	b=W8dAI9Mh6fRURbnF7piGU6h9sG9FtV53Qo1FMBIgVVLh1koum1ElPyPQiT/Y5k1A6L/r
	 OUjh6RNQLo1q7SPnqkN+9nviwNbLu05RxUNNpgry6U+Myo4wsovMKkwb00E1h4QY6C7mn
	 OaUbtaEzSPBnnCMeCWJu2++qmIHP824Fhc3XiwQ606SQLY1YgEn4Rp3UwZENKPSdqEtqx
	 WPomVmsnLahiCuT5Q3pOhYm8o72QDD8j8KOIjDs5VU4jjOal3gFPStCvS5vxpdWVThHPi
	 pzxWDgW94DMh1B4HxtvhvrGwaAzUk0Ff7R4jN/fMl7neUxgjX3xAaI49f+SoYuS6EDA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794837334;
	h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject:
	 Message-ID:References:MIME-Version:Content-Type:Content-Disposition:
	 In-Reply-To;
	bh=FCGOa3XrFIfDpttYvQ7K/eFdh+Q44Gu+ztj0XVelAZ0=;
	b=U78UGE4ARsCYQk76JZNPSauKAOgWp86TkmA3fOVfM+KiKIVUgGGOpj4RbAE89u0xzWyn
	 UW/fOOkREtfMi9YgKGQAiPmmYDMclMpRaCqjd6gqT86vCxApSsTD8bsi8BXgdZrAAy0cI
	 9cwwctJCF741yaoH8AEuFX5W0mHh3logMuFjSUykBLf4h2LlI/RQ5ctwCvIvc17jlnvaY
	 wzY/1n1XMWQ5GgUeOcw3Dx1yQxLqCdCNiUGIjdEWAc2Ypy3gFh9ofrRpIPxrhQT9fapI2
	 K1nQbJQqIIFtmKyyPII22M5fWGQF9RyiRlPjql0sgHAuxKdVEwM3kgSphR7RBbv8emQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=lunn.ch;
	spf=pass smtp.mailfrom=lunn.ch;
	dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=T04CbP61;
	arc=none smtp.remote-ip=156.67.10.101
X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF9A6606AE44;
	Mon, 16 Nov 2026 13:55:33 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DF9A6606AE44
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch
X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch;
	s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version:
	References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject:
	Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:
	Content-ID:Content-Description:Content-Disposition:In-Reply-To:References;
	bh=FCGOa3XrFIfDpttYvQ7K/eFdh+Q44Gu+ztj0XVelAZ0=; b=T04CbP61TFnnA7S4qsYADasFM9
	gEmppjaUC5umGuiwAsjETT43An/mWPSNQGyuJHmwBONwj5hGPHtiHI+Bd/cBelT2bYRZeSC5SK7di
	61uhuxeFxUiWWX0nxwVaN6ELnqkLUoAfK2a8k9pPTZNLx410AYtPgsHJ62T0VVKRO6yA=;
X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2)
	(envelope-from <andrew@lunn.ch>)
	id 1xSxAx-00Gvgu-M1; Mon, 16 Nov 2026 14:55:15 +0100
X-Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Heiko Stuebner <heiko@sntech.de>,
	David Wu <david.wu@rock-chips.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Jose Abreu <joabreu@synopsys.com>,
	Maxime Chevallier <maxime.chevallier@bootlin.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>, netdev@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261116-add-board-ok3572-c-net-v3-2-a957fdcd9c7a@qq.com>