Skip to contentSkip to conversation

sunxi: OrangePi Zero fixes

PATCH New Andre Przywara 5 participants 9 messages Jan 14, 2017 – Jan 15, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover 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(+)
Signature · 1 line
2.8.2
#1 lore raw

PATCH 1/2 sunxi: dts: OrangePi Zero: add Ethernet node

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.

---
 arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts +11 -0
index 0989434..20d489c 100644
@@ -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 at 1 {
+		reg = <1>;
+	};
+};
+
 &mmc0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc0_pins_a>;
Signature · 1 line
2.8.2
#2 lore raw

PATCH 1/2 sunxi: dts: OrangePi Zero: add Ethernet node

Can you simultaneously use both Ethernet interfaces on the A64? I've received conflicting answers to this question.

Quoted 39 lines · Andre Przywara

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.

---
 arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts +11 -1
index 0989434..20d489c 100644
@@ -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 at 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 at googlegroups.com. For more options, visit https://groups.google.com/d/optout.

Signature · 2 lines
Jon Smirl
jonsmirl at gmail.com
#3 lore raw

PATCH 1/2 sunxi: dts: OrangePi Zero: add Ethernet node

In reply to Andre Przywara
Quoted 6 lines · Andre Przywara

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.

Thanks,
Maxime

Signature · 10 lines
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: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170115/cae1aac8/attachment.sig>
#4 lore raw

PATCH 1/2 sunxi: dts: OrangePi Zero: add Ethernet node

Quoted 9 lines · Maxime Ripard
Quoted 6 lines · Andre Przywara

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.

Applied to u-boot-sunxi/master

thanks!

Signature · 4 lines
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
#5 lore raw

PATCH 2/2 sunxi: OrangePi Zero: defconfig: enable SPI flash

In reply to Andre Przywara

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.

---
 configs/orangepi_zero_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/orangepi_zero_defconfig +2 -0
index 8813927..abb3fcf 100644
@@ -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
Signature · 1 line
2.8.2
#6 lore raw

PATCH 2/2 sunxi: OrangePi Zero: defconfig: enable SPI flash

Quoted 7 lines · Andre Przywara

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 :)

Quoted 2 lines
Quoted 18 lines

---
?configs/orangepi_zero_defconfig | 2 ++
?1 file changed, 2 insertions(+)

configs/orangepi_zero_defconfig +0 -0
index 8813927..abb3fcf 100644
@@ -13,3 +13,5 @@ CONFIG_SPL=y

?# CONFIG_CMD_FPGA is not set
?CONFIG_SUN8I_EMAC=y
?CONFIG_USB_EHCI_HCD=y

configs/orangepi_zero_defconfig +2 -1
+CONFIG_SPL_SPI_SUNXI=y
+CONFIG_SPL_SPI_FLASH_SUPPORT=y
--?

2.8.2

#7 lore raw

PATCH 2/2 sunxi: OrangePi Zero: defconfig: enable SPI flash

In reply to Andre Przywara
Quoted 8 lines · Andre Przywara

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,
Maxime

Signature · 10 lines
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: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170115/f4d50442/attachment.sig>
#8 lore raw

PATCH 2/2 sunxi: OrangePi Zero: defconfig: enable SPI flash

Quoted 11 lines · Maxime Ripard
Quoted 8 lines · Andre Przywara

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.

Applied to u-boot-sunxi/master

thanks!

Signature · 4 lines
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.