Skip to contentSkip to conversation

Add support for Boundary Nitrogen8M Mini SBC

PATCH Superseded Adrien Grassein 2 participants 7 messages Jan 13, 2021

Subsystems (2)

v2 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v2 cover Add support for Boundary Nitrogen8M Mini SBC

Hello,

This patch set aims is to add the support of the Nitrogen8M Mini SBC from Boundary Devices.

Thanks,

Update in v2:
- Rewrite the dts (Remove the unused wlan and audio);
- Remove useless definition;
- Take in account review.

Adrien Grassein (3):
dt-bindings: arm: imx: add imx8mm nitrogen support
arm64: dts: imx: Add i.mx8mm nitrogen8mm basic dts support
arm64: defconfig: Enable PF8x00 as builtin

 .../devicetree/bindings/arm/fsl.yaml          |   1 +
 arch/arm64/boot/dts/freescale/Makefile        |   1 +
 .../dts/freescale/imx8mm-nitrogen8mm_rev2.dts | 364 ++++++++++++++++++
 arch/arm64/configs/defconfig                  |   1 +
 4 files changed, 367 insertions(+)
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-nitrogen8mm_rev2.dts
Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 1/3 dt-bindings: arm: imx: add imx8mm nitrogen support

The Nitrogen8M Mini is an ARM based single board computer (SBC).

---
 Documentation/devicetree/bindings/arm/fsl.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/fsl.yaml +1 -0
index cee74fc0c115..c09d58ebb0f3 100644
@@ -670,6 +670,7 @@ properties:
         items:
           - enum:
               - beacon,imx8mm-beacon-kit  # i.MX8MM Beacon Development Kit
+              - boundary,imx8mm-nitrogen8mm  # i.MX8MM Nitrogen Board
               - fsl,imx8mm-ddr4-evk       # i.MX8MM DDR4 EVK Board
               - fsl,imx8mm-evk            # i.MX8MM EVK Board
               - kontron,imx8mm-n801x-som  # i.MX8MM Kontron SL (N801X) SOM
Signature · 1 line
2.25.1
#3 lore raw

PATCH v2 2/3 arm64: dts: imx: Add i.mx8mm nitrogen8mm basic dts support

In reply to Adrien Grassein

Tested with a basic Build Root configuration booting from sdcard.

---
 arch/arm64/boot/dts/freescale/Makefile        |   1 +
 .../dts/freescale/imx8mm-nitrogen8mm_rev2.dts | 364 ++++++++++++++++++
 2 files changed, 365 insertions(+)
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-nitrogen8mm_rev2.dts
arch/arm64/boot/dts/freescale/Makefile +1 -0
index 901d80086b47..b2eb7a5e4db3 100644
@@ -45,6 +45,7 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mq-librem5-devkit.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-librem5-r2.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-librem5-r3.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-nitrogen.dtb
+dtb-$(CONFIG_ARCH_MXC) += imx8mm-nitrogen8mm_rev2.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-phanbell.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-pico-pi.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-thor96.dtb
arch/arm64/boot/dts/freescale/imx8mm-nitrogen8mm_rev2.dts new file +364 -0

364 lines not on this page · raw message

Signature · 1 line
2.25.1
#4 lore raw

Re: [PATCH v2 2/3] arm64: dts: imx: Add i.mx8mm nitrogen8mm basic dts support

Quoted 42 lines · Adrien Grassein

Tested with a basic Build Root configuration booting from sdcard.

---
 arch/arm64/boot/dts/freescale/Makefile        |   1 +
 .../dts/freescale/imx8mm-nitrogen8mm_rev2.dts | 364 ++++++++++++++++++
 2 files changed, 365 insertions(+)
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-nitrogen8mm_rev2.dts
arch/arm64/boot/dts/freescale/Makefile +1 -0
index 901d80086b47..b2eb7a5e4db3 100644
@@ -45,6 +45,7 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mq-librem5-devkit.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-librem5-r2.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-librem5-r3.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-nitrogen.dtb
+dtb-$(CONFIG_ARCH_MXC) += imx8mm-nitrogen8mm_rev2.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-phanbell.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-pico-pi.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-thor96.dtb
arch/arm64/boot/dts/freescale/imx8mm-nitrogen8mm_rev2.dts new file +15 -0
new file mode 100644
index 000000000000..506e467ebf16
@@ -0,0 +1,364 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree file for Boundary Devices i.MX8MMini Nitrogen8MM Rev2 board.
+ * Adrien Grassein <[email protected]>
+ */
+/dts-v1/;
+#include "imx8mm.dtsi"
+
+/ {
+	model = "Boundary Devices i.MX8MMini Nitrogen8MM Rev2";
+	compatible = "boundary,imx8mm-nitrogen8mm", "fsl,imx8mm";
+
+	reg_vref_1v8: regulator-vref-1v8 {
+		compatible = "regulator-fixed";
+		regulator-name = "vref-1v8";

arch/arm64/boot/dts/freescale/imx8mm-nitrogen8mm_rev2.dts line 25

Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mm-nitrogen8mm_rev2.dts new file +10 -0
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+	};
+
+	reg_vref_3v3: regulator-vref-3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "vref-3v3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+	};

Why do you need these two regulators? They don't do anything, there is no control over them.

Quoted 24 lines
arch/arm64/boot/dts/freescale/imx8mm-nitrogen8mm_rev2.dts new file +24 -0
+};
+
+&A53_0 {
+	cpu-supply = <&reg_sw3>;
+};
+
+&A53_1 {
+	cpu-supply = <&reg_sw3>;
+};
+
+&A53_2 {
+	cpu-supply = <&reg_sw3>;
+};
+
+&A53_3 {
+	cpu-supply = <&reg_sw3>;
+};
+
+&i2c1 {
+	clock-frequency = <400000>;
+	pinctrl-names = "default", "gpio";
+	pinctrl-0 = <&pinctrl_i2c1>;
+	pinctrl-1 = <&pinctrl_i2c1_1>;
+	scl-gpios = <&gpio5 14 GPIO_OPEN_DRAIN>;

arch/arm64/boot/dts/freescale/imx8mm-nitrogen8mm_rev2.dts line 59

Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mm-nitrogen8mm_rev2.dts new file +10 -0
+	sda-gpios = <&gpio5 15 GPIO_OPEN_DRAIN>;
+	status = "okay";
+
+	pmic@8 {
+		compatible = "nxp,pf8121a";
+		reg = <0x8>;
+		status = "okay";
+
+		regulators {
+			reg_ldo2: ldo2 {

The PMIC regulators should be described fully, so bring them back from the v1.

Quoted 7 lines
arch/arm64/boot/dts/freescale/imx8mm-nitrogen8mm_rev2.dts new file +7 -0
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-max-microvolt = <5000000>;
+				regulator-min-microvolt = <1500000>;
+			};
+
+			reg_sw3: buck3 {

arch/arm64/boot/dts/freescale/imx8mm-nitrogen8mm_rev2.dts line 76

Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mm-nitrogen8mm_rev2.dts new file +10 -0
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-max-microvolt = <1800000>;
+				regulator-min-microvolt =  <400000>;
+			};
+		};
+	};
+};
+
+&fec1 {

Please order the overridden nodes alphabetically, with iomux exception which goes to the end (by convention in NXP). You define i2c1, then fec1 and then i2c3. Should be fec1, i2c1 and then i2c3.

Best regards,
Krzysztof

#5 lore raw

Re: [PATCH v2 2/3] arm64: dts: imx: Add i.mx8mm nitrogen8mm basic dts support

Quoted 49 lines · Krzysztof Kozlowski
Quoted 47 lines · Adrien Grassein

Tested with a basic Build Root configuration booting from sdcard.

---
 arch/arm64/boot/dts/freescale/Makefile        |   1 +
 .../dts/freescale/imx8mm-nitrogen8mm_rev2.dts | 364 ++++++++++++++++++
 2 files changed, 365 insertions(+)
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-nitrogen8mm_rev2.dts
arch/arm64/boot/dts/freescale/Makefile +1 -0
index 901d80086b47..b2eb7a5e4db3 100644
@@ -45,6 +45,7 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mq-librem5-devkit.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-librem5-r2.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-librem5-r3.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-nitrogen.dtb
+dtb-$(CONFIG_ARCH_MXC) += imx8mm-nitrogen8mm_rev2.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-phanbell.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-pico-pi.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-thor96.dtb
arch/arm64/boot/dts/freescale/imx8mm-nitrogen8mm_rev2.dts new file +20 -0
new file mode 100644
index 000000000000..506e467ebf16
@@ -0,0 +1,364 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree file for Boundary Devices i.MX8MMini Nitrogen8MM Rev2 board.
+ * Adrien Grassein <[email protected]>
+ */
+/dts-v1/;
+#include "imx8mm.dtsi"
+
+/ {
+     model = "Boundary Devices i.MX8MMini Nitrogen8MM Rev2";
+     compatible = "boundary,imx8mm-nitrogen8mm", "fsl,imx8mm";
+
+     reg_vref_1v8: regulator-vref-1v8 {
+             compatible = "regulator-fixed";
+             regulator-name = "vref-1v8";
+             regulator-min-microvolt = <1800000>;
+             regulator-max-microvolt = <1800000>;
+     };
+
+     reg_vref_3v3: regulator-vref-3v3 {
Quoted 9 lines

arch/arm64/boot/dts/freescale/imx8mm-nitrogen8mm_rev2.dts line 25

Quoted 5 lines
arch/arm64/boot/dts/freescale/imx8mm-nitrogen8mm_rev2.dts new file +5 -0
+             compatible = "regulator-fixed";
+             regulator-name = "vref-3v3";
+             regulator-min-microvolt = <3300000>;
+             regulator-max-microvolt = <3300000>;
+     };

Why do you need these two regulators? They don't do anything, there is no control over them.

Sorry, I guess it was usefull for the eMMc, but after a test, it xas not. It will be removed in v3.

Quoted 60 lines
Quoted 24 lines
arch/arm64/boot/dts/freescale/imx8mm-nitrogen8mm_rev2.dts new file +24 -0
+};
+
+&A53_0 {
+     cpu-supply = <&reg_sw3>;
+};
+
+&A53_1 {
+     cpu-supply = <&reg_sw3>;
+};
+
+&A53_2 {
+     cpu-supply = <&reg_sw3>;
+};
+
+&A53_3 {
+     cpu-supply = <&reg_sw3>;
+};
+
+&i2c1 {
+     clock-frequency = <400000>;
+     pinctrl-names = "default", "gpio";
+     pinctrl-0 = <&pinctrl_i2c1>;
+     pinctrl-1 = <&pinctrl_i2c1_1>;
+     scl-gpios = <&gpio5 14 GPIO_OPEN_DRAIN>;

arch/arm64/boot/dts/freescale/imx8mm-nitrogen8mm_rev2.dts line 59

Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mm-nitrogen8mm_rev2.dts new file +10 -0
+     sda-gpios = <&gpio5 15 GPIO_OPEN_DRAIN>;
+     status = "okay";
+
+     pmic@8 {
+             compatible = "nxp,pf8121a";
+             reg = <0x8>;
+             status = "okay";
+
+             regulators {
+                     reg_ldo2: ldo2 {

The PMIC regulators should be described fully, so bring them back from the v1.

Quoted 7 lines
arch/arm64/boot/dts/freescale/imx8mm-nitrogen8mm_rev2.dts new file +7 -0
+                             regulator-always-on;
+                             regulator-boot-on;
+                             regulator-max-microvolt = <5000000>;
+                             regulator-min-microvolt = <1500000>;
+                     };
+
+                     reg_sw3: buck3 {

arch/arm64/boot/dts/freescale/imx8mm-nitrogen8mm_rev2.dts line 76

Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mm-nitrogen8mm_rev2.dts new file +10 -0
+                             regulator-always-on;
+                             regulator-boot-on;
+                             regulator-max-microvolt = <1800000>;
+                             regulator-min-microvolt =  <400000>;
+                     };
+             };
+     };
+};
+
+&fec1 {

Please order the overridden nodes alphabetically, with iomux exception which goes to the end (by convention in NXP). You define i2c1, then fec1 and then i2c3. Should be fec1, i2c1 and then i2c3.

Quoted 2 lines

Best regards,
Krzysztof

Thanks a lot for you reviews,
Best regards,
Adrien

#6 lore raw

PATCH v2 3/3 arm64: defconfig: Enable PF8x00 as builtin

In reply to Adrien Grassein

This driver is mandatory for the nitrogen8m mini board when booting from the sdcard slot.

---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
index 3ca9d03d5cb3..bd6ac11ad6fc 100644
@@ -603,6 +603,7 @@ CONFIG_REGULATOR_HI655X=y
 CONFIG_REGULATOR_MAX77620=y
 CONFIG_REGULATOR_MAX8973=y
 CONFIG_REGULATOR_PCA9450=y
+CONFIG_REGULATOR_PF8X00=y
 CONFIG_REGULATOR_PFUZE100=y
 CONFIG_REGULATOR_PWM=y
 CONFIG_REGULATOR_QCOM_RPMH=y
Signature · 1 line
2.25.1