* [PATCH v2 1/3] ARM: sunxi: add support for H2+ SoC @ 2016-11-21 16:24 Icenowy Zheng 2016-11-21 16:24 ` [PATCH v2 2/3] ARM: dts: sunxi: add support for Orange Pi Zero board Icenowy Zheng ` (2 more replies) 0 siblings, 3 replies; 24+ messages in thread From: Icenowy Zheng @ 2016-11-21 16:24 UTC (permalink / raw) To: Jonathan Corbet, Maxime Ripard, Chen-Yu Tsai, Mark Rutland, Russell King, Hans de Goede Cc: devicetree, Vishnu Patekar, Arnd Bergmann, linux-doc, Andre Przywara, linux-kernel, Icenowy Zheng, linux-arm-kernel Allwinner H2+ is a quad-core Cortex-A7 SoC. It is very like H3, that they share the same SoC ID (0x1680), and H3 memory maps as well as drivers works well on the SoC. Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> --- Documentation/arm/sunxi/README | 4 ++++ Documentation/devicetree/bindings/arm/sunxi.txt | 1 + arch/arm/mach-sunxi/sunxi.c | 1 + 3 files changed, 6 insertions(+) diff --git a/Documentation/arm/sunxi/README b/Documentation/arm/sunxi/README index cd02433..1fe4d99c 100644 --- a/Documentation/arm/sunxi/README +++ b/Documentation/arm/sunxi/README @@ -63,6 +63,10 @@ SunXi family + User Manual http://dl.linux-sunxi.org/A33/A33%20user%20manual%20release%201.1.pdf + - Allwinner H2+ (sun8i) + + No document available now, but is known to be working properly with + H3 drivers and memory map. + - Allwinner H3 (sun8i) + Datasheet http://dl.linux-sunxi.org/H3/Allwinner_H3_Datasheet_V1.0.pdf diff --git a/Documentation/devicetree/bindings/arm/sunxi.txt b/Documentation/devicetree/bindings/arm/sunxi.txt index 4d6467c..26b35a7 100644 --- a/Documentation/devicetree/bindings/arm/sunxi.txt +++ b/Documentation/devicetree/bindings/arm/sunxi.txt @@ -13,6 +13,7 @@ using one of the following compatible strings: allwinner,sun8i-a33 allwinner,sun8i-a83t allwinner,sun8i-h3 + allwinner,sun8i-h2plus allwinner,sun9i-a80 allwinner,sun50i-a64 nextthing,gr8 diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c index 2e2bde2..3647ad7 100644 --- a/arch/arm/mach-sunxi/sunxi.c +++ b/arch/arm/mach-sunxi/sunxi.c @@ -63,6 +63,7 @@ static const char * const sun8i_board_dt_compat[] = { "allwinner,sun8i-a23", "allwinner,sun8i-a33", "allwinner,sun8i-a83t", + "allwinner,sun8i-h2plus", "allwinner,sun8i-h3", NULL, }; -- 2.10.2 ^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v2 2/3] ARM: dts: sunxi: add support for Orange Pi Zero board 2016-11-21 16:24 [PATCH v2 1/3] ARM: sunxi: add support for H2+ SoC Icenowy Zheng @ 2016-11-21 16:24 ` Icenowy Zheng 2016-11-23 7:57 ` Maxime Ripard 2016-11-27 9:36 ` Icenowy Zheng 2016-11-21 16:24 ` [PATCH 3/3] ARM: dts: sunxi: enable SDIO Wi-Fi on Orange Pi Zero Icenowy Zheng 2016-11-23 7:54 ` [PATCH v2 1/3] ARM: sunxi: add support for H2+ SoC Maxime Ripard 2 siblings, 2 replies; 24+ messages in thread From: Icenowy Zheng @ 2016-11-21 16:24 UTC (permalink / raw) To: Jonathan Corbet, Maxime Ripard, Chen-Yu Tsai, Mark Rutland, Russell King, Hans de Goede Cc: devicetree, Vishnu Patekar, Arnd Bergmann, linux-doc, Andre Przywara, linux-kernel, Icenowy Zheng, linux-arm-kernel Orange Pi Zero is a board that came with the new Allwinner H2+ SoC. Add a device tree file for it. Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> --- Changes since v2: - Use generic pinconf binding instead of legacy allwinner pinctrl binding. - removed uart3, which is not accessible on Orange Pi Zero. - Removed sun8i-h2plus.dtsi and make Orange Pi Zero dts directly include sun8i-h3.dtsi. - Removed allwinner,sun8i-h3 compatible. arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts | 137 +++++++++++++++++++++++ 2 files changed, 138 insertions(+) create mode 100644 arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 802a10d..51a1dd7 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -834,6 +834,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-a33-sinlinx-sina33.dtb \ sun8i-a83t-allwinner-h8homlet-v2.dtb \ sun8i-a83t-cubietruck-plus.dtb \ + sun8i-h2plus-orangepi-zero.dtb \ sun8i-h3-bananapi-m2-plus.dtb \ sun8i-h3-nanopi-neo.dtb \ sun8i-h3-orangepi-2.dtb \ diff --git a/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts new file mode 100644 index 0000000..b428e47 --- /dev/null +++ b/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts @@ -0,0 +1,137 @@ +/* + * Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz> + * + * Based on sun8i-h3-orangepi-one.dts, which is: + * Copyright (C) 2016 Hans de Goede <hdegoede@redhat.com> + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/dts-v1/; +#include "sun8i-h3.dtsi" +#include "sunxi-common-regulators.dtsi" + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> +#include <dt-bindings/pinctrl/sun4i-a10.h> + +/ { + model = "Xunlong Orange Pi Zero"; + compatible = "xunlong,orangepi-zero", "allwinner,sun8i-h2plus"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&leds_opi0>, <&leds_r_opi0>; + + pwr_led { + label = "orangepi:green:pwr"; + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + + status_led { + label = "orangepi:red:status"; + gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&ehci1 { + status = "okay"; +}; + +&mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ + cd-inverted; + status = "okay"; +}; + +&ohci1 { + status = "okay"; +}; + +&pio { + leds_opi0: led_pins@0 { + pins = "PA17"; + function = "gpio_out"; + }; +}; + +&r_pio { + leds_r_opi0: led_pins@0 { + pins = "PL10"; + function = "gpio_out"; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>; + status = "disabled"; +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&uart2_pins>; + status = "disabled"; +}; + +&usbphy { + /* USB VBUS is always on */ + status = "okay"; +}; -- 2.10.2 ^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH v2 2/3] ARM: dts: sunxi: add support for Orange Pi Zero board 2016-11-21 16:24 ` [PATCH v2 2/3] ARM: dts: sunxi: add support for Orange Pi Zero board Icenowy Zheng @ 2016-11-23 7:57 ` Maxime Ripard 2016-11-23 9:23 ` Andre Przywara 2016-11-27 9:36 ` Icenowy Zheng 1 sibling, 1 reply; 24+ messages in thread From: Maxime Ripard @ 2016-11-23 7:57 UTC (permalink / raw) To: Icenowy Zheng Cc: Mark Rutland, devicetree, Vishnu Patekar, Arnd Bergmann, Jonathan Corbet, Andre Przywara, linux-doc, Russell King, linux-kernel, Hans de Goede, Chen-Yu Tsai, linux-arm-kernel [-- Attachment #1.1: Type: text/plain, Size: 5888 bytes --] On Tue, Nov 22, 2016 at 12:24:20AM +0800, Icenowy Zheng wrote: > Orange Pi Zero is a board that came with the new Allwinner H2+ SoC. > > Add a device tree file for it. > > Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> > --- > Changes since v2: > - Use generic pinconf binding instead of legacy allwinner pinctrl binding. > - removed uart3, which is not accessible on Orange Pi Zero. > - Removed sun8i-h2plus.dtsi and make Orange Pi Zero dts directly include > sun8i-h3.dtsi. > - Removed allwinner,sun8i-h3 compatible. > > arch/arm/boot/dts/Makefile | 1 + > arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts | 137 +++++++++++++++++++++++ Ditto, h2-plus-orangepi-zero. > 2 files changed, 138 insertions(+) > create mode 100644 arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts > > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > index 802a10d..51a1dd7 100644 > --- a/arch/arm/boot/dts/Makefile > +++ b/arch/arm/boot/dts/Makefile > @@ -834,6 +834,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ > sun8i-a33-sinlinx-sina33.dtb \ > sun8i-a83t-allwinner-h8homlet-v2.dtb \ > sun8i-a83t-cubietruck-plus.dtb \ > + sun8i-h2plus-orangepi-zero.dtb \ > sun8i-h3-bananapi-m2-plus.dtb \ > sun8i-h3-nanopi-neo.dtb \ > sun8i-h3-orangepi-2.dtb \ > diff --git a/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts > new file mode 100644 > index 0000000..b428e47 > --- /dev/null > +++ b/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts > @@ -0,0 +1,137 @@ > +/* > + * Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz> > + * > + * Based on sun8i-h3-orangepi-one.dts, which is: > + * Copyright (C) 2016 Hans de Goede <hdegoede@redhat.com> > + * > + * This file is dual-licensed: you can use it either under the terms > + * of the GPL or the X11 license, at your option. Note that this dual > + * licensing only applies to this file, and not this project as a > + * whole. > + * > + * a) This file is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License as > + * published by the Free Software Foundation; either version 2 of the > + * License, or (at your option) any later version. > + * > + * This file is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * Or, alternatively, > + * > + * b) Permission is hereby granted, free of charge, to any person > + * obtaining a copy of this software and associated documentation > + * files (the "Software"), to deal in the Software without > + * restriction, including without limitation the rights to use, > + * copy, modify, merge, publish, distribute, sublicense, and/or > + * sell copies of the Software, and to permit persons to whom the > + * Software is furnished to do so, subject to the following > + * conditions: > + * > + * The above copyright notice and this permission notice shall be > + * included in all copies or substantial portions of the Software. > + * > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, > + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES > + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND > + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT > + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, > + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR > + * OTHER DEALINGS IN THE SOFTWARE. > + */ > + > +/dts-v1/; > +#include "sun8i-h3.dtsi" > +#include "sunxi-common-regulators.dtsi" > + > +#include <dt-bindings/gpio/gpio.h> > +#include <dt-bindings/input/input.h> > +#include <dt-bindings/pinctrl/sun4i-a10.h> > + > +/ { > + model = "Xunlong Orange Pi Zero"; > + compatible = "xunlong,orangepi-zero", "allwinner,sun8i-h2plus"; > + > + aliases { > + serial0 = &uart0; > + }; > + > + chosen { > + stdout-path = "serial0:115200n8"; > + }; > + > + leds { > + compatible = "gpio-leds"; > + pinctrl-names = "default"; > + pinctrl-0 = <&leds_opi0>, <&leds_r_opi0>; > + > + pwr_led { > + label = "orangepi:green:pwr"; > + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; > + default-state = "on"; > + }; > + > + status_led { > + label = "orangepi:red:status"; > + gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; > + }; > + }; > +}; > + > +&ehci1 { > + status = "okay"; > +}; > + > +&mmc0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; > + vmmc-supply = <®_vcc3v3>; > + bus-width = <4>; > + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ > + cd-inverted; > + status = "okay"; > +}; > + > +&ohci1 { > + status = "okay"; > +}; > + > +&pio { > + leds_opi0: led_pins@0 { > + pins = "PA17"; > + function = "gpio_out"; > + }; > +}; > + > +&r_pio { > + leds_r_opi0: led_pins@0 { > + pins = "PL10"; > + function = "gpio_out"; > + }; > +}; > + > +&uart0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&uart0_pins_a>; > + status = "okay"; > +}; > + > +&uart1 { > + pinctrl-names = "default"; > + pinctrl-0 = <&uart1_pins>; > + status = "disabled"; > +}; > + > +&uart2 { > + pinctrl-names = "default"; > + pinctrl-0 = <&uart2_pins>; > + status = "disabled"; > +}; I'm not sure you answered me on this one. Are those exposed on the headers? why did you put them as disabled here? Thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 801 bytes --] [-- Attachment #2: Type: text/plain, Size: 176 bytes --] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v2 2/3] ARM: dts: sunxi: add support for Orange Pi Zero board 2016-11-23 7:57 ` Maxime Ripard @ 2016-11-23 9:23 ` Andre Przywara [not found] ` <a4393a37-5008-ec76-9886-05f8686dadd5-5wv7dgnIgG8@public.gmane.org> 0 siblings, 1 reply; 24+ messages in thread From: Andre Przywara @ 2016-11-23 9:23 UTC (permalink / raw) To: Maxime Ripard, Icenowy Zheng Cc: Mark Rutland, devicetree, Vishnu Patekar, Arnd Bergmann, Jonathan Corbet, linux-doc, Russell King, linux-kernel, Hans de Goede, Chen-Yu Tsai, linux-arm-kernel Hi Maxime, On 23/11/16 07:57, Maxime Ripard wrote: > On Tue, Nov 22, 2016 at 12:24:20AM +0800, Icenowy Zheng wrote: >> Orange Pi Zero is a board that came with the new Allwinner H2+ SoC. >> >> Add a device tree file for it. >> >> Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> >> --- >> Changes since v2: >> - Use generic pinconf binding instead of legacy allwinner pinctrl binding. >> - removed uart3, which is not accessible on Orange Pi Zero. >> - Removed sun8i-h2plus.dtsi and make Orange Pi Zero dts directly include >> sun8i-h3.dtsi. >> - Removed allwinner,sun8i-h3 compatible. >> >> arch/arm/boot/dts/Makefile | 1 + >> arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts | 137 +++++++++++++++++++++++ > > Ditto, h2-plus-orangepi-zero. > >> 2 files changed, 138 insertions(+) >> create mode 100644 arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts >> >> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile >> index 802a10d..51a1dd7 100644 >> --- a/arch/arm/boot/dts/Makefile >> +++ b/arch/arm/boot/dts/Makefile >> @@ -834,6 +834,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ >> sun8i-a33-sinlinx-sina33.dtb \ >> sun8i-a83t-allwinner-h8homlet-v2.dtb \ >> sun8i-a83t-cubietruck-plus.dtb \ >> + sun8i-h2plus-orangepi-zero.dtb \ >> sun8i-h3-bananapi-m2-plus.dtb \ >> sun8i-h3-nanopi-neo.dtb \ >> sun8i-h3-orangepi-2.dtb \ >> diff --git a/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts >> new file mode 100644 >> index 0000000..b428e47 >> --- /dev/null >> +++ b/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts >> @@ -0,0 +1,137 @@ >> +/* >> + * Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz> >> + * >> + * Based on sun8i-h3-orangepi-one.dts, which is: >> + * Copyright (C) 2016 Hans de Goede <hdegoede@redhat.com> >> + * >> + * This file is dual-licensed: you can use it either under the terms >> + * of the GPL or the X11 license, at your option. Note that this dual >> + * licensing only applies to this file, and not this project as a >> + * whole. >> + * >> + * a) This file is free software; you can redistribute it and/or >> + * modify it under the terms of the GNU General Public License as >> + * published by the Free Software Foundation; either version 2 of the >> + * License, or (at your option) any later version. >> + * >> + * This file is distributed in the hope that it will be useful, >> + * but WITHOUT ANY WARRANTY; without even the implied warranty of >> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> + * GNU General Public License for more details. >> + * >> + * Or, alternatively, >> + * >> + * b) Permission is hereby granted, free of charge, to any person >> + * obtaining a copy of this software and associated documentation >> + * files (the "Software"), to deal in the Software without >> + * restriction, including without limitation the rights to use, >> + * copy, modify, merge, publish, distribute, sublicense, and/or >> + * sell copies of the Software, and to permit persons to whom the >> + * Software is furnished to do so, subject to the following >> + * conditions: >> + * >> + * The above copyright notice and this permission notice shall be >> + * included in all copies or substantial portions of the Software. >> + * >> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, >> + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES >> + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND >> + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT >> + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, >> + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING >> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR >> + * OTHER DEALINGS IN THE SOFTWARE. >> + */ >> + >> +/dts-v1/; >> +#include "sun8i-h3.dtsi" >> +#include "sunxi-common-regulators.dtsi" >> + >> +#include <dt-bindings/gpio/gpio.h> >> +#include <dt-bindings/input/input.h> >> +#include <dt-bindings/pinctrl/sun4i-a10.h> >> + >> +/ { >> + model = "Xunlong Orange Pi Zero"; >> + compatible = "xunlong,orangepi-zero", "allwinner,sun8i-h2plus"; >> + >> + aliases { >> + serial0 = &uart0; >> + }; >> + >> + chosen { >> + stdout-path = "serial0:115200n8"; >> + }; >> + >> + leds { >> + compatible = "gpio-leds"; >> + pinctrl-names = "default"; >> + pinctrl-0 = <&leds_opi0>, <&leds_r_opi0>; >> + >> + pwr_led { >> + label = "orangepi:green:pwr"; >> + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; >> + default-state = "on"; >> + }; >> + >> + status_led { >> + label = "orangepi:red:status"; >> + gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; >> + }; >> + }; >> +}; >> + >> +&ehci1 { >> + status = "okay"; >> +}; >> + >> +&mmc0 { >> + pinctrl-names = "default"; >> + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; >> + vmmc-supply = <®_vcc3v3>; >> + bus-width = <4>; >> + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ >> + cd-inverted; >> + status = "okay"; >> +}; >> + >> +&ohci1 { >> + status = "okay"; >> +}; >> + >> +&pio { >> + leds_opi0: led_pins@0 { >> + pins = "PA17"; >> + function = "gpio_out"; >> + }; >> +}; >> + >> +&r_pio { >> + leds_r_opi0: led_pins@0 { >> + pins = "PL10"; >> + function = "gpio_out"; >> + }; >> +}; >> + >> +&uart0 { >> + pinctrl-names = "default"; >> + pinctrl-0 = <&uart0_pins_a>; >> + status = "okay"; >> +}; >> + >> +&uart1 { >> + pinctrl-names = "default"; >> + pinctrl-0 = <&uart1_pins>; >> + status = "disabled"; >> +}; >> + >> +&uart2 { >> + pinctrl-names = "default"; >> + pinctrl-0 = <&uart2_pins>; >> + status = "disabled"; >> +}; > > I'm not sure you answered me on this one. Are those exposed on the > headers? why did you put them as disabled here? So they are on headers, though you have to solder the actual header pins yourself [1]. But also these are the normal pins multiplexed with GPIOs and other peripherals, so keeping them disabled is in line with the existing policy, if I got this correctly. I agree that the status="disabled" is redundant, since we have that exact line already in the .dtsi. But I saw it in other DTs as well, most prominently in the sun8i-h3-orangepi-one.dts. So I think we should remove the "status=" lines here, dtc will generate an identical dtb out of it. But we should keep the uart descriptions in to make it easier for users to see which SoC pins are used for these pins labeled UART[012] in the board description and schematic. Also all it takes to enable those is to overwrite the status property, which can easily be done inline (without resizing the dtb). Cheers, Andre. [1] http://linux-sunxi.org/Xunlong_Orange_Pi_Zero ^ permalink raw reply [flat|nested] 24+ messages in thread
[parent not found: <a4393a37-5008-ec76-9886-05f8686dadd5-5wv7dgnIgG8@public.gmane.org>]
* Re: [PATCH v2 2/3] ARM: dts: sunxi: add support for Orange Pi Zero board [not found] ` <a4393a37-5008-ec76-9886-05f8686dadd5-5wv7dgnIgG8@public.gmane.org> @ 2016-11-24 21:29 ` Maxime Ripard 0 siblings, 0 replies; 24+ messages in thread From: Maxime Ripard @ 2016-11-24 21:29 UTC (permalink / raw) To: Andre Przywara Cc: Icenowy Zheng, Jonathan Corbet, Chen-Yu Tsai, Mark Rutland, Russell King, Hans de Goede, Vishnu Patekar, Arnd Bergmann, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 7753 bytes --] On Wed, Nov 23, 2016 at 09:23:49AM +0000, Andre Przywara wrote: > Hi Maxime, > > On 23/11/16 07:57, Maxime Ripard wrote: > > On Tue, Nov 22, 2016 at 12:24:20AM +0800, Icenowy Zheng wrote: > >> Orange Pi Zero is a board that came with the new Allwinner H2+ SoC. > >> > >> Add a device tree file for it. > >> > >> Signed-off-by: Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org> > >> --- > >> Changes since v2: > >> - Use generic pinconf binding instead of legacy allwinner pinctrl binding. > >> - removed uart3, which is not accessible on Orange Pi Zero. > >> - Removed sun8i-h2plus.dtsi and make Orange Pi Zero dts directly include > >> sun8i-h3.dtsi. > >> - Removed allwinner,sun8i-h3 compatible. > >> > >> arch/arm/boot/dts/Makefile | 1 + > >> arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts | 137 +++++++++++++++++++++++ > > > > Ditto, h2-plus-orangepi-zero. > > > >> 2 files changed, 138 insertions(+) > >> create mode 100644 arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts > >> > >> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > >> index 802a10d..51a1dd7 100644 > >> --- a/arch/arm/boot/dts/Makefile > >> +++ b/arch/arm/boot/dts/Makefile > >> @@ -834,6 +834,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ > >> sun8i-a33-sinlinx-sina33.dtb \ > >> sun8i-a83t-allwinner-h8homlet-v2.dtb \ > >> sun8i-a83t-cubietruck-plus.dtb \ > >> + sun8i-h2plus-orangepi-zero.dtb \ > >> sun8i-h3-bananapi-m2-plus.dtb \ > >> sun8i-h3-nanopi-neo.dtb \ > >> sun8i-h3-orangepi-2.dtb \ > >> diff --git a/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts > >> new file mode 100644 > >> index 0000000..b428e47 > >> --- /dev/null > >> +++ b/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts > >> @@ -0,0 +1,137 @@ > >> +/* > >> + * Copyright (C) 2016 Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org> > >> + * > >> + * Based on sun8i-h3-orangepi-one.dts, which is: > >> + * Copyright (C) 2016 Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > >> + * > >> + * This file is dual-licensed: you can use it either under the terms > >> + * of the GPL or the X11 license, at your option. Note that this dual > >> + * licensing only applies to this file, and not this project as a > >> + * whole. > >> + * > >> + * a) This file is free software; you can redistribute it and/or > >> + * modify it under the terms of the GNU General Public License as > >> + * published by the Free Software Foundation; either version 2 of the > >> + * License, or (at your option) any later version. > >> + * > >> + * This file is distributed in the hope that it will be useful, > >> + * but WITHOUT ANY WARRANTY; without even the implied warranty of > >> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > >> + * GNU General Public License for more details. > >> + * > >> + * Or, alternatively, > >> + * > >> + * b) Permission is hereby granted, free of charge, to any person > >> + * obtaining a copy of this software and associated documentation > >> + * files (the "Software"), to deal in the Software without > >> + * restriction, including without limitation the rights to use, > >> + * copy, modify, merge, publish, distribute, sublicense, and/or > >> + * sell copies of the Software, and to permit persons to whom the > >> + * Software is furnished to do so, subject to the following > >> + * conditions: > >> + * > >> + * The above copyright notice and this permission notice shall be > >> + * included in all copies or substantial portions of the Software. > >> + * > >> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, > >> + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES > >> + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND > >> + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT > >> + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, > >> + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING > >> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR > >> + * OTHER DEALINGS IN THE SOFTWARE. > >> + */ > >> + > >> +/dts-v1/; > >> +#include "sun8i-h3.dtsi" > >> +#include "sunxi-common-regulators.dtsi" > >> + > >> +#include <dt-bindings/gpio/gpio.h> > >> +#include <dt-bindings/input/input.h> > >> +#include <dt-bindings/pinctrl/sun4i-a10.h> > >> + > >> +/ { > >> + model = "Xunlong Orange Pi Zero"; > >> + compatible = "xunlong,orangepi-zero", "allwinner,sun8i-h2plus"; > >> + > >> + aliases { > >> + serial0 = &uart0; > >> + }; > >> + > >> + chosen { > >> + stdout-path = "serial0:115200n8"; > >> + }; > >> + > >> + leds { > >> + compatible = "gpio-leds"; > >> + pinctrl-names = "default"; > >> + pinctrl-0 = <&leds_opi0>, <&leds_r_opi0>; > >> + > >> + pwr_led { > >> + label = "orangepi:green:pwr"; > >> + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; > >> + default-state = "on"; > >> + }; > >> + > >> + status_led { > >> + label = "orangepi:red:status"; > >> + gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; > >> + }; > >> + }; > >> +}; > >> + > >> +&ehci1 { > >> + status = "okay"; > >> +}; > >> + > >> +&mmc0 { > >> + pinctrl-names = "default"; > >> + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; > >> + vmmc-supply = <®_vcc3v3>; > >> + bus-width = <4>; > >> + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ > >> + cd-inverted; > >> + status = "okay"; > >> +}; > >> + > >> +&ohci1 { > >> + status = "okay"; > >> +}; > >> + > >> +&pio { > >> + leds_opi0: led_pins@0 { > >> + pins = "PA17"; > >> + function = "gpio_out"; > >> + }; > >> +}; > >> + > >> +&r_pio { > >> + leds_r_opi0: led_pins@0 { > >> + pins = "PL10"; > >> + function = "gpio_out"; > >> + }; > >> +}; > >> + > >> +&uart0 { > >> + pinctrl-names = "default"; > >> + pinctrl-0 = <&uart0_pins_a>; > >> + status = "okay"; > >> +}; > >> + > >> +&uart1 { > >> + pinctrl-names = "default"; > >> + pinctrl-0 = <&uart1_pins>; > >> + status = "disabled"; > >> +}; > >> + > >> +&uart2 { > >> + pinctrl-names = "default"; > >> + pinctrl-0 = <&uart2_pins>; > >> + status = "disabled"; > >> +}; > > > > I'm not sure you answered me on this one. Are those exposed on the > > headers? why did you put them as disabled here? > > So they are on headers, though you have to solder the actual header pins > yourself [1]. But also these are the normal pins multiplexed with GPIOs > and other peripherals, so keeping them disabled is in line with the > existing policy, if I got this correctly. > > I agree that the status="disabled" is redundant, since we have that > exact line already in the .dtsi. But I saw it in other DTs as well, most > prominently in the sun8i-h3-orangepi-one.dts. > > So I think we should remove the "status=" lines here, dtc will generate > an identical dtb out of it. But we should keep the uart descriptions in > to make it easier for users to see which SoC pins are used for these > pins labeled UART[012] in the board description and schematic. Also all > it takes to enable those is to overwrite the status property, which can > easily be done inline (without resizing the dtb). I'd rather have the status still in the DTS. It's true that it's redundant, but it's also explicit. A node without any status would give the impression that it is actually enabled, especially since a node without a status is going to be probed. Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 801 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v2 2/3] ARM: dts: sunxi: add support for Orange Pi Zero board 2016-11-21 16:24 ` [PATCH v2 2/3] ARM: dts: sunxi: add support for Orange Pi Zero board Icenowy Zheng 2016-11-23 7:57 ` Maxime Ripard @ 2016-11-27 9:36 ` Icenowy Zheng 2016-11-28 0:29 ` André Przywara 1 sibling, 1 reply; 24+ messages in thread From: Icenowy Zheng @ 2016-11-27 9:36 UTC (permalink / raw) To: Jonathan Corbet, Maxime Ripard, Chen-Yu Tsai, Mark Rutland, Russell King, Hans de Goede Cc: devicetree@vger.kernel.org, Vishnu Patekar, Arnd Bergmann, linux-doc@vger.kernel.org, Andre Przywara, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 22.11.2016, 00:26, "Icenowy Zheng" <icenowy@aosc.xyz>: > Orange Pi Zero is a board that came with the new Allwinner H2+ SoC. > > Add a device tree file for it. > > Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> > --- > Changes since v2: > - Use generic pinconf binding instead of legacy allwinner pinctrl binding. > - removed uart3, which is not accessible on Orange Pi Zero. > - Removed sun8i-h2plus.dtsi and make Orange Pi Zero dts directly include > sun8i-h3.dtsi. > - Removed allwinner,sun8i-h3 compatible. > > arch/arm/boot/dts/Makefile | 1 + > arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts | 137 +++++++++++++++++++++++ > 2 files changed, 138 insertions(+) > create mode 100644 arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts > > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > index 802a10d..51a1dd7 100644 > --- a/arch/arm/boot/dts/Makefile > +++ b/arch/arm/boot/dts/Makefile > @@ -834,6 +834,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ > sun8i-a33-sinlinx-sina33.dtb \ > sun8i-a83t-allwinner-h8homlet-v2.dtb \ > sun8i-a83t-cubietruck-plus.dtb \ > + sun8i-h2plus-orangepi-zero.dtb \ > sun8i-h3-bananapi-m2-plus.dtb \ > sun8i-h3-nanopi-neo.dtb \ > sun8i-h3-orangepi-2.dtb \ > diff --git a/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts > new file mode 100644 > index 0000000..b428e47 > --- /dev/null > +++ b/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts > @@ -0,0 +1,137 @@ > +/* > + * Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz> > + * > + * Based on sun8i-h3-orangepi-one.dts, which is: > + * Copyright (C) 2016 Hans de Goede <hdegoede@redhat.com> > + * > + * This file is dual-licensed: you can use it either under the terms > + * of the GPL or the X11 license, at your option. Note that this dual > + * licensing only applies to this file, and not this project as a > + * whole. > + * > + * a) This file is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License as > + * published by the Free Software Foundation; either version 2 of the > + * License, or (at your option) any later version. > + * > + * This file is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * Or, alternatively, > + * > + * b) Permission is hereby granted, free of charge, to any person > + * obtaining a copy of this software and associated documentation > + * files (the "Software"), to deal in the Software without > + * restriction, including without limitation the rights to use, > + * copy, modify, merge, publish, distribute, sublicense, and/or > + * sell copies of the Software, and to permit persons to whom the > + * Software is furnished to do so, subject to the following > + * conditions: > + * > + * The above copyright notice and this permission notice shall be > + * included in all copies or substantial portions of the Software. > + * > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, > + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES > + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND > + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT > + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, > + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR > + * OTHER DEALINGS IN THE SOFTWARE. > + */ > + > +/dts-v1/; > +#include "sun8i-h3.dtsi" > +#include "sunxi-common-regulators.dtsi" > + > +#include <dt-bindings/gpio/gpio.h> > +#include <dt-bindings/input/input.h> > +#include <dt-bindings/pinctrl/sun4i-a10.h> > + > +/ { > + model = "Xunlong Orange Pi Zero"; > + compatible = "xunlong,orangepi-zero", "allwinner,sun8i-h2plus"; > + > + aliases { > + serial0 = &uart0; > + }; > + > + chosen { > + stdout-path = "serial0:115200n8"; > + }; > + > + leds { > + compatible = "gpio-leds"; > + pinctrl-names = "default"; > + pinctrl-0 = <&leds_opi0>, <&leds_r_opi0>; > + > + pwr_led { > + label = "orangepi:green:pwr"; > + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; > + default-state = "on"; > + }; > + > + status_led { > + label = "orangepi:red:status"; > + gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; > + }; > + }; > +}; > + > +&ehci1 { > + status = "okay"; > +}; > + > +&mmc0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; > + vmmc-supply = <®_vcc3v3>; > + bus-width = <4>; > + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ > + cd-inverted; > + status = "okay"; > +}; > + > +&ohci1 { > + status = "okay"; > +}; > + > +&pio { > + leds_opi0: led_pins@0 { > + pins = "PA17"; > + function = "gpio_out"; > + }; > +}; > + > +&r_pio { > + leds_r_opi0: led_pins@0 { > + pins = "PL10"; > + function = "gpio_out"; > + }; > +}; > + > +&uart0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&uart0_pins_a>; > + status = "okay"; > +}; > + > +&uart1 { > + pinctrl-names = "default"; > + pinctrl-0 = <&uart1_pins>; > + status = "disabled"; > +}; > + > +&uart2 { > + pinctrl-names = "default"; > + pinctrl-0 = <&uart2_pins>; > + status = "disabled"; > +}; > + > +&usbphy { > + /* USB VBUS is always on */ > + status = "okay"; > +}; Something more interesting happened. Xunlong made a add-on board for Orange Pi Zero, which exposes the two USB Controllers exported at expansion bus as USB Type-A connectors. Also it exposes a analog A/V jack and a microphone. Should I enable {e,o}hci{2.3} in the device tree? > -- > 2.10.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v2 2/3] ARM: dts: sunxi: add support for Orange Pi Zero board 2016-11-27 9:36 ` Icenowy Zheng @ 2016-11-28 0:29 ` André Przywara 2016-12-01 9:36 ` Maxime Ripard 0 siblings, 1 reply; 24+ messages in thread From: André Przywara @ 2016-11-28 0:29 UTC (permalink / raw) To: Icenowy Zheng, Jonathan Corbet, Maxime Ripard, Chen-Yu Tsai, Mark Rutland, Russell King, Hans de Goede Cc: devicetree@vger.kernel.org, Vishnu Patekar, Arnd Bergmann, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org On 27/11/16 09:36, Icenowy Zheng wrote: Hi, > 22.11.2016, 00:26, "Icenowy Zheng" <icenowy@aosc.xyz>: >> Orange Pi Zero is a board that came with the new Allwinner H2+ SoC. >> >> Add a device tree file for it. >> >> Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> >> --- >> Changes since v2: >> - Use generic pinconf binding instead of legacy allwinner pinctrl binding. >> - removed uart3, which is not accessible on Orange Pi Zero. >> - Removed sun8i-h2plus.dtsi and make Orange Pi Zero dts directly include >> sun8i-h3.dtsi. >> - Removed allwinner,sun8i-h3 compatible. >> >> arch/arm/boot/dts/Makefile | 1 + >> arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts | 137 +++++++++++++++++++++++ >> 2 files changed, 138 insertions(+) >> create mode 100644 arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts >> >> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile >> index 802a10d..51a1dd7 100644 >> --- a/arch/arm/boot/dts/Makefile >> +++ b/arch/arm/boot/dts/Makefile >> @@ -834,6 +834,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ >> sun8i-a33-sinlinx-sina33.dtb \ >> sun8i-a83t-allwinner-h8homlet-v2.dtb \ >> sun8i-a83t-cubietruck-plus.dtb \ >> + sun8i-h2plus-orangepi-zero.dtb \ >> sun8i-h3-bananapi-m2-plus.dtb \ >> sun8i-h3-nanopi-neo.dtb \ >> sun8i-h3-orangepi-2.dtb \ >> diff --git a/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts >> new file mode 100644 >> index 0000000..b428e47 >> --- /dev/null >> +++ b/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts >> @@ -0,0 +1,137 @@ >> +/* >> + * Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz> >> + * >> + * Based on sun8i-h3-orangepi-one.dts, which is: >> + * Copyright (C) 2016 Hans de Goede <hdegoede@redhat.com> >> + * >> + * This file is dual-licensed: you can use it either under the terms >> + * of the GPL or the X11 license, at your option. Note that this dual >> + * licensing only applies to this file, and not this project as a >> + * whole. >> + * >> + * a) This file is free software; you can redistribute it and/or >> + * modify it under the terms of the GNU General Public License as >> + * published by the Free Software Foundation; either version 2 of the >> + * License, or (at your option) any later version. >> + * >> + * This file is distributed in the hope that it will be useful, >> + * but WITHOUT ANY WARRANTY; without even the implied warranty of >> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> + * GNU General Public License for more details. >> + * >> + * Or, alternatively, >> + * >> + * b) Permission is hereby granted, free of charge, to any person >> + * obtaining a copy of this software and associated documentation >> + * files (the "Software"), to deal in the Software without >> + * restriction, including without limitation the rights to use, >> + * copy, modify, merge, publish, distribute, sublicense, and/or >> + * sell copies of the Software, and to permit persons to whom the >> + * Software is furnished to do so, subject to the following >> + * conditions: >> + * >> + * The above copyright notice and this permission notice shall be >> + * included in all copies or substantial portions of the Software. >> + * >> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, >> + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES >> + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND >> + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT >> + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, >> + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING >> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR >> + * OTHER DEALINGS IN THE SOFTWARE. >> + */ >> + >> +/dts-v1/; >> +#include "sun8i-h3.dtsi" >> +#include "sunxi-common-regulators.dtsi" >> + >> +#include <dt-bindings/gpio/gpio.h> >> +#include <dt-bindings/input/input.h> >> +#include <dt-bindings/pinctrl/sun4i-a10.h> >> + >> +/ { >> + model = "Xunlong Orange Pi Zero"; >> + compatible = "xunlong,orangepi-zero", "allwinner,sun8i-h2plus"; >> + >> + aliases { >> + serial0 = &uart0; >> + }; >> + >> + chosen { >> + stdout-path = "serial0:115200n8"; >> + }; >> + >> + leds { >> + compatible = "gpio-leds"; >> + pinctrl-names = "default"; >> + pinctrl-0 = <&leds_opi0>, <&leds_r_opi0>; >> + >> + pwr_led { >> + label = "orangepi:green:pwr"; >> + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; >> + default-state = "on"; >> + }; >> + >> + status_led { >> + label = "orangepi:red:status"; >> + gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; >> + }; >> + }; >> +}; >> + >> +&ehci1 { >> + status = "okay"; >> +}; >> + >> +&mmc0 { >> + pinctrl-names = "default"; >> + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; >> + vmmc-supply = <®_vcc3v3>; >> + bus-width = <4>; >> + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ >> + cd-inverted; >> + status = "okay"; >> +}; >> + >> +&ohci1 { >> + status = "okay"; >> +}; >> + >> +&pio { >> + leds_opi0: led_pins@0 { >> + pins = "PA17"; >> + function = "gpio_out"; >> + }; >> +}; >> + >> +&r_pio { >> + leds_r_opi0: led_pins@0 { >> + pins = "PL10"; >> + function = "gpio_out"; >> + }; >> +}; >> + >> +&uart0 { >> + pinctrl-names = "default"; >> + pinctrl-0 = <&uart0_pins_a>; >> + status = "okay"; >> +}; >> + >> +&uart1 { >> + pinctrl-names = "default"; >> + pinctrl-0 = <&uart1_pins>; >> + status = "disabled"; >> +}; >> + >> +&uart2 { >> + pinctrl-names = "default"; >> + pinctrl-0 = <&uart2_pins>; >> + status = "disabled"; >> +}; >> + >> +&usbphy { >> + /* USB VBUS is always on */ >> + status = "okay"; >> +}; > > Something more interesting happened. > > Xunlong made a add-on board for Orange Pi Zero, which exposes the two USB Controllers exported at expansion bus as USB Type-A connectors. > > Also it exposes a analog A/V jack and a microphone. > > Should I enable {e,o}hci{2.3} in the device tree? Actually we should do this regardless of this extension board. The USB pins are not multiplexed and are exposed on user accessible pins (just not soldered, but that's a detail), so I think they qualify for DT enablement. And even if a user can't use them, it doesn't hurt to have them (since they are not multiplexed). Cheers, Andre. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v2 2/3] ARM: dts: sunxi: add support for Orange Pi Zero board 2016-11-28 0:29 ` André Przywara @ 2016-12-01 9:36 ` Maxime Ripard 2016-12-02 14:22 ` Icenowy Zheng 0 siblings, 1 reply; 24+ messages in thread From: Maxime Ripard @ 2016-12-01 9:36 UTC (permalink / raw) To: André Przywara Cc: Mark Rutland, devicetree@vger.kernel.org, Vishnu Patekar, Arnd Bergmann, Jonathan Corbet, linux-doc@vger.kernel.org, Russell King, linux-kernel@vger.kernel.org, Hans de Goede, Chen-Yu Tsai, Icenowy Zheng, linux-arm-kernel@lists.infradead.org [-- Attachment #1.1: Type: text/plain, Size: 1083 bytes --] On Mon, Nov 28, 2016 at 12:29:07AM +0000, André Przywara wrote: > > Something more interesting happened. > > > > Xunlong made a add-on board for Orange Pi Zero, which exposes the > > two USB Controllers exported at expansion bus as USB Type-A > > connectors. > > > > Also it exposes a analog A/V jack and a microphone. > > > > Should I enable {e,o}hci{2.3} in the device tree? > > Actually we should do this regardless of this extension board. The USB > pins are not multiplexed and are exposed on user accessible pins (just > not soldered, but that's a detail), so I think they qualify for DT > enablement. And even if a user can't use them, it doesn't hurt to have > them (since they are not multiplexed). My main concern about this is that we'll leave regulators enabled by default, for a minority of users. And that minority will prevent to do a proper power management when the times come since we'll have to keep that behaviour forever. Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 801 bytes --] [-- Attachment #2: Type: text/plain, Size: 176 bytes --] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v2 2/3] ARM: dts: sunxi: add support for Orange Pi Zero board 2016-12-01 9:36 ` Maxime Ripard @ 2016-12-02 14:22 ` Icenowy Zheng 2016-12-02 14:30 ` Hans de Goede 2016-12-05 8:52 ` Maxime Ripard 0 siblings, 2 replies; 24+ messages in thread From: Icenowy Zheng @ 2016-12-02 14:22 UTC (permalink / raw) To: Maxime Ripard, André Przywara Cc: Mark Rutland, devicetree@vger.kernel.org, Vishnu Patekar, Arnd Bergmann, Jonathan Corbet, linux-doc@vger.kernel.org, Russell King, linux-kernel@vger.kernel.org, Hans de Goede, Chen-Yu Tsai, linux-arm-kernel@lists.infradead.org 01.12.2016, 17:36, "Maxime Ripard" <maxime.ripard@free-electrons.com>: > On Mon, Nov 28, 2016 at 12:29:07AM +0000, André Przywara wrote: >> > Something more interesting happened. >> > >> > Xunlong made a add-on board for Orange Pi Zero, which exposes the >> > two USB Controllers exported at expansion bus as USB Type-A >> > connectors. >> > >> > Also it exposes a analog A/V jack and a microphone. >> > >> > Should I enable {e,o}hci{2.3} in the device tree? >> >> Actually we should do this regardless of this extension board. The USB >> pins are not multiplexed and are exposed on user accessible pins (just >> not soldered, but that's a detail), so I think they qualify for DT >> enablement. And even if a user can't use them, it doesn't hurt to have >> them (since they are not multiplexed). > > My main concern about this is that we'll leave regulators enabled by > default, for a minority of users. And that minority will prevent to do > a proper power management when the times come since we'll have to keep > that behaviour forever. I think these users can add a 'fdt set /xxx/xxx status "disabled" ' . > > Maxime > > -- > Maxime Ripard, Free Electrons > Embedded Linux and Kernel engineering > http://free-electrons.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v2 2/3] ARM: dts: sunxi: add support for Orange Pi Zero board 2016-12-02 14:22 ` Icenowy Zheng @ 2016-12-02 14:30 ` Hans de Goede 2016-12-02 14:32 ` Icenowy Zheng 2016-12-05 8:52 ` Maxime Ripard 1 sibling, 1 reply; 24+ messages in thread From: Hans de Goede @ 2016-12-02 14:30 UTC (permalink / raw) To: Icenowy Zheng, Maxime Ripard, André Przywara Cc: Mark Rutland, devicetree@vger.kernel.org, Vishnu Patekar, Arnd Bergmann, Jonathan Corbet, linux-doc@vger.kernel.org, Russell King, linux-kernel@vger.kernel.org, Chen-Yu Tsai, linux-arm-kernel@lists.infradead.org Hi, On 02-12-16 15:22, Icenowy Zheng wrote: > > > 01.12.2016, 17:36, "Maxime Ripard" <maxime.ripard@free-electrons.com>: >> On Mon, Nov 28, 2016 at 12:29:07AM +0000, André Przywara wrote: >>> > Something more interesting happened. >>> > >>> > Xunlong made a add-on board for Orange Pi Zero, which exposes the >>> > two USB Controllers exported at expansion bus as USB Type-A >>> > connectors. >>> > >>> > Also it exposes a analog A/V jack and a microphone. >>> > >>> > Should I enable {e,o}hci{2.3} in the device tree? >>> >>> Actually we should do this regardless of this extension board. The USB >>> pins are not multiplexed and are exposed on user accessible pins (just >>> not soldered, but that's a detail), so I think they qualify for DT >>> enablement. And even if a user can't use them, it doesn't hurt to have >>> them (since they are not multiplexed). >> >> My main concern about this is that we'll leave regulators enabled by >> default, for a minority of users. And that minority will prevent to do >> a proper power management when the times come since we'll have to keep >> that behaviour forever. > > I think these users can add a 'fdt set /xxx/xxx status "disabled" ' . I don't think that will be necessary I'm pretty sure these extra usb ports do not have a regulator for the Vbus, they just hook directly to the 5V rail, can someone with a schematic check ? Regards, Hans _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v2 2/3] ARM: dts: sunxi: add support for Orange Pi Zero board 2016-12-02 14:30 ` Hans de Goede @ 2016-12-02 14:32 ` Icenowy Zheng 2016-12-02 16:10 ` Andre Przywara 0 siblings, 1 reply; 24+ messages in thread From: Icenowy Zheng @ 2016-12-02 14:32 UTC (permalink / raw) To: Hans de Goede, Maxime Ripard, André Przywara Cc: Mark Rutland, devicetree@vger.kernel.org, Vishnu Patekar, Arnd Bergmann, Jonathan Corbet, linux-doc@vger.kernel.org, Russell King, linux-kernel@vger.kernel.org, Chen-Yu Tsai, linux-arm-kernel@lists.infradead.org 02.12.2016, 22:30, "Hans de Goede" <hdegoede@redhat.com>: > Hi, > > On 02-12-16 15:22, Icenowy Zheng wrote: >> 01.12.2016, 17:36, "Maxime Ripard" <maxime.ripard@free-electrons.com>: >>> On Mon, Nov 28, 2016 at 12:29:07AM +0000, André Przywara wrote: >>>> > Something more interesting happened. >>>> > >>>> > Xunlong made a add-on board for Orange Pi Zero, which exposes the >>>> > two USB Controllers exported at expansion bus as USB Type-A >>>> > connectors. >>>> > >>>> > Also it exposes a analog A/V jack and a microphone. >>>> > >>>> > Should I enable {e,o}hci{2.3} in the device tree? >>>> >>>> Actually we should do this regardless of this extension board. The USB >>>> pins are not multiplexed and are exposed on user accessible pins (just >>>> not soldered, but that's a detail), so I think they qualify for DT >>>> enablement. And even if a user can't use them, it doesn't hurt to have >>>> them (since they are not multiplexed). >>> >>> My main concern about this is that we'll leave regulators enabled by >>> default, for a minority of users. And that minority will prevent to do >>> a proper power management when the times come since we'll have to keep >>> that behaviour forever. >> >> I think these users can add a 'fdt set /xxx/xxx status "disabled" ' . > > I don't think that will be necessary I'm pretty sure these extra usb > ports do not have a regulator for the Vbus, they just hook directly > to the 5V rail, can someone with a schematic check ? We seems to have still no schematics for the add-on board. But something is sure is that there's no any regulator-related pins on the add-on pinout. There's only USB DM and DP pins. So the Vbus must be directly connected to +5V. > > Regards, > > Hans _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v2 2/3] ARM: dts: sunxi: add support for Orange Pi Zero board 2016-12-02 14:32 ` Icenowy Zheng @ 2016-12-02 16:10 ` Andre Przywara 2016-12-02 16:37 ` Chen-Yu Tsai 2016-12-05 9:05 ` Maxime Ripard 0 siblings, 2 replies; 24+ messages in thread From: Andre Przywara @ 2016-12-02 16:10 UTC (permalink / raw) To: Icenowy Zheng, Hans de Goede, Maxime Ripard Cc: Mark Rutland, devicetree@vger.kernel.org, Vishnu Patekar, Arnd Bergmann, Jonathan Corbet, linux-doc@vger.kernel.org, Russell King, linux-kernel@vger.kernel.org, Chen-Yu Tsai, linux-arm-kernel@lists.infradead.org Hi, On 02/12/16 14:32, Icenowy Zheng wrote: > > > 02.12.2016, 22:30, "Hans de Goede" <hdegoede@redhat.com>: >> Hi, >> >> On 02-12-16 15:22, Icenowy Zheng wrote: >>> 01.12.2016, 17:36, "Maxime Ripard" <maxime.ripard@free-electrons.com>: >>>> On Mon, Nov 28, 2016 at 12:29:07AM +0000, André Przywara wrote: >>>>> > Something more interesting happened. >>>>> > >>>>> > Xunlong made a add-on board for Orange Pi Zero, which exposes the >>>>> > two USB Controllers exported at expansion bus as USB Type-A >>>>> > connectors. >>>>> > >>>>> > Also it exposes a analog A/V jack and a microphone. >>>>> > >>>>> > Should I enable {e,o}hci{2.3} in the device tree? >>>>> >>>>> Actually we should do this regardless of this extension board. The USB >>>>> pins are not multiplexed and are exposed on user accessible pins (just >>>>> not soldered, but that's a detail), so I think they qualify for DT >>>>> enablement. And even if a user can't use them, it doesn't hurt to have >>>>> them (since they are not multiplexed). >>>> >>>> My main concern about this is that we'll leave regulators enabled by >>>> default, for a minority of users. And that minority will prevent to do >>>> a proper power management when the times come since we'll have to keep >>>> that behaviour forever. >>> >>> I think these users can add a 'fdt set /xxx/xxx status "disabled" ' . >> >> I don't think that will be necessary I'm pretty sure these extra usb >> ports do not have a regulator for the Vbus, they just hook directly >> to the 5V rail, can someone with a schematic check ? > > We seems to have still no schematics for the add-on board. From looking at the picture of that expansion board on the Aliexpress page and chasing the tracks, there is clearly no voltage regulator on there, it's just passive components. The 5V pin from the headers is routed forth and back between the two layers via some vias directly to the 5V pins of the USB sockets. > But something is sure is that there's no any regulator-related pins > on the add-on pinout. There's only USB DM and DP pins. > > So the Vbus must be directly connected to +5V. So yes, it is. But I think the question is moot anyways, since we don't provide DT support for that add-on board at that point anyways. One could imagine another board, though, which has regulators switched by GPIOs, but that would be their problem and they would have regulators specified in their specific DT snippet, then. So to summarize: - For that specific Orange Pi Zero board which we discuss the DT for there is no regulator support for the additional USB ports. Thus nothing we could turn off to save power. - A user could just take these USB brackets with pin headers that are so common in PCs to connect additional USB ports to the back of the box. One just needs to re-sort the pins, which is a matter of a minute. - As long as we don't provide any easy way of handling DT changes, we should enable the USB ports for the sake of the users of either those brackets or the expansion board. Any more sophisticated USB expansion board with regulators would need to amend the DT anyway. Does that make sense? Cheers, Andre. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v2 2/3] ARM: dts: sunxi: add support for Orange Pi Zero board 2016-12-02 16:10 ` Andre Przywara @ 2016-12-02 16:37 ` Chen-Yu Tsai 2016-12-05 9:05 ` Maxime Ripard 1 sibling, 0 replies; 24+ messages in thread From: Chen-Yu Tsai @ 2016-12-02 16:37 UTC (permalink / raw) To: Andre Przywara Cc: Mark Rutland, devicetree@vger.kernel.org, Vishnu Patekar, Arnd Bergmann, Jonathan Corbet, linux-doc@vger.kernel.org, Russell King, linux-kernel@vger.kernel.org, Hans de Goede, Chen-Yu Tsai, Icenowy Zheng, Maxime Ripard, linux-arm-kernel@lists.infradead.org On Sat, Dec 3, 2016 at 12:10 AM, Andre Przywara <andre.przywara@arm.com> wrote: > Hi, > > On 02/12/16 14:32, Icenowy Zheng wrote: >> >> >> 02.12.2016, 22:30, "Hans de Goede" <hdegoede@redhat.com>: >>> Hi, >>> >>> On 02-12-16 15:22, Icenowy Zheng wrote: >>>> 01.12.2016, 17:36, "Maxime Ripard" <maxime.ripard@free-electrons.com>: >>>>> On Mon, Nov 28, 2016 at 12:29:07AM +0000, André Przywara wrote: >>>>>> > Something more interesting happened. >>>>>> > >>>>>> > Xunlong made a add-on board for Orange Pi Zero, which exposes the >>>>>> > two USB Controllers exported at expansion bus as USB Type-A >>>>>> > connectors. >>>>>> > >>>>>> > Also it exposes a analog A/V jack and a microphone. >>>>>> > >>>>>> > Should I enable {e,o}hci{2.3} in the device tree? >>>>>> >>>>>> Actually we should do this regardless of this extension board. The USB >>>>>> pins are not multiplexed and are exposed on user accessible pins (just >>>>>> not soldered, but that's a detail), so I think they qualify for DT >>>>>> enablement. And even if a user can't use them, it doesn't hurt to have >>>>>> them (since they are not multiplexed). >>>>> >>>>> My main concern about this is that we'll leave regulators enabled by >>>>> default, for a minority of users. And that minority will prevent to do >>>>> a proper power management when the times come since we'll have to keep >>>>> that behaviour forever. >>>> >>>> I think these users can add a 'fdt set /xxx/xxx status "disabled" ' . >>> >>> I don't think that will be necessary I'm pretty sure these extra usb >>> ports do not have a regulator for the Vbus, they just hook directly >>> to the 5V rail, can someone with a schematic check ? >> >> We seems to have still no schematics for the add-on board. > > From looking at the picture of that expansion board on the Aliexpress > page and chasing the tracks, there is clearly no voltage regulator on > there, it's just passive components. The 5V pin from the headers is > routed forth and back between the two layers via some vias directly to > the 5V pins of the USB sockets. > >> But something is sure is that there's no any regulator-related pins >> on the add-on pinout. There's only USB DM and DP pins. >> >> So the Vbus must be directly connected to +5V. > > So yes, it is. > > But I think the question is moot anyways, since we don't provide DT > support for that add-on board at that point anyways. > One could imagine another board, though, which has regulators switched > by GPIOs, but that would be their problem and they would have regulators > specified in their specific DT snippet, then. > > So to summarize: > - For that specific Orange Pi Zero board which we discuss the DT for > there is no regulator support for the additional USB ports. Thus nothing > we could turn off to save power. > - A user could just take these USB brackets with pin headers that are so > common in PCs to connect additional USB ports to the back of the box. > One just needs to re-sort the pins, which is a matter of a minute. > - As long as we don't provide any easy way of handling DT changes, we > should enable the USB ports for the sake of the users of either those > brackets or the expansion board. Any more sophisticated USB expansion > board with regulators would need to amend the DT anyway. > > Does that make sense? Sounds good to me. ChenYu _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v2 2/3] ARM: dts: sunxi: add support for Orange Pi Zero board 2016-12-02 16:10 ` Andre Przywara 2016-12-02 16:37 ` Chen-Yu Tsai @ 2016-12-05 9:05 ` Maxime Ripard 1 sibling, 0 replies; 24+ messages in thread From: Maxime Ripard @ 2016-12-05 9:05 UTC (permalink / raw) To: Andre Przywara Cc: Mark Rutland, devicetree@vger.kernel.org, Vishnu Patekar, Arnd Bergmann, Jonathan Corbet, linux-doc@vger.kernel.org, Russell King, linux-kernel@vger.kernel.org, Hans de Goede, Chen-Yu Tsai, Icenowy Zheng, linux-arm-kernel@lists.infradead.org [-- Attachment #1.1: Type: text/plain, Size: 3972 bytes --] On Fri, Dec 02, 2016 at 04:10:46PM +0000, Andre Przywara wrote: > Hi, > > On 02/12/16 14:32, Icenowy Zheng wrote: > > > > > > 02.12.2016, 22:30, "Hans de Goede" <hdegoede@redhat.com>: > >> Hi, > >> > >> On 02-12-16 15:22, Icenowy Zheng wrote: > >>> 01.12.2016, 17:36, "Maxime Ripard" <maxime.ripard@free-electrons.com>: > >>>> On Mon, Nov 28, 2016 at 12:29:07AM +0000, André Przywara wrote: > >>>>> > Something more interesting happened. > >>>>> > > >>>>> > Xunlong made a add-on board for Orange Pi Zero, which exposes the > >>>>> > two USB Controllers exported at expansion bus as USB Type-A > >>>>> > connectors. > >>>>> > > >>>>> > Also it exposes a analog A/V jack and a microphone. > >>>>> > > >>>>> > Should I enable {e,o}hci{2.3} in the device tree? > >>>>> > >>>>> Actually we should do this regardless of this extension board. The USB > >>>>> pins are not multiplexed and are exposed on user accessible pins (just > >>>>> not soldered, but that's a detail), so I think they qualify for DT > >>>>> enablement. And even if a user can't use them, it doesn't hurt to have > >>>>> them (since they are not multiplexed). > >>>> > >>>> My main concern about this is that we'll leave regulators enabled by > >>>> default, for a minority of users. And that minority will prevent to do > >>>> a proper power management when the times come since we'll have to keep > >>>> that behaviour forever. > >>> > >>> I think these users can add a 'fdt set /xxx/xxx status "disabled" ' . > >> > >> I don't think that will be necessary I'm pretty sure these extra usb > >> ports do not have a regulator for the Vbus, they just hook directly > >> to the 5V rail, can someone with a schematic check ? > > > > We seems to have still no schematics for the add-on board. > > From looking at the picture of that expansion board on the Aliexpress > page and chasing the tracks, there is clearly no voltage regulator on > there, it's just passive components. The 5V pin from the headers is > routed forth and back between the two layers via some vias directly to > the 5V pins of the USB sockets. > > > But something is sure is that there's no any regulator-related pins > > on the add-on pinout. There's only USB DM and DP pins. > > > > So the Vbus must be directly connected to +5V. > > So yes, it is. > > But I think the question is moot anyways, since we don't provide DT > support for that add-on board at that point anyways. > One could imagine another board, though, which has regulators switched > by GPIOs, but that would be their problem and they would have regulators > specified in their specific DT snippet, then. > > So to summarize: > - For that specific Orange Pi Zero board which we discuss the DT for > there is no regulator support for the additional USB ports. Thus nothing > we could turn off to save power. > - A user could just take these USB brackets with pin headers that are so > common in PCs to connect additional USB ports to the back of the box. > One just needs to re-sort the pins, which is a matter of a minute. > - As long as we don't provide any easy way of handling DT changes, we > should enable the USB ports for the sake of the users of either those > brackets or the expansion board. Any more sophisticated USB expansion > board with regulators would need to amend the DT anyway. I disagree with this. We already have different ways of changing the DT at runtime, and even if we didn't I'd still disagree. Once you add that, there's simply no going back. Saying "let's enable it and we'll figure it out later" doesn't work, and is essentially a "enable it". So what you're suggesting is to have those regulators enabled forever, which might be the case on that board anyway, but definitely shouldn't be policy. Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 801 bytes --] [-- Attachment #2: Type: text/plain, Size: 176 bytes --] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v2 2/3] ARM: dts: sunxi: add support for Orange Pi Zero board 2016-12-02 14:22 ` Icenowy Zheng 2016-12-02 14:30 ` Hans de Goede @ 2016-12-05 8:52 ` Maxime Ripard 1 sibling, 0 replies; 24+ messages in thread From: Maxime Ripard @ 2016-12-05 8:52 UTC (permalink / raw) To: Icenowy Zheng Cc: Mark Rutland, devicetree@vger.kernel.org, Vishnu Patekar, Arnd Bergmann, Jonathan Corbet, André Przywara, linux-doc@vger.kernel.org, Russell King, linux-kernel@vger.kernel.org, Hans de Goede, Chen-Yu Tsai, linux-arm-kernel@lists.infradead.org [-- Attachment #1.1: Type: text/plain, Size: 1694 bytes --] On Fri, Dec 02, 2016 at 10:22:30PM +0800, Icenowy Zheng wrote: > > > 01.12.2016, 17:36, "Maxime Ripard" <maxime.ripard@free-electrons.com>: > > On Mon, Nov 28, 2016 at 12:29:07AM +0000, André Przywara wrote: > >> > Something more interesting happened. > >> > > >> > Xunlong made a add-on board for Orange Pi Zero, which exposes the > >> > two USB Controllers exported at expansion bus as USB Type-A > >> > connectors. > >> > > >> > Also it exposes a analog A/V jack and a microphone. > >> > > >> > Should I enable {e,o}hci{2.3} in the device tree? > >> > >> Actually we should do this regardless of this extension board. The USB > >> pins are not multiplexed and are exposed on user accessible pins (just > >> not soldered, but that's a detail), so I think they qualify for DT > >> enablement. And even if a user can't use them, it doesn't hurt to have > >> them (since they are not multiplexed). > > > > My main concern about this is that we'll leave regulators enabled by > > default, for a minority of users. And that minority will prevent to do > > a proper power management when the times come since we'll have to keep > > that behaviour forever. > > I think these users can add a 'fdt set /xxx/xxx status "disabled" ' . You can't ask that from the majority of users. These users will take debian or fedora, install it, and expect everything to work properly. I would make the opposite argument actually. If someone is knowledgeable enough to solder the USB pins a connector, then (s)he'll be able to make that u-boot call. Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 801 bytes --] [-- Attachment #2: Type: text/plain, Size: 176 bytes --] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 3/3] ARM: dts: sunxi: enable SDIO Wi-Fi on Orange Pi Zero 2016-11-21 16:24 [PATCH v2 1/3] ARM: sunxi: add support for H2+ SoC Icenowy Zheng 2016-11-21 16:24 ` [PATCH v2 2/3] ARM: dts: sunxi: add support for Orange Pi Zero board Icenowy Zheng @ 2016-11-21 16:24 ` Icenowy Zheng 2016-11-23 7:59 ` Maxime Ripard 2016-11-23 7:54 ` [PATCH v2 1/3] ARM: sunxi: add support for H2+ SoC Maxime Ripard 2 siblings, 1 reply; 24+ messages in thread From: Icenowy Zheng @ 2016-11-21 16:24 UTC (permalink / raw) To: Jonathan Corbet, Maxime Ripard, Chen-Yu Tsai, Mark Rutland, Russell King, Hans de Goede Cc: devicetree, Vishnu Patekar, Arnd Bergmann, linux-doc, Andre Przywara, linux-kernel, Icenowy Zheng, linux-arm-kernel There's a Allwinner's XR819 SDIO Wi-Fi module soldered on the board of Orange Pi Zero, which used a dedicated regulator to power. Add the device tree node of the regulator, the enable gpio (with mmc-pwrseq) and the sdio controller. There's a out-of-tree driver tested to work with this device tree. Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> --- New patch in the patchset, since a out-of-tree working xradio driver is done. If there is any problem in this patch, it can be omitted. arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts | 42 ++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts index b428e47..39cac26 100644 --- a/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts +++ b/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts @@ -79,6 +79,24 @@ gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; }; }; + + reg_vcc_wifi: reg_vcc_wifi { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&vcc_wifi_pin_opi0>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-wifi"; + enable-active-high; + gpio = <&pio 0 20 GPIO_ACTIVE_HIGH>; + }; + + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_pwrseq_pin_opi0>; + reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; + }; }; &ehci1 { @@ -95,6 +113,20 @@ status = "okay"; }; +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins_a>; + vmmc-supply = <®_vcc_wifi>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; + status = "okay"; +}; + +&mmc1_pins_a { + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; +}; + &ohci1 { status = "okay"; }; @@ -104,6 +136,11 @@ pins = "PA17"; function = "gpio_out"; }; + + vcc_wifi_pin_opi0: vcc_wifi_pin@0 { + allwinner,pins = "PA20"; + allwinner,function = "gpio_out"; + }; }; &r_pio { @@ -111,6 +148,11 @@ pins = "PL10"; function = "gpio_out"; }; + + wifi_pwrseq_pin_opi0: wifi_pwrseq_pin@0 { + allwinner,pins = "PL7"; + allwinner,function = "gpio_out"; + }; }; &uart0 { -- 2.10.2 ^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH 3/3] ARM: dts: sunxi: enable SDIO Wi-Fi on Orange Pi Zero 2016-11-21 16:24 ` [PATCH 3/3] ARM: dts: sunxi: enable SDIO Wi-Fi on Orange Pi Zero Icenowy Zheng @ 2016-11-23 7:59 ` Maxime Ripard 2016-11-23 14:25 ` Chen-Yu Tsai 0 siblings, 1 reply; 24+ messages in thread From: Maxime Ripard @ 2016-11-23 7:59 UTC (permalink / raw) To: Icenowy Zheng Cc: Mark Rutland, devicetree, Vishnu Patekar, Arnd Bergmann, Jonathan Corbet, Andre Przywara, linux-doc, Russell King, linux-kernel, Hans de Goede, Chen-Yu Tsai, linux-arm-kernel [-- Attachment #1.1: Type: text/plain, Size: 2865 bytes --] Hi, On Tue, Nov 22, 2016 at 12:24:21AM +0800, Icenowy Zheng wrote: > There's a Allwinner's XR819 SDIO Wi-Fi module soldered on the board of > Orange Pi Zero, which used a dedicated regulator to power. > > Add the device tree node of the regulator, the enable gpio (with > mmc-pwrseq) and the sdio controller. > > There's a out-of-tree driver tested to work with this device tree. > > Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> > --- > New patch in the patchset, since a out-of-tree working xradio driver is done. > > If there is any problem in this patch, it can be omitted. No particular problem with this one, however it can and should be merged with the previous one. Minor comments below though. > > arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts | 42 ++++++++++++++++++++++++ > 1 file changed, 42 insertions(+) > > diff --git a/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts > index b428e47..39cac26 100644 > --- a/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts > +++ b/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts > @@ -79,6 +79,24 @@ > gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; > }; > }; > + > + reg_vcc_wifi: reg_vcc_wifi { > + compatible = "regulator-fixed"; > + pinctrl-names = "default"; > + pinctrl-0 = <&vcc_wifi_pin_opi0>; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-name = "vcc-wifi"; > + enable-active-high; > + gpio = <&pio 0 20 GPIO_ACTIVE_HIGH>; > + }; > + > + wifi_pwrseq: wifi_pwrseq { > + compatible = "mmc-pwrseq-simple"; > + pinctrl-names = "default"; > + pinctrl-0 = <&wifi_pwrseq_pin_opi0>; > + reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; > + }; > }; > > &ehci1 { > @@ -95,6 +113,20 @@ > status = "okay"; > }; > > +&mmc1 { > + pinctrl-names = "default"; > + pinctrl-0 = <&mmc1_pins_a>; > + vmmc-supply = <®_vcc_wifi>; > + mmc-pwrseq = <&wifi_pwrseq>; > + bus-width = <4>; > + non-removable; > + status = "okay"; > +}; > + > +&mmc1_pins_a { > + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; This should be bias-pull-up. > +}; > + > &ohci1 { > status = "okay"; > }; > @@ -104,6 +136,11 @@ > pins = "PA17"; > function = "gpio_out"; > }; > + > + vcc_wifi_pin_opi0: vcc_wifi_pin@0 { > + allwinner,pins = "PA20"; This should be pins > + allwinner,function = "gpio_out"; This should be function > + }; > }; > > &r_pio { > @@ -111,6 +148,11 @@ > pins = "PL10"; > function = "gpio_out"; > }; > + > + wifi_pwrseq_pin_opi0: wifi_pwrseq_pin@0 { > + allwinner,pins = "PL7"; > + allwinner,function = "gpio_out"; And same thing here. Thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 801 bytes --] [-- Attachment #2: Type: text/plain, Size: 176 bytes --] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 3/3] ARM: dts: sunxi: enable SDIO Wi-Fi on Orange Pi Zero 2016-11-23 7:59 ` Maxime Ripard @ 2016-11-23 14:25 ` Chen-Yu Tsai 2016-11-23 14:29 ` Hans de Goede 2016-11-24 21:30 ` Maxime Ripard 0 siblings, 2 replies; 24+ messages in thread From: Chen-Yu Tsai @ 2016-11-23 14:25 UTC (permalink / raw) To: Maxime Ripard Cc: Mark Rutland, devicetree, Vishnu Patekar, Arnd Bergmann, Jonathan Corbet, Andre Przywara, linux-doc@vger.kernel.org, Russell King, linux-kernel, Hans de Goede, Chen-Yu Tsai, Icenowy Zheng, linux-arm-kernel On Wed, Nov 23, 2016 at 3:59 PM, Maxime Ripard <maxime.ripard@free-electrons.com> wrote: > Hi, > > On Tue, Nov 22, 2016 at 12:24:21AM +0800, Icenowy Zheng wrote: >> There's a Allwinner's XR819 SDIO Wi-Fi module soldered on the board of >> Orange Pi Zero, which used a dedicated regulator to power. >> >> Add the device tree node of the regulator, the enable gpio (with >> mmc-pwrseq) and the sdio controller. >> >> There's a out-of-tree driver tested to work with this device tree. >> >> Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> >> --- >> New patch in the patchset, since a out-of-tree working xradio driver is done. >> >> If there is any problem in this patch, it can be omitted. > > No particular problem with this one, however it can and should be > merged with the previous one. > > Minor comments below though. > >> >> arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts | 42 ++++++++++++++++++++++++ >> 1 file changed, 42 insertions(+) >> >> diff --git a/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts >> index b428e47..39cac26 100644 >> --- a/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts >> +++ b/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts >> @@ -79,6 +79,24 @@ >> gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; >> }; >> }; >> + >> + reg_vcc_wifi: reg_vcc_wifi { >> + compatible = "regulator-fixed"; >> + pinctrl-names = "default"; >> + pinctrl-0 = <&vcc_wifi_pin_opi0>; >> + regulator-min-microvolt = <3300000>; >> + regulator-max-microvolt = <3300000>; >> + regulator-name = "vcc-wifi"; >> + enable-active-high; >> + gpio = <&pio 0 20 GPIO_ACTIVE_HIGH>; >> + }; >> + >> + wifi_pwrseq: wifi_pwrseq { >> + compatible = "mmc-pwrseq-simple"; >> + pinctrl-names = "default"; >> + pinctrl-0 = <&wifi_pwrseq_pin_opi0>; >> + reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; >> + }; >> }; >> >> &ehci1 { >> @@ -95,6 +113,20 @@ >> status = "okay"; >> }; >> >> +&mmc1 { >> + pinctrl-names = "default"; >> + pinctrl-0 = <&mmc1_pins_a>; >> + vmmc-supply = <®_vcc_wifi>; >> + mmc-pwrseq = <&wifi_pwrseq>; >> + bus-width = <4>; >> + non-removable; >> + status = "okay"; >> +}; >> + >> +&mmc1_pins_a { >> + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; > > This should be bias-pull-up. IIRC I already added this for _all_ existing mmc pinmux settings? > >> +}; >> + >> &ohci1 { >> status = "okay"; >> }; >> @@ -104,6 +136,11 @@ >> pins = "PA17"; >> function = "gpio_out"; >> }; >> + >> + vcc_wifi_pin_opi0: vcc_wifi_pin@0 { >> + allwinner,pins = "PA20"; > > This should be pins > >> + allwinner,function = "gpio_out"; > > This should be function > >> + }; >> }; >> >> &r_pio { >> @@ -111,6 +148,11 @@ >> pins = "PL10"; >> function = "gpio_out"; >> }; >> + >> + wifi_pwrseq_pin_opi0: wifi_pwrseq_pin@0 { >> + allwinner,pins = "PL7"; >> + allwinner,function = "gpio_out"; > > And same thing here. Might we do away with the pinmux for gpio pins tradition? Recent patches I've sent all omit them. ChenYu ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 3/3] ARM: dts: sunxi: enable SDIO Wi-Fi on Orange Pi Zero 2016-11-23 14:25 ` Chen-Yu Tsai @ 2016-11-23 14:29 ` Hans de Goede 2016-11-24 21:30 ` Maxime Ripard 1 sibling, 0 replies; 24+ messages in thread From: Hans de Goede @ 2016-11-23 14:29 UTC (permalink / raw) To: Chen-Yu Tsai, Maxime Ripard Cc: Mark Rutland, devicetree, Vishnu Patekar, Arnd Bergmann, Jonathan Corbet, Andre Przywara, linux-doc@vger.kernel.org, Russell King, linux-kernel, Icenowy Zheng, linux-arm-kernel Hi, On 23-11-16 15:25, Chen-Yu Tsai wrote: > On Wed, Nov 23, 2016 at 3:59 PM, Maxime Ripard > <maxime.ripard@free-electrons.com> wrote: >> Hi, >> >> On Tue, Nov 22, 2016 at 12:24:21AM +0800, Icenowy Zheng wrote: >>> There's a Allwinner's XR819 SDIO Wi-Fi module soldered on the board of >>> Orange Pi Zero, which used a dedicated regulator to power. >>> >>> Add the device tree node of the regulator, the enable gpio (with >>> mmc-pwrseq) and the sdio controller. >>> >>> There's a out-of-tree driver tested to work with this device tree. >>> >>> Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> >>> --- >>> New patch in the patchset, since a out-of-tree working xradio driver is done. >>> >>> If there is any problem in this patch, it can be omitted. >> >> No particular problem with this one, however it can and should be >> merged with the previous one. >> >> Minor comments below though. >> >>> >>> arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts | 42 ++++++++++++++++++++++++ >>> 1 file changed, 42 insertions(+) >>> >>> diff --git a/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts >>> index b428e47..39cac26 100644 >>> --- a/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts >>> +++ b/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts >>> @@ -79,6 +79,24 @@ >>> gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; >>> }; >>> }; >>> + >>> + reg_vcc_wifi: reg_vcc_wifi { >>> + compatible = "regulator-fixed"; >>> + pinctrl-names = "default"; >>> + pinctrl-0 = <&vcc_wifi_pin_opi0>; >>> + regulator-min-microvolt = <3300000>; >>> + regulator-max-microvolt = <3300000>; >>> + regulator-name = "vcc-wifi"; >>> + enable-active-high; >>> + gpio = <&pio 0 20 GPIO_ACTIVE_HIGH>; >>> + }; >>> + >>> + wifi_pwrseq: wifi_pwrseq { >>> + compatible = "mmc-pwrseq-simple"; >>> + pinctrl-names = "default"; >>> + pinctrl-0 = <&wifi_pwrseq_pin_opi0>; >>> + reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; >>> + }; >>> }; >>> >>> &ehci1 { >>> @@ -95,6 +113,20 @@ >>> status = "okay"; >>> }; >>> >>> +&mmc1 { >>> + pinctrl-names = "default"; >>> + pinctrl-0 = <&mmc1_pins_a>; >>> + vmmc-supply = <®_vcc_wifi>; >>> + mmc-pwrseq = <&wifi_pwrseq>; >>> + bus-width = <4>; >>> + non-removable; >>> + status = "okay"; >>> +}; >>> + >>> +&mmc1_pins_a { >>> + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; >> >> This should be bias-pull-up. > > IIRC I already added this for _all_ existing mmc pinmux settings? > >> >>> +}; >>> + >>> &ohci1 { >>> status = "okay"; >>> }; >>> @@ -104,6 +136,11 @@ >>> pins = "PA17"; >>> function = "gpio_out"; >>> }; >>> + >>> + vcc_wifi_pin_opi0: vcc_wifi_pin@0 { >>> + allwinner,pins = "PA20"; >> >> This should be pins >> >>> + allwinner,function = "gpio_out"; >> >> This should be function >> >>> + }; >>> }; >>> >>> &r_pio { >>> @@ -111,6 +148,11 @@ >>> pins = "PL10"; >>> function = "gpio_out"; >>> }; >>> + >>> + wifi_pwrseq_pin_opi0: wifi_pwrseq_pin@0 { >>> + allwinner,pins = "PL7"; >>> + allwinner,function = "gpio_out"; >> >> And same thing here. > > Might we do away with the pinmux for gpio pins tradition? > Recent patches I've sent all omit them. I'm in favor of doing away with them, except there were we need to configure bias / strength. Regards, Hans ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 3/3] ARM: dts: sunxi: enable SDIO Wi-Fi on Orange Pi Zero 2016-11-23 14:25 ` Chen-Yu Tsai 2016-11-23 14:29 ` Hans de Goede @ 2016-11-24 21:30 ` Maxime Ripard 1 sibling, 0 replies; 24+ messages in thread From: Maxime Ripard @ 2016-11-24 21:30 UTC (permalink / raw) To: Chen-Yu Tsai Cc: Mark Rutland, devicetree, Vishnu Patekar, Arnd Bergmann, Jonathan Corbet, Andre Przywara, linux-doc@vger.kernel.org, Russell King, linux-kernel, Hans de Goede, Icenowy Zheng, linux-arm-kernel [-- Attachment #1.1: Type: text/plain, Size: 645 bytes --] On Wed, Nov 23, 2016 at 10:25:57PM +0800, Chen-Yu Tsai wrote: > >> &r_pio { > >> @@ -111,6 +148,11 @@ > >> pins = "PL10"; > >> function = "gpio_out"; > >> }; > >> + > >> + wifi_pwrseq_pin_opi0: wifi_pwrseq_pin@0 { > >> + allwinner,pins = "PL7"; > >> + allwinner,function = "gpio_out"; > > > > And same thing here. > > Might we do away with the pinmux for gpio pins tradition? > Recent patches I've sent all omit them. Oh, yes, that's true. Thanks, Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 801 bytes --] [-- Attachment #2: Type: text/plain, Size: 176 bytes --] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v2 1/3] ARM: sunxi: add support for H2+ SoC 2016-11-21 16:24 [PATCH v2 1/3] ARM: sunxi: add support for H2+ SoC Icenowy Zheng 2016-11-21 16:24 ` [PATCH v2 2/3] ARM: dts: sunxi: add support for Orange Pi Zero board Icenowy Zheng 2016-11-21 16:24 ` [PATCH 3/3] ARM: dts: sunxi: enable SDIO Wi-Fi on Orange Pi Zero Icenowy Zheng @ 2016-11-23 7:54 ` Maxime Ripard 2 siblings, 0 replies; 24+ messages in thread From: Maxime Ripard @ 2016-11-23 7:54 UTC (permalink / raw) To: Icenowy Zheng Cc: Jonathan Corbet, Chen-Yu Tsai, Mark Rutland, Russell King, Hans de Goede, Vishnu Patekar, Andre Przywara, Arnd Bergmann, linux-doc, linux-arm-kernel, linux-kernel, devicetree [-- Attachment #1: Type: text/plain, Size: 1899 bytes --] Hi, On Tue, Nov 22, 2016 at 12:24:19AM +0800, Icenowy Zheng wrote: > Allwinner H2+ is a quad-core Cortex-A7 SoC. > > It is very like H3, that they share the same SoC ID (0x1680), and H3 > memory maps as well as drivers works well on the SoC. > > Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> > --- > Documentation/arm/sunxi/README | 4 ++++ > Documentation/devicetree/bindings/arm/sunxi.txt | 1 + > arch/arm/mach-sunxi/sunxi.c | 1 + > 3 files changed, 6 insertions(+) > > diff --git a/Documentation/arm/sunxi/README b/Documentation/arm/sunxi/README > index cd02433..1fe4d99c 100644 > --- a/Documentation/arm/sunxi/README > +++ b/Documentation/arm/sunxi/README > @@ -63,6 +63,10 @@ SunXi family > + User Manual > http://dl.linux-sunxi.org/A33/A33%20user%20manual%20release%201.1.pdf > > + - Allwinner H2+ (sun8i) > + + No document available now, but is known to be working properly with > + H3 drivers and memory map. > + I'm not sure the phrasing is right here. I would prefer something like: "No document publicly available now, but looks very similar to the H3" > - Allwinner H3 (sun8i) > + Datasheet > http://dl.linux-sunxi.org/H3/Allwinner_H3_Datasheet_V1.0.pdf > diff --git a/Documentation/devicetree/bindings/arm/sunxi.txt b/Documentation/devicetree/bindings/arm/sunxi.txt > index 4d6467c..26b35a7 100644 > --- a/Documentation/devicetree/bindings/arm/sunxi.txt > +++ b/Documentation/devicetree/bindings/arm/sunxi.txt > @@ -13,6 +13,7 @@ using one of the following compatible strings: > allwinner,sun8i-a33 > allwinner,sun8i-a83t > allwinner,sun8i-h3 > + allwinner,sun8i-h2plus h2-plus please. Thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 801 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
[parent not found: <20161129131922.JFbeipav@smtp2o.mail.yandex.net>]
* Re: [PATCH 3/3] ARM: dts: sunxi: enable SDIO Wi-Fi on Orange Pi Zero [not found] <20161129131922.JFbeipav@smtp2o.mail.yandex.net> @ 2016-11-30 2:11 ` Alexey Kardashevskiy 2016-11-30 9:25 ` Andre Przywara 1 sibling, 0 replies; 24+ messages in thread From: Alexey Kardashevskiy @ 2016-11-30 2:11 UTC (permalink / raw) To: Icenowy Zheng Cc: Mark Rutland, devicetree, Vishnu Patekar, Arnd Bergmann, linux-doc, Andre Przywara, Jonathan Corbet, Russell King, LKML, Hans de Goede, Chen-Yu Tsai, Maxime Ripard, linux-arm-kernel On 29/11/16 21:19, Icenowy Zheng wrote: > > 2016年11月29日 15:16于 Alexey Kardashevskiy <aik@ozlabs.ru>写道: >> >> >> >> On Wed, Nov 23, 2016 at 6:59 PM, Maxime Ripard > <maxime.ripard@free-electrons.com> wrote: >>> >>> Hi, >>> >>> On Tue, Nov 22, 2016 at 12:24:21AM +0800, Icenowy Zheng wrote: >>> > There's a Allwinner's XR819 SDIO Wi-Fi module soldered on the board of >>> > Orange Pi Zero, which used a dedicated regulator to power. >>> > >>> > Add the device tree node of the regulator, the enable gpio (with >>> > mmc-pwrseq) and the sdio controller. >>> > >>> > There's a out-of-tree driver tested to work with this device tree. >> >> >> btw could you please give a pointer where to find a XR819 driver for > relatively recent kernel (4.8 may be, just not 3.4)? Thanks. > > https://github.com/Icenowy/xradio Thanks! I tried, cannot make it work though. This compiles: CONFIG_XRADIO=y CONFIG_XRADIO_SDIO=y CONFIG_XRADIO_NON_POWER_OF_TWO_BLOCKSIZES=y # CONFIG_XRADIO_USE_GPIO_IRQ is not set # CONFIG_XRADIO_5GHZ_SUPPORT is not set # CONFIG_XRADIO_WAPI_SUPPORT is not set CONFIG_XRADIO_USE_EXTENSIONS=y But produces: [ 0.964793] [XRADIO] Driver Label:L34M.01.08.0002 [ 0.969659] [XRADIO] Allocated hw_priv @ df684dc0 [ 3.038167] [SBUS_ERR] sdio probe timeout! [ 3.046283] [XRADIO_ERR] sbus_sdio_init failed If I enable CONFIG_XRADIO_USE_GPIO_IRQ (which Kconfig suggest to enable - do I really need it?), it does not compile: drivers/built-in.o: In function `sdio_irq_subscribe': sunxi_sid.c:(.text+0x12dfe8): undefined reference to `xradio_request_gpio_irq' sunxi_sid.c:(.text+0x12e06c): undefined reference to `xradio_free_gpio_irq' sunxi_sid.c:(.text+0x12e080): undefined reference to `sunxi_mci_check_r1_ready' drivers/built-in.o: In function `sdio_irq_unsubscribe': sunxi_sid.c:(.text+0x12e3b0): undefined reference to `xradio_free_gpio_irq' Makefile:962: recipe for target 'vmlinux' failed make: *** [vmlinux] Error 1 I am using recent upstream kernel and https://patchwork.kernel.org/patch/9439759/ https://patchwork.kernel.org/patch/9439761/ and I added missing emac. Basically, here is my current tree with all sun8xi support https://github.com/aik/linux/commits/pizero and I just did git -C drivers/net/ethernet clone https://github.com/Icenowy/xradio and compiled it into vmlinux (no modules). What am I missing? Sorry I am a newbie with ARM. Thanks. -- Alexey _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 3/3] ARM: dts: sunxi: enable SDIO Wi-Fi on Orange Pi Zero [not found] <20161129131922.JFbeipav@smtp2o.mail.yandex.net> 2016-11-30 2:11 ` [PATCH 3/3] ARM: dts: sunxi: enable SDIO Wi-Fi on Orange Pi Zero Alexey Kardashevskiy @ 2016-11-30 9:25 ` Andre Przywara 2016-12-02 4:47 ` Alexey Kardashevskiy 1 sibling, 1 reply; 24+ messages in thread From: Andre Przywara @ 2016-11-30 9:25 UTC (permalink / raw) To: Icenowy Zheng, Alexey Kardashevskiy Cc: Mark Rutland, devicetree, Vishnu Patekar, Arnd Bergmann, Jonathan Corbet, linux-doc, Russell King, LKML, Hans de Goede, Chen-Yu Tsai, Maxime Ripard, linux-arm-kernel Hi, On 29/11/16 10:19, Icenowy Zheng wrote: > > 2016年11月29日 15:16于 Alexey Kardashevskiy <aik@ozlabs.ru>写道: >> >> >> >> On Wed, Nov 23, 2016 at 6:59 PM, Maxime Ripard > <maxime.ripard@free-electrons.com> wrote: >>> >>> Hi, >>> >>> On Tue, Nov 22, 2016 at 12:24:21AM +0800, Icenowy Zheng wrote: >>> > There's a Allwinner's XR819 SDIO Wi-Fi module soldered on the board of >>> > Orange Pi Zero, which used a dedicated regulator to power. >>> > >>> > Add the device tree node of the regulator, the enable gpio (with >>> > mmc-pwrseq) and the sdio controller. >>> > >>> > There's a out-of-tree driver tested to work with this device tree. >> >> >> btw could you please give a pointer where to find a XR819 driver for > relatively recent kernel (4.8 may be, just not 3.4)? Thanks. > > https://github.com/Icenowy/xradio I was just curious, so pulled your tree and tried to just compile it. It still threw warnings at me for ARM, and even more so for arm64. I fixed all of them and put that on my github[1]. Feel free to just pick them from there or wait till I manage to clean them up and send you a pull request. And also just a a test, I quickly put it in drivers/net/wireless/xradio, where it compiled fine after registering it with the upper level Kconfig and Makefile. And while looking at it: This looks like typical AW code, not even remotely upstreameable and probably far too complicated. Enabling some Kconfig options made it complain about missing functions. Has anyone checked if this is close to an existing WiFi chip? That wouldn't be a first ;-) Cheers, Andre. [1] https://github.com/apritzel/xradio/commits/quickfixes _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 3/3] ARM: dts: sunxi: enable SDIO Wi-Fi on Orange Pi Zero 2016-11-30 9:25 ` Andre Przywara @ 2016-12-02 4:47 ` Alexey Kardashevskiy 0 siblings, 0 replies; 24+ messages in thread From: Alexey Kardashevskiy @ 2016-12-02 4:47 UTC (permalink / raw) To: Andre Przywara, Icenowy Zheng Cc: Mark Rutland, devicetree, Vishnu Patekar, Arnd Bergmann, Jonathan Corbet, linux-doc, Russell King, LKML, Hans de Goede, Chen-Yu Tsai, Maxime Ripard, linux-arm-kernel On 30/11/16 20:25, Andre Przywara wrote: > Hi, > > On 29/11/16 10:19, Icenowy Zheng wrote: >> >> 2016年11月29日 15:16于 Alexey Kardashevskiy <aik@ozlabs.ru>写道: >>> >>> >>> >>> On Wed, Nov 23, 2016 at 6:59 PM, Maxime Ripard >> <maxime.ripard@free-electrons.com> wrote: >>>> >>>> Hi, >>>> >>>> On Tue, Nov 22, 2016 at 12:24:21AM +0800, Icenowy Zheng wrote: >>>>> There's a Allwinner's XR819 SDIO Wi-Fi module soldered on the board of >>>>> Orange Pi Zero, which used a dedicated regulator to power. >>>>> >>>>> Add the device tree node of the regulator, the enable gpio (with >>>>> mmc-pwrseq) and the sdio controller. >>>>> >>>>> There's a out-of-tree driver tested to work with this device tree. >>> >>> >>> btw could you please give a pointer where to find a XR819 driver for >> relatively recent kernel (4.8 may be, just not 3.4)? Thanks. >> >> https://github.com/Icenowy/xradio > > I was just curious, so pulled your tree and tried to just compile it. It > still threw warnings at me for ARM, and even more so for arm64. > I fixed all of them and put that on my github[1]. Feel free to just pick > them from there or wait till I manage to clean them up and send you a > pull request. > And also just a a test, I quickly put it in drivers/net/wireless/xradio, > where it compiled fine after registering it with the upper level Kconfig > and Makefile. > > And while looking at it: This looks like typical AW code, not even > remotely upstreameable and probably far too complicated. Enabling some > Kconfig options made it complain about missing functions. > Has anyone checked if this is close to an existing WiFi chip? That > wouldn't be a first ;-) > > Cheers, > Andre. > > [1] https://github.com/apritzel/xradio/commits/quickfixes > I just tried this branch + 4.9.0-rc7 but I am still getting: [ 0.960429] [XRADIO] Driver Label:L34M.01.08.0002 [ 0.965233] [XRADIO] Allocated hw_priv @ df6a4dc0 [ 3.038180] [SBUS_ERR] sdio probe timeout! [ 3.042288] [XRADIO_ERR] sbus_sdio_init failed I am missing huge amount of SDIO knowledge. Or the device tree is wrong. Any idea? -- Alexey _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2016-12-05 9:05 UTC | newest] Thread overview: 24+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-11-21 16:24 [PATCH v2 1/3] ARM: sunxi: add support for H2+ SoC Icenowy Zheng 2016-11-21 16:24 ` [PATCH v2 2/3] ARM: dts: sunxi: add support for Orange Pi Zero board Icenowy Zheng 2016-11-23 7:57 ` Maxime Ripard 2016-11-23 9:23 ` Andre Przywara [not found] ` <a4393a37-5008-ec76-9886-05f8686dadd5-5wv7dgnIgG8@public.gmane.org> 2016-11-24 21:29 ` Maxime Ripard 2016-11-27 9:36 ` Icenowy Zheng 2016-11-28 0:29 ` André Przywara 2016-12-01 9:36 ` Maxime Ripard 2016-12-02 14:22 ` Icenowy Zheng 2016-12-02 14:30 ` Hans de Goede 2016-12-02 14:32 ` Icenowy Zheng 2016-12-02 16:10 ` Andre Przywara 2016-12-02 16:37 ` Chen-Yu Tsai 2016-12-05 9:05 ` Maxime Ripard 2016-12-05 8:52 ` Maxime Ripard 2016-11-21 16:24 ` [PATCH 3/3] ARM: dts: sunxi: enable SDIO Wi-Fi on Orange Pi Zero Icenowy Zheng 2016-11-23 7:59 ` Maxime Ripard 2016-11-23 14:25 ` Chen-Yu Tsai 2016-11-23 14:29 ` Hans de Goede 2016-11-24 21:30 ` Maxime Ripard 2016-11-23 7:54 ` [PATCH v2 1/3] ARM: sunxi: add support for H2+ SoC Maxime Ripard [not found] <20161129131922.JFbeipav@smtp2o.mail.yandex.net> 2016-11-30 2:11 ` [PATCH 3/3] ARM: dts: sunxi: enable SDIO Wi-Fi on Orange Pi Zero Alexey Kardashevskiy 2016-11-30 9:25 ` Andre Przywara 2016-12-02 4:47 ` Alexey Kardashevskiy
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).