Skip to content

Commit

Permalink
Merge branch 'pxa168_eth'
Browse files Browse the repository at this point in the history
Antoine Tenart says:

====================
ARM: Berlin: Ethernet support

This series introduce support for the Ethernet controller on Berlin SoCs,
using the existing pxa168 Ethernet driver. In order to do this, DT
support is added to the driver alongside some other modifications and
fixes.

This has been tested on a Berlin BG2Q DMP board.

Changes since v5:
	- fixed the build when building the driver as a module

Changes since v4:
        - removed the phy-addr property and added a phy subnode
        - added COMPILE_TEST for the pxa168_eth driver

Changes since v3:
        - moved the addition of pxa168_eth_get_mac_address() to the patch
          using it first

Changes since v2:
        - reworked how the MAC address is configured
        - made the clock anonymous

Changes since v1:
        - removed custom Berlin Ethernet driver
        - used the pxa168 Ethernet driver instead
        - made modifications to the pxa168 driver (DT support, fixes)
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Sep 30, 2014
2 parents 4cb53f3 + 7521519 commit 9ba10af
Show file tree
Hide file tree
Showing 5 changed files with 199 additions and 79 deletions.
36 changes: 36 additions & 0 deletions Documentation/devicetree/bindings/net/marvell-pxa168.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
* Marvell PXA168 Ethernet Controller

Required properties:
- compatible: should be "marvell,pxa168-eth".
- reg: address and length of the register set for the device.
- interrupts: interrupt for the device.
- clocks: pointer to the clock for the device.

Optional properties:
- port-id: Ethernet port number. Should be '0','1' or '2'.
- #address-cells: must be 1 when using sub-nodes.
- #size-cells: must be 0 when using sub-nodes.
- phy-handle: see ethernet.txt file in the same directory.
- local-mac-address: see ethernet.txt file in the same directory.

Sub-nodes:
Each PHY can be represented as a sub-node. This is not mandatory.

Sub-nodes required properties:
- reg: the MDIO address of the PHY.

Example:

eth0: ethernet@f7b90000 {
compatible = "marvell,pxa168-eth";
reg = <0xf7b90000 0x10000>;
clocks = <&chip CLKID_GETH0>;
interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
#size-cells = <0>;
phy-handle = <&ethphy0>;

ethphy0: ethernet-phy@0 {
reg = <0>;
};
};
4 changes: 4 additions & 0 deletions arch/arm/boot/dts/berlin2q-marvell-dmp.dts
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,7 @@
&uart0 {
status = "okay";
};

&eth0 {
status = "okay";
};
17 changes: 17 additions & 0 deletions arch/arm/boot/dts/berlin2q.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,23 @@
#interrupt-cells = <3>;
};

eth0: ethernet@b90000 {
compatible = "marvell,pxa168-eth";
reg = <0xb90000 0x10000>;
clocks = <&chip CLKID_GETH0>;
interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
/* set by bootloader */
local-mac-address = [00 00 00 00 00 00];
#address-cells = <1>;
#size-cells = <0>;
phy-handle = <&ethphy0>;
status = "disabled";

ethphy0: ethernet-phy@0 {
reg = <0>;
};
};

cpu-ctrl@dd0000 {
compatible = "marvell,berlin-cpu-ctrl";
reg = <0xdd0000 0x10000>;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/marvell/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ config MVPP2

config PXA168_ETH
tristate "Marvell pxa168 ethernet support"
depends on CPU_PXA168
depends on CPU_PXA168 || ARCH_BERLIN || COMPILE_TEST
select PHYLIB
---help---
This driver supports the pxa168 Ethernet ports.
Expand Down
Loading

0 comments on commit 9ba10af

Please sign in to comment.