mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-01 06:39:05 +00:00

The Renesas Ethernet Switch has three independent ports. Each port can act as a separate interface, and can be enabled or disabled independently. Currently all ports are enabled by default, hence board DTS files that enable the switch must disable all unused ports explicitly. Disable all ports by default, and explicitly enable ports that are used, next to their configuration. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Link: https://lore.kernel.org/c4688de8e3289ad82c2cd85f0893eac660ac8890.1737649969.git.geert+renesas@glider.be
111 lines
1.8 KiB
Plaintext
111 lines
1.8 KiB
Plaintext
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* Device Tree Source for the Spider Ethernet sub-board
|
|
*
|
|
* Copyright (C) 2021 Renesas Electronics Corp.
|
|
*/
|
|
|
|
/ {
|
|
aliases {
|
|
ethernet0 = &rswitch_port0;
|
|
ethernet1 = &rswitch_port1;
|
|
ethernet2 = &rswitch_port2;
|
|
};
|
|
};
|
|
|
|
ð_serdes {
|
|
status = "okay";
|
|
};
|
|
|
|
&i2c4 {
|
|
eeprom@52 {
|
|
compatible = "rohm,br24g01", "atmel,24c01";
|
|
label = "ethernet-sub-board";
|
|
reg = <0x52>;
|
|
pagesize = <8>;
|
|
};
|
|
};
|
|
|
|
&pfc {
|
|
tsn0_pins: tsn0 {
|
|
groups = "tsn0_mdio_b", "tsn0_link_b";
|
|
function = "tsn0";
|
|
power-source = <1800>;
|
|
};
|
|
|
|
tsn1_pins: tsn1 {
|
|
groups = "tsn1_mdio_b", "tsn1_link_b";
|
|
function = "tsn1";
|
|
power-source = <1800>;
|
|
};
|
|
|
|
tsn2_pins: tsn2 {
|
|
groups = "tsn2_mdio_b", "tsn2_link_b";
|
|
function = "tsn2";
|
|
power-source = <1800>;
|
|
};
|
|
};
|
|
|
|
&rswitch {
|
|
pinctrl-0 = <&tsn0_pins>, <&tsn1_pins>, <&tsn2_pins>;
|
|
pinctrl-names = "default";
|
|
status = "okay";
|
|
};
|
|
|
|
&rswitch_port0 {
|
|
reg = <0>;
|
|
phy-handle = <&u101>;
|
|
phy-mode = "sgmii";
|
|
phys = <ð_serdes 0>;
|
|
status = "okay";
|
|
|
|
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>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&rswitch_port1 {
|
|
reg = <1>;
|
|
phy-handle = <&u201>;
|
|
phy-mode = "sgmii";
|
|
phys = <ð_serdes 1>;
|
|
status = "okay";
|
|
|
|
mdio {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
u201: ethernet-phy@2 {
|
|
reg = <2>;
|
|
compatible = "ethernet-phy-ieee802.3-c45";
|
|
interrupts-extended = <&gpio3 11 IRQ_TYPE_LEVEL_LOW>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&rswitch_port2 {
|
|
reg = <2>;
|
|
phy-handle = <&u301>;
|
|
phy-mode = "sgmii";
|
|
phys = <ð_serdes 2>;
|
|
status = "okay";
|
|
|
|
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>;
|
|
};
|
|
};
|
|
};
|