* [PATCH v2 0/2] orange-pi-zero: minor updates for peripherals
@ 2017-05-24 21:24 Sergey Matyukevich
2017-05-24 21:24 ` [PATCH v2 1/2] ARM: dts: orange-pi-zero: specify wifi interrupts Sergey Matyukevich
2017-05-24 21:24 ` [PATCH v2 2/2] ARM: dts: orange-pi-zero: add node for SPI NOR Sergey Matyukevich
0 siblings, 2 replies; 10+ messages in thread
From: Sergey Matyukevich @ 2017-05-24 21:24 UTC (permalink / raw)
To: linux-arm-kernel
These two patches simplify the use of orange-pi-zero board
right out of the box:
- specify interrupts for the on-board XR819 SDIO WiFi chip
- add node on-board SPI NOR
Changes from v1:
- update commit messages: drop links to wiki at linux-sunxi.org
- disable SPI NOR flash by default
- drop description of the flash partitions
- add compatible property for XR819 wifi node
sun8i-h2-plus-orangepi-zero.dts | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 1/2] ARM: dts: orange-pi-zero: specify wifi interrupts
2017-05-24 21:24 [PATCH v2 0/2] orange-pi-zero: minor updates for peripherals Sergey Matyukevich
@ 2017-05-24 21:24 ` Sergey Matyukevich
2017-05-25 2:57 ` Chen-Yu Tsai
2017-05-24 21:24 ` [PATCH v2 2/2] ARM: dts: orange-pi-zero: add node for SPI NOR Sergey Matyukevich
1 sibling, 1 reply; 10+ messages in thread
From: Sergey Matyukevich @ 2017-05-24 21:24 UTC (permalink / raw)
To: linux-arm-kernel
The orange-pi-zero board has Allwinner XR819 SDIO wifi chip. The board
dts file provides a node enabling mmc1 controller. Together with an
out-of-tree driver https://github.com/fifteenhex/xradio this node
enables using the wifi chip.
This commit specifies XR819 interrupt configuration for the driver.
Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
---
arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
index 9e8b082c134f..e97dfd1775d1 100644
--- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
+++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
@@ -128,6 +128,9 @@
*/
xr819: sdio_wifi at 1 {
reg = <1>;
+ compatible = "xradio,xr819";
+ interrupt-parent = <&pio>;
+ interrupts = <6 10 IRQ_TYPE_EDGE_RISING>;
};
};
--
2.11.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 1/2] ARM: dts: orange-pi-zero: specify wifi interrupts
2017-05-24 21:24 ` [PATCH v2 1/2] ARM: dts: orange-pi-zero: specify wifi interrupts Sergey Matyukevich
@ 2017-05-25 2:57 ` Chen-Yu Tsai
2017-05-25 7:10 ` Sergey Matyukevich
0 siblings, 1 reply; 10+ messages in thread
From: Chen-Yu Tsai @ 2017-05-25 2:57 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, May 25, 2017 at 5:24 AM, Sergey Matyukevich <geomatsi@gmail.com> wrote:
> The orange-pi-zero board has Allwinner XR819 SDIO wifi chip. The board
> dts file provides a node enabling mmc1 controller. Together with an
> out-of-tree driver https://github.com/fifteenhex/xradio this node
> enables using the wifi chip.
>
> This commit specifies XR819 interrupt configuration for the driver.
>
> Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
> ---
> arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> index 9e8b082c134f..e97dfd1775d1 100644
> --- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> +++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> @@ -128,6 +128,9 @@
> */
> xr819: sdio_wifi at 1 {
> reg = <1>;
> + compatible = "xradio,xr819";
You should submit device tree bindings first. See:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/Documentation/devicetree/bindings/net/wireless
for examples.
> + interrupt-parent = <&pio>;
> + interrupts = <6 10 IRQ_TYPE_EDGE_RISING>;
Are these optional or required properties? AFAIK SDIO supports in-band
interrupts with a bit of overhead, so they should be optional.
ChenYu
> };
> };
>
> --
> 2.11.0
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 1/2] ARM: dts: orange-pi-zero: specify wifi interrupts
2017-05-25 2:57 ` Chen-Yu Tsai
@ 2017-05-25 7:10 ` Sergey Matyukevich
2017-05-25 7:21 ` Chen-Yu Tsai
0 siblings, 1 reply; 10+ messages in thread
From: Sergey Matyukevich @ 2017-05-25 7:10 UTC (permalink / raw)
To: linux-arm-kernel
> > diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> > index 9e8b082c134f..e97dfd1775d1 100644
> > --- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> > +++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> > @@ -128,6 +128,9 @@
> > */
> > xr819: sdio_wifi at 1 {
> > reg = <1>;
> > + compatible = "xradio,xr819";
>
> You should submit device tree bindings first. See:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/Documentation/devicetree/bindings/net/wireless
>
> for examples.
Does it make sense for the out-of-tree driver ?
> > + interrupt-parent = <&pio>;
> > + interrupts = <6 10 IRQ_TYPE_EDGE_RISING>;
>
> Are these optional or required properties? AFAIK SDIO supports in-band
> interrupts with a bit of overhead, so they should be optional.
Those properties are optional. Driver works anyway, though it complains about
missing interrupts. IIUC xradio driver falls back to polling mode only if
xr819 interrupt configuraton is not specified.
Regards,
Sergey
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 1/2] ARM: dts: orange-pi-zero: specify wifi interrupts
2017-05-25 7:10 ` Sergey Matyukevich
@ 2017-05-25 7:21 ` Chen-Yu Tsai
2017-05-25 8:16 ` Icenowy Zheng
2017-05-25 8:31 ` Sergey Matyukevich
0 siblings, 2 replies; 10+ messages in thread
From: Chen-Yu Tsai @ 2017-05-25 7:21 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, May 25, 2017 at 3:10 PM, Sergey Matyukevich <geomatsi@gmail.com> wrote:
>> > diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
>> > index 9e8b082c134f..e97dfd1775d1 100644
>> > --- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
>> > +++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
>> > @@ -128,6 +128,9 @@
>> > */
>> > xr819: sdio_wifi at 1 {
>> > reg = <1>;
>> > + compatible = "xradio,xr819";
>>
>> You should submit device tree bindings first. See:
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/Documentation/devicetree/bindings/net/wireless
>>
>> for examples.
>
> Does it make sense for the out-of-tree driver ?
There is already a binding for ESP8089, which is supported out of tree.
There are also bindings for Mali GPUs which are, again, supported out
of tree.
AFAIK there was some discussion about this during the submission of the
Mali bindings. A set of stable bindings allows the vendor to create stable
device trees. Given that the binding for this WiFi chip is relatively simple,
and it might be compatible or similar to an existing chip already supported
in kernel (but without a binding), it should be straight forward.
>
>> > + interrupt-parent = <&pio>;
>> > + interrupts = <6 10 IRQ_TYPE_EDGE_RISING>;
>>
>> Are these optional or required properties? AFAIK SDIO supports in-band
>> interrupts with a bit of overhead, so they should be optional.
>
> Those properties are optional. Driver works anyway, though it complains about
> missing interrupts. IIUC xradio driver falls back to polling mode only if
> xr819 interrupt configuraton is not specified.
So it doesn't support in-band SDIO interrupts right now. Is that a hardware
or driver limitation?
ChenYu
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 1/2] ARM: dts: orange-pi-zero: specify wifi interrupts
2017-05-25 7:21 ` Chen-Yu Tsai
@ 2017-05-25 8:16 ` Icenowy Zheng
2017-05-25 8:38 ` Sergey Matyukevich
2017-05-25 8:31 ` Sergey Matyukevich
1 sibling, 1 reply; 10+ messages in thread
From: Icenowy Zheng @ 2017-05-25 8:16 UTC (permalink / raw)
To: linux-arm-kernel
? 2017?5?25? GMT+08:00 ??3:21:44, Chen-Yu Tsai <wens@csie.org> ??:
>On Thu, May 25, 2017 at 3:10 PM, Sergey Matyukevich
><geomatsi@gmail.com> wrote:
>>> > diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
>b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
>>> > index 9e8b082c134f..e97dfd1775d1 100644
>>> > --- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
>>> > +++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
>>> > @@ -128,6 +128,9 @@
>>> > */
>>> > xr819: sdio_wifi at 1 {
>>> > reg = <1>;
>>> > + compatible = "xradio,xr819";
>>>
>>> You should submit device tree bindings first. See:
>>>
>>>
>https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/Documentation/devicetree/bindings/net/wireless
>>>
>>> for examples.
>>
>> Does it make sense for the out-of-tree driver ?
>
>There is already a binding for ESP8089, which is supported out of tree.
>There are also bindings for Mali GPUs which are, again, supported out
>of tree.
>
>AFAIK there was some discussion about this during the submission of the
>Mali bindings. A set of stable bindings allows the vendor to create
>stable
>device trees. Given that the binding for this WiFi chip is relatively
>simple,
>and it might be compatible or similar to an existing chip already
>supported
>in kernel (but without a binding), it should be straight forward.
>
>>
>>> > + interrupt-parent = <&pio>;
>>> > + interrupts = <6 10 IRQ_TYPE_EDGE_RISING>;
>>>
>>> Are these optional or required properties? AFAIK SDIO supports
>in-band
>>> interrupts with a bit of overhead, so they should be optional.
>>
>> Those properties are optional. Driver works anyway, though it
>complains about
>> missing interrupts. IIUC xradio driver falls back to polling mode
>only if
>> xr819 interrupt configuraton is not specified.
>
>So it doesn't support in-band SDIO interrupts right now. Is that a
>hardware
>or driver limitation?
The original driver code modified by me to mainline uses in-band interrupts.
But dgp modified it to use out-of-band interrupts.
>
>ChenYu
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 1/2] ARM: dts: orange-pi-zero: specify wifi interrupts
2017-05-25 8:16 ` Icenowy Zheng
@ 2017-05-25 8:38 ` Sergey Matyukevich
0 siblings, 0 replies; 10+ messages in thread
From: Sergey Matyukevich @ 2017-05-25 8:38 UTC (permalink / raw)
To: linux-arm-kernel
>>> Those properties are optional. Driver works anyway, though it
>>complains about
>>> missing interrupts. IIUC xradio driver falls back to polling mode
>>only if
>>> xr819 interrupt configuraton is not specified.
>>
>>So it doesn't support in-band SDIO interrupts right now. Is that a
>>hardware
>>or driver limitation?
>
> The original driver code modified by me to mainline uses in-band interrupts.
>
> But dgp modified it to use out-of-band interrupts.
Current patch was intended to simplify using out of the box the following
out-of-tree driver: https://github.com/fifteenhex/xradio.
Could you please share a bit more details about the drivers you mention here.
Is there any xr819 mainlining efforts ongoing ?
Regards,
Sergey
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 1/2] ARM: dts: orange-pi-zero: specify wifi interrupts
2017-05-25 7:21 ` Chen-Yu Tsai
2017-05-25 8:16 ` Icenowy Zheng
@ 2017-05-25 8:31 ` Sergey Matyukevich
1 sibling, 0 replies; 10+ messages in thread
From: Sergey Matyukevich @ 2017-05-25 8:31 UTC (permalink / raw)
To: linux-arm-kernel
>> Does it make sense for the out-of-tree driver ?
>
> There is already a binding for ESP8089, which is supported out of tree.
> There are also bindings for Mali GPUs which are, again, supported out
> of tree.
>
> AFAIK there was some discussion about this during the submission of the
> Mali bindings. A set of stable bindings allows the vendor to create stable
> device trees. Given that the binding for this WiFi chip is relatively simple,
> and it might be compatible or similar to an existing chip already supported
> in kernel (but without a binding), it should be straight forward.
Thanks for pointing at these examples! According to linux-sunxi.org wiki this
wireless chip might be related to ST cw1200 (drivers/net/wireless/st/cw1200).
I will check if it has any bindings as well.
>
>>
>>> > + interrupt-parent = <&pio>;
>>> > + interrupts = <6 10 IRQ_TYPE_EDGE_RISING>;
>>>
>>> Are these optional or required properties? AFAIK SDIO supports in-band
>>> interrupts with a bit of overhead, so they should be optional.
>>
>> Those properties are optional. Driver works anyway, though it complains about
>> missing interrupts. IIUC xradio driver falls back to polling mode only if
>> xr819 interrupt configuraton is not specified.
>
> So it doesn't support in-band SDIO interrupts right now. Is that a hardware
> or driver limitation?
I have no idea. I haven't yet had a chance to hack around this driver:
only basic testing
and brief comparison with cw1200 driver.
Regards,
Sergey
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 2/2] ARM: dts: orange-pi-zero: add node for SPI NOR
2017-05-24 21:24 [PATCH v2 0/2] orange-pi-zero: minor updates for peripherals Sergey Matyukevich
2017-05-24 21:24 ` [PATCH v2 1/2] ARM: dts: orange-pi-zero: specify wifi interrupts Sergey Matyukevich
@ 2017-05-24 21:24 ` Sergey Matyukevich
2017-05-25 2:53 ` Chen-Yu Tsai
1 sibling, 1 reply; 10+ messages in thread
From: Sergey Matyukevich @ 2017-05-24 21:24 UTC (permalink / raw)
To: linux-arm-kernel
SPI NOR flash was optional in the first production batch in Dec 2016.
In later batches flash chip was pre-populated. However there should
be quite a few boards around which do not have flash chip.
Add node for SPI NOR flash on orange-pi-zero board. Disable this node
by default and leave it to users to enable it if their board has
SPI NOR flash chip populated.
Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
---
arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
index e97dfd1775d1..bbbd8c656914 100644
--- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
+++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
@@ -138,6 +138,19 @@
bias-pull-up;
};
+&spi0 {
+ /* Disable SPI NOR by default: it optional on Orange Pi Zero boards */
+ status = "disabled";
+
+ flash at 0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "mxicy,mx25l1606e", "winbond,w25q128";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+ };
+};
+
&ohci0 {
status = "okay";
};
--
2.11.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 2/2] ARM: dts: orange-pi-zero: add node for SPI NOR
2017-05-24 21:24 ` [PATCH v2 2/2] ARM: dts: orange-pi-zero: add node for SPI NOR Sergey Matyukevich
@ 2017-05-25 2:53 ` Chen-Yu Tsai
0 siblings, 0 replies; 10+ messages in thread
From: Chen-Yu Tsai @ 2017-05-25 2:53 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, May 25, 2017 at 5:24 AM, Sergey Matyukevich <geomatsi@gmail.com> wrote:
> SPI NOR flash was optional in the first production batch in Dec 2016.
> In later batches flash chip was pre-populated. However there should
> be quite a few boards around which do not have flash chip.
>
> Add node for SPI NOR flash on orange-pi-zero board. Disable this node
> by default and leave it to users to enable it if their board has
> SPI NOR flash chip populated.
>
> Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
> ---
> arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> index e97dfd1775d1..bbbd8c656914 100644
> --- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> +++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> @@ -138,6 +138,19 @@
> bias-pull-up;
> };
>
> +&spi0 {
> + /* Disable SPI NOR by default: it optional on Orange Pi Zero boards */
> + status = "disabled";
> +
> + flash at 0 {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + compatible = "mxicy,mx25l1606e", "winbond,w25q128";
> + reg = <0>;
> + spi-max-frequency = <40000000>;
> + };
> +};
> +
> &ohci0 {
Please sort the node references in alphabetical order.
ChenYu
> status = "okay";
> };
> --
> 2.11.0
>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2017-05-25 8:38 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-24 21:24 [PATCH v2 0/2] orange-pi-zero: minor updates for peripherals Sergey Matyukevich
2017-05-24 21:24 ` [PATCH v2 1/2] ARM: dts: orange-pi-zero: specify wifi interrupts Sergey Matyukevich
2017-05-25 2:57 ` Chen-Yu Tsai
2017-05-25 7:10 ` Sergey Matyukevich
2017-05-25 7:21 ` Chen-Yu Tsai
2017-05-25 8:16 ` Icenowy Zheng
2017-05-25 8:38 ` Sergey Matyukevich
2017-05-25 8:31 ` Sergey Matyukevich
2017-05-24 21:24 ` [PATCH v2 2/2] ARM: dts: orange-pi-zero: add node for SPI NOR Sergey Matyukevich
2017-05-25 2:53 ` Chen-Yu Tsai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).