* [PATCH 0/2] arm64: dts: allwinner: Add Orange Pi Zero 2W support
@ 2023-10-20 14:57 Andre Przywara
2023-10-20 14:57 ` [PATCH 1/2] dt-bindings: arm: sunxi: add Orange Pi Zero 2W Andre Przywara
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Andre Przywara @ 2023-10-20 14:57 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jernej Skrabec,
Samuel Holland, Chen-Yu Tsai
Cc: Marc Zyngier, Piotr Oniszczuk, linux-sunxi, linux-arm-kernel,
devicetree
Hi,
this adds support for the Orange Pi Zero 2W, a small board in the
Raspberry Pi Zero form factor, but with an Allwinner H618 Soc and up to
4 GB of DRAM.
This is just for the base board, created by looking at the schematics.
There is an FPC connector, which connects to a stackable expansion
board, that provides two additional USB-A sockets and an Ethernet jack,
among other connectors.
What is the recommended way to model this, via a DT overlay, applied
dynamically by the bootloader, or using a separate .dts file, that
includes this base board file?
Cheers,
Andre
Andre Przywara (2):
dt-bindings: arm: sunxi: add Orange Pi Zero 2W
arm64: dts: allwinner: h616: add Orange Pi Zero 2W support
.../devicetree/bindings/arm/sunxi.yaml | 5 +
.../allwinner/sun50i-h618-orangepi-zero2w.dts | 176 ++++++++++++++++++
2 files changed, 181 insertions(+)
create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
--
2.25.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] dt-bindings: arm: sunxi: add Orange Pi Zero 2W
2023-10-20 14:57 [PATCH 0/2] arm64: dts: allwinner: Add Orange Pi Zero 2W support Andre Przywara
@ 2023-10-20 14:57 ` Andre Przywara
2023-10-20 15:39 ` Conor Dooley
2023-10-20 14:57 ` [PATCH 2/2] arm64: dts: allwinner: h616: add Orange Pi Zero 2W support Andre Przywara
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Andre Przywara @ 2023-10-20 14:57 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jernej Skrabec,
Samuel Holland, Chen-Yu Tsai
Cc: Marc Zyngier, Piotr Oniszczuk, linux-sunxi, linux-arm-kernel,
devicetree
The Orange Pi Zero 2W is a small board with an Allwinner H618 SoC.
Add the compatible string to the binding documents.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
Documentation/devicetree/bindings/arm/sunxi.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/sunxi.yaml b/Documentation/devicetree/bindings/arm/sunxi.yaml
index 11c5ce941dd7e..6f481e8bb4bf6 100644
--- a/Documentation/devicetree/bindings/arm/sunxi.yaml
+++ b/Documentation/devicetree/bindings/arm/sunxi.yaml
@@ -1013,6 +1013,11 @@ properties:
- const: xunlong,orangepi-zero2
- const: allwinner,sun50i-h616
+ - description: Xunlong OrangePi Zero 2W
+ items:
+ - const: xunlong,orangepi-zero2w
+ - const: allwinner,sun50i-h618
+
- description: Xunlong OrangePi Zero 3
items:
- const: xunlong,orangepi-zero3
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] arm64: dts: allwinner: h616: add Orange Pi Zero 2W support
2023-10-20 14:57 [PATCH 0/2] arm64: dts: allwinner: Add Orange Pi Zero 2W support Andre Przywara
2023-10-20 14:57 ` [PATCH 1/2] dt-bindings: arm: sunxi: add Orange Pi Zero 2W Andre Przywara
@ 2023-10-20 14:57 ` Andre Przywara
2023-10-21 6:22 ` Jernej Škrabec
2023-10-21 6:25 ` [PATCH 0/2] arm64: dts: allwinner: Add " Jernej Škrabec
2023-11-18 22:19 ` Jernej Škrabec
3 siblings, 1 reply; 8+ messages in thread
From: Andre Przywara @ 2023-10-20 14:57 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jernej Skrabec,
Samuel Holland, Chen-Yu Tsai
Cc: Marc Zyngier, Piotr Oniszczuk, linux-sunxi, linux-arm-kernel,
devicetree
The Orange Pi Zero 2W is a board based on the Allwinner H618 SoC.
It uses the RaspberryPi Zero form factor, with an optional expansion
board, connected via an FPC connector, to provide more connectors.
The base board features:
- Allwinner H618 SoC (quad Cortex-A53 cores, with 1MB L2 cache)
- 1, 2 or 4GB of LPDDR4 DRAM
- SD card socket
- two USB-C sockets, one UFP, one DFP
- HDMI connector
- (yet unsupported) WiFi module
- 16 MiB SPI flash
- power supply via the UFP USB-C port
The FPC connector provides access to two more USB host ports, Fast
Ethernet, some GPIOs, Audio Line out and the IR receiver pin.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
.../allwinner/sun50i-h618-orangepi-zero2w.dts | 176 ++++++++++++++++++
1 file changed, 176 insertions(+)
create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
new file mode 100644
index 0000000000000..21ca1977055d9
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
@@ -0,0 +1,176 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2023 Arm Ltd.
+ */
+
+/dts-v1/;
+
+#include "sun50i-h616.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+ model = "OrangePi Zero 2W";
+ compatible = "xunlong,orangepi-zero2w", "allwinner,sun50i-h618";
+
+ aliases {
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-0 {
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
+ gpios = <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13 */
+ };
+ };
+
+ reg_vcc5v: vcc5v {
+ /* board wide 5V supply directly from the USB-C socket */
+ compatible = "regulator-fixed";
+ regulator-name = "vcc-5v";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
+
+ reg_vcc3v3: vcc3v3 {
+ /* SY8089 DC/DC converter */
+ compatible = "regulator-fixed";
+ regulator-name = "vcc-3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <®_vcc5v>;
+ regulator-always-on;
+ };
+};
+
+&ehci1 {
+ status = "okay";
+};
+
+/* USB 2 & 3 are on the FPC connector (or the exansion board) */
+
+&mmc0 {
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
+ bus-width = <4>;
+ vmmc-supply = <®_vcc3v3>;
+ status = "okay";
+};
+
+&ohci1 {
+ status = "okay";
+};
+
+&pio {
+ vcc-pc-supply = <®_dldo1>;
+ vcc-pf-supply = <®_dldo1>; /* internally via VCC-IO */
+ vcc-pg-supply = <®_aldo1>;
+ vcc-ph-supply = <®_dldo1>; /* internally via VCC-IO */
+ vcc-pi-supply = <®_dldo1>;
+};
+
+&r_i2c {
+ status = "okay";
+
+ axp313: pmic@36 {
+ compatible = "x-powers,axp313a";
+ reg = <0x36>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ interrupt-parent = <&pio>;
+ interrupts = <2 9 IRQ_TYPE_LEVEL_LOW>; /* PC9 */
+
+ vin1-supply = <®_vcc5v>;
+ vin2-supply = <®_vcc5v>;
+ vin3-supply = <®_vcc5v>;
+
+ regulators {
+ /* Supplies VCC-PLL and DRAM */
+ reg_aldo1: aldo1 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc1v8";
+ };
+
+ /* Supplies VCC-IO, so needs to be always on. */
+ reg_dldo1: dldo1 {
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc3v3";
+ };
+
+ reg_dcdc1: dcdc1 {
+ regulator-always-on;
+ regulator-min-microvolt = <810000>;
+ regulator-max-microvolt = <990000>;
+ regulator-name = "vdd-gpu-sys";
+ };
+
+ reg_dcdc2: dcdc2 {
+ regulator-always-on;
+ regulator-min-microvolt = <810000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-name = "vdd-cpu";
+ };
+
+ reg_dcdc3: dcdc3 {
+ regulator-always-on;
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-name = "vdd-dram";
+ };
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi0_pins>, <&spi0_cs0_pin>;
+
+ flash@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+ };
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_ph_pins>;
+ status = "okay";
+};
+
+&usbotg {
+ /*
+ * PHY0 pins are connected to a USB-C socket, but a role switch
+ * is not implemented: both CC pins are pulled to GND.
+ * The VBUS pins power the device, so a fixed peripheral mode
+ * is the best choice.
+ * The board can be powered via GPIOs, in this case port0 *can*
+ * act as a host (with a cable/adapter ignoring CC), as VBUS is
+ * then provided by the GPIOs. Any user of this setup would
+ * need to adjust the DT accordingly: dr_mode set to "host",
+ * enabling OHCI0 and EHCI0.
+ */
+ dr_mode = "peripheral";
+ status = "okay";
+};
+
+&usbphy {
+ usb1_vbus-supply = <®_vcc5v>;
+ status = "okay";
+};
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] dt-bindings: arm: sunxi: add Orange Pi Zero 2W
2023-10-20 14:57 ` [PATCH 1/2] dt-bindings: arm: sunxi: add Orange Pi Zero 2W Andre Przywara
@ 2023-10-20 15:39 ` Conor Dooley
0 siblings, 0 replies; 8+ messages in thread
From: Conor Dooley @ 2023-10-20 15:39 UTC (permalink / raw)
To: Andre Przywara
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jernej Skrabec,
Samuel Holland, Chen-Yu Tsai, Marc Zyngier, Piotr Oniszczuk,
linux-sunxi, linux-arm-kernel, devicetree
[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]
On Fri, Oct 20, 2023 at 03:57:05PM +0100, Andre Przywara wrote:
> The Orange Pi Zero 2W is a small board with an Allwinner H618 SoC.
>
> Add the compatible string to the binding documents.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Thanks,
Conor.
> ---
> Documentation/devicetree/bindings/arm/sunxi.yaml | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/arm/sunxi.yaml b/Documentation/devicetree/bindings/arm/sunxi.yaml
> index 11c5ce941dd7e..6f481e8bb4bf6 100644
> --- a/Documentation/devicetree/bindings/arm/sunxi.yaml
> +++ b/Documentation/devicetree/bindings/arm/sunxi.yaml
> @@ -1013,6 +1013,11 @@ properties:
> - const: xunlong,orangepi-zero2
> - const: allwinner,sun50i-h616
>
> + - description: Xunlong OrangePi Zero 2W
> + items:
> + - const: xunlong,orangepi-zero2w
> + - const: allwinner,sun50i-h618
> +
> - description: Xunlong OrangePi Zero 3
> items:
> - const: xunlong,orangepi-zero3
> --
> 2.25.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] arm64: dts: allwinner: h616: add Orange Pi Zero 2W support
2023-10-20 14:57 ` [PATCH 2/2] arm64: dts: allwinner: h616: add Orange Pi Zero 2W support Andre Przywara
@ 2023-10-21 6:22 ` Jernej Škrabec
2023-10-21 21:47 ` Andre Przywara
0 siblings, 1 reply; 8+ messages in thread
From: Jernej Škrabec @ 2023-10-21 6:22 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Samuel Holland,
Chen-Yu Tsai, Andre Przywara
Cc: Marc Zyngier, Piotr Oniszczuk, linux-sunxi, linux-arm-kernel,
devicetree
On Friday, October 20, 2023 4:57:06 PM CEST Andre Przywara wrote:
> The Orange Pi Zero 2W is a board based on the Allwinner H618 SoC.
> It uses the RaspberryPi Zero form factor, with an optional expansion
> board, connected via an FPC connector, to provide more connectors.
>
> The base board features:
> - Allwinner H618 SoC (quad Cortex-A53 cores, with 1MB L2 cache)
> - 1, 2 or 4GB of LPDDR4 DRAM
> - SD card socket
> - two USB-C sockets, one UFP, one DFP
> - HDMI connector
> - (yet unsupported) WiFi module
> - 16 MiB SPI flash
> - power supply via the UFP USB-C port
>
> The FPC connector provides access to two more USB host ports, Fast
> Ethernet, some GPIOs, Audio Line out and the IR receiver pin.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
I compared it to the schematic and all values looks good. Sadly, it missed
merge window.
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Best regards,
Jernej
> ---
> .../allwinner/sun50i-h618-orangepi-zero2w.dts | 176 ++++++++++++++++++
> 1 file changed, 176 insertions(+)
> create mode 100644
> arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
> b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts new file
> mode 100644
> index 0000000000000..21ca1977055d9
> --- /dev/null
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
> @@ -0,0 +1,176 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (C) 2023 Arm Ltd.
> + */
> +
> +/dts-v1/;
> +
> +#include "sun50i-h616.dtsi"
> +
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/interrupt-controller/arm-gic.h>
> +#include <dt-bindings/leds/common.h>
> +
> +/ {
> + model = "OrangePi Zero 2W";
> + compatible = "xunlong,orangepi-zero2w", "allwinner,sun50i-h618";
> +
> + aliases {
> + serial0 = &uart0;
> + };
> +
> + chosen {
> + stdout-path = "serial0:115200n8";
> + };
> +
> + leds {
> + compatible = "gpio-leds";
> +
> + led-0 {
> + function = LED_FUNCTION_STATUS;
> + color = <LED_COLOR_ID_GREEN>;
> + gpios = <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13
*/
> + };
> + };
> +
> + reg_vcc5v: vcc5v {
> + /* board wide 5V supply directly from the USB-C socket
*/
> + compatible = "regulator-fixed";
> + regulator-name = "vcc-5v";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + regulator-always-on;
> + };
> +
> + reg_vcc3v3: vcc3v3 {
> + /* SY8089 DC/DC converter */
> + compatible = "regulator-fixed";
> + regulator-name = "vcc-3v3";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + vin-supply = <®_vcc5v>;
> + regulator-always-on;
> + };
> +};
> +
> +&ehci1 {
> + status = "okay";
> +};
> +
> +/* USB 2 & 3 are on the FPC connector (or the exansion board) */
> +
> +&mmc0 {
> + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
> + bus-width = <4>;
> + vmmc-supply = <®_vcc3v3>;
> + status = "okay";
> +};
> +
> +&ohci1 {
> + status = "okay";
> +};
> +
> +&pio {
> + vcc-pc-supply = <®_dldo1>;
> + vcc-pf-supply = <®_dldo1>; /* internally via VCC-IO */
> + vcc-pg-supply = <®_aldo1>;
> + vcc-ph-supply = <®_dldo1>; /* internally via VCC-IO */
> + vcc-pi-supply = <®_dldo1>;
> +};
> +
> +&r_i2c {
> + status = "okay";
> +
> + axp313: pmic@36 {
> + compatible = "x-powers,axp313a";
> + reg = <0x36>;
> + #interrupt-cells = <1>;
> + interrupt-controller;
> + interrupt-parent = <&pio>;
> + interrupts = <2 9 IRQ_TYPE_LEVEL_LOW>; /* PC9 */
> +
> + vin1-supply = <®_vcc5v>;
> + vin2-supply = <®_vcc5v>;
> + vin3-supply = <®_vcc5v>;
> +
> + regulators {
> + /* Supplies VCC-PLL and DRAM */
> + reg_aldo1: aldo1 {
> + regulator-always-on;
> + regulator-min-microvolt =
<1800000>;
> + regulator-max-microvolt =
<1800000>;
> + regulator-name = "vcc1v8";
> + };
> +
> + /* Supplies VCC-IO, so needs to be always on.
*/
> + reg_dldo1: dldo1 {
> + regulator-always-on;
> + regulator-min-microvolt =
<3300000>;
> + regulator-max-microvolt =
<3300000>;
> + regulator-name = "vcc3v3";
> + };
> +
> + reg_dcdc1: dcdc1 {
> + regulator-always-on;
> + regulator-min-microvolt =
<810000>;
> + regulator-max-microvolt =
<990000>;
> + regulator-name = "vdd-gpu-sys";
> + };
> +
> + reg_dcdc2: dcdc2 {
> + regulator-always-on;
> + regulator-min-microvolt =
<810000>;
> + regulator-max-microvolt =
<1100000>;
> + regulator-name = "vdd-cpu";
> + };
> +
> + reg_dcdc3: dcdc3 {
> + regulator-always-on;
> + regulator-min-microvolt =
<1100000>;
> + regulator-max-microvolt =
<1100000>;
> + regulator-name = "vdd-dram";
> + };
> + };
> + };
> +};
> +
> +&spi0 {
> + status = "okay";
> + pinctrl-names = "default";
> + pinctrl-0 = <&spi0_pins>, <&spi0_cs0_pin>;
> +
> + flash@0 {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + compatible = "jedec,spi-nor";
> + reg = <0>;
> + spi-max-frequency = <40000000>;
> + };
> +};
> +
> +&uart0 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&uart0_ph_pins>;
> + status = "okay";
> +};
> +
> +&usbotg {
> + /*
> + * PHY0 pins are connected to a USB-C socket, but a role switch
> + * is not implemented: both CC pins are pulled to GND.
> + * The VBUS pins power the device, so a fixed peripheral mode
> + * is the best choice.
> + * The board can be powered via GPIOs, in this case port0 *can*
> + * act as a host (with a cable/adapter ignoring CC), as VBUS is
> + * then provided by the GPIOs. Any user of this setup would
> + * need to adjust the DT accordingly: dr_mode set to "host",
> + * enabling OHCI0 and EHCI0.
> + */
> + dr_mode = "peripheral";
> + status = "okay";
> +};
> +
> +&usbphy {
> + usb1_vbus-supply = <®_vcc5v>;
> + status = "okay";
> +};
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] arm64: dts: allwinner: Add Orange Pi Zero 2W support
2023-10-20 14:57 [PATCH 0/2] arm64: dts: allwinner: Add Orange Pi Zero 2W support Andre Przywara
2023-10-20 14:57 ` [PATCH 1/2] dt-bindings: arm: sunxi: add Orange Pi Zero 2W Andre Przywara
2023-10-20 14:57 ` [PATCH 2/2] arm64: dts: allwinner: h616: add Orange Pi Zero 2W support Andre Przywara
@ 2023-10-21 6:25 ` Jernej Škrabec
2023-11-18 22:19 ` Jernej Škrabec
3 siblings, 0 replies; 8+ messages in thread
From: Jernej Škrabec @ 2023-10-21 6:25 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Samuel Holland,
Chen-Yu Tsai, Andre Przywara
Cc: Marc Zyngier, Piotr Oniszczuk, linux-sunxi, linux-arm-kernel,
devicetree
On Friday, October 20, 2023 4:57:04 PM CEST Andre Przywara wrote:
> Hi,
>
> this adds support for the Orange Pi Zero 2W, a small board in the
> Raspberry Pi Zero form factor, but with an Allwinner H618 Soc and up to
> 4 GB of DRAM.
>
> This is just for the base board, created by looking at the schematics.
> There is an FPC connector, which connects to a stackable expansion
> board, that provides two additional USB-A sockets and an Ethernet jack,
> among other connectors.
> What is the recommended way to model this, via a DT overlay, applied
> dynamically by the bootloader, or using a separate .dts file, that
> includes this base board file?
I would do it through DT overlay. It can be included in kernel, alongside
board DT.
Best regards,
Jernej
>
> Cheers,
> Andre
>
> Andre Przywara (2):
> dt-bindings: arm: sunxi: add Orange Pi Zero 2W
> arm64: dts: allwinner: h616: add Orange Pi Zero 2W support
>
> .../devicetree/bindings/arm/sunxi.yaml | 5 +
> .../allwinner/sun50i-h618-orangepi-zero2w.dts | 176 ++++++++++++++++++
> 2 files changed, 181 insertions(+)
> create mode 100644
> arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] arm64: dts: allwinner: h616: add Orange Pi Zero 2W support
2023-10-21 6:22 ` Jernej Škrabec
@ 2023-10-21 21:47 ` Andre Przywara
0 siblings, 0 replies; 8+ messages in thread
From: Andre Przywara @ 2023-10-21 21:47 UTC (permalink / raw)
To: Jernej Škrabec
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Samuel Holland,
Chen-Yu Tsai, Marc Zyngier, Piotr Oniszczuk, linux-sunxi,
linux-arm-kernel, devicetree
On Sat, 21 Oct 2023 08:22:24 +0200
Jernej Škrabec <jernej.skrabec@gmail.com> wrote:
Hi,
> On Friday, October 20, 2023 4:57:06 PM CEST Andre Przywara wrote:
> > The Orange Pi Zero 2W is a board based on the Allwinner H618 SoC.
> > It uses the RaspberryPi Zero form factor, with an optional expansion
> > board, connected via an FPC connector, to provide more connectors.
> >
> > The base board features:
> > - Allwinner H618 SoC (quad Cortex-A53 cores, with 1MB L2 cache)
> > - 1, 2 or 4GB of LPDDR4 DRAM
> > - SD card socket
> > - two USB-C sockets, one UFP, one DFP
> > - HDMI connector
> > - (yet unsupported) WiFi module
> > - 16 MiB SPI flash
> > - power supply via the UFP USB-C port
> >
> > The FPC connector provides access to two more USB host ports, Fast
> > Ethernet, some GPIOs, Audio Line out and the IR receiver pin.
> >
> > Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>
> I compared it to the schematic and all values looks good. Sadly, it missed
> merge window.
No worries, I wasn't expecting it to make it, just wanted to get this
out to start the discussion and have something at a canonical place,
since the first boards seem to arrive for people now.
> Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Thanks,
Andre
> Best regards,
> Jernej
>
> > ---
> > .../allwinner/sun50i-h618-orangepi-zero2w.dts | 176 ++++++++++++++++++
> > 1 file changed, 176 insertions(+)
> > create mode 100644
> > arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
> >
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
> > b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts new file
> > mode 100644
> > index 0000000000000..21ca1977055d9
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
> > @@ -0,0 +1,176 @@
> > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> > +/*
> > + * Copyright (C) 2023 Arm Ltd.
> > + */
> > +
> > +/dts-v1/;
> > +
> > +#include "sun50i-h616.dtsi"
> > +
> > +#include <dt-bindings/gpio/gpio.h>
> > +#include <dt-bindings/interrupt-controller/arm-gic.h>
> > +#include <dt-bindings/leds/common.h>
> > +
> > +/ {
> > + model = "OrangePi Zero 2W";
> > + compatible = "xunlong,orangepi-zero2w", "allwinner,sun50i-h618";
> > +
> > + aliases {
> > + serial0 = &uart0;
> > + };
> > +
> > + chosen {
> > + stdout-path = "serial0:115200n8";
> > + };
> > +
> > + leds {
> > + compatible = "gpio-leds";
> > +
> > + led-0 {
> > + function = LED_FUNCTION_STATUS;
> > + color = <LED_COLOR_ID_GREEN>;
> > + gpios = <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13
> */
> > + };
> > + };
> > +
> > + reg_vcc5v: vcc5v {
> > + /* board wide 5V supply directly from the USB-C socket
> */
> > + compatible = "regulator-fixed";
> > + regulator-name = "vcc-5v";
> > + regulator-min-microvolt = <5000000>;
> > + regulator-max-microvolt = <5000000>;
> > + regulator-always-on;
> > + };
> > +
> > + reg_vcc3v3: vcc3v3 {
> > + /* SY8089 DC/DC converter */
> > + compatible = "regulator-fixed";
> > + regulator-name = "vcc-3v3";
> > + regulator-min-microvolt = <3300000>;
> > + regulator-max-microvolt = <3300000>;
> > + vin-supply = <®_vcc5v>;
> > + regulator-always-on;
> > + };
> > +};
> > +
> > +&ehci1 {
> > + status = "okay";
> > +};
> > +
> > +/* USB 2 & 3 are on the FPC connector (or the exansion board) */
> > +
> > +&mmc0 {
> > + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
> > + bus-width = <4>;
> > + vmmc-supply = <®_vcc3v3>;
> > + status = "okay";
> > +};
> > +
> > +&ohci1 {
> > + status = "okay";
> > +};
> > +
> > +&pio {
> > + vcc-pc-supply = <®_dldo1>;
> > + vcc-pf-supply = <®_dldo1>; /* internally via VCC-IO */
> > + vcc-pg-supply = <®_aldo1>;
> > + vcc-ph-supply = <®_dldo1>; /* internally via VCC-IO */
> > + vcc-pi-supply = <®_dldo1>;
> > +};
> > +
> > +&r_i2c {
> > + status = "okay";
> > +
> > + axp313: pmic@36 {
> > + compatible = "x-powers,axp313a";
> > + reg = <0x36>;
> > + #interrupt-cells = <1>;
> > + interrupt-controller;
> > + interrupt-parent = <&pio>;
> > + interrupts = <2 9 IRQ_TYPE_LEVEL_LOW>; /* PC9 */
> > +
> > + vin1-supply = <®_vcc5v>;
> > + vin2-supply = <®_vcc5v>;
> > + vin3-supply = <®_vcc5v>;
> > +
> > + regulators {
> > + /* Supplies VCC-PLL and DRAM */
> > + reg_aldo1: aldo1 {
> > + regulator-always-on;
> > + regulator-min-microvolt =
> <1800000>;
> > + regulator-max-microvolt =
> <1800000>;
> > + regulator-name = "vcc1v8";
> > + };
> > +
> > + /* Supplies VCC-IO, so needs to be always on.
> */
> > + reg_dldo1: dldo1 {
> > + regulator-always-on;
> > + regulator-min-microvolt =
> <3300000>;
> > + regulator-max-microvolt =
> <3300000>;
> > + regulator-name = "vcc3v3";
> > + };
> > +
> > + reg_dcdc1: dcdc1 {
> > + regulator-always-on;
> > + regulator-min-microvolt =
> <810000>;
> > + regulator-max-microvolt =
> <990000>;
> > + regulator-name = "vdd-gpu-sys";
> > + };
> > +
> > + reg_dcdc2: dcdc2 {
> > + regulator-always-on;
> > + regulator-min-microvolt =
> <810000>;
> > + regulator-max-microvolt =
> <1100000>;
> > + regulator-name = "vdd-cpu";
> > + };
> > +
> > + reg_dcdc3: dcdc3 {
> > + regulator-always-on;
> > + regulator-min-microvolt =
> <1100000>;
> > + regulator-max-microvolt =
> <1100000>;
> > + regulator-name = "vdd-dram";
> > + };
> > + };
> > + };
> > +};
> > +
> > +&spi0 {
> > + status = "okay";
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&spi0_pins>, <&spi0_cs0_pin>;
> > +
> > + flash@0 {
> > + #address-cells = <1>;
> > + #size-cells = <1>;
> > + compatible = "jedec,spi-nor";
> > + reg = <0>;
> > + spi-max-frequency = <40000000>;
> > + };
> > +};
> > +
> > +&uart0 {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&uart0_ph_pins>;
> > + status = "okay";
> > +};
> > +
> > +&usbotg {
> > + /*
> > + * PHY0 pins are connected to a USB-C socket, but a role switch
> > + * is not implemented: both CC pins are pulled to GND.
> > + * The VBUS pins power the device, so a fixed peripheral mode
> > + * is the best choice.
> > + * The board can be powered via GPIOs, in this case port0 *can*
> > + * act as a host (with a cable/adapter ignoring CC), as VBUS is
> > + * then provided by the GPIOs. Any user of this setup would
> > + * need to adjust the DT accordingly: dr_mode set to "host",
> > + * enabling OHCI0 and EHCI0.
> > + */
> > + dr_mode = "peripheral";
> > + status = "okay";
> > +};
> > +
> > +&usbphy {
> > + usb1_vbus-supply = <®_vcc5v>;
> > + status = "okay";
> > +};
>
>
>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] arm64: dts: allwinner: Add Orange Pi Zero 2W support
2023-10-20 14:57 [PATCH 0/2] arm64: dts: allwinner: Add Orange Pi Zero 2W support Andre Przywara
` (2 preceding siblings ...)
2023-10-21 6:25 ` [PATCH 0/2] arm64: dts: allwinner: Add " Jernej Škrabec
@ 2023-11-18 22:19 ` Jernej Škrabec
3 siblings, 0 replies; 8+ messages in thread
From: Jernej Škrabec @ 2023-11-18 22:19 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Samuel Holland,
Chen-Yu Tsai, Andre Przywara
Cc: Marc Zyngier, Piotr Oniszczuk, linux-sunxi, linux-arm-kernel,
devicetree
Dne petek, 20. oktober 2023 ob 16:57:04 CET je Andre Przywara napisal(a):
> Hi,
>
> this adds support for the Orange Pi Zero 2W, a small board in the
> Raspberry Pi Zero form factor, but with an Allwinner H618 Soc and up to
> 4 GB of DRAM.
>
> This is just for the base board, created by looking at the schematics.
> There is an FPC connector, which connects to a stackable expansion
> board, that provides two additional USB-A sockets and an Ethernet jack,
> among other connectors.
> What is the recommended way to model this, via a DT overlay, applied
> dynamically by the bootloader, or using a separate .dts file, that
> includes this base board file?
>
> Cheers,
> Andre
Applied, thanks!
Best regards,
Jernej
>
> Andre Przywara (2):
> dt-bindings: arm: sunxi: add Orange Pi Zero 2W
> arm64: dts: allwinner: h616: add Orange Pi Zero 2W support
>
> .../devicetree/bindings/arm/sunxi.yaml | 5 +
> .../allwinner/sun50i-h618-orangepi-zero2w.dts | 176 ++++++++++++++++++
> 2 files changed, 181 insertions(+)
> create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-11-18 22:19 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-20 14:57 [PATCH 0/2] arm64: dts: allwinner: Add Orange Pi Zero 2W support Andre Przywara
2023-10-20 14:57 ` [PATCH 1/2] dt-bindings: arm: sunxi: add Orange Pi Zero 2W Andre Przywara
2023-10-20 15:39 ` Conor Dooley
2023-10-20 14:57 ` [PATCH 2/2] arm64: dts: allwinner: h616: add Orange Pi Zero 2W support Andre Przywara
2023-10-21 6:22 ` Jernej Škrabec
2023-10-21 21:47 ` Andre Przywara
2023-10-21 6:25 ` [PATCH 0/2] arm64: dts: allwinner: Add " Jernej Škrabec
2023-11-18 22:19 ` Jernej Škrabec
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).