[3/5] ARM: dts: sun8i: s3: Add dtsi for the Elimo Impetus SoM
diff mbox series

Message ID 20201029022000.601913-4-matteo.scordino@gmail.com
State New, archived
Headers show
Series
  • Elimo Impetus and Initium support
Related show

Commit Message

Matteo Scordino Oct. 29, 2020, 2:19 a.m. UTC
The Elimo Engineering Impetus is an Open Source Hardware System-on-Module
based on the SoChip S3 SoC.

It is meant for integration into carrier boards or, more generally,
larger designs, and uses an M2 connector to facilitate that.

Interfaces on the M.2/NGFF 42mm connector:
WiFi IEEE 802. 11abgn (on-module Realtek)
Bluetooth 4.2/BLE (on-module Realtek)
RGB LCD Interface (on-module connector)
MIPI Camera Interface (on-module connector)
IEEE 802. 3u Ethernet MAC (external connecto)
USB2.0 (Host, Device, OTG) (external connector)
Audio Line In/Out (external connector)

Signed-off-by: Matteo Scordino <matteo.scordino@gmail.com>
---
 arch/arm/boot/dts/sun8i-s3-elimo-impetus.dtsi | 51 +++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun8i-s3-elimo-impetus.dtsi

Comments

Paul Kocialkowski Oct. 29, 2020, 10:09 a.m. UTC | #1
Hi,

On Thu 29 Oct 20, 02:19, Matteo Scordino wrote:
> The Elimo Engineering Impetus is an Open Source Hardware System-on-Module
> based on the SoChip S3 SoC.
> 
> It is meant for integration into carrier boards or, more generally,
> larger designs, and uses an M2 connector to facilitate that.
> 
> Interfaces on the M.2/NGFF 42mm connector:
> WiFi IEEE 802. 11abgn (on-module Realtek)
> Bluetooth 4.2/BLE (on-module Realtek)
> RGB LCD Interface (on-module connector)
> MIPI Camera Interface (on-module connector)
> IEEE 802. 3u Ethernet MAC (external connecto)
> USB2.0 (Host, Device, OTG) (external connector)
> Audio Line In/Out (external connector)
> 
> Signed-off-by: Matteo Scordino <matteo.scordino@gmail.com>
> ---
>  arch/arm/boot/dts/sun8i-s3-elimo-impetus.dtsi | 51 +++++++++++++++++++
>  1 file changed, 51 insertions(+)
>  create mode 100644 arch/arm/boot/dts/sun8i-s3-elimo-impetus.dtsi
> 
> diff --git a/arch/arm/boot/dts/sun8i-s3-elimo-impetus.dtsi b/arch/arm/boot/dts/sun8i-s3-elimo-impetus.dtsi
> new file mode 100644
> index 000000000000..3550125cf334
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun8i-s3-elimo-impetus.dtsi
> @@ -0,0 +1,51 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (C) 2020 Matteo Scordino <matteo@elimo.io>
> + */
> +
> +/dts-v1/;
> +#include "sun8i-v3.dtsi"
> +#include "sunxi-common-regulators.dtsi"
> +
> +/ {
> +	model = "Elimo Impetus SoM";
> +	compatible = "elimo,impetus", "sochip,s3", "allwinner,sun8i-s3";

I'm wondering what to do about the SoC compatibles here:
- Do we really need the "sochip,s3" compatible, as it seems redundant with
  "allwinner,sun8i-s3"?
- Could we add a "allwinner,sun8i-v3" compatible at the end since there is no
  functional difference between the two?

Another thing is that we should probably add "allwinner,sun8i-v3" to
mach-sunxi/sunxi.c so that it's matched by the DT_MACHINE_START.

If that seems agreeable, I can craft a patch for the latter.

What do you think?

The rest of the dt looks good to me :)

Cheers,

Paul

> +
> +	aliases {
> +		serial0 = &uart0;
> +		serial1 = &uart1;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +};
> +
> +&mmc0 {
> +	broken-cd;
> +	bus-width = <4>;
> +	vmmc-supply = <&reg_vcc3v3>;
> +	status = "okay";
> +};
> +
> +&uart0 {
> +	pinctrl-0 = <&uart0_pb_pins>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +};
> +
> +&uart1 {
> +	pinctrl-0 = <&uart1_pg_pins>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +};
> +
> +&usb_otg {
> +	dr_mode = "otg";
> +	status = "okay";
> +};
> +
> +&usbphy {
> +	usb0_id_det-gpio = <&pio 5 6 GPIO_ACTIVE_HIGH>;
> +	status = "okay";
> +};
> -- 
> 2.20.1
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Matteo Scordino Oct. 30, 2020, 12:18 a.m. UTC | #2
Hello Paul,

Thanks for reviewing! 
It seems from the comments in [PATCH 4/5] that the consensus would be to 
drop allwinner,sun8i-s3 and keep sochip,s3 (I guess due to the fact that
the S3 is distributed by Sochip).
And yes, you're right that it makes sense to add allwinner,sun8i-v3 at 
the end. 

So I guess I will resubmit with:
compatible = "elimo,impetus", "sochip,s3", "allwinner,sun8i-v3";

Regarding adding allwinner,sun8i-v3 to sunxi.c: I agree, but I would
hear Icenowy thinks (I think she added allwinner,sun8i-v3 in a patch
last month).

Patch
diff mbox series

diff --git a/arch/arm/boot/dts/sun8i-s3-elimo-impetus.dtsi b/arch/arm/boot/dts/sun8i-s3-elimo-impetus.dtsi
new file mode 100644
index 000000000000..3550125cf334
--- /dev/null
+++ b/arch/arm/boot/dts/sun8i-s3-elimo-impetus.dtsi
@@ -0,0 +1,51 @@ 
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2020 Matteo Scordino <matteo@elimo.io>
+ */
+
+/dts-v1/;
+#include "sun8i-v3.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+/ {
+	model = "Elimo Impetus SoM";
+	compatible = "elimo,impetus", "sochip,s3", "allwinner,sun8i-s3";
+
+	aliases {
+		serial0 = &uart0;
+		serial1 = &uart1;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&mmc0 {
+	broken-cd;
+	bus-width = <4>;
+	vmmc-supply = <&reg_vcc3v3>;
+	status = "okay";
+};
+
+&uart0 {
+	pinctrl-0 = <&uart0_pb_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
+&uart1 {
+	pinctrl-0 = <&uart1_pg_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
+&usbphy {
+	usb0_id_det-gpio = <&pio 5 6 GPIO_ACTIVE_HIGH>;
+	status = "okay";
+};