linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/8] arm64: dts: librem5-devkit: description updates
@ 2020-02-24  6:29 Martin Kepplinger
  2020-02-24  6:29 ` [PATCH v3 1/8] arm64: dts: librem5-devkit: enable sai2 and sai6 audio interface Martin Kepplinger
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Martin Kepplinger @ 2020-02-24  6:29 UTC (permalink / raw)
  To: robh, mark.rutland, shawnguo, s.hauer, kernel
  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:

revision history
----------------
v3: review by Show: newline / hyphen issues; squashed related ones.
    thanks a lot.
v2: review by Shawn and Guido: remove a battery description
    add SoB tags, coding style fixes, squash and reorder audio
    descritions, remove redundant and unneeded changes.
    https://lore.kernel.org/linux-arm-kernel/20200218084942.4884-1-martin.kepplinger@puri.sm/
v1: https://lore.kernel.org/linux-arm-kernel/20200205143003.28408-1-martin.kepplinger@puri.sm/


Angus Ainslie (Purism) (7):
  arm64: dts: librem5-devkit: enable sai2 and sai6 audio interface
  arm64: dts: librem5-devkit: add the simcom 7100 modem and sgtl5000
    audio codec
  arm64: dts: librem5-devkit: allow modem to wake the system from
    suspend
  arm64: dts: librem5-devkit: add a vbus supply to usb0
  arm64: dts: librem5-devkit: add the regulators for DVFS
  arm64: dts: librem5-devkit: allow the redpine card to be removed
  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   | 136 +++++++++++++++++-
 1 file changed, 133 insertions(+), 3 deletions(-)

-- 
2.20.1


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

* [PATCH v3 1/8] arm64: dts: librem5-devkit: enable sai2 and sai6 audio interface
  2020-02-24  6:29 [PATCH v3 0/8] arm64: dts: librem5-devkit: description updates Martin Kepplinger
@ 2020-02-24  6:29 ` Martin Kepplinger
  2020-02-26 12:42   ` Fabio Estevam
  2020-02-24  6:29 ` [PATCH v3 2/8] arm64: dts: librem5-devkit: add the simcom 7100 modem and sgtl5000 audio codec Martin Kepplinger
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 12+ messages in thread
From: Martin Kepplinger @ 2020-02-24  6:29 UTC (permalink / raw)
  To: robh, mark.rutland, shawnguo, s.hauer, kernel
  Cc: linux-imx, Anson.Huang, devicetree, kernel, linux-arm-kernel,
	linux-kernel, Angus Ainslie (Purism),
	Martin Kepplinger

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

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

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
---
 .../dts/freescale/imx8mq-librem5-devkit.dts   | 38 +++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
index 007c14eec676..25135b08d4f8 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
@@ -567,6 +567,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
@@ -742,6 +761,25 @@
 	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>;
+	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 related	[flat|nested] 12+ messages in thread

* [PATCH v3 2/8] arm64: dts: librem5-devkit: add the simcom 7100 modem and sgtl5000 audio codec
  2020-02-24  6:29 [PATCH v3 0/8] arm64: dts: librem5-devkit: description updates Martin Kepplinger
  2020-02-24  6:29 ` [PATCH v3 1/8] arm64: dts: librem5-devkit: enable sai2 and sai6 audio interface Martin Kepplinger
@ 2020-02-24  6:29 ` Martin Kepplinger
  2020-02-24  6:29 ` [PATCH v3 3/8] arm64: dts: librem5-devkit: allow modem to wake the system from suspend Martin Kepplinger
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Martin Kepplinger @ 2020-02-24  6:29 UTC (permalink / raw)
  To: robh, mark.rutland, shawnguo, s.hauer, kernel
  Cc: linux-imx, Anson.Huang, devicetree, kernel, linux-arm-kernel,
	linux-kernel, Angus Ainslie (Purism),
	Martin Kepplinger

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

Add the simcomm modem and the sgtl5000 audio codec.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
---
 .../dts/freescale/imx8mq-librem5-devkit.dts   | 62 +++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
index 25135b08d4f8..ed4a10255bad 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
@@ -148,6 +148,55 @@
 		regulator-always-on;
 	};
 
+	wwan_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 = <&wwan_codec>;
+			frame-master;
+			bitclock-master;
+		};
+	};
+
 	vibrator {
 		compatible = "gpio-vibrator";
 		pinctrl-names = "default";
@@ -426,6 +475,19 @@
 		vddio-supply = <&reg_3v3_p>;
 	};
 
+	sgtl5000: audio-codec@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 related	[flat|nested] 12+ messages in thread

* [PATCH v3 3/8] arm64: dts: librem5-devkit: allow modem to wake the system from suspend
  2020-02-24  6:29 [PATCH v3 0/8] arm64: dts: librem5-devkit: description updates Martin Kepplinger
  2020-02-24  6:29 ` [PATCH v3 1/8] arm64: dts: librem5-devkit: enable sai2 and sai6 audio interface Martin Kepplinger
  2020-02-24  6:29 ` [PATCH v3 2/8] arm64: dts: librem5-devkit: add the simcom 7100 modem and sgtl5000 audio codec Martin Kepplinger
@ 2020-02-24  6:29 ` Martin Kepplinger
  2020-02-24  6:29 ` [PATCH v3 4/8] arm64: dts: librem5-devkit: add a vbus supply to usb0 Martin Kepplinger
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Martin Kepplinger @ 2020-02-24  6:29 UTC (permalink / raw)
  To: robh, mark.rutland, shawnguo, s.hauer, kernel
  Cc: linux-imx, Anson.Huang, devicetree, kernel, linux-arm-kernel,
	linux-kernel, Angus Ainslie (Purism),
	Martin Kepplinger

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>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
---
 .../arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
index ed4a10255bad..66d6b7c6dca7 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
@@ -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 {
@@ -576,6 +585,7 @@
 			MX8MQ_IOMUXC_SAI2_RXFS_GPIO4_IO21	0x16
 			MX8MQ_IOMUXC_SAI2_RXC_GPIO4_IO22	0x16
 			MX8MQ_IOMUXC_SAI5_RXC_GPIO3_IO20	0x180  /* HP_DET */
+			MX8MQ_IOMUXC_NAND_DATA02_GPIO3_IO8	0x80   /* nWoWWAN */
 		>;
 	};
 
-- 
2.20.1


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

* [PATCH v3 4/8] arm64: dts: librem5-devkit: add a vbus supply to usb0
  2020-02-24  6:29 [PATCH v3 0/8] arm64: dts: librem5-devkit: description updates Martin Kepplinger
                   ` (2 preceding siblings ...)
  2020-02-24  6:29 ` [PATCH v3 3/8] arm64: dts: librem5-devkit: allow modem to wake the system from suspend Martin Kepplinger
@ 2020-02-24  6:29 ` Martin Kepplinger
  2020-02-26 12:46   ` Fabio Estevam
  2020-02-24  6:29 ` [PATCH v3 5/8] arm64: dts: librem5-devkit: add the regulators for DVFS Martin Kepplinger
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 12+ messages in thread
From: Martin Kepplinger @ 2020-02-24  6:29 UTC (permalink / raw)
  To: robh, mark.rutland, shawnguo, s.hauer, kernel
  Cc: linux-imx, Anson.Huang, devicetree, kernel, linux-arm-kernel,
	linux-kernel, Angus Ainslie (Purism),
	Martin Kepplinger

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>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
---
 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 66d6b7c6dca7..823d5c60a8fa 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
@@ -872,6 +872,7 @@
 };
 
 &usb3_phy0 {
+	vbus-supply = <&reg_5v_p>;
 	status = "okay";
 };
 
-- 
2.20.1


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

* [PATCH v3 5/8] arm64: dts: librem5-devkit: add the regulators for DVFS
  2020-02-24  6:29 [PATCH v3 0/8] arm64: dts: librem5-devkit: description updates Martin Kepplinger
                   ` (3 preceding siblings ...)
  2020-02-24  6:29 ` [PATCH v3 4/8] arm64: dts: librem5-devkit: add a vbus supply to usb0 Martin Kepplinger
@ 2020-02-24  6:29 ` Martin Kepplinger
  2020-02-24  6:29 ` [PATCH v3 6/8] arm64: dts: librem5-devkit: allow the redpine card to be removed Martin Kepplinger
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Martin Kepplinger @ 2020-02-24  6:29 UTC (permalink / raw)
  To: robh, mark.rutland, shawnguo, s.hauer, kernel
  Cc: linux-imx, Anson.Huang, devicetree, kernel, linux-arm-kernel,
	linux-kernel, Angus Ainslie (Purism),
	Martin Kepplinger

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

Specify which regulator is used for cpufreq DVFS.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
---
 .../boot/dts/freescale/imx8mq-librem5-devkit.dts | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
index 823d5c60a8fa..6ba65a807b25 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
@@ -227,6 +227,22 @@
 	};
 };
 
+&A53_0 {
+	cpu-supply = <&buck2_reg>;
+};
+
+&A53_1 {
+	cpu-supply = <&buck2_reg>;
+};
+
+&A53_2 {
+	cpu-supply = <&buck2_reg>;
+};
+
+&A53_3 {
+	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 related	[flat|nested] 12+ messages in thread

* [PATCH v3 6/8] arm64: dts: librem5-devkit: allow the redpine card to be removed
  2020-02-24  6:29 [PATCH v3 0/8] arm64: dts: librem5-devkit: description updates Martin Kepplinger
                   ` (4 preceding siblings ...)
  2020-02-24  6:29 ` [PATCH v3 5/8] arm64: dts: librem5-devkit: add the regulators for DVFS Martin Kepplinger
@ 2020-02-24  6:29 ` Martin Kepplinger
  2020-02-24  6:29 ` [PATCH v3 7/8] arm64: dts: librem5-devkit: increase the VBUS current in the kernel Martin Kepplinger
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Martin Kepplinger @ 2020-02-24  6:29 UTC (permalink / raw)
  To: robh, mark.rutland, shawnguo, s.hauer, kernel
  Cc: linux-imx, Anson.Huang, devicetree, kernel, linux-arm-kernel,
	linux-kernel, Angus Ainslie (Purism),
	Martin Kepplinger

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>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
---
 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 6ba65a807b25..12a91d2d36db 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
@@ -947,7 +947,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 related	[flat|nested] 12+ messages in thread

* [PATCH v3 7/8] arm64: dts: librem5-devkit: increase the VBUS current in the kernel
  2020-02-24  6:29 [PATCH v3 0/8] arm64: dts: librem5-devkit: description updates Martin Kepplinger
                   ` (5 preceding siblings ...)
  2020-02-24  6:29 ` [PATCH v3 6/8] arm64: dts: librem5-devkit: allow the redpine card to be removed Martin Kepplinger
@ 2020-02-24  6:29 ` Martin Kepplinger
  2020-02-24  6:29 ` [PATCH v3 8/8] arm64: dts: librem5-devkit: add lsm9ds1 mount matrix Martin Kepplinger
  2020-02-24  7:55 ` [PATCH v3 0/8] arm64: dts: librem5-devkit: description updates Shawn Guo
  8 siblings, 0 replies; 12+ messages in thread
From: Martin Kepplinger @ 2020-02-24  6:29 UTC (permalink / raw)
  To: robh, mark.rutland, shawnguo, s.hauer, kernel
  Cc: linux-imx, Anson.Huang, devicetree, kernel, linux-arm-kernel,
	linux-kernel, Angus Ainslie (Purism),
	Martin Kepplinger

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>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
---
 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 12a91d2d36db..72c622ffe6de 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
@@ -428,10 +428,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 related	[flat|nested] 12+ messages in thread

* [PATCH v3 8/8] arm64: dts: librem5-devkit: add lsm9ds1 mount matrix
  2020-02-24  6:29 [PATCH v3 0/8] arm64: dts: librem5-devkit: description updates Martin Kepplinger
                   ` (6 preceding siblings ...)
  2020-02-24  6:29 ` [PATCH v3 7/8] arm64: dts: librem5-devkit: increase the VBUS current in the kernel Martin Kepplinger
@ 2020-02-24  6:29 ` Martin Kepplinger
  2020-02-24  7:55 ` [PATCH v3 0/8] arm64: dts: librem5-devkit: description updates Shawn Guo
  8 siblings, 0 replies; 12+ messages in thread
From: Martin Kepplinger @ 2020-02-24  6:29 UTC (permalink / raw)
  To: robh, mark.rutland, shawnguo, s.hauer, kernel
  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>
---
 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 72c622ffe6de..10eca94194be 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
@@ -539,6 +539,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 related	[flat|nested] 12+ messages in thread

* Re: [PATCH v3 0/8] arm64: dts: librem5-devkit: description updates
  2020-02-24  6:29 [PATCH v3 0/8] arm64: dts: librem5-devkit: description updates Martin Kepplinger
                   ` (7 preceding siblings ...)
  2020-02-24  6:29 ` [PATCH v3 8/8] arm64: dts: librem5-devkit: add lsm9ds1 mount matrix Martin Kepplinger
@ 2020-02-24  7:55 ` Shawn Guo
  8 siblings, 0 replies; 12+ messages in thread
From: Shawn Guo @ 2020-02-24  7:55 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: robh, mark.rutland, s.hauer, kernel, linux-imx, Anson.Huang,
	devicetree, kernel, linux-arm-kernel, linux-kernel

On Mon, Feb 24, 2020 at 07:29:09AM +0100, 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:
> 
> revision history
> ----------------
> v3: review by Show: newline / hyphen issues; squashed related ones.
>     thanks a lot.
> v2: review by Shawn and Guido: remove a battery description
>     add SoB tags, coding style fixes, squash and reorder audio
>     descritions, remove redundant and unneeded changes.
>     https://lore.kernel.org/linux-arm-kernel/20200218084942.4884-1-martin.kepplinger@puri.sm/
> v1: https://lore.kernel.org/linux-arm-kernel/20200205143003.28408-1-martin.kepplinger@puri.sm/
> 
> 
> Angus Ainslie (Purism) (7):
>   arm64: dts: librem5-devkit: enable sai2 and sai6 audio interface
>   arm64: dts: librem5-devkit: add the simcom 7100 modem and sgtl5000
>     audio codec
>   arm64: dts: librem5-devkit: allow modem to wake the system from
>     suspend
>   arm64: dts: librem5-devkit: add a vbus supply to usb0
>   arm64: dts: librem5-devkit: add the regulators for DVFS
>   arm64: dts: librem5-devkit: allow the redpine card to be removed
>   arm64: dts: librem5-devkit: increase the VBUS current in the kernel

Applied all, thanks.

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

* Re: [PATCH v3 1/8] arm64: dts: librem5-devkit: enable sai2 and sai6 audio interface
  2020-02-24  6:29 ` [PATCH v3 1/8] arm64: dts: librem5-devkit: enable sai2 and sai6 audio interface Martin Kepplinger
@ 2020-02-26 12:42   ` Fabio Estevam
  0 siblings, 0 replies; 12+ messages in thread
From: Fabio Estevam @ 2020-02-26 12:42 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer, Sascha Hauer,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	kernel, Yongcai Huang, Angus Ainslie (Purism),
	linux-kernel, NXP Linux Team,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

Hi Martin,

On Mon, Feb 24, 2020 at 3:31 AM Martin Kepplinger
<martin.kepplinger@puri.sm> wrote:
>
> From: "Angus Ainslie (Purism)" <angus@akkea.ca>
>
> Add missing sai2 and sai6 audio interface and pinctrl definitions for the
> Librem 5 devkit.
>
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
> Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>

Maybe you could rearrange patches 1 and 2 like this:

Add simcom 7100 modem support
Add sgtl5000 support

This way it is clearer where SAI2 and SAI6 ports are actually used.

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

* Re: [PATCH v3 4/8] arm64: dts: librem5-devkit: add a vbus supply to usb0
  2020-02-24  6:29 ` [PATCH v3 4/8] arm64: dts: librem5-devkit: add a vbus supply to usb0 Martin Kepplinger
@ 2020-02-26 12:46   ` Fabio Estevam
  0 siblings, 0 replies; 12+ messages in thread
From: Fabio Estevam @ 2020-02-26 12:46 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer, Sascha Hauer,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	kernel, Yongcai Huang, Angus Ainslie (Purism),
	linux-kernel, NXP Linux Team,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

Hi Martin,

On Mon, Feb 24, 2020 at 3:31 AM Martin Kepplinger
<martin.kepplinger@puri.sm> wrote:
>
> From: "Angus Ainslie (Purism)" <angus@akkea.ca>
>
> Without a VBUS supply the dwc3 driver won't go into otg mode.

Since this is a bug fix, it would be better to put it as the first
patch of the series, with a Fixes tag and Cc stable, so that it could
be backported to stable trees.

Please rearrange the series and put all bug fixes first with Fixes tag
and Cc stable.

Thanks

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

end of thread, other threads:[~2020-02-26 12:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-24  6:29 [PATCH v3 0/8] arm64: dts: librem5-devkit: description updates Martin Kepplinger
2020-02-24  6:29 ` [PATCH v3 1/8] arm64: dts: librem5-devkit: enable sai2 and sai6 audio interface Martin Kepplinger
2020-02-26 12:42   ` Fabio Estevam
2020-02-24  6:29 ` [PATCH v3 2/8] arm64: dts: librem5-devkit: add the simcom 7100 modem and sgtl5000 audio codec Martin Kepplinger
2020-02-24  6:29 ` [PATCH v3 3/8] arm64: dts: librem5-devkit: allow modem to wake the system from suspend Martin Kepplinger
2020-02-24  6:29 ` [PATCH v3 4/8] arm64: dts: librem5-devkit: add a vbus supply to usb0 Martin Kepplinger
2020-02-26 12:46   ` Fabio Estevam
2020-02-24  6:29 ` [PATCH v3 5/8] arm64: dts: librem5-devkit: add the regulators for DVFS Martin Kepplinger
2020-02-24  6:29 ` [PATCH v3 6/8] arm64: dts: librem5-devkit: allow the redpine card to be removed Martin Kepplinger
2020-02-24  6:29 ` [PATCH v3 7/8] arm64: dts: librem5-devkit: increase the VBUS current in the kernel Martin Kepplinger
2020-02-24  6:29 ` [PATCH v3 8/8] arm64: dts: librem5-devkit: add lsm9ds1 mount matrix Martin Kepplinger
2020-02-24  7:55 ` [PATCH v3 0/8] arm64: dts: librem5-devkit: description updates Shawn Guo

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).