[PATCH V4 10/11] ARM: kirkwood: mv643xx_eth dt conversion

Sebastian Hesselbarth sebastian.hesselbarth at gmail.com
Sun Jan 27 08:41:00 EST 2013


On 01/26/2013 09:50 PM, Jason Cooper wrote:
> Tested on the dreamplug:
>
> mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
> libphy: mv643xx_eth smi: probed
> libphy: mv643xx_eth smi: probed
> mv643xx_eth_port f1072000.egiga0 eth0: port 0 with MAC address XX:XX:XX...
> mv643xx_eth_port f1076000.egiga1 eth1: port 0 with MAC address XX:XX:XX...
>
> Successfully pulled an ip address and pinged through the interface
>
> ...
>
> diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
> index 2c738d9..b13a405 100644
> --- a/arch/arm/boot/dts/kirkwood.dtsi
> +++ b/arch/arm/boot/dts/kirkwood.dtsi
> @@ -201,5 +201,43 @@
>   			clocks =<&gate_clk 4>;
>   			status = "disabled";
>   		};
> +
> +		smi0: mdio at 72000 {
> +			compatible = "marvell,mdio-mv643xx";
> +			reg =<0x72000 0x4000>;
> +			interrupts =<46>;
> +			tx_csum_limit =<1600>;
> +			status = "disabled";
> +		};
> +
> +		smi1: mdio at 76000 {
> +			compatible = "marvell,mdio-mv643xx";
> +			reg =<0x76000 0x4000>;
> +			interrupts =<47>;
> +			tx_csum_limit =<1600>;
> +			status = "disabled";
> +		};
> +
> +		egiga0 {
> +			compatible = "marvell,mv643xx-eth";
> +			reg =<0x72000 0x4000>;
> +			mdio =<&smi0>;
> +			port_number =<0>;
> +			phy_addr =<0x80>;

Jason,

This will break phy_scan on all kirkwood boards as 0x80 is _not_ equal
MV643XX_ETH_PHY_ADDR_DEFAULT.

I suggest not to set phy_addr in kirkwood.dtsi at all and let the
board specific DT files set the phy addresses (or rely on phy_scan if not
set).

Also, you are ORing the address passed by phy_addr with 0x80 anyway. So
all phy addresses should be passed as <0> or <1> instead the ORed ones.

Sebastian



More information about the linux-arm-kernel mailing list