Linux-Devicetree Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v1 00/12] arm64: dts: librem5-devkit: description updates
@ 2020-02-05 14:29 Martin Kepplinger
  2020-02-05 14:29 ` [PATCH v1 01/12] arm64: dts: librem5-devkit: add sai2 and sai6 pinctrl definitions Martin Kepplinger
                   ` (12 more replies)
  0 siblings, 13 replies; 21+ messages in thread
From: Martin Kepplinger @ 2020-02-05 14:29 UTC (permalink / raw)
  To: robh, mark.rutland, shawnguo, s.hauer, kernel, festevam
  Cc: linux-imx, Anson.Huang, devicetree, kernel, linux-arm-kernel,
	linux-kernel, Martin Kepplinger

These are additions to the imx8mq-librem5-devkit devicetree description
we are running for quite some time. All users should have them:

Angus Ainslie (Purism) (11):
  arm64: dts: librem5-devkit: add sai2 and sai6 pinctrl definitions
  arm64: dts: librem5-devkit: add the simcom 7100 modem and audio
  arm64: dts: librem5-devkit: allow modem to wake the system from
    suspend
  arm64: dts: librem5-devkit: enable sai2 audio interface
  arm64: dts: librem5-devkit: add the sgtl5000 i2c audio codec
  arm64: dts: librem5-devkit: add a vbus supply to usb0
  arm64: dts: librem5-devkit: add the regulators for DVFS
  arm64: dts: librem5-devkit: add a battery for the bq25896 to monitor
  arm64: dts: librem5-devkit: allow the redpine card to be removed
  arm64: dts: librem5-devkit: configure VSELECT
  arm64: dts: librem5-devkit: increase the VBUS current in the kernel

Martin Kepplinger (1):
  arm64: dts: librem5-devkit: add lsm9ds1 mount matrix

 .../dts/freescale/imx8mq-librem5-devkit.dts   | 173 +++++++++++++++++-
 1 file changed, 165 insertions(+), 8 deletions(-)

-- 
2.20.1


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

* [PATCH v1 01/12] arm64: dts: librem5-devkit: add sai2 and sai6 pinctrl definitions
  2020-02-05 14:29 [PATCH v1 00/12] arm64: dts: librem5-devkit: description updates Martin Kepplinger
@ 2020-02-05 14:29 ` Martin Kepplinger
  2020-02-17  3:54   ` Shawn Guo
  2020-02-05 14:29 ` [PATCH v1 02/12] arm64: dts: librem5-devkit: add the simcom 7100 modem and audio Martin Kepplinger
                   ` (11 subsequent siblings)
  12 siblings, 1 reply; 21+ messages in thread
From: Martin Kepplinger @ 2020-02-05 14:29 UTC (permalink / raw)
  To: robh, mark.rutland, shawnguo, s.hauer, kernel, festevam
  Cc: linux-imx, Anson.Huang, devicetree, kernel, linux-arm-kernel,
	linux-kernel, Angus Ainslie (Purism)

From: "Angus Ainslie (Purism)" <angus@akkea.ca>

Add missing sai2 and sai6 audio interface pinctrl definitions for the
Librem 5 devkit.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 .../dts/freescale/imx8mq-librem5-devkit.dts   | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
index 764a4cb4e125..9702db69d3ed 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
@@ -555,6 +555,25 @@
 		>;
 	};
 
+	pinctrl_sai2: sai2grp {
+		fsl,pins = <
+		MX8MQ_IOMUXC_SAI2_TXFS_SAI2_TX_SYNC	0xd6
+		MX8MQ_IOMUXC_SAI2_TXC_SAI2_TX_BCLK	0xd6
+		MX8MQ_IOMUXC_SAI2_TXD0_SAI2_TX_DATA0	0xd6
+		MX8MQ_IOMUXC_SAI2_RXD0_SAI2_RX_DATA0	0xd6
+		MX8MQ_IOMUXC_SAI2_MCLK_SAI2_MCLK	0xd6
+		>;
+	};
+
+	pinctrl_sai6: sai6grp {
+		fsl,pins = <
+		MX8MQ_IOMUXC_SAI1_RXD5_SAI6_RX_DATA0	0xd6
+		MX8MQ_IOMUXC_SAI1_RXD6_SAI6_RX_SYNC	0xd6
+		MX8MQ_IOMUXC_SAI1_TXD4_SAI6_RX_BCLK     0xd6
+		MX8MQ_IOMUXC_SAI1_TXD5_SAI6_TX_DATA0	0xd6
+		>;
+	};
+
 	pinctrl_typec: typecgrp {
 		fsl,pins = <
 			MX8MQ_IOMUXC_NAND_DATA06_GPIO3_IO12		0x16
-- 
2.20.1


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

* [PATCH v1 02/12] arm64: dts: librem5-devkit: add the simcom 7100 modem and audio
  2020-02-05 14:29 [PATCH v1 00/12] arm64: dts: librem5-devkit: description updates Martin Kepplinger
  2020-02-05 14:29 ` [PATCH v1 01/12] arm64: dts: librem5-devkit: add sai2 and sai6 pinctrl definitions Martin Kepplinger
@ 2020-02-05 14:29 ` Martin Kepplinger
  2020-02-17  3:59   ` Shawn Guo
  2020-02-05 14:29 ` [PATCH v1 03/12] arm64: dts: librem5-devkit: allow modem to wake the system from suspend Martin Kepplinger
                   ` (10 subsequent siblings)
  12 siblings, 1 reply; 21+ messages in thread
From: Martin Kepplinger @ 2020-02-05 14:29 UTC (permalink / raw)
  To: robh, mark.rutland, shawnguo, s.hauer, kernel, festevam
  Cc: linux-imx, Anson.Huang, devicetree, kernel, linux-arm-kernel,
	linux-kernel, Angus Ainslie (Purism)

From: "Angus Ainslie (Purism)" <angus@akkea.ca>

Add the simcomm modem and the sai6 interface that connects it, as well
as the sgtl5000 audio codec.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 .../dts/freescale/imx8mq-librem5-devkit.dts   | 55 +++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
index 9702db69d3ed..8162576e8f3d 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
@@ -148,6 +148,51 @@
 		regulator-always-on;
 	};
 
+	sim7100_codec: sound-wwan-codec {
+		compatible = "option,gtm601";
+		#sound-dai-cells = <0>;
+	};
+
+	sound {
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "sgtl5000";
+		simple-audio-card,format = "i2s";
+		simple-audio-card,widgets =
+			"Microphone", "Microphone Jack",
+			"Headphone", "Headphone Jack",
+			"Speaker", "Speaker Ext",
+			"Line", "Line In Jack";
+		simple-audio-card,routing =
+			"MIC_IN", "Microphone Jack",
+			"Microphone Jack", "Mic Bias",
+			"LINE_IN", "Line In Jack",
+			"Headphone Jack", "HP_OUT",
+			"Speaker Ext", "LINE_OUT";
+		simple-audio-card,cpu {
+			sound-dai = <&sai2>;
+		};
+		simple-audio-card,codec {
+			sound-dai = <&sgtl5000>;
+			clocks = <&clk IMX8MQ_CLK_SAI2_ROOT>;
+			frame-master;
+			bitclock-master;
+		};
+	};
+
+	sound-wwan {
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "SIMCom SIM7100";
+		simple-audio-card,format = "dsp_a";
+		simple-audio-card,cpu {
+			sound-dai = <&sai6>;
+		};
+		telephony_link_master: simple-audio-card,codec {
+			sound-dai = <&sim7100_codec>;
+			frame-master;
+			bitclock-master;
+		};
+	};
+
 	vibrator {
 		compatible = "gpio-vibrator";
 		pinctrl-names = "default";
@@ -749,6 +794,16 @@
 	status = "okay";
 };
 
+&sai6 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_sai6>;
+	assigned-clocks = <&clk IMX8MQ_CLK_SAI6>;
+	assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>;
+	assigned-clock-rates = <24576000>;
+	fsl,sai-synchronous-rx;
+	status = "okay";
+};
+
 &uart1 { /* console */
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_uart1>;
-- 
2.20.1


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

* [PATCH v1 03/12] arm64: dts: librem5-devkit: allow modem to wake the system from suspend
  2020-02-05 14:29 [PATCH v1 00/12] arm64: dts: librem5-devkit: description updates Martin Kepplinger
  2020-02-05 14:29 ` [PATCH v1 01/12] arm64: dts: librem5-devkit: add sai2 and sai6 pinctrl definitions Martin Kepplinger
  2020-02-05 14:29 ` [PATCH v1 02/12] arm64: dts: librem5-devkit: add the simcom 7100 modem and audio Martin Kepplinger
@ 2020-02-05 14:29 ` Martin Kepplinger
  2020-02-17  4:02   ` Shawn Guo
  2020-02-05 14:29 ` [PATCH v1 04/12] arm64: dts: librem5-devkit: enable sai2 audio interface Martin Kepplinger
                   ` (9 subsequent siblings)
  12 siblings, 1 reply; 21+ messages in thread
From: Martin Kepplinger @ 2020-02-05 14:29 UTC (permalink / raw)
  To: robh, mark.rutland, shawnguo, s.hauer, kernel, festevam
  Cc: linux-imx, Anson.Huang, devicetree, kernel, linux-arm-kernel,
	linux-kernel, Angus Ainslie (Purism)

From: "Angus Ainslie (Purism)" <angus@akkea.ca>

Connect the WoWWAN signal to a gpio key to wake up the system from suspend.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 .../dts/freescale/imx8mq-librem5-devkit.dts   | 27 +++++++++++++++----
 1 file changed, 22 insertions(+), 5 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
index 8162576e8f3d..ac6ba227e1da 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
@@ -33,7 +33,7 @@
 	gpio-keys {
 		compatible = "gpio-keys";
 		pinctrl-names = "default";
-		pinctrl-0 = <&pinctrl_gpio_keys>;
+		pinctrl-0 = <&pinctrl_gpio_keys>, <&pinctrl_wwan_in>;
 
 		btn1 {
 			label = "VOL_UP";
@@ -55,6 +55,15 @@
 			wakeup-source;
 			linux,code = <KEY_HP>;
 		};
+
+		wwan_wake {
+			label = "WWAN_WAKE";
+			gpios = <&gpio3 8 GPIO_ACTIVE_LOW>;
+			interrupt-parent = <&gpio3>;
+			interrupts = <8 GPIO_ACTIVE_LOW>;
+			wakeup-source;
+			linux,code = <KEY_PHONE>;
+		};
 	};
 
 	leds {
@@ -767,11 +776,19 @@
 		>;
 	};
 
-	pinctrl_wwan: wwangrp {
+	pinctrl_wwan_in: wwaningrp {
+		fsl,pins = <
+		/* nWoWWAN */
+		MX8MQ_IOMUXC_NAND_DATA02_GPIO3_IO8	0x80
+		>;
+	};
+
+	pinctrl_wwan_out: wwanoutgrp {
 		fsl,pins = <
-			MX8MQ_IOMUXC_NAND_CE3_B_GPIO3_IO4	0x09 /* nWWAN_DISABLE */
-			MX8MQ_IOMUXC_NAND_DATA02_GPIO3_IO8	0x80 /* nWoWWAN */
-			MX8MQ_IOMUXC_NAND_DATA03_GPIO3_IO9	0x19 /* WWAN_RESET */
+		/* nWWAN_DISABLE */
+		MX8MQ_IOMUXC_NAND_CE3_B_GPIO3_IO4	0x09
+		/* WWAN_RESET */
+		MX8MQ_IOMUXC_NAND_DATA03_GPIO3_IO9	0x19
 		>;
 	};
 };
-- 
2.20.1


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

* [PATCH v1 04/12] arm64: dts: librem5-devkit: enable sai2 audio interface
  2020-02-05 14:29 [PATCH v1 00/12] arm64: dts: librem5-devkit: description updates Martin Kepplinger
                   ` (2 preceding siblings ...)
  2020-02-05 14:29 ` [PATCH v1 03/12] arm64: dts: librem5-devkit: allow modem to wake the system from suspend Martin Kepplinger
@ 2020-02-05 14:29 ` Martin Kepplinger
  2020-02-05 14:29 ` [PATCH v1 05/12] arm64: dts: librem5-devkit: add the sgtl5000 i2c audio codec Martin Kepplinger
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 21+ messages in thread
From: Martin Kepplinger @ 2020-02-05 14:29 UTC (permalink / raw)
  To: robh, mark.rutland, shawnguo, s.hauer, kernel, festevam
  Cc: linux-imx, Anson.Huang, devicetree, kernel, linux-arm-kernel,
	linux-kernel, Angus Ainslie (Purism)

From: "Angus Ainslie (Purism)" <angus@akkea.ca>

enable the imx8mq sai2 audio interface for the librem 5 devkit.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
index ac6ba227e1da..e7e3766198c6 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
@@ -811,6 +811,15 @@
 	status = "okay";
 };
 
+&sai2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_sai2>;
+	assigned-clocks = <&clk IMX8MQ_CLK_SAI2>;
+	assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>;
+	assigned-clock-rates = <24576000>;
+	status = "okay";
+};
+
 &sai6 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_sai6>;
-- 
2.20.1


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

* [PATCH v1 05/12] arm64: dts: librem5-devkit: add the sgtl5000 i2c audio codec
  2020-02-05 14:29 [PATCH v1 00/12] arm64: dts: librem5-devkit: description updates Martin Kepplinger
                   ` (3 preceding siblings ...)
  2020-02-05 14:29 ` [PATCH v1 04/12] arm64: dts: librem5-devkit: enable sai2 audio interface Martin Kepplinger
@ 2020-02-05 14:29 ` Martin Kepplinger
  2020-02-17  4:05   ` Shawn Guo
  2020-02-05 14:29 ` [PATCH v1 06/12] arm64: dts: librem5-devkit: add a vbus supply to usb0 Martin Kepplinger
                   ` (7 subsequent siblings)
  12 siblings, 1 reply; 21+ messages in thread
From: Martin Kepplinger @ 2020-02-05 14:29 UTC (permalink / raw)
  To: robh, mark.rutland, shawnguo, s.hauer, kernel, festevam
  Cc: linux-imx, Anson.Huang, devicetree, kernel, linux-arm-kernel,
	linux-kernel, Angus Ainslie (Purism)

From: "Angus Ainslie (Purism)" <angus@akkea.ca>

Describe the sgtl5000 of the librem 5 devkit in devicetree.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 .../boot/dts/freescale/imx8mq-librem5-devkit.dts    | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
index e7e3766198c6..56b4ac286801 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
@@ -480,6 +480,19 @@
 		vddio-supply = <&reg_3v3_p>;
 	};
 
+	sgtl5000: sgtl5000@a {
+		compatible = "fsl,sgtl5000";
+		clocks = <&clk IMX8MQ_CLK_SAI2_ROOT>;
+		assigned-clocks = <&clk IMX8MQ_CLK_SAI2>;
+		assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>;
+		assigned-clock-rates = <24576000>;
+		#sound-dai-cells = <0>;
+		reg = <0x0a>;
+		VDDD-supply = <&reg_1v8_p>;
+		VDDIO-supply = <&reg_3v3_p>;
+		VDDA-supply = <&reg_3v3_p>;
+	};
+
 	touchscreen@5d {
 		compatible = "goodix,gt5688";
 		reg = <0x5d>;
-- 
2.20.1


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

* [PATCH v1 06/12] arm64: dts: librem5-devkit: add a vbus supply to usb0
  2020-02-05 14:29 [PATCH v1 00/12] arm64: dts: librem5-devkit: description updates Martin Kepplinger
                   ` (4 preceding siblings ...)
  2020-02-05 14:29 ` [PATCH v1 05/12] arm64: dts: librem5-devkit: add the sgtl5000 i2c audio codec Martin Kepplinger
@ 2020-02-05 14:29 ` Martin Kepplinger
  2020-02-05 14:29 ` [PATCH v1 07/12] arm64: dts: librem5-devkit: add the regulators for DVFS Martin Kepplinger
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 21+ messages in thread
From: Martin Kepplinger @ 2020-02-05 14:29 UTC (permalink / raw)
  To: robh, mark.rutland, shawnguo, s.hauer, kernel, festevam
  Cc: linux-imx, Anson.Huang, devicetree, kernel, linux-arm-kernel,
	linux-kernel, Angus Ainslie (Purism)

From: "Angus Ainslie (Purism)" <angus@akkea.ca>

Without a VBUS supply the dwc3 driver won't go into otg mode.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
index 56b4ac286801..ac0145839a69 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
@@ -863,6 +863,7 @@
 };
 
 &usb3_phy0 {
+	vbus-supply = <&reg_5v_p>;
 	status = "okay";
 };
 
-- 
2.20.1


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

* [PATCH v1 07/12] arm64: dts: librem5-devkit: add the regulators for DVFS
  2020-02-05 14:29 [PATCH v1 00/12] arm64: dts: librem5-devkit: description updates Martin Kepplinger
                   ` (5 preceding siblings ...)
  2020-02-05 14:29 ` [PATCH v1 06/12] arm64: dts: librem5-devkit: add a vbus supply to usb0 Martin Kepplinger
@ 2020-02-05 14:29 ` Martin Kepplinger
  2020-02-17  4:08   ` Shawn Guo
  2020-02-05 14:29 ` [PATCH v1 08/12] arm64: dts: librem5-devkit: add a battery for the bq25896 to monitor Martin Kepplinger
                   ` (5 subsequent siblings)
  12 siblings, 1 reply; 21+ messages in thread
From: Martin Kepplinger @ 2020-02-05 14:29 UTC (permalink / raw)
  To: robh, mark.rutland, shawnguo, s.hauer, kernel, festevam
  Cc: linux-imx, Anson.Huang, devicetree, kernel, linux-arm-kernel,
	linux-kernel, Angus Ainslie (Purism)

From: "Angus Ainslie (Purism)" <angus@akkea.ca>

Specify which regulator is used for cpufreq DVFS.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 .../dts/freescale/imx8mq-librem5-devkit.dts   | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
index ac0145839a69..6a8f6cee96cf 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
@@ -223,6 +223,26 @@
 	};
 };
 
+&A53_0 {
+	operating-points-v2 = <&a53_opp_table>;
+	cpu-supply = <&buck2_reg>;
+};
+
+&A53_1 {
+	operating-points-v2 = <&a53_opp_table>;
+	cpu-supply = <&buck2_reg>;
+};
+
+&A53_2 {
+	operating-points-v2 = <&a53_opp_table>;
+	cpu-supply = <&buck2_reg>;
+};
+
+&A53_3 {
+	operating-points-v2 = <&a53_opp_table>;
+	cpu-supply = <&buck2_reg>;
+};
+
 &clk {
 	assigned-clocks = <&clk IMX8MQ_AUDIO_PLL1>, <&clk IMX8MQ_AUDIO_PLL2>;
 	assigned-clock-rates = <786432000>, <722534400>;
-- 
2.20.1


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

* [PATCH v1 08/12] arm64: dts: librem5-devkit: add a battery for the bq25896 to monitor
  2020-02-05 14:29 [PATCH v1 00/12] arm64: dts: librem5-devkit: description updates Martin Kepplinger
                   ` (6 preceding siblings ...)
  2020-02-05 14:29 ` [PATCH v1 07/12] arm64: dts: librem5-devkit: add the regulators for DVFS Martin Kepplinger
@ 2020-02-05 14:29 ` Martin Kepplinger
  2020-02-05 14:30 ` [PATCH v1 09/12] arm64: dts: librem5-devkit: allow the redpine card to be removed Martin Kepplinger
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 21+ messages in thread
From: Martin Kepplinger @ 2020-02-05 14:29 UTC (permalink / raw)
  To: robh, mark.rutland, shawnguo, s.hauer, kernel, festevam
  Cc: linux-imx, Anson.Huang, devicetree, kernel, linux-arm-kernel,
	linux-kernel, Angus Ainslie (Purism)

From: "Angus Ainslie (Purism)" <angus@akkea.ca>

Add a simple-battery with default power capacity

Discharge curve comes from the panasonic NCR18650B datasheet

https://www.batteryspace.com/prod-specs/NCR18650B.pdf

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 .../dts/freescale/imx8mq-librem5-devkit.dts     | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
index 6a8f6cee96cf..4957acc512d5 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
@@ -26,6 +26,22 @@
 		power-supply = <&reg_22v4_p>;
 	};
 
+	bat: battery {
+		compatible = "simple-battery";
+		voltage-min-design-microvolt = <3000000>;
+		voltage-max-design-microvolt = <4192000>;
+		energy-full-design-microwatt-hours = <11700000>;
+		charge-full-design-microamp-hours = <3250000>;
+		precharge-current-microamp = <130000>;
+		charge-term-current-microamp = <66000>;
+		constant-charge-current-max-microamp = <1600000>;
+		constant-charge-voltage-max-microvolt = <4200000>;
+		factory-internal-resistance-micro-ohms = <250000>;
+		ocv-capacity-celsius = <25>;
+		ocv-capacity-table-0 = <4192000 100>, <3750000 85>, <3650000 68>,
+			<3500000 51>, <3400000 34>, <3250000 17>, <3000000 0>;
+	};
+
 	chosen {
 		stdout-path = &uart1;
 	};
@@ -480,6 +496,7 @@
 		ti,minimum-sys-voltage = <3000000>; /* 3V */
 		ti,boost-voltage = <5000000>; /* 5V */
 		ti,boost-max-current = <50000>; /* 50mA */
+		monitored-battery = <&bat>;
 	};
 };
 
-- 
2.20.1


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

* [PATCH v1 09/12] arm64: dts: librem5-devkit: allow the redpine card to be removed
  2020-02-05 14:29 [PATCH v1 00/12] arm64: dts: librem5-devkit: description updates Martin Kepplinger
                   ` (7 preceding siblings ...)
  2020-02-05 14:29 ` [PATCH v1 08/12] arm64: dts: librem5-devkit: add a battery for the bq25896 to monitor Martin Kepplinger
@ 2020-02-05 14:30 ` Martin Kepplinger
  2020-02-05 14:30 ` [PATCH v1 10/12] arm64: dts: librem5-devkit: configure VSELECT Martin Kepplinger
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 21+ messages in thread
From: Martin Kepplinger @ 2020-02-05 14:30 UTC (permalink / raw)
  To: robh, mark.rutland, shawnguo, s.hauer, kernel, festevam
  Cc: linux-imx, Anson.Huang, devicetree, kernel, linux-arm-kernel,
	linux-kernel, Angus Ainslie (Purism)

From: "Angus Ainslie (Purism)" <angus@akkea.ca>

By adding broken-cd to the usdhc2 stanza the Redpine card can be
detected when the HKS is turned off and on.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
index 4957acc512d5..fbc7062c4633 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
@@ -959,7 +959,7 @@
 	bus-width = <4>;
 	vmmc-supply = <&reg_usdhc2_vmmc>;
 	power-supply = <&wifi_pwr_en>;
-	non-removable;
+	broken-cd;
 	disable-wp;
 	cap-sdio-irq;
 	keep-power-in-suspend;
-- 
2.20.1


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

* [PATCH v1 10/12] arm64: dts: librem5-devkit: configure VSELECT
  2020-02-05 14:29 [PATCH v1 00/12] arm64: dts: librem5-devkit: description updates Martin Kepplinger
                   ` (8 preceding siblings ...)
  2020-02-05 14:30 ` [PATCH v1 09/12] arm64: dts: librem5-devkit: allow the redpine card to be removed Martin Kepplinger
@ 2020-02-05 14:30 ` Martin Kepplinger
  2020-02-17  4:09   ` Shawn Guo
  2020-02-05 14:30 ` [PATCH v1 11/12] arm64: dts: librem5-devkit: increase the VBUS current in the kernel Martin Kepplinger
                   ` (2 subsequent siblings)
  12 siblings, 1 reply; 21+ messages in thread
From: Martin Kepplinger @ 2020-02-05 14:30 UTC (permalink / raw)
  To: robh, mark.rutland, shawnguo, s.hauer, kernel, festevam
  Cc: linux-imx, Anson.Huang, devicetree, kernel, linux-arm-kernel,
	linux-kernel, Angus Ainslie (Purism)

From: "Angus Ainslie (Purism)" <angus@akkea.ca>

use vselect to set the io voltage to 1.8V

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
index fbc7062c4633..8f920c554ebd 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
@@ -789,6 +789,7 @@
 			MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1	0xc3
 			MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2	0xc3
 			MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3	0xc3
+			MX8MQ_IOMUXC_GPIO1_IO04_GPIO1_IO4	0xc1
 		>;
 	};
 
@@ -800,6 +801,7 @@
 			MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1	0xcd
 			MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2	0xcd
 			MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3	0xcd
+			MX8MQ_IOMUXC_GPIO1_IO04_GPIO1_IO4	0xc1
 		>;
 	};
 
@@ -811,6 +813,7 @@
 			MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1	0xcf
 			MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2	0xcf
 			MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3	0xcf
+			MX8MQ_IOMUXC_GPIO1_IO04_GPIO1_IO4	0xc1
 		>;
 	};
 
-- 
2.20.1


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

* [PATCH v1 11/12] arm64: dts: librem5-devkit: increase the VBUS current in the kernel
  2020-02-05 14:29 [PATCH v1 00/12] arm64: dts: librem5-devkit: description updates Martin Kepplinger
                   ` (9 preceding siblings ...)
  2020-02-05 14:30 ` [PATCH v1 10/12] arm64: dts: librem5-devkit: configure VSELECT Martin Kepplinger
@ 2020-02-05 14:30 ` Martin Kepplinger
  2020-02-05 14:30 ` [PATCH v1 12/12] arm64: dts: librem5-devkit: add lsm9ds1 mount matrix Martin Kepplinger
  2020-02-13 14:08 ` [PATCH v1 00/12] arm64: dts: librem5-devkit: description updates Martin Kepplinger
  12 siblings, 0 replies; 21+ messages in thread
From: Martin Kepplinger @ 2020-02-05 14:30 UTC (permalink / raw)
  To: robh, mark.rutland, shawnguo, s.hauer, kernel, festevam
  Cc: linux-imx, Anson.Huang, devicetree, kernel, linux-arm-kernel,
	linux-kernel, Angus Ainslie (Purism)

From: "Angus Ainslie (Purism)" <angus@akkea.ca>

The poly fuses can handle 6V 4Amps so incease the kernel limts to 5V
3.5Amps.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
index 8f920c554ebd..15cc05c0d6cf 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
@@ -444,10 +444,10 @@
 				PDO_FIXED_USB_COMM |
 				PDO_FIXED_DUAL_ROLE |
 				PDO_FIXED_DATA_SWAP )>;
-			sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM |
+			sink-pdos = <PDO_FIXED(5000, 3500, PDO_FIXED_USB_COMM |
 				PDO_FIXED_DUAL_ROLE |
 				PDO_FIXED_DATA_SWAP )
-			     PDO_VAR(5000, 3000, 3000)>;
+			     PDO_VAR(5000, 5000, 3500)>;
 			op-sink-microwatt = <10000000>;
 
 			ports {
-- 
2.20.1


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

* [PATCH v1 12/12] arm64: dts: librem5-devkit: add lsm9ds1 mount matrix
  2020-02-05 14:29 [PATCH v1 00/12] arm64: dts: librem5-devkit: description updates Martin Kepplinger
                   ` (10 preceding siblings ...)
  2020-02-05 14:30 ` [PATCH v1 11/12] arm64: dts: librem5-devkit: increase the VBUS current in the kernel Martin Kepplinger
@ 2020-02-05 14:30 ` Martin Kepplinger
  2020-02-13 14:08 ` [PATCH v1 00/12] arm64: dts: librem5-devkit: description updates Martin Kepplinger
  12 siblings, 0 replies; 21+ messages in thread
From: Martin Kepplinger @ 2020-02-05 14:30 UTC (permalink / raw)
  To: robh, mark.rutland, shawnguo, s.hauer, kernel, festevam
  Cc: linux-imx, Anson.Huang, devicetree, kernel, linux-arm-kernel,
	linux-kernel, Martin Kepplinger, Marco Felsch

The IMU chip on the librem5-devkit is not mounted at the "natural" place
that would match normal phone orientation (see the documentation for the
details about what that is).

Since the lsm9ds1 driver supports providing a mount matrix, we can describe
the orientation on the board in the dts:

Create a right-handed coordinate system (x * -1; see the datasheet for the
axis) and rotate 180 degrees around the y axis because the device sits on
the back side from the display.

Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
---

this is what I've previously sent as a single patch already:
https://lore.kernel.org/linux-arm-kernel/20200120100722.30359-1-martin.kepplinger@puri.sm/

 arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
index 15cc05c0d6cf..e2db3866bdee 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
@@ -550,6 +550,9 @@
 		reg = <0x6a>;
 		vdd-supply = <&reg_3v3_p>;
 		vddio-supply = <&reg_3v3_p>;
+		mount-matrix =  "1",  "0",  "0",
+				"0",  "1",  "0",
+				"0",  "0", "-1";
 	};
 };
 
-- 
2.20.1


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

* Re: [PATCH v1 00/12] arm64: dts: librem5-devkit: description updates
  2020-02-05 14:29 [PATCH v1 00/12] arm64: dts: librem5-devkit: description updates Martin Kepplinger
                   ` (11 preceding siblings ...)
  2020-02-05 14:30 ` [PATCH v1 12/12] arm64: dts: librem5-devkit: add lsm9ds1 mount matrix Martin Kepplinger
@ 2020-02-13 14:08 ` Martin Kepplinger
  2020-02-14 18:44   ` Guido Günther
  12 siblings, 1 reply; 21+ messages in thread
From: Martin Kepplinger @ 2020-02-13 14:08 UTC (permalink / raw)
  To: robh, mark.rutland, shawnguo, s.hauer, kernel, festevam
  Cc: linux-imx, Anson.Huang, devicetree, kernel, linux-arm-kernel,
	linux-kernel

On 05.02.20 15:29, Martin Kepplinger wrote:
> These are additions to the imx8mq-librem5-devkit devicetree description
> we are running for quite some time. All users should have them:
> 
> Angus Ainslie (Purism) (11):
>   arm64: dts: librem5-devkit: add sai2 and sai6 pinctrl definitions
>   arm64: dts: librem5-devkit: add the simcom 7100 modem and audio
>   arm64: dts: librem5-devkit: allow modem to wake the system from
>     suspend
>   arm64: dts: librem5-devkit: enable sai2 audio interface
>   arm64: dts: librem5-devkit: add the sgtl5000 i2c audio codec
>   arm64: dts: librem5-devkit: add a vbus supply to usb0
>   arm64: dts: librem5-devkit: add the regulators for DVFS
>   arm64: dts: librem5-devkit: add a battery for the bq25896 to monitor
>   arm64: dts: librem5-devkit: allow the redpine card to be removed
>   arm64: dts: librem5-devkit: configure VSELECT
>   arm64: dts: librem5-devkit: increase the VBUS current in the kernel
> 
> Martin Kepplinger (1):
>   arm64: dts: librem5-devkit: add lsm9ds1 mount matrix
> 
>  .../dts/freescale/imx8mq-librem5-devkit.dts   | 173 +++++++++++++++++-
>  1 file changed, 165 insertions(+), 8 deletions(-)
> 

hi,

any objections or opinions on these additions?

thanks!

                                  martin

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

* Re: [PATCH v1 00/12] arm64: dts: librem5-devkit: description updates
  2020-02-13 14:08 ` [PATCH v1 00/12] arm64: dts: librem5-devkit: description updates Martin Kepplinger
@ 2020-02-14 18:44   ` Guido Günther
  0 siblings, 0 replies; 21+ messages in thread
From: Guido Günther @ 2020-02-14 18:44 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: robh, mark.rutland, shawnguo, s.hauer, kernel, festevam,
	linux-imx, Anson.Huang, devicetree, kernel, linux-arm-kernel,
	linux-kernel

Hi,
On Thu, Feb 13, 2020 at 03:08:57PM +0100, Martin Kepplinger wrote:
> On 05.02.20 15:29, Martin Kepplinger wrote:
> > These are additions to the imx8mq-librem5-devkit devicetree description
> > we are running for quite some time. All users should have them:
> > 
> > Angus Ainslie (Purism) (11):
> >   arm64: dts: librem5-devkit: add sai2 and sai6 pinctrl definitions
> >   arm64: dts: librem5-devkit: add the simcom 7100 modem and audio
> >   arm64: dts: librem5-devkit: allow modem to wake the system from
> >     suspend
> >   arm64: dts: librem5-devkit: enable sai2 audio interface
> >   arm64: dts: librem5-devkit: add the sgtl5000 i2c audio codec
> >   arm64: dts: librem5-devkit: add a vbus supply to usb0
> >   arm64: dts: librem5-devkit: add the regulators for DVFS
> >   arm64: dts: librem5-devkit: add a battery for the bq25896 to monitor
> >   arm64: dts: librem5-devkit: allow the redpine card to be removed
> >   arm64: dts: librem5-devkit: configure VSELECT
> >   arm64: dts: librem5-devkit: increase the VBUS current in the kernel
> > 
> > Martin Kepplinger (1):
> >   arm64: dts: librem5-devkit: add lsm9ds1 mount matrix
> > 
> >  .../dts/freescale/imx8mq-librem5-devkit.dts   | 173 +++++++++++++++++-
> >  1 file changed, 165 insertions(+), 8 deletions(-)
> > 
> 
> hi,
> 
> any objections or opinions on these additions?

I think

'arm64: dts: librem5-devkit: add a battery for the bq25896 to monitor'

should be dropped since the driver does not process any battery
information.

Cheers,
 -- Guido

> 
> thanks!
> 
>                                   martin

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

* Re: [PATCH v1 01/12] arm64: dts: librem5-devkit: add sai2 and sai6 pinctrl definitions
  2020-02-05 14:29 ` [PATCH v1 01/12] arm64: dts: librem5-devkit: add sai2 and sai6 pinctrl definitions Martin Kepplinger
@ 2020-02-17  3:54   ` Shawn Guo
  0 siblings, 0 replies; 21+ messages in thread
From: Shawn Guo @ 2020-02-17  3:54 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: robh, mark.rutland, s.hauer, kernel, festevam, linux-imx,
	Anson.Huang, devicetree, kernel, linux-arm-kernel, linux-kernel,
	Angus Ainslie (Purism)

On Wed, Feb 05, 2020 at 03:29:52PM +0100, Martin Kepplinger wrote:
> From: "Angus Ainslie (Purism)" <angus@akkea.ca>
> 
> Add missing sai2 and sai6 audio interface pinctrl definitions for the
> Librem 5 devkit.
> 
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
> ---
>  .../dts/freescale/imx8mq-librem5-devkit.dts   | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> index 764a4cb4e125..9702db69d3ed 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> @@ -555,6 +555,25 @@
>  		>;
>  	};
>  
> +	pinctrl_sai2: sai2grp {
> +		fsl,pins = <
> +		MX8MQ_IOMUXC_SAI2_TXFS_SAI2_TX_SYNC	0xd6

Please be consistent with existing indentation style.

Shawn

> +		MX8MQ_IOMUXC_SAI2_TXC_SAI2_TX_BCLK	0xd6
> +		MX8MQ_IOMUXC_SAI2_TXD0_SAI2_TX_DATA0	0xd6
> +		MX8MQ_IOMUXC_SAI2_RXD0_SAI2_RX_DATA0	0xd6
> +		MX8MQ_IOMUXC_SAI2_MCLK_SAI2_MCLK	0xd6
> +		>;
> +	};
> +
> +	pinctrl_sai6: sai6grp {
> +		fsl,pins = <
> +		MX8MQ_IOMUXC_SAI1_RXD5_SAI6_RX_DATA0	0xd6
> +		MX8MQ_IOMUXC_SAI1_RXD6_SAI6_RX_SYNC	0xd6
> +		MX8MQ_IOMUXC_SAI1_TXD4_SAI6_RX_BCLK     0xd6
> +		MX8MQ_IOMUXC_SAI1_TXD5_SAI6_TX_DATA0	0xd6
> +		>;
> +	};
> +
>  	pinctrl_typec: typecgrp {
>  		fsl,pins = <
>  			MX8MQ_IOMUXC_NAND_DATA06_GPIO3_IO12		0x16
> -- 
> 2.20.1
> 

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

* Re: [PATCH v1 02/12] arm64: dts: librem5-devkit: add the simcom 7100 modem and audio
  2020-02-05 14:29 ` [PATCH v1 02/12] arm64: dts: librem5-devkit: add the simcom 7100 modem and audio Martin Kepplinger
@ 2020-02-17  3:59   ` Shawn Guo
  0 siblings, 0 replies; 21+ messages in thread
From: Shawn Guo @ 2020-02-17  3:59 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: robh, mark.rutland, s.hauer, kernel, festevam, linux-imx,
	Anson.Huang, devicetree, kernel, linux-arm-kernel, linux-kernel,
	Angus Ainslie (Purism)

On Wed, Feb 05, 2020 at 03:29:53PM +0100, Martin Kepplinger wrote:
> From: "Angus Ainslie (Purism)" <angus@akkea.ca>
> 
> Add the simcomm modem and the sai6 interface that connects it, as well
> as the sgtl5000 audio codec.
> 
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>

When you forward a patch from others, you need to add your SoB.


> ---
>  .../dts/freescale/imx8mq-librem5-devkit.dts   | 55 +++++++++++++++++++
>  1 file changed, 55 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> index 9702db69d3ed..8162576e8f3d 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> @@ -148,6 +148,51 @@
>  		regulator-always-on;
>  	};
>  
> +	sim7100_codec: sound-wwan-codec {
> +		compatible = "option,gtm601";
> +		#sound-dai-cells = <0>;
> +	};
> +
> +	sound {
> +		compatible = "simple-audio-card";
> +		simple-audio-card,name = "sgtl5000";
> +		simple-audio-card,format = "i2s";
> +		simple-audio-card,widgets =
> +			"Microphone", "Microphone Jack",
> +			"Headphone", "Headphone Jack",
> +			"Speaker", "Speaker Ext",
> +			"Line", "Line In Jack";
> +		simple-audio-card,routing =
> +			"MIC_IN", "Microphone Jack",
> +			"Microphone Jack", "Mic Bias",
> +			"LINE_IN", "Line In Jack",
> +			"Headphone Jack", "HP_OUT",
> +			"Speaker Ext", "LINE_OUT";

Please have a newline between properties and child node.

> +		simple-audio-card,cpu {
> +			sound-dai = <&sai2>;
> +		};

Also have a newline between nodes.

Shawn

> +		simple-audio-card,codec {
> +			sound-dai = <&sgtl5000>;
> +			clocks = <&clk IMX8MQ_CLK_SAI2_ROOT>;
> +			frame-master;
> +			bitclock-master;
> +		};
> +	};
> +
> +	sound-wwan {
> +		compatible = "simple-audio-card";
> +		simple-audio-card,name = "SIMCom SIM7100";
> +		simple-audio-card,format = "dsp_a";
> +		simple-audio-card,cpu {
> +			sound-dai = <&sai6>;
> +		};
> +		telephony_link_master: simple-audio-card,codec {
> +			sound-dai = <&sim7100_codec>;
> +			frame-master;
> +			bitclock-master;
> +		};
> +	};
> +
>  	vibrator {
>  		compatible = "gpio-vibrator";
>  		pinctrl-names = "default";
> @@ -749,6 +794,16 @@
>  	status = "okay";
>  };
>  
> +&sai6 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_sai6>;
> +	assigned-clocks = <&clk IMX8MQ_CLK_SAI6>;
> +	assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>;
> +	assigned-clock-rates = <24576000>;
> +	fsl,sai-synchronous-rx;
> +	status = "okay";
> +};
> +
>  &uart1 { /* console */
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&pinctrl_uart1>;
> -- 
> 2.20.1
> 

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

* Re: [PATCH v1 03/12] arm64: dts: librem5-devkit: allow modem to wake the system from suspend
  2020-02-05 14:29 ` [PATCH v1 03/12] arm64: dts: librem5-devkit: allow modem to wake the system from suspend Martin Kepplinger
@ 2020-02-17  4:02   ` Shawn Guo
  0 siblings, 0 replies; 21+ messages in thread
From: Shawn Guo @ 2020-02-17  4:02 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: robh, mark.rutland, s.hauer, kernel, festevam, linux-imx,
	Anson.Huang, devicetree, kernel, linux-arm-kernel, linux-kernel,
	Angus Ainslie (Purism)

On Wed, Feb 05, 2020 at 03:29:54PM +0100, Martin Kepplinger wrote:
> From: "Angus Ainslie (Purism)" <angus@akkea.ca>
> 
> Connect the WoWWAN signal to a gpio key to wake up the system from suspend.
> 
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
> ---
>  .../dts/freescale/imx8mq-librem5-devkit.dts   | 27 +++++++++++++++----
>  1 file changed, 22 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> index 8162576e8f3d..ac6ba227e1da 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> @@ -33,7 +33,7 @@
>  	gpio-keys {
>  		compatible = "gpio-keys";
>  		pinctrl-names = "default";
> -		pinctrl-0 = <&pinctrl_gpio_keys>;
> +		pinctrl-0 = <&pinctrl_gpio_keys>, <&pinctrl_wwan_in>;
>  
>  		btn1 {
>  			label = "VOL_UP";
> @@ -55,6 +55,15 @@
>  			wakeup-source;
>  			linux,code = <KEY_HP>;
>  		};
> +
> +		wwan_wake {
> +			label = "WWAN_WAKE";
> +			gpios = <&gpio3 8 GPIO_ACTIVE_LOW>;
> +			interrupt-parent = <&gpio3>;
> +			interrupts = <8 GPIO_ACTIVE_LOW>;
> +			wakeup-source;
> +			linux,code = <KEY_PHONE>;
> +		};
>  	};
>  
>  	leds {
> @@ -767,11 +776,19 @@
>  		>;
>  	};
>  
> -	pinctrl_wwan: wwangrp {
> +	pinctrl_wwan_in: wwaningrp {
> +		fsl,pins = <
> +		/* nWoWWAN */
> +		MX8MQ_IOMUXC_NAND_DATA02_GPIO3_IO8	0x80

Why not just add it to pinctrl_gpio_keys to make the change minimal.

> +		>;
> +	};
> +
> +	pinctrl_wwan_out: wwanoutgrp {
>  		fsl,pins = <
> -			MX8MQ_IOMUXC_NAND_CE3_B_GPIO3_IO4	0x09 /* nWWAN_DISABLE */
> -			MX8MQ_IOMUXC_NAND_DATA02_GPIO3_IO8	0x80 /* nWoWWAN */
> -			MX8MQ_IOMUXC_NAND_DATA03_GPIO3_IO9	0x19 /* WWAN_RESET */
> +		/* nWWAN_DISABLE */
> +		MX8MQ_IOMUXC_NAND_CE3_B_GPIO3_IO4	0x09
> +		/* WWAN_RESET */
> +		MX8MQ_IOMUXC_NAND_DATA03_GPIO3_IO9	0x19

Unnecessary changes.

Shawn

>  		>;
>  	};
>  };
> -- 
> 2.20.1
> 

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

* Re: [PATCH v1 05/12] arm64: dts: librem5-devkit: add the sgtl5000 i2c audio codec
  2020-02-05 14:29 ` [PATCH v1 05/12] arm64: dts: librem5-devkit: add the sgtl5000 i2c audio codec Martin Kepplinger
@ 2020-02-17  4:05   ` Shawn Guo
  0 siblings, 0 replies; 21+ messages in thread
From: Shawn Guo @ 2020-02-17  4:05 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: robh, mark.rutland, s.hauer, kernel, festevam, linux-imx,
	Anson.Huang, devicetree, kernel, linux-arm-kernel, linux-kernel,
	Angus Ainslie (Purism)

On Wed, Feb 05, 2020 at 03:29:56PM +0100, Martin Kepplinger wrote:
> From: "Angus Ainslie (Purism)" <angus@akkea.ca>
> 
> Describe the sgtl5000 of the librem 5 devkit in devicetree.
> 
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
> ---
>  .../boot/dts/freescale/imx8mq-librem5-devkit.dts    | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> index e7e3766198c6..56b4ac286801 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> @@ -480,6 +480,19 @@
>  		vddio-supply = <&reg_3v3_p>;
>  	};
>  
> +	sgtl5000: sgtl5000@a {

audio-codec for the node name.

> +		compatible = "fsl,sgtl5000";
> +		clocks = <&clk IMX8MQ_CLK_SAI2_ROOT>;
> +		assigned-clocks = <&clk IMX8MQ_CLK_SAI2>;
> +		assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>;
> +		assigned-clock-rates = <24576000>;
> +		#sound-dai-cells = <0>;
> +		reg = <0x0a>;
> +		VDDD-supply = <&reg_1v8_p>;
> +		VDDIO-supply = <&reg_3v3_p>;
> +		VDDA-supply = <&reg_3v3_p>;
> +	};
> +

Add a device only when there is a user for it.

Shawn

>  	touchscreen@5d {
>  		compatible = "goodix,gt5688";
>  		reg = <0x5d>;
> -- 
> 2.20.1
> 

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

* Re: [PATCH v1 07/12] arm64: dts: librem5-devkit: add the regulators for DVFS
  2020-02-05 14:29 ` [PATCH v1 07/12] arm64: dts: librem5-devkit: add the regulators for DVFS Martin Kepplinger
@ 2020-02-17  4:08   ` Shawn Guo
  0 siblings, 0 replies; 21+ messages in thread
From: Shawn Guo @ 2020-02-17  4:08 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: robh, mark.rutland, s.hauer, kernel, festevam, linux-imx,
	Anson.Huang, devicetree, kernel, linux-arm-kernel, linux-kernel,
	Angus Ainslie (Purism)

On Wed, Feb 05, 2020 at 03:29:58PM +0100, Martin Kepplinger wrote:
> From: "Angus Ainslie (Purism)" <angus@akkea.ca>
> 
> Specify which regulator is used for cpufreq DVFS.
> 
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
> ---
>  .../dts/freescale/imx8mq-librem5-devkit.dts   | 20 +++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> index ac0145839a69..6a8f6cee96cf 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> @@ -223,6 +223,26 @@
>  	};
>  };
>  
> +&A53_0 {
> +	operating-points-v2 = <&a53_opp_table>;

The property has already been set in imx8mq.dtsi.

Shawn

> +	cpu-supply = <&buck2_reg>;
> +};
> +
> +&A53_1 {
> +	operating-points-v2 = <&a53_opp_table>;
> +	cpu-supply = <&buck2_reg>;
> +};
> +
> +&A53_2 {
> +	operating-points-v2 = <&a53_opp_table>;
> +	cpu-supply = <&buck2_reg>;
> +};
> +
> +&A53_3 {
> +	operating-points-v2 = <&a53_opp_table>;
> +	cpu-supply = <&buck2_reg>;
> +};
> +
>  &clk {
>  	assigned-clocks = <&clk IMX8MQ_AUDIO_PLL1>, <&clk IMX8MQ_AUDIO_PLL2>;
>  	assigned-clock-rates = <786432000>, <722534400>;
> -- 
> 2.20.1
> 

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

* Re: [PATCH v1 10/12] arm64: dts: librem5-devkit: configure VSELECT
  2020-02-05 14:30 ` [PATCH v1 10/12] arm64: dts: librem5-devkit: configure VSELECT Martin Kepplinger
@ 2020-02-17  4:09   ` Shawn Guo
  0 siblings, 0 replies; 21+ messages in thread
From: Shawn Guo @ 2020-02-17  4:09 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: robh, mark.rutland, s.hauer, kernel, festevam, linux-imx,
	Anson.Huang, devicetree, kernel, linux-arm-kernel, linux-kernel,
	Angus Ainslie (Purism)

On Wed, Feb 05, 2020 at 03:30:01PM +0100, Martin Kepplinger wrote:
> From: "Angus Ainslie (Purism)" <angus@akkea.ca>
> 
> use vselect to set the io voltage to 1.8V
> 
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
> ---
>  arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> index fbc7062c4633..8f920c554ebd 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> @@ -789,6 +789,7 @@
>  			MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1	0xc3
>  			MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2	0xc3
>  			MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3	0xc3
> +			MX8MQ_IOMUXC_GPIO1_IO04_GPIO1_IO4	0xc1

How is the pin working without a pinctrl handle pointing it?

Shawn

>  		>;
>  	};
>  
> @@ -800,6 +801,7 @@
>  			MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1	0xcd
>  			MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2	0xcd
>  			MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3	0xcd
> +			MX8MQ_IOMUXC_GPIO1_IO04_GPIO1_IO4	0xc1
>  		>;
>  	};
>  
> @@ -811,6 +813,7 @@
>  			MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1	0xcf
>  			MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2	0xcf
>  			MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3	0xcf
> +			MX8MQ_IOMUXC_GPIO1_IO04_GPIO1_IO4	0xc1
>  		>;
>  	};
>  
> -- 
> 2.20.1
> 

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

end of thread, back to index

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-05 14:29 [PATCH v1 00/12] arm64: dts: librem5-devkit: description updates Martin Kepplinger
2020-02-05 14:29 ` [PATCH v1 01/12] arm64: dts: librem5-devkit: add sai2 and sai6 pinctrl definitions Martin Kepplinger
2020-02-17  3:54   ` Shawn Guo
2020-02-05 14:29 ` [PATCH v1 02/12] arm64: dts: librem5-devkit: add the simcom 7100 modem and audio Martin Kepplinger
2020-02-17  3:59   ` Shawn Guo
2020-02-05 14:29 ` [PATCH v1 03/12] arm64: dts: librem5-devkit: allow modem to wake the system from suspend Martin Kepplinger
2020-02-17  4:02   ` Shawn Guo
2020-02-05 14:29 ` [PATCH v1 04/12] arm64: dts: librem5-devkit: enable sai2 audio interface Martin Kepplinger
2020-02-05 14:29 ` [PATCH v1 05/12] arm64: dts: librem5-devkit: add the sgtl5000 i2c audio codec Martin Kepplinger
2020-02-17  4:05   ` Shawn Guo
2020-02-05 14:29 ` [PATCH v1 06/12] arm64: dts: librem5-devkit: add a vbus supply to usb0 Martin Kepplinger
2020-02-05 14:29 ` [PATCH v1 07/12] arm64: dts: librem5-devkit: add the regulators for DVFS Martin Kepplinger
2020-02-17  4:08   ` Shawn Guo
2020-02-05 14:29 ` [PATCH v1 08/12] arm64: dts: librem5-devkit: add a battery for the bq25896 to monitor Martin Kepplinger
2020-02-05 14:30 ` [PATCH v1 09/12] arm64: dts: librem5-devkit: allow the redpine card to be removed Martin Kepplinger
2020-02-05 14:30 ` [PATCH v1 10/12] arm64: dts: librem5-devkit: configure VSELECT Martin Kepplinger
2020-02-17  4:09   ` Shawn Guo
2020-02-05 14:30 ` [PATCH v1 11/12] arm64: dts: librem5-devkit: increase the VBUS current in the kernel Martin Kepplinger
2020-02-05 14:30 ` [PATCH v1 12/12] arm64: dts: librem5-devkit: add lsm9ds1 mount matrix Martin Kepplinger
2020-02-13 14:08 ` [PATCH v1 00/12] arm64: dts: librem5-devkit: description updates Martin Kepplinger
2020-02-14 18:44   ` Guido Günther

Linux-Devicetree Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-devicetree/0 linux-devicetree/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-devicetree linux-devicetree/ https://lore.kernel.org/linux-devicetree \
		devicetree@vger.kernel.org
	public-inbox-index linux-devicetree

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-devicetree


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git