[U-Boot] [PATCH 0/2] sunxi: OrangePi Zero fixes

Hi,
two small patches on top of sunxi/next to enable Ethernet and SPI flash. Was there any reason the emac node was omitted from the DT patch (as it is in the OrangePi One DT, which I belive the Zero has copied from)?
Also newer versions of the board seem all to come with SPI flash soldered, so lets enable the SPL support for that to allow booting without an SD card. Having the option enabled for boards without a chip doesn't harm, as it will only be used if the board is actually booted from SPI. This was quickly tested with ssvb's version of sunxi-fel, which can write the SPI flash via FEL (USB).
Cheers, Andre.
Andre Przywara (2): sunxi: dts: OrangePi Zero: add Ethernet node sunxi: OrangePi Zero: defconfig: enable SPI flash
arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts | 11 +++++++++++ configs/orangepi_zero_defconfig | 2 ++ 2 files changed, 13 insertions(+)

The OrangePi Zero can happily use the EMAC along with its integrated PHY to use Ethernet (for TFTP booting, for instance). Add the emac node to the board .dts by copying it from the OrangePi One DT.
Signed-off-by: Andre Przywara andre.przywara@arm.com --- arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts index 0989434..20d489c 100644 --- a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts +++ b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts @@ -99,6 +99,17 @@ status = "okay"; };
+&emac { + phy = <&phy1>; + phy-mode = "mii"; + allwinner,use-internal-phy; + allwinner,leds-active-low; + status = "okay"; + phy1: ethernet-phy@1 { + reg = <1>; + }; +}; + &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>;

Can you simultaneously use both Ethernet interfaces on the A64? I've received conflicting answers to this question.
On Fri, Jan 13, 2017 at 9:06 PM, Andre Przywara andre.przywara@arm.com wrote:
The OrangePi Zero can happily use the EMAC along with its integrated PHY to use Ethernet (for TFTP booting, for instance). Add the emac node to the board .dts by copying it from the OrangePi One DT.
Signed-off-by: Andre Przywara andre.przywara@arm.com
arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts index 0989434..20d489c 100644 --- a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts +++ b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts @@ -99,6 +99,17 @@ status = "okay"; };
+&emac {
phy = <&phy1>;
phy-mode = "mii";
allwinner,use-internal-phy;
allwinner,leds-active-low;
status = "okay";
phy1: ethernet-phy@1 {
reg = <1>;
};
+};
&mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>; -- 2.8.2
-- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout.

On Sat, Jan 14, 2017 at 02:06:09AM +0000, Andre Przywara wrote:
The OrangePi Zero can happily use the EMAC along with its integrated PHY to use Ethernet (for TFTP booting, for instance). Add the emac node to the board .dts by copying it from the OrangePi One DT.
Signed-off-by: Andre Przywara andre.przywara@arm.com
Acked-by: Maxime Ripard maxime.ripard@free-electrons.com
Thanks, Maxime

On Sunday 15 January 2017 05:04 PM, Maxime Ripard wrote:
On Sat, Jan 14, 2017 at 02:06:09AM +0000, Andre Przywara wrote:
The OrangePi Zero can happily use the EMAC along with its integrated PHY to use Ethernet (for TFTP booting, for instance). Add the emac node to the board .dts by copying it from the OrangePi One DT.
Signed-off-by: Andre Przywara andre.przywara@arm.com
Acked-by: Maxime Ripard maxime.ripard@free-electrons.com
Reviewed-by: Jagan Teki jagan@openedev.com
Applied to u-boot-sunxi/master
thanks!

Newer OrangePi Zero boards all come with 16 Mib SPI flash soldered, from which the board can actually boot from. Enable the SPL support for the SPI controller and SPI flash to allow putting the SPL, the DT and U-Boot proper into there. This will let a board boot without an SD card inserted. The flash chip can be written with a version of the sunxi-fel tool.
Signed-off-by: Andre Przywara andre.przywara@arm.com --- configs/orangepi_zero_defconfig | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/configs/orangepi_zero_defconfig b/configs/orangepi_zero_defconfig index 8813927..abb3fcf 100644 --- a/configs/orangepi_zero_defconfig +++ b/configs/orangepi_zero_defconfig @@ -13,3 +13,5 @@ CONFIG_SPL=y # CONFIG_CMD_FPGA is not set CONFIG_SUN8I_EMAC=y CONFIG_USB_EHCI_HCD=y +CONFIG_SPL_SPI_SUNXI=y +CONFIG_SPL_SPI_FLASH_SUPPORT=y

On Sat, 2017-01-14 at 02:06 +0000, Andre Przywara wrote:
Newer OrangePi Zero boards all come with 16 Mib SPI flash soldered, from which the board can actually boot from. Enable the SPL support for the SPI controller and SPI flash to allow putting the SPL, the DT and U-Boot proper into there. This will let a board boot without an SD card inserted. The flash chip can be written with a version of the sunxi-fel tool.
Thanks, I had this one in my queue :)
Signed-off-by: Andre Przywara andre.przywara@arm.com
Tested-by: Priit Laes plaes@plaes.org
configs/orangepi_zero_defconfig | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/configs/orangepi_zero_defconfig b/configs/orangepi_zero_defconfig index 8813927..abb3fcf 100644 --- a/configs/orangepi_zero_defconfig +++ b/configs/orangepi_zero_defconfig @@ -13,3 +13,5 @@ CONFIG_SPL=y # CONFIG_CMD_FPGA is not set CONFIG_SUN8I_EMAC=y CONFIG_USB_EHCI_HCD=y +CONFIG_SPL_SPI_SUNXI=y +CONFIG_SPL_SPI_FLASH_SUPPORT=y -- 2.8.2

On Sat, Jan 14, 2017 at 02:06:10AM +0000, Andre Przywara wrote:
Newer OrangePi Zero boards all come with 16 Mib SPI flash soldered, from which the board can actually boot from. Enable the SPL support for the SPI controller and SPI flash to allow putting the SPL, the DT and U-Boot proper into there. This will let a board boot without an SD card inserted. The flash chip can be written with a version of the sunxi-fel tool.
Signed-off-by: Andre Przywara andre.przywara@arm.com
Acked-by: Maxime Ripard maxime.ripard@free-electrons.com
Thanks, Maxime

On Sunday 15 January 2017 05:04 PM, Maxime Ripard wrote:
On Sat, Jan 14, 2017 at 02:06:10AM +0000, Andre Przywara wrote:
Newer OrangePi Zero boards all come with 16 Mib SPI flash soldered, from which the board can actually boot from. Enable the SPL support for the SPI controller and SPI flash to allow putting the SPL, the DT and U-Boot proper into there. This will let a board boot without an SD card inserted. The flash chip can be written with a version of the sunxi-fel tool.
Signed-off-by: Andre Przywara andre.przywara@arm.com
Acked-by: Maxime Ripard maxime.ripard@free-electrons.com
Reviewed-by: Jagan Teki jagan@openedev.com
Applied to u-boot-sunxi/master
thanks!
participants (5)
-
Andre Przywara
-
Jagan Teki
-
jonsmirl@gmail.com
-
Maxime Ripard
-
Priit Laes