Skip to contentSkip to conversation

Enable HiSilicon hip04 ethernet controller

PATCH New Fathi Boudra 4 participants 6 messages Apr 10, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Enable HiSilicon hip04 ethernet controller

The following patches enable the ethernet controller on HiSilicon hip04 as documented in the device tree binding but not currently enabled. It has been tested on real hardware with tftp boot + NFS root filesystem.

Fathi Boudra (2):
ARM: dts: add HiSilicon hip04 ethernet controller resource
ARM: defconfig: hisi: enable HiSilicon hip04 ethernet controller

 arch/arm/boot/dts/hip04.dtsi    | 49 +++++++++++++++++++++++++++++++++++++++++
 arch/arm/configs/hisi_defconfig |  1 +
 2 files changed, 50 insertions(+)
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/2 ARM: dts: add HiSilicon hip04 ethernet controller resource

add the device tree binding for the HiSilicon hip04 ethernet controller based on Documentation/devicetree/bindings/net/hisilicon-hip04-net.txt

---
 arch/arm/boot/dts/hip04.dtsi | 49 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)
arch/arm/boot/dts/hip04.dtsi +49 -0
index 2388145..fc68753 100644
@@ -269,6 +269,55 @@
 			interrupts = <0 372 4>;
 		};
 
+		mdio {
+			compatible = "hisilicon,hip04-mdio";
+			reg = <0x28f1000 0x1000>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			phy0: ethernet-phy at 0 {
+				compatible = "ethernet-phy-ieee802.3-c22";
+				reg = <0>;
+				marvell,reg-init = <18 0x14 0 0x8001>;
+			};
+
+			phy1: ethernet-phy at 1 {
+				compatible = "ethernet-phy-ieee802.3-c22";
+				reg = <1>;
+				marvell,reg-init = <18 0x14 0 0x8001>;
+			};
+		};
+
+		ppe: ppe at 28c0000 {
+			compatible = "hisilicon,hip04-ppe", "syscon";
+			reg = <0x28c0000 0x10000>;
+		};
+
+		fe: ethernet at 28b0000 {
+			compatible = "hisilicon,hip04-mac";
+			reg = <0x28b0000 0x10000>;
+			interrupts = <0 413 4>;
+			phy-mode = "mii";
+			port-handle = <&ppe 31 0>;
+		};
+
+		ge0: ethernet at 2800000 {
+			compatible = "hisilicon,hip04-mac";
+			reg = <0x2800000 0x10000>;
+			interrupts = <0 402 4>;
+			phy-mode = "sgmii";
+			port-handle = <&ppe 0 1>;
+			phy-handle = <&phy0>;
+		};
+
+		ge8: ethernet at 2880000 {
+			compatible = "hisilicon,hip04-mac";
+			reg = <0x2880000 0x10000>;
+			interrupts = <0 410 4>;
+			phy-mode = "sgmii";
+			port-handle = <&ppe 8 2>;
+			phy-handle = <&phy1>;
+		};
 	};
 
 	etb at 0,e3c42000 {
Signature · 1 line
2.1.4
#2 lore raw

PATCH 2/2 ARM: defconfig: hisi: enable HiSilicon hip04 ethernet controller

In reply to Fathi Boudra
---
 arch/arm/configs/hisi_defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/configs/hisi_defconfig +1 -0
index c34da58..e34314a 100644
@@ -33,6 +33,7 @@ CONFIG_ATA=y
 CONFIG_SATA_AHCI_PLATFORM=y
 CONFIG_NETDEVICES=y
 CONFIG_HIX5HD2_GMAC=y
+CONFIG_HIP04_ETH=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
 CONFIG_SERIAL_8250_CONSOLE=y
Signature · 1 line
2.1.4
#3 lore raw

cover Enable HiSilicon hip04 ethernet controller

In reply to Fathi Boudra
Quoted 3 lines · On Friday 10 April 2015 10:16:18 Fathi Boudra wrote:

The following patches enable the ethernet controller on HiSilicon hip04 as documented in the device tree binding but not currently enabled. It has been tested on real hardware with tftp boot + NFS root filesystem.

The patches looks ok to me, but we don't normally pick up changes like this from developers, you should address them to Wei Xu so he can send them to arm-soc along with his other changes.

Note that there are some known bugs in this driver, I sent an experimental patch for some of them but never heard back.

Arnd

#4 lore raw

cover Enable HiSilicon hip04 ethernet controller

Quoted 4 lines · Arnd Bergmann
Quoted 3 lines · On Friday 10 April 2015 10:16:18 Fathi Boudra wrote:

The following patches enable the ethernet controller on HiSilicon hip04 as documented in the device tree binding but not currently enabled. It has been tested on real hardware with tftp boot + NFS root filesystem.

Hi Fathi and Arnd

Quoted 3 lines

The patches looks ok to me, but we don't normally pick up changes like this from developers, you should address them to Wei Xu so he can send them to arm-soc along with his other changes.

Thanks!
I will test it and prepare the pull request with other changes.

Quoted 2 lines

Note that there are some known bugs in this driver, I sent an experimental patch for some of them but never heard back.

I will contact with tianhong and zhangfei about it. Thanks!

Best Regards,
Wei

Quoted 4 lines

Arnd

.

#5 lore raw

cover Enable HiSilicon hip04 ethernet controller

In reply to Arnd Bergmann
Quoted 9 lines · Arnd Bergmann
Quoted 3 lines · On Friday 10 April 2015 10:16:18 Fathi Boudra wrote:

The following patches enable the ethernet controller on HiSilicon hip04 as documented in the device tree binding but not currently enabled. It has been tested on real hardware with tftp boot + NFS root filesystem.

The patches looks ok to me, but we don't normally pick up changes like this from developers, you should address them to Wei Xu so he can send them to arm-soc along with his other changes.

Ok.

Quoted 5 lines

Note that there are some known bugs in this driver, I sent an experimental patch for some of them but never heard back.

Arnd

I got the experimental patch and prepare the patches for several weeks, but too busy and not test them yet, sorry for that, I will test and send them as soon as possible thanks for the advise.

Ding

Quoted 2 lines

.