From 1f69dcfdaef84614b3ac7ac113d1b9a286afb9a0 Mon Sep 17 00:00:00 2001 From: Valentine Barshak Date: Tue, 2 Oct 2007 00:12:09 +1000 Subject: [POWERPC] 4xx: Add RGMII support for Sequoia 440EPx This adds RGMII support to Sequoia DTS and sets correct phy-mode for EMACs. According to Sequoia datasheet, both ethernet ports are connected to RGMII interface, while ZMII is used only for MDIO. Signed-off-by: Valentine Barshak Signed-off-by: Josh Boyer --- arch/powerpc/boot/dts/sequoia.dts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'arch/powerpc/boot') diff --git a/arch/powerpc/boot/dts/sequoia.dts b/arch/powerpc/boot/dts/sequoia.dts index 36be75b04de..8833dfe2e8b 100644 --- a/arch/powerpc/boot/dts/sequoia.dts +++ b/arch/powerpc/boot/dts/sequoia.dts @@ -241,6 +241,12 @@ reg = ; }; + RGMII0: emac-rgmii@ef601000 { + device_type = "rgmii-interface"; + compatible = "ibm,rgmii-440epx", "ibm,rgmii"; + reg = ; + }; + EMAC0: ethernet@ef600e00 { linux,network-index = <0>; device_type = "network"; @@ -261,10 +267,12 @@ max-frame-size = <5dc>; rx-fifo-size = <1000>; tx-fifo-size = <800>; - phy-mode = "rmii"; + phy-mode = "rgmii"; phy-map = <00000000>; zmii-device = <&ZMII0>; zmii-channel = <0>; + rgmii-device = <&RGMII0>; + rgmii-channel = <0>; }; EMAC1: ethernet@ef600f00 { @@ -287,10 +295,12 @@ max-frame-size = <5dc>; rx-fifo-size = <1000>; tx-fifo-size = <800>; - phy-mode = "rmii"; + phy-mode = "rgmii"; phy-map = <00000000>; zmii-device = <&ZMII0>; zmii-channel = <1>; + rgmii-device = <&RGMII0>; + rgmii-channel = <1>; }; }; }; -- cgit v1.2.3 From 094624fa66758e9f555587c29b23cf5bc67c10fd Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Sat, 20 Oct 2007 00:53:10 +1000 Subject: [POWERPC] 4xx: Fix timebase clock selection on Walnut The current bootwrapper fails to set the timebase clock to the CPU clock which causes the time to increment incorrectly. This fixes it by using the correct #define for the CPC0_CR1 register. Signed-off-by: Josh Boyer --- arch/powerpc/boot/treeboot-walnut.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/powerpc/boot') diff --git a/arch/powerpc/boot/treeboot-walnut.c b/arch/powerpc/boot/treeboot-walnut.c index 3adf2d08a23..6be76b7edc1 100644 --- a/arch/powerpc/boot/treeboot-walnut.c +++ b/arch/powerpc/boot/treeboot-walnut.c @@ -57,8 +57,8 @@ void ibm405gp_fixup_clocks(unsigned int sysclk, unsigned int ser_clk) } /* setup the timebase clock to tick at the cpu frequency */ - cpc0_cr1 = cpc0_cr1 & ~ 0x00800000; - mtdcr(DCRN_CPC0_CR1, cpc0_cr1); + cpc0_cr1 = cpc0_cr1 & ~0x00800000; + mtdcr(DCRN_405_CPC0_CR1, cpc0_cr1); tb = cpu; dt_fixup_cpu_clocks(cpu, tb, 0); -- cgit v1.2.3 From b3af7a55da9925b73136d5358573e8962dfd35a0 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Sat, 20 Oct 2007 00:53:11 +1000 Subject: [POWERPC] 4xx: Enable EMAC for PPC405 Walnut board This patch enables the ibm_newemac driver for the Walnut board. It fixes the device tree for the walnut board to order the MAL interrupts correctly and adds the local-mac-address property to the EMAC node. The bootwrapper is also updated to extract the MAC address from the OpenBIOS offset where it is stored. Signed-off-by: Josh Boyer --- arch/powerpc/boot/dts/walnut.dts | 12 +++++++++--- arch/powerpc/boot/treeboot-walnut.c | 2 ++ 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'arch/powerpc/boot') diff --git a/arch/powerpc/boot/dts/walnut.dts b/arch/powerpc/boot/dts/walnut.dts index ec54f4e04ad..fa681f5343f 100644 --- a/arch/powerpc/boot/dts/walnut.dts +++ b/arch/powerpc/boot/dts/walnut.dts @@ -64,10 +64,15 @@ MAL: mcmal { compatible = "ibm,mcmal-405gp", "ibm,mcmal"; dcr-reg = <180 62>; - num-tx-chans = <2>; + num-tx-chans = <1>; num-rx-chans = <1>; interrupt-parent = <&UIC0>; - interrupts = ; + interrupts = < + b 4 /* TXEOB */ + c 4 /* RXEOB */ + a 4 /* SERR */ + d 4 /* TXDE */ + e 4 /* RXDE */>; }; POB0: opb { @@ -118,9 +123,10 @@ compatible = "ibm,emac-405gp", "ibm,emac"; interrupt-parent = <&UIC0>; interrupts = <9 4 f 4>; + local-mac-address = [000000000000]; /* Filled in by zImage */ reg = ; mal-device = <&MAL>; - mal-tx-channel = <0 1>; + mal-tx-channel = <0>; mal-rx-channel = <0>; cell-index = <0>; max-frame-size = <5dc>; diff --git a/arch/powerpc/boot/treeboot-walnut.c b/arch/powerpc/boot/treeboot-walnut.c index 6be76b7edc1..bb2c309d70f 100644 --- a/arch/powerpc/boot/treeboot-walnut.c +++ b/arch/powerpc/boot/treeboot-walnut.c @@ -109,6 +109,7 @@ static void walnut_flashsel_fixup(void) setprop(sram, "reg", reg_sram, sizeof(reg_sram)); } +#define WALNUT_OPENBIOS_MAC_OFF 0xfffffe0b static void walnut_fixups(void) { ibm4xx_fixup_memsize(); @@ -116,6 +117,7 @@ static void walnut_fixups(void) ibm4xx_quiesce_eth((u32 *)0xef600800, NULL); ibm4xx_fixup_ebc_ranges("/plb/ebc"); walnut_flashsel_fixup(); + dt_fixup_mac_addresses((u8 *) WALNUT_OPENBIOS_MAC_OFF); } void platform_init(void) -- cgit v1.2.3 From 739253765ed55742431866b19330fa0e1012c417 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Sat, 20 Oct 2007 00:53:12 +1000 Subject: [POWERPC] 4xx: Enable EMAC on Bamboo board Fix some device tree omissions that prevented the new EMAC driver from setting up ethernet on the Bamboo board correctly and update the Bamboo defconfig. Signed-off-by: Josh Boyer --- arch/powerpc/boot/dts/bamboo.dts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'arch/powerpc/boot') diff --git a/arch/powerpc/boot/dts/bamboo.dts b/arch/powerpc/boot/dts/bamboo.dts index a88ae3d218a..cb2fb50a281 100644 --- a/arch/powerpc/boot/dts/bamboo.dts +++ b/arch/powerpc/boot/dts/bamboo.dts @@ -98,11 +98,13 @@ interrupt-parent = <&MAL0>; interrupts = <0 1 2 3 4>; #interrupt-cells = <1>; + #address-cells = <0>; + #size-cells = <0>; interrupt-map = ; + /*RXDE*/ 4 &UIC1 2 4>; }; POB0: opb { @@ -196,6 +198,7 @@ }; EMAC0: ethernet@ef600e00 { + linux,network-index = <0>; device_type = "network"; compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; interrupt-parent = <&UIC1>; @@ -210,12 +213,13 @@ rx-fifo-size = <1000>; tx-fifo-size = <800>; phy-mode = "rmii"; - phy-map = <00000001>; + phy-map = <00000000>; zmii-device = <&ZMII0>; zmii-channel = <0>; }; EMAC1: ethernet@ef600f00 { + linux,network-index = <1>; device_type = "network"; compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; interrupt-parent = <&UIC1>; @@ -230,7 +234,7 @@ rx-fifo-size = <1000>; tx-fifo-size = <800>; phy-mode = "rmii"; - phy-map = <00000001>; + phy-map = <00000000>; zmii-device = <&ZMII0>; zmii-channel = <1>; }; -- cgit v1.2.3