Skip to contentSkip to conversation

imx6ul uart modem lines and the device tree

DISCUSSION Oliver Graute 2 participants 4 messages Mar 10, 2016 – Mar 22, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello,

I try to use the GPIO2_IO20 and the GPIO2_IO21 as GPIO pin for uart modem signals and not as PIN to the USDHC1 sdcard interface of the imx6ulevk.

if I write 5 direct to the MUX Ctrl Register

devmem2 0x020e01cc w 5
devmem2 0x020e01d0 w 5

it works until next boot.

I assume that I have to change something in the device tree files of linux to reflect the HW gpio changes. How do I adjust the imx6ul-14x14-evk-csi.dts for this?

Best Regards,

Oliver

#1 lore raw
Quoted 8 lines · Oliver Graute

Hello,

I try to use the GPIO2_IO20 and the GPIO2_IO21 as GPIO pin for uart modem signals and not as PIN to the USDHC1 sdcard interface of the imx6ulevk.

if I write 5 direct to the MUX Ctrl Register

Quoted 8 lines

devmem2 0x020e01cc w 5
devmem2 0x020e01d0 w 5

it works until next boot.

I assume that I have to change something in the device tree files of linux to reflect the HW gpio changes. How do I adjust the imx6ul-14x14-evk-csi.dts for this?

I tried without success the following modifications to my devicetree, But the

Mux Ctrl Register 0x020e01cc and 0x020e01d0 doesn't contain the value 5 :-(

arch/arm/boot/dts/imx6ul-14x14-evk-csi.dts +25 -0
Index: kernel-source/arch/arm/boot/dts/imx6ul-14x14-evk-csi.dts
===================================================================
@@ -362,8 +362,33 @@
 			MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x17059
 		>;
 	};
+
+	pinctrl_gpio_key: gpio_keygrp {
+		fsl,pins = <
+			MX6UL_PAD_SD1_DATA2__GPIO2_IO20          0x17059 /* enter the values of the pad config here*/
+			MX6UL_PAD_SD1_DATA3__GPIO2_IO21          0x17059 /* enter the values of the pad config here*/
+                        >;
+                };
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_gpio_key>;
+
+		DTR {
+			label = "DTR";
+			gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
+		};
+
+		DCD {
+			label = "DCD";
+			gpios = <&gpio2 21 GPIO_ACTIVE_LOW>;
+		};
+
+	};
+
 };
 
 &i2c1 {
 	status = "okay";
 	pinctrl-names = "default";
arch/arm/boot/dts/imx6ul-14x14-evk-csi.dts +25 -23

65 lines not on this page · raw message

Best Regards,

Oliver

reviewer
#2 lore raw
Quoted 3 lines · Oliver Graute

I tried without success the following modifications to my devicetree, But the

Mux Ctrl Register 0x020e01cc and 0x020e01d0 doesn't contain the value 5 :-(

What about this?

arch/arm/boot/dts/imx6ul-14x14-evk.dts +3 -1
@@ -324,7 +324,7 @@
        keep-power-in-suspend;
        enable-sdio-wakeup;
        vmmc-supply = <&reg_sd1_vmmc>;
-       status = "okay";
+       status = "disabled";
 };
 
 &usdhc2 {
@@ -420,6 +420,8 @@
                                MX6UL_PAD_GPIO1_IO05__USDHC1_VSELECT
 0x17059 /* SD1 VSELECT */
                                MX6UL_PAD_GPIO1_IO09__GPIO1_IO09
 0x17059 /* SD1 RESET */
                                MX6UL_PAD_SNVS_TAMPER0__GPIO5_IO00
 0x80000000
+                               MX6UL_PAD_SD1_DATA2__GPIO2_IO20         0x17059
+                               MX6UL_PAD_SD1_DATA3__GPIO2_IO21         0x17059
                        >;
                };
#3 lore raw
Quoted 28 lines · Fabio Estevam
Quoted 3 lines · Oliver Graute

I tried without success the following modifications to my devicetree, But the

Mux Ctrl Register 0x020e01cc and 0x020e01d0 doesn't contain the value 5 :-(

What about this?

arch/arm/boot/dts/imx6ul-14x14-evk.dts +3 -1
@@ -324,7 +324,7 @@
        keep-power-in-suspend;
        enable-sdio-wakeup;
        vmmc-supply = <&reg_sd1_vmmc>;
-       status = "okay";
+       status = "disabled";
 };
 
 &usdhc2 {
@@ -420,6 +420,8 @@
                                MX6UL_PAD_GPIO1_IO05__USDHC1_VSELECT
 0x17059 /* SD1 VSELECT */
                                MX6UL_PAD_GPIO1_IO09__GPIO1_IO09
 0x17059 /* SD1 RESET */
                                MX6UL_PAD_SNVS_TAMPER0__GPIO5_IO00
 0x80000000
+                               MX6UL_PAD_SD1_DATA2__GPIO2_IO20         0x17059
+                               MX6UL_PAD_SD1_DATA3__GPIO2_IO21         0x17059
Quoted 3 lines
                        >;
                };

didn't worked for me. Mux Ctrl Register 0x020e01cc and 0x020e01d0 still come up with 0x0000000

devmem2 0x020e01cc
/dev/mem opened.
Memory mapped at address 0x76f52000.
Read at address 0x020E01CC (0x76f521cc): 0x00000000

Best Regards,

Oliver