From a43f71cec50f5d82e7e0fe8cd44bd8cdbeddb62f Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Wed, 17 Nov 2021 23:56:02 +0800
Subject: [PATCH] update linux patch, fix eth1 not work bug
---
bsp/kernel/patch/linux-imx-imx6ull.patch | 413 +++++++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 319 insertions(+), 94 deletions(-)
diff --git a/bsp/kernel/patch/linux-imx-imx6ull.patch b/bsp/kernel/patch/linux-imx-imx6ull.patch
index 1f71948..25671fa 100644
--- a/bsp/kernel/patch/linux-imx-imx6ull.patch
+++ b/bsp/kernel/patch/linux-imx-imx6ull.patch
@@ -1,15 +1,282 @@
-diff -Nuar linux-imx/.cfg-imx6ull linux-imx-imx6ull/.cfg-imx6ull
+diff -Nuar -x include-prefixes -x logo_linux_clut224.ppm linux-imx/arch/arm/boot/dts/imx6ul-14x14-evk.dtsi linux-imx-imx6ull/arch/arm/boot/dts/imx6ul-14x14-evk.dtsi
+--- linux-imx/arch/arm/boot/dts/imx6ul-14x14-evk.dtsi 2021-09-08 18:41:11.000000000 +0800
++++ linux-imx-imx6ull/arch/arm/boot/dts/imx6ul-14x14-evk.dtsi 2021-11-17 23:49:58.757150998 +0800
+@@ -31,7 +31,41 @@
+ brightness-levels = <0 4 8 16 32 64 128 255>;
+ default-brightness-level = <6>;
+ status = "okay";
+- };
++ };
++
++ buzzer: pwm-buzzer {
++ compatible = "pwm-beeper";
++ pwms = <&pwm2 0 500000>;
++ status = "okay";
++ };
++
++ leds {
++ compatible = "gpio-leds";
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_gpio_leds>;
++ status = "okay";
++
++ sysled {
++ lable = "sysled";
++ gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
++ linux,default-trigger = "heartbeat";
++ default-state = "off";
++ };
++ };
++
++ keys {
++ compatible = "gpio-keys";
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_gpio_keys>;
++ autorepeat;
++ status = "okay";
++
++ key_user {
++ lable = "key_user";
++ gpios = <&gpio4 14 GPIO_ACTIVE_LOW>;
++ linux,code = <KEY_ENTER>;
++ };
++ };
+
+ pxp_v4l2 {
+ compatible = "fsl,imx6ul-pxp-v4l2", "fsl,imx6sx-pxp-v4l2", "fsl,imx6sl-pxp-v4l2";
+@@ -142,7 +176,7 @@
+ compatible = "spi-gpio";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_spi4>;
+- status = "okay";
++ status = "disabled"; /* MX6UL_PAD_SNVS_TAMPER7__GPIO5_IO07 conflict with fec1 reset pin */
+ pinctrl-assert-gpios = <&gpio5 8 GPIO_ACTIVE_LOW>;
+ gpio-sck = <&gpio5 11 0>;
+ gpio-mosi = <&gpio5 10 0>;
+@@ -184,6 +218,12 @@
+ pinctrl-0 = <&pinctrl_i2c2>;
+ status = "okay";
+
++ rtc@6f {
++ compatible = "isil,isl1208";
++ reg = <0x6f>;
++ status = "okay";
++ };
++
+ codec: wm8960@1a {
+ #sound-dai-cells = <0>;
+ compatible = "wlf,wm8960";
+@@ -192,7 +232,8 @@
+ wlf,hp-cfg = <3 2 3>;
+ wlf,gpio-cfg = <1 3>;
+ clocks = <&clks IMX6UL_CLK_SAI2>;
+- clock-names = "mclk";
++ clock-names = "mclk";
++ status = "disabled";
+ };
+
+ ov5640: ov5640@3c {
+@@ -221,7 +262,9 @@
+ pinctrl-0 = <&pinctrl_enet1>;
+ phy-mode = "rmii";
+ phy-handle = <ðphy0>;
+- phy-supply = <®_peri_3v3>;
++ phy-reset-gpios = <&gpio5 7 GPIO_ACTIVE_LOW>; /* MX6UL_PAD_SNVS_TAMPER7__GPIO5_IO07 conflict with spi4 */
++ phy-reset-duration = <50>;
++ phy-reset-post-delay = <15>;
+ status = "okay";
+ };
+
+@@ -230,15 +273,17 @@
+ pinctrl-0 = <&pinctrl_enet2>;
+ phy-mode = "rmii";
+ phy-handle = <ðphy1>;
+- phy-supply = <®_peri_3v3>;
++ phy-reset-gpios = <&gpio5 4 GPIO_ACTIVE_LOW>; /* MX6UL_PAD_SNVS_TAMPER4__GPIO5_IO04 conflict with sai2 */
++ phy-reset-duration = <50>;
++ phy-reset-post-delay = <15>;
+ status = "okay";
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+- ethphy0: ethernet-phy@2 {
+- reg = <2>;
++ ethphy0: ethernet-phy@0 {
++ reg = <0>;
+ micrel,led-mode = <1>;
+ clocks = <&clks IMX6UL_CLK_ENET_REF>;
+ clock-names = "rmii-ref";
+@@ -301,21 +346,21 @@
+
+ display0: display@0 {
+ bits-per-pixel = <16>;
+- bus-width = <24>;
++ bus-width = <16>;
+
+ display-timings {
+ native-mode = <&timing0>;
+
+ timing0: timing0 {
+- clock-frequency = <9200000>;
+- hactive = <480>;
+- vactive = <272>;
+- hfront-porch = <8>;
+- hback-porch = <4>;
+- hsync-len = <41>;
+- vback-porch = <2>;
+- vfront-porch = <4>;
+- vsync-len = <10>;
++ clock-frequency = <30000000>;
++ hactive = <800>;
++ vactive = <480>;
++ hfront-porch = <40>;
++ hback-porch = <88>;
++ hsync-len = <48>;
++ vback-porch = <32>;
++ vfront-porch = <13>;
++ vsync-len = <3>;
+ hsync-active = <0>;
+ vsync-active = <0>;
+ de-active = <1>;
+@@ -332,6 +377,13 @@
+ status = "okay";
+ };
+
++&pwm2 {
++ #pwm-cells = <2>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_pwm2>;
++ status = "okay";
++};
++
+ &pxp {
+ status = "okay";
+ };
+@@ -339,7 +391,7 @@
+ &qspi {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_qspi>;
+- status = "okay";
++ status = "disabled"; /* disable it for the pins conflict with GPIO Led and Key */
+
+ flash0: n25q256a@0 {
+ #address-cells = <1>;
+@@ -360,7 +412,7 @@
+ assigned-clock-parents = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
+ assigned-clock-rates = <0>, <12288000>;
+ fsl,sai-mclk-direction-output;
+- status = "okay";
++ status = "disabled"; /* MX6UL_PAD_SNVS_TAMPER4__GPIO5_IO04 conflict with fec2 reset pin */
+ };
+
+ &snvs_poweroff {
+@@ -451,7 +503,7 @@
+ non-removable;
+ keep-power-in-suspend;
+ wakeup-source;
+- status = "okay";
++ status = "disabled"; /* Not used */
+ };
+
+ &wdog1 {
+@@ -463,6 +515,18 @@
+ &iomuxc {
+ pinctrl-names = "default";
+
++ pinctrl_gpio_leds: gpio-leds {
++ fsl,pins = <
++ MX6UL_PAD_NAND_DQS__GPIO4_IO16 0x17059 /* led run */
++ >;
++ };
++
++ pinctrl_gpio_keys: gpio-keys {
++ fsl,pins = <
++ MX6UL_PAD_NAND_CE1_B__GPIO4_IO14 0x17059 /* gpio key */
++ >;
++ };
++
+ pinctrl_csi1: csi1grp {
+ fsl,pins = <
+ MX6UL_PAD_CSI_MCLK__CSI_MCLK 0x1b088
+@@ -490,6 +554,7 @@
+ MX6UL_PAD_ENET1_TX_DATA0__ENET1_TDATA00 0x1b0b0
+ MX6UL_PAD_ENET1_TX_DATA1__ENET1_TDATA01 0x1b0b0
+ MX6UL_PAD_ENET1_TX_CLK__ENET1_REF_CLK1 0x4001b031
++ MX6UL_PAD_SNVS_TAMPER7__GPIO5_IO07 0x10B0 /* ENET1 RESET conflict with pinctrl_spi4 */
+ >;
+ };
+
+@@ -505,6 +570,7 @@
+ MX6UL_PAD_ENET2_TX_DATA0__ENET2_TDATA00 0x1b0b0
+ MX6UL_PAD_ENET2_TX_DATA1__ENET2_TDATA01 0x1b0b0
+ MX6UL_PAD_ENET2_TX_CLK__ENET2_REF_CLK2 0x4001b031
++ MX6UL_PAD_SNVS_TAMPER4__GPIO5_IO04 0x10B0 /* ENET2 RESET conflict with pinctrl_sai2 */
+ >;
+ };
+
+@@ -594,7 +660,6 @@
+ MX6UL_PAD_JTAG_TRST_B__SAI2_TX_DATA 0x11088
+ MX6UL_PAD_JTAG_TCK__SAI2_RX_DATA 0x11088
+ MX6UL_PAD_JTAG_TMS__SAI2_MCLK 0x17088
+- MX6UL_PAD_SNVS_TAMPER4__GPIO5_IO04 0x17059
+ >;
+ };
+
+@@ -610,6 +675,12 @@
+ >;
+ };
+
++ pinctrl_pwm2: pwm2grp {
++ fsl,pins = <
++ MX6UL_PAD_GPIO1_IO09__PWM2_OUT 0x110b0
++ >;
++ };
++
+ pinctrl_sim2: sim2grp {
+ fsl,pins = <
+ MX6UL_PAD_CSI_DATA03__SIM2_PORT1_PD 0xb808
+@@ -625,7 +696,6 @@
+ fsl,pins = <
+ MX6UL_PAD_BOOT_MODE0__GPIO5_IO10 0x70a1
+ MX6UL_PAD_BOOT_MODE1__GPIO5_IO11 0x70a1
+- MX6UL_PAD_SNVS_TAMPER7__GPIO5_IO07 0x70a1
+ MX6UL_PAD_SNVS_TAMPER8__GPIO5_IO08 0x80000000
+ >;
+ };
+@@ -679,8 +749,6 @@
+ MX6UL_PAD_SD1_DATA2__USDHC1_DATA2 0x17059
+ MX6UL_PAD_SD1_DATA3__USDHC1_DATA3 0x17059
+ MX6UL_PAD_UART1_RTS_B__GPIO1_IO19 0x17059 /* SD1 CD */
+- MX6UL_PAD_GPIO1_IO05__USDHC1_VSELECT 0x17059 /* SD1 VSELECT */
+- MX6UL_PAD_GPIO1_IO09__GPIO1_IO09 0x17059 /* SD1 RESET */
+ >;
+ };
+
+diff -Nuar -x include-prefixes -x logo_linux_clut224.ppm linux-imx/arch/arm/boot/dts/imx6ul.dtsi linux-imx-imx6ull/arch/arm/boot/dts/imx6ul.dtsi
+--- linux-imx/arch/arm/boot/dts/imx6ul.dtsi 2021-09-08 18:41:11.000000000 +0800
++++ linux-imx-imx6ull/arch/arm/boot/dts/imx6ul.dtsi 2021-11-17 20:39:10.582219267 +0800
+@@ -727,6 +727,7 @@
+ offset = <0x34>;
+ interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
++ status = "disabled"; /* disable CPU builtin RTC and will use ISL1208 */
+ };
+
+ snvs_poweroff: snvs-poweroff {
+diff -Nuar -x include-prefixes -x logo_linux_clut224.ppm linux-imx/.cfg-imx6ull linux-imx-imx6ull/.cfg-imx6ull
--- linux-imx/.cfg-imx6ull 1970-01-01 08:00:00.000000000 +0800
-+++ linux-imx-imx6ull/.cfg-imx6ull 2021-11-09 22:15:21.005328209 +0800
-@@ -0,0 +1,6952 @@
++++ linux-imx-imx6ull/.cfg-imx6ull 2021-11-17 23:54:02.719749912 +0800
+@@ -0,0 +1,6910 @@
+#
+# Automatically generated file; DO NOT EDIT.
+# Linux/arm 5.10.52 Kernel Configuration
+#
-+CONFIG_CC_VERSION_TEXT="arm-linux-gnueabihf-gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0"
++CONFIG_CC_VERSION_TEXT="arm-linux-gcc.br_real (Buildroot 2021.02.7) 9.4.0"
+CONFIG_CC_IS_GCC=y
-+CONFIG_GCC_VERSION=90300
-+CONFIG_LD_VERSION=234000000
++CONFIG_GCC_VERSION=90400
++CONFIG_LD_VERSION=235020000
+CONFIG_CLANG_VERSION=0
+CONFIG_LLD_VERSION=0
+CONFIG_CC_CAN_LINK=y
@@ -1088,11 +1355,8 @@
+# CONFIG_AF_RXRPC is not set
+# CONFIG_AF_KCM is not set
+CONFIG_WIRELESS=y
-+CONFIG_WIRELESS_EXT=y
+CONFIG_WEXT_CORE=y
+CONFIG_WEXT_PROC=y
-+CONFIG_WEXT_SPY=y
-+CONFIG_WEXT_PRIV=y
+CONFIG_CFG80211=y
+CONFIG_NL80211_TESTMODE=y
+# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
@@ -1103,11 +1367,6 @@
+# CONFIG_CFG80211_DEBUGFS is not set
+CONFIG_CFG80211_CRDA_SUPPORT=y
+CONFIG_CFG80211_WEXT=y
-+CONFIG_LIB80211=y
-+CONFIG_LIB80211_CRYPT_WEP=y
-+CONFIG_LIB80211_CRYPT_CCMP=y
-+CONFIG_LIB80211_CRYPT_TKIP=y
-+# CONFIG_LIB80211_DEBUG is not set
+CONFIG_MAC80211=y
+CONFIG_MAC80211_HAS_RC=y
+CONFIG_MAC80211_RC_MINSTREL=y
@@ -1495,7 +1754,7 @@
+CONFIG_EEPROM_AT25=y
+# CONFIG_EEPROM_LEGACY is not set
+# CONFIG_EEPROM_MAX6875 is not set
-+# CONFIG_EEPROM_93CX6 is not set
++CONFIG_EEPROM_93CX6=y
+# CONFIG_EEPROM_93XX46 is not set
+# CONFIG_EEPROM_IDT_89HPESX is not set
+# CONFIG_EEPROM_EE1004 is not set
@@ -2024,97 +2283,63 @@
+# CONFIG_USB_NET_AQC111 is not set
+CONFIG_WLAN=y
+# CONFIG_WIRELESS_WDS is not set
-+CONFIG_WLAN_VENDOR_ADMTEK=y
-+# CONFIG_ADM8211 is not set
-+CONFIG_WLAN_VENDOR_ATH=y
-+# CONFIG_ATH_DEBUG is not set
-+# CONFIG_ATH5K is not set
-+# CONFIG_ATH5K_PCI is not set
-+# CONFIG_ATH9K is not set
-+# CONFIG_ATH9K_HTC is not set
-+# CONFIG_CARL9170 is not set
-+# CONFIG_ATH6KL is not set
-+# CONFIG_AR5523 is not set
-+# CONFIG_WIL6210 is not set
-+# CONFIG_ATH10K is not set
-+# CONFIG_WCN36XX is not set
-+# CONFIG_ATH11K is not set
-+CONFIG_WLAN_VENDOR_ATMEL=y
-+# CONFIG_ATMEL is not set
-+# CONFIG_AT76C50X_USB is not set
-+CONFIG_WLAN_VENDOR_BROADCOM=y
-+# CONFIG_B43 is not set
-+# CONFIG_B43LEGACY is not set
-+# CONFIG_BRCMSMAC is not set
-+# CONFIG_BRCMFMAC is not set
-+CONFIG_WLAN_VENDOR_CISCO=y
-+CONFIG_WLAN_VENDOR_INTEL=y
-+# CONFIG_IPW2100 is not set
-+# CONFIG_IPW2200 is not set
-+# CONFIG_IWL4965 is not set
-+# CONFIG_IWL3945 is not set
-+# CONFIG_IWLWIFI is not set
-+CONFIG_WLAN_VENDOR_INTERSIL=y
-+CONFIG_HOSTAP=y
-+# CONFIG_HOSTAP_FIRMWARE is not set
-+# CONFIG_HOSTAP_PLX is not set
-+# CONFIG_HOSTAP_PCI is not set
-+# CONFIG_HERMES is not set
-+# CONFIG_P54_COMMON is not set
-+# CONFIG_PRISM54 is not set
-+CONFIG_WLAN_VENDOR_MARVELL=y
-+# CONFIG_LIBERTAS is not set
-+# CONFIG_LIBERTAS_THINFIRM is not set
-+# CONFIG_MWIFIEX is not set
-+# CONFIG_MWL8K is not set
++# CONFIG_WLAN_VENDOR_ADMTEK is not set
++# CONFIG_WLAN_VENDOR_ATH is not set
++# CONFIG_WLAN_VENDOR_ATMEL is not set
++# CONFIG_WLAN_VENDOR_BROADCOM is not set
++# CONFIG_WLAN_VENDOR_CISCO is not set
++# CONFIG_WLAN_VENDOR_INTEL is not set
++# CONFIG_WLAN_VENDOR_INTERSIL is not set
++# CONFIG_WLAN_VENDOR_MARVELL is not set
+CONFIG_WLAN_VENDOR_MEDIATEK=y
-+# CONFIG_MT7601U is not set
-+# CONFIG_MT76x0U is not set
++CONFIG_MT7601U=y
++CONFIG_MT76_CORE=y
++CONFIG_MT76_LEDS=y
++CONFIG_MT76_USB=y
++CONFIG_MT76x02_LIB=y
++CONFIG_MT76x02_USB=y
++CONFIG_MT76x0_COMMON=y
++CONFIG_MT76x0U=y
+# CONFIG_MT76x0E is not set
++CONFIG_MT76x2_COMMON=y
+# CONFIG_MT76x2E is not set
-+# CONFIG_MT76x2U is not set
++CONFIG_MT76x2U=y
+# CONFIG_MT7603E is not set
++CONFIG_MT7615_COMMON=y
+# CONFIG_MT7615E is not set
-+# CONFIG_MT7663U is not set
++CONFIG_MT7663_USB_SDIO_COMMON=y
++CONFIG_MT7663U=y
+# CONFIG_MT7663S is not set
+# CONFIG_MT7915E is not set
-+CONFIG_WLAN_VENDOR_MICROCHIP=y
-+# CONFIG_WILC1000_SDIO is not set
-+# CONFIG_WILC1000_SPI is not set
-+CONFIG_WLAN_VENDOR_RALINK=y
-+# CONFIG_RT2X00 is not set
++# CONFIG_WLAN_VENDOR_MICROCHIP is not set
++# CONFIG_WLAN_VENDOR_RALINK is not set
+CONFIG_WLAN_VENDOR_REALTEK=y
+# CONFIG_RTL8180 is not set
-+# CONFIG_RTL8187 is not set
++CONFIG_RTL8187=y
+CONFIG_RTL_CARDS=y
-+# CONFIG_RTL8192CE is not set
++CONFIG_RTL8192CE=y
+# CONFIG_RTL8192SE is not set
+# CONFIG_RTL8192DE is not set
+# CONFIG_RTL8723AE is not set
+# CONFIG_RTL8723BE is not set
-+# CONFIG_RTL8188EE is not set
-+# CONFIG_RTL8192EE is not set
-+# CONFIG_RTL8821AE is not set
-+# CONFIG_RTL8192CU is not set
-+# CONFIG_RTL8XXXU is not set
++CONFIG_RTL8188EE=y
++CONFIG_RTL8192EE=y
++CONFIG_RTL8821AE=y
++CONFIG_RTL8192CU=y
++CONFIG_RTLWIFI=y
++CONFIG_RTLWIFI_PCI=y
++CONFIG_RTLWIFI_USB=y
++CONFIG_RTLWIFI_DEBUG=y
++CONFIG_RTL8192C_COMMON=y
++CONFIG_RTLBTCOEXIST=y
++CONFIG_RTL8XXXU=y
++CONFIG_RTL8XXXU_UNTESTED=y
+# CONFIG_RTW88 is not set
-+CONFIG_WLAN_VENDOR_RSI=y
-+# CONFIG_RSI_91X is not set
-+CONFIG_WLAN_VENDOR_ST=y
-+# CONFIG_CW1200 is not set
-+CONFIG_WLAN_VENDOR_TI=y
-+# CONFIG_WL1251 is not set
-+CONFIG_WL12XX=m
-+CONFIG_WL18XX=m
-+CONFIG_WLCORE=m
-+# CONFIG_WLCORE_SPI is not set
-+CONFIG_WLCORE_SDIO=m
-+# CONFIG_WILINK_PLATFORM_DATA is not set
-+CONFIG_WLAN_VENDOR_ZYDAS=y
-+# CONFIG_USB_ZD1201 is not set
-+# CONFIG_ZD1211RW is not set
-+CONFIG_WLAN_VENDOR_QUANTENNA=y
-+# CONFIG_QTNFMAC_PCIE is not set
++# CONFIG_WLAN_VENDOR_RSI is not set
++# CONFIG_WLAN_VENDOR_ST is not set
++# CONFIG_WLAN_VENDOR_TI is not set
++# CONFIG_WLAN_VENDOR_ZYDAS is not set
++# CONFIG_WLAN_VENDOR_QUANTENNA is not set
+# CONFIG_MAC80211_HWSIM is not set
+# CONFIG_USB_NET_RNDIS_WLAN is not set
+# CONFIG_VIRT_WIFI is not set
@@ -6954,16 +7179,16 @@
+# CONFIG_MEMTEST is not set
+# end of Kernel Testing and Coverage
+# end of Kernel hacking
-diff -Nuar linux-imx/Makefile linux-imx-imx6ull/Makefile
+diff -Nuar -x include-prefixes -x logo_linux_clut224.ppm linux-imx/Makefile linux-imx-imx6ull/Makefile
--- linux-imx/Makefile 2021-09-08 18:41:11.000000000 +0800
-+++ linux-imx-imx6ull/Makefile 2021-11-09 22:14:42.521546609 +0800
++++ linux-imx-imx6ull/Makefile 2021-11-17 23:50:00.489132691 +0800
@@ -367,7 +367,8 @@
# Alternatively CROSS_COMPILE can be set in the environment.
# Default value for CROSS_COMPILE is not to prefix executables
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
-ARCH ?= $(SUBARCH)
+ARCH ?= arm
-+CROSS_COMPILE=arm-linux-gnueabihf-
++CROSS_COMPILE=/opt/buildroot/cortexA7/bin/arm-linux-
# Architecture as present in compile.h
UTS_MACHINE := $(ARCH)
--
Gitblit v1.9.1