Skip to contentSkip to conversation

Add support for the Purism Librem5 devkit

PATCH Superseded Angus Ainslie (Purism) 2 participants 9 messages Apr 17, 2019 – Apr 22, 2019

Subsystems (4)

v5 of 16 Superseded Latest is v16 →

lore
Share & tools
lore
#0 lore raw

v5 cover Add support for the Purism Librem5 devkit

The Librem5 devkit is based on the imx8mq from NXP. This is a default devicetree to boot the board to a command prompt.

Changes since v4:

Compiled against linux-next next-20190415. Added imx8mq to the arm yaml file.
Re-arrange regulator nodes to dropp undefined supplies. Additional ordering for aesthetics.
Split some long lines.
Added lots of blank lines.
Moved pinctl muxes to where they are used. Cleaned out reg defintions from regulator nodes.

Changes since v3:

Freshly sorted and pressed nodes.
Change the backlight to an interpolated scale.
Dropped i2c2.
Dropped devkit version number to match debian MR.

Changes since v2:

Fixed incorrect phy-supply for the fsl-fec.
Dropped unused regulator property.
Fixup Makefile for linux-next.

Changes since v1:

Dropped config file.
Updated the board compatible label.
Changed node names to follow naming conventions.
Added a more complete regulator hierachy.
Removed unused nodes.
Removed unknown devices.
Fixed comment style.
Dropped undocumented properties.

Angus Ainslie (Purism) (3):
arm64: dts: fsl: librem5: Add a device tree for the Librem5 devkit
dt-bindings: Add an entry for Purism SPC
dt-bindings: arm: fsl: Add the imx8mq boards

 .../devicetree/bindings/arm/fsl.yaml          |   7 +
 .../devicetree/bindings/vendor-prefixes.txt   |   1 +
 arch/arm64/boot/dts/freescale/Makefile        |   1 +
 .../dts/freescale/imx8mq-librem5-devkit.dts   | 833 ++++++++++++++++++
 4 files changed, 842 insertions(+)
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
Signature · 1 line
2.17.1
#1 lore raw

PATCH v5 1/3 arm64: dts: fsl: librem5: Add a device tree for the Librem5 devkit

This is the development kit board for the Librem 5. The current level of support yields a working console and is able to boot userspace from the Network or eMMC.

Additional subsystems that are active :

- Both USB ports
- SD card socket
- WiFi usdhc
- WWAN modem
- GNSS
- GPIO keys
- LEDs
- gyro
- magnetometer
- touchscreen
- pwm
- backlight
- haptic motor

---
 arch/arm64/boot/dts/freescale/Makefile        |   1 +
 .../dts/freescale/imx8mq-librem5-devkit.dts   | 833 ++++++++++++++++++
 2 files changed, 834 insertions(+)
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
arch/arm64/boot/dts/freescale/Makefile +1 -0
index 0bd122f60549..c043aca66572 100644
@@ -22,6 +22,7 @@ dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2160a-rdb.dtb
 
 dtb-$(CONFIG_ARCH_MXC) += imx8mm-evk.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-evk.dtb
+dtb-$(CONFIG_ARCH_MXC) += imx8mq-librem5-devkit.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-zii-ultra-rmb3.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-zii-ultra-zest.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8qxp-mek.dtb
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts new file +833 -0

833 lines not on this page · raw message

Signature · 1 line
2.17.1
maintainer
#2 lore raw

Re: [PATCH v5 1/3] arm64: dts: fsl: librem5: Add a device tree for the Librem5 devkit

Quoted 55 lines · Angus Ainslie (Purism)

This is the development kit board for the Librem 5. The current level of support yields a working console and is able to boot userspace from the Network or eMMC.

Additional subsystems that are active :

- Both USB ports
- SD card socket
- WiFi usdhc
- WWAN modem
- GNSS
- GPIO keys
- LEDs
- gyro
- magnetometer
- touchscreen
- pwm
- backlight
- haptic motor

---
 arch/arm64/boot/dts/freescale/Makefile        |   1 +
 .../dts/freescale/imx8mq-librem5-devkit.dts   | 833 ++++++++++++++++++
 2 files changed, 834 insertions(+)
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
arch/arm64/boot/dts/freescale/Makefile +1 -0
index 0bd122f60549..c043aca66572 100644
@@ -22,6 +22,7 @@ dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2160a-rdb.dtb
 
 dtb-$(CONFIG_ARCH_MXC) += imx8mm-evk.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-evk.dtb
+dtb-$(CONFIG_ARCH_MXC) += imx8mq-librem5-devkit.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-zii-ultra-rmb3.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-zii-ultra-zest.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8qxp-mek.dtb
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts new file +10 -0
new file mode 100644
index 000000000000..846a72dc7640
 
+&usb3_phy0 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+
+	port@0 {
+		reg = <0>;
+
+		typec_hs: endpoint {
+			remote-endpoint = <&usb_con_hs>;

arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts line 783

Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts new file +10 -0
+		};
+	};
+
+	port@1 {
+		reg = <1>;
+
+		typec_ss: endpoint {
+			remote-endpoint = <&usb_con_ss>;
+		};
+	};

This is wrong. The graph should be between the USB controller and the connector. The phy is not involved.

arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts line 791

Quoted 8 lines
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts new file +8 -0
+};
+
+&usb3_phy1 {
+	status = "okay";
+};
+
+&usb_dwc3_0 {
+	extcon = <&typec_ptn5100>;

extcon is deprecated and you should only have the usb-connector binding.

Quoted 5 lines

From the controller, you can walk the graph to the connector.

arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts new file +3 -0
+	dr_mode = "otg";
+	status = "okay";
+};
#3 lore raw

Re: [PATCH v5 1/3] arm64: dts: fsl: librem5: Add a device tree for the Librem5 devkit

Hi Rob,

Quoted 72 lines · Rob Herring
Quoted 57 lines · Angus Ainslie (Purism)

This is the development kit board for the Librem 5. The current level of support yields a working console and is able to boot userspace from the Network or eMMC.

Additional subsystems that are active :

- Both USB ports
- SD card socket
- WiFi usdhc
- WWAN modem
- GNSS
- GPIO keys
- LEDs
- gyro
- magnetometer
- touchscreen
- pwm
- backlight
- haptic motor

---
 arch/arm64/boot/dts/freescale/Makefile        |   1 +
 .../dts/freescale/imx8mq-librem5-devkit.dts   | 833 
++++++++++++++++++
 2 files changed, 834 insertions(+)
 create mode 100644 

arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts

arch/arm64/boot/dts/freescale/Makefile +1 -0
index 0bd122f60549..c043aca66572 100644
@@ -22,6 +22,7 @@ dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2160a-rdb.dtb
 
 dtb-$(CONFIG_ARCH_MXC) += imx8mm-evk.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-evk.dtb
+dtb-$(CONFIG_ARCH_MXC) += imx8mq-librem5-devkit.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-zii-ultra-rmb3.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-zii-ultra-zest.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8qxp-mek.dtb
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts new file +10 -0
new file mode 100644
index 000000000000..846a72dc7640
 
+&usb3_phy0 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+
+	port@0 {
+		reg = <0>;
+
+		typec_hs: endpoint {
+			remote-endpoint = <&usb_con_hs>;

arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts

Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts new file +10 -0
+		};
+	};
+
+	port@1 {
+		reg = <1>;
+
+		typec_ss: endpoint {
+			remote-endpoint = <&usb_con_ss>;
+		};
+	};

This is wrong. The graph should be between the USB controller and the connector. The phy is not involved.

Quoted 12 lines

arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts

Quoted 8 lines
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts new file +8 -0
+};
+
+&usb3_phy1 {
+	status = "okay";
+};
+
+&usb_dwc3_0 {
+	extcon = <&typec_ptn5100>;

extcon is deprecated and you should only have the usb-connector binding. From the controller, you can walk the graph to the connector.

I not sure that I'm clear on what you mean. Here's what I think you want it changed to.

arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts +9 -10
index 846a72dc7640..7b8770fdc5fb 100644
@@ -755,51 +755,50 @@
 };
 
 &uart4 { /* BT */
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_uart4>, <&pinctrl_bt>;
        uart-has-rtscts;
        status = "okay";
 };
 
 &usb3_phy0 {
+       status = "okay";
+};
+
+&usb3_phy1 {
+       status = "okay";
+};
+
+&usb_dwc3_0 {
        #address-cells = <1>;
        #size-cells = <0>;
+       dr_mode = "otg";
        status = "okay";
 
        port@0 {
                reg = <0>;
 
                typec_hs: endpoint {
                        remote-endpoint = <&usb_con_hs>;
                };
        };
 
        port@1 {
                reg = <1>;
 
                typec_ss: endpoint {
                        remote-endpoint = <&usb_con_ss>;
                };
        };
 };
 
-&usb3_phy1 {
-       status = "okay";
-};
-
-&usb_dwc3_0 {
-       extcon = <&typec_ptn5100>;
-       dr_mode = "otg";
-       status = "okay";
-};
-
 &usb_dwc3_1 {
        dr_mode = "host";
        status = "okay";
 };
 
 
 

Thanks
Angus

Quoted 3 lines
Quoted 3 lines
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts new file +3 -0
+	dr_mode = "otg";
+	status = "okay";
+};
maintainer
#4 lore raw

Re: [PATCH v5 1/3] arm64: dts: fsl: librem5: Add a device tree for the Librem5 devkit

Quoted 95 lines · Angus Ainslie

Hi Rob,

Quoted 76 lines · Rob Herring
Quoted 61 lines · Angus Ainslie (Purism)

This is the development kit board for the Librem 5. The current level of
support yields a working console and is able to boot userspace from the
Network or eMMC.

Additional subsystems that are active :

- Both USB ports
- SD card socket
- WiFi usdhc
- WWAN modem
- GNSS
- GPIO keys
- LEDs
- gyro
- magnetometer
- touchscreen
- pwm
- backlight
- haptic motor

---
 arch/arm64/boot/dts/freescale/Makefile        |   1 +
 .../dts/freescale/imx8mq-librem5-devkit.dts   | 833
++++++++++++++++++
 2 files changed, 834 insertions(+)
 create mode 100644

arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts

arch/arm64/boot/dts/freescale/Makefile +1 -0
index 0bd122f60549..c043aca66572 100644
@@ -22,6 +22,7 @@ dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2160a-rdb.dtb
 
 dtb-$(CONFIG_ARCH_MXC) += imx8mm-evk.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-evk.dtb
+dtb-$(CONFIG_ARCH_MXC) += imx8mq-librem5-devkit.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-zii-ultra-rmb3.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-zii-ultra-zest.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8qxp-mek.dtb
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts new file +10 -0
new file mode 100644
index 000000000000..846a72dc7640
 
+&usb3_phy0 {
+    #address-cells = <1>;
+    #size-cells = <0>;
+    status = "okay";
+
+    port@0 {
+            reg = <0>;
+
+            typec_hs: endpoint {
+                    remote-endpoint = <&usb_con_hs>;

arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts

Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts new file +10 -0
+            };
+    };
+
+    port@1 {
+            reg = <1>;
+
+            typec_ss: endpoint {
+                    remote-endpoint = <&usb_con_ss>;
+            };
+    };

This is wrong. The graph should be between the USB controller and the connector. The phy is not involved.

Quoted 13 lines

arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts

Quoted 8 lines
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts new file +8 -0
+};
+
+&usb3_phy1 {
+    status = "okay";
+};
+
+&usb_dwc3_0 {
+    extcon = <&typec_ptn5100>;

extcon is deprecated and you should only have the usb-connector binding.
From the controller, you can walk the graph to the connector.

Quoted 2 lines

I not sure that I'm clear on what you mean. Here's what I think you want it changed to.

Yes, this looks correct.

Quoted 71 lines
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts +9 -10
index 846a72dc7640..7b8770fdc5fb 100644
@@ -755,51 +755,50 @@
  };
 
  &uart4 { /* BT */
         pinctrl-names = "default";
         pinctrl-0 = <&pinctrl_uart4>, <&pinctrl_bt>;
         uart-has-rtscts;
         status = "okay";
  };
 
  &usb3_phy0 {
+       status = "okay";
+};
+
+&usb3_phy1 {
+       status = "okay";
+};
+
+&usb_dwc3_0 {
         #address-cells = <1>;
         #size-cells = <0>;
+       dr_mode = "otg";
         status = "okay";
 
         port@0 {
                 reg = <0>;
 
                 typec_hs: endpoint {
                         remote-endpoint = <&usb_con_hs>;
                 };
         };
 
         port@1 {
                 reg = <1>;
 
                 typec_ss: endpoint {
                         remote-endpoint = <&usb_con_ss>;
                 };
         };
  };
 
-&usb3_phy1 {
-       status = "okay";
-};
-
-&usb_dwc3_0 {
-       extcon = <&typec_ptn5100>;
-       dr_mode = "otg";
-       status = "okay";
-};
-
  &usb_dwc3_1 {
         dr_mode = "host";
         status = "okay";
  };
 
 
 

Thanks
Angus

Quoted 3 lines
Quoted 3 lines
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts new file +3 -0
+    dr_mode = "otg";
+    status = "okay";
+};
#5 lore raw

PATCH v5 2/3 dt-bindings: Add an entry for Purism SPC

In reply to Angus Ainslie (Purism)

Add an entry for Purism, SPC

---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
index 40f632db7bc2..44ba42e48007 100644
@@ -331,6 +331,7 @@ poslab	Poslab Technology Co., Ltd.
 powervr	PowerVR (deprecated, use img)
 probox2	PROBOX2 (by W2COMP Co., Ltd.)
 pulsedlight	PulsedLight, Inc
+purism	Purism, SPC
 qca	Qualcomm Atheros, Inc.
 qcom	Qualcomm Technologies, Inc
 qemu	QEMU, a generic and open source machine emulator and virtualizer
Signature · 1 line
2.17.1
#7 lore raw

PATCH v5 3/3 dt-bindings: arm: fsl: Add the imx8mq boards

In reply to Angus Ainslie (Purism)

Add an entry for imx8mq based boards

---
 Documentation/devicetree/bindings/arm/fsl.yaml | 7 +++++++
 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/arm/fsl.yaml +7 -0
index 06762fe57227..ecf63a123950 100644
@@ -175,6 +175,13 @@ properties:
               - fsl,imx8mm-evk            # i.MX8MM EVK Board
           - const: fsl,imx8mm
 
+      - description: i.MX8MQ based Boards
+        items:
+          - enum:
+              - fsl,imx8mq-evk            # i.MX8MQ EVK Board
+              - purism,librem5-devkit     # Purism Librem5 devkit
+          - const: fsl,imx8mq
+
       - description: i.MX8QXP based Boards
         items:
           - enum:
Signature · 1 line
2.17.1