From 8cbd6de675f4e058df57883dd558fa8c1c4dae59 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Fri, 19 Jan 2018 20:04:17 +0100 Subject: [PATCH] Changing U-boot to mainline, adding patches for dev (4.14.y). It boots but virtually nothing works except network ... moving Udoo Neo under deprecated. Only one sample exists and little to no users around. --- config/boards/{udoo-neo.conf => udoo-neo.eos} | 0 config/boards/udoo.conf | 4 +- config/kernel/linux-udoo-dev.config | 265 ++++-- config/sources/udoo.conf | 7 +- ...r-pwrseq-generic-add-binding-doc-for.patch | 73 ++ ...002-power-add-power-sequence-library.patch | 853 ++++++++++++++++++ ...udoo-enable-uart4-serial-interface-f.patch | 45 + ...usb-device-add-optional-properties-f.patch | 46 + ...mx6-udooqdl-add-arduino-manager-driv.patch | 511 +++++++++++ ...er-sequence-handling-for-USB-devices.patch | 161 ++++ ...dl-Enable-usb-node-children-with-reg.patch | 49 + ...udoo.dtsi-fix-onboard-USB-HUB-proper.patch | 79 ++ ...imx6q-evi-Fix-onboard-hub-reset-line.patch | 74 ++ ..._DMA_block_memory_allocation_to_2048.patch | 13 + .../udoo-neo-adjust-env.patch | 0 .../board_udoo/udoo-adjust-env.patch | 15 + .../u-boot/u-boot-udoo/udoo-adjust-env.patch | 28 - 17 files changed, 2093 insertions(+), 130 deletions(-) rename config/boards/{udoo-neo.conf => udoo-neo.eos} (100%) create mode 100644 patch/kernel/udoo-dev/0001-binding-doc-power-pwrseq-generic-add-binding-doc-for.patch create mode 100644 patch/kernel/udoo-dev/0002-power-add-power-sequence-library.patch create mode 100644 patch/kernel/udoo-dev/0003-ARM-DTS-imx6qdl-udoo-enable-uart4-serial-interface-f.patch create mode 100644 patch/kernel/udoo-dev/0003-binding-doc-usb-usb-device-add-optional-properties-f.patch create mode 100644 patch/kernel/udoo-dev/0004-ARM-dts-driver-imx6-udooqdl-add-arduino-manager-driv.patch create mode 100644 patch/kernel/udoo-dev/0004-usb-core-add-power-sequence-handling-for-USB-devices.patch create mode 100644 patch/kernel/udoo-dev/0005-ARM-dts-imx6qdl-Enable-usb-node-children-with-reg.patch create mode 100644 patch/kernel/udoo-dev/0006-ARM-dts-imx6qdl-udoo.dtsi-fix-onboard-USB-HUB-proper.patch create mode 100644 patch/kernel/udoo-dev/0007-ARM-dts-imx6q-evi-Fix-onboard-hub-reset-line.patch create mode 100644 patch/kernel/udoo-dev/arm64_increasing_DMA_block_memory_allocation_to_2048.patch rename patch/u-boot/u-boot-udoo/{ => board_udoo-neo}/udoo-neo-adjust-env.patch (100%) create mode 100644 patch/u-boot/u-boot-udoo/board_udoo/udoo-adjust-env.patch delete mode 100644 patch/u-boot/u-boot-udoo/udoo-adjust-env.patch diff --git a/config/boards/udoo-neo.conf b/config/boards/udoo-neo.eos similarity index 100% rename from config/boards/udoo-neo.conf rename to config/boards/udoo-neo.eos diff --git a/config/boards/udoo.conf b/config/boards/udoo.conf index fb3c6a222..1714728cc 100644 --- a/config/boards/udoo.conf +++ b/config/boards/udoo.conf @@ -1,8 +1,8 @@ # Freescale iMx dual/quad core Wifi BOARD_NAME="Udoo" BOARDFAMILY="udoo" -BOOTCONFIG="udoo_qdl_config" -MODULES="bonding" +BOOTCONFIG="udoo_defconfig" +MODULES="" MODULES_NEXT="" # KERNEL_TARGET="default,next,dev" diff --git a/config/kernel/linux-udoo-dev.config b/config/kernel/linux-udoo-dev.config index c60165b73..1701ff966 100644 --- a/config/kernel/linux-udoo-dev.config +++ b/config/kernel/linux-udoo-dev.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/arm 4.12.0 Kernel Configuration +# Linux/arm 4.14.14 Kernel Configuration # CONFIG_ARM=y CONFIG_ARM_HAS_SG_CHAIN=y @@ -60,6 +60,7 @@ CONFIG_HAVE_ARCH_AUDITSYSCALL=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_IRQ_SHOW=y CONFIG_GENERIC_IRQ_SHOW_LEVEL=y +CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y CONFIG_HARDIRQS_SW_RESEND=y CONFIG_GENERIC_IRQ_CHIP=y CONFIG_IRQ_DOMAIN=y @@ -68,6 +69,7 @@ CONFIG_HANDLE_DOMAIN_IRQ=y # CONFIG_IRQ_DOMAIN_DEBUG is not set CONFIG_IRQ_FORCED_THREADING=y CONFIG_SPARSE_IRQ=y +# CONFIG_GENERIC_IRQ_DEBUGFS is not set CONFIG_ARCH_CLOCKSOURCE_DATA=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_CLOCKEVENTS=y @@ -104,7 +106,6 @@ CONFIG_TREE_SRCU=y # CONFIG_TASKS_RCU is not set CONFIG_RCU_STALL_COMMON=y CONFIG_RCU_NEED_SEGCBLIST=y -# CONFIG_TREE_RCU_TRACE is not set CONFIG_BUILD_BIN2C=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y @@ -176,6 +177,7 @@ CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y CONFIG_FUTEX=y +CONFIG_FUTEX_PI=y CONFIG_EPOLL=y CONFIG_SIGNALFD=y CONFIG_TIMERFD=y @@ -203,7 +205,9 @@ CONFIG_COMPAT_BRK=y # CONFIG_SLAB is not set CONFIG_SLUB=y # CONFIG_SLOB is not set +CONFIG_SLAB_MERGE_DEFAULT=y # CONFIG_SLAB_FREELIST_RANDOM is not set +# CONFIG_SLAB_FREELIST_HARDENED is not set CONFIG_SLUB_CPU_PARTIAL=y # CONFIG_SYSTEM_DATA_VERIFICATION is not set # CONFIG_PROFILING is not set @@ -241,6 +245,7 @@ CONFIG_HAVE_CC_STACKPROTECTOR=y CONFIG_CC_STACKPROTECTOR_NONE=y # CONFIG_CC_STACKPROTECTOR_REGULAR is not set # CONFIG_CC_STACKPROTECTOR_STRONG is not set +CONFIG_THIN_ARCHIVES=y CONFIG_HAVE_CONTEXT_TRACKING=y CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y @@ -265,6 +270,7 @@ CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y CONFIG_STRICT_KERNEL_RWX=y CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y CONFIG_STRICT_MODULE_RWX=y +# CONFIG_REFCOUNT_FULL is not set # # GCOV-based kernel profiling @@ -371,6 +377,7 @@ CONFIG_ARCH_MULTI_V6_V7=y # CONFIG_ARCH_MULTI_CPU_AUTO is not set # CONFIG_ARCH_VIRT is not set # CONFIG_ARCH_MVEBU is not set +# CONFIG_ARCH_ACTIONS is not set # CONFIG_ARCH_ALPINE is not set # CONFIG_ARCH_ARTPEC is not set # CONFIG_ARCH_AT91 is not set @@ -583,6 +590,7 @@ CONFIG_MIGRATION=y CONFIG_BOUNCE=y # CONFIG_KSM is not set CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +# CONFIG_ARCH_WANTS_THP_SWAP is not set CONFIG_CLEANCACHE=y CONFIG_FRONTSWAP=y CONFIG_CMA=y @@ -599,6 +607,7 @@ CONFIG_ZSMALLOC=y CONFIG_GENERIC_EARLY_IOREMAP=y # CONFIG_IDLE_PAGE_TRACKING is not set CONFIG_FRAME_VECTOR=y +# CONFIG_PERCPU_STATS is not set CONFIG_FORCE_MAX_ZONEORDER=11 CONFIG_ALIGNMENT_TRAP=y # CONFIG_UACCESS_WITH_MEMCPY is not set @@ -657,7 +666,6 @@ CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y # CONFIG_CPUFREQ_DT is not set CONFIG_ARM_BIG_LITTLE_CPUFREQ=m # CONFIG_ARM_DT_BL_CPUFREQ is not set -# CONFIG_ARM_DB8500_CPUFREQ is not set CONFIG_ARM_IMX6Q_CPUFREQ=y # CONFIG_ARM_KIRKWOOD_CPUFREQ is not set # CONFIG_QORIQ_CPUFREQ is not set @@ -737,6 +745,7 @@ CONFIG_PACKET=y # CONFIG_PACKET_DIAG is not set CONFIG_UNIX=y # CONFIG_UNIX_DIAG is not set +# CONFIG_TLS is not set CONFIG_XFRM=y CONFIG_XFRM_ALGO=y CONFIG_XFRM_USER=y @@ -800,6 +809,7 @@ CONFIG_IPV6_TUNNEL=m # CONFIG_IPV6_FOU is not set # CONFIG_IPV6_FOU_TUNNEL is not set CONFIG_IPV6_MULTIPLE_TABLES=y +# CONFIG_IPV6_SUBTREES is not set # CONFIG_IPV6_MROUTE is not set # CONFIG_IPV6_SEG6_LWTUNNEL is not set # CONFIG_IPV6_SEG6_HMAC is not set @@ -807,7 +817,6 @@ CONFIG_IPV6_MULTIPLE_TABLES=y CONFIG_NET_PTP_CLASSIFY=y # CONFIG_NETWORK_PHY_TIMESTAMPING is not set CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set CONFIG_NETFILTER_ADVANCED=y CONFIG_BRIDGE_NETFILTER=y @@ -888,6 +897,7 @@ CONFIG_NFT_FIB_INET=m CONFIG_NF_DUP_NETDEV=m CONFIG_NFT_DUP_NETDEV=m CONFIG_NFT_FWD_NETDEV=m +CONFIG_NFT_FIB_NETDEV=m CONFIG_NETFILTER_XTABLES=y # @@ -1145,9 +1155,9 @@ CONFIG_BRIDGE_VLAN_FILTERING=y CONFIG_HAVE_NET_DSA=y CONFIG_NET_DSA=m CONFIG_NET_DSA_TAG_BRCM=y -CONFIG_NET_DSA_TAG_QCA=y -CONFIG_NET_DSA_TAG_MTK=y CONFIG_NET_DSA_TAG_LAN9303=y +CONFIG_NET_DSA_TAG_MTK=y +CONFIG_NET_DSA_TAG_QCA=y CONFIG_VLAN_8021Q=y # CONFIG_VLAN_8021Q_GVRP is not set # CONFIG_VLAN_8021Q_MVRP is not set @@ -1227,6 +1237,7 @@ CONFIG_OPENVSWITCH_VXLAN=m CONFIG_MPLS=y CONFIG_NET_MPLS_GSO=m # CONFIG_MPLS_ROUTING is not set +# CONFIG_NET_NSH is not set # CONFIG_HSR is not set CONFIG_NET_SWITCHDEV=y # CONFIG_NET_L3_MASTER_DEV is not set @@ -1239,6 +1250,7 @@ CONFIG_CGROUP_NET_CLASSID=y CONFIG_NET_RX_BUSY_POLL=y CONFIG_BQL=y # CONFIG_BPF_JIT is not set +# CONFIG_BPF_STREAM_PARSER is not set CONFIG_NET_FLOW_LIMIT=y # @@ -1248,7 +1260,6 @@ CONFIG_NET_FLOW_LIMIT=y CONFIG_NET_DROP_MONITOR=m # CONFIG_HAMRADIO is not set # CONFIG_CAN is not set -# CONFIG_IRDA is not set CONFIG_BT=m CONFIG_BT_BREDR=y CONFIG_BT_RFCOMM=m @@ -1295,6 +1306,7 @@ CONFIG_BT_HCIUART_SERDEV=y # CONFIG_AF_RXRPC is not set CONFIG_AF_KCM=m CONFIG_STREAM_PARSER=m +CONFIG_FIB_RULES=y CONFIG_WIRELESS=y CONFIG_WEXT_CORE=y CONFIG_WEXT_PROC=y @@ -1339,7 +1351,7 @@ CONFIG_DST_CACHE=y CONFIG_GRO_CELLS=y CONFIG_NET_DEVLINK=m CONFIG_MAY_USE_DEVLINK=m -CONFIG_HAVE_CBPF_JIT=y +CONFIG_HAVE_EBPF_JIT=y # # Device Drivers @@ -1387,6 +1399,7 @@ CONFIG_CMA_SIZE_SEL_MBYTES=y # CONFIG_CMA_SIZE_SEL_MIN is not set # CONFIG_CMA_SIZE_SEL_MAX is not set CONFIG_CMA_ALIGNMENT=8 +CONFIG_GENERIC_ARCH_TOPOLOGY=y # # Bus devices @@ -1396,6 +1409,7 @@ CONFIG_CMA_ALIGNMENT=8 CONFIG_ARM_CCN=y # CONFIG_BRCMSTB_GISB_ARB is not set CONFIG_IMX_WEIM=y +# CONFIG_SIMPLE_PM_BUS is not set # CONFIG_VEXPRESS_CONFIG is not set CONFIG_CONNECTOR=y CONFIG_PROC_EVENTS=y @@ -1417,8 +1431,7 @@ CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y CONFIG_BLK_DEV=y # CONFIG_BLK_DEV_NULL_BLK is not set CONFIG_ZRAM=m -# CONFIG_ZRAM_DEBUG is not set -CONFIG_ZRAM_LZ4_COMPRESS=y +# CONFIG_ZRAM_WRITEBACK is not set # CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 @@ -1433,7 +1446,6 @@ CONFIG_ATA_OVER_ETH=m # CONFIG_VIRTIO_BLK is not set CONFIG_BLK_DEV_RBD=m CONFIG_NVME_CORE=m -# CONFIG_BLK_DEV_NVME_SCSI is not set CONFIG_NVME_FABRICS=m CONFIG_NVME_FC=m CONFIG_NVME_TARGET=m @@ -1461,6 +1473,7 @@ CONFIG_NVME_TARGET_LOOP=m # CONFIG_LATTICE_ECP3_CONFIG is not set CONFIG_SRAM=y CONFIG_SRAM_EXEC=y +CONFIG_UDOO_ARD=y # CONFIG_C2PORT is not set # @@ -1520,6 +1533,7 @@ CONFIG_SRAM_EXEC=y # CONFIG_ECHO is not set # CONFIG_CXL_BASE is not set # CONFIG_CXL_AFU_DRIVER_OPS is not set +# CONFIG_CXL_LIB is not set # # SCSI device support @@ -1677,17 +1691,18 @@ CONFIG_VETH=y # # Distributed Switch Architecture drivers # -# CONFIG_NET_DSA_MV88E6060 is not set -CONFIG_NET_DSA_BCM_SF2=m CONFIG_B53=m CONFIG_B53_SPI_DRIVER=m CONFIG_B53_MDIO_DRIVER=m CONFIG_B53_MMAP_DRIVER=m CONFIG_B53_SRAB_DRIVER=m -# CONFIG_NET_DSA_MV88E6XXX is not set -CONFIG_NET_DSA_QCA8K=m +CONFIG_NET_DSA_BCM_SF2=m # CONFIG_NET_DSA_LOOP is not set CONFIG_NET_DSA_MT7530=m +# CONFIG_NET_DSA_MV88E6060 is not set +# CONFIG_MICROCHIP_KSZ is not set +# CONFIG_NET_DSA_MV88E6XXX is not set +CONFIG_NET_DSA_QCA8K=m CONFIG_NET_DSA_SMSC_LAN9303=m CONFIG_NET_DSA_SMSC_LAN9303_I2C=m CONFIG_NET_DSA_SMSC_LAN9303_MDIO=m @@ -1726,11 +1741,15 @@ CONFIG_HNS_MDIO=m # CONFIG_HNS is not set # CONFIG_HNS_DSAF is not set # CONFIG_HNS_ENET is not set +CONFIG_NET_VENDOR_HUAWEI=y CONFIG_NET_VENDOR_INTEL=y CONFIG_NET_VENDOR_I825XX=y CONFIG_NET_VENDOR_MARVELL=y # CONFIG_MVMDIO is not set # CONFIG_MVNETA_BM is not set +CONFIG_NET_VENDOR_MELLANOX=y +# CONFIG_MLXSW_CORE is not set +# CONFIG_MLXFW is not set CONFIG_NET_VENDOR_MICREL=y # CONFIG_KS8842 is not set # CONFIG_KS8851 is not set @@ -1744,8 +1763,10 @@ CONFIG_NET_VENDOR_8390=y # CONFIG_AX88796 is not set # CONFIG_ETHOC is not set CONFIG_NET_VENDOR_QUALCOMM=y -# CONFIG_QCA7000 is not set +# CONFIG_QCA7000_SPI is not set +# CONFIG_QCA7000_UART is not set # CONFIG_QCOM_EMAC is not set +# CONFIG_RMNET is not set CONFIG_NET_VENDOR_RENESAS=y CONFIG_NET_VENDOR_ROCKER=y CONFIG_NET_VENDOR_SAMSUNG=y @@ -1767,6 +1788,7 @@ CONFIG_NET_VENDOR_WIZNET=y CONFIG_NET_VENDOR_SYNOPSYS=y # CONFIG_DWC_XLGMAC is not set CONFIG_MDIO_DEVICE=y +CONFIG_MDIO_BUS=y CONFIG_MDIO_BCM_UNIMAC=m # CONFIG_MDIO_BITBANG is not set # CONFIG_MDIO_BUS_MUX_GPIO is not set @@ -1787,6 +1809,7 @@ CONFIG_BCM7XXX_PHY=m CONFIG_BCM_NET_PHYLIB=m # CONFIG_BROADCOM_PHY is not set # CONFIG_CICADA_PHY is not set +# CONFIG_CORTINA_PHY is not set # CONFIG_DAVICOM_PHY is not set # CONFIG_DP83848_PHY is not set # CONFIG_DP83867_PHY is not set @@ -1796,12 +1819,14 @@ CONFIG_FIXED_PHY=y # CONFIG_LSI_ET1011C_PHY is not set # CONFIG_LXT_PHY is not set CONFIG_MARVELL_PHY=m +# CONFIG_MARVELL_10G_PHY is not set # CONFIG_MICREL_PHY is not set # CONFIG_MICROCHIP_PHY is not set # CONFIG_MICROSEMI_PHY is not set # CONFIG_NATIONAL_PHY is not set # CONFIG_QSEMI_PHY is not set # CONFIG_REALTEK_PHY is not set +# CONFIG_ROCKCHIP_PHY is not set # CONFIG_SMSC_PHY is not set # CONFIG_STE10XP is not set # CONFIG_TERANETICS_PHY is not set @@ -1896,6 +1921,9 @@ CONFIG_WILINK_PLATFORM_DATA=y CONFIG_WLAN_VENDOR_ZYDAS=y # CONFIG_USB_ZD1201 is not set # CONFIG_ZD1211RW is not set +CONFIG_WLAN_VENDOR_QUANTENNA=y +CONFIG_RTL8812AU=m +CONFIG_RTL8814AU=m # CONFIG_MAC80211_HWSIM is not set # CONFIG_USB_NET_RNDIS_WLAN is not set @@ -1936,6 +1964,7 @@ CONFIG_INPUT_KEYBOARD=y CONFIG_KEYBOARD_ATKBD=y # CONFIG_KEYBOARD_QT1070 is not set # CONFIG_KEYBOARD_QT2160 is not set +CONFIG_KEYBOARD_DLINK_DIR685=m # CONFIG_KEYBOARD_LKKBD is not set CONFIG_KEYBOARD_GPIO=y # CONFIG_KEYBOARD_GPIO_POLLED is not set @@ -2006,6 +2035,7 @@ CONFIG_INPUT_AXP20X_PEK=m # CONFIG_INPUT_UINPUT is not set # CONFIG_INPUT_PCF8574 is not set # CONFIG_INPUT_PWM_BEEPER is not set +CONFIG_INPUT_PWM_VIBRA=m # CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set # CONFIG_INPUT_DA9052_ONKEY is not set # CONFIG_INPUT_ADXL34X is not set @@ -2028,6 +2058,7 @@ CONFIG_SERIO_LIBPS2=y # CONFIG_SERIO_PS2MULT is not set # CONFIG_SERIO_ARC_PS2 is not set # CONFIG_SERIO_APBPS2 is not set +CONFIG_SERIO_GPIO_PS2=m # CONFIG_USERIO is not set # CONFIG_GAMEPORT is not set @@ -2095,6 +2126,7 @@ CONFIG_IPMI_POWEROFF=m CONFIG_HW_RANDOM=y # CONFIG_HW_RANDOM_TIMERIOMEM is not set CONFIG_HW_RANDOM_VIRTIO=m +CONFIG_HW_RANDOM_IMX_RNGC=m CONFIG_HW_RANDOM_TPM=m # CONFIG_R3964 is not set # CONFIG_RAW_DRIVER is not set @@ -2125,6 +2157,7 @@ CONFIG_I2C_MUX=y # # CONFIG_I2C_ARB_GPIO_CHALLENGE is not set # CONFIG_I2C_MUX_GPIO is not set +CONFIG_I2C_MUX_GPMUX=m # CONFIG_I2C_MUX_LTC4306 is not set # CONFIG_I2C_MUX_PCA9541 is not set # CONFIG_I2C_MUX_PCA954x is not set @@ -2204,12 +2237,9 @@ CONFIG_SPI_IMX=y # CONFIG_SPI_SPIDEV is not set CONFIG_SPI_LOOPBACK_TEST=m # CONFIG_SPI_TLE62X0 is not set +# CONFIG_SPI_SLAVE is not set # CONFIG_SPMI is not set # CONFIG_HSI is not set - -# -# PPS support -# CONFIG_PPS=y # CONFIG_PPS_DEBUG is not set @@ -2241,8 +2271,10 @@ CONFIG_GENERIC_PINCTRL_GROUPS=y CONFIG_PINMUX=y CONFIG_GENERIC_PINMUX_FUNCTIONS=y CONFIG_PINCONF=y +CONFIG_GENERIC_PINCONF=y # CONFIG_DEBUG_PINCTRL is not set # CONFIG_PINCTRL_AMD is not set +# CONFIG_PINCTRL_MCP23S08 is not set # CONFIG_PINCTRL_SINGLE is not set # CONFIG_PINCTRL_SX150X is not set CONFIG_PINCTRL_IMX=y @@ -2251,7 +2283,6 @@ CONFIG_PINCTRL_IMX6SL=y CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y CONFIG_GPIOLIB=y CONFIG_OF_GPIO=y -CONFIG_GPIOLIB_IRQCHIP=y # CONFIG_DEBUG_GPIO is not set CONFIG_GPIO_SYSFS=y CONFIG_GPIO_GENERIC=y @@ -2300,11 +2331,7 @@ CONFIG_GPIO_PCA953X=y # CONFIG_GPIO_MAX7301 is not set # CONFIG_GPIO_MC33880 is not set CONFIG_GPIO_PISOSR=m - -# -# SPI or I2C GPIO expanders -# -# CONFIG_GPIO_MCP23S08 is not set +# CONFIG_GPIO_XRA1403 is not set # # USB GPIO expanders @@ -2342,6 +2369,7 @@ CONFIG_AXP288_CHARGER=m # CONFIG_CHARGER_LP8727 is not set # CONFIG_CHARGER_GPIO is not set # CONFIG_CHARGER_MANAGER is not set +# CONFIG_CHARGER_LTC3651 is not set CONFIG_CHARGER_DETECTOR_MAX14656=m # CONFIG_CHARGER_BQ2415X is not set # CONFIG_CHARGER_BQ24190 is not set @@ -2352,6 +2380,8 @@ CONFIG_CHARGER_DETECTOR_MAX14656=m CONFIG_BATTERY_GAUGE_LTC2941=m CONFIG_BATTERY_RT5033=m # CONFIG_CHARGER_RT9455 is not set +CONFIG_POWER_SEQUENCE=y +# CONFIG_PWRSEQ_GENERIC is not set CONFIG_HWMON=y # CONFIG_HWMON_VID is not set # CONFIG_HWMON_DEBUG_CHIP is not set @@ -2512,6 +2542,7 @@ CONFIG_IMX_THERMAL=y CONFIG_WATCHDOG=y CONFIG_WATCHDOG_CORE=y # CONFIG_WATCHDOG_NOWAYOUT is not set +CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y # CONFIG_WATCHDOG_SYSFS is not set # @@ -2544,10 +2575,6 @@ CONFIG_SSB_POSSIBLE=y # # CONFIG_SSB is not set CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# # CONFIG_BCMA is not set # @@ -2562,6 +2589,7 @@ CONFIG_MFD_CORE=y # CONFIG_MFD_ATMEL_FLEXCOM is not set CONFIG_MFD_ATMEL_HLCDC=m # CONFIG_MFD_BCM590XX is not set +# CONFIG_MFD_BD9571MWV is not set CONFIG_MFD_AXP20X=m CONFIG_MFD_AXP20X_I2C=m # CONFIG_MFD_CROS_EC is not set @@ -2581,7 +2609,6 @@ CONFIG_MFD_MC13XXX_I2C=y # CONFIG_MFD_HI6421_PMIC is not set # CONFIG_HTC_PASIC3 is not set # CONFIG_HTC_I2CPLD is not set -# CONFIG_INTEL_SOC_PMIC is not set # CONFIG_MFD_KEMPLD is not set # CONFIG_MFD_88PM800 is not set # CONFIG_MFD_88PM805 is not set @@ -2628,6 +2655,7 @@ CONFIG_MFD_SYSCON=y # CONFIG_MFD_TPS65090 is not set # CONFIG_MFD_TPS65217 is not set # CONFIG_MFD_TI_LP873X is not set +# CONFIG_MFD_TI_LP87565 is not set # CONFIG_MFD_TPS65218 is not set # CONFIG_MFD_TPS6586X is not set # CONFIG_MFD_TPS65910 is not set @@ -2694,39 +2722,7 @@ CONFIG_REGULATOR_RT5033=m # CONFIG_REGULATOR_TPS6524X is not set # CONFIG_REGULATOR_VCTRL is not set CONFIG_CEC_CORE=m -CONFIG_MEDIA_SUPPORT=y - -# -# Multimedia core support -# -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_MEDIA_ANALOG_TV_SUPPORT=y -CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y -CONFIG_MEDIA_RADIO_SUPPORT=y -CONFIG_MEDIA_SDR_SUPPORT=y -CONFIG_MEDIA_RC_SUPPORT=y -CONFIG_MEDIA_CEC_SUPPORT=y -# CONFIG_MEDIA_CEC_RC is not set -CONFIG_MEDIA_CONTROLLER=y -# CONFIG_MEDIA_CONTROLLER_DVB is not set -CONFIG_VIDEO_DEV=y -CONFIG_VIDEO_V4L2_SUBDEV_API=y -CONFIG_VIDEO_V4L2=y -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set -CONFIG_VIDEOBUF2_CORE=y -CONFIG_VIDEOBUF2_MEMOPS=y -CONFIG_VIDEOBUF2_VMALLOC=y -CONFIG_DVB_CORE=y -CONFIG_DVB_NET=y -# CONFIG_TTPCI_EEPROM is not set -CONFIG_DVB_MAX_ADAPTERS=8 -CONFIG_DVB_DYNAMIC_MINORS=y -# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set - -# -# Media drivers -# +CONFIG_CEC_NOTIFIER=y CONFIG_RC_CORE=y CONFIG_RC_MAP=y CONFIG_RC_DECODERS=y @@ -2754,6 +2750,38 @@ CONFIG_IR_IGORPLUGUSB=m # CONFIG_IR_GPIO_CIR is not set # CONFIG_IR_SERIAL is not set CONFIG_IR_SIR=m +CONFIG_MEDIA_SUPPORT=y + +# +# Multimedia core support +# +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_ANALOG_TV_SUPPORT=y +CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y +CONFIG_MEDIA_RADIO_SUPPORT=y +CONFIG_MEDIA_SDR_SUPPORT=y +CONFIG_MEDIA_CEC_SUPPORT=y +# CONFIG_MEDIA_CEC_RC is not set +CONFIG_MEDIA_CONTROLLER=y +# CONFIG_MEDIA_CONTROLLER_DVB is not set +CONFIG_VIDEO_DEV=y +CONFIG_VIDEO_V4L2_SUBDEV_API=y +CONFIG_VIDEO_V4L2=y +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set +CONFIG_VIDEOBUF2_CORE=y +CONFIG_VIDEOBUF2_MEMOPS=y +CONFIG_VIDEOBUF2_VMALLOC=y +CONFIG_DVB_CORE=y +CONFIG_DVB_NET=y +# CONFIG_TTPCI_EEPROM is not set +CONFIG_DVB_MAX_ADAPTERS=8 +CONFIG_DVB_DYNAMIC_MINORS=y +# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set + +# +# Media drivers +# CONFIG_MEDIA_USB_SUPPORT=y # @@ -2882,6 +2910,7 @@ CONFIG_V4L_MEM2MEM_DRIVERS=y # CONFIG_V4L_TEST_DRIVERS is not set # CONFIG_DVB_PLATFORM_DRIVERS is not set # CONFIG_CEC_PLATFORM_DRIVERS is not set +# CONFIG_SDR_PLATFORM_DRIVERS is not set # # Supported MMC/SDIO adapters @@ -2951,6 +2980,10 @@ CONFIG_VIDEO_IR_I2C=y # Audio/Video compression chips # +# +# SDR tuner chips +# + # # Miscellaneous helper chips # @@ -3107,7 +3140,9 @@ CONFIG_OMAP2_DSS_SLEEP_AFTER_VENC_RESET=y # CONFIG_DRM_OMAP_PANEL_NEC_NL8048HL11 is not set # CONFIG_DRM_TILCDC is not set # CONFIG_DRM_VIRTIO_GPU is not set -# CONFIG_DRM_FSL_DCU is not set +CONFIG_DRM_FSL_DCU=m +CONFIG_DRM_STM=m +# CONFIG_DRM_STM_DSI is not set CONFIG_DRM_PANEL=y # @@ -3120,6 +3155,7 @@ CONFIG_DRM_PANEL_SIMPLE=m # CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set CONFIG_DRM_PANEL_SITRONIX_ST7789V=m CONFIG_DRM_BRIDGE=y +CONFIG_DRM_PANEL_BRIDGE=y # # Display Interface Bridges @@ -3138,6 +3174,7 @@ CONFIG_DRM_TI_TFP410=m CONFIG_DRM_DW_HDMI=m CONFIG_DRM_DW_HDMI_AHB_AUDIO=m CONFIG_DRM_DW_HDMI_I2S_AUDIO=m +CONFIG_DRM_DW_HDMI_CEC=m # CONFIG_DRM_STI is not set CONFIG_DRM_ETNAVIV=m # CONFIG_DRM_ETNAVIV_REGISTER_LOGGING is not set @@ -3147,6 +3184,9 @@ CONFIG_DRM_MXSFB=m CONFIG_DRM_TINYDRM=m CONFIG_TINYDRM_MIPI_DBI=m CONFIG_TINYDRM_MI0283QT=m +# CONFIG_TINYDRM_REPAPER is not set +# CONFIG_TINYDRM_ST7586 is not set +# CONFIG_DRM_PL111 is not set # CONFIG_DRM_LEGACY is not set # CONFIG_DRM_LIB_RANDOM is not set @@ -3166,7 +3206,7 @@ CONFIG_FB_CFB_IMAGEBLIT=y CONFIG_FB_SYS_FILLRECT=y CONFIG_FB_SYS_COPYAREA=y CONFIG_FB_SYS_IMAGEBLIT=y -# CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA is not set +CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA=y # CONFIG_FB_FOREIGN_ENDIAN is not set CONFIG_FB_SYS_FOPS=y CONFIG_FB_DEFERRED_IO=y @@ -3250,9 +3290,7 @@ CONFIG_SND_HWDEP=m CONFIG_SND_RAWMIDI=m CONFIG_SND_JACK=y CONFIG_SND_JACK_INPUT_DEV=y -# CONFIG_SND_SEQUENCER is not set -# CONFIG_SND_MIXER_OSS is not set -# CONFIG_SND_PCM_OSS is not set +# CONFIG_SND_OSSEMUL is not set CONFIG_SND_PCM_TIMER=y # CONFIG_SND_HRTIMER is not set # CONFIG_SND_DYNAMIC_MINORS is not set @@ -3261,11 +3299,9 @@ CONFIG_SND_PROC_FS=y CONFIG_SND_VERBOSE_PROCFS=y # CONFIG_SND_VERBOSE_PRINTK is not set # CONFIG_SND_DEBUG is not set -# CONFIG_SND_RAWMIDI_SEQ is not set +# CONFIG_SND_SEQUENCER is not set # CONFIG_SND_OPL3_LIB_SEQ is not set # CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set CONFIG_SND_DRIVERS=y # CONFIG_SND_DUMMY is not set # CONFIG_SND_ALOOP is not set @@ -3324,6 +3360,10 @@ CONFIG_SND_SOC_IMX_SPDIF=y # CONFIG_SND_SOC_FSL_ASOC_CARD is not set CONFIG_SND_I2S_HI6210_I2S=m # CONFIG_SND_SOC_IMG is not set + +# +# STMicroelectronics STM32 SOC audio support +# CONFIG_SND_SOC_XTFPGA_I2S=m # CONFIG_ZX_TDM is not set CONFIG_SND_SOC_I2C_AND_SPI=y @@ -3362,11 +3402,13 @@ CONFIG_SND_SOC_CS4271=m CONFIG_SND_SOC_CS4271_I2C=m CONFIG_SND_SOC_CS4271_SPI=m # CONFIG_SND_SOC_CS42XX8_I2C is not set +CONFIG_SND_SOC_CS43130=m # CONFIG_SND_SOC_CS4349 is not set CONFIG_SND_SOC_CS53L30=m CONFIG_SND_SOC_DIO2125=m CONFIG_SND_SOC_HDMI_CODEC=m CONFIG_SND_SOC_ES7134=m +CONFIG_SND_SOC_ES8316=m CONFIG_SND_SOC_ES8328=m CONFIG_SND_SOC_ES8328_I2C=m CONFIG_SND_SOC_ES8328_SPI=m @@ -3413,6 +3455,7 @@ CONFIG_SND_SOC_TLV320AIC23_SPI=m CONFIG_SND_SOC_TS3A227E=m # CONFIG_SND_SOC_WM8510 is not set # CONFIG_SND_SOC_WM8523 is not set +CONFIG_SND_SOC_WM8524=m # CONFIG_SND_SOC_WM8580 is not set # CONFIG_SND_SOC_WM8711 is not set # CONFIG_SND_SOC_WM8728 is not set @@ -3431,6 +3474,7 @@ CONFIG_SND_SOC_WM8960=m CONFIG_SND_SOC_WM8974=m # CONFIG_SND_SOC_WM8978 is not set CONFIG_SND_SOC_WM8985=m +CONFIG_SND_SOC_ZX_AUD96P22=m CONFIG_SND_SOC_NAU8540=m CONFIG_SND_SOC_NAU8810=m CONFIG_SND_SOC_NAU8824=m @@ -3438,6 +3482,8 @@ CONFIG_SND_SOC_NAU8824=m CONFIG_SND_SIMPLE_CARD_UTILS=m # CONFIG_SND_SIMPLE_CARD is not set CONFIG_SND_SIMPLE_SCU_CARD=m +# CONFIG_SND_AUDIO_GRAPH_CARD is not set +# CONFIG_SND_AUDIO_GRAPH_SCU_CARD is not set # # HID support @@ -3465,7 +3511,6 @@ CONFIG_HID_ASUS=m # CONFIG_HID_CORSAIR is not set # CONFIG_HID_PRODIKEYS is not set CONFIG_HID_CMEDIA=m -CONFIG_HID_CP2112=m # CONFIG_HID_CYPRESS is not set # CONFIG_HID_DRAGONRISE is not set # CONFIG_HID_EMS_FF is not set @@ -3482,6 +3527,7 @@ CONFIG_HID_CP2112=m # CONFIG_HID_WALTOP is not set # CONFIG_HID_GYRATION is not set # CONFIG_HID_ICADE is not set +# CONFIG_HID_ITE is not set # CONFIG_HID_TWINHAN is not set # CONFIG_HID_KENSINGTON is not set # CONFIG_HID_LCPOWER is not set @@ -3502,6 +3548,7 @@ CONFIG_HID_NTI=m # CONFIG_HID_PICOLCD is not set CONFIG_HID_PLANTRONICS=m # CONFIG_HID_PRIMAX is not set +# CONFIG_HID_RETRODE is not set # CONFIG_HID_ROCCAT is not set # CONFIG_HID_SAITEK is not set # CONFIG_HID_SAMSUNG is not set @@ -3760,6 +3807,7 @@ CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 # CONFIG_USB_PXA27X is not set # CONFIG_USB_MV_UDC is not set # CONFIG_USB_MV_U3D is not set +# CONFIG_USB_SNP_UDC_PLAT is not set # CONFIG_USB_M66592 is not set CONFIG_USB_BDC_UDC=m @@ -3804,22 +3852,22 @@ CONFIG_USB_G_SERIAL=m # # USB Power Delivery and Type-C drivers # +# CONFIG_TYPEC_UCSI is not set # CONFIG_USB_LED_TRIG is not set # CONFIG_USB_ULPI_BUS is not set # CONFIG_UWB is not set CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set CONFIG_PWRSEQ_EMMC=y CONFIG_PWRSEQ_SIMPLE=y CONFIG_MMC_BLOCK=y CONFIG_MMC_BLOCK_MINORS=8 -CONFIG_MMC_BLOCK_BOUNCE=y # CONFIG_SDIO_UART is not set # CONFIG_MMC_TEST is not set # # MMC/SD/SDIO Host Controller Drivers # +# CONFIG_MMC_DEBUG is not set CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_IO_ACCESSORS=y CONFIG_MMC_SDHCI_PLTFM=y @@ -3830,6 +3878,7 @@ CONFIG_MMC_SDHCI_CADENCE=m CONFIG_MMC_SDHCI_ESDHC_IMX=y # CONFIG_MMC_SDHCI_F_SDH30 is not set # CONFIG_MMC_MXC is not set +# CONFIG_MMC_SPI is not set # CONFIG_MMC_DW is not set # CONFIG_MMC_VUB300 is not set # CONFIG_MMC_USHC is not set @@ -3908,6 +3957,7 @@ CONFIG_RTC_CLASS=y CONFIG_RTC_SYSTOHC=y CONFIG_RTC_SYSTOHC_DEVICE="rtc0" # CONFIG_RTC_DEBUG is not set +CONFIG_RTC_NVMEM=y # # RTC interfaces @@ -4005,6 +4055,7 @@ CONFIG_RTC_DRV_DS1685=y # on-CPU RTC drivers # CONFIG_RTC_DRV_IMXDI=y +# CONFIG_RTC_DRV_FTRTC010 is not set # CONFIG_RTC_DRV_MC13XXX is not set CONFIG_RTC_DRV_MXC=y CONFIG_RTC_DRV_SNVS=y @@ -4023,6 +4074,7 @@ CONFIG_DMADEVICES=y CONFIG_DMA_ENGINE=y CONFIG_DMA_VIRTUAL_CHANNELS=y CONFIG_DMA_OF=y +# CONFIG_ALTERA_MSGDMA is not set CONFIG_FSL_EDMA=y # CONFIG_IMX_DMA is not set CONFIG_IMX_SDMA=y @@ -4074,6 +4126,7 @@ CONFIG_COMMON_CLK=y # # Common Clock Framework # +# CONFIG_CLK_HSDK is not set # CONFIG_COMMON_CLK_SI5351 is not set # CONFIG_COMMON_CLK_SI514 is not set # CONFIG_COMMON_CLK_SI570 is not set @@ -4086,16 +4139,13 @@ CONFIG_COMMON_CLK=y # CONFIG_COMMON_CLK_PXA is not set # CONFIG_COMMON_CLK_PIC32 is not set CONFIG_COMMON_CLK_VC5=m - -# -# Hardware Spinlock drivers -# +# CONFIG_HWSPINLOCK is not set # # Clock Source drivers # -CONFIG_CLKSRC_OF=y -CONFIG_CLKSRC_PROBE=y +CONFIG_TIMER_OF=y +CONFIG_TIMER_PROBE=y CONFIG_CLKSRC_MMIO=y CONFIG_ARM_ARCH_TIMER=y CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y @@ -4131,6 +4181,10 @@ CONFIG_REMOTEPROC=m # SOC (System On Chip) specific Drivers # +# +# Amlogic SoC drivers +# + # # Broadcom SoC drivers # @@ -4139,9 +4193,12 @@ CONFIG_REMOTEPROC=m # # i.MX SoC drivers # + +# +# Qualcomm SoC drivers +# # CONFIG_SUNXI_SRAM is not set # CONFIG_SOC_TI is not set -# CONFIG_SOC_ZTE is not set # CONFIG_PM_DEVFREQ is not set CONFIG_EXTCON=y @@ -4151,7 +4208,6 @@ CONFIG_EXTCON=y CONFIG_EXTCON_AXP288=m # CONFIG_EXTCON_GPIO is not set CONFIG_EXTCON_MAX3355=m -CONFIG_EXTCON_QCOM_SPMI_MISC=m # CONFIG_EXTCON_RT8973A is not set # CONFIG_EXTCON_SM5502 is not set # CONFIG_EXTCON_USB_GPIO is not set @@ -4172,13 +4228,14 @@ CONFIG_RESET_CONTROLLER=y # CONFIG_RESET_ATH79 is not set # CONFIG_RESET_BERLIN is not set # CONFIG_RESET_IMX7 is not set +# CONFIG_RESET_LANTIQ is not set # CONFIG_RESET_LPC18XX is not set # CONFIG_RESET_MESON is not set # CONFIG_RESET_PISTACHIO is not set # CONFIG_RESET_SOCFPGA is not set # CONFIG_RESET_STM32 is not set # CONFIG_RESET_SUNXI is not set -CONFIG_TI_SYSCON_RESET=m +# CONFIG_RESET_TI_SYSCON is not set # CONFIG_RESET_ZYNQ is not set # CONFIG_RESET_TEGRA_BPMP is not set # CONFIG_FMC is not set @@ -4187,9 +4244,9 @@ CONFIG_TI_SYSCON_RESET=m # PHY Subsystem # CONFIG_GENERIC_PHY=y +# CONFIG_BCM_KONA_USB2_PHY is not set # CONFIG_PHY_PXA_28NM_HSIC is not set # CONFIG_PHY_PXA_28NM_USB2 is not set -# CONFIG_BCM_KONA_USB2_PHY is not set CONFIG_POWERCAP=y # CONFIG_MCB is not set @@ -4204,13 +4261,11 @@ CONFIG_ARM_PMU=y # # CONFIG_ANDROID is not set CONFIG_DAX=y -# CONFIG_NVMEM is not set +CONFIG_NVMEM=y +# CONFIG_NVMEM_IMX_IIM is not set +# CONFIG_NVMEM_IMX_OCOTP is not set # CONFIG_STM is not set # CONFIG_INTEL_TH is not set - -# -# FPGA Configuration Support -# # CONFIG_FPGA is not set # @@ -4223,6 +4278,14 @@ CONFIG_TEE=m # TEE drivers # CONFIG_OPTEE=m +CONFIG_MULTIPLEXER=m + +# +# Multiplexer drivers +# +# CONFIG_MUX_ADG792A is not set +# CONFIG_MUX_GPIO is not set +# CONFIG_MUX_MMIO is not set # # Firmware Drivers @@ -4313,6 +4376,7 @@ CONFIG_FUSE_FS=y CONFIG_CUSE=y CONFIG_OVERLAY_FS=y # CONFIG_OVERLAY_FS_REDIRECT_DIR is not set +# CONFIG_OVERLAY_FS_INDEX is not set # # Caches @@ -4432,8 +4496,8 @@ CONFIG_CIFS_POSIX=y CONFIG_CIFS_ACL=y CONFIG_CIFS_DEBUG=y # CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_DEBUG_DUMP_KEYS is not set CONFIG_CIFS_DFS_UPCALL=y -CONFIG_CIFS_SMB2=y # CONFIG_CIFS_SMB311 is not set CONFIG_CIFS_FSCACHE=y # CONFIG_NCP_FS is not set @@ -4551,7 +4615,7 @@ CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y # # Debug Lockups and Hangs # -# CONFIG_LOCKUP_DETECTOR is not set +# CONFIG_SOFTLOCKUP_DETECTOR is not set # CONFIG_DETECT_HUNG_TASK is not set # CONFIG_WQ_WATCHDOG is not set # CONFIG_PANIC_ON_OOPS is not set @@ -4578,6 +4642,7 @@ CONFIG_SCHED_DEBUG=y # CONFIG_LOCK_TORTURE_TEST is not set # CONFIG_WW_MUTEX_SELFTEST is not set CONFIG_STACKTRACE=y +# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y # CONFIG_DEBUG_LIST is not set @@ -4590,7 +4655,6 @@ CONFIG_DEBUG_BUGVERBOSE=y # RCU Debugging # # CONFIG_PROVE_RCU is not set -# CONFIG_SPARSE_RCU_POINTER is not set # CONFIG_TORTURE_TEST is not set # CONFIG_RCU_PERF_TEST is not set # CONFIG_RCU_TORTURE_TEST is not set @@ -4607,6 +4671,7 @@ CONFIG_NOP_TRACER=y CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y CONFIG_HAVE_SYSCALL_TRACEPOINTS=y CONFIG_HAVE_C_RECORDMCOUNT=y @@ -4635,8 +4700,9 @@ CONFIG_PROBE_EVENTS=y # CONFIG_TRACEPOINT_BENCHMARK is not set # CONFIG_RING_BUFFER_BENCHMARK is not set # CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_TRACE_ENUM_MAP_FILE is not set +# CONFIG_TRACE_EVAL_MAP_FILE is not set CONFIG_TRACING_EVENTS_GPIO=y +# CONFIG_DMA_API_DEBUG is not set # # Runtime Testing @@ -4658,14 +4724,15 @@ CONFIG_TRACING_EVENTS_GPIO=y # CONFIG_TEST_UUID is not set # CONFIG_TEST_RHASHTABLE is not set # CONFIG_TEST_HASH is not set -# CONFIG_DMA_API_DEBUG is not set # CONFIG_TEST_LKM is not set # CONFIG_TEST_USER_COPY is not set # CONFIG_TEST_BPF is not set # CONFIG_TEST_FIRMWARE is not set +# CONFIG_TEST_SYSCTL is not set # CONFIG_TEST_UDELAY is not set -# CONFIG_MEMTEST is not set # CONFIG_TEST_STATIC_KEYS is not set +# CONFIG_TEST_KMOD is not set +# CONFIG_MEMTEST is not set # CONFIG_BUG_ON_DATA_CORRUPTION is not set # CONFIG_SAMPLES is not set CONFIG_HAVE_ARCH_KGDB=y @@ -4857,7 +4924,6 @@ CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y -CONFIG_CRYPTO_DEV_FSL_CAAM_IMX=y # CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG is not set CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC=y # CONFIG_CRYPTO_DEV_SAHARA is not set @@ -4904,9 +4970,11 @@ CONFIG_CRC32_SLICEBY8=y # CONFIG_CRC32_SLICEBY4 is not set # CONFIG_CRC32_SARWATE is not set # CONFIG_CRC32_BIT is not set +# CONFIG_CRC4 is not set CONFIG_CRC7=m CONFIG_LIBCRC32C=y CONFIG_CRC8=m +CONFIG_XXHASH=y # CONFIG_AUDIT_ARCH_COMPAT_GENERIC is not set # CONFIG_RANDOM32_SELFTEST is not set CONFIG_ZLIB_INFLATE=y @@ -4916,6 +4984,8 @@ CONFIG_LZO_DECOMPRESS=y CONFIG_LZ4_COMPRESS=y CONFIG_LZ4HC_COMPRESS=y CONFIG_LZ4_DECOMPRESS=y +CONFIG_ZSTD_COMPRESS=y +CONFIG_ZSTD_DECOMPRESS=y CONFIG_XZ_DEC=y CONFIG_XZ_DEC_X86=y CONFIG_XZ_DEC_POWERPC=y @@ -4966,6 +5036,7 @@ CONFIG_FONT_8x16=y CONFIG_SG_POOL=y CONFIG_ARCH_HAS_SG_CHAIN=y CONFIG_SBITMAP=y +# CONFIG_STRING_SELFTEST is not set CONFIG_VIRTUALIZATION=y # CONFIG_VHOST_NET is not set # CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set diff --git a/config/sources/udoo.conf b/config/sources/udoo.conf index cf96ead8f..6ddf4861a 100644 --- a/config/sources/udoo.conf +++ b/config/sources/udoo.conf @@ -8,7 +8,9 @@ UBOOT_USE_GCC='> 5.0' case $BOARD in udoo) - BOOTBRANCH='branch:2015.10.fslc-qdl' + BOOTSOURCE=$MAINLINE_UBOOT_SOURCE + BOOTDIR=$MAINLINE_UBOOT_DIR + BOOTBRANCH='tag:v2017.11' SERIALCON=ttymxc1 ;; @@ -31,13 +33,12 @@ case $BRANCH in KERNELSOURCE='https://github.com/patrykk/linux-udoo' KERNELBRANCH='branch:4.4-5.0.11.p7.3' KERNELDIR='linux-udoo-next' - KERNEL_USE_GCC='> 6.0' ;; dev) KERNELSOURCE=$MAINLINE_KERNEL_SOURCE - KERNELBRANCH='branch:master' + KERNELBRANCH='branch:linux-4.14.y' KERNELDIR=$MAINLINE_KERNEL_DIR KERNEL_USE_GCC='> 7.0' diff --git a/patch/kernel/udoo-dev/0001-binding-doc-power-pwrseq-generic-add-binding-doc-for.patch b/patch/kernel/udoo-dev/0001-binding-doc-power-pwrseq-generic-add-binding-doc-for.patch new file mode 100644 index 000000000..3d1f6154d --- /dev/null +++ b/patch/kernel/udoo-dev/0001-binding-doc-power-pwrseq-generic-add-binding-doc-for.patch @@ -0,0 +1,73 @@ +From 07330d520c6009c86e650a58a0ca5e76fcb0b49d Mon Sep 17 00:00:00 2001 +From: Peter Chen +Date: Thu, 18 May 2017 08:48:57 +0800 +Subject: [PATCH 1/7] binding-doc: power: pwrseq-generic: add binding doc for + generic power sequence library + +Add binding doc for generic power sequence library. + +Signed-off-by: Peter Chen +Acked-by: Philipp Zabel +Acked-by: Rob Herring +--- + .../bindings/power/pwrseq/pwrseq-generic.txt | 48 ++++++++++++++++++++++ + 1 file changed, 48 insertions(+) + create mode 100644 Documentation/devicetree/bindings/power/pwrseq/pwrseq-generic.txt + +diff --git a/Documentation/devicetree/bindings/power/pwrseq/pwrseq-generic.txt b/Documentation/devicetree/bindings/power/pwrseq/pwrseq-generic.txt +new file mode 100644 +index 000000000000..ebf0d477b688 +--- /dev/null ++++ b/Documentation/devicetree/bindings/power/pwrseq/pwrseq-generic.txt +@@ -0,0 +1,48 @@ ++The generic power sequence library ++ ++Some hard-wired devices (eg USB/MMC) need to do power sequence before ++the device can be enumerated on the bus, the typical power sequence ++like: enable USB PHY clock, toggle reset pin, etc. But current ++Linux device driver lacks of such code to do it, it may cause some ++hard-wired devices works abnormal or can't be recognized by ++controller at all. The power sequence will be done before this device ++can be found at the bus. ++ ++The power sequence properties is under the device node. ++ ++Optional properties: ++- clocks: the input clocks for device. ++- reset-gpios: Should specify the GPIO for reset. ++- reset-duration-us: the duration in microsecond for assert reset signal. ++ ++Below is the example of USB power sequence properties on USB device ++nodes which have two level USB hubs. ++ ++&usbotg1 { ++ vbus-supply = <®_usb_otg1_vbus>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_usb_otg1_id>; ++ status = "okay"; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ genesys: hub@1 { ++ compatible = "usb5e3,608"; ++ reg = <1>; ++ ++ clocks = <&clks IMX6SX_CLK_CKO>; ++ reset-gpios = <&gpio4 5 GPIO_ACTIVE_LOW>; /* hub reset pin */ ++ reset-duration-us = <10>; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ asix: ethernet@1 { ++ compatible = "usbb95,1708"; ++ reg = <1>; ++ ++ clocks = <&clks IMX6SX_CLK_IPG>; ++ reset-gpios = <&gpio4 6 GPIO_ACTIVE_LOW>; /* ethernet_rst */ ++ reset-duration-us = <15>; ++ }; ++ }; ++}; +-- +2.11.0 + diff --git a/patch/kernel/udoo-dev/0002-power-add-power-sequence-library.patch b/patch/kernel/udoo-dev/0002-power-add-power-sequence-library.patch new file mode 100644 index 000000000..1daea63fa --- /dev/null +++ b/patch/kernel/udoo-dev/0002-power-add-power-sequence-library.patch @@ -0,0 +1,853 @@ +From 6becdabac45eca834fa49f7fc22fc140e29043dd Mon Sep 17 00:00:00 2001 +From: Peter Chen +Date: Thu, 18 May 2017 08:48:58 +0800 +Subject: [PATCH 2/7] power: add power sequence library + +We have an well-known problem that the device needs to do some power +sequence before it can be recognized by related host, the typical +example like hard-wired mmc devices and usb devices. + +This power sequence is hard to be described at device tree and handled by +related host driver, so we have created a common power sequence +library to cover this requirement. The core code has supplied +some common helpers for host driver, and individual power sequence +libraries handle kinds of power sequence for devices. The pwrseq +librares always need to allocate extra instance for compatible +string match. + +pwrseq_generic is intended for general purpose of power sequence, which +handles gpios and clocks currently, and can cover other controls in +future. The host driver just needs to call of_pwrseq_on/of_pwrseq_off +if only one power sequence is needed, else call of_pwrseq_on_list +/of_pwrseq_off_list instead (eg, USB hub driver). + +For new power sequence library, it can add its compatible string +to pwrseq_of_match_table, then the pwrseq core will match it with +DT's, and choose this library at runtime. + +Signed-off-by: Peter Chen +Tested-by: Maciej S. Szmigiero +Tested-by Joshua Clayton +Reviewed-by: Matthias Kaehlcke +Tested-by: Matthias Kaehlcke +--- + Documentation/power/power-sequence/design.rst | 54 +++++ + MAINTAINERS | 9 + + drivers/power/Kconfig | 1 + + drivers/power/Makefile | 1 + + drivers/power/pwrseq/Kconfig | 20 ++ + drivers/power/pwrseq/Makefile | 2 + + drivers/power/pwrseq/core.c | 335 ++++++++++++++++++++++++++ + drivers/power/pwrseq/pwrseq_generic.c | 234 ++++++++++++++++++ + include/linux/power/pwrseq.h | 81 +++++++ + 9 files changed, 737 insertions(+) + create mode 100644 Documentation/power/power-sequence/design.rst + create mode 100644 drivers/power/pwrseq/Kconfig + create mode 100644 drivers/power/pwrseq/Makefile + create mode 100644 drivers/power/pwrseq/core.c + create mode 100644 drivers/power/pwrseq/pwrseq_generic.c + create mode 100644 include/linux/power/pwrseq.h + +diff --git a/Documentation/power/power-sequence/design.rst b/Documentation/power/power-sequence/design.rst +new file mode 100644 +index 000000000000..554608e5f3b6 +--- /dev/null ++++ b/Documentation/power/power-sequence/design.rst +@@ -0,0 +1,54 @@ ++==================================== ++Power Sequence Library ++==================================== ++ ++:Date: Feb, 2017 ++:Author: Peter Chen ++ ++ ++Introduction ++============ ++ ++We have an well-known problem that the device needs to do a power ++sequence before it can be recognized by related host, the typical ++examples are hard-wired mmc devices and usb devices. The host controller ++can't know what kinds of this device is in its bus if the power ++sequence has not done, since the related devices driver's probe calling ++is determined by runtime according to eunumeration results. Besides, ++the devices may have custom power sequence, so the power sequence library ++which is independent with the devices is needed. ++ ++Design ++============ ++ ++The power sequence library includes the core file and customer power ++sequence library. The core file exports interfaces are called by ++host controller driver for power sequence and customer power sequence ++library files to register its power sequence instance to global ++power sequence list. The custom power sequence library creates power ++sequence instance and implement custom power sequence. ++ ++Since the power sequence describes hardware design, the description is ++located at board description file, eg, device tree dts file. And ++a specific power sequence belongs to device, so its description ++is under the device node, please refer to: ++Documentation/devicetree/bindings/power/pwrseq/pwrseq-generic.txt ++ ++Custom power sequence library allocates one power sequence instance at ++bootup periods using postcore_initcall, this static allocated instance is ++used to compare with device-tree (DT) node to see if this library can be ++used for the node or not. When the result is matched, the core API will ++try to get resourses (->get, implemented at each library) for power ++sequence, if all resources are got, it will try to allocate another ++instance for next possible request from host driver. ++ ++Then, the host controller driver can carry out power sequence on for this ++DT node, the library will do corresponding operations, like open clocks, ++toggle gpio, etc. The power sequence off routine will close and free the ++resources, and is called when the parent is removed. And the power ++sequence suspend and resume routine can be called at host driver's ++suspend and resume routine if needed. ++ ++The exported interfaces ++.. kernel-doc:: drivers/power/pwrseq/core.c ++ :export: +diff --git a/MAINTAINERS b/MAINTAINERS +index b63c5f20e9c5..c9f590beeaf8 100644 +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -10196,6 +10196,15 @@ F: include/linux/pm_* + F: include/linux/powercap.h + F: drivers/powercap/ + ++POWER SEQUENCE LIBRARY ++M: Peter Chen ++T: git git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git ++L: linux-pm@vger.kernel.org ++S: Maintained ++F: Documentation/devicetree/bindings/power/pwrseq/ ++F: drivers/power/pwrseq/ ++F: include/linux/power/pwrseq.h ++ + POWER SUPPLY CLASS/SUBSYSTEM and DRIVERS + M: Sebastian Reichel + L: linux-pm@vger.kernel.org +diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig +index 63454b5cac27..c1bb0465f956 100644 +--- a/drivers/power/Kconfig ++++ b/drivers/power/Kconfig +@@ -1,3 +1,4 @@ + source "drivers/power/avs/Kconfig" + source "drivers/power/reset/Kconfig" + source "drivers/power/supply/Kconfig" ++source "drivers/power/pwrseq/Kconfig" +diff --git a/drivers/power/Makefile b/drivers/power/Makefile +index ff35c712d824..7db80354b691 100644 +--- a/drivers/power/Makefile ++++ b/drivers/power/Makefile +@@ -1,3 +1,4 @@ + obj-$(CONFIG_POWER_AVS) += avs/ + obj-$(CONFIG_POWER_RESET) += reset/ + obj-$(CONFIG_POWER_SUPPLY) += supply/ ++obj-$(CONFIG_POWER_SEQUENCE) += pwrseq/ +diff --git a/drivers/power/pwrseq/Kconfig b/drivers/power/pwrseq/Kconfig +new file mode 100644 +index 000000000000..c6b356926cca +--- /dev/null ++++ b/drivers/power/pwrseq/Kconfig +@@ -0,0 +1,20 @@ ++# ++# Power Sequence library ++# ++ ++menuconfig POWER_SEQUENCE ++ bool "Power sequence control" ++ help ++ It is used for drivers which needs to do power sequence ++ (eg, turn on clock, toggle reset gpio) before the related ++ devices can be found by hardware, eg, USB bus. ++ ++if POWER_SEQUENCE ++ ++config PWRSEQ_GENERIC ++ bool "Generic power sequence control" ++ depends on OF ++ help ++ This is the generic power sequence control library, and is ++ supposed to support common power sequence usage. ++endif +diff --git a/drivers/power/pwrseq/Makefile b/drivers/power/pwrseq/Makefile +new file mode 100644 +index 000000000000..ad82389028c2 +--- /dev/null ++++ b/drivers/power/pwrseq/Makefile +@@ -0,0 +1,2 @@ ++obj-$(CONFIG_POWER_SEQUENCE) += core.o ++obj-$(CONFIG_PWRSEQ_GENERIC) += pwrseq_generic.o +diff --git a/drivers/power/pwrseq/core.c b/drivers/power/pwrseq/core.c +new file mode 100644 +index 000000000000..3d19e62a2e76 +--- /dev/null ++++ b/drivers/power/pwrseq/core.c +@@ -0,0 +1,335 @@ ++/* ++ * core.c power sequence core file ++ * ++ * Copyright (C) 2016 Freescale Semiconductor, Inc. ++ * Author: Peter Chen ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 of ++ * the License as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++static DEFINE_MUTEX(pwrseq_list_mutex); ++static LIST_HEAD(pwrseq_list); ++ ++static int pwrseq_get(struct device_node *np, struct pwrseq *p) ++{ ++ if (p && p->get) ++ return p->get(np, p); ++ ++ return -ENOTSUPP; ++} ++ ++static int pwrseq_on(struct pwrseq *p) ++{ ++ if (p && p->on) ++ return p->on(p); ++ ++ return -ENOTSUPP; ++} ++ ++static void pwrseq_off(struct pwrseq *p) ++{ ++ if (p && p->off) ++ p->off(p); ++} ++ ++static void pwrseq_put(struct pwrseq *p) ++{ ++ if (p && p->put) ++ p->put(p); ++} ++ ++/** ++ * pwrseq_register - Add pwrseq instance to global pwrseq list ++ * ++ * @pwrseq: the pwrseq instance ++ */ ++void pwrseq_register(struct pwrseq *pwrseq) ++{ ++ mutex_lock(&pwrseq_list_mutex); ++ list_add(&pwrseq->node, &pwrseq_list); ++ mutex_unlock(&pwrseq_list_mutex); ++} ++EXPORT_SYMBOL_GPL(pwrseq_register); ++ ++/** ++ * pwrseq_unregister - Remove pwrseq instance from global pwrseq list ++ * ++ * @pwrseq: the pwrseq instance ++ */ ++void pwrseq_unregister(struct pwrseq *pwrseq) ++{ ++ mutex_lock(&pwrseq_list_mutex); ++ list_del(&pwrseq->node); ++ mutex_unlock(&pwrseq_list_mutex); ++} ++EXPORT_SYMBOL_GPL(pwrseq_unregister); ++ ++static struct pwrseq *pwrseq_find_available_instance(struct device_node *np) ++{ ++ struct pwrseq *pwrseq; ++ ++ mutex_lock(&pwrseq_list_mutex); ++ list_for_each_entry(pwrseq, &pwrseq_list, node) { ++ if (pwrseq->used) ++ continue; ++ ++ /* compare compatible string for pwrseq node */ ++ if (of_match_node(pwrseq->pwrseq_of_match_table, np)) { ++ pwrseq->used = true; ++ mutex_unlock(&pwrseq_list_mutex); ++ return pwrseq; ++ } ++ ++ /* return generic pwrseq instance */ ++ if (!strcmp(pwrseq->pwrseq_of_match_table->compatible, ++ "generic")) { ++ pr_debug("using generic pwrseq instance for %s\n", ++ np->full_name); ++ pwrseq->used = true; ++ mutex_unlock(&pwrseq_list_mutex); ++ return pwrseq; ++ } ++ } ++ mutex_unlock(&pwrseq_list_mutex); ++ pr_debug("Can't find any pwrseq instances for %s\n", np->full_name); ++ ++ return NULL; ++} ++ ++/** ++ * of_pwrseq_on - Carry out power sequence on for device node ++ * ++ * @np: the device node would like to power on ++ * ++ * Carry out a single device power on. If multiple devices ++ * need to be handled, use of_pwrseq_on_list() instead. ++ * ++ * Return a pointer to the power sequence instance on success, ++ * or an error code otherwise. ++ */ ++struct pwrseq *of_pwrseq_on(struct device_node *np) ++{ ++ struct pwrseq *pwrseq; ++ int ret; ++ ++ pwrseq = pwrseq_find_available_instance(np); ++ if (!pwrseq) ++ return ERR_PTR(-ENOENT); ++ ++ ret = pwrseq_get(np, pwrseq); ++ if (ret) { ++ /* Mark current pwrseq as unused */ ++ pwrseq->used = false; ++ return ERR_PTR(ret); ++ } ++ ++ ret = pwrseq_on(pwrseq); ++ if (ret) ++ goto pwr_put; ++ ++ return pwrseq; ++ ++pwr_put: ++ pwrseq_put(pwrseq); ++ return ERR_PTR(ret); ++} ++EXPORT_SYMBOL_GPL(of_pwrseq_on); ++ ++/** ++ * of_pwrseq_off - Carry out power sequence off for this pwrseq instance ++ * ++ * @pwrseq: the pwrseq instance which related device would like to be off ++ * ++ * This API is used to power off single device, it is the opposite ++ * operation for of_pwrseq_on. ++ */ ++void of_pwrseq_off(struct pwrseq *pwrseq) ++{ ++ pwrseq_off(pwrseq); ++ pwrseq_put(pwrseq); ++} ++EXPORT_SYMBOL_GPL(of_pwrseq_off); ++ ++/** ++ * of_pwrseq_on_list - Carry out power sequence on for list ++ * ++ * @np: the device node would like to power on ++ * @head: the list head for pwrseq list on this bus ++ * ++ * This API is used to power on multiple devices at single bus. ++ * If there are several devices on bus (eg, USB bus), uses this ++ * this API. Otherwise, use of_pwrseq_on instead. After the device ++ * is powered on successfully, it will be added to pwrseq list for ++ * this bus. The caller needs to use mutex_lock for concurrent. ++ * ++ * Return 0 on success, or an error value otherwise. ++ */ ++int of_pwrseq_on_list(struct device_node *np, struct list_head *head) ++{ ++ struct pwrseq *pwrseq; ++ struct pwrseq_list_per_dev *pwrseq_list_node; ++ ++ pwrseq_list_node = kzalloc(sizeof(*pwrseq_list_node), GFP_KERNEL); ++ if (!pwrseq_list_node) ++ return -ENOMEM; ++ ++ pwrseq = of_pwrseq_on(np); ++ if (IS_ERR(pwrseq)) { ++ kfree(pwrseq_list_node); ++ return PTR_ERR(pwrseq); ++ } ++ ++ pwrseq_list_node->pwrseq = pwrseq; ++ list_add(&pwrseq_list_node->list, head); ++ ++ return 0; ++} ++EXPORT_SYMBOL_GPL(of_pwrseq_on_list); ++ ++/** ++ * of_pwrseq_off_list - Carry out power sequence off for the list ++ * ++ * @head: the list head for pwrseq instance list on this bus ++ * ++ * This API is used to power off all devices on this bus, it is ++ * the opposite operation for of_pwrseq_on_list. ++ * The caller needs to use mutex_lock for concurrent. ++ */ ++void of_pwrseq_off_list(struct list_head *head) ++{ ++ struct pwrseq *pwrseq; ++ struct pwrseq_list_per_dev *pwrseq_list_node, *tmp_node; ++ ++ list_for_each_entry_safe(pwrseq_list_node, tmp_node, head, list) { ++ pwrseq = pwrseq_list_node->pwrseq; ++ of_pwrseq_off(pwrseq); ++ list_del(&pwrseq_list_node->list); ++ kfree(pwrseq_list_node); ++ } ++} ++EXPORT_SYMBOL_GPL(of_pwrseq_off_list); ++ ++/** ++ * pwrseq_suspend - Carry out power sequence suspend for this pwrseq instance ++ * ++ * @pwrseq: the pwrseq instance ++ * ++ * This API is used to do suspend operation on pwrseq instance. ++ * ++ * Return 0 on success, or an error value otherwise. ++ */ ++int pwrseq_suspend(struct pwrseq *p) ++{ ++ int ret = 0; ++ ++ if (p && p->suspend) ++ ret = p->suspend(p); ++ else ++ return ret; ++ ++ if (!ret) ++ p->suspended = true; ++ else ++ pr_err("%s failed\n", __func__); ++ ++ return ret; ++} ++EXPORT_SYMBOL_GPL(pwrseq_suspend); ++ ++/** ++ * pwrseq_resume - Carry out power sequence resume for this pwrseq instance ++ * ++ * @pwrseq: the pwrseq instance ++ * ++ * This API is used to do resume operation on pwrseq instance. ++ * ++ * Return 0 on success, or an error value otherwise. ++ */ ++int pwrseq_resume(struct pwrseq *p) ++{ ++ int ret = 0; ++ ++ if (p && p->resume) ++ ret = p->resume(p); ++ else ++ return ret; ++ ++ if (!ret) ++ p->suspended = false; ++ else ++ pr_err("%s failed\n", __func__); ++ ++ return ret; ++} ++EXPORT_SYMBOL_GPL(pwrseq_resume); ++ ++/** ++ * pwrseq_suspend_list - Carry out power sequence suspend for list ++ * ++ * @head: the list head for pwrseq instance list on this bus ++ * ++ * This API is used to do suspend on all power sequence instances on this bus. ++ * The caller needs to use mutex_lock for concurrent. ++ */ ++int pwrseq_suspend_list(struct list_head *head) ++{ ++ struct pwrseq *pwrseq; ++ struct pwrseq_list_per_dev *pwrseq_list_node; ++ int ret = 0; ++ ++ list_for_each_entry(pwrseq_list_node, head, list) { ++ ret = pwrseq_suspend(pwrseq_list_node->pwrseq); ++ if (ret) ++ break; ++ } ++ ++ if (ret) { ++ list_for_each_entry(pwrseq_list_node, head, list) { ++ pwrseq = pwrseq_list_node->pwrseq; ++ if (pwrseq->suspended) ++ pwrseq_resume(pwrseq); ++ } ++ } ++ ++ return ret; ++} ++EXPORT_SYMBOL_GPL(pwrseq_suspend_list); ++ ++/** ++ * pwrseq_resume_list - Carry out power sequence resume for the list ++ * ++ * @head: the list head for pwrseq instance list on this bus ++ * ++ * This API is used to do resume on all power sequence instances on this bus. ++ * The caller needs to use mutex_lock for concurrent. ++ */ ++int pwrseq_resume_list(struct list_head *head) ++{ ++ struct pwrseq_list_per_dev *pwrseq_list_node; ++ int ret = 0; ++ ++ list_for_each_entry(pwrseq_list_node, head, list) { ++ ret = pwrseq_resume(pwrseq_list_node->pwrseq); ++ if (ret) ++ break; ++ } ++ ++ return ret; ++} ++EXPORT_SYMBOL_GPL(pwrseq_resume_list); +diff --git a/drivers/power/pwrseq/pwrseq_generic.c b/drivers/power/pwrseq/pwrseq_generic.c +new file mode 100644 +index 000000000000..4e7c09086cfb +--- /dev/null ++++ b/drivers/power/pwrseq/pwrseq_generic.c +@@ -0,0 +1,234 @@ ++/* ++ * pwrseq_generic.c Generic power sequence handling ++ * ++ * Copyright (C) 2016 Freescale Semiconductor, Inc. ++ * Author: Peter Chen ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 of ++ * the License as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++struct pwrseq_generic { ++ struct pwrseq pwrseq; ++ struct gpio_desc *gpiod_reset; ++ struct clk *clks[PWRSEQ_MAX_CLKS]; ++ u32 duration_us; ++ bool suspended; ++}; ++ ++#define to_generic_pwrseq(p) container_of(p, struct pwrseq_generic, pwrseq) ++ ++static int pwrseq_generic_alloc_instance(void); ++static const struct of_device_id generic_id_table[] = { ++ { .compatible = "generic",}, ++ { /* sentinel */ } ++}; ++ ++static int pwrseq_generic_suspend(struct pwrseq *pwrseq) ++{ ++ struct pwrseq_generic *pwrseq_gen = to_generic_pwrseq(pwrseq); ++ int clk; ++ ++ for (clk = PWRSEQ_MAX_CLKS - 1; clk >= 0; clk--) ++ clk_disable_unprepare(pwrseq_gen->clks[clk]); ++ ++ pwrseq_gen->suspended = true; ++ return 0; ++} ++ ++static int pwrseq_generic_resume(struct pwrseq *pwrseq) ++{ ++ struct pwrseq_generic *pwrseq_gen = to_generic_pwrseq(pwrseq); ++ int clk, ret = 0; ++ ++ for (clk = 0; clk < PWRSEQ_MAX_CLKS && pwrseq_gen->clks[clk]; clk++) { ++ ret = clk_prepare_enable(pwrseq_gen->clks[clk]); ++ if (ret) { ++ pr_err("Can't enable clock, ret=%d\n", ret); ++ goto err_disable_clks; ++ } ++ } ++ ++ pwrseq_gen->suspended = false; ++ return ret; ++ ++err_disable_clks: ++ while (--clk >= 0) ++ clk_disable_unprepare(pwrseq_gen->clks[clk]); ++ ++ return ret; ++} ++ ++static void pwrseq_generic_put(struct pwrseq *pwrseq) ++{ ++ struct pwrseq_generic *pwrseq_gen = to_generic_pwrseq(pwrseq); ++ int clk; ++ ++ if (pwrseq_gen->gpiod_reset) ++ gpiod_put(pwrseq_gen->gpiod_reset); ++ ++ for (clk = 0; clk < PWRSEQ_MAX_CLKS; clk++) ++ clk_put(pwrseq_gen->clks[clk]); ++ ++ pwrseq_unregister(&pwrseq_gen->pwrseq); ++ kfree(pwrseq_gen); ++} ++ ++static void pwrseq_generic_off(struct pwrseq *pwrseq) ++{ ++ struct pwrseq_generic *pwrseq_gen = to_generic_pwrseq(pwrseq); ++ int clk; ++ ++ if (pwrseq_gen->suspended) ++ return; ++ ++ for (clk = PWRSEQ_MAX_CLKS - 1; clk >= 0; clk--) ++ clk_disable_unprepare(pwrseq_gen->clks[clk]); ++} ++ ++static int pwrseq_generic_on(struct pwrseq *pwrseq) ++{ ++ struct pwrseq_generic *pwrseq_gen = to_generic_pwrseq(pwrseq); ++ int clk, ret = 0; ++ struct gpio_desc *gpiod_reset = pwrseq_gen->gpiod_reset; ++ ++ for (clk = 0; clk < PWRSEQ_MAX_CLKS && pwrseq_gen->clks[clk]; clk++) { ++ ret = clk_prepare_enable(pwrseq_gen->clks[clk]); ++ if (ret) { ++ pr_err("Can't enable clock, ret=%d\n", ret); ++ goto err_disable_clks; ++ } ++ } ++ ++ if (gpiod_reset) { ++ u32 duration_us = pwrseq_gen->duration_us; ++ ++ if (duration_us <= 10) ++ udelay(10); ++ else ++ usleep_range(duration_us, duration_us + 100); ++ gpiod_set_value(gpiod_reset, 0); ++ } ++ ++ return ret; ++ ++err_disable_clks: ++ while (--clk >= 0) ++ clk_disable_unprepare(pwrseq_gen->clks[clk]); ++ ++ return ret; ++} ++ ++static int pwrseq_generic_get(struct device_node *np, struct pwrseq *pwrseq) ++{ ++ struct pwrseq_generic *pwrseq_gen = to_generic_pwrseq(pwrseq); ++ enum of_gpio_flags flags; ++ int reset_gpio, clk, ret = 0; ++ ++ for (clk = 0; clk < PWRSEQ_MAX_CLKS; clk++) { ++ pwrseq_gen->clks[clk] = of_clk_get(np, clk); ++ if (IS_ERR(pwrseq_gen->clks[clk])) { ++ ret = PTR_ERR(pwrseq_gen->clks[clk]); ++ if (ret != -ENOENT) ++ goto err_put_clks; ++ pwrseq_gen->clks[clk] = NULL; ++ break; ++ } ++ } ++ ++ reset_gpio = of_get_named_gpio_flags(np, "reset-gpios", 0, &flags); ++ if (gpio_is_valid(reset_gpio)) { ++ unsigned long gpio_flags; ++ ++ if (flags & OF_GPIO_ACTIVE_LOW) ++ gpio_flags = GPIOF_ACTIVE_LOW | GPIOF_OUT_INIT_LOW; ++ else ++ gpio_flags = GPIOF_OUT_INIT_HIGH; ++ ++ ret = gpio_request_one(reset_gpio, gpio_flags, ++ "pwrseq-reset-gpios"); ++ if (ret) ++ goto err_put_clks; ++ ++ pwrseq_gen->gpiod_reset = gpio_to_desc(reset_gpio); ++ of_property_read_u32(np, "reset-duration-us", ++ &pwrseq_gen->duration_us); ++ } else if (reset_gpio == -ENOENT) { ++ ; /* no such gpio */ ++ } else { ++ ret = reset_gpio; ++ pr_err("Failed to get reset gpio on %s, err = %d\n", ++ np->full_name, reset_gpio); ++ goto err_put_clks; ++ } ++ ++ /* allocate new one for later pwrseq instance request */ ++ ret = pwrseq_generic_alloc_instance(); ++ if (ret) ++ goto err_put_gpio; ++ ++ return 0; ++ ++err_put_gpio: ++ if (pwrseq_gen->gpiod_reset) ++ gpiod_put(pwrseq_gen->gpiod_reset); ++err_put_clks: ++ while (--clk >= 0) ++ clk_put(pwrseq_gen->clks[clk]); ++ return ret; ++} ++ ++/** ++ * pwrseq_generic_alloc_instance - power sequence instance allocation ++ * ++ * This function is used to allocate one generic power sequence instance, ++ * it is called when the system boots up and after one power sequence ++ * instance is got successfully. ++ * ++ * Return zero on success or an error code otherwise. ++ */ ++static int pwrseq_generic_alloc_instance(void) ++{ ++ struct pwrseq_generic *pwrseq_gen; ++ ++ pwrseq_gen = kzalloc(sizeof(*pwrseq_gen), GFP_KERNEL); ++ if (!pwrseq_gen) ++ return -ENOMEM; ++ ++ pwrseq_gen->pwrseq.pwrseq_of_match_table = generic_id_table; ++ pwrseq_gen->pwrseq.get = pwrseq_generic_get; ++ pwrseq_gen->pwrseq.on = pwrseq_generic_on; ++ pwrseq_gen->pwrseq.off = pwrseq_generic_off; ++ pwrseq_gen->pwrseq.put = pwrseq_generic_put; ++ pwrseq_gen->pwrseq.suspend = pwrseq_generic_suspend; ++ pwrseq_gen->pwrseq.resume = pwrseq_generic_resume; ++ ++ pwrseq_register(&pwrseq_gen->pwrseq); ++ return 0; ++} ++ ++/* Allocate one pwrseq instance during boots up */ ++static int __init pwrseq_generic_register(void) ++{ ++ return pwrseq_generic_alloc_instance(); ++} ++postcore_initcall(pwrseq_generic_register) +diff --git a/include/linux/power/pwrseq.h b/include/linux/power/pwrseq.h +new file mode 100644 +index 000000000000..cbc344cdf9d2 +--- /dev/null ++++ b/include/linux/power/pwrseq.h +@@ -0,0 +1,81 @@ ++#ifndef __LINUX_PWRSEQ_H ++#define __LINUX_PWRSEQ_H ++ ++#include ++ ++#define PWRSEQ_MAX_CLKS 3 ++ ++/** ++ * struct pwrseq - the power sequence structure ++ * @pwrseq_of_match_table: the OF device id table this pwrseq library supports ++ * @node: the list pointer to be added to pwrseq list ++ * @get: the API is used to get pwrseq instance from the device node ++ * @on: do power on for this pwrseq instance ++ * @off: do power off for this pwrseq instance ++ * @put: release the resources on this pwrseq instance ++ * @suspend: do suspend operation on this pwrseq instance ++ * @resume: do resume operation on this pwrseq instance ++ * @used: this pwrseq instance is used by device ++ */ ++struct pwrseq { ++ const struct of_device_id *pwrseq_of_match_table; ++ struct list_head node; ++ int (*get)(struct device_node *np, struct pwrseq *p); ++ int (*on)(struct pwrseq *p); ++ void (*off)(struct pwrseq *p); ++ void (*put)(struct pwrseq *p); ++ int (*suspend)(struct pwrseq *p); ++ int (*resume)(struct pwrseq *p); ++ bool used; ++ bool suspended; ++}; ++ ++/* used for power sequence instance list in one driver */ ++struct pwrseq_list_per_dev { ++ struct pwrseq *pwrseq; ++ struct list_head list; ++}; ++ ++#if IS_ENABLED(CONFIG_POWER_SEQUENCE) ++void pwrseq_register(struct pwrseq *pwrseq); ++void pwrseq_unregister(struct pwrseq *pwrseq); ++struct pwrseq *of_pwrseq_on(struct device_node *np); ++void of_pwrseq_off(struct pwrseq *pwrseq); ++int of_pwrseq_on_list(struct device_node *np, struct list_head *head); ++void of_pwrseq_off_list(struct list_head *head); ++int pwrseq_suspend(struct pwrseq *p); ++int pwrseq_resume(struct pwrseq *p); ++int pwrseq_suspend_list(struct list_head *head); ++int pwrseq_resume_list(struct list_head *head); ++#else ++static inline void pwrseq_register(struct pwrseq *pwrseq) {} ++static inline void pwrseq_unregister(struct pwrseq *pwrseq) {} ++static inline struct pwrseq *of_pwrseq_on(struct device_node *np) ++{ ++ return NULL; ++} ++static void of_pwrseq_off(struct pwrseq *pwrseq) {} ++static int of_pwrseq_on_list(struct device_node *np, struct list_head *head) ++{ ++ return 0; ++} ++static void of_pwrseq_off_list(struct list_head *head) {} ++static int pwrseq_suspend(struct pwrseq *p) ++{ ++ return 0; ++} ++static int pwrseq_resume(struct pwrseq *p) ++{ ++ return 0; ++} ++static int pwrseq_suspend_list(struct list_head *head) ++{ ++ return 0; ++} ++static int pwrseq_resume_list(struct list_head *head) ++{ ++ return 0; ++} ++#endif /* CONFIG_POWER_SEQUENCE */ ++ ++#endif /* __LINUX_PWRSEQ_H */ +-- +2.11.0 + diff --git a/patch/kernel/udoo-dev/0003-ARM-DTS-imx6qdl-udoo-enable-uart4-serial-interface-f.patch b/patch/kernel/udoo-dev/0003-ARM-DTS-imx6qdl-udoo-enable-uart4-serial-interface-f.patch new file mode 100644 index 000000000..ed34c50c4 --- /dev/null +++ b/patch/kernel/udoo-dev/0003-ARM-DTS-imx6qdl-udoo-enable-uart4-serial-interface-f.patch @@ -0,0 +1,45 @@ +From 69de844947fcdd25099ffb0f780ba4e47bdca1f9 Mon Sep 17 00:00:00 2001 +From: Steve Arnold +Date: Sun, 10 Dec 2017 12:31:10 -0800 +Subject: [PATCH] ARM: DTS: imx6qdl: udoo: enable uart4 serial interface for + sam3x + +Signed-off-by: Steve Arnold +--- + arch/arm/boot/dts/imx6qdl-udoo.dtsi | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/arch/arm/boot/dts/imx6qdl-udoo.dtsi b/arch/arm/boot/dts/imx6qdl-udoo.dtsi +index c96c91d83678..e28f90005130 100644 +--- a/arch/arm/boot/dts/imx6qdl-udoo.dtsi ++++ b/arch/arm/boot/dts/imx6qdl-udoo.dtsi +@@ -186,6 +186,13 @@ + >; + }; + ++ pinctrl_uart4: uart4grp { ++ fsl,pins = < ++ MX6QDL_PAD_KEY_COL0__UART4_TX_DATA 0x1b0b1 ++ MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA 0x1b0b1 ++ >; ++ }; ++ + pinctrl_usbh: usbhgrp { + fsl,pins = < + MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x80000000 +@@ -256,6 +263,12 @@ + status = "okay"; + }; + ++&uart4 { /* sam3x port */ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_uart4>; ++ status = "okay"; ++}; ++ + &usbh1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbh>; +-- +2.15.0 + diff --git a/patch/kernel/udoo-dev/0003-binding-doc-usb-usb-device-add-optional-properties-f.patch b/patch/kernel/udoo-dev/0003-binding-doc-usb-usb-device-add-optional-properties-f.patch new file mode 100644 index 000000000..75f77b05c --- /dev/null +++ b/patch/kernel/udoo-dev/0003-binding-doc-usb-usb-device-add-optional-properties-f.patch @@ -0,0 +1,46 @@ +From 181913eae18c7edb10f3337eab6800fad9c2ac3c Mon Sep 17 00:00:00 2001 +From: Peter Chen +Date: Thu, 18 May 2017 08:48:59 +0800 +Subject: [PATCH 3/7] binding-doc: usb: usb-device: add optional properties for + power sequence + +Add optional properties for power sequence. + +Signed-off-by: Peter Chen +Acked-by: Rob Herring +--- + Documentation/devicetree/bindings/usb/usb-device.txt | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/Documentation/devicetree/bindings/usb/usb-device.txt b/Documentation/devicetree/bindings/usb/usb-device.txt +index 1c35e7b665e1..3661dd261a39 100644 +--- a/Documentation/devicetree/bindings/usb/usb-device.txt ++++ b/Documentation/devicetree/bindings/usb/usb-device.txt +@@ -13,6 +13,10 @@ Required properties: + - reg: the port number which this device is connecting to, the range + is 1-31. + ++Optional properties: ++power sequence properties, see ++Documentation/devicetree/bindings/power/pwrseq/pwrseq-generic.txt for detail ++ + Example: + + &usb1 { +@@ -21,8 +25,12 @@ Example: + #address-cells = <1>; + #size-cells = <0>; + +- hub: genesys@1 { ++ genesys: hub@1 { + compatible = "usb5e3,608"; + reg = <1>; ++ ++ clocks = <&clks IMX6SX_CLK_CKO>; ++ reset-gpios = <&gpio4 5 GPIO_ACTIVE_LOW>; /* hub reset pin */ ++ reset-duration-us = <10>; + }; + } +-- +2.11.0 + diff --git a/patch/kernel/udoo-dev/0004-ARM-dts-driver-imx6-udooqdl-add-arduino-manager-driv.patch b/patch/kernel/udoo-dev/0004-ARM-dts-driver-imx6-udooqdl-add-arduino-manager-driv.patch new file mode 100644 index 000000000..dec36b2d3 --- /dev/null +++ b/patch/kernel/udoo-dev/0004-ARM-dts-driver-imx6-udooqdl-add-arduino-manager-driv.patch @@ -0,0 +1,511 @@ +From a35b9dfc80338cf2049c75b0f4af22776001d5d3 Mon Sep 17 00:00:00 2001 +From: Steve Arnold +Date: Fri, 15 Dec 2017 16:43:22 -0800 +Subject: [PATCH] ARM: dts,driver: imx6,udooqdl: add arduino manager driver and + update dts + +* note this is required to upload sketches to sam3 from arduino IDE + +Signed-off-by: Steve Arnold +--- + arch/arm/boot/dts/imx6qdl-udoo.dtsi | 20 ++ + drivers/misc/Kconfig | 7 + + drivers/misc/Makefile | 1 + + drivers/misc/udoo_ard.c | 417 ++++++++++++++++++++++++++++++++++++ + 4 files changed, 445 insertions(+) + create mode 100755 drivers/misc/udoo_ard.c + +diff --git a/arch/arm/boot/dts/imx6qdl-udoo.dtsi b/arch/arm/boot/dts/imx6qdl-udoo.dtsi +index e28f90005130..fd404d3299a5 100644 +--- a/arch/arm/boot/dts/imx6qdl-udoo.dtsi ++++ b/arch/arm/boot/dts/imx6qdl-udoo.dtsi +@@ -89,6 +89,17 @@ + mux-int-port = <1>; + mux-ext-port = <6>; + }; ++ ++ udoo_ard: udoo_ard_manager { ++ compatible = "udoo,imx6q-udoo-ard"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_udooard>; ++ bossac-clk-gpio = <&gpio6 3 0>; ++ bossac-dat-gpio = <&gpio5 18 0>; ++ bossac-erase-gpio = <&gpio4 21 0>; ++ bossac-reset-gpio = <&gpio1 0 0>; ++ status = "okay"; ++ }; + }; + + &fec { +@@ -200,6 +211,15 @@ + >; + }; + ++ pinctrl_udooard: udooardgrp { ++ fsl,pins = < ++ MX6QDL_PAD_DISP0_DAT0__GPIO4_IO21 0x80000000 ++ MX6QDL_PAD_CSI0_DAT17__GPIO6_IO03 0x80000000 ++ MX6QDL_PAD_CSI0_PIXCLK__GPIO5_IO18 0x80000000 ++ MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x80000000 ++ >; ++ }; ++ + pinctrl_usdhc3: usdhc3grp { + fsl,pins = < + MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059 +diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig +index f1c4c891cda3..afd54fdc983d 100644 +--- a/drivers/misc/Kconfig ++++ b/drivers/misc/Kconfig +@@ -536,6 +536,13 @@ config TIEQEP + To compile this driver as a module, choose M here: the module + will be called tieqep. + ++config UDOO_ARD ++ tristate "UDOO-Arduino erase/reset Driver" ++ default y ++ help ++ This driver is used to erase and reset arduino board via command sent ++ over USB-to-SERIAL connection. ++ + source "drivers/misc/c2port/Kconfig" + source "drivers/misc/eeprom/Kconfig" + source "drivers/misc/cb710/Kconfig" +diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile +index 3225f1e37dfc..b68828f424c4 100644 +--- a/drivers/misc/Makefile ++++ b/drivers/misc/Makefile +@@ -57,6 +57,7 @@ obj-y += cape/ + obj-$(CONFIG_ECHO) += echo/ + obj-$(CONFIG_VEXPRESS_SYSCFG) += vexpress-syscfg.o + obj-$(CONFIG_CXL_BASE) += cxl/ ++obj-$(CONFIG_UDOO_ARD) += udoo_ard.o + obj-$(CONFIG_ASPEED_LPC_CTRL) += aspeed-lpc-ctrl.o + obj-$(CONFIG_ASPEED_LPC_SNOOP) += aspeed-lpc-snoop.o + obj-$(CONFIG_PCI_ENDPOINT_TEST) += pci_endpoint_test.o +diff --git a/drivers/misc/udoo_ard.c b/drivers/misc/udoo_ard.c +new file mode 100755 +index 000000000000..2210738e09c0 +--- /dev/null ++++ b/drivers/misc/udoo_ard.c +@@ -0,0 +1,417 @@ ++/* ++ * udoo_ard.c ++ * UDOO quad/dual Arduino flash erase / CPU resetter ++ * ++ * Copyright (C) 2013-2015 Aidilab srl ++ * Author: UDOO Team ++ * Author: Giuseppe Pagano ++ * Author: Francesco Montefoschi ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 as published by ++ * the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. ++ * ++ * You should have received a copy of the GNU General Public License along with ++ * this program. If not, see . ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define DRIVER_NAME "udoo_ard" ++#define PINCTRL_DEFAULT "default" ++#define AUTH_TOKEN 0x5A5A ++#define MAX_MSEC_SINCE_LAST_IRQ 400 ++#define GRAY_TIME_BETWEEN_RESET 10000 // In this time we can't accept new erase/reset code ++ ++static struct workqueue_struct *erase_reset_wq; ++typedef struct { ++ struct work_struct erase_reset_work; ++ struct pinctrl *pinctrl; ++ struct pinctrl_state *pins_default; ++ int step; ++ int cmdcode; ++ int erase_reset_lock; ++ int gpio_bossac_clk; ++ int gpio_bossac_dat; ++ int gpio_ard_erase; ++ int gpio_ard_reset; ++ unsigned long last_int_time_in_ns; ++ unsigned long last_int_time_in_sec; ++} erase_reset_work_t; ++ ++erase_reset_work_t *work; ++static u32 origTX, origRX; // original UART4 TX/RX pad control registers ++static int major; // for /dev/udoo_ard ++static struct class *udoo_class; ++ ++static struct platform_device_id udoo_ard_devtype[] = { ++ { ++ /* keep it for coldfire */ ++ .name = DRIVER_NAME, ++ .driver_data = 0, ++ }, { ++ /* sentinel */ ++ } ++}; ++MODULE_DEVICE_TABLE(platform, udoo_ard_devtype); ++ ++static const struct of_device_id udoo_ard_dt_ids[] = { ++ { .compatible = "udoo,imx6q-udoo-ard", .data = &udoo_ard_devtype[0], }, ++ { /* sentinel */ } ++}; ++MODULE_DEVICE_TABLE(of, udoo_ard_dt_ids); ++ ++static void disable_serial(void) ++{ ++ u32 addrTX; ++ void __iomem *_addrTX; ++ ++ printk("[bossac] Disable UART4 serial port.\n"); ++ ++ addrTX = 0x20E01F8; ++ _addrTX = ioremap(addrTX, 8); ++ ++ origTX = __raw_readl(_addrTX); ++ origRX = __raw_readl(_addrTX + 0x4); ++ ++ __raw_writel(0x15, _addrTX); ++ __raw_writel(0x15, _addrTX + 0x4); ++ ++ iounmap(_addrTX); ++} ++ ++static void enable_serial(void) ++{ ++ u32 addrTX; ++ void __iomem *_addrTX; ++ ++ printk("[bossac] Enable UART4 serial port.\n"); ++ ++ addrTX = 0x20E01F8; ++ _addrTX = ioremap(addrTX, 8); ++ ++ __raw_writel(origTX, _addrTX); ++ __raw_writel(origRX, _addrTX + 0x4); ++ ++ iounmap(_addrTX); ++} ++ ++static void erase_reset(void) ++{ ++ printk("[bossac] UDOO ERASE and RESET on Sam3x started.\n"); ++ ++ gpio_direction_input(work->gpio_ard_erase); ++ gpio_set_value(work->gpio_ard_reset, 1); ++ msleep(1); ++ ++ gpio_direction_output(work->gpio_ard_erase, 1); ++ msleep(300); ++ gpio_direction_input(work->gpio_ard_erase); ++ ++ msleep(10); ++ gpio_set_value(work->gpio_ard_reset, 0); ++ ++ msleep(80); ++ gpio_set_value(work->gpio_ard_reset, 1); ++ ++ printk("[bossac] UDOO ERASE and RESET on Sam3x EXECUTED.\n"); ++} ++ ++static void shutdown_sam3x(void) ++{ ++ printk("[bossac] RESET on Sam3x.\n"); ++ ++ gpio_set_value(work->gpio_ard_reset, 0); ++} ++ ++static void erase_reset_wq_function( struct work_struct *work2) ++{ ++ disable_serial(); ++ erase_reset(); ++ msleep(GRAY_TIME_BETWEEN_RESET); ++ ++ work->erase_reset_lock = 0; ++} ++ ++/* ++ * Called everytime the gpio_bossac_clk signal toggles. ++ * If the auth token (16 bit) is found, we look for the command code (4 bit). ++ * The code 0x0F is sent by Bossac to trigger an erase/reset (to achieve this, ++ * erase_reset_wq is scheduled). Before starting to program the flash, we disable ++ * the UART4 serial port, otherwise there is too noise on the serial lines (the ++ * programming port and UART4 port are connected together, see hw schematics). ++ * When Bossac finishes to flash/verify, the code 0x00 is sent which re-enables ++ * the UART4 port. ++ */ ++static irqreturn_t udoo_bossac_req(int irq, void *dev_id) ++{ ++ int retval, auth_bit, expected_bit, msec_since_last_irq; ++ u64 nowsec; ++ unsigned long rem_nsec; ++ erase_reset_work_t *erase_reset_work; ++ ++ auth_bit = 0; ++ if (gpio_get_value(work->gpio_bossac_dat) != 0x0) { ++ auth_bit = 1; ++ } ++ ++ erase_reset_work = (erase_reset_work_t *)work; ++ ++ nowsec = local_clock(); ++ rem_nsec = do_div(nowsec, 1000000000) ; ++ msec_since_last_irq = (((unsigned long)nowsec * 1000) + rem_nsec/1000000 ) - (((unsigned long)erase_reset_work->last_int_time_in_sec * 1000) + erase_reset_work->last_int_time_in_ns/1000000); ++ ++ if (msec_since_last_irq > MAX_MSEC_SINCE_LAST_IRQ) { ++ erase_reset_work->step = 0; ++#ifdef DEBUG ++ printk("[bossac] Reset authentication timeout!\n"); ++#endif ++ } ++ ++#ifdef DEBUG ++ printk("[bossac] STEP %d -> 0x%d \n", erase_reset_work->step, auth_bit); ++#endif ++ erase_reset_work->last_int_time_in_ns = rem_nsec; ++ erase_reset_work->last_int_time_in_sec = nowsec; ++ ++ if ( erase_reset_work->step < 16 ) { // Authenticating received token bit. ++ expected_bit = (( AUTH_TOKEN >> erase_reset_work->step ) & 0x01 ); ++ if ( auth_bit == expected_bit ) { ++ erase_reset_work->step = erase_reset_work->step + 1; ++ } else { ++ erase_reset_work->step = 0; ++ } ++ } else { // Passed all authentication step. Receiving command code. ++ erase_reset_work->cmdcode = erase_reset_work->cmdcode | (auth_bit << (erase_reset_work->step - 16)); ++ erase_reset_work->step = erase_reset_work->step + 1; ++ } ++ ++#ifdef DEBUG ++ printk("erase_reset_work->erase_reset_lock = %d \n", erase_reset_work->erase_reset_lock); ++#endif ++ if ( erase_reset_work->step == 20 ) { // Passed authentication and code acquiring step. ++#ifdef DEBUG ++ printk("[bossac] Received code = 0x%04x \n", erase_reset_work->cmdcode); ++#endif ++ if (erase_reset_work->cmdcode == 0xF) { ++ if (erase_reset_work->erase_reset_lock == 0) { ++ erase_reset_work->erase_reset_lock = 1; ++ retval = queue_work( erase_reset_wq, (struct work_struct *)work ); ++ } else { ++#ifdef DEBUG ++ printk("Erase and reset operation already in progress. Do nothing.\n"); ++#endif ++ } ++ } else { ++ enable_serial(); ++ } ++ erase_reset_work->step = 0; ++ erase_reset_work->cmdcode = 0; ++ } ++ ++ return IRQ_HANDLED; ++} ++ ++/* ++ * Takes control of clock, data, erase, reset GPIOs. ++ */ ++static int gpio_setup(void) ++{ ++ int ret; ++ ++ ret = gpio_request(work->gpio_bossac_clk, "BOSSA_CLK"); ++ if (ret) { ++ printk(KERN_ERR "request BOSSA_CLK IRQ\n"); ++ return -1; ++ } else { ++ gpio_direction_input(work->gpio_bossac_clk); ++ } ++ ++ ret = gpio_request(work->gpio_bossac_dat, "BOSSA_DAT"); ++ if (ret) { ++ printk(KERN_ERR "request BOSSA_DAT IRQ\n"); ++ return -1; ++ } else { ++ gpio_direction_input(work->gpio_bossac_dat); ++ } ++ ++ ret = gpio_request(work->gpio_ard_erase, "BOSSAC"); ++ if (ret) { ++ printk(KERN_ERR "request GPIO FOR ARDUINO ERASE\n"); ++ return -1; ++ } else { ++ gpio_direction_input(work->gpio_ard_erase); ++ } ++ ++ ret = gpio_request(work->gpio_ard_reset, "BOSSAC"); ++ if (ret) { ++ printk(KERN_ERR "request GPIO FOR ARDUINO RESET\n"); ++ return -1; ++ } else { ++ gpio_direction_output(work->gpio_ard_reset, 1); ++ } ++ ++ return 0; ++} ++ ++static ssize_t device_write(struct file *filp, const char *buff, size_t len, loff_t *off) ++{ ++ char msg[10]; ++ long res; ++ ++ if (len > 10) ++ return -EINVAL; ++ ++ ++ res = copy_from_user(msg, buff, len); ++ if (res) { ++ return -EFAULT; ++ } ++ msg[len] = '\0'; ++ ++ if (strcmp(msg, "erase")==0) { ++ erase_reset(); ++ } else if (strcmp(msg, "shutdown")==0) { ++ shutdown_sam3x(); ++ } else if (strcmp(msg, "uartoff")==0) { ++ disable_serial(); ++ } else if (strcmp(msg, "uarton")==0) { ++ enable_serial(); ++ } else { ++ printk("[bossac] udoo_ard invalid operation! %s", msg); ++ } ++ ++ return len; ++} ++ ++static struct file_operations fops = { ++ .write = device_write, ++}; ++ ++/* ++ * If a fdt udoo_ard entry is found, we register an IRQ on bossac clock line ++ * and we create /dev/udoo_ard ++ */ ++static int udoo_ard_probe(struct platform_device *pdev) ++{ ++ int retval; ++ struct device *temp_class; ++ struct platform_device *bdev; ++ struct device_node *np; ++ ++ bdev = kzalloc(sizeof(*bdev), GFP_KERNEL); ++ np = pdev->dev.of_node; ++ ++ if (!np) ++ return -ENODEV; ++ ++ work = (erase_reset_work_t *)kmalloc(sizeof(erase_reset_work_t), GFP_KERNEL); ++ if (work) { ++ work->gpio_ard_reset = of_get_named_gpio(np, "bossac-reset-gpio", 0); ++ work->gpio_ard_erase = of_get_named_gpio(np, "bossac-erase-gpio", 0); ++ work->gpio_bossac_clk = of_get_named_gpio(np, "bossac-clk-gpio", 0); ++ work->gpio_bossac_dat = of_get_named_gpio(np, "bossac-dat-gpio", 0); ++ work->pinctrl = devm_pinctrl_get(&pdev->dev); ++ work->pins_default = pinctrl_lookup_state(work->pinctrl, PINCTRL_DEFAULT); ++ } else { ++ printk("[bossac] Failed to allocate data structure."); ++ return -ENOMEM; ++ } ++ ++ pinctrl_select_state(work->pinctrl, work->pins_default); ++ gpio_setup(); ++ ++ printk("[bossac] Registering IRQ %d for BOSSAC Arduino erase/reset operation\n", gpio_to_irq(work->gpio_bossac_clk)); ++ retval = request_irq(gpio_to_irq(work->gpio_bossac_clk), udoo_bossac_req, IRQF_TRIGGER_FALLING, "UDOO", bdev); ++ ++ major = register_chrdev(major, "udoo_ard", &fops); ++ if (major < 0) { ++ printk(KERN_ERR "[bossac] Cannot get major for UDOO Ard\n"); ++ return -EBUSY; ++ } ++ ++ udoo_class = class_create(THIS_MODULE, "udoo_ard"); ++ if (IS_ERR(udoo_class)) { ++ return PTR_ERR(udoo_class); ++ } ++ ++ temp_class = device_create(udoo_class, NULL, MKDEV(major, 0), NULL, "udoo_ard"); ++ if (IS_ERR(temp_class)) { ++ return PTR_ERR(temp_class); ++ } ++ ++ printk("[bossac] Created device file /dev/udoo_ard\n"); ++ ++ erase_reset_wq = create_workqueue("erase_reset_queue"); ++ if (erase_reset_wq) { ++ ++ /* Queue some work (item 1) */ ++ if (work) { ++ INIT_WORK( (struct work_struct *)work, erase_reset_wq_function ); ++ work->step = 1; ++ work->cmdcode = 0; ++ work->last_int_time_in_ns = 0; ++ work->last_int_time_in_sec = 0; ++ work->erase_reset_lock = 0; ++ // retval = queue_work( erase_reset_wq, (struct work_struct *)work ); ++ } ++ } ++ return 0; ++} ++ ++static int udoo_ard_remove(struct platform_device *pdev) ++{ ++ printk("[bossac] Unloading UDOO ard driver.\n"); ++ free_irq(gpio_to_irq(work->gpio_bossac_clk), NULL); ++ ++ gpio_free(work->gpio_ard_reset); ++ gpio_free(work->gpio_ard_erase); ++ gpio_free(work->gpio_bossac_clk); ++ gpio_free(work->gpio_bossac_dat); ++ ++ device_destroy(udoo_class, MKDEV(major, 0)); ++ class_destroy(udoo_class); ++ unregister_chrdev(major, "udoo_ard"); ++ ++ return 0; ++} ++ ++static struct platform_driver udoo_ard_driver = { ++ .driver = { ++ .name = DRIVER_NAME, ++ .owner = THIS_MODULE, ++ .of_match_table = udoo_ard_dt_ids, ++ }, ++ .id_table = udoo_ard_devtype, ++ .probe = udoo_ard_probe, ++ .remove = udoo_ard_remove, ++}; ++ ++module_platform_driver(udoo_ard_driver); ++ ++MODULE_ALIAS("platform:"DRIVER_NAME); ++MODULE_LICENSE("GPL"); +-- +2.15.0 + diff --git a/patch/kernel/udoo-dev/0004-usb-core-add-power-sequence-handling-for-USB-devices.patch b/patch/kernel/udoo-dev/0004-usb-core-add-power-sequence-handling-for-USB-devices.patch new file mode 100644 index 000000000..5f631fd3d --- /dev/null +++ b/patch/kernel/udoo-dev/0004-usb-core-add-power-sequence-handling-for-USB-devices.patch @@ -0,0 +1,161 @@ +From 4cd5f10e91fcb8e5cfb502cf488e1fbe8d46b6be Mon Sep 17 00:00:00 2001 +From: Peter Chen +Date: Thu, 18 May 2017 08:49:00 +0800 +Subject: [PATCH 4/7] usb: core: add power sequence handling for USB devices + +Some hard-wired USB devices need to do power sequence to let the +device work normally, the typical power sequence like: enable USB +PHY clock, toggle reset pin, etc. But current Linux USB driver +lacks of such code to do it, it may cause some hard-wired USB devices +works abnormal or can't be recognized by controller at all. + +In this patch, it calls power sequence library APIs to finish +the power sequence events. It will do power on sequence at hub's +probe for all devices under this hub (includes root hub). +At hub_disconnect, it will do power off sequence which is at powered +on list. + +Signed-off-by: Peter Chen +Tested-by Joshua Clayton +Tested-by: Maciej S. Szmigiero +Reviewed-by: Vaibhav Hiremath +--- + drivers/usb/Kconfig | 1 + + drivers/usb/core/hub.c | 49 +++++++++++++++++++++++++++++++++++++++++++++---- + drivers/usb/core/hub.h | 1 + + 3 files changed, 47 insertions(+), 4 deletions(-) + +diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig +index 939a63bca82f..b6f626e6fc2b 100644 +--- a/drivers/usb/Kconfig ++++ b/drivers/usb/Kconfig +@@ -39,6 +39,7 @@ config USB + tristate "Support for Host-side USB" + depends on USB_ARCH_HAS_HCD + select USB_COMMON ++ select POWER_SEQUENCE + select NLS # for UTF-8 strings + ---help--- + Universal Serial Bus (USB) is a specification for a serial bus +diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c +index 9dca59ef18b3..7a672962b598 100644 +--- a/drivers/usb/core/hub.c ++++ b/drivers/usb/core/hub.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -1619,6 +1620,7 @@ static void hub_disconnect(struct usb_interface *intf) + hub->error = 0; + hub_quiesce(hub, HUB_DISCONNECT); + ++ of_pwrseq_off_list(&hub->pwrseq_on_list); + mutex_lock(&usb_port_peer_mutex); + + /* Avoid races with recursively_mark_NOTATTACHED() */ +@@ -1682,11 +1682,41 @@ static bool hub_descriptor_is_sane(struct usb_host_interface *desc) + return true; + } + ++#ifdef CONFIG_OF ++static int hub_of_pwrseq_on(struct usb_hub *hub) ++{ ++ struct device *parent; ++ struct usb_device *hdev = hub->hdev; ++ struct device_node *np; ++ int ret; ++ ++ if (hdev->parent) ++ parent = &hdev->dev; ++ else ++ parent = bus_to_hcd(hdev->bus)->self.sysdev; ++ ++ for_each_child_of_node(parent->of_node, np) { ++ ret = of_pwrseq_on_list(np, &hub->pwrseq_on_list); ++ /* Maybe no power sequence library is chosen */ ++ if (ret && ret != -ENOENT) ++ return ret; ++ } ++ ++ return 0; ++} ++#else ++static int hub_of_pwrseq_on(struct usb_hub *hub) ++{ ++ return 0; ++} ++#endif ++ + static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id) + { + struct usb_host_interface *desc; + struct usb_device *hdev; + struct usb_hub *hub; ++ int ret = -ENODEV; + + desc = intf->cur_altsetting; + hdev = interface_to_usbdev(intf); +@@ -1756,6 +1788,7 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id) + INIT_DELAYED_WORK(&hub->leds, led_work); + INIT_DELAYED_WORK(&hub->init_work, NULL); + INIT_WORK(&hub->events, hub_event); ++ INIT_LIST_HEAD(&hub->pwrseq_on_list); + usb_get_intf(intf); + usb_get_dev(hdev); + +@@ -1792,10 +1822,13 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id) + hub->quirk_check_port_auto_suspend = 1; + + if (hub_configure(hub, &desc->endpoint[0].desc) >= 0) +- return 0; ++ ret = hub_of_pwrseq_on(hub); ++ if (!ret){ ++ return 0; ++ } + + hub_disconnect(intf); +- return -ENODEV; ++ return ret; + } + + static int +@@ -3593,14 +3629,19 @@ static int hub_suspend(struct usb_interface *intf, pm_message_t msg) + + /* stop hub_wq and related activity */ + hub_quiesce(hub, HUB_SUSPEND); +- return 0; ++ return pwrseq_suspend_list(&hub->pwrseq_on_list); + } + + static int hub_resume(struct usb_interface *intf) + { + struct usb_hub *hub = usb_get_intfdata(intf); ++ int ret; + + dev_dbg(&intf->dev, "%s\n", __func__); ++ ret = pwrseq_resume_list(&hub->pwrseq_on_list); ++ if (ret) ++ return ret; ++ + hub_activate(hub, HUB_RESUME); + return 0; + } +diff --git a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h +index 34c1a7e22aae..cd86f91e0342 100644 +--- a/drivers/usb/core/hub.h ++++ b/drivers/usb/core/hub.h +@@ -78,6 +78,7 @@ struct usb_hub { + struct delayed_work init_work; + struct work_struct events; + struct usb_port **ports; ++ struct list_head pwrseq_on_list; /* powered pwrseq node list */ + }; + + /** +-- +2.11.0 + diff --git a/patch/kernel/udoo-dev/0005-ARM-dts-imx6qdl-Enable-usb-node-children-with-reg.patch b/patch/kernel/udoo-dev/0005-ARM-dts-imx6qdl-Enable-usb-node-children-with-reg.patch new file mode 100644 index 000000000..7b1773dfc --- /dev/null +++ b/patch/kernel/udoo-dev/0005-ARM-dts-imx6qdl-Enable-usb-node-children-with-reg.patch @@ -0,0 +1,49 @@ +From d28841c18bbb0384e36ccfdb4df9e10b2c6789ff Mon Sep 17 00:00:00 2001 +From: Joshua Clayton +Date: Thu, 18 May 2017 08:49:01 +0800 +Subject: [PATCH 5/7] ARM: dts: imx6qdl: Enable usb node children with + +Give usb nodes #address and #size attributes, so that a child node +representing a permanently connected device such as an onboard hub may +be addressed with a attribute + +Signed-off-by: Joshua Clayton +Signed-off-by: Peter Chen +--- + arch/arm/boot/dts/imx6qdl.dtsi | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi +index e426faa9c243..8c064cb4e6aa 100644 +--- a/arch/arm/boot/dts/imx6qdl.dtsi ++++ b/arch/arm/boot/dts/imx6qdl.dtsi +@@ -945,6 +945,8 @@ + + usbh1: usb@02184200 { + compatible = "fsl,imx6q-usb", "fsl,imx27-usb"; ++ #address-cells = <1>; ++ #size-cells = <0>; + reg = <0x02184200 0x200>; + interrupts = <0 40 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clks IMX6QDL_CLK_USBOH3>; +@@ -959,6 +961,8 @@ + + usbh2: usb@02184400 { + compatible = "fsl,imx6q-usb", "fsl,imx27-usb"; ++ #address-cells = <1>; ++ #size-cells = <0>; + reg = <0x02184400 0x200>; + interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clks IMX6QDL_CLK_USBOH3>; +@@ -972,6 +976,8 @@ + + usbh3: usb@02184600 { + compatible = "fsl,imx6q-usb", "fsl,imx27-usb"; ++ #address-cells = <1>; ++ #size-cells = <0>; + reg = <0x02184600 0x200>; + interrupts = <0 42 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clks IMX6QDL_CLK_USBOH3>; +-- +2.11.0 + diff --git a/patch/kernel/udoo-dev/0006-ARM-dts-imx6qdl-udoo.dtsi-fix-onboard-USB-HUB-proper.patch b/patch/kernel/udoo-dev/0006-ARM-dts-imx6qdl-udoo.dtsi-fix-onboard-USB-HUB-proper.patch new file mode 100644 index 000000000..d885d9b93 --- /dev/null +++ b/patch/kernel/udoo-dev/0006-ARM-dts-imx6qdl-udoo.dtsi-fix-onboard-USB-HUB-proper.patch @@ -0,0 +1,79 @@ +From b089b85cd5ef6359e13c5dd90b95f39638477e39 Mon Sep 17 00:00:00 2001 +From: Peter Chen +Date: Thu, 18 May 2017 08:49:02 +0800 +Subject: [PATCH 6/7] ARM: dts: imx6qdl-udoo.dtsi: fix onboard USB HUB property + +The current dts describes USB HUB's property at USB controller's +entry, it is improper. The USB HUB should be the child node +under USB controller, and power sequence properties are under +it. Besides, using gpio pinctrl setting for USB2415's reset pin. + +Signed-off-by: Peter Chen +Signed-off-by: Joshua Clayton +Tested-by: Maciej S. Szmigiero +--- + arch/arm/boot/dts/imx6qdl-udoo.dtsi | 26 ++++++++++++-------------- + 1 file changed, 12 insertions(+), 14 deletions(-) + +diff --git a/arch/arm/boot/dts/imx6qdl-udoo.dtsi b/arch/arm/boot/dts/imx6qdl-udoo.dtsi +index c96c91d83678..a173de20ee73 100644 +--- a/arch/arm/boot/dts/imx6qdl-udoo.dtsi ++++ b/arch/arm/boot/dts/imx6qdl-udoo.dtsi +@@ -9,6 +9,8 @@ + * + */ + ++#include ++ + / { + aliases { + backlight = &backlight; +@@ -58,17 +60,6 @@ + #address-cells = <1>; + #size-cells = <0>; + +- reg_usb_h1_vbus: regulator@0 { +- compatible = "regulator-fixed"; +- reg = <0>; +- regulator-name = "usb_h1_vbus"; +- regulator-min-microvolt = <5000000>; +- regulator-max-microvolt = <5000000>; +- enable-active-high; +- startup-delay-us = <2>; /* USB2415 requires a POR of 1 us minimum */ +- gpio = <&gpio7 12 0>; +- }; +- + reg_panel: regulator@1 { + compatible = "regulator-fixed"; + reg = <1>; +@@ -188,7 +179,7 @@ + + pinctrl_usbh: usbhgrp { + fsl,pins = < +- MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x80000000 ++ MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x1b0b0 + MX6QDL_PAD_NANDF_CS2__CCM_CLKO2 0x130b0 + >; + }; +@@ -259,9 +250,16 @@ + &usbh1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbh>; +- vbus-supply = <®_usb_h1_vbus>; +- clocks = <&clks IMX6QDL_CLK_CKO>; + status = "okay"; ++ ++ usb2415: hub@1 { ++ compatible = "usb424,2514"; ++ reg = <1>; ++ ++ clocks = <&clks IMX6QDL_CLK_CKO>; ++ reset-gpios = <&gpio7 12 GPIO_ACTIVE_LOW>; ++ reset-duration-us = <3000>; ++ }; + }; + + &usdhc3 { +-- +2.11.0 + diff --git a/patch/kernel/udoo-dev/0007-ARM-dts-imx6q-evi-Fix-onboard-hub-reset-line.patch b/patch/kernel/udoo-dev/0007-ARM-dts-imx6q-evi-Fix-onboard-hub-reset-line.patch new file mode 100644 index 000000000..42b5ed6f1 --- /dev/null +++ b/patch/kernel/udoo-dev/0007-ARM-dts-imx6q-evi-Fix-onboard-hub-reset-line.patch @@ -0,0 +1,74 @@ +From 5a4337a51d034235276947faee68c6e01a09daff Mon Sep 17 00:00:00 2001 +From: Joshua Clayton +Date: Thu, 18 May 2017 08:49:03 +0800 +Subject: [PATCH 7/7] ARM: dts: imx6q-evi: Fix onboard hub reset line + +Previously the onboard hub was made to work by treating its +reset gpio as a regulator enable. +Get rid of that kludge now that pwseq has added reset gpio support +Move pin muxing the hub reset pin into the usbh1 group + +Signed-off-by: Joshua Clayton +Signed-off-by: Peter Chen +--- + arch/arm/boot/dts/imx6q-evi.dts | 25 +++++++------------------ + 1 file changed, 7 insertions(+), 18 deletions(-) + +diff --git a/arch/arm/boot/dts/imx6q-evi.dts b/arch/arm/boot/dts/imx6q-evi.dts +index fd2220aa49e2..24fe093a66db 100644 +--- a/arch/arm/boot/dts/imx6q-evi.dts ++++ b/arch/arm/boot/dts/imx6q-evi.dts +@@ -54,18 +54,6 @@ + reg = <0x10000000 0x40000000>; + }; + +- reg_usbh1_vbus: regulator-usbhubreset { +- compatible = "regulator-fixed"; +- regulator-name = "usbh1_vbus"; +- regulator-min-microvolt = <5000000>; +- regulator-max-microvolt = <5000000>; +- enable-active-high; +- startup-delay-us = <2>; +- pinctrl-names = "default"; +- pinctrl-0 = <&pinctrl_usbh1_hubreset>; +- gpio = <&gpio7 12 GPIO_ACTIVE_HIGH>; +- }; +- + reg_usb_otg_vbus: regulator-usbotgvbus { + compatible = "regulator-fixed"; + regulator-name = "usb_otg_vbus"; +@@ -204,12 +192,18 @@ + }; + + &usbh1 { +- vbus-supply = <®_usbh1_vbus>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbh1>; + dr_mode = "host"; + disable-over-current; + status = "okay"; ++ ++ usb2415host: hub@1 { ++ compatible = "usb424,2513"; ++ reg = <1>; ++ reset-gpios = <&gpio7 12 GPIO_ACTIVE_LOW>; ++ reset-duration-us = <3000>; ++ }; + }; + + &usbotg { +@@ -465,11 +459,6 @@ + MX6QDL_PAD_GPIO_3__USB_H1_OC 0x1b0b0 + /* usbh1_b OC */ + MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x1b0b0 +- >; +- }; +- +- pinctrl_usbh1_hubreset: usbh1hubresetgrp { +- fsl,pins = < + MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x1b0b0 + >; + }; +-- +2.11.0 + diff --git a/patch/kernel/udoo-dev/arm64_increasing_DMA_block_memory_allocation_to_2048.patch b/patch/kernel/udoo-dev/arm64_increasing_DMA_block_memory_allocation_to_2048.patch new file mode 100644 index 000000000..652c75bd3 --- /dev/null +++ b/patch/kernel/udoo-dev/arm64_increasing_DMA_block_memory_allocation_to_2048.patch @@ -0,0 +1,13 @@ +diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c +index 3216e09..21bce28 +--- a/arch/arm64/mm/dma-mapping.c ++++ b/arch/arm64/mm/dma-mapping.c +@@ -44,7 +44,7 @@ static pgprot_t __get_dma_pgprot(unsigned long attrs, pgprot_t prot, + + static struct gen_pool *atomic_pool; + +-#define DEFAULT_DMA_COHERENT_POOL_SIZE SZ_256K ++#define DEFAULT_DMA_COHERENT_POOL_SIZE SZ_2M + static size_t atomic_pool_size __initdata = DEFAULT_DMA_COHERENT_POOL_SIZE; + + static int __init early_coherent_pool(char *p) diff --git a/patch/u-boot/u-boot-udoo/udoo-neo-adjust-env.patch b/patch/u-boot/u-boot-udoo/board_udoo-neo/udoo-neo-adjust-env.patch similarity index 100% rename from patch/u-boot/u-boot-udoo/udoo-neo-adjust-env.patch rename to patch/u-boot/u-boot-udoo/board_udoo-neo/udoo-neo-adjust-env.patch diff --git a/patch/u-boot/u-boot-udoo/board_udoo/udoo-adjust-env.patch b/patch/u-boot/u-boot-udoo/board_udoo/udoo-adjust-env.patch new file mode 100644 index 000000000..8e08be49e --- /dev/null +++ b/patch/u-boot/u-boot-udoo/board_udoo/udoo-adjust-env.patch @@ -0,0 +1,15 @@ +diff --git a/include/configs/udoo.h b/include/configs/udoo.h +old mode 100644 +new mode 100755 +index bcce41d..2296f89 +--- a/include/configs/udoo.h ++++ b/include/configs/udoo.h +@@ -81,7 +81,7 @@ + "mmcargs=setenv bootargs console=${console},${baudrate} " \ + "root=${mmcroot}\0" \ + "loadbootscript=" \ +- "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ ++ "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script}; || load mmc ${mmcdev}:${mmcpart} ${loadaddr} /boot/${script};\0" \ + "bootscript=echo Running bootscript from mmc ...; " \ + "source\0" \ + "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ diff --git a/patch/u-boot/u-boot-udoo/udoo-adjust-env.patch b/patch/u-boot/u-boot-udoo/udoo-adjust-env.patch deleted file mode 100644 index c068c93b0..000000000 --- a/patch/u-boot/u-boot-udoo/udoo-adjust-env.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/include/configs/udoo_qdl.h b/include/configs/udoo_qdl.h ---- a/include/configs/udoo_qdl.h -+++ b/include/configs/udoo_qdl.h -@@ -86,7 +86,11 @@ - #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG - - #define CONFIG_EXTRA_ENV_SETTINGS \ -- "script=uEnv.txt\0" \ -+ "script=boot.scr\0" \ -+ "boot_prefixes=/ /boot/\0" \ -+ "boot_a_script=ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${prefix}${script} || fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${prefix}${script} \0" \ -+ "scan_dev_for_boot=echo Scanning mmc ; for prefix in ${boot_prefixes}; do run scan_dev_for_scripts; done\0" \ -+ "scan_dev_for_scripts=if test -e ${mmcdev}:${mmcpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; else echo Checking here ${prefix} ... not found; fi;\0" \ - "image=zImage\0" \ - "console=ttymxc1\0" \ - "splashpos=m,m\0" \ -@@ -116,9 +120,9 @@ - "mmcargs=setenv bootargs console=${console},${baudrate} ${video} ${memory} " \ - "root=${mmcroot}\0" \ - "loadbootscript=" \ -- "fatload " UBOOT_DEVICE " ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ -+ "run scan_dev_for_boot;\0" \ - "bootscript=echo Running bootscript from mmc ...; " \ -- "env import -t ${loadaddr} ${filesize};\0" \ -+ "source\0" \ - "loadimage=fatload " UBOOT_DEVICE " ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ - "loadfdt=fatload " UBOOT_DEVICE " ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ - "mmcboot=echo Booting from mmc ...; " \ \ No newline at end of file