[PATCH v1 1/1] sunxi: h3: Add initial ZeroPi support

Andre Przywara andre.przywara at arm.com
Thu Jun 17 21:15:59 CEST 2021


On Tue, 15 Jun 2021 11:25:52 +0800
Yu-Tung Chang <mtwget at gmail.com> wrote:

> ZeroPi is a new board of high performance with low cost
> designed by FriendlyElec., using the Allwinner H3 SOC.
> 
> ZeroPi features
> - Allwinner H3, Quad-core Cortex-A7 at 1.2GHz
> - 256MB/512MB DDR3 RAM
> - microsd slot
> - 10/100/1000Mbps Ethernet
> - Debug Serial Port
> - DC 5V/2A power-supply
> 
> Signed-off-by: Yu-Tung Chang <mtwget at gmail.com>

Looks alright, thanks for sending this. One nit below.

> ---
>  arch/arm/dts/Makefile            |  3 +-
>  arch/arm/dts/sun8i-h3-zeropi.dts | 48 ++++++++++++++++++++++++++++++++
>  board/sunxi/MAINTAINERS          |  6 ++++
>  configs/zeropi_defconfig         | 13 +++++++++
>  4 files changed, 69 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/dts/sun8i-h3-zeropi.dts
>  create mode 100644 configs/zeropi_defconfig
> 
> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> index 096068261d..7c8e253350 100644
> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -607,7 +607,8 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \
>  	sun8i-h3-orangepi-plus.dtb \
>  	sun8i-h3-orangepi-plus2e.dtb \
>  	sun8i-h3-orangepi-zero-plus2.dtb \
> -	sun8i-h3-rervision-dvk.dtb
> +	sun8i-h3-rervision-dvk.dtb \
> +	sun8i-h3-zeropi.dtb
>  dtb-$(CONFIG_MACH_SUN8I_R40) += \
>  	sun8i-r40-bananapi-m2-ultra.dtb \
>  	sun8i-v40-bananapi-m2-berry.dtb
> diff --git a/arch/arm/dts/sun8i-h3-zeropi.dts b/arch/arm/dts/sun8i-h3-zeropi.dts
> new file mode 100644
> index 0000000000..e36381f11b
> --- /dev/null
> +++ b/arch/arm/dts/sun8i-h3-zeropi.dts
> @@ -0,0 +1,48 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)

While I like those SPDX lines more, the Linux kernel copy still(?) uses
the more explicit license header. And we aim to stay as close as
possible to the kernel DTs, that includes comments as well.

So if you resend a v2 which just copies the kernel .dts, I will queue
it for the next merge window.

Cheers,
Andre

P.S. For the first version of a single patch "series", just use
"[PATCH]" in the subject. There is never a "v1", and also little reason
for a "1/1". If you have some comments that would typically go into a
cover letter, put them behind the "---" in the top of the email.

> +/*
> + * Copyright (C) 2021 Yu-Tung Chang <mtwget at gmail.com>
> + */
> +
> +#include "sun8i-h3-nanopi.dtsi"
> +
> +/ {
> +	model = "FriendlyARM ZeroPi";
> +	compatible = "friendlyarm,zeropi", "allwinner,sun8i-h3";
> +
> +	aliases {
> +		ethernet0 = &emac;
> +	};
> +
> +	reg_gmac_3v3: gmac-3v3 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "gmac-3v3";
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +		startup-delay-us = <100000>;
> +		enable-active-high;
> +		gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */
> +	};
> +};
> +
> +&external_mdio {
> +	ext_rgmii_phy: ethernet-phy at 7 {
> +		compatible = "ethernet-phy-ieee802.3-c22";
> +		reg = <7>;
> +	};
> +};
> +
> +&emac {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&emac_rgmii_pins>;
> +	phy-supply = <&reg_gmac_3v3>;
> +	phy-handle = <&ext_rgmii_phy>;
> +	phy-mode = "rgmii-id";
> +
> +	allwinner,leds-active-low;
> +	status = "okay";
> +};
> +
> +&usb_otg {
> +	status = "okay";
> +	dr_mode = "host";
> +};
> diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS
> index 76eba2ad20..4fc26077b2 100644
> --- a/board/sunxi/MAINTAINERS
> +++ b/board/sunxi/MAINTAINERS
> @@ -529,3 +529,9 @@ YONES TOPTECH BS1078 V2 BOARD
>  M:	Peter Korsgaard <peter at korsgaard.com>
>  S:	Maintained
>  F:	configs/Yones_Toptech_BS1078_V2_defconfig
> +
> +ZEROPI BOARD
> +M:	Yu-Tung Chang <mtwget at gmail.com>
> +S:	Maintained
> +F:	configs/zeropi_defconfig
> +F:	arch/arm/dts/sun8i-h3-zeropi.dts
> diff --git a/configs/zeropi_defconfig b/configs/zeropi_defconfig
> new file mode 100644
> index 0000000000..f921b09892
> --- /dev/null
> +++ b/configs/zeropi_defconfig
> @@ -0,0 +1,13 @@
> +CONFIG_ARM=y
> +CONFIG_ARCH_SUNXI=y
> +CONFIG_SPL=y
> +CONFIG_MACH_SUN8I_H3=y
> +CONFIG_DRAM_CLK=408
> +CONFIG_MACPWR="PD6"
> +# CONFIG_VIDEO_DE2 is not set
> +CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-zeropi"
> +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
> +CONFIG_CONSOLE_MUX=y
> +CONFIG_SUN8I_EMAC=y
> +CONFIG_USB_EHCI_HCD=y
> +CONFIG_USB_OHCI_HCD=y



More information about the U-Boot mailing list