mbox series

[v2,0/2] Add dwmac-sun8i on A83T DT

Message ID 20171109082950.21124-1-clabbe.montjoie@gmail.com
Headers show
Series Add dwmac-sun8i on A83T DT | expand

Message

Corentin Labbe Nov. 9, 2017, 8:29 a.m. UTC
Hello

This patch series add some device node for dwmac-sun8i on A83T.

Changes since v1:
- reworked commit log of patch #1
- added comment on drive strength

Corentin Labbe (2):
  ARM: sun8i: a83t: add dwmac-sun8i device node
  ARM: sun8i: bananapi-m3: Enable dwmac-sun8i

 arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts | 18 +++++++++++++++
 arch/arm/boot/dts/sun8i-a83t.dtsi            | 33 ++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+)

-- 
2.13.6

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Chen-Yu Tsai Nov. 10, 2017, 3:21 a.m. UTC | #1
On Thu, Nov 9, 2017 at 4:29 PM, Corentin Labbe
<clabbe.montjoie@gmail.com> wrote:
> Hello

>

> This patch series add some device node for dwmac-sun8i on A83T.

>

> Changes since v1:

> - reworked commit log of patch #1

> - added comment on drive strength

>

> Corentin Labbe (2):

>   ARM: sun8i: a83t: add dwmac-sun8i device node

>   ARM: sun8i: bananapi-m3: Enable dwmac-sun8i


Subjects should have "dts:" prefix.
We could probably fix it up for you.

ChenYu

>

>  arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts | 18 +++++++++++++++

>  arch/arm/boot/dts/sun8i-a83t.dtsi            | 33 ++++++++++++++++++++++++++++

>  2 files changed, 51 insertions(+)

>

> --

> 2.13.6

>

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Chen-Yu Tsai Nov. 10, 2017, 3:48 a.m. UTC | #2
On Thu, Nov 9, 2017 at 4:29 PM, Corentin Labbe
<clabbe.montjoie@gmail.com> wrote:
> The dwmac-sun8i hardware is present on the bananapi m3

> It uses an external PHY rtl8211e via RGMII.

>

> This patch create the needed emac and phy nodes.

>

> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>

> ---

>  arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts | 18 ++++++++++++++++++

>  1 file changed, 18 insertions(+)

>

> diff --git a/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts b/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts

> index c606af3dbfed..45bdd5c17829 100644

> --- a/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts

> +++ b/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts

> @@ -52,6 +52,7 @@

>         compatible = "sinovoip,bpi-m3", "allwinner,sun8i-a83t";

>

>         aliases {

> +               ethernet0 = &emac;

>                 serial0 = &uart0;

>         };

>

> @@ -88,6 +89,23 @@

>         /* TODO GL830 USB-to-SATA bridge downstream w/ GPIO power controls */

>  };

>

> +&emac {

> +       pinctrl-names = "default";

> +       pinctrl-0 = <&emac_rgmii_pins>;

> +       phy-handle = <&ext_rgmii_phy>;

> +       phy-mode = "rgmii";


Schematics say PHY is power by DC1SW from the PMIC.
Not sure why you don't need that. Have you tested your patch?

See https://github.com/wens/linux/commit/c2a12e2470b6d7988a3af043e0f030d8206ad68a

ChenYu

> +       allwinner,rx-delay-ps = <700>;

> +       allwinner,tx-delay-ps = <700>;

> +

> +       status = "okay";

> +};

> +

> +&mdio {

> +       ext_rgmii_phy: ethernet-phy@1 {

> +               reg = <1>;

> +       };

> +};

> +

>  &mmc0 {

>         pinctrl-names = "default";

>         pinctrl-0 = <&mmc0_pins>;

> --

> 2.13.6

>

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Corentin Labbe Nov. 10, 2017, 5:50 a.m. UTC | #3
On Fri, Nov 10, 2017 at 11:48:11AM +0800, Chen-Yu Tsai wrote:
> On Thu, Nov 9, 2017 at 4:29 PM, Corentin Labbe

> <clabbe.montjoie@gmail.com> wrote:

> > The dwmac-sun8i hardware is present on the bananapi m3

> > It uses an external PHY rtl8211e via RGMII.

> >

> > This patch create the needed emac and phy nodes.

> >

> > Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>

> > ---

> >  arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts | 18 ++++++++++++++++++

> >  1 file changed, 18 insertions(+)

> >

> > diff --git a/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts b/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts

> > index c606af3dbfed..45bdd5c17829 100644

> > --- a/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts

> > +++ b/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts

> > @@ -52,6 +52,7 @@

> >         compatible = "sinovoip,bpi-m3", "allwinner,sun8i-a83t";

> >

> >         aliases {

> > +               ethernet0 = &emac;

> >                 serial0 = &uart0;

> >         };

> >

> > @@ -88,6 +89,23 @@

> >         /* TODO GL830 USB-to-SATA bridge downstream w/ GPIO power controls */

> >  };

> >

> > +&emac {

> > +       pinctrl-names = "default";

> > +       pinctrl-0 = <&emac_rgmii_pins>;

> > +       phy-handle = <&ext_rgmii_phy>;

> > +       phy-mode = "rgmii";

> 

> Schematics say PHY is power by DC1SW from the PMIC.

> Not sure why you don't need that. Have you tested your patch?


Tested on 4.14.0-rc5-next-20171018+ 
I will try to check which uboot is used, perhaps it's an old uboot with some PMIC hack.

Thanks
Regards
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html