From patchwork Sat Jan 18 11:13:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13944115 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) (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 9975F7FD; Sat, 18 Jan 2025 11:14:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.152 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737198862; cv=none; b=EkIR5p7YQbruKRadxLSWkhPTPldAZg4CLsrYMr2iXZ7aoy/Mu5JcgAvhBRm80WXrEzBDjo+6g2Z3f7EqQu3uZVKweNVZIWC8XQWVvq7hyCc+ZODtquFxrlf+FL4pt3SwaxOeMjjnhp9s3/6lhYr4XD0Uv/EvNc1Zz2B+h2QMnTY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737198862; c=relaxed/simple; bh=psQDU8IbRLCzUr09K6warGXs1wnxnJOaGA3e4E0sJYs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Rzs0HI6Ib1IBjVqXM2WpuyEQCo/U9T9Zci1Dw3rPdTsHgxWZ4o1DmZuv3KnrmgE4nABfo9uk0Ho/TKsEvkIgq1ZhC1Fca+AXgrssMyj8kWNkMHX3XGW60xHtKqwnqYA+Gcq14qzOEeJsI+RdYHaF/063Jz0hSz+L9FXih9yyFv8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org; spf=pass smtp.mailfrom=mailbox.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=adIzxWPV; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=AuuW46MP; arc=none smtp.client-ip=80.241.56.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mailbox.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="adIzxWPV"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="AuuW46MP" Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (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) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4YZvBD4tK9z9t1n; Sat, 18 Jan 2025 12:14:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1737198852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=b8Motikz+/X+Nha5DRlA0aqs4LCHAeWCteypUl9PyKQ=; b=adIzxWPVl0hwY2ZTFkXacuqBfzFVHK0gnfaAVFkSKBr8DCfhV03GzJ8XJ5PBWelR67orw5 Jqey7oqQPJ90fwQ2JOSg1rtR12Fq5FAwPcIaqwGOvsE774CYJG/V6dsjr1wQwTQHhywf1T +VSK7TTCtVNkBtu0AC9eVdO23j429Qki56t4X52VhToGLfHCG4YX9TF/oC+wXP7aGDOzf1 2qSmGfBwa2585ZIDN4yyTvAybEd6s4hxvhM27nf2CrWy9kNKl7y1U9Wkks5d/8ONBMeSwn zpjfBqrQ1r6LUdCjRyHcmuQ0YFRwpvw6gA3JX77/GV8UR0+js8k1BIyrePUX0A== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1737198850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=b8Motikz+/X+Nha5DRlA0aqs4LCHAeWCteypUl9PyKQ=; b=AuuW46MPW5r5/aehtph4vVa5//QpSZqVHE6ISAVtbXfPP8osRxNprilD6QsjUoBYqEceSn MfVUjgupsUkIicWNu36XsJ4Krblzblpaa1yFcjcsop1JwN8XxtuRiy+OqCMxx6BDfUrp6Y i+PAEgg+ti9WsXW1JDgqTc2ks07Q3ouFnr7n0P4sIfO22Dg3ONybAhMc/Z8Sl/7fgKw/0H GMzyoUbKJpXZ5AEmA5kcGhim+MChLEBp9h7YR+TRDD1+D8qHnOXXxiAckfX+eCBlwNHJMU NyLLABRyqaazhHkWnQRXuPjq0IoAJ5bbe6KTzsjtfVSh70xtc3+dRGDENSPDwg== To: linux-arm-kernel@lists.infradead.org Cc: Marek Vasut , Conor Dooley , Geert Uytterhoeven , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH 1/5] arm64: dts: renesas: r8a779f0: Add labels for rswitch ports Date: Sat, 18 Jan 2025 12:13:08 +0100 Message-ID: <20250118111344.361617-1-marek.vasut+renesas@mailbox.org> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MBO-RS-ID: b55d575ec4bd2907d2c X-MBO-RS-META: gip67yn96u3zt9bcyrwgscr7pk15mehr X-Rspamd-Queue-Id: 4YZvBD4tK9z9t1n Introduce labels for each rswitch port in the form 'rswitchportN'. Those can be used to access rswitch port nodes directly, which is going to be useful in reducing DT indentation slightly as well as in DT /aliases node to reference the rswitch ports as ethernetN interfaces. No functional change. Signed-off-by: Marek Vasut --- Cc: Conor Dooley Cc: Geert Uytterhoeven Cc: Krzysztof Kozlowski Cc: Rob Herring Cc: devicetree@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org --- arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/renesas/r8a779f0.dtsi b/arch/arm64/boot/dts/renesas/r8a779f0.dtsi index 054498e54730b..8d296d0ebdfdc 100644 --- a/arch/arm64/boot/dts/renesas/r8a779f0.dtsi +++ b/arch/arm64/boot/dts/renesas/r8a779f0.dtsi @@ -974,15 +974,15 @@ ethernet-ports { #address-cells = <1>; #size-cells = <0>; - port@0 { + rswitchport0: port@0 { reg = <0>; phys = <ð_serdes 0>; }; - port@1 { + rswitchport1: port@1 { reg = <1>; phys = <ð_serdes 1>; }; - port@2 { + rswitchport2: port@2 { reg = <2>; phys = <ð_serdes 2>; }; From patchwork Sat Jan 18 11:13:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13944120 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) (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 A72A4487BF; Sat, 18 Jan 2025 11:23:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737199390; cv=none; b=MXpWoLqGlC43MiOy7yes5UNfNJvL16bKtf9RsNaPqoTO/xigfKhkrQ32wO3H4D1vAP4bqI7Sa8kF2q29Oc4TglhCgK//wK+qYmpH3JPMB9WTfVpCiBE6sMA94fuS+36Wtg7/eUelRUmyi7NkgJOhgJwfVv8sw12sOAXyryLAAjw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737199390; c=relaxed/simple; bh=j3V1t+F/jaPfF47C8Kzi+eWKXStjop9dkBFqCWJ4SDQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=G0IJnuXvhNzqATQRoK6nhWWAS+wG48OD+Xg3eYDlmpzYhADX5m+voYp8AKo8gCiuw51Sz08xv/ooW3jXLTvLmYWMp2DI9GhHN0qSNpiG+7feUiLJbX1hsN5ce90GRndguU51DoecB+SoSKNaKK7Dzkp3RpYOMAoqNKwaG/RcDcg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org; spf=pass smtp.mailfrom=mailbox.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=kaTwn/fH; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=l1BYxfzU; arc=none smtp.client-ip=80.241.56.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mailbox.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="kaTwn/fH"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="l1BYxfzU" Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (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) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4YZvBG1sPYz9skP; Sat, 18 Jan 2025 12:14:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1737198854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H28thG/7gsRTlTRsLj1+D2yQgfkc215Y94p59uZOiFE=; b=kaTwn/fHEHGBYnp1dw9JHTRsIyTYMIgllPDUTKR5v1Q/9kLVqiVqIULOqP/kyIQTlrnkpS w9YOJ7wJP+wr4Wah6ig/lV87Cio2BZ0p3VngadKPCKPfRVL6t0cM8rrpcaT2WWsBwwUHiz QjGF6H1q0HFuP49AZ7IW90GO79YlNeHl8IbYWjw2S1mtIKWs8+g/m3iB0L5UZSQSDPKb70 ebyN5Gz6Nt/ZesN5tkp2cgXJ1hYT8fmjOYp9xnERZSYv6fqFE565lVUOClsovKD7Xymf7D HkNqyiPMFqP6AdlMaD0qxqY/PuDZJDuAKDLsFZ4g6bsFOSEZqa7mdQbTvNvzFw== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1737198852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H28thG/7gsRTlTRsLj1+D2yQgfkc215Y94p59uZOiFE=; b=l1BYxfzUMVMmMMk5Z+TPBG8SM5G4igr70Go53lMNYRxzqFSwJT5ERJ8keCpIpqjRJuHyVa k+DhWskXAMXknYlqYzy4dkxh05fljqdzcMiAA53BJu1A8hLrPw22PjetfVQMK+S0YAtESB stTG38EcR6rClow/9lj4HKMo2jZzRJrTyfIWPCuKHK+rt3RZ6dU4fdF3c2HtS6szDXLD7n TBwbFe+44Idvh9DLH2IcS9r97Ks6eIBB4q48AJuk+A53vkuwNf2vKwB+EvO5wgTNfMdBlg QX7onfkT87KeFC0nnYDKCXG9qVC/OsrTNJMV1dVnTwR75IL2HDHmsuyER/Z3sA== To: linux-arm-kernel@lists.infradead.org Cc: Marek Vasut , Conor Dooley , Geert Uytterhoeven , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH 2/5] arm64: dts: renesas: spider-ethernet: Access rswitch ports via phandles Date: Sat, 18 Jan 2025 12:13:09 +0100 Message-ID: <20250118111344.361617-2-marek.vasut+renesas@mailbox.org> In-Reply-To: <20250118111344.361617-1-marek.vasut+renesas@mailbox.org> References: <20250118111344.361617-1-marek.vasut+renesas@mailbox.org> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MBO-RS-META: 6idgtqos3ymrujijt3bpiaj3u8jemggr X-MBO-RS-ID: f8d397af97b6b2107a8 The r8a779f0.dtsi now contains labels for each rswitch port in the form 'rswitchportN'. Use those to access rswitch ports and slightly reduce the depth of this board DT. No functional change. Signed-off-by: Marek Vasut --- Cc: Conor Dooley Cc: Geert Uytterhoeven Cc: Krzysztof Kozlowski Cc: Rob Herring Cc: devicetree@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org --- .../dts/renesas/r8a779f0-spider-ethernet.dtsi | 87 +++++++++---------- 1 file changed, 42 insertions(+), 45 deletions(-) diff --git a/arch/arm64/boot/dts/renesas/r8a779f0-spider-ethernet.dtsi b/arch/arm64/boot/dts/renesas/r8a779f0-spider-ethernet.dtsi index 5d38669ed1ec3..069f36ba53a4f 100644 --- a/arch/arm64/boot/dts/renesas/r8a779f0-spider-ethernet.dtsi +++ b/arch/arm64/boot/dts/renesas/r8a779f0-spider-ethernet.dtsi @@ -42,61 +42,58 @@ &rswitch { pinctrl-0 = <&tsn0_pins>, <&tsn1_pins>, <&tsn2_pins>; pinctrl-names = "default"; status = "okay"; +}; + +&rswitchport0 { + reg = <0>; + phy-handle = <&u101>; + phy-mode = "sgmii"; + phys = <ð_serdes 0>; - ethernet-ports { + mdio { #address-cells = <1>; #size-cells = <0>; - port@0 { - reg = <0>; - phy-handle = <&u101>; - phy-mode = "sgmii"; - phys = <ð_serdes 0>; - - mdio { - #address-cells = <1>; - #size-cells = <0>; - - u101: ethernet-phy@1 { - reg = <1>; - compatible = "ethernet-phy-ieee802.3-c45"; - interrupts-extended = <&gpio3 10 IRQ_TYPE_LEVEL_LOW>; - }; - }; - }; - port@1 { + u101: ethernet-phy@1 { reg = <1>; - phy-handle = <&u201>; - phy-mode = "sgmii"; - phys = <ð_serdes 1>; + compatible = "ethernet-phy-ieee802.3-c45"; + interrupts-extended = <&gpio3 10 IRQ_TYPE_LEVEL_LOW>; + }; + }; +}; - mdio { - #address-cells = <1>; - #size-cells = <0>; +&rswitchport1 { + reg = <1>; + phy-handle = <&u201>; + phy-mode = "sgmii"; + phys = <ð_serdes 1>; - u201: ethernet-phy@2 { - reg = <2>; - compatible = "ethernet-phy-ieee802.3-c45"; - interrupts-extended = <&gpio3 11 IRQ_TYPE_LEVEL_LOW>; - }; - }; - }; - port@2 { + mdio { + #address-cells = <1>; + #size-cells = <0>; + + u201: ethernet-phy@2 { reg = <2>; - phy-handle = <&u301>; - phy-mode = "sgmii"; - phys = <ð_serdes 2>; + compatible = "ethernet-phy-ieee802.3-c45"; + interrupts-extended = <&gpio3 11 IRQ_TYPE_LEVEL_LOW>; + }; + }; +}; + +&rswitchport2 { + reg = <2>; + phy-handle = <&u301>; + phy-mode = "sgmii"; + phys = <ð_serdes 2>; - mdio { - #address-cells = <1>; - #size-cells = <0>; + mdio { + #address-cells = <1>; + #size-cells = <0>; - u301: ethernet-phy@3 { - reg = <3>; - compatible = "ethernet-phy-ieee802.3-c45"; - interrupts-extended = <&gpio3 9 IRQ_TYPE_LEVEL_LOW>; - }; - }; + u301: ethernet-phy@3 { + reg = <3>; + compatible = "ethernet-phy-ieee802.3-c45"; + interrupts-extended = <&gpio3 9 IRQ_TYPE_LEVEL_LOW>; }; }; }; From patchwork Sat Jan 18 11:13:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13944122 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) (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 62989188A08; Sat, 18 Jan 2025 11:23:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.151 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737199393; cv=none; b=OkHMM2HWhsvdt9sWzTcFB/khF8RhvtnegyMGPa/dSKqQoHcwSaAD4n/g2fnJRZTVNwC83dIJy3TIQOJhsE9PErsL/xFFU1bnnGE7L4DAuOgRk2znMtw4ikSuJep2mDP/iWgnWRV0KstCC2hKmNREbvIPwud+HVDeGOvDN5rOLxs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737199393; c=relaxed/simple; bh=7Hrpo7UUkON8GTEzSTDV74BtjVQY+830Ku6O2IdNOdc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Nlqh40U1uyZgpCHh+rWuCxZkFqLw6+oG6EyQwmPIUWzcTEXjXswSJKC1sGyMB662P1s6JhYWpCBRJnEOAK0AQQ/IvwwK5vc4oh23Lt/Z1wfRATWKJ1GewthEtV58g1zYho+3inFstjZubP4XObLmarvwdY2b6scdoTr3fNerMHM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org; spf=pass smtp.mailfrom=mailbox.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=kj2DNjCP; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=T3Pc+1dK; arc=none smtp.client-ip=80.241.56.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mailbox.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="kj2DNjCP"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="T3Pc+1dK" Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (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) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4YZvBH4YDJz9sqc; Sat, 18 Jan 2025 12:14:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1737198855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1Bw1E7VebGu/07f+zwSP8xjgvwa8wtrXVpYgFq69OsM=; b=kj2DNjCPmRH532qvXtgxawm9kOFDrURMVk5LQrJiPJORbWgXAO9csNtXtcEc8mBmDe/yiV nH6gKmRyYNdidyKAB+ohrzHjaHOl96jHfKlOTDmq8+sIam68VUwttQpUNcv8e2VrPZsUl+ mgDGQlAHJ+JGhw0bCeeMkRlSnD5scTkJLk9LtcDXEHOqQa6lM7l6SF9Gluxqc0Cnx1o/7z OmC5KYnPUu2CNj+L1Io118EEkyEmzc7q+TmkZLsG0r+af4VS9XIOkfNRxjMM4nCZu/2nVi vY2/uDPOw+HGinh9G4ALyMc90HPYyEt33/Sl6X2dCwGyqxPA7nJuSZjTAkUvHA== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1737198853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1Bw1E7VebGu/07f+zwSP8xjgvwa8wtrXVpYgFq69OsM=; b=T3Pc+1dKX14T1/bfGwE6O9BliCPmJPyEv1HfcKagzMXDxOWkOKLesdTA9vcStmOdA3wLFZ vdsQ0SwvoxF4DG1Js46SiFGrroZKLhKObgMvr+D37XXsDA0YXi6goZkL4GTtLvyhtJheJr hJU9MfEioGfQcNd3VCpcEmR7ov9jZ2O1H2/E4AXIDsrJhLdpjYL06EFxNE1/Vm9IyXQS6W KlrZdiIs2qC/dcwOE2QRZLUB4gsRY/yVESJDJ638mn5HL8iTN+S0TTRy8lQ170KWmi1egD 1pdCM8vUmfjT4rQOngHuOw6c5cyD6P99mEU4Sh8Q3XiNR695+ihit3q2K9hNXQ== To: linux-arm-kernel@lists.infradead.org Cc: Marek Vasut , Conor Dooley , Geert Uytterhoeven , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH 3/5] arm64: dts: renesas: s4sk: Access rswitch ports via phandles Date: Sat, 18 Jan 2025 12:13:10 +0100 Message-ID: <20250118111344.361617-3-marek.vasut+renesas@mailbox.org> In-Reply-To: <20250118111344.361617-1-marek.vasut+renesas@mailbox.org> References: <20250118111344.361617-1-marek.vasut+renesas@mailbox.org> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MBO-RS-META: s78poq3c4knqny85yzo4whxmqj1pz3y7 X-MBO-RS-ID: 9aa30760ce97dac0b11 The r8a779f0.dtsi now contains labels for each rswitch port in the form 'rswitchportN'. Use those to access rswitch ports and slightly reduce the depth of this board DT. No functional change. Signed-off-by: Marek Vasut --- Cc: Conor Dooley Cc: Geert Uytterhoeven Cc: Krzysztof Kozlowski Cc: Rob Herring Cc: devicetree@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org --- arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts | 67 +++++++++---------- 1 file changed, 31 insertions(+), 36 deletions(-) diff --git a/arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts b/arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts index 5d71d52f9c654..4bf526535ee05 100644 --- a/arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts +++ b/arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts @@ -179,53 +179,48 @@ &rswitch { pinctrl-0 = <&tsn0_pins>, <&tsn1_pins>; pinctrl-names = "default"; status = "okay"; +}; + +&rswitchport0 { + reg = <0>; + phy-handle = <&ic99>; + phy-mode = "sgmii"; + phys = <ð_serdes 0>; - ethernet-ports { + mdio { #address-cells = <1>; #size-cells = <0>; - port@0 { - reg = <0>; - phy-handle = <&ic99>; - phy-mode = "sgmii"; - phys = <ð_serdes 0>; - - mdio { - #address-cells = <1>; - #size-cells = <0>; - - ic99: ethernet-phy@1 { - reg = <1>; - compatible = "ethernet-phy-ieee802.3-c45"; - interrupts-extended = <&gpio3 10 IRQ_TYPE_LEVEL_LOW>; - }; - }; - }; - - port@1 { + ic99: ethernet-phy@1 { reg = <1>; - phy-handle = <&ic102>; - phy-mode = "sgmii"; - phys = <ð_serdes 1>; - - mdio { - #address-cells = <1>; - #size-cells = <0>; - - ic102: ethernet-phy@2 { - reg = <2>; - compatible = "ethernet-phy-ieee802.3-c45"; - interrupts-extended = <&gpio3 11 IRQ_TYPE_LEVEL_LOW>; - }; - }; + compatible = "ethernet-phy-ieee802.3-c45"; + interrupts-extended = <&gpio3 10 IRQ_TYPE_LEVEL_LOW>; }; + }; +}; - port@2 { - status = "disabled"; +&rswitchport1 { + reg = <1>; + phy-handle = <&ic102>; + phy-mode = "sgmii"; + phys = <ð_serdes 1>; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + ic102: ethernet-phy@2 { + reg = <2>; + compatible = "ethernet-phy-ieee802.3-c45"; + interrupts-extended = <&gpio3 11 IRQ_TYPE_LEVEL_LOW>; }; }; }; +&rswitchport2 { + status = "disabled"; +}; + &rwdt { timeout-sec = <60>; status = "okay"; From patchwork Sat Jan 18 11:13:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13944116 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) (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 837847FD; Sat, 18 Jan 2025 11:14:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.152 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737198866; cv=none; b=Yr0Yw1yJ5uqbhqXnsLA//1EG90PaxbUx1w7vtv1h2cnNVlJE09S411dKaux/CL91wZ+ERCZ2iV6FjVKnD4bUXxFVNPkvi6ISNVCe2fPTszE3Pm4ObWF1LTb7PqmOJXVKCQ01gJiQlMnpaHhDUJZ0fFTP97ln3AJLe+fnyfBkCyc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737198866; c=relaxed/simple; bh=RiQ1zZxFWWmeW/or5YbHKJw4ljXtd0Zw4Th/jv4tjcg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Cg7z0/h/YYJe0aahONzsdpzI6tRIC+TW6APz+aH1+MPluw54wdoxFi7dMwjaiwLv3+venw7UFDwSbcaOnbG6pyGuY8WaeZMYh4EM8mkulWFLoDEGfJUHPy+d2maXmH5LOwfFPoKoQcUvHKFS4/kce8asp81F/H78bVjQ9SICky0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org; spf=pass smtp.mailfrom=mailbox.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=FNTGPpJd; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=pbYcVnBF; arc=none smtp.client-ip=80.241.56.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mailbox.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="FNTGPpJd"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="pbYcVnBF" Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (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) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4YZvBJ6QDkz9sp5; Sat, 18 Jan 2025 12:14:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1737198856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FBcw0LmTqDL6goZ9NmYCiCMKKyclPYew5eMg6NO1mcw=; b=FNTGPpJdjdxVi10wdAhpxdEr4KB5UzzIiYtpFOOjGX0DqC4/liMlCXf+kWOZsVvO9jk/iW Mghc3DbTLwVdfpY3dDzd0MB8xbOpwCrwOo0KWy+I4Es0oL6UHUjVUyD6m+VJnEuVTrNFqR R1xGWozMzUzxzwH8rWT4EqOD1cLmr02R9GSc+3ynyG7jdqohm9jmDpZQ+co/FMyPoCXPza Va6sZvZF1gKuxyzBL8AFTlx3wJ2m690bqJOCPEcSv7tia+4mJcZmvbn2N8/aRj75vFswQz 1ruyNnIydMnh+c3pZ+rD55KoNiuZ79BZQuJOFywQraxDF6EadqYmRh+qvqbpCQ== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1737198855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FBcw0LmTqDL6goZ9NmYCiCMKKyclPYew5eMg6NO1mcw=; b=pbYcVnBFyvxJSQGYbyA9VxHSmYJJJZaSFbT04QNlmX52gh5Kija8g+LSA3FrPoMM1/fKIm phe8jrW5siwFzLpNeqgRCjH6mGXBsIMTeA2+Wk9qrmwc8niHWJ0ZFULH7W7QXSmJnMSYki p6OsewZMzKP5gwTtkCtYg13V5XrYf9cuey3Hp1PBw4Ux5uNKuxI6OJKiTNTDEplgeojmnI cZULUuA67HuUHseU4HxbxhH/6uFJ7Xc4kG8k0fzbZn3Clo1Z5EsteMyQ3I3+HzHQp+2EjX q1K08EkmBDIcPNwMNgEUGvyefkoxP0a8mB02ata6/vsdR/6uDhI51QUFUjMvyA== To: linux-arm-kernel@lists.infradead.org Cc: Marek Vasut , Conor Dooley , Geert Uytterhoeven , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH 4/5] arm64: dts: renesas: spider-ethernet: Add ethernetN aliases for rswitch Date: Sat, 18 Jan 2025 12:13:11 +0100 Message-ID: <20250118111344.361617-4-marek.vasut+renesas@mailbox.org> In-Reply-To: <20250118111344.361617-1-marek.vasut+renesas@mailbox.org> References: <20250118111344.361617-1-marek.vasut+renesas@mailbox.org> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MBO-RS-META: ha87ag9115gp9iwd53pa1ae9muffbu5e X-MBO-RS-ID: 8ec3538ef4cec32a9c8 The rswitch has three independent ports which each can act as a separate interface with its own MAC address. Describe DT aliases ethernet0, ethernet1, ethernet2 for each rswitch port in DT. This allows U-Boot to insert MAC addresses from its environment variables ethaddr/eth1addr/eth2addr into each rswitch port nodes, so Linux can read and use one unique MAC address for each rswitch port. Note that it is unlikely this would break existing rswitch driver operation in the Linux kernel, because as of right now, the rswitch driver already calls of_get_ethdev_address() for each port to read out the MAC address out of each rswitch port DT node, and if that is missing, it falls back to MAC address settings read from the hardware itself, and if that also fails, it uses random MAC address. Signed-off-by: Marek Vasut --- Cc: Conor Dooley Cc: Geert Uytterhoeven Cc: Krzysztof Kozlowski Cc: Rob Herring Cc: devicetree@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org --- arch/arm64/boot/dts/renesas/r8a779f0-spider-ethernet.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a779f0-spider-ethernet.dtsi b/arch/arm64/boot/dts/renesas/r8a779f0-spider-ethernet.dtsi index 069f36ba53a4f..55c7c54411be4 100644 --- a/arch/arm64/boot/dts/renesas/r8a779f0-spider-ethernet.dtsi +++ b/arch/arm64/boot/dts/renesas/r8a779f0-spider-ethernet.dtsi @@ -5,6 +5,14 @@ * Copyright (C) 2021 Renesas Electronics Corp. */ +/ { + aliases { + ethernet0 = &rswitchport0; + ethernet1 = &rswitchport1; + ethernet2 = &rswitchport2; + }; +}; + ð_serdes { status = "okay"; }; From patchwork Sat Jan 18 11:13:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13944121 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [80.241.56.161]) (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 0566D487BF; Sat, 18 Jan 2025 11:23:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.161 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737199392; cv=none; b=OmL3RmepMahXQQub8F+Rro6xv9QXRRh8C2DfQ0qHSHG40uUqdD5O1toC/7GrOapR80kGjUhGbcNJgIng5NqsOgGcGLybvIioUe8V3eEfzpIYDbbQvVXN7cK+lF6PqRy4S61hlsfAKblBnB0IGTHWbjPTt0/fi0XGzhF/e25AB2g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737199392; c=relaxed/simple; bh=vkpRB5t/PEEGCgN5pU+oFSW/qrbsgGB32AkpUP/wrJU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QFtS+xknfnPBNSXmW8z2H7OvF3CeUobVDk/9WlJoDcdYBNW25ZCdEV60eryOdGyQXLoCIoACFYYgeq+IAYBsvYvBf8T0utU1D7drtMEYZzEtszADmEtbrKpkj6bysGwCTgFSqp08cxjkLGmkj/sXbWkYlJKrSAhKOFBKNdsEEUc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org; spf=pass smtp.mailfrom=mailbox.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=WXq69I56; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=R95BPdnS; arc=none smtp.client-ip=80.241.56.161 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mailbox.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="WXq69I56"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="R95BPdnS" Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (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) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4YZvBL1CXJz9sn9; Sat, 18 Jan 2025 12:14:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1737198858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Eu8ULTNQf6vReHQonx+XmcXAdagv6ur9LyVq1l1Nr9A=; b=WXq69I56TtPOVHwVlMVNkzSrXAmlxZQw+cnib3TSYv4E+W+pgyxbhj0KzbULwi+cXLcQii iMZLnBBQtwbK6oB02vm+oAEUck5HZJoY68ic8dW0f7sY5hEu0JXcJa6SXF+Y6r6rZhBhhF Mjlh+VmXHW2biGWSipgERs/lZcqTrkrjCuYZa1j7iwYblxMJ70duT1dGk5HIjs2R9Tj6MZ ToAXfhP8e7Mflh8P9LMfl2tZmP50wnD4qInQMMMCH5lccjrDULWP70mzLC5bYZyPYm6omm pJQhRGTZZBg4jYc10YK2EG8C+1FT8UE8iB6qMCzd8reCypF3TRUWabnSY5yw2A== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1737198856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Eu8ULTNQf6vReHQonx+XmcXAdagv6ur9LyVq1l1Nr9A=; b=R95BPdnST0g3Q47vJix6hYztsLpN65YbPVQyhgqlZaiGpeBbR/x90BmeIV0ISiiUFJXulQ SA6pnMWD3HxGVtnbO/ivKDPx5fdahAwj2kO2/dZt2RRQw0VHCo89okK96wcVz55z4qoog/ J05vRVC57dDebOGeCtOuvCiUfGKqXBGaRd1QCWCSJ6/QXk7UCGKz+lvAcDJzaoJTfHazXE tVHJ1P+TfrlSp6vrjcbkO8l3oTOjIIUPf894G6Yu+LtdrdVD3NhNhDXeIVWh9BCYFdlUPs kK2Viohu0xvDRRQJNXzWEVqYOJYPPNZBFSZAJy3U/6WVFIhPjGfA4OPatcIEjg== To: linux-arm-kernel@lists.infradead.org Cc: Marek Vasut , Conor Dooley , Geert Uytterhoeven , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH 5/5] arm64: dts: renesas: s4sk: Fix ethernet0 alias for rswitch Date: Sat, 18 Jan 2025 12:13:12 +0100 Message-ID: <20250118111344.361617-5-marek.vasut+renesas@mailbox.org> In-Reply-To: <20250118111344.361617-1-marek.vasut+renesas@mailbox.org> References: <20250118111344.361617-1-marek.vasut+renesas@mailbox.org> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MBO-RS-META: xhjmjm31tqrszmahhujpwwp7xfygckr1 X-MBO-RS-ID: a579b2b49b15999622a X-Rspamd-Queue-Id: 4YZvBL1CXJz9sn9 Each rswitch port TSNn has a dedicated MAC address assigned to it, so does AVB MAC. The MAC addresses for each rswitch port and AVB, four in total, are stored in the FPGA populated on the board and can be read out via I2C from bus i2c@e66e0000 address 0x70 offsets 0x58 for AVB and 0x60, 0x68, 0x70 for TSNn . There is no single MAC address assigned to the rswitch itself, there are three of them, one for each rswitch port. Instead of ethernet0 alias for rswitch itself, describe alias ethernet0, ethernet1 for each enabled rswitch port. This allows U-Boot to insert MAC addresses from its environment variables ethaddr/eth1addr/eth2addr into each rswitch port nodes, so Linux can read and use one unique MAC address for each rswitch port. Note that it is unlikely this would break existing rswitch driver operation in the Linux kernel, because as of right now, the rswitch driver already calls of_get_ethdev_address() for each port to read out the MAC address out of each rswitch port DT node, and if that is missing, it falls back to MAC address settings read from the hardware itself, and if that also fails, it uses random MAC address. Fixes: 412f2224b3b6 ("arm64: dts: renesas: s4sk: Fix ethernet0 alias") Signed-off-by: Marek Vasut --- Cc: Conor Dooley Cc: Geert Uytterhoeven Cc: Krzysztof Kozlowski Cc: Rob Herring Cc: devicetree@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org --- arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts b/arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts index 4bf526535ee05..86a1945127529 100644 --- a/arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts +++ b/arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts @@ -22,7 +22,8 @@ aliases { i2c5 = &i2c5; serial0 = &hscif0; serial1 = &hscif1; - ethernet0 = &rswitch; + ethernet0 = &rswitchport0; + ethernet1 = &rswitchport1; }; chosen {