Skip to content

Commit 22d0d40

Browse files
committed
ARM: dts: at91: sama5d2_icp: add KSZ8563 node
The three port FastEthernet switch is controlled over SPI. Internal port is connected to the MACB interface. Pinout is for rev.B+ boards. Signed-off-by: Razvan Stefanescu <razvan.stefanescu@microchip.com>
1 parent c03fcb1 commit 22d0d40

1 file changed

Lines changed: 57 additions & 2 deletions

File tree

arch/arm/boot/dts/at91-sama5d2_icp.dts

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,48 @@
151151
interrupts = <19 IRQ_TYPE_LEVEL_HIGH 7>;
152152
clocks = <&flx0_clk>;
153153
clock-names = "spi_clk";
154+
cs-gpios = <&pioA PIN_PC0 GPIO_ACTIVE_LOW>;
154155
pinctrl-names = "default";
155-
pinctrl-0 = <&pinctrl_mikrobus2_spi &pinctrl_mikrobus2_spi_cs>;
156+
pinctrl-0 = <&pinctrl_mikrobus2_spi &pinctrl_ksz_spi_cs>;
156157
atmel,fifo-size = <16>;
157158
status = "okay";
159+
#address-cells = <1>;
160+
#size-cells = <0>;
161+
162+
switch0: ksz8563@0 {
163+
compatible = "microchip,ksz8563";
164+
reg = <0>;
165+
phy-mode = "mii";
166+
reset-gpios = <&pioA PIN_PD4 GPIO_ACTIVE_LOW>;
167+
168+
spi-max-frequency = <500000>;
169+
spi-cpha;
170+
spi-cpol;
171+
172+
ports {
173+
#address-cells = <1>;
174+
#size-cells = <0>;
175+
port@0 {
176+
reg = <0>;
177+
label = "lan1";
178+
};
179+
180+
port@1 {
181+
reg = <1>;
182+
label = "lan2";
183+
};
184+
185+
port@2 {
186+
reg = <2>;
187+
label = "cpu";
188+
ethernet = <&macb0>;
189+
fixed-link {
190+
speed = <100>;
191+
full-duplex;
192+
};
193+
};
194+
};
195+
};
158196
};
159197
};
160198

@@ -219,6 +257,18 @@
219257
};
220258
};
221259

260+
macb0: ethernet@f8008000 {
261+
status = "okay";
262+
pinctrl-names = "default";
263+
pinctrl-0 = <&pinctrl_macb0_default &pinctrl_macb0_phy_irq &pinctrl_macb0_rst>;
264+
phy-mode = "mii";
265+
266+
fixed-link {
267+
speed = <100>;
268+
full-duplex;
269+
};
270+
};
271+
222272
i2c1: i2c@fc028000 {
223273
dmas = <0>, <0>;
224274
pinctrl-names = "default";
@@ -378,6 +428,11 @@
378428
bias-disable;
379429
};
380430

431+
pinctrl_ksz_spi_cs: ksz_spi_cs {
432+
pinmux = <PIN_PC0__GPIO>;
433+
bias-disable;
434+
};
435+
381436
pinctrl_mikrobus2_pwm: mikrobus2_pwm {
382437
pinmux = <PIN_PB23__TIOB2>;
383438
bias-disable;
@@ -475,7 +530,7 @@
475530

476531
pinctrl_macb0_rst: macb0_sw_rst {
477532
pinmux = <PIN_PD4__GPIO>;
478-
bias-disable;
533+
bias-pull-up;
479534
};
480535

481536
};

0 commit comments

Comments
 (0)