linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] Config and devicetree updates for the Librem 5 phone
@ 2021-01-12  9:51 Martin Kepplinger
  2021-01-12  9:51 ` [PATCH 1/9] arm64: defconfig: Enable vibra-pwm Martin Kepplinger
                   ` (8 more replies)
  0 siblings, 9 replies; 16+ messages in thread
From: Martin Kepplinger @ 2021-01-12  9:51 UTC (permalink / raw)
  To: robh, shawnguo, festevam
  Cc: kernel, linux-imx, catalin.marinas, will, krzk, kernel,
	devicetree, linux-arm-kernel, linux-kernel, Martin Kepplinger

This is another set of updates in order to maintain support for the
Librem 5 phone:

Guido Günther (5):
  arm64: defconfig: Enable vibra-pwm
  arm64: dts: imx8mq-librem5: Mark charger IRQ as High-Z
  arm64: dts: imx8mq-librem5: Don't mark buck3 as always on
  arm64: dts: imx8mq-librem5: Add usb-c chip as supplier for the charger
  arm64: dts: imx8mq-librem5: Add LCD_1V8 regulator

Martin Kepplinger (4):
  arm64: dts: imx8mq-librem5: enable the LCD panel
  arm64: dts: imx8mq-librem5: set regulators boot-on
  arm64: dts: Add Librem5 Evergreen
  dt-bindings: arm: fsl: Add the librem 5 Evergreen revision

 .../devicetree/bindings/arm/fsl.yaml          |  1 +
 arch/arm64/boot/dts/freescale/Makefile        |  1 +
 .../boot/dts/freescale/imx8mq-librem5-r4.dts  | 35 ++++++++
 .../boot/dts/freescale/imx8mq-librem5.dtsi    | 83 ++++++++++++++++++-
 arch/arm64/configs/defconfig                  |  1 +
 5 files changed, 117 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mq-librem5-r4.dts

-- 
2.20.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/9] arm64: defconfig: Enable vibra-pwm
  2021-01-12  9:51 [PATCH 0/9] Config and devicetree updates for the Librem 5 phone Martin Kepplinger
@ 2021-01-12  9:51 ` Martin Kepplinger
  2021-01-13  4:15   ` Krzysztof Kozlowski
  2021-01-12  9:51 ` [PATCH 2/9] arm64: dts: imx8mq-librem5: Mark charger IRQ as High-Z Martin Kepplinger
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 16+ messages in thread
From: Martin Kepplinger @ 2021-01-12  9:51 UTC (permalink / raw)
  To: robh, shawnguo, festevam
  Cc: kernel, linux-imx, catalin.marinas, will, krzk, kernel,
	devicetree, linux-arm-kernel, linux-kernel, Guido Günther,
	Martin Kepplinger

From: Guido Günther <agx@sigxcpu.org>

The haptic motor for the Librem 5 uses this.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 838301650a79..0a17b970d6bd 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -391,6 +391,7 @@ CONFIG_TOUCHSCREEN_EDT_FT5X06=m
 CONFIG_INPUT_MISC=y
 CONFIG_INPUT_PM8941_PWRKEY=y
 CONFIG_INPUT_PM8XXX_VIBRATOR=m
+CONFIG_INPUT_PWM_VIBRA=m
 CONFIG_INPUT_HISI_POWERKEY=y
 # CONFIG_SERIO_SERPORT is not set
 CONFIG_SERIO_AMBAKMI=y
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/9] arm64: dts: imx8mq-librem5: Mark charger IRQ as High-Z
  2021-01-12  9:51 [PATCH 0/9] Config and devicetree updates for the Librem 5 phone Martin Kepplinger
  2021-01-12  9:51 ` [PATCH 1/9] arm64: defconfig: Enable vibra-pwm Martin Kepplinger
@ 2021-01-12  9:51 ` Martin Kepplinger
  2021-01-13  4:16   ` Krzysztof Kozlowski
  2021-01-12  9:51 ` [PATCH 3/9] arm64: dts: imx8mq-librem5: Don't mark buck3 as always on Martin Kepplinger
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 16+ messages in thread
From: Martin Kepplinger @ 2021-01-12  9:51 UTC (permalink / raw)
  To: robh, shawnguo, festevam
  Cc: kernel, linux-imx, catalin.marinas, will, krzk, kernel,
	devicetree, linux-arm-kernel, linux-kernel, Guido Günther,
	Martin Kepplinger

From: Guido Günther <agx@sigxcpu.org>

This is consistent with other IRQs and makes keeps currents low.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
---
 arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
index f85d30a0c2cb..9928e941ee21 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -276,7 +276,7 @@
 	pinctrl_charger_in: chargeringrp {
 		fsl,pins = <
 			/* CHRG_INT */
-			MX8MQ_IOMUXC_NAND_CE2_B_GPIO3_IO3	0x00
+			MX8MQ_IOMUXC_NAND_CE2_B_GPIO3_IO3	0x80
 			/* CHG_STATUS_B */
 			MX8MQ_IOMUXC_NAND_ALE_GPIO3_IO0		0x80
 		>;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 3/9] arm64: dts: imx8mq-librem5: Don't mark buck3 as always on
  2021-01-12  9:51 [PATCH 0/9] Config and devicetree updates for the Librem 5 phone Martin Kepplinger
  2021-01-12  9:51 ` [PATCH 1/9] arm64: defconfig: Enable vibra-pwm Martin Kepplinger
  2021-01-12  9:51 ` [PATCH 2/9] arm64: dts: imx8mq-librem5: Mark charger IRQ as High-Z Martin Kepplinger
@ 2021-01-12  9:51 ` Martin Kepplinger
  2021-01-12  9:51 ` [PATCH 4/9] arm64: dts: imx8mq-librem5: Add usb-c chip as supplier for the charger Martin Kepplinger
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 16+ messages in thread
From: Martin Kepplinger @ 2021-01-12  9:51 UTC (permalink / raw)
  To: robh, shawnguo, festevam
  Cc: kernel, linux-imx, catalin.marinas, will, krzk, kernel,
	devicetree, linux-arm-kernel, linux-kernel, Guido Günther,
	Martin Kepplinger

From: Guido Günther <agx@sigxcpu.org>

With the pmic driver fixed we can now shut off the regulator in the gpc.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
---
 arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
index 9928e941ee21..95d710831f28 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -679,7 +679,6 @@
 				regulator-min-microvolt = <700000>;
 				regulator-max-microvolt = <1300000>;
 				rohm,dvs-run-voltage = <900000>;
-				regulator-always-on;
 			};
 
 			buck4_reg: BUCK4 {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 4/9] arm64: dts: imx8mq-librem5: Add usb-c chip as supplier for the charger
  2021-01-12  9:51 [PATCH 0/9] Config and devicetree updates for the Librem 5 phone Martin Kepplinger
                   ` (2 preceding siblings ...)
  2021-01-12  9:51 ` [PATCH 3/9] arm64: dts: imx8mq-librem5: Don't mark buck3 as always on Martin Kepplinger
@ 2021-01-12  9:51 ` Martin Kepplinger
  2021-01-12  9:51 ` [PATCH 5/9] arm64: dts: imx8mq-librem5: Add LCD_1V8 regulator Martin Kepplinger
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 16+ messages in thread
From: Martin Kepplinger @ 2021-01-12  9:51 UTC (permalink / raw)
  To: robh, shawnguo, festevam
  Cc: kernel, linux-imx, catalin.marinas, will, krzk, kernel,
	devicetree, linux-arm-kernel, linux-kernel, Guido Günther,
	Martin Kepplinger

From: Guido Günther <agx@sigxcpu.org>

The tps65982 feeds the bq25895 charge controller on the Librem 5.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
---
 arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
index 95d710831f28..d7d807cd72b3 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -928,6 +928,7 @@
 		ti,use-vinmin-threshold = <1>; /* enable VINDPM */
 		ti,vinmin-threshold = <3900000>; /* uV */
 		monitored-battery = <&bat>;
+		power-supplies = <&typec_pd>;
 	};
 };
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 5/9] arm64: dts: imx8mq-librem5: Add LCD_1V8 regulator
  2021-01-12  9:51 [PATCH 0/9] Config and devicetree updates for the Librem 5 phone Martin Kepplinger
                   ` (3 preceding siblings ...)
  2021-01-12  9:51 ` [PATCH 4/9] arm64: dts: imx8mq-librem5: Add usb-c chip as supplier for the charger Martin Kepplinger
@ 2021-01-12  9:51 ` Martin Kepplinger
  2021-01-12  9:51 ` [PATCH 6/9] arm64: dts: imx8mq-librem5: enable the LCD panel Martin Kepplinger
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 16+ messages in thread
From: Martin Kepplinger @ 2021-01-12  9:51 UTC (permalink / raw)
  To: robh, shawnguo, festevam
  Cc: kernel, linux-imx, catalin.marinas, will, krzk, kernel,
	devicetree, linux-arm-kernel, linux-kernel, Guido Günther,
	Martin Kepplinger

From: Guido Günther <agx@sigxcpu.org>

It's a supply for to touch and LCD.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
---
 arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
index d7d807cd72b3..f77b51d3c132 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -82,6 +82,20 @@
 		enable-active-high;
 	};
 
+	reg_lcd_1v8: regulator-lcd-1v8 {
+		compatible = "regulator-fixed";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_dsien>;
+		regulator-name = "LCD_1V8";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		vin-supply = <&reg_vdd_1v8>;
+		gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		/* Otherwise i2c3 is not functional */
+		regulator-always-on;
+	};
+
 	reg_lcd_3v4: regulator-lcd-3v4 {
 		compatible = "regulator-fixed";
 		regulator-name = "LCD_3V4";
@@ -892,6 +906,7 @@
 		interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
 		touchscreen-size-x = <720>;
 		touchscreen-size-y = <1440>;
+		vcc-supply = <&reg_lcd_1v8>;
 	};
 };
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 6/9] arm64: dts: imx8mq-librem5: enable the LCD panel
  2021-01-12  9:51 [PATCH 0/9] Config and devicetree updates for the Librem 5 phone Martin Kepplinger
                   ` (4 preceding siblings ...)
  2021-01-12  9:51 ` [PATCH 5/9] arm64: dts: imx8mq-librem5: Add LCD_1V8 regulator Martin Kepplinger
@ 2021-01-12  9:51 ` Martin Kepplinger
  2021-01-18  7:02   ` Shawn Guo
  2021-01-12  9:51 ` [PATCH 7/9] arm64: dts: imx8mq-librem5: set regulators boot-on Martin Kepplinger
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 16+ messages in thread
From: Martin Kepplinger @ 2021-01-12  9:51 UTC (permalink / raw)
  To: robh, shawnguo, festevam
  Cc: kernel, linux-imx, catalin.marinas, will, krzk, kernel,
	devicetree, linux-arm-kernel, linux-kernel, Martin Kepplinger

This enables the Librem5's ft8006p based LCD panel driven by the
imx8mq's Northwest Logic DSI IP core and mxsfb display controller.

Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
---
 .../boot/dts/freescale/imx8mq-librem5.dtsi    | 51 ++++++++++++++++++-
 1 file changed, 49 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
index f77b51d3c132..440931f81c12 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -310,6 +310,17 @@
 		>;
 	};
 
+	pinctrl_dsirst: dsirstgrp {
+		fsl,pins = <
+			/* DSI_RST */
+			MX8MQ_IOMUXC_ENET_RD3_GPIO1_IO29	0x83
+			/* DSI_TE */
+			MX8MQ_IOMUXC_ENET_RD2_GPIO1_IO28	0x83
+			/* TP_RST */
+			MX8MQ_IOMUXC_ENET_RX_CTL_GPIO1_IO24	0x83
+		>;
+	};
+
 	pinctrl_ecspi1: ecspigrp {
 		fsl,pins = <
 			MX8MQ_IOMUXC_ECSPI1_MOSI_ECSPI1_MOSI	0x83
@@ -817,12 +828,12 @@
 		compatible = "tps65132";
 		reg = <0x3e>;
 
-		outp {
+		reg_lcd_avdd: outp {
 			regulator-name = "LCD_AVDD";
 			vin-supply = <&reg_lcd_3v4>;
 		};
 
-		outn {
+		reg_lcd_avee: outn {
 			regulator-name = "LCD_AVEE";
 			vin-supply = <&reg_lcd_3v4>;
 		};
@@ -947,6 +958,42 @@
 	};
 };
 
+&lcdif {
+	status = "okay";
+};
+
+&mipi_dsi {
+	status = "okay";
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	lcd_panel: panel@0 {
+		compatible = "mantix,mlaf057we51-x";
+		reg = <0>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_dsirst>;
+		avdd-supply = <&reg_lcd_avdd>;
+		avee-supply = <&reg_lcd_avee>;
+		vddi-supply = <&reg_lcd_1v8>;
+		backlight = <&backlight_dsi>;
+		reset-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;
+		port {
+			panel_in: endpoint {
+				remote-endpoint = <&mipi_dsi_out>;
+			};
+		};
+	};
+
+	ports {
+		port@1 {
+			reg = <1>;
+			mipi_dsi_out: endpoint {
+				remote-endpoint = <&panel_in>;
+			};
+		};
+	};
+};
+
 &pgc_gpu {
 	power-supply = <&buck3_reg>;
 };
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 7/9] arm64: dts: imx8mq-librem5: set regulators boot-on
  2021-01-12  9:51 [PATCH 0/9] Config and devicetree updates for the Librem 5 phone Martin Kepplinger
                   ` (5 preceding siblings ...)
  2021-01-12  9:51 ` [PATCH 6/9] arm64: dts: imx8mq-librem5: enable the LCD panel Martin Kepplinger
@ 2021-01-12  9:51 ` Martin Kepplinger
  2021-01-12  9:51 ` [PATCH 8/9] arm64: dts: Add Librem5 Evergreen Martin Kepplinger
  2021-01-12  9:51 ` [PATCH 9/9] dt-bindings: arm: fsl: Add the librem 5 Evergreen revision Martin Kepplinger
  8 siblings, 0 replies; 16+ messages in thread
From: Martin Kepplinger @ 2021-01-12  9:51 UTC (permalink / raw)
  To: robh, shawnguo, festevam
  Cc: kernel, linux-imx, catalin.marinas, will, krzk, kernel,
	devicetree, linux-arm-kernel, linux-kernel, Martin Kepplinger

Expect all those regulators to be turned on initially.

Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
---
 arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
index 440931f81c12..9029498ea775 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -682,6 +682,7 @@
 				regulator-name = "buck1";
 				regulator-min-microvolt = <700000>;
 				regulator-max-microvolt = <1300000>;
+				regulator-boot-on;
 				regulator-ramp-delay = <1250>;
 				rohm,dvs-run-voltage = <900000>;
 				rohm,dvs-idle-voltage = <850000>;
@@ -693,6 +694,7 @@
 				regulator-name = "buck2";
 				regulator-min-microvolt = <700000>;
 				regulator-max-microvolt = <1300000>;
+				regulator-boot-on;
 				regulator-ramp-delay = <1250>;
 				rohm,dvs-run-voltage = <1000000>;
 				rohm,dvs-idle-voltage = <900000>;
@@ -703,6 +705,7 @@
 				regulator-name = "buck3";
 				regulator-min-microvolt = <700000>;
 				regulator-max-microvolt = <1300000>;
+				regulator-boot-on;
 				rohm,dvs-run-voltage = <900000>;
 			};
 
@@ -717,6 +720,7 @@
 				regulator-name = "buck5";
 				regulator-min-microvolt = <700000>;
 				regulator-max-microvolt = <1350000>;
+				regulator-boot-on;
 				regulator-always-on;
 			};
 
@@ -724,6 +728,7 @@
 				regulator-name = "buck6";
 				regulator-min-microvolt = <3000000>;
 				regulator-max-microvolt = <3300000>;
+				regulator-boot-on;
 				regulator-always-on;
 			};
 
@@ -731,6 +736,7 @@
 				regulator-name = "buck7";
 				regulator-min-microvolt = <1605000>;
 				regulator-max-microvolt = <1995000>;
+				regulator-boot-on;
 				regulator-always-on;
 			};
 
@@ -738,6 +744,7 @@
 				regulator-name = "buck8";
 				regulator-min-microvolt = <800000>;
 				regulator-max-microvolt = <1400000>;
+				regulator-boot-on;
 				regulator-always-on;
 			};
 
@@ -745,6 +752,7 @@
 				regulator-name = "ldo1";
 				regulator-min-microvolt = <3000000>;
 				regulator-max-microvolt = <3300000>;
+				regulator-boot-on;
 				/* leave on for snvs power button */
 				regulator-always-on;
 			};
@@ -753,6 +761,7 @@
 				regulator-name = "ldo2";
 				regulator-min-microvolt = <900000>;
 				regulator-max-microvolt = <900000>;
+				regulator-boot-on;
 				/* leave on for snvs power button */
 				regulator-always-on;
 			};
@@ -761,6 +770,7 @@
 				regulator-name = "ldo3";
 				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <3300000>;
+				regulator-boot-on;
 				regulator-always-on;
 			};
 
@@ -768,6 +778,7 @@
 				regulator-name = "ldo4";
 				regulator-min-microvolt = <900000>;
 				regulator-max-microvolt = <1800000>;
+				regulator-boot-on;
 				regulator-always-on;
 			};
 
@@ -784,6 +795,7 @@
 				regulator-name = "ldo6";
 				regulator-min-microvolt = <900000>;
 				regulator-max-microvolt = <1800000>;
+				regulator-boot-on;
 				regulator-always-on;
 			};
 
@@ -792,6 +804,7 @@
 				regulator-name = "ldo7";
 				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <3300000>;
+				regulator-boot-on;
 				regulator-always-on;
 			};
 		};
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 8/9] arm64: dts: Add Librem5 Evergreen
  2021-01-12  9:51 [PATCH 0/9] Config and devicetree updates for the Librem 5 phone Martin Kepplinger
                   ` (6 preceding siblings ...)
  2021-01-12  9:51 ` [PATCH 7/9] arm64: dts: imx8mq-librem5: set regulators boot-on Martin Kepplinger
@ 2021-01-12  9:51 ` Martin Kepplinger
  2021-01-13  4:21   ` Krzysztof Kozlowski
  2021-01-12  9:51 ` [PATCH 9/9] dt-bindings: arm: fsl: Add the librem 5 Evergreen revision Martin Kepplinger
  8 siblings, 1 reply; 16+ messages in thread
From: Martin Kepplinger @ 2021-01-12  9:51 UTC (permalink / raw)
  To: robh, shawnguo, festevam
  Cc: kernel, linux-imx, catalin.marinas, will, krzk, kernel,
	devicetree, linux-arm-kernel, linux-kernel, Martin Kepplinger

Add librem5-r4 with specifics to that revision like the near-level,
battery and charger properties. For schematics and more information,
see https://developer.puri.sm/Librem5/Hardware_Reference/Evergreen.html

Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
---
 arch/arm64/boot/dts/freescale/Makefile        |  1 +
 .../boot/dts/freescale/imx8mq-librem5-r4.dts  | 35 +++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mq-librem5-r4.dts

diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
index 38559943c15d..e814ee98fecf 100644
--- a/arch/arm64/boot/dts/freescale/Makefile
+++ b/arch/arm64/boot/dts/freescale/Makefile
@@ -48,6 +48,7 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mq-hummingboard-pulse.dtb
 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-librem5-r4.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-nitrogen.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-phanbell.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-pico-pi.dtb
diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-r4.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-r4.dts
new file mode 100644
index 000000000000..cbfb49aa2563
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-r4.dts
@@ -0,0 +1,35 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+// Copyright (C) 2020 Purism SPC <kernel@puri.sm>
+
+/dts-v1/;
+
+#include "imx8mq-librem5.dtsi"
+
+/ {
+	model = "Purism Librem 5r4";
+	compatible = "purism,librem5r4", "purism,librem5", "fsl,imx8mq";
+};
+
+&accel_gyro {
+	mount-matrix =  "1",  "0",  "0",
+			"0",  "1",  "0",
+			"0",  "0", "-1";
+};
+
+&bat {
+	maxim,rsns-microohm = <1667>;
+};
+
+&bq25895 {
+	ti,battery-regulation-voltage = <4200000>; /* uV */
+	ti,charge-current = <1500000>; /* uA */
+	ti,termination-current = <144000>;  /* uA */
+};
+
+&led_backlight {
+	led-max-microamp = <25000>;
+};
+
+&proximity {
+	proximity-near-level = <10>;
+};
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 9/9] dt-bindings: arm: fsl: Add the librem 5 Evergreen revision
  2021-01-12  9:51 [PATCH 0/9] Config and devicetree updates for the Librem 5 phone Martin Kepplinger
                   ` (7 preceding siblings ...)
  2021-01-12  9:51 ` [PATCH 8/9] arm64: dts: Add Librem5 Evergreen Martin Kepplinger
@ 2021-01-12  9:51 ` Martin Kepplinger
  2021-01-13  4:22   ` Krzysztof Kozlowski
  2021-01-14 20:15   ` Rob Herring
  8 siblings, 2 replies; 16+ messages in thread
From: Martin Kepplinger @ 2021-01-12  9:51 UTC (permalink / raw)
  To: robh, shawnguo, festevam
  Cc: kernel, linux-imx, catalin.marinas, will, krzk, kernel,
	devicetree, linux-arm-kernel, linux-kernel, Martin Kepplinger

Add an entry for the Librem 5 phone, Evergreen revision which is supported
by "r4". Schematics and more information can be found at
https://developer.puri.sm/Librem5/Hardware_Reference/Evergreen.html

Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
---
 Documentation/devicetree/bindings/arm/fsl.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml b/Documentation/devicetree/bindings/arm/fsl.yaml
index 34000f7fbe02..5921ccf218d9 100644
--- a/Documentation/devicetree/bindings/arm/fsl.yaml
+++ b/Documentation/devicetree/bindings/arm/fsl.yaml
@@ -724,6 +724,7 @@ properties:
           - enum:
               - purism,librem5r2          # Purism Librem5 phone "Chestnut"
               - purism,librem5r3          # Purism Librem5 phone "Dogwood"
+              - purism,librem5r4          # Purism Librem5 phone "Evergreen"
           - const: purism,librem5
           - const: fsl,imx8mq
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/9] arm64: defconfig: Enable vibra-pwm
  2021-01-12  9:51 ` [PATCH 1/9] arm64: defconfig: Enable vibra-pwm Martin Kepplinger
@ 2021-01-13  4:15   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2021-01-13  4:15 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: robh, shawnguo, festevam, kernel, linux-imx, catalin.marinas,
	will, kernel, devicetree, linux-arm-kernel, linux-kernel,
	Guido Günther

On Tue, Jan 12, 2021 at 10:51:43AM +0100, Martin Kepplinger wrote:
> From: Guido Günther <agx@sigxcpu.org>
> 
> The haptic motor for the Librem 5 uses this.
> 
> Signed-off-by: Guido Günther <agx@sigxcpu.org>
> Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
> ---
>  arch/arm64/configs/defconfig | 1 +
>  1 file changed, 1 insertion(+)
> 

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/9] arm64: dts: imx8mq-librem5: Mark charger IRQ as High-Z
  2021-01-12  9:51 ` [PATCH 2/9] arm64: dts: imx8mq-librem5: Mark charger IRQ as High-Z Martin Kepplinger
@ 2021-01-13  4:16   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2021-01-13  4:16 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: robh, shawnguo, festevam, kernel, linux-imx, catalin.marinas,
	will, kernel, devicetree, linux-arm-kernel, linux-kernel,
	Guido Günther

On Tue, Jan 12, 2021 at 10:51:44AM +0100, Martin Kepplinger wrote:
> From: Guido Günther <agx@sigxcpu.org>
> 
> This is consistent with other IRQs and makes keeps currents low.
> 
> Signed-off-by: Guido Günther <agx@sigxcpu.org>
> Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
> ---
>  arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 8/9] arm64: dts: Add Librem5 Evergreen
  2021-01-12  9:51 ` [PATCH 8/9] arm64: dts: Add Librem5 Evergreen Martin Kepplinger
@ 2021-01-13  4:21   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2021-01-13  4:21 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: robh, shawnguo, festevam, kernel, linux-imx, catalin.marinas,
	will, kernel, devicetree, linux-arm-kernel, linux-kernel

On Tue, Jan 12, 2021 at 10:51:50AM +0100, Martin Kepplinger wrote:
> Add librem5-r4 with specifics to that revision like the near-level,
> battery and charger properties. For schematics and more information,
> see https://developer.puri.sm/Librem5/Hardware_Reference/Evergreen.html
> 
> Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
> ---
>  arch/arm64/boot/dts/freescale/Makefile        |  1 +
>  .../boot/dts/freescale/imx8mq-librem5-r4.dts  | 35 +++++++++++++++++++
>  2 files changed, 36 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/freescale/imx8mq-librem5-r4.dts
>

The bindings go before DTS change using them.

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 9/9] dt-bindings: arm: fsl: Add the librem 5 Evergreen revision
  2021-01-12  9:51 ` [PATCH 9/9] dt-bindings: arm: fsl: Add the librem 5 Evergreen revision Martin Kepplinger
@ 2021-01-13  4:22   ` Krzysztof Kozlowski
  2021-01-14 20:15   ` Rob Herring
  1 sibling, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2021-01-13  4:22 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: robh, shawnguo, festevam, kernel, linux-imx, catalin.marinas,
	will, kernel, devicetree, linux-arm-kernel, linux-kernel

On Tue, Jan 12, 2021 at 10:51:51AM +0100, Martin Kepplinger wrote:
> Add an entry for the Librem 5 phone, Evergreen revision which is supported
> by "r4". Schematics and more information can be found at
> https://developer.puri.sm/Librem5/Hardware_Reference/Evergreen.html
> 
> Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
> ---
>  Documentation/devicetree/bindings/arm/fsl.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 9/9] dt-bindings: arm: fsl: Add the librem 5 Evergreen revision
  2021-01-12  9:51 ` [PATCH 9/9] dt-bindings: arm: fsl: Add the librem 5 Evergreen revision Martin Kepplinger
  2021-01-13  4:22   ` Krzysztof Kozlowski
@ 2021-01-14 20:15   ` Rob Herring
  1 sibling, 0 replies; 16+ messages in thread
From: Rob Herring @ 2021-01-14 20:15 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: devicetree, festevam, shawnguo, kernel, linux-imx,
	linux-arm-kernel, catalin.marinas, linux-kernel, krzk, will,
	kernel

On Tue, 12 Jan 2021 10:51:51 +0100, Martin Kepplinger wrote:
> Add an entry for the Librem 5 phone, Evergreen revision which is supported
> by "r4". Schematics and more information can be found at
> https://developer.puri.sm/Librem5/Hardware_Reference/Evergreen.html
> 
> Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
> ---
>  Documentation/devicetree/bindings/arm/fsl.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 6/9] arm64: dts: imx8mq-librem5: enable the LCD panel
  2021-01-12  9:51 ` [PATCH 6/9] arm64: dts: imx8mq-librem5: enable the LCD panel Martin Kepplinger
@ 2021-01-18  7:02   ` Shawn Guo
  0 siblings, 0 replies; 16+ messages in thread
From: Shawn Guo @ 2021-01-18  7:02 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: robh, festevam, kernel, linux-imx, catalin.marinas, will, krzk,
	kernel, devicetree, linux-arm-kernel, linux-kernel

On Tue, Jan 12, 2021 at 10:51:48AM +0100, Martin Kepplinger wrote:
> This enables the Librem5's ft8006p based LCD panel driven by the
> imx8mq's Northwest Logic DSI IP core and mxsfb display controller.
> 
> Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
> ---
>  .../boot/dts/freescale/imx8mq-librem5.dtsi    | 51 ++++++++++++++++++-
>  1 file changed, 49 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
> index f77b51d3c132..440931f81c12 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
> @@ -310,6 +310,17 @@
>  		>;
>  	};
>  
> +	pinctrl_dsirst: dsirstgrp {
> +		fsl,pins = <
> +			/* DSI_RST */
> +			MX8MQ_IOMUXC_ENET_RD3_GPIO1_IO29	0x83
> +			/* DSI_TE */
> +			MX8MQ_IOMUXC_ENET_RD2_GPIO1_IO28	0x83
> +			/* TP_RST */
> +			MX8MQ_IOMUXC_ENET_RX_CTL_GPIO1_IO24	0x83
> +		>;
> +	};
> +
>  	pinctrl_ecspi1: ecspigrp {
>  		fsl,pins = <
>  			MX8MQ_IOMUXC_ECSPI1_MOSI_ECSPI1_MOSI	0x83
> @@ -817,12 +828,12 @@
>  		compatible = "tps65132";
>  		reg = <0x3e>;
>  
> -		outp {
> +		reg_lcd_avdd: outp {
>  			regulator-name = "LCD_AVDD";
>  			vin-supply = <&reg_lcd_3v4>;
>  		};
>  
> -		outn {
> +		reg_lcd_avee: outn {
>  			regulator-name = "LCD_AVEE";
>  			vin-supply = <&reg_lcd_3v4>;
>  		};
> @@ -947,6 +958,42 @@
>  	};
>  };
>  
> +&lcdif {
> +	status = "okay";
> +};
> +
> +&mipi_dsi {
> +	status = "okay";
> +	#address-cells = <1>;
> +	#size-cells = <0>;

Please end property list with `status`.

> +
> +	lcd_panel: panel@0 {
> +		compatible = "mantix,mlaf057we51-x";
> +		reg = <0>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_dsirst>;
> +		avdd-supply = <&reg_lcd_avdd>;
> +		avee-supply = <&reg_lcd_avee>;
> +		vddi-supply = <&reg_lcd_1v8>;
> +		backlight = <&backlight_dsi>;
> +		reset-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;

Have a newline between properties and child node.

> +		port {
> +			panel_in: endpoint {
> +				remote-endpoint = <&mipi_dsi_out>;
> +			};
> +		};
> +	};
> +
> +	ports {
> +		port@1 {
> +			reg = <1>;

Ditto

Shawn

> +			mipi_dsi_out: endpoint {
> +				remote-endpoint = <&panel_in>;
> +			};
> +		};
> +	};
> +};
> +
>  &pgc_gpu {
>  	power-supply = <&buck3_reg>;
>  };
> -- 
> 2.20.1
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-01-18  7:03 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12  9:51 [PATCH 0/9] Config and devicetree updates for the Librem 5 phone Martin Kepplinger
2021-01-12  9:51 ` [PATCH 1/9] arm64: defconfig: Enable vibra-pwm Martin Kepplinger
2021-01-13  4:15   ` Krzysztof Kozlowski
2021-01-12  9:51 ` [PATCH 2/9] arm64: dts: imx8mq-librem5: Mark charger IRQ as High-Z Martin Kepplinger
2021-01-13  4:16   ` Krzysztof Kozlowski
2021-01-12  9:51 ` [PATCH 3/9] arm64: dts: imx8mq-librem5: Don't mark buck3 as always on Martin Kepplinger
2021-01-12  9:51 ` [PATCH 4/9] arm64: dts: imx8mq-librem5: Add usb-c chip as supplier for the charger Martin Kepplinger
2021-01-12  9:51 ` [PATCH 5/9] arm64: dts: imx8mq-librem5: Add LCD_1V8 regulator Martin Kepplinger
2021-01-12  9:51 ` [PATCH 6/9] arm64: dts: imx8mq-librem5: enable the LCD panel Martin Kepplinger
2021-01-18  7:02   ` Shawn Guo
2021-01-12  9:51 ` [PATCH 7/9] arm64: dts: imx8mq-librem5: set regulators boot-on Martin Kepplinger
2021-01-12  9:51 ` [PATCH 8/9] arm64: dts: Add Librem5 Evergreen Martin Kepplinger
2021-01-13  4:21   ` Krzysztof Kozlowski
2021-01-12  9:51 ` [PATCH 9/9] dt-bindings: arm: fsl: Add the librem 5 Evergreen revision Martin Kepplinger
2021-01-13  4:22   ` Krzysztof Kozlowski
2021-01-14 20:15   ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).