[U-Boot] [PATCH v2 3/5] sunxi: Enable EMAC on the Cubietruck Plus

Maxime Ripard maxime.ripard at free-electrons.com
Mon Nov 27 08:09:39 UTC 2017


Hi,

On Sat, Nov 25, 2017 at 01:08:30PM +0800, Chen-Yu Tsai wrote:
> The Cubietruck Plus has an RTL8211E PHY connected to the EMAC using
> RGMII. The PHY is powered by DLDO4 @ 3.3V, while the I/O pins are
> powered by DLDO3 @ 2.5V.
> 
> This patch adds a U-boot specific dtsi file for the board adding
> an enabled EMAC node, and enables the EMAC driver in the defconfig.
> The binding used here is the old revision currently supported in
> U-boot. The U-boot driver has not been updated to support the new
> binding.
> 
> Signed-off-by: Chen-Yu Tsai <wens at csie.org>
> ---
>  .../arm/dts/sun8i-a83t-cubietruck-plus-u-boot.dtsi | 38 ++++++++++++++++++++++
>  configs/Cubietruck_plus_defconfig                  |  2 ++
>  2 files changed, 40 insertions(+)
>  create mode 100644 arch/arm/dts/sun8i-a83t-cubietruck-plus-u-boot.dtsi
> 
> diff --git a/arch/arm/dts/sun8i-a83t-cubietruck-plus-u-boot.dtsi b/arch/arm/dts/sun8i-a83t-cubietruck-plus-u-boot.dtsi
> new file mode 100644
> index 000000000000..4637e128f76e
> --- /dev/null
> +++ b/arch/arm/dts/sun8i-a83t-cubietruck-plus-u-boot.dtsi
> @@ -0,0 +1,38 @@
> +#include "sunxi-u-boot.dtsi"
> +
> +/ {
> +	aliases {
> +		ethernet0 = &emac;
> +	};
> +
> +	soc {
> +		emac: ethernet at 01c30000 {
> +			compatible = "allwinner,sun8i-a83t-emac";
> +			reg = <0x01c30000 0x2000>, <0x01c00030 0x4>;
> +			reg-names = "emac", "syscon";
> +			interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&rgmii_pins>;
> +			phy-mode = "rgmii";
> +			phy = <&phy1>;
> +			status = "okay";
> +
> +			phy1: ethernet-phy at 1 {
> +				reg = <1>;
> +			};
> +		};
> +	};
> +};

Now that we have a binding merged, can't we use that instead?

> +&pio {
> +	rgmii_pins: rgmii_pins {
> +		allwinner,pins = "PD2", "PD3", "PD4", "PD5", "PD6", "PD7",
> +				 "PD11", "PD12", "PD13", "PD14", "PD18",
> +				 "PD19", "PD21", "PD22", "PD23";
> +		allwinner,function = "emac";
> +		allwinner,drive = <3>;
> +		allwinner,pull = <0>;
> +	};
> +};

You should also use the new bindings here.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171127/59c06f65/attachment.sig>


More information about the U-Boot mailing list