凌云实验室推出的ARM Linux物联网网关开发板IGKBoard(IoT Gateway Kit Board)项目源码
guowenxue
2021-11-18 25468fafd73215c5b7b31e5ac7110c62363f9ab0
bsp/kernel/patch/linux-imx-imx6ull.patch
@@ -1,12 +1,18 @@
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-16 23:10:04.218339568 +0800
@@ -31,7 +31,35 @@
+++ linux-imx-imx6ull/arch/arm/boot/dts/imx6ul-14x14-evk.dtsi   2021-11-18 23:07:24.147581382 +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";
@@ -38,7 +44,79 @@
 
    pxp_v4l2 {
       compatible = "fsl,imx6ul-pxp-v4l2", "fsl,imx6sx-pxp-v4l2", "fsl,imx6sl-pxp-v4l2";
@@ -301,21 +329,21 @@
@@ -43,7 +77,6 @@
       regulator-name = "VSD_3V3";
       regulator-min-microvolt = <3300000>;
       regulator-max-microvolt = <3300000>;
-      gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>;
       off-on-delay-us = <20000>;
       enable-active-high;
    };
@@ -142,7 +175,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 +217,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 +231,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 +261,9 @@
    pinctrl-0 = <&pinctrl_enet1>;
    phy-mode = "rmii";
    phy-handle = <&ethphy0>;
-   phy-supply = <&reg_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 +272,17 @@
    pinctrl-0 = <&pinctrl_enet2>;
    phy-mode = "rmii";
    phy-handle = <&ethphy1>;
-   phy-supply = <&reg_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 +345,21 @@
 
    display0: display@0 {
       bits-per-pixel = <16>;
@@ -70,16 +148,58 @@
             hsync-active = <0>;
             vsync-active = <0>;
             de-active = <1>;
@@ -339,7 +367,7 @@
@@ -332,6 +376,13 @@
    status = "okay";
 };
+&pwm2 {
+   #pwm-cells = <2>;
+   pinctrl-names = "default";
+   pinctrl-0 = <&pinctrl_pwm2>;
+   status = "okay";
+};
+
 &pxp {
    status = "okay";
 };
@@ -339,7 +390,7 @@
 &qspi {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_qspi>;
-   status = "okay";
+   status = "disabled";
+   status = "disabled"; /* disable it for the pins conflict with GPIO Led and Key */
 
    flash0: n25q256a@0 {
       #address-cells = <1>;
@@ -463,6 +491,18 @@
@@ -360,7 +411,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 {
@@ -439,6 +490,7 @@
    pinctrl-1 = <&pinctrl_usdhc1_100mhz>;
    pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
    cd-gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
+    no-1-8-v;
    keep-power-in-suspend;
    wakeup-source;
    vmmc-supply = <&reg_sd1_vmmc>;
@@ -446,8 +498,8 @@
 };
 &usdhc2 {
-   pinctrl-names = "default";
-   pinctrl-0 = <&pinctrl_usdhc2>;
+    pinctrl-names = "default";
+    pinctrl-0 = <&pinctrl_usdhc2>;
    non-removable;
    keep-power-in-suspend;
    wakeup-source;
@@ -463,6 +515,18 @@
 &iomuxc {
    pinctrl-names = "default";
 
@@ -98,10 +218,77 @@
    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
       >;
    };
@@ -678,9 +748,7 @@
          MX6UL_PAD_SD1_DATA1__USDHC1_DATA1    0x17059
          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 */
+         MX6UL_PAD_UART1_RTS_B__GPIO1_IO19   0x17059 /* SD1 CD */
       >;
    };
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-18 22:45:15.290130981 +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-16 23:33:46.661730470 +0800
@@ -0,0 +1,6910 @@
+++ linux-imx-imx6ull/.cfg-imx6ull   2021-11-18 23:08:19.942958721 +0800
@@ -0,0 +1,6895 @@
+#
+# Automatically generated file; DO NOT EDIT.
+# Linux/arm 5.10.52 Kernel Configuration
@@ -6242,23 +6429,24 @@
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_UDF_FS=m
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+# end of CD-ROM/DVD Filesystems
+
+#
+# DOS/FAT/EXFAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=m
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_FAT_DEFAULT_UTF8 is not set
+# CONFIG_EXFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+CONFIG_EXFAT_FS=y
+CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8"
+CONFIG_NTFS_FS=y
+# CONFIG_NTFS_DEBUG is not set
+CONFIG_NTFS_RW=y
+# end of DOS/FAT/EXFAT/NT Filesystems
+
+#
@@ -6287,24 +6475,8 @@
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_UBIFS_FS=y
+# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
+CONFIG_UBIFS_FS_LZO=y
+CONFIG_UBIFS_FS_ZLIB=y
+CONFIG_UBIFS_FS_ZSTD=y
+# CONFIG_UBIFS_ATIME_SUPPORT is not set
+CONFIG_UBIFS_FS_XATTR=y
+CONFIG_UBIFS_FS_SECURITY=y
+# CONFIG_UBIFS_FS_AUTHENTICATION is not set
+# CONFIG_JFFS2_FS is not set
+# CONFIG_UBIFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_SQUASHFS is not set
+# CONFIG_VXFS_FS is not set
@@ -7014,7 +7186,7 @@
+# end of Kernel hacking
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-16 23:16:35.981472215 +0800
+++ linux-imx-imx6ull/Makefile   2021-11-18 23:07:29.755517565 +0800
@@ -367,7 +367,8 @@
 # Alternatively CROSS_COMPILE can be set in the environment.
 # Default value for CROSS_COMPILE is not to prefix executables