guowenxue
2024-04-08 89ed87e89618f7b3e50cecb5ccdb4b4296dcf75c
PATCH:Alientek-IMX6ULL: Add USB support on Alientek i.MX6ULL v20/v24 board

Signed-off-by: guowenxue <guowenxue@gmail.com>
2 files modified
69 ■■■■■ changed files
bootloader/patches/alientek-imx6ull-v20/uboot-imx-lf-6.1.36-2.1.0.patch 43 ●●●●● patch | view | raw | blame | history
kernel/patches/alientek-imx6ull-v20/linux-imx-lf-6.1.36-2.1.0.patch 26 ●●●●● patch | view | raw | blame | history
bootloader/patches/alientek-imx6ull-v20/uboot-imx-lf-6.1.36-2.1.0.patch
@@ -1,12 +1,25 @@
diff --git a/.gitignore b/.gitignore
index 3a4d056e..1893a337 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,6 +30,7 @@
 *.order
 *.patch
 *.s
+*.S
 *.su
 *.swp
 *.tab.[ch]
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 8b65ac0b..b5259693 100644
index 8b65ac0b..5a613cbc 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -942,6 +942,7 @@ dtb-$(CONFIG_MX6ULL) += \
@@ -942,6 +942,8 @@ dtb-$(CONFIG_MX6ULL) += \
     imx6ull-14x14-ddr3-val-gpmi-weim.dtb \
     imx6ull-14x14-ddr3-val-tsc.dtb \
     imx6ull-14x14-evk.dtb \
+    alientek-imx6ull-v20.dtb \
+    alientek-imx6ull-v24.dtb \
     imx6ull-14x14-evk-emmc.dtb \
     imx6ull-14x14-evk-gpmi-weim.dtb \
     imx6ull-9x9-evk.dtb \
@@ -112,10 +125,10 @@
+
diff --git a/arch/arm/dts/alientek-imx6ull.dts b/arch/arm/dts/alientek-imx6ull.dts
new file mode 100644
index 00000000..93a117fc
index 00000000..f63335db
--- /dev/null
+++ b/arch/arm/dts/alientek-imx6ull.dts
@@ -0,0 +1,237 @@
@@ -0,0 +1,259 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+//
+// Copyright (C) 2022 LingYun IoT System Studio.
@@ -195,6 +208,28 @@
+    status = "okay";
+};
+
+&usbotg1 {
+     dr_mode = "otg";
+     srp-disable;
+     hnp-disable;
+     adp-disable;
+     status = "okay";
+};
+
+&usbotg2 {
+     dr_mode = "host";
+     disable-over-current;
+     status = "okay";
+};
+
+&usbphy1 {
+     tx-d-cal = <0x5>;
+};
+
+&usbphy2 {
+     tx-d-cal = <0x5>;
+};
+
+&usdhc1 {
+    pinctrl-names = "default", "state_100mhz", "state_200mhz";
+    pinctrl-0 = <&pinctrl_usdhc1>;
kernel/patches/alientek-imx6ull-v20/linux-imx-lf-6.1.36-2.1.0.patch
@@ -113,10 +113,10 @@
+
diff --git a/arch/arm/boot/dts/alientek-imx6ull.dts b/arch/arm/boot/dts/alientek-imx6ull.dts
new file mode 100644
index 000000000..93a117fc0
index 000000000..f63335dbc
--- /dev/null
+++ b/arch/arm/boot/dts/alientek-imx6ull.dts
@@ -0,0 +1,237 @@
@@ -0,0 +1,259 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+//
+// Copyright (C) 2022 LingYun IoT System Studio.
@@ -196,6 +196,28 @@
+    status = "okay";
+};
+
+&usbotg1 {
+     dr_mode = "otg";
+     srp-disable;
+     hnp-disable;
+     adp-disable;
+     status = "okay";
+};
+
+&usbotg2 {
+     dr_mode = "host";
+     disable-over-current;
+     status = "okay";
+};
+
+&usbphy1 {
+     tx-d-cal = <0x5>;
+};
+
+&usbphy2 {
+     tx-d-cal = <0x5>;
+};
+
+&usdhc1 {
+    pinctrl-names = "default", "state_100mhz", "state_200mhz";
+    pinctrl-0 = <&pinctrl_usdhc1>;