A SerDes can host multiple PCS links: QSGMII binds four ports to one SerDes, USXGMII variants up to eight. Today pcs-handle references the SerDes as a whole, with no way to express which link inside the SerDes a port wants. The driver gets away with this because it carries its own port->link bookkeeping and the link slot is implicit in DSA's port iteration order -- functional, but the wiring information lives nowhere in DT. The upcoming fwnode_pcs migration moves PCS lookup to the generic fwnode provider API, which disambiguates multiple instances per fwnode via phandle cells. To make that landable as small, code-only commits, the DT needs to carry the link index ahead of time. Bump #pcs-cells from 0 to 1 on every SerDes node in the four SoC DTSIs and append the link cell to every pcs-handle reference across boards and the SWITCH_PORT_* macros. Cell values match the existing wiring: 0 for single-link SerDes (10GBase-R, SGMII, fiber, single-link USXGMII), 0..3 per SerDes for QSGMII and USXGMII-QX, 0..7 for the RTL9311 octal USXGMII layout. No code reads the new cell yet -- of_parse_phandle_with_args() in the PCS driver already cooperates with cells = 0 or 1, and the DSA glue uses of_parse_phandle() which ignores cells entirely. The change is runtime-neutral on its own; it exists so the follow-up code patches can be a few lines each instead of dragging a bridge counter into the driver to invent slot numbers DT could have provided directly. Link: https://github.com/openwrt/openwrt/pull/23539 Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
135 lines
2.4 KiB
Plaintext
135 lines
2.4 KiB
Plaintext
/dts-v1/;
|
|
|
|
#include "rtl839x_zyxel_gs1920-24hp-common.dtsi"
|
|
|
|
/ {
|
|
compatible = "zyxel,gs1920-24hp-v2", "realtek,rtl8391-soc";
|
|
model = "Zyxel GS1920-24HPv2";
|
|
|
|
memory@0 {
|
|
device_type = "memory";
|
|
reg = <0x0 0x10000000>;
|
|
};
|
|
|
|
chosen {
|
|
stdout-path = "serial0:115200n8";
|
|
};
|
|
|
|
leds {
|
|
cloud-amber {
|
|
gpios = <&gpio1 27 GPIO_ACTIVE_LOW>;
|
|
color = <LED_COLOR_ID_AMBER>;
|
|
};
|
|
|
|
pwr-green {
|
|
gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
|
|
function = LED_FUNCTION_POWER;
|
|
color = <LED_COLOR_ID_GREEN>;
|
|
default-state = "on";
|
|
};
|
|
|
|
pwr-amber {
|
|
gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>;
|
|
function = LED_FUNCTION_POWER;
|
|
color = <LED_COLOR_ID_AMBER>;
|
|
};
|
|
|
|
poe-max {
|
|
gpios = <&gpio1 35 GPIO_ACTIVE_HIGH>;
|
|
color = <LED_COLOR_ID_AMBER>;
|
|
};
|
|
};
|
|
|
|
keys {
|
|
compatible = "gpio-keys-polled";
|
|
poll-interval = <20>;
|
|
|
|
restore {
|
|
label = "restore";
|
|
gpios = <&gpio1 32 GPIO_ACTIVE_LOW>;
|
|
linux,code = <BTN_0>;
|
|
linux,input-type = <EV_KEY>;
|
|
};
|
|
};
|
|
|
|
/delete-node/ i2c-gpio-0;
|
|
/delete-node/ i2c-gpio-1;
|
|
|
|
i2c-gpio-shared {
|
|
compatible = "i2c-gpio-shared";
|
|
scl-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
i2c0: i2c@0 {
|
|
sda-gpios = <&gpio1 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
|
|
i2c-gpio,delay-us = <2>;
|
|
};
|
|
|
|
i2c1: i2c@1 {
|
|
sda-gpios = <&gpio1 10 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
|
|
i2c-gpio,delay-us = <2>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&i2c2 {
|
|
scl-gpios = <&gpio1 9 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
|
|
};
|
|
|
|
&i2c3 {
|
|
scl-gpios = <&gpio1 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
|
|
};
|
|
|
|
&i2c4 {
|
|
lm96000: lm96000@2e {
|
|
compatible = "national,lm85";
|
|
reg = <0x2e>;
|
|
};
|
|
};
|
|
|
|
&flash_partitions {
|
|
partition@20000 {
|
|
label = "reserved";
|
|
reg = <0x20000 0x1e0000>;
|
|
read-only;
|
|
};
|
|
|
|
partition@200000 {
|
|
reg = <0x200000 0x1e00000>;
|
|
label = "factory";
|
|
|
|
compatible = "fixed-partitions";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
partition@0 {
|
|
label = "loader";
|
|
reg = <0x0 0x10000>;
|
|
};
|
|
|
|
partition@10000 {
|
|
label = "firmware";
|
|
reg = <0x10000 0x1d00000>;
|
|
compatible = "openwrt,uimage", "denx,uimage";
|
|
};
|
|
};
|
|
};
|
|
|
|
&mdio_bus0 {
|
|
/* External phy RTL8214FC #1 */
|
|
PHY_C22_SFP(24, 24, 0)
|
|
PHY_C22_SFP(25, 25, 1)
|
|
PHY_C22_SFP(26, 26, 2)
|
|
PHY_C22_SFP(27, 27, 3)
|
|
};
|
|
|
|
&switch0 {
|
|
ethernet-ports {
|
|
SWITCH_PORT_SDS(24, 25, 6, 0, qsgmii)
|
|
SWITCH_PORT_SDS(25, 26, 6, 1, qsgmii)
|
|
SWITCH_PORT_SDS(26, 27, 6, 2, qsgmii)
|
|
SWITCH_PORT_SDS(27, 28, 6, 3, qsgmii)
|
|
};
|
|
};
|