[PATCH/RFC] mxs: mach-mxs: Setup mac address prefix from dt

Shawn Guo shawn.guo at linaro.org
Wed Dec 19 21:30:40 EST 2012


On Mon, Dec 17, 2012 at 03:26:02PM +0100, Peter Turczak wrote:
> This patch enables setting the the fec ethernet mac address either completely
> from dt, take only the prefix from dt and use the remaining device unique bytes 
> from the OTP or use OTP uniq bytes and the hardcoded values as before when no
> mac address is specified in the dt. So compatibility should be maintained to
> devices already shipped.
> 
> Currently only Denx or Freescale manufacturer prefixes are guessed from the
> selected hardware platform. The suggested patch provides a more elegant
> solution because other vendors to just need to adapt their device tree 
> description file.
> 
> Example:
> mac0: ethernet at 800f0000 {
>              phy-mode = "rmii";
>              pinctrl-names = "default";
>              pinctrl-0 = <&mac0_pins_a>;
>              phy-supply = <&reg_fec_3v3>;
>              phy-reset-gpios = <&gpio2 5 3>;
>              phy-reset-duration = <100>;
>              local-mac-address = [00 04 1E 5E 1B B9];
>              status = "okay";
>          };
> or
> mac0: ethernet at 800f0000 {
>              phy-mode = "rmii";
>              pinctrl-names = "default";
>              pinctrl-0 = <&mac0_pins_a>;
>              phy-supply = <&reg_fec_3v3>;
>              phy-reset-gpios = <&gpio2 5 3>;
>              phy-reset-duration = <100>;
>              local-mac-address = [00 04 1E];
>              status = "okay";
>          };

Property "local-mac-address" is defined by a common bindings, we do not
want to get a different meaning on mach-mxs.

Shawn




More information about the linux-arm-kernel mailing list