* [PATCH 1/3] sunxi: dts: OrangePi Zero: Add SPI aliases to make bus usable with u-boot.
@ 2020-09-28 21:02 Michal Suchanek
2020-09-28 21:02 ` [PATCH 2/3] sunxi: dts: OrangePi Zero: Enable SPI flash Michal Suchanek
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Michal Suchanek @ 2020-09-28 21:02 UTC (permalink / raw)
To: u-boot
The u-boot code relies on aliases to assign bus number.
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
index f19ed981da..090570148e 100644
--- a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
+++ b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
@@ -59,6 +59,8 @@
/* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
ethernet0 = &emac;
ethernet1 = &xr819;
+ spi0 = &spi0;
+ spi1 = &spi1;
};
chosen {
--
2.28.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] sunxi: dts: OrangePi Zero: Enable SPI flash.
2020-09-28 21:02 [PATCH 1/3] sunxi: dts: OrangePi Zero: Add SPI aliases to make bus usable with u-boot Michal Suchanek
@ 2020-09-28 21:02 ` Michal Suchanek
2020-10-22 6:31 ` Jagan Teki
2020-09-28 21:02 ` [PATCH 3/3] sunxi: Enable SPI support on Orange Pi Zero Michal Suchanek
2020-09-29 2:36 ` [PATCH 1/3] sunxi: dts: OrangePi Zero: Add SPI aliases to make bus usable with u-boot Chen-Yu Tsai
2 siblings, 1 reply; 6+ messages in thread
From: Michal Suchanek @ 2020-09-28 21:02 UTC (permalink / raw)
To: u-boot
This flash is optional but new boards do have it, and on boards that
don't the pins are routed to the flash pads anyway.
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
index 090570148e..dc3d006010 100644
--- a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
+++ b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
@@ -165,8 +165,8 @@
};
&spi0 {
- /* Disable SPI NOR by default: it optional on Orange Pi Zero boards */
- status = "disabled";
+ /* Enable SPI NOR by default: it optional on Orange Pi Zero boards */
+ status = "okay";
flash at 0 {
#address-cells = <1>;
--
2.28.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] sunxi: Enable SPI support on Orange Pi Zero
2020-09-28 21:02 [PATCH 1/3] sunxi: dts: OrangePi Zero: Add SPI aliases to make bus usable with u-boot Michal Suchanek
2020-09-28 21:02 ` [PATCH 2/3] sunxi: dts: OrangePi Zero: Enable SPI flash Michal Suchanek
@ 2020-09-28 21:02 ` Michal Suchanek
2020-09-29 2:36 ` [PATCH 1/3] sunxi: dts: OrangePi Zero: Add SPI aliases to make bus usable with u-boot Chen-Yu Tsai
2 siblings, 0 replies; 6+ messages in thread
From: Michal Suchanek @ 2020-09-28 21:02 UTC (permalink / raw)
To: u-boot
Enable support for SPI flash and the sf command.
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
configs/orangepi_zero_defconfig | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/configs/orangepi_zero_defconfig b/configs/orangepi_zero_defconfig
index 998c95d151..1087baece1 100644
--- a/configs/orangepi_zero_defconfig
+++ b/configs/orangepi_zero_defconfig
@@ -8,6 +8,14 @@ CONFIG_SPL_SPI_SUNXI=y
CONFIG_DEFAULT_DEVICE_TREE="sun8i-h2-plus-orangepi-zero"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_CONSOLE_MUX=y
+CONFIG_CMD_SF_TEST=y
+CONFIG_CMD_SPI=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH_SFDP_SUPPORT=y
+CONFIG_SPI_FLASH_MACRONIX=y
+CONFIG_SPI_FLASH_WINBOND=y
CONFIG_SUN8I_EMAC=y
+CONFIG_SPI=y
+CONFIG_DM_SPI=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_OHCI_HCD=y
--
2.28.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 1/3] sunxi: dts: OrangePi Zero: Add SPI aliases to make bus usable with u-boot.
2020-09-28 21:02 [PATCH 1/3] sunxi: dts: OrangePi Zero: Add SPI aliases to make bus usable with u-boot Michal Suchanek
2020-09-28 21:02 ` [PATCH 2/3] sunxi: dts: OrangePi Zero: Enable SPI flash Michal Suchanek
2020-09-28 21:02 ` [PATCH 3/3] sunxi: Enable SPI support on Orange Pi Zero Michal Suchanek
@ 2020-09-29 2:36 ` Chen-Yu Tsai
2020-09-29 8:13 ` [PATCH v2 " Michal Suchanek
2 siblings, 1 reply; 6+ messages in thread
From: Chen-Yu Tsai @ 2020-09-29 2:36 UTC (permalink / raw)
To: u-boot
(Resend from @kernel.org address)
On Tue, Sep 29, 2020 at 5:02 AM Michal Suchanek <msuchanek@suse.de> wrote:
>
> The u-boot code relies on aliases to assign bus number.
>
> Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> ---
> arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts | 2 ++
Anything U-boot specific should be done in the *-u-boot.dts file.
And any changes you do to the U-boot copy of dts files will potentially
be lost when a dts sync happens.
ChenYu
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
> index f19ed981da..090570148e 100644
> --- a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
> +++ b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
> @@ -59,6 +59,8 @@
> /* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
> ethernet0 = &emac;
> ethernet1 = &xr819;
> + spi0 = &spi0;
> + spi1 = &spi1;
> };
>
> chosen {
> --
> 2.28.0
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/3] sunxi: dts: OrangePi Zero: Add SPI aliases to make bus usable with u-boot.
2020-09-29 2:36 ` [PATCH 1/3] sunxi: dts: OrangePi Zero: Add SPI aliases to make bus usable with u-boot Chen-Yu Tsai
@ 2020-09-29 8:13 ` Michal Suchanek
0 siblings, 0 replies; 6+ messages in thread
From: Michal Suchanek @ 2020-09-29 8:13 UTC (permalink / raw)
To: u-boot
The u-boot code relies on aliases to assign bus number.
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
v2: move u-boot specific aliases to separate file
---
arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts | 1 +
arch/arm/dts/sunxi-spi-u-boot.dtsi | 8 ++++++++
2 files changed, 9 insertions(+)
create mode 100644 arch/arm/dts/sunxi-spi-u-boot.dtsi
diff --git a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
index f19ed981da..3f0d0281ba 100644
--- a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
+++ b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
@@ -46,6 +46,7 @@
/dts-v1/;
#include "sun8i-h3.dtsi"
#include "sunxi-common-regulators.dtsi"
+#include "sunxi-spi-u-boot.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
diff --git a/arch/arm/dts/sunxi-spi-u-boot.dtsi b/arch/arm/dts/sunxi-spi-u-boot.dtsi
new file mode 100644
index 0000000000..df89d02ff2
--- /dev/null
+++ b/arch/arm/dts/sunxi-spi-u-boot.dtsi
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
+/ {
+
+ aliases {
+ spi0 = &spi0;
+ spi1 = &spi1;
+ };
+};
--
2.28.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] sunxi: dts: OrangePi Zero: Enable SPI flash.
2020-09-28 21:02 ` [PATCH 2/3] sunxi: dts: OrangePi Zero: Enable SPI flash Michal Suchanek
@ 2020-10-22 6:31 ` Jagan Teki
0 siblings, 0 replies; 6+ messages in thread
From: Jagan Teki @ 2020-10-22 6:31 UTC (permalink / raw)
To: u-boot
On Tue, Sep 29, 2020 at 2:32 AM Michal Suchanek <msuchanek@suse.de> wrote:
>
> This flash is optional but new boards do have it, and on boards that
> don't the pins are routed to the flash pads anyway.
>
> Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> ---
> arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
> index 090570148e..dc3d006010 100644
> --- a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
> +++ b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
> @@ -165,8 +165,8 @@
> };
>
> &spi0 {
> - /* Disable SPI NOR by default: it optional on Orange Pi Zero boards */
> - status = "disabled";
> + /* Enable SPI NOR by default: it optional on Orange Pi Zero boards */
> + status = "okay";
Sync all sun8i changes from v5.9 as a single patch and enable spi on
-u-boot.dtsi.
Jagan.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-10-22 6:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-28 21:02 [PATCH 1/3] sunxi: dts: OrangePi Zero: Add SPI aliases to make bus usable with u-boot Michal Suchanek
2020-09-28 21:02 ` [PATCH 2/3] sunxi: dts: OrangePi Zero: Enable SPI flash Michal Suchanek
2020-10-22 6:31 ` Jagan Teki
2020-09-28 21:02 ` [PATCH 3/3] sunxi: Enable SPI support on Orange Pi Zero Michal Suchanek
2020-09-29 2:36 ` [PATCH 1/3] sunxi: dts: OrangePi Zero: Add SPI aliases to make bus usable with u-boot Chen-Yu Tsai
2020-09-29 8:13 ` [PATCH v2 " Michal Suchanek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.