From patchwork Fri Jan 12 09:46:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 187643 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp65265dyc; Fri, 12 Jan 2024 01:50:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IFfwb/+djjh4fdxr3+mnq9RF2IFH3rpUAE5YfQVnoT0LrTzaVx8uZwGgl6rLcBjmMQbeaMo X-Received: by 2002:a05:6a00:886:b0:6d9:b3a9:6356 with SMTP id q6-20020a056a00088600b006d9b3a96356mr681541pfj.11.1705053012938; Fri, 12 Jan 2024 01:50:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705053012; cv=none; d=google.com; s=arc-20160816; b=BGKU/FhiRD+3K6J4f8NUJRdoVdfpPqQvbMuGmGT8rUN5m4YKAPc73sGb0Iul3hf+ji FpVxgL48YFIHAI6EPaAlEEnJvfdP57RAXTsl8VdGRYC/hfoyagtT87sgpTDXwLGKQgIG bHYdq6/iNL1KUye5C53uSp3uqV1P4Zv0EP0khwaEN4uc0sS16d9WMEey2E3s8s4CO0JZ 9Tx4iDhkRbZMGgAXvZ/EOa3CJlK1F1ui/JRNnDLcsiNIXIO89Z58ATMOtQV2Pg4eDWY+ pL5sK/qv1/bVZBpchlfh2wO/cDdrOFel0sKcInrfe/38E6bg3OZQcDmLANXFo3OICeEV kAPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=GQDE64MFR77YfpaIsRo8zkJ/UloP8wjpeBQtIV9Ptz0=; fh=jVP86127nqY6lQ2iFwv7XBo+ATUxJSI3LRZ9chA5Pqo=; b=kbj0TkphvTIJtnKou8ObZfY+YhIt1p0Jw1jse03LEC75bll3emXV/R6eDnekWrc4TE M0GHxCPzLAzy15DmFtmTMFLNYlxRor9KAccbhe3XlYTCybzttauxWIv/LkWWfT4t+EOj Hx6iit19rRReeEckylU60AZF8eEM4fwMIk0e5ZPPbi1FT2nFJeiKMU3K7r/yPImjHSJv QiR/ZqDT3DZT1WY1ZaEEsFfw7oXSsOWTz4EUMa2hCg3XObdlMpbsgEOaCqaWK2bCVKbT AHjS3nwmuS31RRQbWGu7xerxR7SW5AWtdOLYkD6q+b/IZmO5QFx/ZjQY/3ZVhzePVTvw vz1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="F/YirnXC"; spf=pass (google.com: domain of linux-kernel+bounces-24505-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24505-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id ka19-20020a056a00939300b006d999f59a98si2930550pfb.24.2024.01.12.01.50.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 01:50:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24505-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="F/YirnXC"; spf=pass (google.com: domain of linux-kernel+bounces-24505-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24505-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id BF013B25058 for ; Fri, 12 Jan 2024 09:48:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4AB755FEE9; Fri, 12 Jan 2024 09:46:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="F/YirnXC" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 509105DF11; Fri, 12 Jan 2024 09:46:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1705052804; bh=CzubW/gUVNGGtQYvTmtvySvTUAp6Dgbfxq213s18FKg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F/YirnXCcuauURatL3gA9Ezfh2b4mW5Nf/jA3AZueitmrViIoJ98qQWjFnlL8JPsr 3ig5FHK9trCUpirGTpl6/mTwzv+30lVhfVDYIab/J1N1GecOA9vlsY8rq0AjmFcLfr NeikVvgq74L1e8yWL63zVmrqj+ZaEvq/9YNnXrg9IA/CMT8LOo3VKsnCus1KUIGh4E bhRHgNu6XIFgbEOfjh+By/qhdA/ovqEYS7yXyLpePtaRT1Z+vFqPBpah3w+dY8+Uq/ 3DmFbg7nceqPFO4xcs7hP9LkqiovUtDM+euW2jeE5yjPeDomPUiP1s+7jPz3i+635f E26Bk9AX2Bilw== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id CF5C23781FCF; Fri, 12 Jan 2024 09:46:43 +0000 (UTC) From: AngeloGioacchino Del Regno To: linux-mediatek@lists.infradead.org Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, wenst@chromium.org, hsinyi@chromium.org, nfraprado@collabora.com, macpaul.lin@mediatek.com, sean.wang@mediatek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com Subject: [PATCH 06/15] arm64: dts: mediatek: radxa-nio-12l: Add Ethernet controller and Xceiver Date: Fri, 12 Jan 2024 10:46:23 +0100 Message-ID: <20240112094632.66310-7-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240112094632.66310-1-angelogioacchino.delregno@collabora.com> References: <20240112094632.66310-1-angelogioacchino.delregno@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787877667690533168 X-GMAIL-MSGID: 1787877667690533168 Configure and enable the ethernet controller found on the MT8395 SoC, along with the MDIO PHY/Transceiver (RTL8211FD) found on this board, enabling 10/100/1000M Ethernet connectivity. Signed-off-by: AngeloGioacchino Del Regno --- .../dts/mediatek/mt8395-radxa-nio-12l.dts | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts index 0daf27410311..221d7062d5ef 100644 --- a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts +++ b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts @@ -21,6 +21,7 @@ / { compatible = "radxa,nio-12l", "mediatek,mt8395", "mediatek,mt8195"; aliases { + ethernet0 = ð serial0 = &uart0; }; @@ -132,6 +133,26 @@ apu_mem: memory@62000000 { }; }; +ð { + phy-mode = "rgmii-rxid"; + phy-handle = <&rgmii_phy>; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <ð_default_pins>; + pinctrl-1 = <ð_sleep_pins>; + mediatek,tx-delay-ps = <2030>; + mediatek,mac-wol; + snps,reset-gpio = <&pio 93 GPIO_ACTIVE_HIGH>; + snps,reset-delays-us = <0 20000 100000>; + status = "okay"; + + mdio { + rgmii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-id001c.c916"; + reg = <0x1>; + }; + }; +}; + &i2c2 { clock-frequency = <400000>; pinctrl-0 = <&i2c2_pins>; @@ -297,6 +318,77 @@ &mt6359_vsram_others_ldo_reg { }; &pio { + eth_default_pins: eth-default-pins { + pins-cc { + pinmux = , + , + , + ; + drive-strength = <8>; + }; + + pins-mdio { + pinmux = , + ; + input-enable; + }; + + pins-power { + pinmux = , + ; + output-high; + }; + + pins-rst { + pinmux = ; + }; + + pins-rxd { + pinmux = , + , + , + ; + }; + + pins-txd { + pinmux = , + , + , + ; + drive-strength = <8>; + }; + }; + + eth_sleep_pins: eth-sleep-pins { + pins-cc { + pinmux = , + , + , + ; + }; + + pins-mdio { + pinmux = , + ; + bias-disable; + input-disable; + }; + + pins-rxd { + pinmux = , + , + , + ; + }; + + pins-txd { + pinmux = , + , + , + ; + }; + }; + i2c2_pins: i2c2-pins { pins-bus { pinmux = ,