linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] ARM: dts: sunxi: Add MangoPi MQ-R board support
@ 2023-01-06  1:01 Andre Przywara
  2023-01-06  1:01 ` [PATCH 1/4] dts: add riscv include prefix link Andre Przywara
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Andre Przywara @ 2023-01-06  1:01 UTC (permalink / raw)
  To: Samuel Holland, Jernej Skrabec, Chen-Yu Tsai, Rob Herring,
	Krzysztof Kozlowski
  Cc: Icenowy Zheng, András Szemzö,
	Fabien Poussin, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	linux-arm-kernel, devicetree, linux-sunxi, linux-riscv,
	linux-kernel

The MangoPi MQ-R is a small SBC with the Allwinner T113-s3 SoC. That is
a very close relative to the Allwinner D1/D1s SoCs, but with Arm
Cortex-A7 cores, and 128 MB of SIP co-packaged DDR3 DRAM.

This series introduces the missing T113-s .dtsi, which builds on top of
the D1/D1s .dtsi, but adds the ARM specific peripherals, like the CPU
cores, the arch timer, the GIC and the PMU.
This requires to add a symlink to the RISC-V DT directory in patch 1/4,
to be able to easily reference the base .dtsi from other architecture
directories.

After I had written most of the board .dts, I realised that the
MangoPi MQ is almost the same, minus the RISC-V/ARM difference. I am a
bit unsure if we should share more of the board .dts, though, as this
would go cross architectures. I am open to any comments here.

Please have a look!

Cheers,
Andre

Andre Przywara (4):
  dts: add riscv include prefix link
  ARM: dts: sunxi: add Allwinner T113-s SoC .dtsi
  dt-bindings: arm: sunxi: document MangoPi MQ-R board name
  ARM: dts: sunxi: add MangoPi MQ-R board

 .../devicetree/bindings/arm/sunxi.yaml        |   5 +
 arch/arm/boot/dts/Makefile                    |   1 +
 .../arm/boot/dts/sun8i-t113s-mangopi-mq-r.dts | 160 ++++++++++++++++++
 arch/arm/boot/dts/sun8i-t113s.dtsi            |  59 +++++++
 scripts/dtc/include-prefixes/riscv            |   1 +
 5 files changed, 226 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun8i-t113s-mangopi-mq-r.dts
 create mode 100644 arch/arm/boot/dts/sun8i-t113s.dtsi
 create mode 120000 scripts/dtc/include-prefixes/riscv

-- 
2.35.5


_______________________________________________
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] 12+ messages in thread

* [PATCH 1/4] dts: add riscv include prefix link
  2023-01-06  1:01 [PATCH 0/4] ARM: dts: sunxi: Add MangoPi MQ-R board support Andre Przywara
@ 2023-01-06  1:01 ` Andre Przywara
  2023-01-08 17:15   ` Conor Dooley
  2023-03-07 20:59   ` Palmer Dabbelt
  2023-01-06  1:01 ` [PATCH 2/4] ARM: dts: sunxi: add Allwinner T113-s SoC .dtsi Andre Przywara
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 12+ messages in thread
From: Andre Przywara @ 2023-01-06  1:01 UTC (permalink / raw)
  To: Samuel Holland, Jernej Skrabec, Chen-Yu Tsai, Rob Herring,
	Krzysztof Kozlowski
  Cc: Icenowy Zheng, András Szemzö,
	Fabien Poussin, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	linux-arm-kernel, devicetree, linux-sunxi, linux-riscv,
	linux-kernel, Frank Rowand

The Allwinner D1/D1s SoCs (with a RISC-V core) use an (almost?) identical
die as their R528/T113-s siblings with ARM Cortex-A7 cores.

To allow sharing the basic SoC .dtsi files across those two
architectures as well, introduce a symlink to the RISC-V DT directory.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 scripts/dtc/include-prefixes/riscv | 1 +
 1 file changed, 1 insertion(+)
 create mode 120000 scripts/dtc/include-prefixes/riscv

diff --git a/scripts/dtc/include-prefixes/riscv b/scripts/dtc/include-prefixes/riscv
new file mode 120000
index 0000000000000..2025094189380
--- /dev/null
+++ b/scripts/dtc/include-prefixes/riscv
@@ -0,0 +1 @@
+../../../arch/riscv/boot/dts
\ No newline at end of file
-- 
2.35.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/4] ARM: dts: sunxi: add Allwinner T113-s SoC .dtsi
  2023-01-06  1:01 [PATCH 0/4] ARM: dts: sunxi: Add MangoPi MQ-R board support Andre Przywara
  2023-01-06  1:01 ` [PATCH 1/4] dts: add riscv include prefix link Andre Przywara
@ 2023-01-06  1:01 ` Andre Przywara
  2023-01-06  1:01 ` [PATCH 3/4] dt-bindings: arm: sunxi: document MangoPi MQ-R board name Andre Przywara
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: Andre Przywara @ 2023-01-06  1:01 UTC (permalink / raw)
  To: Samuel Holland, Jernej Skrabec, Chen-Yu Tsai, Rob Herring,
	Krzysztof Kozlowski
  Cc: Icenowy Zheng, András Szemzö,
	Fabien Poussin, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	linux-arm-kernel, devicetree, linux-sunxi, linux-riscv,
	linux-kernel

The Allwinner T113-s SoC is apparently using the same (or at least a very
similar) die as the D1/D1s, but replaces the single RISC-V core with
two Arm Cortex-A7 cores.
Since the D1 core .dtsi already describes all common peripherals, we
just need a DT describing the ARM specific peripherals: the CPU cores,
the Generic Timer, the GIC and the PMU.
We include the core .dtsi directly from the riscv DT directory.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm/boot/dts/sun8i-t113s.dtsi | 59 ++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun8i-t113s.dtsi

diff --git a/arch/arm/boot/dts/sun8i-t113s.dtsi b/arch/arm/boot/dts/sun8i-t113s.dtsi
new file mode 100644
index 0000000000000..804aa197a24f8
--- /dev/null
+++ b/arch/arm/boot/dts/sun8i-t113s.dtsi
@@ -0,0 +1,59 @@
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// Copyright (C) 2022 Arm Ltd.
+
+#define SOC_PERIPHERAL_IRQ(nr) GIC_SPI nr
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <riscv/allwinner/sunxi-d1s-t113.dtsi>
+#include <riscv/allwinner/sunxi-d1-t113.dtsi>
+
+/ {
+	interrupt-parent = <&gic>;
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu0: cpu@0 {
+			compatible = "arm,cortex-a7";
+			device_type = "cpu";
+			reg = <0>;
+			clocks = <&ccu CLK_CPUX>;
+			clock-names = "cpu";
+		};
+
+		cpu1: cpu@1 {
+			compatible = "arm,cortex-a7";
+			device_type = "cpu";
+			reg = <1>;
+			clocks = <&ccu CLK_CPUX>;
+			clock-names = "cpu";
+		};
+	};
+
+	gic: interrupt-controller@1c81000 {
+		compatible = "arm,gic-400";
+		reg = <0x03021000 0x1000>,
+		      <0x03022000 0x2000>,
+		      <0x03024000 0x2000>,
+		      <0x03026000 0x2000>;
+		interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
+		interrupt-controller;
+		#interrupt-cells = <3>;
+	};
+
+	timer {
+		compatible = "arm,armv7-timer";
+		interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+			     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
+	};
+
+	pmu {
+		compatible = "arm,cortex-a7-pmu";
+		interrupts = <GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-affinity = <&cpu0>, <&cpu1>;
+	};
+};
-- 
2.35.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/4] dt-bindings: arm: sunxi: document MangoPi MQ-R board name
  2023-01-06  1:01 [PATCH 0/4] ARM: dts: sunxi: Add MangoPi MQ-R board support Andre Przywara
  2023-01-06  1:01 ` [PATCH 1/4] dts: add riscv include prefix link Andre Przywara
  2023-01-06  1:01 ` [PATCH 2/4] ARM: dts: sunxi: add Allwinner T113-s SoC .dtsi Andre Przywara
@ 2023-01-06  1:01 ` Andre Przywara
  2023-01-06  9:21   ` Krzysztof Kozlowski
  2023-01-06 11:07   ` Krzysztof Kozlowski
  2023-01-06  1:01 ` [PATCH 4/4] ARM: dts: sunxi: add MangoPi MQ-R board Andre Przywara
  2023-01-06 17:17 ` [PATCH 0/4] ARM: dts: sunxi: Add MangoPi MQ-R board support Andre Przywara
  4 siblings, 2 replies; 12+ messages in thread
From: Andre Przywara @ 2023-01-06  1:01 UTC (permalink / raw)
  To: Samuel Holland, Jernej Skrabec, Chen-Yu Tsai, Rob Herring,
	Krzysztof Kozlowski
  Cc: Icenowy Zheng, András Szemzö,
	Fabien Poussin, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	linux-arm-kernel, devicetree, linux-sunxi, linux-riscv,
	linux-kernel

The MangoPi MQ-R board is a close relative to its Allwinner D1/D1s
siblings, but features two Arm Cortex-A7 cores instead of a RISC-V core.

Add the board/SoC compatible string pair to the list of known boards.

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 3ad1cd50e3fe0..ce445c5ed81c8 100644
--- a/Documentation/devicetree/bindings/arm/sunxi.yaml
+++ b/Documentation/devicetree/bindings/arm/sunxi.yaml
@@ -843,6 +843,11 @@ properties:
           - const: wexler,tab7200
           - const: allwinner,sun7i-a20
 
+      - description: MangoPi MQ-R board
+        items:
+          - const: widora,mangopi-mq-r
+          - const: allwinner,sun8i-t113s
+
       - description: WITS A31 Colombus Evaluation Board
         items:
           - const: wits,colombus
-- 
2.35.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/4] ARM: dts: sunxi: add MangoPi MQ-R board
  2023-01-06  1:01 [PATCH 0/4] ARM: dts: sunxi: Add MangoPi MQ-R board support Andre Przywara
                   ` (2 preceding siblings ...)
  2023-01-06  1:01 ` [PATCH 3/4] dt-bindings: arm: sunxi: document MangoPi MQ-R board name Andre Przywara
@ 2023-01-06  1:01 ` Andre Przywara
  2023-01-06  9:21   ` Krzysztof Kozlowski
  2023-01-06 17:17 ` [PATCH 0/4] ARM: dts: sunxi: Add MangoPi MQ-R board support Andre Przywara
  4 siblings, 1 reply; 12+ messages in thread
From: Andre Przywara @ 2023-01-06  1:01 UTC (permalink / raw)
  To: Samuel Holland, Jernej Skrabec, Chen-Yu Tsai, Rob Herring,
	Krzysztof Kozlowski
  Cc: Icenowy Zheng, András Szemzö,
	Fabien Poussin, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	linux-arm-kernel, devicetree, linux-sunxi, linux-riscv,
	linux-kernel, Arnd Bergmann, Olof Johansson, soc

The MangoPi MQ-R is a small SBC with the Allwinner T113-s3 SoC.
The SoC features two Arm Cortex-A7 cores and 128 MB of co-packaged DDR3
DRAM. The board adds mostly connectors and the required regulators, plus
a Realtek RTL8189FTV WiFi chip.
Power comes in via a USB-C connector wired as a peripheral, and there is
a second USB-C connector usable as a host port.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm/boot/dts/Makefile                    |   1 +
 .../arm/boot/dts/sun8i-t113s-mangopi-mq-r.dts | 160 ++++++++++++++++++
 2 files changed, 161 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun8i-t113s-mangopi-mq-r.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index d08a3c450ce72..39fd893682924 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1390,6 +1390,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
 	sun8i-s3-elimo-initium.dtb \
 	sun8i-s3-lichee-zero-plus.dtb \
 	sun8i-s3-pinecube.dtb \
+	sun8i-t113s-mangopi-mq-r.dtb \
 	sun8i-t3-cqa3t-bv3.dtb \
 	sun8i-v3-sl631-imx179.dtb \
 	sun8i-v3s-licheepi-zero.dtb \
diff --git a/arch/arm/boot/dts/sun8i-t113s-mangopi-mq-r.dts b/arch/arm/boot/dts/sun8i-t113s-mangopi-mq-r.dts
new file mode 100644
index 0000000000000..ed4d5217d7b0d
--- /dev/null
+++ b/arch/arm/boot/dts/sun8i-t113s-mangopi-mq-r.dts
@@ -0,0 +1,160 @@
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// Copyright (C) 2022 Arm Ltd.
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+
+/dts-v1/;
+
+#include "sun8i-t113s.dtsi"
+
+/ {
+	model = "MangoPi MQ-R";
+	compatible = "widora,mangopi-mq-r", "allwinner,sun8i-t113s";
+
+	aliases {
+		ethernet0 = &rtl8189ftv;
+		serial3 = &uart3;
+	};
+
+	chosen {
+		stdout-path = "serial3:115200n8";
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led-0 {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_STATUS;
+			gpios = <&pio 3 22 GPIO_ACTIVE_LOW>; /* PD22 */
+		};
+	};
+
+	/* board wide 5V supply directly from the USB-C socket */
+	reg_vcc5v: vcc5v {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc-5v";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-always-on;
+	};
+
+	/* SY8008 DC/DC regulator on the board */
+	reg_3v3: regulator-3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc-3v3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		vin-supply = <&reg_vcc5v>;
+	};
+
+	/* SY8008 DC/DC regulator on the board, also supplying VDD-SYS */
+	reg_vcc_core: regulator-core {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc-core";
+		regulator-min-microvolt = <880000>;
+		regulator-max-microvolt = <880000>;
+		vin-supply = <&reg_vcc5v>;
+	};
+
+	/* XC6206 LDO on the board */
+	reg_avdd2v8: regulator-avdd {
+		compatible = "regulator-fixed";
+		regulator-name = "avdd2v8";
+		regulator-min-microvolt = <2800000>;
+		regulator-max-microvolt = <2800000>;
+		vin-supply = <&reg_3v3>;
+	};
+
+	wifi_pwrseq: wifi-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		reset-gpios = <&pio 6 12 GPIO_ACTIVE_LOW>; /* PG12 */
+	};
+};
+
+&cpu0 {
+	cpu-supply = <&reg_vcc_core>;
+};
+
+&cpu1 {
+	cpu-supply = <&reg_vcc_core>;
+};
+
+&dcxo {
+	clock-frequency = <24000000>;
+};
+
+&ehci1 {
+	status = "okay";
+};
+
+&mmc0 {
+	pinctrl-0 = <&mmc0_pins>;
+	pinctrl-names = "default";
+	vmmc-supply = <&reg_3v3>;
+	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
+	disable-wp;
+	bus-width = <4>;
+	status = "okay";
+};
+
+&mmc1 {
+	pinctrl-0 = <&mmc1_pins>;
+	pinctrl-names = "default";
+	vmmc-supply = <&reg_3v3>;
+	non-removable;
+	bus-width = <4>;
+	mmc-pwrseq = <&wifi_pwrseq>;
+	status = "okay";
+
+	rtl8189ftv: wifi@1 {
+		reg = <1>;
+		interrupt-parent = <&pio>;
+		interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 = WL_WAKE_AP */
+		interrupt-names = "host-wake";
+	};
+};
+
+&ohci1 {
+	status = "okay";
+};
+
+&pio {
+	vcc-pb-supply = <&reg_3v3>;
+	vcc-pd-supply = <&reg_3v3>;
+	vcc-pe-supply = <&reg_avdd2v8>;
+	vcc-pf-supply = <&reg_3v3>;
+	vcc-pg-supply = <&reg_3v3>;
+};
+
+&reg_ldoa {
+	regulator-always-on;
+	regulator-name = "vcc-1v8";
+	regulator-min-microvolt = <1800000>;
+	regulator-max-microvolt = <1800000>;
+	ldo-in-supply = <&reg_3v3>;
+};
+
+&reg_ldob {
+	regulator-name = "vcc-dram";
+	regulator-always-on;
+	ldo-in-supply = <&reg_3v3>;
+};
+
+&uart3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart3_pb_pins>;
+	status = "okay";
+};
+
+/* The USB-C socket has its CC pins pulled to GND, so is hardwired as a UFP. */
+&usb_otg {
+	dr_mode = "peripheral";
+	status = "okay";
+};
+
+&usbphy {
+	usb1_vbus-supply = <&reg_vcc5v>;
+	status = "okay";
+};
-- 
2.35.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 3/4] dt-bindings: arm: sunxi: document MangoPi MQ-R board name
  2023-01-06  1:01 ` [PATCH 3/4] dt-bindings: arm: sunxi: document MangoPi MQ-R board name Andre Przywara
@ 2023-01-06  9:21   ` Krzysztof Kozlowski
  2023-01-06 10:28     ` Andre Przywara
  2023-01-06 11:07   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 12+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-06  9:21 UTC (permalink / raw)
  To: Andre Przywara, Samuel Holland, Jernej Skrabec, Chen-Yu Tsai,
	Rob Herring, Krzysztof Kozlowski
  Cc: Icenowy Zheng, András Szemzö,
	Fabien Poussin, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	linux-arm-kernel, devicetree, linux-sunxi, linux-riscv,
	linux-kernel

On 06/01/2023 02:01, Andre Przywara wrote:
> The MangoPi MQ-R board is a close relative to its Allwinner D1/D1s
> siblings, but features two Arm Cortex-A7 cores instead of a RISC-V core.
> 
> Add the board/SoC compatible string pair to the list of known boards.
> 
> 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 3ad1cd50e3fe0..ce445c5ed81c8 100644
> --- a/Documentation/devicetree/bindings/arm/sunxi.yaml
> +++ b/Documentation/devicetree/bindings/arm/sunxi.yaml
> @@ -843,6 +843,11 @@ properties:
>            - const: wexler,tab7200
>            - const: allwinner,sun7i-a20
>  
> +      - description: MangoPi MQ-R board
> +        items:
> +          - const: widora,mangopi-mq-r

Not documented vendor prefix.

Best regards,
Krzysztof


_______________________________________________
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] 12+ messages in thread

* Re: [PATCH 4/4] ARM: dts: sunxi: add MangoPi MQ-R board
  2023-01-06  1:01 ` [PATCH 4/4] ARM: dts: sunxi: add MangoPi MQ-R board Andre Przywara
@ 2023-01-06  9:21   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-06  9:21 UTC (permalink / raw)
  To: Andre Przywara, Samuel Holland, Jernej Skrabec, Chen-Yu Tsai,
	Rob Herring, Krzysztof Kozlowski
  Cc: Icenowy Zheng, András Szemzö,
	Fabien Poussin, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	linux-arm-kernel, devicetree, linux-sunxi, linux-riscv,
	linux-kernel, Arnd Bergmann, Olof Johansson, soc

On 06/01/2023 02:01, Andre Przywara wrote:
> The MangoPi MQ-R is a small SBC with the Allwinner T113-s3 SoC.
> The SoC features two Arm Cortex-A7 cores and 128 MB of co-packaged DDR3
> DRAM. The board adds mostly connectors and the required regulators, plus
> a Realtek RTL8189FTV WiFi chip.
> Power comes in via a USB-C connector wired as a peripheral, and there is
> a second USB-C connector usable as a host port.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  arch/arm/boot/dts/Makefile                    |   1 +
>  .../arm/boot/dts/sun8i-t113s-mangopi-mq-r.dts | 160 ++++++++++++++++++
>  2 files changed, 161 insertions(+)
>  create mode 100644 arch/arm/boot/dts/sun8i-t113s-mangopi-mq-r.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index d08a3c450ce72..39fd893682924 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -1390,6 +1390,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
>  	sun8i-s3-elimo-initium.dtb \
>  	sun8i-s3-lichee-zero-plus.dtb \
>  	sun8i-s3-pinecube.dtb \
> +	sun8i-t113s-mangopi-mq-r.dtb \
>  	sun8i-t3-cqa3t-bv3.dtb \
>  	sun8i-v3-sl631-imx179.dtb \
>  	sun8i-v3s-licheepi-zero.dtb \
> diff --git a/arch/arm/boot/dts/sun8i-t113s-mangopi-mq-r.dts b/arch/arm/boot/dts/sun8i-t113s-mangopi-mq-r.dts
> new file mode 100644
> index 0000000000000..ed4d5217d7b0d
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun8i-t113s-mangopi-mq-r.dts
> @@ -0,0 +1,160 @@
> +// SPDX-License-Identifier: (GPL-2.0+ or MIT)
> +// Copyright (C) 2022 Arm Ltd.
> +
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/leds/common.h>
> +
> +/dts-v1/;
> +
> +#include "sun8i-t113s.dtsi"
> +
> +/ {
> +	model = "MangoPi MQ-R";
> +	compatible = "widora,mangopi-mq-r", "allwinner,sun8i-t113s";
> +
> +	aliases {
> +		ethernet0 = &rtl8189ftv;
> +		serial3 = &uart3;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial3:115200n8";
> +	};
> +
> +	leds {
> +		compatible = "gpio-leds";
> +
> +		led-0 {
> +			color = <LED_COLOR_ID_BLUE>;
> +			function = LED_FUNCTION_STATUS;
> +			gpios = <&pio 3 22 GPIO_ACTIVE_LOW>; /* PD22 */
> +		};
> +	};
> +
> +	/* board wide 5V supply directly from the USB-C socket */
> +	reg_vcc5v: vcc5v {

Generic node names, so matching style of other - with regulator prefix.

> +		compatible = "regulator-fixed";
> +		regulator-name = "vcc-5v";
> +		regulator-min-microvolt = <5000000>;
> +		regulator-max-microvolt = <5000000>;
> +		regulator-always-on;
> +	};
> +
> +	/* SY8008 DC/DC regulator on the board */
> +	reg_3v3: regulator-3v3 {


Best regards,
Krzysztof


_______________________________________________
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] 12+ messages in thread

* Re: [PATCH 3/4] dt-bindings: arm: sunxi: document MangoPi MQ-R board name
  2023-01-06  9:21   ` Krzysztof Kozlowski
@ 2023-01-06 10:28     ` Andre Przywara
  0 siblings, 0 replies; 12+ messages in thread
From: Andre Przywara @ 2023-01-06 10:28 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Samuel Holland, Jernej Skrabec, Chen-Yu Tsai, Rob Herring,
	Krzysztof Kozlowski, Icenowy Zheng, András Szemzö,
	Fabien Poussin, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	linux-arm-kernel, devicetree, linux-sunxi, linux-riscv,
	linux-kernel

On Fri, 6 Jan 2023 10:21:04 +0100
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> On 06/01/2023 02:01, Andre Przywara wrote:
> > The MangoPi MQ-R board is a close relative to its Allwinner D1/D1s
> > siblings, but features two Arm Cortex-A7 cores instead of a RISC-V core.
> > 
> > Add the board/SoC compatible string pair to the list of known boards.
> > 
> > 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 3ad1cd50e3fe0..ce445c5ed81c8 100644
> > --- a/Documentation/devicetree/bindings/arm/sunxi.yaml
> > +++ b/Documentation/devicetree/bindings/arm/sunxi.yaml
> > @@ -843,6 +843,11 @@ properties:
> >            - const: wexler,tab7200
> >            - const: allwinner,sun7i-a20
> >  
> > +      - description: MangoPi MQ-R board
> > +        items:
> > +          - const: widora,mangopi-mq-r  
> 
> Not documented vendor prefix.

Yes, after sending I realised that I forgot to mention that this
series relies on Samuel's D1/D1s DT series[1], which adds the basic .dtsi
this builds on, but also adds this vendor string[2].
Functionality-wise this also relies on the R528/T113-s clock series[3].

Cheers,
Andre

[1]
https://lore.kernel.org/linux-arm-kernel/20221231233851.24923-1-samuel@sholland.org/
[2]
https://lore.kernel.org/linux-arm-kernel/20221231233851.24923-3-samuel@sholland.org/
[3]
https://lore.kernel.org/linux-arm-kernel/20221231231429.18357-1-samuel@sholland.org/

_______________________________________________
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] 12+ messages in thread

* Re: [PATCH 3/4] dt-bindings: arm: sunxi: document MangoPi MQ-R board name
  2023-01-06  1:01 ` [PATCH 3/4] dt-bindings: arm: sunxi: document MangoPi MQ-R board name Andre Przywara
  2023-01-06  9:21   ` Krzysztof Kozlowski
@ 2023-01-06 11:07   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-06 11:07 UTC (permalink / raw)
  To: Andre Przywara, Samuel Holland, Jernej Skrabec, Chen-Yu Tsai,
	Rob Herring, Krzysztof Kozlowski
  Cc: Icenowy Zheng, András Szemzö,
	Fabien Poussin, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	linux-arm-kernel, devicetree, linux-sunxi, linux-riscv,
	linux-kernel

On 06/01/2023 02:01, Andre Przywara wrote:
> The MangoPi MQ-R board is a close relative to its Allwinner D1/D1s
> siblings, but features two Arm Cortex-A7 cores instead of a RISC-V core.
> 
> Add the board/SoC compatible string pair to the list of known boards.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  Documentation/devicetree/bindings/arm/sunxi.yaml | 5 +++++


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


_______________________________________________
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] 12+ messages in thread

* Re: [PATCH 0/4] ARM: dts: sunxi: Add MangoPi MQ-R board support
  2023-01-06  1:01 [PATCH 0/4] ARM: dts: sunxi: Add MangoPi MQ-R board support Andre Przywara
                   ` (3 preceding siblings ...)
  2023-01-06  1:01 ` [PATCH 4/4] ARM: dts: sunxi: add MangoPi MQ-R board Andre Przywara
@ 2023-01-06 17:17 ` Andre Przywara
  4 siblings, 0 replies; 12+ messages in thread
From: Andre Przywara @ 2023-01-06 17:17 UTC (permalink / raw)
  To: Samuel Holland, Jernej Skrabec, Chen-Yu Tsai, Rob Herring,
	Krzysztof Kozlowski
  Cc: Icenowy Zheng, András Szemzö,
	Fabien Poussin, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	linux-arm-kernel, devicetree, linux-sunxi, linux-riscv,
	linux-kernel

On Fri,  6 Jan 2023 01:01:51 +0000
Andre Przywara <andre.przywara@arm.com> wrote:

> The MangoPi MQ-R is a small SBC with the Allwinner T113-s3 SoC. That is
> a very close relative to the Allwinner D1/D1s SoCs, but with Arm
> Cortex-A7 cores, and 128 MB of SIP co-packaged DDR3 DRAM.
> 
> This series introduces the missing T113-s .dtsi, which builds on top of
> the D1/D1s .dtsi, but adds the ARM specific peripherals, like the CPU
> cores, the arch timer, the GIC and the PMU.
> This requires to add a symlink to the RISC-V DT directory in patch 1/4,
> to be able to easily reference the base .dtsi from other architecture
> directories.

First, forgot to mention that this builds on top of Samuel's D1/D1s DT
series:
https://lore.kernel.org/linux-arm-kernel/20221231233851.24923-1-samuel@sholland.org/
To actually boot, this also relies on the R528/T113s clock series:
https://lore.kernel.org/linux-arm-kernel/20221231231429.18357-1-samuel@sholland.org/

> After I had written most of the board .dts, I realised that the
> MangoPi MQ is almost the same, minus the RISC-V/ARM difference. I am a
> bit unsure if we should share more of the board .dts, though, as this
> would go cross architectures. I am open to any comments here.

So after getting some sleep and having a look at the MangoPi website
again, I realised that there is of course a D1s edition of the MQ-R as
well. So shall we split this up like this:
- a sunxi-mangopi-mq.dtsi, which contains all the board specific nodes
- a sun20i-d1-mangopi-mq.dts, which includes that and sun20i-d1s.dtsi
- a sun20i-d1-mangopi-mq-r.dts, which maybe includes
  sun20i-d1-mangopi-mq.dts, and just overwrites the model name?
- a sun8i-t113s-mangopi-mq-r.dts, which includes sunxi-mangopi-mq.dtsi
  and sun8i-t113s.dtsi

Let me know if this useful or more confusing.

Cheers,
Andre


> Andre Przywara (4):
>   dts: add riscv include prefix link
>   ARM: dts: sunxi: add Allwinner T113-s SoC .dtsi
>   dt-bindings: arm: sunxi: document MangoPi MQ-R board name
>   ARM: dts: sunxi: add MangoPi MQ-R board
> 
>  .../devicetree/bindings/arm/sunxi.yaml        |   5 +
>  arch/arm/boot/dts/Makefile                    |   1 +
>  .../arm/boot/dts/sun8i-t113s-mangopi-mq-r.dts | 160 ++++++++++++++++++
>  arch/arm/boot/dts/sun8i-t113s.dtsi            |  59 +++++++
>  scripts/dtc/include-prefixes/riscv            |   1 +
>  5 files changed, 226 insertions(+)
>  create mode 100644 arch/arm/boot/dts/sun8i-t113s-mangopi-mq-r.dts
>  create mode 100644 arch/arm/boot/dts/sun8i-t113s.dtsi
>  create mode 120000 scripts/dtc/include-prefixes/riscv
> 


_______________________________________________
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] 12+ messages in thread

* Re: [PATCH 1/4] dts: add riscv include prefix link
  2023-01-06  1:01 ` [PATCH 1/4] dts: add riscv include prefix link Andre Przywara
@ 2023-01-08 17:15   ` Conor Dooley
  2023-03-07 20:59   ` Palmer Dabbelt
  1 sibling, 0 replies; 12+ messages in thread
From: Conor Dooley @ 2023-01-08 17:15 UTC (permalink / raw)
  To: Andre Przywara
  Cc: Samuel Holland, Jernej Skrabec, Chen-Yu Tsai, Rob Herring,
	Krzysztof Kozlowski, Icenowy Zheng, András Szemzö,
	Fabien Poussin, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	linux-arm-kernel, devicetree, linux-sunxi, linux-riscv,
	linux-kernel, Frank Rowand


[-- Attachment #1.1: Type: text/plain, Size: 953 bytes --]

On Fri, Jan 06, 2023 at 01:01:52AM +0000, Andre Przywara wrote:
> The Allwinner D1/D1s SoCs (with a RISC-V core) use an (almost?) identical
> die as their R528/T113-s siblings with ARM Cortex-A7 cores.
> 
> To allow sharing the basic SoC .dtsi files across those two
> architectures as well, introduce a symlink to the RISC-V DT directory.

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  scripts/dtc/include-prefixes/riscv | 1 +
>  1 file changed, 1 insertion(+)
>  create mode 120000 scripts/dtc/include-prefixes/riscv
> 
> diff --git a/scripts/dtc/include-prefixes/riscv b/scripts/dtc/include-prefixes/riscv
> new file mode 120000
> index 0000000000000..2025094189380
> --- /dev/null
> +++ b/scripts/dtc/include-prefixes/riscv
> @@ -0,0 +1 @@
> +../../../arch/riscv/boot/dts
> \ No newline at end of file
> -- 
> 2.35.5
> 
> 

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 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] 12+ messages in thread

* Re: [PATCH 1/4] dts: add riscv include prefix link
  2023-01-06  1:01 ` [PATCH 1/4] dts: add riscv include prefix link Andre Przywara
  2023-01-08 17:15   ` Conor Dooley
@ 2023-03-07 20:59   ` Palmer Dabbelt
  1 sibling, 0 replies; 12+ messages in thread
From: Palmer Dabbelt @ 2023-03-07 20:59 UTC (permalink / raw)
  To: andre.przywara
  Cc: samuel, jernej.skrabec, wens, robh+dt, krzysztof.kozlowski+dt,
	uwu, szemzo.andras, fabien.poussin, Paul Walmsley, aou,
	linux-arm-kernel, devicetree, linux-sunxi, linux-riscv,
	linux-kernel, frowand.list

On Thu, 05 Jan 2023 17:01:52 PST (-0800), andre.przywara@arm.com wrote:
> The Allwinner D1/D1s SoCs (with a RISC-V core) use an (almost?) identical
> die as their R528/T113-s siblings with ARM Cortex-A7 cores.
>
> To allow sharing the basic SoC .dtsi files across those two
> architectures as well, introduce a symlink to the RISC-V DT directory.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  scripts/dtc/include-prefixes/riscv | 1 +
>  1 file changed, 1 insertion(+)
>  create mode 120000 scripts/dtc/include-prefixes/riscv
>
> diff --git a/scripts/dtc/include-prefixes/riscv b/scripts/dtc/include-prefixes/riscv
> new file mode 120000
> index 0000000000000..2025094189380
> --- /dev/null
> +++ b/scripts/dtc/include-prefixes/riscv
> @@ -0,0 +1 @@
> +../../../arch/riscv/boot/dts
> \ No newline at end of file

Acked-by: Palmer Dabbelt <palmer@rivosinc.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] 12+ messages in thread

end of thread, other threads:[~2023-03-07 21:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-06  1:01 [PATCH 0/4] ARM: dts: sunxi: Add MangoPi MQ-R board support Andre Przywara
2023-01-06  1:01 ` [PATCH 1/4] dts: add riscv include prefix link Andre Przywara
2023-01-08 17:15   ` Conor Dooley
2023-03-07 20:59   ` Palmer Dabbelt
2023-01-06  1:01 ` [PATCH 2/4] ARM: dts: sunxi: add Allwinner T113-s SoC .dtsi Andre Przywara
2023-01-06  1:01 ` [PATCH 3/4] dt-bindings: arm: sunxi: document MangoPi MQ-R board name Andre Przywara
2023-01-06  9:21   ` Krzysztof Kozlowski
2023-01-06 10:28     ` Andre Przywara
2023-01-06 11:07   ` Krzysztof Kozlowski
2023-01-06  1:01 ` [PATCH 4/4] ARM: dts: sunxi: add MangoPi MQ-R board Andre Przywara
2023-01-06  9:21   ` Krzysztof Kozlowski
2023-01-06 17:17 ` [PATCH 0/4] ARM: dts: sunxi: Add MangoPi MQ-R board support Andre Przywara

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).