Add support for the Purism Librem5 devkit
Subsystems (2)
v8 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 v7:
More regulators always on for USB.
Add vbus regulator.
Drop vbat regulator.
Replace legacy "gpio-key,wakeup" with "wakeup-source".
Add vbus-supply to get rid of warning
imx8mq-usb-phy 382f0040.usb-phy: 382f0040.usb-phy supply vbus not found, using dummy regulator
Changes since v6:
Dropped unused regulators.
Fix regulator phandles case.
Dropped extra whitespace.
Changes since v5:
Added reviewed-by tags.
Moved USB port links to USB controller node.
Changes since v4:
Compiled against linux-next next-20190415. Added imx8mq to the arm yaml file.
Re-arrange regulator nodes to drop 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 | 823 ++++++++++++++++++ 4 files changed, 832 insertions(+) create mode 100644 arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
Signature · 1 line
2.17.1
PATCH v8 1/3 arm64: dts: fsl: librem5: Add a device tree for the Librem5 devkit
This is for 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 | 823 ++++++++++++++++++ 2 files changed, 824 insertions(+) create mode 100644 arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
arch/arm64/boot/dts/freescale/Makefile +1 -0
@@ -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 +823 -0
823 lines not on this page · raw message
Signature · 1 line
2.17.1
Fabio Estevam
reviewerRe: [PATCH v8 1/3] arm64: dts: fsl: librem5: Add a device tree for the Librem5 devkit
Hi Angus,
This looks good. Only minor issues:
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts line 1
Quoted 3 lines · Angus Ainslie (Purism)
+++
b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dtsarch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts new file +1
-0@@ -0,0 +1,823 @@ +/* SPDX-License-Identifier: GPL-2.0+
This should be
// SPDX-License-Identifier: GPL-2.0+
as pointed out by checkpatch.
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts line 90
Quoted 1 line
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts new file +1
-0+ reg_1v8_p: regulator-1V8-P {
Maybe lowercase instead?
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts line 169
Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts new file +10
-0+ wifi_pwr_en: wifi-en { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_wifi_pwr_en>; + regulator-name = "WIFI_EN"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio3 5 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-always-on;
Do you really needs all these regulators to be 'regulator-always-on'?
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts line 199
Quoted 2 lines
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts new file +2
-0+&i2c1 { + clock-frequency = <400000>;
Maybe you could use 100kHz instead in order to avoid the problem described by the following i.MX8M erratum:
e7805: I2C: When the I2C clock speed is configured for 400 kHz, the SCL low period violates the I2C spec of 1.3 uS min
https://www.nxp.com/docs/en/errata/IMX8MDQLQ_1N14W.pdf
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts line 809
Quoted 9 lines
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts new file +9
-0+&usdhc2 { + pinctrl-names = "default", "state_100mhz", "state_200mhz"; + pinctrl-0 = <&pinctrl_usdhc2>; + pinctrl-1 = <&pinctrl_usdhc2_100mhz>; + pinctrl-2 = <&pinctrl_usdhc2_200mhz>; + bus-width = <4>; + vmmc-supply = <®_usdhc2_vmmc>; + power-supply = <&wifi_pwr_en>; +
Unneeded blank line.
Re: [PATCH v8 1/3] arm64: dts: fsl: librem5: Add a device tree for the Librem5 devkit
Hi Fabio,
Quoted 12 lines · Fabio Estevam
Hi Angus,
This looks good. Only minor issues:
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts line 1
Quoted 3 lines · Angus Ainslie (Purism)
+++
b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dtsarch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts new file +1
-0@@ -0,0 +1,823 @@ +/* SPDX-License-Identifier: GPL-2.0+This should be
// SPDX-License-Identifier: GPL-2.0+
Quoted 6 lines
as pointed out by checkpatch.
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts line 90
Quoted 1 line
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts new file +1
-0+ reg_1v8_p: regulator-1V8-P {Maybe lowercase instead?
Ok, I'll fix those 2.
Quoted 11 lines
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts line 169
Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts new file +10
-0+ wifi_pwr_en: wifi-en { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_wifi_pwr_en>; + regulator-name = "WIFI_EN"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio3 5 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-always-on;
Quoted 2 lines
Do you really needs all these regulators to be 'regulator-always-on'?
Unfortunately yes.
Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts line 199
Quoted 2 lines
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts new file +2
-0+&i2c1 { + clock-frequency = <400000>;Maybe you could use 100kHz instead in order to avoid the problem described by the following i.MX8M erratum:
e7805: I2C: When the I2C clock speed is configured for 400 kHz, the SCL low period violates the I2C spec of 1.3 uS min
https://www.nxp.com/docs/en/errata/IMX8MDQLQ_1N14W.pdf
I discovered this a few days ago.
https://source.puri.sm/angus.ainslie/linux-next/commit/10c9d9e55aba0e179166001b9292e37a37bfe0ea
You're right 100kHz is a better choice.
Quoted 11 lines
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts line 809
Quoted 9 lines
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts new file +9
-0+&usdhc2 { + pinctrl-names = "default", "state_100mhz", "state_200mhz"; + pinctrl-0 = <&pinctrl_usdhc2>; + pinctrl-1 = <&pinctrl_usdhc2_100mhz>; + pinctrl-2 = <&pinctrl_usdhc2_200mhz>; + bus-width = <4>; + vmmc-supply = <®_usdhc2_vmmc>; + power-supply = <&wifi_pwr_en>; +Unneeded blank line.
I'll fix it for the next rev.
Thanks
Angus
PATCH v8 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
@@ -332,6 +332,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
PATCH v8 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
@@ -177,6 +177,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