Message ID | 1409740036-8117-4-git-send-email-romain.perier@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Sep 3, 2014 at 7:27 PM, Romain Perier <romain.perier@gmail.com> wrote: > This enables EMAC Rockchip support on radxa rock boards. > > Signed-off-by: Romain Perier <romain.perier@gmail.com> > --- > arch/arm/boot/dts/rk3188-radxarock.dts | 24 ++++++++++++++++++++++++ > 1 file changed, 24 insertions(+) > > diff --git a/arch/arm/boot/dts/rk3188-radxarock.dts b/arch/arm/boot/dts/rk3188-radxarock.dts > index 5e4e3c23..e1358d3 100644 > --- a/arch/arm/boot/dts/rk3188-radxarock.dts > +++ b/arch/arm/boot/dts/rk3188-radxarock.dts > @@ -76,6 +76,24 @@ > }; > }; > > +&emac { > + status = "okay"; > + compatible = "rockchip,rk3188-emac"; > + > + pinctrl-names = "default"; > + pinctrl-0 = <&emac_xfer>, <&emac_mdio>, <&phy_int>; > + > + mac-address = [ c6 ef 91 8e 60 4b ]; is "mac-address" required?
It is an optional property used by arc-emac (the core driver), if it is not present the core driver generates one for you. Problem being that with this property two radxa rock boards connected on the same local network might have the same mac address. In this case it would be probably better to remove this property. What do you think ? 2014-09-03 17:29 GMT+02:00 Naoki FUKAUMI <naobsd@gmail.com>: > On Wed, Sep 3, 2014 at 7:27 PM, Romain Perier <romain.perier@gmail.com> wrote: >> This enables EMAC Rockchip support on radxa rock boards. >> >> Signed-off-by: Romain Perier <romain.perier@gmail.com> >> --- >> arch/arm/boot/dts/rk3188-radxarock.dts | 24 ++++++++++++++++++++++++ >> 1 file changed, 24 insertions(+) >> >> diff --git a/arch/arm/boot/dts/rk3188-radxarock.dts b/arch/arm/boot/dts/rk3188-radxarock.dts >> index 5e4e3c23..e1358d3 100644 >> --- a/arch/arm/boot/dts/rk3188-radxarock.dts >> +++ b/arch/arm/boot/dts/rk3188-radxarock.dts >> @@ -76,6 +76,24 @@ >> }; >> }; >> >> +&emac { >> + status = "okay"; >> + compatible = "rockchip,rk3188-emac"; >> + >> + pinctrl-names = "default"; >> + pinctrl-0 = <&emac_xfer>, <&emac_mdio>, <&phy_int>; >> + >> + mac-address = [ c6 ef 91 8e 60 4b ]; > > is "mac-address" required?
On Wednesday 03 September 2014 18:37:16 PERIER Romain wrote: > It is an optional property used by arc-emac (the core driver), if it > is not present the core driver generates one for you. > Problem being that with this property two radxa rock boards connected > on the same local network might have the same mac address. > > In this case it would be probably better to remove this property. What > do you think ? > It would typically be filled in by the boot loader, and be all-zeroes in the kernel-supplied dts file. I don't see a point in hardcoding a particular MAC address in the dts file, since that won't work unless it's the only device of that type in the network segment. Arnd
diff --git a/arch/arm/boot/dts/rk3188-radxarock.dts b/arch/arm/boot/dts/rk3188-radxarock.dts index 5e4e3c23..e1358d3 100644 --- a/arch/arm/boot/dts/rk3188-radxarock.dts +++ b/arch/arm/boot/dts/rk3188-radxarock.dts @@ -76,6 +76,24 @@ }; }; +&emac { + status = "okay"; + compatible = "rockchip,rk3188-emac"; + + pinctrl-names = "default"; + pinctrl-0 = <&emac_xfer>, <&emac_mdio>, <&phy_int>; + + mac-address = [ c6 ef 91 8e 60 4b ]; + phy = <&phy0>; + phy-supply = <&vcc_rmii>; + + phy0: ethernet-phy@0 { + reg = <0>; + interrupt-parent = <&gpio3>; + interrupts = <26 IRQ_TYPE_LEVEL_LOW>; + }; +}; + &i2c1 { status = "okay"; clock-frequency = <400000>; @@ -201,6 +219,12 @@ }; }; + lan8720a { + phy_int: phy-int { + rockchip,pins = <RK_GPIO3 26 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + ir-receiver { ir_recv_pin: ir-recv-pin { rockchip,pins = <RK_GPIO0 10 RK_FUNC_GPIO &pcfg_pull_none>;
This enables EMAC Rockchip support on radxa rock boards. Signed-off-by: Romain Perier <romain.perier@gmail.com> --- arch/arm/boot/dts/rk3188-radxarock.dts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)