Skip to contentSkip to conversation

dt-bindings: arm: Add i.MX8M Plus Gateworks GW74xx board

PATCH Superseded Tim Harvey 2 participants 7 messages Apr 7, 2022 – Apr 9, 2022

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Tim Harvey

author
#0 lore raw

PATCH 1/2 dt-bindings: arm: Add i.MX8M Plus Gateworks GW74xx board

Add DT compatible string for i.MX8M Plus based Gateworks GW74xx board.

Cc Rob Herring <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Pengutronix Kernel Team <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc NXP Linux Team <[email protected]>
---
 Documentation/devicetree/bindings/arm/fsl.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/fsl.yaml +1 -0
index 08bdd30e511c..c04203d537d0 100644
@@ -860,6 +860,7 @@ properties:
         items:
           - enum:
               - fsl,imx8mp-evk            # i.MX8MP EVK Board
+              - gw,imx8mp-gw74xx          # i.MX8MP Gateworks Board
           - const: fsl,imx8mp
 
       - description: PHYTEC phyCORE-i.MX8MP SoM based boards
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 2/2 arm64: dts: imx: Add i.MX8M Plus Gateworks gw7400 dts support

The Gateworks GW7400 is an ARM based single board computer (SBC) featuring:
- i.MX8M Plus SoC
- LPDDR4 DRAM
- eMMC FLASH
- Gateworks System Controller (GSC)
- QOS GbE
- Microchip GbE Switch
- Multiple multi-protocol RS232/RS485/RS422 Serial ports
- USB 3.0 Front panel connector
- onboard 802.11ac WiFi / BT
- 3x miniPCIe socket with PCIe and USB 2.0
- 1x M.2 B/A-E socket with PCIe, USB 3.0 and dual nano-SIM sockets
- off-board connectors for: MIPI DSI, MIPI CSI, SPI, GPIO, I2C
- Wide range DC power input
- Passive PoE
- 802.3at PoE

Cc Rob Herring <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Pengutronix Kernel Team <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc NXP Linux Team <[email protected]>
---
 arch/arm64/boot/dts/freescale/Makefile        |   1 +
 .../dts/freescale/imx8mp-venice-gw74xx.dts    | 897 ++++++++++++++++++
 2 files changed, 898 insertions(+)
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts
arch/arm64/boot/dts/freescale/Makefile +1 -0
index 7f51b537df40..23097b14a3d1 100644
@@ -78,6 +78,7 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mn-var-som-symphony.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mn-venice-gw7902.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mp-phyboard-pollux-rdk.dtb
+dtb-$(CONFIG_ARCH_MXC) += imx8mp-venice-gw74xx.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-evk.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-hummingboard-pulse.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-kontron-pitx-imx8m.dtb
arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts new file +897 -0

897 lines not on this page · raw message

Signature · 1 line
2.17.1
#5 lore raw
In reply to Tim Harvey
Quoted 19 lines · Tim Harvey

Add DT compatible string for i.MX8M Plus based Gateworks GW74xx board.

Cc Rob Herring <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Pengutronix Kernel Team <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc NXP Linux Team <[email protected]>
---
 Documentation/devicetree/bindings/arm/fsl.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/fsl.yaml +0 -0
index 08bdd30e511c..c04203d537d0 100644

Documentation/devicetree/bindings/arm/fsl.yaml properties: · line 863

Quoted 4 lines
Documentation/devicetree/bindings/arm/fsl.yaml +1 -0
@@ -860,6 +860,7 @@ properties:
         items:
           - enum:
               - fsl,imx8mp-evk            # i.MX8MP EVK Board
+              - gw,imx8mp-gw74xx          # i.MX8MP Gateworks Board

gateworks
You are using a deprecated vendor prefix.

Best regards,
Krzysztof

#2 lore raw

Re: [PATCH 2/2] arm64: dts: imx: Add i.MX8M Plus Gateworks gw7400 dts support

In reply to Tim Harvey
Quoted 5 lines · Tim Harvey

The Gateworks GW7400 is an ARM based single board computer (SBC) featuring:
- i.MX8M Plus SoC
- LPDDR4 DRAM
- eMMC FLASH

Thank you for your patch. There is something to discuss/improve.

(...)

arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts line 16

Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts new file +10 -0
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/leds/common.h>
+
+#include "imx8mp.dtsi"
+
+/ {
+	model = "Gateworks Venice GW74xx i.MX8MP board";
+	compatible = "gw,imx8mp-gw74xx", "fsl,imx8mp";

Deprecated vendor prefix.

Quoted 14 lines
arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts new file +14 -0
+
+	aliases {
+		ethernet0 = &eqos;
+		ethernet1 = &fec;
+		ethernet2 = &lan1;
+		ethernet3 = &lan2;
+		ethernet4 = &lan3;
+		ethernet5 = &lan4;
+		ethernet6 = &lan5;
+	};
+
+	chosen {
+		stdout-path = &uart2;
+	};

arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts line 40

Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts new file +10 -0
+
+	memory@40000000 {
+		device_type = "memory";
+		reg = <0x0 0x40000000 0 0x80000000>;
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		user-pb {

Generic node names please, so "key-0" or "user-pb-key" (although adding specific parts is really not needed, because you have the label).

Quoted 38 lines
arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts new file +38 -0
+			label = "user_pb";
+			gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+			linux,code = <BTN_0>;
+		};
+
+		user-pb1x {
+			label = "user_pb1x";
+			linux,code = <BTN_1>;
+			interrupt-parent = <&gsc>;
+			interrupts = <0>;
+		};
+
+		key-erased {
+			label = "key_erased";
+			linux,code = <BTN_2>;
+			interrupt-parent = <&gsc>;
+			interrupts = <1>;
+		};
+
+		eeprom-wp {
+			label = "eeprom_wp";
+			linux,code = <BTN_3>;
+			interrupt-parent = <&gsc>;
+			interrupts = <2>;
+		};
+
+		tamper {
+			label = "tamper";
+			linux,code = <BTN_4>;
+			interrupt-parent = <&gsc>;
+			interrupts = <5>;
+		};
+
+		switch-hold {
+			label = "switch_hold";
+			linux,code = <BTN_5>;
+			interrupt-parent = <&gsc>;
+			interrupts = <7>;

arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts line 88

Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts new file +10 -0
+		};
+	};
+
+	led-controller {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_gpio_leds>;
+
+		led-0 {
+			function = LED_FUNCTION_STATUS;

LED_FUNCTION_HEARTBEAT

Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts new file +10 -0
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio2 15 GPIO_ACTIVE_HIGH>;
+			default-state = "on";
+			linux,default-trigger = "heartbeat";
+		};
+
+		led-1 {
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_RED>;
+			gpios = <&gpio2 16 GPIO_ACTIVE_HIGH>;

arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts line 108

Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts new file +10 -0
+			default-state = "off";
+		};
+	};
+
+	pps {
+		compatible = "pps-gpio";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_pps>;
+		gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+		status = "okay";

No need for status.

Review

Quoted 2 lines
(quoted diff) +2 -0
+	};
+

Best regards,
Krzysztof

author
#6 lore raw
In reply to Krzysztof Kozlowski
Quoted 16 lines · Krzysztof Kozlowski
Quoted 14 lines · Tim Harvey

Add DT compatible string for i.MX8M Plus based Gateworks GW74xx board.

Cc Rob Herring <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Pengutronix Kernel Team <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc NXP Linux Team <[email protected]>
---
 Documentation/devicetree/bindings/arm/fsl.yaml | 1 +
 1 file changed, 1 insertion(+)
Quoted 13 lines

Documentation/devicetree/bindings/arm/fsl.yaml properties: · line 863

Quoted 9 lines
Documentation/devicetree/bindings/arm/fsl.yaml +1 -0
index 08bdd30e511c..c04203d537d0 100644
@@ -860,6 +860,7 @@ properties:
         items:
           - enum:
               - fsl,imx8mp-evk            # i.MX8MP EVK Board
+              - gw,imx8mp-gw74xx          # i.MX8MP Gateworks Board

gateworks
You are using a deprecated vendor prefix.

Krzysztof,

Ok - did not realize this got deprecated. Will change to gateworks,imx8mp-gw74xx

Best Regards,

Tim

author
#3 lore raw

Re: [PATCH 2/2] arm64: dts: imx: Add i.MX8M Plus Gateworks gw7400 dts support

In reply to Krzysztof Kozlowski
Quoted 10 lines · Krzysztof Kozlowski
Quoted 5 lines · Tim Harvey

The Gateworks GW7400 is an ARM based single board computer (SBC) featuring:
- i.MX8M Plus SoC
- LPDDR4 DRAM
- eMMC FLASH

Thank you for your patch. There is something to discuss/improve.

Krzysztof,

Thanks for the review!

Quoted 14 lines

(...)

arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts line 16

Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts new file +10 -0
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/leds/common.h>
+
+#include "imx8mp.dtsi"
+
+/ {
+     model = "Gateworks Venice GW74xx i.MX8MP board";
+     compatible = "gw,imx8mp-gw74xx", "fsl,imx8mp";

Deprecated vendor prefix.

thanks - I wasn't aware 'gw' got deprecated. I will update to 'gateworks'.

I'm in the habit of using 'make dtbs W=1' to check for errors. Is there something better I should be using that would catch this?

Quoted 20 lines
Quoted 20 lines
arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts new file +19 -0
+
+     aliases {
+             ethernet0 = &eqos;
+             ethernet1 = &fec;
+             ethernet2 = &lan1;
+             ethernet3 = &lan2;
+             ethernet4 = &lan3;
+             ethernet5 = &lan4;
+             ethernet6 = &lan5;
+     };
+
+     chosen {
+             stdout-path = &uart2;
+     };
+
+     memory@40000000 {
+             device_type = "memory";
+             reg = <0x0 0x40000000 0 0x80000000>;
+     };
Quoted 8 lines

arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts line 40

Quoted 5 lines
arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts new file +5 -0
+
+     gpio-keys {
+             compatible = "gpio-keys";
+
+             user-pb {

Generic node names please, so "key-0" or "user-pb-key" (although adding specific parts is really not needed, because you have the label).

ok

Quoted 43 lines
Quoted 43 lines
arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts new file +42 -0
+                     label = "user_pb";
+                     gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+                     linux,code = <BTN_0>;
+             };
+
+             user-pb1x {
+                     label = "user_pb1x";
+                     linux,code = <BTN_1>;
+                     interrupt-parent = <&gsc>;
+                     interrupts = <0>;
+             };
+
+             key-erased {
+                     label = "key_erased";
+                     linux,code = <BTN_2>;
+                     interrupt-parent = <&gsc>;
+                     interrupts = <1>;
+             };
+
+             eeprom-wp {
+                     label = "eeprom_wp";
+                     linux,code = <BTN_3>;
+                     interrupt-parent = <&gsc>;
+                     interrupts = <2>;
+             };
+
+             tamper {
+                     label = "tamper";
+                     linux,code = <BTN_4>;
+                     interrupt-parent = <&gsc>;
+                     interrupts = <5>;
+             };
+
+             switch-hold {
+                     label = "switch_hold";
+                     linux,code = <BTN_5>;
+                     interrupt-parent = <&gsc>;
+                     interrupts = <7>;
+             };
+     };
+
+     led-controller {
Quoted 8 lines

arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts line 88

Quoted 6 lines
arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts new file +6 -0
+             compatible = "gpio-leds";
+             pinctrl-names = "default";
+             pinctrl-0 = <&pinctrl_gpio_leds>;
+
+             led-0 {
+                     function = LED_FUNCTION_STATUS;

LED_FUNCTION_HEARTBEAT

yes, thanks for catching this

Quoted 15 lines
Quoted 15 lines
arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts new file +14 -0
+                     color = <LED_COLOR_ID_GREEN>;
+                     gpios = <&gpio2 15 GPIO_ACTIVE_HIGH>;
+                     default-state = "on";
+                     linux,default-trigger = "heartbeat";
+             };
+
+             led-1 {
+                     function = LED_FUNCTION_STATUS;
+                     color = <LED_COLOR_ID_RED>;
+                     gpios = <&gpio2 16 GPIO_ACTIVE_HIGH>;
+                     default-state = "off";
+             };
+     };
+
Quoted 8 lines

arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts line 108

Quoted 6 lines
arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts new file +6 -0
+     pps {
+             compatible = "pps-gpio";
+             pinctrl-names = "default";
+             pinctrl-0 = <&pinctrl_pps>;
+             gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+             status = "okay";

No need for status.

ok. What is the best way to know if a binding uses status or not?

Documentation/devicetree/bindings/net/fsl,fec.yaml for example does not mention it uses status, yet it does.

Best Regards,

Tim

#4 lore raw

Re: [PATCH 2/2] arm64: dts: imx: Add i.MX8M Plus Gateworks gw7400 dts support

Quoted 7 lines · Tim Harvey
Quoted 7 lines
Quoted 6 lines
arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts new file +6 -0
+     pps {
+             compatible = "pps-gpio";
+             pinctrl-names = "default";
+             pinctrl-0 = <&pinctrl_pps>;
+             gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+             status = "okay";
Quoted 6 lines
Quoted 1 line

No need for status.

ok. What is the best way to know if a binding uses status or not?

Documentation/devicetree/bindings/net/fsl,fec.yaml for example does not mention it uses status, yet it does.

status is not part of binding at all. All nodes have by default status=okay, just the DTSI disables many of them. Therefore you need to add status=okay only to these which are explicitly disabled.

Best regards,
Krzysztof