Skip to contentSkip to conversation

orange-pi-zero: minor updates for board peripherals

PATCH Superseded Sergey Matyukevich 2 participants 8 messages May 19, 2017 – May 24, 2017

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover orange-pi-zero: minor updates for board peripherals

Hi all,

These two patches simplify the use of orange-pi-zero board right out of the box:

- add interrupt triggering for the on-board XR819 SDIO WiFi chip
- enable on-board SPI NOR

Regards,
Sergey

sun8i-h2-plus-orangepi-zero.dts | 18 ++++++++++++++++++

1 file changed, 18 insertions(+)
#1 lore raw

PATCH 1/2 ARM: dts: orange-pi-zero: interrupt triggering for XR819 WiFi chip

Specify interrupt triggering for XR819 SDIO WiFi chip on orange-pi-zero board.

For more details see: http://linux-sunxi.org/Wifi#Allwinner

---
 arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +2 -0
index 9e8b082c134f..34e4a5a80136 100644
@@ -128,6 +128,8 @@
 	 */
 	xr819: sdio_wifi at 1 {
 		reg = <1>;
+		interrupt-parent = <&pio>;
+		interrupts = <6 10 IRQ_TYPE_EDGE_RISING>;
 	};
 };
 
Signature · 1 line
2.11.0
#2 lore raw

PATCH 1/2 ARM: dts: orange-pi-zero: interrupt triggering for XR819 WiFi chip

Hi Sergey,

Thanks for your patches!

Quoted 4 lines · Sergey Matyukevich

Specify interrupt triggering for XR819 SDIO WiFi chip on orange-pi-zero board.

For more details see: http://linux-sunxi.org/Wifi#Allwinner

Please don't reference details in a wiki page. URLs can change and wiki page get rewritten. git history is immutable. Your commit log should contain everything there is.

The patch itself looks good though.

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.infradead.org/pipermail/linux-arm-kernel/attachments/20170522/36f6dc73/attachment.sig>
#3 lore raw

PATCH 1/2 ARM: dts: orange-pi-zero: interrupt triggering for XR819 WiFi chip

Quoted 8 lines
Quoted 2 lines

For more details see: http://linux-sunxi.org/Wifi#Allwinner

Please don't reference details in a wiki page. URLs can change and wiki page get rewritten. git history is immutable. Your commit log should contain everything there is.

The patch itself looks good though.

Ok, I will provide a more detailed commit message and resubmit.

Thanks,
Sergey

#4 lore raw

PATCH 2/2 ARM: dts: orange-pi-zero: enable SPI NOR

In reply to Sergey Matyukevich

Enable SPI NOR on orange-pi-zero board.

For more information see:
- http://linux-sunxi.org/Orange_Pi_Zero#SPI_NOR_flash

---
 arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +16 -0
index 34e4a5a80136..fe39e96cee65 100644
@@ -177,3 +177,19 @@
 	status = "okay";
 	usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
 };
+
+&spi0 {
+	status = "okay";
+
+	flash at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "mxicy,mx25l1606e", "winbond,w25q128";
+		reg = <0>;
+		spi-max-frequency = <40000000>;
+
+		partition at 00000000 {
+			reg = <0x00000000 0x200000>;	/* 2Mb */
+		};
+	};
+};
Signature · 1 line
2.11.0
#5 lore raw

PATCH 2/2 ARM: dts: orange-pi-zero: enable SPI NOR

Hi Sergey,

Quoted 4 lines · Sergey Matyukevich

Enable SPI NOR on orange-pi-zero board.

For more information see:
- http://linux-sunxi.org/Orange_Pi_Zero#SPI_NOR_flash

Same remark here than on the first patch

Quoted 14 lines
---
 arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +0 -0
index 34e4a5a80136..fe39e96cee65 100644
@@ -177,3 +177,19 @@
 	status = "okay";
 	usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
 };

arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts line 189

Quoted 10 lines
arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +10 -0
+
+&spi0 {
+	status = "okay";
+
+	flash at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "mxicy,mx25l1606e", "winbond,w25q128";
+		reg = <0>;
+		spi-max-frequency = <40000000>;

How do the other OPi Zero that doesn't have that SPI flash behave?

arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts line 193

Quoted 4 lines
arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +4 -0
+
+		partition at 00000000 {
+			reg = <0x00000000 0x200000>;	/* 2Mb */
+		};

There's no need to create a first partition, this needs to be user-defined.

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.infradead.org/pipermail/linux-arm-kernel/attachments/20170522/2c848e31/attachment.sig>
#6 lore raw

PATCH 2/2 ARM: dts: orange-pi-zero: enable SPI NOR

Quoted 4 lines
Quoted 2 lines

For more information see:
- http://linux-sunxi.org/Orange_Pi_Zero#SPI_NOR_flash

Same remark here than on the first patch

Ok, I will provide a more detailed commit message
w/o external references.

Quoted 11 lines

arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts line 189

Quoted 9 lines

+&spi0 {

arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +8 -0
+	status = "okay";
+
+	flash at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "mxicy,mx25l1606e", "winbond,w25q128";
+		reg = <0>;
+		spi-max-frequency = <40000000>;

How do the other OPi Zero that doesn't have that SPI flash behave?

Hmmm. Good point. According to linux-sunxi.org docs SPI NOR flash was optional in the first production batch in Dec 2016. In later batches flash chip was pre-populated. However there are should be quite a few boards around which do not have flash.

Does it make sense to set status to 'disabled' by default adding appropriate comment in the commit message ?

Quoted 7 lines

arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts line 193

Quoted 4 lines
arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +4 -0
+
+		partition at 00000000 {
+			reg = <0x00000000 0x200000>;	/* 2Mb */
+		};

There's no need to create a first partition, this needs to be user-defined.

Ok, than it probably makes sense to drop it from dts. User-defined list of partitions can be passed via kernel command line.

Thanks,
Sergey

#7 lore raw

PATCH 2/2 ARM: dts: orange-pi-zero: enable SPI NOR

Hi Sergey,

Quoted 20 lines · Sergey Matyukevich
Quoted 4 lines
Quoted 2 lines

For more information see:
- http://linux-sunxi.org/Orange_Pi_Zero#SPI_NOR_flash

Same remark here than on the first patch

Ok, I will provide a more detailed commit message
w/o external references.

Quoted 11 lines

arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts line 189

Quoted 9 lines

+&spi0 {

arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +8 -0
+	status = "okay";
+
+	flash at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "mxicy,mx25l1606e", "winbond,w25q128";
+		reg = <0>;
+		spi-max-frequency = <40000000>;

How do the other OPi Zero that doesn't have that SPI flash behave?

Quoted 7 lines

Hmmm. Good point. According to linux-sunxi.org docs SPI NOR flash was optional in the first production batch in Dec 2016. In later batches flash chip was pre-populated. However there are should be quite a few boards around which do not have flash.

Does it make sense to set status to 'disabled' by default adding appropriate comment in the commit message ?

If it's just that the driver fails to probe, we can live with that I guess. If not, then yes, that's a solution too.

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.infradead.org/pipermail/linux-arm-kernel/attachments/20170524/80610cf3/attachment-0001.sig>