From 5d98c4178ef6cf1f192c82a5bac2b615f97613de Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Sat, 14 Nov 2020 00:52:35 +0800 Subject: [PATCH] kernel: bump 5.4 to 5.4.75 (#5780) [mac80211] 5b29614 mac80211: another fix for the sta connection monitor 1ed6eb1 mac80211: backport sched_set_fifo_low cba4120 mac80211: add support for specifying a per-device scan list e0d482f rt2x00: mt7620: differentiate based on SoC's CHIP_VER [package] amd64-microcode/intel-microcode/linux-firmware: update version --- include/kernel-version.mk | 4 +- .../boot/arm-trusted-firmware-mvebu/Makefile | 2 +- package/boot/tfa-layerscape/Makefile | 8 +- package/boot/uboot-envtools/files/ath79 | 8 + package/boot/uboot-envtools/files/ipq40xx | 8 +- package/boot/uboot-envtools/files/ipq806x | 3 + package/boot/uboot-envtools/files/mvebu | 9 +- package/boot/uboot-layerscape/Makefile | 8 +- .../files/fsl_ls1012a-frdm-uEnv.txt | 2 +- .../files/fsl_ls1012a-frwy-sdboot-uEnv.txt | 6 +- .../files/fsl_ls1012a-rdb-uEnv.txt | 2 +- .../files/fsl_ls1021a-iot-sdboot-uEnv.txt | 6 +- .../files/fsl_ls1021a-twr-sdboot-uEnv.txt | 6 +- .../files/fsl_ls1021a-twr-uEnv.txt | 2 +- .../files/fsl_ls1043a-rdb-sdboot-uEnv.txt | 6 +- .../files/fsl_ls1043a-rdb-uEnv.txt | 2 +- .../files/fsl_ls1046a-rdb-sdboot-uEnv.txt | 6 +- .../files/fsl_ls1046a-rdb-uEnv.txt | 2 +- .../files/fsl_ls1088a-rdb-sdboot-uEnv.txt | 4 +- .../files/fsl_ls1088a-rdb-uEnv.txt | 2 +- .../files/fsl_ls2088a-rdb-uEnv.txt | 2 +- package/boot/uboot-mediatek/Makefile | 4 +- ...le-mtd-and-mtk_spi_nand-in-defconfig.patch | 1 + .../patches/006-mt7623-pinctrl-fix.patch | 237 ---------- .../patches/007-env-fat-use-bootdevice.patch | 95 ---- ...ix-mmc_get_boot_dev-for-platforms-wi.patch | 51 --- ...-Add-support-for-UniElec-U7623-board.patch | 326 -------------- .../patches/010-no-binman.patch | 10 +- package/boot/uboot-mvebu/Makefile | 12 +- ...add_support_for_macronix_mx25u12835f.patch | 10 - ...mada-37xx.h_increase_max_gunzip_size.patch | 13 - ...Add-missing-common-host-capabilities.patch | 43 -- ...-3720-espressobin-use-Linux-model-co.patch | 29 +- ...-3720-espressobin-split-common-parts.patch | 19 +- ...add-support-for-boards-with-populate.patch | 8 +- ...sobin-Set-environment-variable-fdtfi.patch | 100 ----- package/boot/uboot-omap/Makefile | 4 +- package/boot/uboot-sunxi/Makefile | 16 +- .../250-sun8i-h3-zeropi-add-device-tree.patch | 81 ++++ .../251-sun8i-h3-zeropi-add-defconfig.patch | 24 ++ ...2-sunxi-h3-add-support-for-nanopi-r1.patch | 198 +++++++++ package/firmware/amd64-microcode/Makefile | 4 +- package/firmware/ath10k-firmware/Makefile | 4 +- package/firmware/intel-microcode/Makefile | 4 +- package/firmware/layerscape/ls-rcw/Makefile | 8 +- package/firmware/linux-firmware/Makefile | 4 +- package/firmware/linux-firmware/marvell.mk | 4 +- package/firmware/linux-firmware/qca_ath10k.mk | 4 +- package/kernel/linux/modules/sound.mk | 18 +- .../files/lib/netifd/wireless/mac80211.sh | 2 + ...duce-accessors-for-CHIP_VER-register.patch | 139 ++++++ ...-differentiate-based-on-SoC-CHIP_VER.patch | 408 ++++++++++++++++++ ...072-backports-add-sched_set_fifo_low.patch | 32 ++ ...regression-in-sta-connection-monitor.patch | 42 +- package/kernel/mt76/Makefile | 6 +- package/kernel/nat46/Makefile | 4 +- .../network/services/hostapd/files/hostapd.sh | 1 + .../network/utils/layerscape/restool/Makefile | 4 +- scripts/download.pl | 6 +- ...mware-loader-for-uPD720201-and-uPD72.patch | 10 +- .../802-usb-xhci-force-msi-renesas-xhci.patch | 4 +- ...61-tty-serial-ar933x-uart-rs485-gpio.patch | 2 +- ...cks-early-during-the-boot-process-so.patch | 4 +- ...Mark-used-PLLs-and-dividers-CRITICAL.patch | 2 +- ...lk-bcm2835-Add-claim-clocks-property.patch | 10 +- ...35-Read-max-core-clock-from-firmware.patch | 4 +- ...-GPIO-clocks-enabled-at-boot-as-crit.patch | 2 +- ...1-Don-t-use-DT-aliases-for-numbering.patch | 2 +- ...0032-amba_pl011-Round-input-clock-up.patch | 10 +- ...-Insert-mb-for-correct-FIFO-handling.patch | 2 +- ...Add-cts-event-workaround-DT-property.patch | 2 +- ...50-0040-fbdev-add-FBIOCOPYAREA-ioctl.patch | 8 +- ...-tc358743-Increase-FIFO-level-to-374.patch | 2 +- ...ix-connected-active-CSI-2-lane-repor.patch | 4 +- ...-Add-support-for-972Mbit-s-link-freq.patch | 4 +- ...743-Check-I2C-succeeded-during-probe.patch | 4 +- ...eturn-an-appropriate-colorspace-from.patch | 6 +- ...-bcm2835-Use-zd-when-printing-size_t.patch | 2 +- ...Show-that-the-VIA-VL805-supports-LPM.patch | 2 +- ...support-for-setting-leaf-clock-rates.patch | 2 +- ...w-reparenting-leaf-clocks-while-they.patch | 2 +- ...hci_fixup_endpoint-for-interval-adju.patch | 4 +- ...011-Make-TX-optimisation-conditional.patch | 10 +- ...or-host-controllers-that-don-t-updat.patch | 4 +- ...bcm2835-Avoid-null-pointer-exception.patch | 2 +- ...ce-quirks-for-Freeway-Airmouse-T3-an.patch | 2 +- ...0-0351-clk-bcm2835-Disable-v3d-clock.patch | 4 +- ...lise-rpi-firmware-before-clk-bcm2835.patch | 2 +- ...y-amba-pl011-Add-un-throttle-support.patch | 4 +- ...011-Avoid-rare-write-when-full-error.patch | 2 +- ...-inbound-resource-parsing-to-helpers.patch | 6 +- ...add-V4L2_CTRL_TYPE_AREA-control-type.patch | 4 +- ...d-V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF.patch | 4 +- ...a-videodev2.h-add-V4L2_DEC_CMD_FLUSH.patch | 2 +- ...h-Add-a-format-for-column-YUV4-2-0-m.patch | 2 +- ...-0510-mmc-sdhci-Silence-MMC-warnings.patch | 4 +- ...core-Add-sensor-ancillary-data-V4L2-.patch | 2 +- ...core-Add-ISP-statistics-output-V4L2-.patch | 2 +- ...i2c-tc358743-Fix-fallthrough-warning.patch | 2 +- ...support-for-performing-fake-doorbell.patch | 2 +- ...dsa-rtl8366-Pass-GENMASK-signed-bits.patch | 2 +- target/linux/generic/config-5.4 | 40 +- .../generic/hack-5.4/204-module_strip.patch | 6 +- .../hack-5.4/703-add_vsc8504_support.patch | 57 +++ .../hack-5.4/901-debloat_sock_diag.patch | 2 +- .../generic/hack-5.4/902-debloat_proc.patch | 2 +- .../hack-5.4/904-debloat_dma_buf.patch | 2 +- ...k-events-support-multiple-registrant.patch | 24 +- ...-linux-kernel-to-support-shortcut-fe.patch | 2 +- .../hack-5.4/998-add-ndo-do-ioctl.patch | 5 +- .../203-kallsyms_uncompressed.patch | 2 +- ...ernel-XZ-compression-option-on-PPC_8.patch | 2 +- ...igadevice-Only-one-dummy-byte-in-QUA.patch | 39 -- ...46-mtd-spinand-gigadevice-Add-QE-Bit.patch | 67 --- ...-netfilter_optional_tcp_window_check.patch | 2 +- .../pending-5.4/920-mangle_bootargs.patch | 2 +- ...rt-adjusting-OPP-voltages-at-runtime.patch | 2 +- ...e-voltage-tolerance-when-adjusting-t.patch | 4 +- ...Mangle-bootloader-s-kernel-arguments.patch | 2 +- ...re-PCIe-is-reset-before-init-for-rev.patch | 46 ++ .../0001-MIPS-lantiq-add-pcie-driver.patch | 2 +- target/linux/layerscape/Makefile | 4 +- target/linux/layerscape/README | 20 +- .../base-files/lib/preinit/79_move_config | 26 ++ .../base-files/lib/upgrade/platform.sh | 126 ++---- target/linux/layerscape/image/Makefile | 39 +- target/linux/layerscape/image/armv7.mk | 41 +- target/linux/layerscape/image/armv8_64b.mk | 119 ++--- .../layerscape/image/gen_sdcard_head_img.sh | 14 +- target/linux/layerscape/modules.mk | 16 + ...x2160a-add-more-thermal-zone-support.patch | 184 ++++++++ ...46a-fix-ippdexpcr-offset-not-correct.patch | 25 ++ ...a-update-USB-nodes-status-to-match-b.patch | 78 ++++ ...1043a-remove-thermal-zone-5-from-dts.patch | 24 ++ ...ate-mc-portal-from-root-dprc-contain.patch | 2 +- ...oC-fsl_sai-Fix-noise-when-using-EDMA.patch | 2 +- ...SoC-fsl_sai-Implement-set_bclk_ratio.patch | 2 +- ...-ASoC-fsl_sai-Add-support-for-imx8qm.patch | 2 +- ...l_sai-Add-support-for-imx7ulp-imx8mq.patch | 2 +- ..._sai-Add-support-for-SAI-new-version.patch | 6 +- ...sai-Add-registers-definition-for-mul.patch | 2 +- ...ve-dev_err-usage-after-platform_get_.patch | 2 +- ...sai-derive-TX-FIFO-watermark-from-FI.patch | 2 +- ...evert-ASoC-fsl_sai-add-of_match-data.patch | 6 +- ...-fsl_sai-refine-driver-for-ip-upgrad.patch | 12 +- ...oC-fsl_sai-support-latest-sai-module.patch | 4 +- ...-fsl_sai-refine-the-pm-runtime-funct.patch | 6 +- ...16929-1-ASoC-fsl_sai-add-bitclk_freq.patch | 2 +- ...C-fsl_sai-support-multi-fifo-and-DSD.patch | 4 +- ...-ASoC-fsl_sai-fix-DSD-suspend-resume.patch | 2 +- ...LK-17580-ASoC-fsl-sai-Use-DSD-helper.patch | 4 +- ...SoC-fsl-sai-check-for-pinctrl-status.patch | 2 +- ...oC-fsl-sai-add-support-for-SAI-v3.01.patch | 2 +- ...-fsl-sai-use-set_bclk_ratio-to-calcu.patch | 2 +- ...-build-failture-due-to-5.1-RC7-upgra.patch | 2 +- ...C-fsl_sai-Mark-cache-dirty-at-resume.patch | 2 +- ...-ASoC-fsl_sai-request-BUS_FREQ_AUDIO.patch | 4 +- ...-fsl_sai-read-SAI-version-and-params.patch | 2 +- ...-fsl_sai-add-bitcount-and-timestamp-.patch | 2 +- ...-build-issue-of-incomplete-parenthes.patch | 2 +- ...devm_platform_ioremap_resource-to-si.patch | 4 +- ...me-macro-FLEXCAN_IFLAG_MB-FLEXCAN_IF.patch | 2 +- ...me-struct-flexcan_priv-reg_imask-1-2.patch | 4 +- ...ve-TX-mailbox-bit-from-struct-flexca.patch | 4 +- ...ert-struct-flexcan_priv-rx_mask-1-2-.patch | 2 +- ...oduce-struct-flexcan_priv-tx_mask-an.patch | 2 +- ...-can-flexcan-add-CAN-FD-mode-support.patch | 6 +- ...excan-add-ISO-CAN-FD-feature-support.patch | 2 +- ...-0023-can-flexcan-add-imx8qm-support.patch | 2 +- ...24-can-flexcan-add-lx2160ar1-support.patch | 2 +- ...can-add-LPSR-mode-support-for-i.MX7D.patch | 49 +-- ...an-add-CAN-wakeup-function-for-i.MX8.patch | 6 +- ...dd-S32V234-support-to-FlexCAN-driver.patch | 2 +- ...8-crypto-caam-add-a-test-for-the-RNG.patch | 2 +- ...-crypto-caam-add-SNVS-SECVIO-support.patch | 2 +- ...rypto-caam-add-Secure-Memory-support.patch | 2 +- ...-1-crypto-caam-add-tag-functionality.patch | 2 +- ...am-qi-add-support-for-TLS-1.0-record.patch | 14 +- ...o-caam-add-CAAM-job-ring-UIO-support.patch | 2 +- ...o-caam-fix-Secure-Memory-driver-init.patch | 2 +- ...LF-63-1-crypto-caam-fix-SM-test-init.patch | 2 +- ...LK-10893-i2c-imx-add-irqf_no_suspend.patch | 12 +- ...-I2C-imx-restore-pin-setting-for-i2c.patch | 4 +- ...-runtime-pm-of-i2c-temporary-when-do.patch | 2 +- ...-Defer-probing-if-EDMA-not-available.patch | 2 +- ...aer-pme-interrupts-with-none-MSI-MSI.patch | 2 +- ...-of-esdhc-update-tuning-erratum-A-00.patch | 2 +- ...-qoriq-Update-the-settings-for-TMUv2.patch | 80 ++++ ...rial-lpuart-add-power-domain-support.patch | 4 +- ...al-fsl_lpuart-add-modem-device-reset.patch | 2 +- ...l-fsl_lpuart-add-magic-SysRq-support.patch | 2 +- ...K-18137-fsl_lpuart-Fix-loopback-mode.patch | 2 +- ...l_lpuart-enable-dma-mode-for-imx8qxp.patch | 38 +- ...rial-fsl_lpuart-enable-loopback-mode.patch | 2 +- ...-fsl_lpuart-do-HW-reset-for-communic.patch | 4 +- ...-serial-lpuart-add-runtime-pm-suppor.patch | 22 +- ...uart-enable-wakeup-source-for-lpuart.patch | 10 +- ...rial-fsl_lpuart-enable-two-stop-bits.patch | 6 +- ...l-lpuart-support-UPIO_MEM32-for-lpua.patch | 2 +- ...pend-clock-from-dt-to-set-power-down.patch | 6 +- ...5-usb-dwc3-add-otg-properties-update.patch | 8 +- ...-usb-role-switch-class-support-for-d.patch | 2 +- ...karound-for-host-mode-VBUS-glitch-wh.patch | 19 +- ...2675-usb-dwc3-host-disable-park-mode.patch | 4 +- ...Add-cache-type-configuration-support.patch | 8 +- ...host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch | 4 +- ...735-usb-host-add-XHCI_CDNS_HOST-flag.patch | 2 +- ...-host-xhci-add-.bus_suspend-override.patch | 4 +- ...usb-dwc3-Add-cache-type-configuratio.patch | 8 +- ...3-Add-cache-type-configuration-suppo.patch | 8 +- target/linux/malta/Makefile | 1 - target/linux/malta/README | 4 +- target/linux/malta/be/target.mk | 1 + target/linux/malta/be64/config-default | 11 +- target/linux/malta/be64/target.mk | 2 +- target/linux/malta/le/target.mk | 1 + target/linux/malta/le64/config-default | 11 +- target/linux/malta/le64/target.mk | 2 +- ...agate-resolved-link-config-via-mac_l.patch | 12 +- ...623-add-missing-pause-for-switchport.patch | 23 - .../102-powerpc-add-cmdline-override.patch | 2 +- .../base-files/etc/uci-defaults/03_wireless | 3 +- target/linux/mvebu/image/cortexa53.mk | 4 + .../linux/mvebu/image/espressobin.bootscript | 34 ++ ...Mangle-bootloader-s-kernel-arguments.patch | 2 +- ...t-for-endpoint-to-be-ready-before-tr.patch | 50 +++ ...-t-rely-on-jiffies-while-holding-spi.patch | 54 +++ ...in-link-immediately-after-enabling-t.patch | 60 +++ ...5-PCI-aardvark-Improve-link-training.patch | 208 +++++++++ ...06-PCI-aardvark-Issue-PERST-via-GPIO.patch | 123 ++++++ .../407-PCI-aardvark-Add-PHY-support.patch | 152 +++++++ ...-t-touch-PCIe-registers-if-no-card-c.patch | 50 +++ ...-initialization-with-old-Marvell-s-A.patch | 44 ++ ...l-espressobin-Add-ethernet-switch-al.patch | 134 ++++++ ...l-armada-3720-espressobin-add-ports-.patch | 2 +- ...l-espressobin-remove-COMPHY-nodes-as.patch | 4 +- ...l-armada-37xx-Set-pcie_reset_pin-to-.patch | 93 ++++ ...l-armada-37xx-Move-PCIe-comphy-handl.patch | 57 +++ ...l-armada-37xx-Move-PCIe-max-link-spe.patch | 44 ++ .../octeon/base-files/etc/board.d/01_network | 3 + .../octeon/base-files/lib/preinit/01_sysinfo | 5 + .../base-files/lib/preinit/79_move_config | 25 +- .../octeon/base-files/lib/upgrade/platform.sh | 11 +- target/linux/octeon/config-5.4 | 26 +- .../cn7130_ubnt_edgerouter-4.dts | 213 +++++++++ .../mips/boot/dts/cavium-octeon/cn71xx.dtsi | 357 +++++++++++++++ target/linux/octeon/image/Makefile | 18 + .../110-er200-ethernet_probe_order.patch | 4 +- .../patches-5.4/140-octeon_e300_support.patch | 18 + .../700-allocate_interface_by_label.patch | 38 ++ ...-honor_sgmii_node_device_tree_status.patch | 27 ++ ...Mangle-bootloader-s-kernel-arguments.patch | 2 +- ...img-Fix-null-pointer-access-in-probe.patch | 42 -- .../sunxi/base-files/etc/board.d/01_leds | 19 + .../sunxi/base-files/etc/board.d/02_network | 3 + target/linux/sunxi/config-5.4 | 2 + target/linux/sunxi/image/cortexa7.mk | 28 +- target/linux/sunxi/modules.mk | 16 +- .../062-add-sun8i-h3-zeropi-support.patch | 79 ++++ ...0-sunxi-h3-add-support-for-nanopi-r1.patch | 186 ++++++++ 260 files changed, 4338 insertions(+), 1695 deletions(-) delete mode 100644 package/boot/uboot-mediatek/patches/006-mt7623-pinctrl-fix.patch delete mode 100644 package/boot/uboot-mediatek/patches/007-env-fat-use-bootdevice.patch delete mode 100644 package/boot/uboot-mediatek/patches/008-board-mediatek-fix-mmc_get_boot_dev-for-platforms-wi.patch delete mode 100644 package/boot/uboot-mediatek/patches/009-board-mediatek-Add-support-for-UniElec-U7623-board.patch delete mode 100644 package/boot/uboot-mvebu/patches/100-add_support_for_macronix_mx25u12835f.patch delete mode 100644 package/boot/uboot-mvebu/patches/120-mvebu_armada-37xx.h_increase_max_gunzip_size.patch delete mode 100644 package/boot/uboot-mvebu/patches/130-mmc-xenon_sdhci-Add-missing-common-host-capabilities.patch delete mode 100644 package/boot/uboot-mvebu/patches/134-arm-mvebu-Espressobin-Set-environment-variable-fdtfi.patch create mode 100644 package/boot/uboot-sunxi/patches/250-sun8i-h3-zeropi-add-device-tree.patch create mode 100644 package/boot/uboot-sunxi/patches/251-sun8i-h3-zeropi-add-defconfig.patch create mode 100644 package/boot/uboot-sunxi/patches/252-sunxi-h3-add-support-for-nanopi-r1.patch create mode 100644 package/kernel/mac80211/patches/rt2x00/990-rt2x00-mt7620-introduce-accessors-for-CHIP_VER-register.patch create mode 100644 package/kernel/mac80211/patches/rt2x00/991-rt2x00-mt7620-differentiate-based-on-SoC-CHIP_VER.patch create mode 100644 package/kernel/mac80211/patches/subsys/072-backports-add-sched_set_fifo_low.patch create mode 100644 target/linux/generic/hack-5.4/703-add_vsc8504_support.patch delete mode 100644 target/linux/generic/pending-5.4/445-mtd-spinand-gigadevice-Only-one-dummy-byte-in-QUA.patch delete mode 100644 target/linux/generic/pending-5.4/446-mtd-spinand-gigadevice-Add-QE-Bit.patch create mode 100644 target/linux/ipq806x/patches-5.4/096-PCI-qcom-Make-sure-PCIe-is-reset-before-init-for-rev.patch create mode 100644 target/linux/layerscape/base-files/lib/preinit/79_move_config create mode 100644 target/linux/layerscape/patches-5.4/302-dts-0119-arm64-dts-lx2160a-add-more-thermal-zone-support.patch create mode 100644 target/linux/layerscape/patches-5.4/302-dts-0120-arm64-dts-ls1046a-fix-ippdexpcr-offset-not-correct.patch create mode 100644 target/linux/layerscape/patches-5.4/302-dts-0121-arm64-dts-ls1043a-update-USB-nodes-status-to-match-b.patch create mode 100644 target/linux/layerscape/patches-5.4/302-dts-0122-arm64-dts-ls1043a-remove-thermal-zone-5-from-dts.patch create mode 100644 target/linux/layerscape/patches-5.4/818-thermal-0004-thermal-qoriq-Update-the-settings-for-TMUv2.patch delete mode 100644 target/linux/mediatek/patches-5.4/0700-arm-dts-mt7623-add-missing-pause-for-switchport.patch create mode 100644 target/linux/mvebu/image/espressobin.bootscript create mode 100644 target/linux/mvebu/patches-5.4/402-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch create mode 100644 target/linux/mvebu/patches-5.4/403-PCI-aardvark-Don-t-rely-on-jiffies-while-holding-spi.patch create mode 100644 target/linux/mvebu/patches-5.4/404-PCI-aardvark-Train-link-immediately-after-enabling-t.patch create mode 100644 target/linux/mvebu/patches-5.4/405-PCI-aardvark-Improve-link-training.patch create mode 100644 target/linux/mvebu/patches-5.4/406-PCI-aardvark-Issue-PERST-via-GPIO.patch create mode 100644 target/linux/mvebu/patches-5.4/407-PCI-aardvark-Add-PHY-support.patch create mode 100644 target/linux/mvebu/patches-5.4/408-PCI-aardvark-Don-t-touch-PCIe-registers-if-no-card-c.patch create mode 100644 target/linux/mvebu/patches-5.4/410-PCI-aardvark-Fix-initialization-with-old-Marvell-s-A.patch create mode 100644 target/linux/mvebu/patches-5.4/521-arm64-dts-marvell-espressobin-Add-ethernet-switch-al.patch create mode 100644 target/linux/mvebu/patches-5.4/552-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch create mode 100644 target/linux/mvebu/patches-5.4/553-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch create mode 100644 target/linux/mvebu/patches-5.4/554-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch create mode 100644 target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-4.dts create mode 100644 target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn71xx.dtsi create mode 100644 target/linux/octeon/patches-5.4/140-octeon_e300_support.patch create mode 100644 target/linux/octeon/patches-5.4/700-allocate_interface_by_label.patch create mode 100644 target/linux/octeon/patches-5.4/701-honor_sgmii_node_device_tree_status.patch delete mode 100644 target/linux/pistachio/patches-5.4/150-pwm-img-Fix-null-pointer-access-in-probe.patch create mode 100755 target/linux/sunxi/base-files/etc/board.d/01_leds create mode 100644 target/linux/sunxi/patches-5.4/062-add-sun8i-h3-zeropi-support.patch create mode 100644 target/linux/sunxi/patches-5.4/100-sunxi-h3-add-support-for-nanopi-r1.patch diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 1af3d522c..ef49cfd9d 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -8,11 +8,11 @@ endif LINUX_VERSION-4.14 = .195 LINUX_VERSION-4.19 = .138 -LINUX_VERSION-5.4 = .72 +LINUX_VERSION-5.4 = .75 LINUX_KERNEL_HASH-4.14.195 = 394f28798670240baacd9e2cce521fbd79f8da5e1fc191695b0e11381445a021 LINUX_KERNEL_HASH-4.19.138 = d15c27d05f6c527269b75b30cc72972748e55720e7e00ad8abbaa4fe3b1d5e02 -LINUX_KERNEL_HASH-5.4.72 = 0e24645bd56fe5b55a7a662895f5562c103d71b54d097281f0c9c71ff22c1172 +LINUX_KERNEL_HASH-5.4.75 = d2466fd6eb5433e7bf287b617b11b2640c65a7ea93a57eb7a80d7f537cbc1470 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/package/boot/arm-trusted-firmware-mvebu/Makefile b/package/boot/arm-trusted-firmware-mvebu/Makefile index 9e917545a..38dd9d163 100644 --- a/package/boot/arm-trusted-firmware-mvebu/Makefile +++ b/package/boot/arm-trusted-firmware-mvebu/Makefile @@ -45,7 +45,7 @@ define Package/arm-trusted-firmware-mvebu-espressobin-v3-v5-1gb-1cs TITLE:=ARM Trusted Firmware for Marvell ESPRESSObin V3-V5 (1GB 1CS) DEPENDS:=+u-boot-espressobin UBOOT:=espressobin - DDR_TOPOLOGY:=2 + DDR_TOPOLOGY:=4 CLOCKSPRESET:=CPU_800_DDR_800 PLAT:=a3700 endef diff --git a/package/boot/tfa-layerscape/Makefile b/package/boot/tfa-layerscape/Makefile index b3e947f3b..b4295c631 100644 --- a/package/boot/tfa-layerscape/Makefile +++ b/package/boot/tfa-layerscape/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tfa-layerscape -PKG_VERSION:=LSDK-20.04 -PKG_RELEASE:=2 +PKG_VERSION:=LSDK-20.04-update-290520 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/atf -PKG_SOURCE_VERSION:=4a82c939a0211196e2b80a495f966383803753bb -PKG_MIRROR_HASH:=31c264551ce800b646d7dcc5baa62cfbb4c8fa3299a93931c7ef71dc3e88380d +PKG_SOURCE_VERSION:=7d748e6f0ec652ba7c43733dc67a3d0b0217390a +PKG_MIRROR_HASH:=d209c9ad18aac9f18375450b98b8dab00f0382ccb485df14623bf9b72ea1dd9b PKG_BUILD_DEPENDS:=tfa-layerscape/host include $(INCLUDE_DIR)/host-build.mk diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 index d12771442..2c3697db0 100644 --- a/package/boot/uboot-envtools/files/ath79 +++ b/package/boot/uboot-envtools/files/ath79 @@ -14,6 +14,10 @@ board=$(board_name) case "$board" in alfa-network,ap121f|\ +alfa-network,ap121fe|\ +alfa-network,n2q|\ +alfa-network,n5q|\ +alfa-network,r36a|\ allnet,all-wap02860ac|\ arduino,yun|\ buffalo,bhr-4grv2|\ @@ -37,6 +41,7 @@ netgear,wnr612-v2|\ ocedo,koala|\ ocedo,raccoon|\ openmesh,om5p-ac-v2|\ +samsung,wam250|\ ubnt,nanostation-m|\ yuncore,a770|\ yuncore,a782|\ @@ -75,6 +80,9 @@ netgear,wndr4300sw) qihoo,c301) ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000" ;; +wallys,dr531) + ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000" + ;; esac config_load ubootenv diff --git a/package/boot/uboot-envtools/files/ipq40xx b/package/boot/uboot-envtools/files/ipq40xx index 7bcad00b0..27aab6b28 100644 --- a/package/boot/uboot-envtools/files/ipq40xx +++ b/package/boot/uboot-envtools/files/ipq40xx @@ -32,15 +32,21 @@ ubootenv_mtdinfo () { case "$board" in alfa-network,ap120c-ac |\ +edgecore,ecw5211 |\ glinet,gl-b1300 |\ +luma,wrtq-329acn |\ openmesh,a42 |\ openmesh,a62) ubootenv_add_uci_config "/dev/mtd5" "0x0" "0x10000" "0x10000" ;; +buffalo,wtr-m2133hp) + ubootenv_add_uci_config "/dev/mtd8" "0x0" "0x40000" "0x20000" + ;; linksys,ea6350v3) ubootenv_add_uci_config "/dev/mtd7" "0x0" "0x20000" "0x20000" ;; -linksys,ea8300) +linksys,ea8300 |\ +linksys,mr8300) ubootenv_add_uci_config "/dev/mtd7" "0x0" "0x40000" "0x20000" ;; zyxel,nbg6617) diff --git a/package/boot/uboot-envtools/files/ipq806x b/package/boot/uboot-envtools/files/ipq806x index e2f2e611c..6aae089ac 100644 --- a/package/boot/uboot-envtools/files/ipq806x +++ b/package/boot/uboot-envtools/files/ipq806x @@ -31,6 +31,9 @@ ubootenv_mtdinfo () { } case "$board" in +edgecore,ecw5410) + ubootenv_add_uci_config "/dev/mtd11" "0x0" "0x10000" "0x10000" + ;; linksys,ea7500-v1 |\ linksys,ea8500) ubootenv_add_uci_config "/dev/mtd10" "0x0" "0x20000" "0x20000" diff --git a/package/boot/uboot-envtools/files/mvebu b/package/boot/uboot-envtools/files/mvebu index 1d3b79b96..85101cf35 100644 --- a/package/boot/uboot-envtools/files/mvebu +++ b/package/boot/uboot-envtools/files/mvebu @@ -27,7 +27,14 @@ glinet,gl-mv1000) globalscale,espressobin|\ globalscale,espressobin-emmc|\ globalscale,espressobin-v7|\ -globalscale,espressobin-v7-emmc|\ +globalscale,espressobin-v7-emmc) + idx="$(find_mtd_index u-boot-env)" + if [ -n "$idx" ]; then + ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" "1" + else + ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1" + fi + ;; marvell,armada8040-mcbin-doubleshot|\ marvell,armada8040-mcbin-singleshot) ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1" diff --git a/package/boot/uboot-layerscape/Makefile b/package/boot/uboot-layerscape/Makefile index 294045288..5d6a956ae 100644 --- a/package/boot/uboot-layerscape/Makefile +++ b/package/boot/uboot-layerscape/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uboot-layerscape -PKG_VERSION:=LSDK-20.04 -PKG_RELEASE:=2 +PKG_VERSION:=LSDK-20.04-update-290520 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot -PKG_SOURCE_VERSION:=b0833bd0e26c059277f0673c9887b967f1ea5837 -PKG_MIRROR_HASH:=3cc01d4853ba56d9bcfe5366eddb5f664ae110741146d04f03434d38b4b5b0a0 +PKG_SOURCE_VERSION:=1e55b2f9e7f56b76569089b9e950f49c1579580e +PKG_MIRROR_HASH:=46aace27e1367f40b424a64215d524a99c3bd62f49057550039e72d5a1ab7edb include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk diff --git a/package/boot/uboot-layerscape/files/fsl_ls1012a-frdm-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1012a-frdm-uEnv.txt index f33e6a3f5..b0923b592 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1012a-frdm-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1012a-frdm-uEnv.txt @@ -1,6 +1,6 @@ fdtaddr=0x8f000000 loadaddr=0x81000000 -fdt_high=0xffffffffffffffff +fdt_high=0x8fffffff initrd_high=0xffffffffffffffff qspi_boot=sf probe 0:0;sf read $loadaddr 1000000 2800000;bootm $loadaddr bootargs=rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.spi:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(pfe),2m(reserved-2),1m(dtb),-(firmware) diff --git a/package/boot/uboot-layerscape/files/fsl_ls1012a-frwy-sdboot-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1012a-frwy-sdboot-uEnv.txt index 31178df69..1fcd769dc 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1012a-frwy-sdboot-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1012a-frwy-sdboot-uEnv.txt @@ -1,8 +1,8 @@ fdtaddr=0x8f000000 loadaddr=0x81000000 -fdt_high=0xffffffffffffffff +fdt_high=0x8fffffff initrd_high=0xffffffffffffffff -sd_boot=mmc read $fdtaddr 7800 800;mmc read $loadaddr 8000 8000;bootm $loadaddr - $fdtaddr -bootargs=root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 +sd_boot=ext4load mmc 0:1 $loadaddr fitImage;bootm $loadaddr +bootargs=root=/dev/mmcblk0p2 rw rootwait rootfstype=squashfs,f2fs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 bootcmd=echo starting openwrt ...;pfe stop;run sd_boot bootdelay=3 diff --git a/package/boot/uboot-layerscape/files/fsl_ls1012a-rdb-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1012a-rdb-uEnv.txt index f109a98b8..906feec9e 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1012a-rdb-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1012a-rdb-uEnv.txt @@ -3,6 +3,6 @@ loadaddr=0x81000000 fdt_high=0xffffffffffffffff initrd_high=0xffffffffffffffff qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr -bootargs=root=/dev/mtdblock8 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.spi:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(pfe),2m(reserved-2),1m(dtb),16m(kernel),32m(rootfs),48m@0x1000000(firmware) +bootargs=root=/dev/mtdblock8 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.spi:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(pfe),2m(reserved-2),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware) bootcmd=echo starting openwrt ...;pfe stop;run qspi_boot bootdelay=3 diff --git a/package/boot/uboot-layerscape/files/fsl_ls1021a-iot-sdboot-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1021a-iot-sdboot-uEnv.txt index 7772daa10..ed8661bc6 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1021a-iot-sdboot-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1021a-iot-sdboot-uEnv.txt @@ -1,8 +1,8 @@ fdtaddr=0x8f000000 loadaddr=0x81000000 -fdt_high=0xffffffff +fdt_high=0x8fffffff initrd_high=0xffffffff -sd_boot=mmc read ${fdtaddr} 7800 800;mmc read ${loadaddr} 8000 8000;bootm ${loadaddr} - ${fdtaddr} -bootargs=root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 +sd_boot=ext4load mmc 0:1 $loadaddr fitImage;bootm $loadaddr +bootargs=root=/dev/mmcblk0p2 rw rootwait rootfstype=squashfs,f2fs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 bootcmd=echo starting openwrt ...;run sd_boot bootdelay=3 diff --git a/package/boot/uboot-layerscape/files/fsl_ls1021a-twr-sdboot-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1021a-twr-sdboot-uEnv.txt index da286a24a..ed8661bc6 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1021a-twr-sdboot-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1021a-twr-sdboot-uEnv.txt @@ -1,8 +1,8 @@ fdtaddr=0x8f000000 loadaddr=0x81000000 -fdt_high=0xffffffff +fdt_high=0x8fffffff initrd_high=0xffffffff -sd_boot=mmc read $fdtaddr 7800 800;mmc read $loadaddr 8000 8000;bootm $loadaddr - $fdtaddr -bootargs=root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 cma=64M@0x0-0xb0000000 +sd_boot=ext4load mmc 0:1 $loadaddr fitImage;bootm $loadaddr +bootargs=root=/dev/mmcblk0p2 rw rootwait rootfstype=squashfs,f2fs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 bootcmd=echo starting openwrt ...;run sd_boot bootdelay=3 diff --git a/package/boot/uboot-layerscape/files/fsl_ls1021a-twr-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1021a-twr-uEnv.txt index d6c5f56fd..c0792c51e 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1021a-twr-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1021a-twr-uEnv.txt @@ -3,6 +3,6 @@ loadaddr=0x81000000 fdt_high=0xffffffff initrd_high=0xffffffff nor_boot=cp.b 60f00000 $fdtaddr 100000;cp.b 61000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr -bootargs=root=/dev/mtdblock6 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(rcw),2m(u-boot),1m(u-boot-env),11m(reserved-1),1m(dtb),16m(kernel),32m(rootfs),48m@0x1000000(firmware) cma=64M@0x0-0xb0000000 +bootargs=root=/dev/mtdblock6 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(rcw),2m(u-boot),1m(u-boot-env),11m(reserved-1),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware) cma=64M@0x0-0xb0000000 bootcmd=echo starting openwrt ...;run nor_boot bootdelay=3 diff --git a/package/boot/uboot-layerscape/files/fsl_ls1043a-rdb-sdboot-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1043a-rdb-sdboot-uEnv.txt index c1596b506..603403387 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1043a-rdb-sdboot-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1043a-rdb-sdboot-uEnv.txt @@ -1,9 +1,9 @@ fdtaddr=0x8f000000 loadaddr=0x81000000 -fdt_high=0xffffffffffffffff +fdt_high=0x8fffffff initrd_high=0xffffffffffffffff hwconfig=fsl_ddr:bank_intlv=auto -sd_boot=mmc read $fdtaddr 7800 800;mmc read $loadaddr 8000 8000;bootm $loadaddr - $fdtaddr -bootargs=root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 +sd_boot=ext4load mmc 0:1 $loadaddr fitImage;bootm $loadaddr +bootargs=root=/dev/mmcblk0p2 rw rootwait rootfstype=squashfs,f2fs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 bootcmd=echo starting openwrt ...;run sd_boot bootdelay=3 diff --git a/package/boot/uboot-layerscape/files/fsl_ls1043a-rdb-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1043a-rdb-uEnv.txt index 1214bf40c..3a958ce90 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1043a-rdb-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1043a-rdb-uEnv.txt @@ -4,6 +4,6 @@ fdt_high=0xffffffffffffffff initrd_high=0xffffffffffffffff hwconfig=fsl_ddr:bank_intlv=auto nor_boot=cp.b 60f00000 $fdtaddr 100000;cp.b 61000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr -bootargs=root=/dev/mtdblock8 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(bl2),4m(fip),1m(u-boot-env),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(rootfs),48m@0x1000000(firmware) +bootargs=root=/dev/mtdblock8 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(bl2),4m(fip),1m(u-boot-env),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware) bootcmd=echo starting openwrt ...;run nor_boot bootdelay=3 diff --git a/package/boot/uboot-layerscape/files/fsl_ls1046a-rdb-sdboot-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1046a-rdb-sdboot-uEnv.txt index c1596b506..603403387 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1046a-rdb-sdboot-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1046a-rdb-sdboot-uEnv.txt @@ -1,9 +1,9 @@ fdtaddr=0x8f000000 loadaddr=0x81000000 -fdt_high=0xffffffffffffffff +fdt_high=0x8fffffff initrd_high=0xffffffffffffffff hwconfig=fsl_ddr:bank_intlv=auto -sd_boot=mmc read $fdtaddr 7800 800;mmc read $loadaddr 8000 8000;bootm $loadaddr - $fdtaddr -bootargs=root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 +sd_boot=ext4load mmc 0:1 $loadaddr fitImage;bootm $loadaddr +bootargs=root=/dev/mmcblk0p2 rw rootwait rootfstype=squashfs,f2fs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 bootcmd=echo starting openwrt ...;run sd_boot bootdelay=3 diff --git a/package/boot/uboot-layerscape/files/fsl_ls1046a-rdb-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1046a-rdb-uEnv.txt index 975b1c1e7..a9b91e5ac 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1046a-rdb-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1046a-rdb-uEnv.txt @@ -4,6 +4,6 @@ fdt_high=0xffffffffffffffff initrd_high=0xffffffffffffffff hwconfig=fsl_ddr:bank_intlv=auto qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr -bootargs=root=/dev/mtdblock9 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.spi-0:1m(bl2),4m(fip),1m(u-boot-env),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(rootfs),48m@0x1000000(firmware) +bootargs=root=/dev/mtdblock9 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.spi-0:1m(bl2),4m(fip),1m(u-boot-env),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware) bootcmd=echo starting openwrt ...;run qspi_boot bootdelay=3 diff --git a/package/boot/uboot-layerscape/files/fsl_ls1088a-rdb-sdboot-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1088a-rdb-sdboot-uEnv.txt index 2d27f7eb0..b25e9c8ee 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1088a-rdb-sdboot-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1088a-rdb-sdboot-uEnv.txt @@ -4,7 +4,7 @@ fdt_high=0xa0000000 initrd_high=0xffffffffffffffff hwconfig=fsl_ddr:bank_intlv=auto mc_init=mmc read 80000000 5000 1800;mmc read 80300000 7000 800;fsl_mc start mc 80000000 80300000;mmc read 80400000 6800 800;fsl_mc apply dpl 80400000 -sd_boot=mmc read $fdtaddr 7800 800;mmc read $loadaddr 8000 8000;bootm $loadaddr - $fdtaddr -bootargs=root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 +sd_boot=ext4load mmc 0:1 $loadaddr fitImage;bootm $loadaddr +bootargs=root=/dev/mmcblk0p2 rw rootwait rootfstype=squashfs,f2fs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 bootcmd=echo starting openwrt ...;run mc_init;run sd_boot bootdelay=3 diff --git a/package/boot/uboot-layerscape/files/fsl_ls1088a-rdb-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1088a-rdb-uEnv.txt index 7ab555040..6ac6216d6 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1088a-rdb-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1088a-rdb-uEnv.txt @@ -5,6 +5,6 @@ initrd_high=0xffffffffffffffff hwconfig=fsl_ddr:bank_intlv=auto mc_init=sf probe 0:0;sf read 80000000 a00000 300000;sf read 80300000 e00000 100000;fsl_mc start mc 80000000 80300000;sf read 80400000 d00000 100000;fsl_mc apply dpl 80400000 qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr -bootargs=root=/dev/mtdblock10 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=20c0000.spi-0:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(mc),1m(dpl),1m(dpc),1m(dtb),16m(kernel),32m(rootfs),48m@0x1000000(firmware) +bootargs=root=/dev/mtdblock10 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=20c0000.spi-0:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(mc),1m(dpl),1m(dpc),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware) bootcmd=echo starting openwrt ...;run mc_init;run qspi_boot bootdelay=3 diff --git a/package/boot/uboot-layerscape/files/fsl_ls2088a-rdb-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls2088a-rdb-uEnv.txt index fe2febd2c..eb10a88d7 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls2088a-rdb-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls2088a-rdb-uEnv.txt @@ -5,6 +5,6 @@ initrd_high=0xffffffffffffffff hwconfig=fsl_ddr:bank_intlv=auto mc_init=fsl_mc start mc 580a00000 580e00000;fsl_mc apply dpl 580d00000 nor_boot=cp.b 580f00000 $fdtaddr 100000;cp.b 581000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr -bootargs=root=/dev/mtdblock9 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS1,115200 mtdparts=580000000.nor:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(mc),1m(dpl),1m(dpc),1m(dtb),16m(kernel),32m(rootfs),48m@0x1000000(firmware) +bootargs=root=/dev/mtdblock9 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS1,115200 mtdparts=580000000.nor:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(mc),1m(dpl),1m(dpc),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware) bootcmd=echo starting openwrt ...;run mc_init;run nor_boot bootdelay=3 diff --git a/package/boot/uboot-mediatek/Makefile b/package/boot/uboot-mediatek/Makefile index bdb2c450a..c46b906cb 100644 --- a/package/boot/uboot-mediatek/Makefile +++ b/package/boot/uboot-mediatek/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2020.07 -PKG_HASH:=c1f5bf9ee6bb6e648edbf19ce2ca9452f614b08a9f886f1a566aa42e8cf05f6a +PKG_VERSION:=2020.10 +PKG_HASH:=0d481bbdc05c0ee74908ec2f56a6daa53166cc6a78a0e4fac2ac5d025770a622 include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk diff --git a/package/boot/uboot-mediatek/patches/004-configs-enable-mtd-and-mtk_spi_nand-in-defconfig.patch b/package/boot/uboot-mediatek/patches/004-configs-enable-mtd-and-mtk_spi_nand-in-defconfig.patch index 752d8163f..cb564965c 100644 --- a/package/boot/uboot-mediatek/patches/004-configs-enable-mtd-and-mtk_spi_nand-in-defconfig.patch +++ b/package/boot/uboot-mediatek/patches/004-configs-enable-mtd-and-mtk_spi_nand-in-defconfig.patch @@ -19,6 +19,7 @@ index 1ce6ebdfeb..816126267b 100644 CONFIG_CMD_BOOTMENU=y CONFIG_CMD_MMC=y +CONFIG_CMD_NAND=y + CONFIG_CMD_PCI=y CONFIG_CMD_SF_TEST=y CONFIG_CMD_PING=y CONFIG_CMD_SMC=y diff --git a/package/boot/uboot-mediatek/patches/006-mt7623-pinctrl-fix.patch b/package/boot/uboot-mediatek/patches/006-mt7623-pinctrl-fix.patch deleted file mode 100644 index 2e50717b7..000000000 --- a/package/boot/uboot-mediatek/patches/006-mt7623-pinctrl-fix.patch +++ /dev/null @@ -1,237 +0,0 @@ -From e05fdd93645dab2217bb5bfabcc04845415cf7ed Mon Sep 17 00:00:00 2001 -From: David Woodhouse -Date: Fri, 19 Jun 2020 12:40:20 +0100 -Subject: [PATCH] pinctrl: mediatek: add PUPD/R0/R1 support for MT7623 - -The pins for the MMC controller weren't being set up correctly because the -pinctrl driver only sets the GPIO pullup/pulldown config and doesn't -handle the special cases with PUPD/R0/R1 control. - -Signed-off-by: David Woodhouse -Tested-by: Frank Wunderlich ---- - drivers/pinctrl/mediatek/pinctrl-mt7623.c | 129 ++++++++++++++++++ - drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 19 ++- - drivers/pinctrl/mediatek/pinctrl-mtk-common.h | 3 + - 3 files changed, 146 insertions(+), 5 deletions(-) - -diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7623.c b/drivers/pinctrl/mediatek/pinctrl-mt7623.c -index d58d840e08..0f5dcb2c63 100644 ---- a/drivers/pinctrl/mediatek/pinctrl-mt7623.c -+++ b/drivers/pinctrl/mediatek/pinctrl-mt7623.c -@@ -262,6 +262,132 @@ static const struct mtk_pin_field_calc mt7623_pin_drv_range[] = { - PIN_FIELD16(278, 278, 0xf70, 0x10, 8, 4), - }; - -+static const struct mtk_pin_field_calc mt7623_pin_pupd_range[] = { -+ /* MSDC0 */ -+ PIN_FIELD16(111, 111, 0xd00, 0x10, 12, 1), -+ PIN_FIELD16(112, 112, 0xd00, 0x10, 8, 1), -+ PIN_FIELD16(113, 113, 0xd00, 0x10, 4, 1), -+ PIN_FIELD16(114, 114, 0xd00, 0x10, 0, 1), -+ PIN_FIELD16(115, 115, 0xd10, 0x10, 0, 1), -+ PIN_FIELD16(116, 116, 0xcd0, 0x10, 8, 1), -+ PIN_FIELD16(117, 117, 0xcc0, 0x10, 8, 1), -+ PIN_FIELD16(118, 118, 0xcf0, 0x10, 12, 1), -+ PIN_FIELD16(119, 119, 0xcf0, 0x10, 8, 1), -+ PIN_FIELD16(120, 120, 0xcf0, 0x10, 4, 1), -+ PIN_FIELD16(121, 121, 0xcf0, 0x10, 0, 1), -+ /* MSDC1 */ -+ PIN_FIELD16(105, 105, 0xd40, 0x10, 8, 1), -+ PIN_FIELD16(106, 106, 0xd30, 0x10, 8, 1), -+ PIN_FIELD16(107, 107, 0xd60, 0x10, 0, 1), -+ PIN_FIELD16(108, 108, 0xd60, 0x10, 10, 1), -+ PIN_FIELD16(109, 109, 0xd60, 0x10, 4, 1), -+ PIN_FIELD16(110, 110, 0xc60, 0x10, 12, 1), -+ /* MSDC1 */ -+ PIN_FIELD16(85, 85, 0xda0, 0x10, 8, 1), -+ PIN_FIELD16(86, 86, 0xd90, 0x10, 8, 1), -+ PIN_FIELD16(87, 87, 0xdc0, 0x10, 0, 1), -+ PIN_FIELD16(88, 88, 0xdc0, 0x10, 10, 1), -+ PIN_FIELD16(89, 89, 0xdc0, 0x10, 4, 1), -+ PIN_FIELD16(90, 90, 0xdc0, 0x10, 12, 1), -+ /* MSDC0E */ -+ PIN_FIELD16(249, 249, 0x140, 0x10, 0, 1), -+ PIN_FIELD16(250, 250, 0x130, 0x10, 12, 1), -+ PIN_FIELD16(251, 251, 0x130, 0x10, 8, 1), -+ PIN_FIELD16(252, 252, 0x130, 0x10, 4, 1), -+ PIN_FIELD16(253, 253, 0x130, 0x10, 0, 1), -+ PIN_FIELD16(254, 254, 0xf40, 0x10, 12, 1), -+ PIN_FIELD16(255, 255, 0xf40, 0x10, 8, 1), -+ PIN_FIELD16(256, 256, 0xf40, 0x10, 4, 1), -+ PIN_FIELD16(257, 257, 0xf40, 0x10, 0, 1), -+ PIN_FIELD16(258, 258, 0xcb0, 0x10, 8, 1), -+ PIN_FIELD16(259, 259, 0xc90, 0x10, 8, 1), -+ PIN_FIELD16(261, 261, 0x140, 0x10, 8, 1), -+}; -+ -+static const struct mtk_pin_field_calc mt7623_pin_r1_range[] = { -+ /* MSDC0 */ -+ PIN_FIELD16(111, 111, 0xd00, 0x10, 13, 1), -+ PIN_FIELD16(112, 112, 0xd00, 0x10, 9, 1), -+ PIN_FIELD16(113, 113, 0xd00, 0x10, 5, 1), -+ PIN_FIELD16(114, 114, 0xd00, 0x10, 1, 1), -+ PIN_FIELD16(115, 115, 0xd10, 0x10, 1, 1), -+ PIN_FIELD16(116, 116, 0xcd0, 0x10, 9, 1), -+ PIN_FIELD16(117, 117, 0xcc0, 0x10, 9, 1), -+ PIN_FIELD16(118, 118, 0xcf0, 0x10, 13, 1), -+ PIN_FIELD16(119, 119, 0xcf0, 0x10, 9, 1), -+ PIN_FIELD16(120, 120, 0xcf0, 0x10, 5, 1), -+ PIN_FIELD16(121, 121, 0xcf0, 0x10, 1, 1), -+ /* MSDC1 */ -+ PIN_FIELD16(105, 105, 0xd40, 0x10, 9, 1), -+ PIN_FIELD16(106, 106, 0xd30, 0x10, 9, 1), -+ PIN_FIELD16(107, 107, 0xd60, 0x10, 1, 1), -+ PIN_FIELD16(108, 108, 0xd60, 0x10, 9, 1), -+ PIN_FIELD16(109, 109, 0xd60, 0x10, 5, 1), -+ PIN_FIELD16(110, 110, 0xc60, 0x10, 13, 1), -+ /* MSDC2 */ -+ PIN_FIELD16(85, 85, 0xda0, 0x10, 9, 1), -+ PIN_FIELD16(86, 86, 0xd90, 0x10, 9, 1), -+ PIN_FIELD16(87, 87, 0xdc0, 0x10, 1, 1), -+ PIN_FIELD16(88, 88, 0xdc0, 0x10, 9, 1), -+ PIN_FIELD16(89, 89, 0xdc0, 0x10, 5, 1), -+ PIN_FIELD16(90, 90, 0xdc0, 0x10, 13, 1), -+ /* MSDC0E */ -+ PIN_FIELD16(249, 249, 0x140, 0x10, 1, 1), -+ PIN_FIELD16(250, 250, 0x130, 0x10, 13, 1), -+ PIN_FIELD16(251, 251, 0x130, 0x10, 9, 1), -+ PIN_FIELD16(252, 252, 0x130, 0x10, 5, 1), -+ PIN_FIELD16(253, 253, 0x130, 0x10, 1, 1), -+ PIN_FIELD16(254, 254, 0xf40, 0x10, 13, 1), -+ PIN_FIELD16(255, 255, 0xf40, 0x10, 9, 1), -+ PIN_FIELD16(256, 256, 0xf40, 0x10, 5, 1), -+ PIN_FIELD16(257, 257, 0xf40, 0x10, 1, 1), -+ PIN_FIELD16(258, 258, 0xcb0, 0x10, 9, 1), -+ PIN_FIELD16(259, 259, 0xc90, 0x10, 9, 1), -+ PIN_FIELD16(261, 261, 0x140, 0x10, 9, 1), -+}; -+ -+static const struct mtk_pin_field_calc mt7623_pin_r0_range[] = { -+ /* MSDC0 */ -+ PIN_FIELD16(111, 111, 0xd00, 0x10, 14, 1), -+ PIN_FIELD16(112, 112, 0xd00, 0x10, 10, 1), -+ PIN_FIELD16(113, 113, 0xd00, 0x10, 6, 1), -+ PIN_FIELD16(114, 114, 0xd00, 0x10, 2, 1), -+ PIN_FIELD16(115, 115, 0xd10, 0x10, 2, 1), -+ PIN_FIELD16(116, 116, 0xcd0, 0x10, 10, 1), -+ PIN_FIELD16(117, 117, 0xcc0, 0x10, 10, 1), -+ PIN_FIELD16(118, 118, 0xcf0, 0x10, 14, 1), -+ PIN_FIELD16(119, 119, 0xcf0, 0x10, 10, 1), -+ PIN_FIELD16(120, 120, 0xcf0, 0x10, 6, 1), -+ PIN_FIELD16(121, 121, 0xcf0, 0x10, 2, 1), -+ /* MSDC1 */ -+ PIN_FIELD16(105, 105, 0xd40, 0x10, 10, 1), -+ PIN_FIELD16(106, 106, 0xd30, 0x10, 10, 1), -+ PIN_FIELD16(107, 107, 0xd60, 0x10, 2, 1), -+ PIN_FIELD16(108, 108, 0xd60, 0x10, 8, 1), -+ PIN_FIELD16(109, 109, 0xd60, 0x10, 6, 1), -+ PIN_FIELD16(110, 110, 0xc60, 0x10, 14, 1), -+ /* MSDC2 */ -+ PIN_FIELD16(85, 85, 0xda0, 0x10, 10, 1), -+ PIN_FIELD16(86, 86, 0xd90, 0x10, 10, 1), -+ PIN_FIELD16(87, 87, 0xdc0, 0x10, 2, 1), -+ PIN_FIELD16(88, 88, 0xdc0, 0x10, 8, 1), -+ PIN_FIELD16(89, 89, 0xdc0, 0x10, 6, 1), -+ PIN_FIELD16(90, 90, 0xdc0, 0x10, 14, 1), -+ /* MSDC0E */ -+ PIN_FIELD16(249, 249, 0x140, 0x10, 2, 1), -+ PIN_FIELD16(250, 250, 0x130, 0x10, 14, 1), -+ PIN_FIELD16(251, 251, 0x130, 0x10, 10, 1), -+ PIN_FIELD16(252, 252, 0x130, 0x10, 6, 1), -+ PIN_FIELD16(253, 253, 0x130, 0x10, 2, 1), -+ PIN_FIELD16(254, 254, 0xf40, 0x10, 14, 1), -+ PIN_FIELD16(255, 255, 0xf40, 0x10, 10, 1), -+ PIN_FIELD16(256, 256, 0xf40, 0x10, 6, 1), -+ PIN_FIELD16(257, 257, 0xf40, 0x10, 5, 1), -+ PIN_FIELD16(258, 258, 0xcb0, 0x10, 10, 1), -+ PIN_FIELD16(259, 259, 0xc90, 0x10, 10, 1), -+ PIN_FIELD16(261, 261, 0x140, 0x10, 10, 1), -+}; -+ - static const struct mtk_pin_reg_calc mt7623_reg_cals[] = { - [PINCTRL_PIN_REG_MODE] = MTK_RANGE(mt7623_pin_mode_range), - [PINCTRL_PIN_REG_DIR] = MTK_RANGE(mt7623_pin_dir_range), -@@ -272,6 +398,9 @@ static const struct mtk_pin_reg_calc mt7623_reg_cals[] = { - [PINCTRL_PIN_REG_PULLSEL] = MTK_RANGE(mt7623_pin_pullsel_range), - [PINCTRL_PIN_REG_PULLEN] = MTK_RANGE(mt7623_pin_pullen_range), - [PINCTRL_PIN_REG_DRV] = MTK_RANGE(mt7623_pin_drv_range), -+ [PINCTRL_PIN_REG_PUPD] = MTK_RANGE(mt7623_pin_pupd_range), -+ [PINCTRL_PIN_REG_R0] = MTK_RANGE(mt7623_pin_r0_range), -+ [PINCTRL_PIN_REG_R1] = MTK_RANGE(mt7623_pin_r1_range), - }; - - static const struct mtk_pin_desc mt7623_pins[] = { -diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c -index e8187a3780..6553dde45c 100644 ---- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c -+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c -@@ -296,7 +296,7 @@ static const struct pinconf_param mtk_conf_params[] = { - }; - - --int mtk_pinconf_bias_set_v0(struct udevice *dev, u32 pin, u32 arg) -+int mtk_pinconf_bias_set_v0(struct udevice *dev, u32 pin, u32 arg, u32 val) - { - int err, disable, pullup; - -@@ -323,12 +323,14 @@ int mtk_pinconf_bias_set_v0(struct udevice *dev, u32 pin, u32 arg) - return 0; - } - --int mtk_pinconf_bias_set_v1(struct udevice *dev, u32 pin, u32 arg) -+int mtk_pinconf_bias_set_v1(struct udevice *dev, u32 pin, u32 arg, u32 val) - { -- int err, disable, pullup; -+ int err, disable, pullup, r0, r1; - - disable = (arg == PIN_CONFIG_BIAS_DISABLE); - pullup = (arg == PIN_CONFIG_BIAS_PULL_UP); -+ r0 = !!(val & 1); -+ r1 = !!(val & 2); - - if (disable) { - err = mtk_hw_set_value(dev, pin, PINCTRL_PIN_REG_PULLEN, 0); -@@ -344,6 +346,13 @@ int mtk_pinconf_bias_set_v1(struct udevice *dev, u32 pin, u32 arg) - return err; - } - -+ /* Also set PUPD/R0/R1 if the pin has them */ -+ err = mtk_hw_set_value(dev, pin, PINCTRL_PIN_REG_PUPD, !pullup); -+ if (err != -EINVAL) { -+ mtk_hw_set_value(dev, pin, PINCTRL_PIN_REG_R0, r0); -+ mtk_hw_set_value(dev, pin, PINCTRL_PIN_REG_R1, r1); -+ } -+ - return 0; - } - -@@ -419,9 +428,9 @@ static int mtk_pinconf_set(struct udevice *dev, unsigned int pin, - case PIN_CONFIG_BIAS_PULL_UP: - case PIN_CONFIG_BIAS_PULL_DOWN: - if (rev == MTK_PINCTRL_V0) -- err = mtk_pinconf_bias_set_v0(dev, pin, param); -+ err = mtk_pinconf_bias_set_v0(dev, pin, param, arg); - else -- err = mtk_pinconf_bias_set_v1(dev, pin, param); -+ err = mtk_pinconf_bias_set_v1(dev, pin, param, arg); - if (err) - goto err; - break; -diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.h b/drivers/pinctrl/mediatek/pinctrl-mtk-common.h -index e815761450..5e51a9a90c 100644 ---- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.h -+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.h -@@ -51,6 +51,9 @@ enum { - PINCTRL_PIN_REG_PULLEN, - PINCTRL_PIN_REG_PULLSEL, - PINCTRL_PIN_REG_DRV, -+ PINCTRL_PIN_REG_PUPD, -+ PINCTRL_PIN_REG_R0, -+ PINCTRL_PIN_REG_R1, - PINCTRL_PIN_REG_MAX, - }; - --- -2.26.2 - diff --git a/package/boot/uboot-mediatek/patches/007-env-fat-use-bootdevice.patch b/package/boot/uboot-mediatek/patches/007-env-fat-use-bootdevice.patch deleted file mode 100644 index 2ac001228..000000000 --- a/package/boot/uboot-mediatek/patches/007-env-fat-use-bootdevice.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 6731bef6966ea2b26cdcfe0109ff5a950003fd03 Mon Sep 17 00:00:00 2001 -From: David Woodhouse -Date: Fri, 19 Jun 2020 23:07:17 +0100 -Subject: [PATCH] env/fat.c: allow loading from a FAT partition on the MMC boot - device - -I don't want to have to specify the device; only the partition. - -This allows me to use the same image on internal eMMC or SD card for -Banana Pi R2, and it finds its own environment either way. - -Signed-off-by: David Woodhouse -[trini: Add #if/#else/#endif logic around CONFIG_SYS_MMC_ENV_DEV usage, - whitespace changes] -Signed-off-by: Tom Rini ---- - env/Kconfig | 4 ++++ - env/fat.c | 32 ++++++++++++++++++++++++++++++-- - 2 files changed, 34 insertions(+), 2 deletions(-) - -diff --git a/env/Kconfig b/env/Kconfig -index 38e7fadbb9..5784136674 100644 ---- a/env/Kconfig -+++ b/env/Kconfig -@@ -434,6 +434,10 @@ config ENV_FAT_DEVICE_AND_PART - If none, first valid partition in device D. If no - partition table then means device D. - -+ If ENV_FAT_INTERFACE is set to "mmc" then device 'D' can be omitted, -+ leaving the string starting with a colon, and the boot device will -+ be used. -+ - config ENV_FAT_FILE - string "Name of the FAT file to use for the environment" - depends on ENV_IS_IN_FAT -diff --git a/env/fat.c b/env/fat.c -index 35a1955e63..63aced9317 100644 ---- a/env/fat.c -+++ b/env/fat.c -@@ -29,6 +29,34 @@ - # define LOADENV - #endif - -+__weak int mmc_get_env_dev(void) -+{ -+#ifdef CONFIG_SYS_MMC_ENV_DEV -+ return CONFIG_SYS_MMC_ENV_DEV; -+#else -+ return 0; -+#endif -+} -+ -+static char *env_fat_device_and_part(void) -+{ -+#ifdef CONFIG_MMC -+ static char *part_str; -+ -+ if (!part_str) { -+ part_str = CONFIG_ENV_FAT_DEVICE_AND_PART; -+ if (!strcmp(CONFIG_ENV_FAT_INTERFACE, "mmc") && part_str[0] == ':') { -+ part_str = "0" CONFIG_ENV_FAT_DEVICE_AND_PART; -+ part_str[0] += mmc_get_env_dev(); -+ } -+ } -+ -+ return part_str; -+#else -+ return CONFIG_ENV_FAT_DEVICE_AND_PART; -+#endif -+} -+ - static int env_fat_save(void) - { - env_t __aligned(ARCH_DMA_MINALIGN) env_new; -@@ -43,7 +71,7 @@ static int env_fat_save(void) - return err; - - part = blk_get_device_part_str(CONFIG_ENV_FAT_INTERFACE, -- CONFIG_ENV_FAT_DEVICE_AND_PART, -+ env_fat_device_and_part(), - &dev_desc, &info, 1); - if (part < 0) - return 1; -@@ -89,7 +117,7 @@ static int env_fat_load(void) - #endif - - part = blk_get_device_part_str(CONFIG_ENV_FAT_INTERFACE, -- CONFIG_ENV_FAT_DEVICE_AND_PART, -+ env_fat_device_and_part(), - &dev_desc, &info, 1); - if (part < 0) - goto err_env_relocate; --- -2.26.2 - diff --git a/package/boot/uboot-mediatek/patches/008-board-mediatek-fix-mmc_get_boot_dev-for-platforms-wi.patch b/package/boot/uboot-mediatek/patches/008-board-mediatek-fix-mmc_get_boot_dev-for-platforms-wi.patch deleted file mode 100644 index f57beed09..000000000 --- a/package/boot/uboot-mediatek/patches/008-board-mediatek-fix-mmc_get_boot_dev-for-platforms-wi.patch +++ /dev/null @@ -1,51 +0,0 @@ -From e3cc511eef5d99491e0c51324be499b688dde8de Mon Sep 17 00:00:00 2001 -From: David Woodhouse -Date: Sun, 12 Jul 2020 23:33:01 +0100 -Subject: [PATCH 1/3] board: mediatek: fix mmc_get_boot_dev() for platforms - without external SD - -On the UniElec U7623 board there is no external SD slot and the preloader -doesn't fill in the magic field at 0x81dffff0 to indicate that it was -booted from eMMC. - -Signed-off-by: David Woodhouse ---- - board/mediatek/mt7623/mt7623_rfb.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/board/mediatek/mt7623/mt7623_rfb.c b/board/mediatek/mt7623/mt7623_rfb.c -index 4ec2764976..984e75ccaf 100644 ---- a/board/mediatek/mt7623/mt7623_rfb.c -+++ b/board/mediatek/mt7623/mt7623_rfb.c -@@ -4,6 +4,7 @@ - */ - - #include -+#include - - DECLARE_GLOBAL_DATA_PTR; - -@@ -15,10 +16,15 @@ int board_init(void) - return 0; - } - -+#ifdef CONFIG_MMC - int mmc_get_boot_dev(void) - { - int g_mmc_devid = -1; - char *uflag = (char *)0x81DFFFF0; -+ -+ if (!find_mmc_device(1)) -+ return 0; -+ - if (strncmp(uflag,"eMMC",4)==0) { - g_mmc_devid = 0; - printf("Boot From Emmc(id:%d)\n\n", g_mmc_devid); -@@ -33,3 +39,4 @@ int mmc_get_env_dev(void) - { - return mmc_get_boot_dev(); - } -+#endif --- -2.26.2 - diff --git a/package/boot/uboot-mediatek/patches/009-board-mediatek-Add-support-for-UniElec-U7623-board.patch b/package/boot/uboot-mediatek/patches/009-board-mediatek-Add-support-for-UniElec-U7623-board.patch deleted file mode 100644 index e4cf8e56a..000000000 --- a/package/boot/uboot-mediatek/patches/009-board-mediatek-Add-support-for-UniElec-U7623-board.patch +++ /dev/null @@ -1,326 +0,0 @@ -From 3fad1ca28d4c87346d18b89438bf2084fb2c3896 Mon Sep 17 00:00:00 2001 -From: David Woodhouse -Date: Sun, 12 Jul 2020 23:33:03 +0100 -Subject: [PATCH 3/3] board: mediatek: Add support for UniElec U7623 board - -This is an MT7623A-based board, very similar to the Banana Pi R2. - -http://www.unielecinc.com/q/news/cn/p/product/detail.html?qd_guid=OjXwKCaRlN - -Signed-off-by: David Woodhouse ---- - arch/arm/dts/Makefile | 1 + - .../arm/dts/mt7623a-unielec-u7623-02-emmc.dts | 211 ++++++++++++++++++ - board/mediatek/mt7623/MAINTAINERS | 7 + - configs/mt7623a_unielec_u7623_02_defconfig | 54 +++++ - 4 files changed, 273 insertions(+) - create mode 100644 arch/arm/dts/mt7623a-unielec-u7623-02-emmc.dts - create mode 100644 configs/mt7623a_unielec_u7623_02_defconfig - -diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile -index a3a1e3fbe4..caa7756c5d 100644 ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -949,6 +949,7 @@ dtb-$(CONFIG_SOC_K3_J721E) += k3-j721e-common-proc-board.dtb \ - - dtb-$(CONFIG_ARCH_MEDIATEK) += \ - mt7622-rfb.dtb \ -+ mt7623a-unielec-u7623-02-emmc.dtb \ - mt7623n-bananapi-bpi-r2.dtb \ - mt7629-rfb.dtb \ - mt8512-bm1-emmc.dtb \ -diff --git a/arch/arm/dts/mt7623a-unielec-u7623-02-emmc.dts b/arch/arm/dts/mt7623a-unielec-u7623-02-emmc.dts -new file mode 100644 -index 0000000000..fdeec75b05 ---- /dev/null -+++ b/arch/arm/dts/mt7623a-unielec-u7623-02-emmc.dts -@@ -0,0 +1,211 @@ -+/* -+ * Copyright (C) 2018 MediaTek Inc. -+ * Author: Ryder Lee -+ * -+ * SPDX-License-Identifier: (GPL-2.0 OR MIT) -+ */ -+ -+/dts-v1/; -+#include "mt7623.dtsi" -+#include "mt7623-u-boot.dtsi" -+ -+/ { -+ model = "UniElec U7623-02 eMMC"; -+ compatible = "unielec,u7623-02-emmc", "mediatek,mt7623"; -+ -+ memory@80000000 { -+ device_type = "memory"; -+ reg = <0 0x80000000 0 0x20000000>; -+ }; -+ -+ chosen { -+ stdout-path = &uart2; -+ tick-timer = &timer0; -+ }; -+ -+ reg_1p8v: regulator-1p8v { -+ compatible = "regulator-fixed"; -+ regulator-name = "fixed-1.8V"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ regulator-boot-on; -+ regulator-always-on; -+ }; -+ -+ reg_3p3v: regulator-3p3v { -+ compatible = "regulator-fixed"; -+ regulator-name = "fixed-3.3V"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-boot-on; -+ regulator-always-on; -+ }; -+ -+ reg_5v: regulator-5v { -+ compatible = "regulator-fixed"; -+ regulator-name = "fixed-5V"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ regulator-boot-on; -+ regulator-always-on; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ -+ led3 { -+ label = "u7623-01:green:led3"; -+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>; -+ default-state = "off"; -+ }; -+ -+ led4 { -+ label = "u7623-01:green:led4"; -+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>; -+ default-state = "off"; -+ }; -+ }; -+}; -+ -+ð { -+ status = "okay"; -+ mediatek,gmac-id = <0>; -+ phy-mode = "rgmii"; -+ mediatek,switch = "mt7530"; -+ mediatek,mcm; -+ -+ fixed-link { -+ speed = <1000>; -+ full-duplex; -+ }; -+}; -+ -+&mmc0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc0_pins_default>; -+ status = "okay"; -+ bus-width = <8>; -+ max-frequency = <50000000>; -+ cap-mmc-highspeed; -+ vmmc-supply = <®_3p3v>; -+ vqmmc-supply = <®_1p8v>; -+ non-removable; -+}; -+ -+&pinctrl { -+ ephy_default: ephy_default { -+ mux { -+ function = "eth"; -+ groups = "mdc_mdio", "ephy"; -+ }; -+ -+ conf { -+ pins = "G2_TXEN", "G2_TXD0", "G2_TXD1", "G2_TXD2", -+ "G2_TXD3", "G2_TXC", "G2_RXC", "G2_RXD0", -+ "G2_RXD1", "G2_RXD2", "G2_RXD3", "G2_RXDV", -+ "MDC", "MDIO"; -+ drive-strength = <12>; -+ mediatek,tdsel = <5>; -+ }; -+ }; -+ -+ mmc0_pins_default: mmc0default { -+ mux { -+ function = "msdc"; -+ groups = "msdc0"; -+ }; -+ -+ conf-cmd-data { -+ pins = "MSDC0_CMD", "MSDC0_DAT0", "MSDC0_DAT1", -+ "MSDC0_DAT2", "MSDC0_DAT3", "MSDC0_DAT4", -+ "MSDC0_DAT5", "MSDC0_DAT6", "MSDC0_DAT7"; -+ input-enable; -+ bias-pull-up; -+ }; -+ -+ conf-clk { -+ pins = "MSDC0_CLK"; -+ bias-pull-down; -+ }; -+ -+ conf-rst { -+ pins = "MSDC0_RSTB"; -+ bias-pull-up; -+ }; -+ }; -+ -+ pcie_default: pcie-default { -+ mux { -+ function = "pcie"; -+ groups = "pcie0_0_perst", "pcie1_0_perst"; -+ }; -+ }; -+ -+ uart0_pins_a: uart0-default { -+ mux { -+ function = "uart"; -+ groups = "uart0_0_txd_rxd"; -+ }; -+ }; -+ -+ uart1_pins_a: uart1-default { -+ mux { -+ function = "uart"; -+ groups = "uart1_0_txd_rxd"; -+ }; -+ }; -+ -+ uart2_pins_a: uart2-default { -+ mux { -+ function = "uart"; -+ groups = "uart2_0_txd_rxd"; -+ }; -+ }; -+ -+ uart2_pins_b: uart2-alt { -+ mux { -+ function = "uart"; -+ groups = "uart2_1_txd_rxd"; -+ }; -+ }; -+}; -+ -+&pcie { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pcie_default>; -+ status = "okay"; -+ -+ pcie@0,0 { -+ status = "okay"; -+ }; -+ -+ pcie@1,0 { -+ status = "okay"; -+ }; -+}; -+ -+&pcie0_phy { -+ status = "okay"; -+}; -+ -+&pcie1_phy { -+ status = "okay"; -+}; -+ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_pins_a>; -+ status = "okay"; -+}; -+ -+&uart1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart1_pins_a>; -+ status = "okay"; -+}; -+ -+&uart2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart2_pins_b>; -+ status = "okay"; -+}; -diff --git a/board/mediatek/mt7623/MAINTAINERS b/board/mediatek/mt7623/MAINTAINERS -index eeb0375d70..1a8d796bd3 100644 ---- a/board/mediatek/mt7623/MAINTAINERS -+++ b/board/mediatek/mt7623/MAINTAINERS -@@ -5,3 +5,10 @@ S: Maintained - F: board/mediatek/mt7623 - F: include/configs/mt7623.h - F: configs/mt7623n_bpir2_defconfig -+ -+UNIELEC U7623 -+M: Ryder Lee -+M: David Woodhouse -+S: Maintained -+F: arch/arm/dts/mt7623a-unielec-u7623-02-emmc.dts -+F: configs/mt7623a_unielec_u7623_02_defconfig -diff --git a/configs/mt7623a_unielec_u7623_02_defconfig b/configs/mt7623a_unielec_u7623_02_defconfig -new file mode 100644 -index 0000000000..72b5f31092 ---- /dev/null -+++ b/configs/mt7623a_unielec_u7623_02_defconfig -@@ -0,0 +1,54 @@ -+CONFIG_ARM=y -+CONFIG_SYS_THUMB_BUILD=y -+CONFIG_ARCH_MEDIATEK=y -+CONFIG_SYS_TEXT_BASE=0x81e00000 -+CONFIG_SYS_MALLOC_F_LEN=0x4000 -+CONFIG_ENV_SIZE=0x1000 -+CONFIG_ENV_OFFSET=0x100000 -+CONFIG_TARGET_MT7623=y -+CONFIG_NR_DRAM_BANKS=1 -+CONFIG_DISTRO_DEFAULTS=y -+CONFIG_FIT=y -+CONFIG_FIT_VERBOSE=y -+CONFIG_BOOTDELAY=3 -+CONFIG_SYS_CONSOLE_IS_IN_ENV=y -+CONFIG_DEFAULT_FDT_FILE="mt7623a-unielec-u7623-02-emmc.dtb" -+# CONFIG_DISPLAY_BOARDINFO is not set -+CONFIG_SYS_PROMPT="U-Boot> " -+CONFIG_CMD_BOOTMENU=y -+# CONFIG_CMD_ELF is not set -+# CONFIG_CMD_XIMG is not set -+CONFIG_CMD_GPIO=y -+CONFIG_CMD_GPT=y -+CONFIG_CMD_MMC=y -+CONFIG_CMD_READ=y -+# CONFIG_CMD_SETEXPR is not set -+# CONFIG_CMD_NFS is not set -+CONFIG_DEFAULT_DEVICE_TREE="mt7623a-unielec-u7623-02-emmc" -+CONFIG_ENV_IS_IN_MMC=y -+CONFIG_SYS_RELOC_GD_ENV_ADDR=y -+CONFIG_NET_RANDOM_ETHADDR=y -+CONFIG_REGMAP=y -+CONFIG_SYSCON=y -+CONFIG_CLK=y -+CONFIG_DM_MMC=y -+# CONFIG_MMC_QUIRKS is not set -+CONFIG_SUPPORT_EMMC_BOOT=y -+CONFIG_MMC_HS400_SUPPORT=y -+CONFIG_MMC_MTK=y -+CONFIG_PHY_FIXED=y -+CONFIG_DM_ETH=y -+CONFIG_MEDIATEK_ETH=y -+CONFIG_PINCTRL=y -+CONFIG_PINCONF=y -+CONFIG_PINCTRL_MT7623=y -+CONFIG_POWER_DOMAIN=y -+CONFIG_MTK_POWER_DOMAIN=y -+CONFIG_DM_SERIAL=y -+CONFIG_MTK_SERIAL=y -+CONFIG_SYSRESET=y -+CONFIG_SYSRESET_WATCHDOG=y -+CONFIG_TIMER=y -+CONFIG_MTK_TIMER=y -+CONFIG_WDT_MTK=y -+CONFIG_LZMA=y --- -2.26.2 - diff --git a/package/boot/uboot-mediatek/patches/010-no-binman.patch b/package/boot/uboot-mediatek/patches/010-no-binman.patch index 8a05a2d41..a2680e56f 100644 --- a/package/boot/uboot-mediatek/patches/010-no-binman.patch +++ b/package/boot/uboot-mediatek/patches/010-no-binman.patch @@ -1,11 +1,9 @@ ---- a/Makefile -+++ b/Makefile -@@ -1667,8 +1667,10 @@ u-boot-elf.lds: arch/u-boot-elf.lds prepare FORCE +--- a/Makefile 2020-10-13 13:39:06.471438591 +0800 ++++ b/Makefile 2020-10-13 13:39:39.190798462 +0800 +@@ -1725,6 +1725,10 @@ + ifeq ($(CONFIG_SPL),y) spl/u-boot-spl-mtk.bin: spl/u-boot-spl - --u-boot-mtk.bin: u-boot.dtb u-boot.img spl/u-boot-spl-mtk.bin FORCE -- $(call if_changed,binman) +OBJCOPYFLAGS_u-boot-mtk.bin = -I binary -O binary \ + --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff +u-boot-mtk.bin: u-boot.img spl/u-boot-spl-mtk.bin FORCE diff --git a/package/boot/uboot-mvebu/Makefile b/package/boot/uboot-mvebu/Makefile index 9a1b5ed63..25dd2526e 100644 --- a/package/boot/uboot-mvebu/Makefile +++ b/package/boot/uboot-mvebu/Makefile @@ -8,10 +8,10 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2020.10-rc4 +PKG_VERSION:=2020.10 PKG_RELEASE:=1 -PKG_HASH:=0a7bdd2c7df2c14daf2730fcf3277fd917aadfaae935529e29c7412314bbf260 +PKG_HASH:=0d481bbdc05c0ee74908ec2f56a6daa53166cc6a78a0e4fac2ac5d025770a622 include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk @@ -38,14 +38,12 @@ endef define U-Boot/espressobin NAME:=Marvell ESPRESSObin - BUILD_DEVICES:=globalscale_espressobin globalscale_espressobin-v7 BUILD_SUBTARGET:=cortexa53 UBOOT_CONFIG:=mvebu_espressobin-88f3720 endef define U-Boot/espressobin-emmc NAME:=Marvell ESPRESSObin - BUILD_DEVICES:=globalscale_espressobin-emmc globalscale_espressobin-v7-emmc BUILD_SUBTARGET:=cortexa53 UBOOT_CONFIG:=mvebu_espressobin-88f3720 UBOOT_MAKE_FLAGS+=DEVICE_TREE=armada-3720-espressobin-emmc @@ -53,7 +51,6 @@ endef define U-Boot/uDPU NAME:=Methode uDPU - BUILD_DEVICES:=methode_udpu BUILD_SUBTARGET:=cortexa53 endef @@ -68,12 +65,15 @@ Build/Exports:=$(Host/Exports) define Build/Configure # enable additional options beyond _defconfig - echo CONFIG_NET_RANDOM_ETHADDR=y >> $(PKG_BUILD_DIR)/configs/$(UBOOT_CONFIG)_defconfig echo CONFIG_CMD_SETEXPR=y >> $(PKG_BUILD_DIR)/configs/$(UBOOT_CONFIG)_defconfig $(call Build/Configure/U-Boot) endef +define Package/u-boot/install + $(if $(findstring cortexa53,$(BUILD_SUBTARGET)),,$(Package/u-boot/install/default)) +endef + define Build/InstallDev $(INSTALL_DIR) $(STAGING_DIR_IMAGE) $(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-$(UBOOT_IMAGE) diff --git a/package/boot/uboot-mvebu/patches/100-add_support_for_macronix_mx25u12835f.patch b/package/boot/uboot-mvebu/patches/100-add_support_for_macronix_mx25u12835f.patch deleted file mode 100644 index f1a292694..000000000 --- a/package/boot/uboot-mvebu/patches/100-add_support_for_macronix_mx25u12835f.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/drivers/mtd/spi/spi-nor-ids.c -+++ b/drivers/mtd/spi/spi-nor-ids.c -@@ -151,6 +151,7 @@ const struct flash_info spi_nor_ids[] = - { INFO("mx25u3235f", 0xc22536, 0, 4 * 1024, 1024, SECT_4K) }, - { INFO("mx25u6435f", 0xc22537, 0, 64 * 1024, 128, SECT_4K) }, - { INFO("mx25l12805d", 0xc22018, 0, 64 * 1024, 256, 0) }, -+ { INFO("mx25u12835f", 0xc22538, 0, 64 * 1024, 256, SECT_4K) }, - { INFO("mx25l12855e", 0xc22618, 0, 64 * 1024, 256, 0) }, - { INFO("mx25l25635e", 0xc22019, 0, 64 * 1024, 512, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, - { INFO("mx25u25635f", 0xc22539, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_4B_OPCODES) }, diff --git a/package/boot/uboot-mvebu/patches/120-mvebu_armada-37xx.h_increase_max_gunzip_size.patch b/package/boot/uboot-mvebu/patches/120-mvebu_armada-37xx.h_increase_max_gunzip_size.patch deleted file mode 100644 index c543e5126..000000000 --- a/package/boot/uboot-mvebu/patches/120-mvebu_armada-37xx.h_increase_max_gunzip_size.patch +++ /dev/null @@ -1,13 +0,0 @@ -Increase max gunzip size in mvebu_armada-37xx.h. -This is required in order to boot itb images. - ---- a/include/configs/mvebu_armada-37xx.h -+++ b/include/configs/mvebu_armada-37xx.h -@@ -12,6 +12,7 @@ - - /* additions for new ARM relocation support */ - #define CONFIG_SYS_SDRAM_BASE 0x00000000 -+#define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */ - - /* auto boot */ - diff --git a/package/boot/uboot-mvebu/patches/130-mmc-xenon_sdhci-Add-missing-common-host-capabilities.patch b/package/boot/uboot-mvebu/patches/130-mmc-xenon_sdhci-Add-missing-common-host-capabilities.patch deleted file mode 100644 index fa41f0152..000000000 --- a/package/boot/uboot-mvebu/patches/130-mmc-xenon_sdhci-Add-missing-common-host-capabilities.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 264c45575ec6a3d507dc4e43954b8a78283aca6c Mon Sep 17 00:00:00 2001 -From: Andre Heider -Date: Thu, 10 Sep 2020 17:58:43 +0200 -Subject: [PATCH] mmc: xenon_sdhci: Add missing common host capabilities - -Use mmc_of_parse() to set the common host properties. That includes -"bus-width", so parsing it can be removed from the driver. - -But more importantly, "non-removable" is now respected, which fixes -the usage of eMMC. - -Signed-off-by: Andre Heider ---- - drivers/mmc/xenon_sdhci.c | 18 ++++-------------- - 1 file changed, 4 insertions(+), 14 deletions(-) - ---- a/drivers/mmc/xenon_sdhci.c -+++ b/drivers/mmc/xenon_sdhci.c -@@ -485,20 +485,10 @@ static int xenon_sdhci_probe(struct udev - armada_3700_soc_pad_voltage_set(host); - - host->host_caps = MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_DDR_52MHz; -- switch (fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "bus-width", -- 1)) { -- case 8: -- host->host_caps |= MMC_MODE_8BIT; -- break; -- case 4: -- host->host_caps |= MMC_MODE_4BIT; -- break; -- case 1: -- break; -- default: -- printf("Invalid \"bus-width\" value\n"); -- return -EINVAL; -- } -+ -+ ret = mmc_of_parse(dev, &plat->cfg); -+ if (ret) -+ return ret; - - host->ops = &xenon_sdhci_ops; - diff --git a/package/boot/uboot-mvebu/patches/131-arm64-dts-armada-3720-espressobin-use-Linux-model-co.patch b/package/boot/uboot-mvebu/patches/131-arm64-dts-armada-3720-espressobin-use-Linux-model-co.patch index 1aef9db90..85c61098f 100644 --- a/package/boot/uboot-mvebu/patches/131-arm64-dts-armada-3720-espressobin-use-Linux-model-co.patch +++ b/package/boot/uboot-mvebu/patches/131-arm64-dts-armada-3720-espressobin-use-Linux-model-co.patch @@ -1,14 +1,16 @@ -From 753947e2c374820dcbc9c86626812aeb7d460653 Mon Sep 17 00:00:00 2001 +From cdcfd9211c805624a702b6ff81b9bd9515344749 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Fri, 4 Sep 2020 16:34:22 +0200 Subject: [PATCH] arm64: dts: armada-3720-espressobin: use Linux model/compatible strings Fix the actual board vendor and ease synching dts files from Linux. + +Signed-off-by: Andre Heider --- arch/arm/dts/armada-3720-espressobin.dts | 4 ++-- - board/Marvell/mvebu_armada-37xx/board.c | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) + board/Marvell/mvebu_armada-37xx/board.c | 8 ++++---- + 2 files changed, 6 insertions(+), 6 deletions(-) --- a/arch/arm/dts/armada-3720-espressobin.dts +++ b/arch/arm/dts/armada-3720-espressobin.dts @@ -25,7 +27,24 @@ Fix the actual board vendor and ease synching dts files from Linux. stdout-path = "serial0:115200n8"; --- a/board/Marvell/mvebu_armada-37xx/board.c +++ b/board/Marvell/mvebu_armada-37xx/board.c -@@ -201,7 +201,7 @@ static int mii_multi_chip_mode_write(str +@@ -88,14 +88,14 @@ int board_late_init(void) + if (env_get("fdtfile")) + return 0; + +- if (!of_machine_is_compatible("marvell,armada-3720-espressobin")) ++ if (!of_machine_is_compatible("globalscale,espressobin")) + return 0; + + /* If the memory controller has been configured for DDR4, we're running on v7 */ + ddr4 = ((readl(A3700_CH0_MC_CTRL2_REG) >> A3700_MC_CTRL2_SDRAM_TYPE_OFFS) + & A3700_MC_CTRL2_SDRAM_TYPE_MASK) == A3700_MC_CTRL2_SDRAM_TYPE_DDR4; + +- emmc = of_machine_is_compatible("marvell,armada-3720-espressobin-emmc"); ++ emmc = of_machine_is_compatible("globalscale,espressobin-emmc"); + + if (ddr4 && emmc) + env_set("fdtfile", "marvell/armada-3720-espressobin-v7-emmc.dtb"); +@@ -248,7 +248,7 @@ static int mii_multi_chip_mode_write(str /* Bring-up board-specific network stuff */ int board_network_enable(struct mii_dev *bus) { @@ -34,7 +53,7 @@ Fix the actual board vendor and ease synching dts files from Linux. return 0; /* -@@ -253,7 +253,7 @@ int ft_board_setup(void *blob, struct bd +@@ -300,7 +300,7 @@ int ft_board_setup(void *blob, struct bd int part_off; /* Fill SPI MTD partitions for Linux kernel on Espressobin */ diff --git a/package/boot/uboot-mvebu/patches/132-arm64-dts-armada-3720-espressobin-split-common-parts.patch b/package/boot/uboot-mvebu/patches/132-arm64-dts-armada-3720-espressobin-split-common-parts.patch index d3af221c0..1ca8b8d8d 100644 --- a/package/boot/uboot-mvebu/patches/132-arm64-dts-armada-3720-espressobin-split-common-parts.patch +++ b/package/boot/uboot-mvebu/patches/132-arm64-dts-armada-3720-espressobin-split-common-parts.patch @@ -1,21 +1,20 @@ -From ee59573dd531df96de0d9dc8e79b34ed3716c864 Mon Sep 17 00:00:00 2001 +From a9ac1dd46a4fd11880be80227e1eb102e3c61dd8 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Fri, 4 Sep 2020 15:38:58 +0200 -Subject: [PATCH] arm64: dts: armada-3720-espressobin: split common parts to - .dtsi +Subject: [PATCH] arm64: dts: armada-3720-espressobin: split common parts + to .dtsi -Move most of the dts to the new common -arch/arm/dts/armada-3720-espressobin.dtsi file, just like Linux has. +Move most of the dts to the new common armada-3720-espressobin.dtsi +file, just like Linux, but keep the current, downstream based, version. The dts itself is imported from Linux. Signed-off-by: Andre Heider --- - arch/arm/dts/armada-3720-espressobin.dts | 190 ++---------------- - ...sobin.dts => armada-3720-espressobin.dtsi} | 3 - - 2 files changed, 20 insertions(+), 173 deletions(-) - rewrite arch/arm/dts/armada-3720-espressobin.dts (95%) - copy arch/arm/dts/{armada-3720-espressobin.dts => armada-3720-espressobin.dtsi} (96%) + arch/arm/dts/armada-3720-espressobin.dts | 164 +-------------------- + arch/arm/dts/armada-3720-espressobin.dtsi | 167 ++++++++++++++++++++++ + 2 files changed, 174 insertions(+), 157 deletions(-) + create mode 100644 arch/arm/dts/armada-3720-espressobin.dtsi --- a/arch/arm/dts/armada-3720-espressobin.dts +++ b/arch/arm/dts/armada-3720-espressobin.dts diff --git a/package/boot/uboot-mvebu/patches/133-arm64-dts-a3720-add-support-for-boards-with-populate.patch b/package/boot/uboot-mvebu/patches/133-arm64-dts-a3720-add-support-for-boards-with-populate.patch index f35b45d0e..1e2944b5a 100644 --- a/package/boot/uboot-mvebu/patches/133-arm64-dts-a3720-add-support-for-boards-with-populate.patch +++ b/package/boot/uboot-mvebu/patches/133-arm64-dts-a3720-add-support-for-boards-with-populate.patch @@ -1,10 +1,12 @@ -From 83908b6e2e5a7d7b0f4d040ffb4bf3ce6807b8fe Mon Sep 17 00:00:00 2001 +From 408bba2fb84ad0b02c3f9529065126b40899e256 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Fri, 4 Sep 2020 15:44:41 +0200 -Subject: [PATCH] arm64: dts: a3720: add support for boards with populated emmc +Subject: [PATCH] arm64: dts: a3720: add support for espressobin with + populated emmc Import armada-3720-espressobin-emmc.dts from Linux, but use sdhc1 for -emmc, since sdhc0 is used for the sd card. +emmc, since our dtsi is still based on downstream and sdhc0 is used for +the sd card. Signed-off-by: Andre Heider --- diff --git a/package/boot/uboot-mvebu/patches/134-arm-mvebu-Espressobin-Set-environment-variable-fdtfi.patch b/package/boot/uboot-mvebu/patches/134-arm-mvebu-Espressobin-Set-environment-variable-fdtfi.patch deleted file mode 100644 index fd270ddae..000000000 --- a/package/boot/uboot-mvebu/patches/134-arm-mvebu-Espressobin-Set-environment-variable-fdtfi.patch +++ /dev/null @@ -1,100 +0,0 @@ -From d59406482c1847959305a986376b35e57da28e69 Mon Sep 17 00:00:00 2001 -From: Andre Heider -Date: Sat, 5 Sep 2020 12:45:59 +0200 -Subject: [PATCH] arm: mvebu: Espressobin: Set environment variable fdtfile - -Required for the generic distro mechanism. - -Linux ships with 4 variants: -marvell/armada-3720-espressobin-v7-emmc.dtb -marvell/armada-3720-espressobin-v7.dtb -marvell/armada-3720-espressobin-emmc.dtb -marvell/armada-3720-espressobin.dtb - -Use available information to determine the appropriate filename. - -Tested on a v5 board without eMMC. - -Signed-off-by: Andre Heider ---- - board/Marvell/mvebu_armada-37xx/board.c | 47 +++++++++++++++++++++ - configs/mvebu_espressobin-88f3720_defconfig | 1 + - 2 files changed, 48 insertions(+) - ---- a/board/Marvell/mvebu_armada-37xx/board.c -+++ b/board/Marvell/mvebu_armada-37xx/board.c -@@ -5,6 +5,7 @@ - - #include - #include -+#include - #include - #include - #include -@@ -50,6 +51,22 @@ DECLARE_GLOBAL_DATA_PTR; - #define MVEBU_G2_SMI_PHY_CMD_REG (24) - #define MVEBU_G2_SMI_PHY_DATA_REG (25) - -+/* -+ * Memory Controller Registers -+ * -+ * Assembled based on public information: -+ * https://gitlab.nic.cz/turris/mox-boot-builder/-/blob/master/wtmi/main.c#L332-336 -+ * https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell/blob/mv_ddr-armada-18.12/drivers/mv_ddr_mc6.h#L309-L332 -+ * -+ * And checked against the written register values for the various topologies: -+ * https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell/blob/mv_ddr-armada-atf-mainline/a3700/mv_ddr_tim.h -+ */ -+#define A3700_CH0_MC_CTRL2_REG MVEBU_REGISTER(0x002c4) -+#define A3700_MC_CTRL2_SDRAM_TYPE_MASK 0xf -+#define A3700_MC_CTRL2_SDRAM_TYPE_OFFS 4 -+#define A3700_MC_CTRL2_SDRAM_TYPE_DDR3 2 -+#define A3700_MC_CTRL2_SDRAM_TYPE_DDR4 3 -+ - int board_early_init_f(void) - { - return 0; -@@ -63,6 +80,36 @@ int board_init(void) - return 0; - } - -+#ifdef CONFIG_BOARD_LATE_INIT -+int board_late_init(void) -+{ -+ bool ddr4, emmc; -+ -+ if (env_get("fdtfile")) -+ return 0; -+ -+ if (!of_machine_is_compatible("globalscale,espressobin")) -+ return 0; -+ -+ /* If the memory controller has been configured for DDR4, we're running on v7 */ -+ ddr4 = ((readl(A3700_CH0_MC_CTRL2_REG) >> A3700_MC_CTRL2_SDRAM_TYPE_OFFS) -+ & A3700_MC_CTRL2_SDRAM_TYPE_MASK) == A3700_MC_CTRL2_SDRAM_TYPE_DDR4; -+ -+ emmc = of_machine_is_compatible("globalscale,espressobin-emmc"); -+ -+ if (ddr4 && emmc) -+ env_set("fdtfile", "marvell/armada-3720-espressobin-v7-emmc.dtb"); -+ else if (ddr4) -+ env_set("fdtfile", "marvell/armada-3720-espressobin-v7.dtb"); -+ else if (emmc) -+ env_set("fdtfile", "marvell/armada-3720-espressobin-emmc.dtb"); -+ else -+ env_set("fdtfile", "marvell/armada-3720-espressobin.dtb"); -+ -+ return 0; -+} -+#endif -+ - /* Board specific AHCI / SATA enable code */ - int board_ahci_enable(void) - { ---- a/configs/mvebu_espressobin-88f3720_defconfig -+++ b/configs/mvebu_espressobin-88f3720_defconfig -@@ -84,3 +84,4 @@ CONFIG_USB_ETHER_RTL8152=y - CONFIG_USB_ETHER_SMSC95XX=y - CONFIG_SHA1=y - CONFIG_SHA256=y -+CONFIG_BOARD_LATE_INIT=y diff --git a/package/boot/uboot-omap/Makefile b/package/boot/uboot-omap/Makefile index 70c8af1dc..f66b8d533 100644 --- a/package/boot/uboot-omap/Makefile +++ b/package/boot/uboot-omap/Makefile @@ -8,10 +8,10 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2019.10 +PKG_VERSION:=2020.04 PKG_RELEASE:=1 -PKG_HASH:=8d6d6070739522dd236cba7055b8736bfe92b4fac0ea18ad809829ca79667014 +PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372 include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile index ac2f9de88..58a5923ea 100644 --- a/package/boot/uboot-sunxi/Makefile +++ b/package/boot/uboot-sunxi/Makefile @@ -154,6 +154,12 @@ define U-Boot/nanopi_m1_plus BUILD_DEVICES:=friendlyarm_nanopi-m1-plus endef +define U-Boot/zeropi + BUILD_SUBTARGET:=cortexa7 + NAME:=ZeroPi (H3) + BUILD_DEVICES:=friendlyarm_zeropi +endef + define U-Boot/nanopi_neo_air BUILD_SUBTARGET:=cortexa7 NAME:=U-Boot for NanoPi NEO Air (H3) @@ -166,6 +172,12 @@ define U-Boot/nanopi_neo BUILD_DEVICES:=friendlyarm_nanopi-neo endef +define U-Boot/nanopi_r1 + BUILD_SUBTARGET:=cortexa7 + NAME:=U-Boot for NanoPi R1 (H3) + BUILD_DEVICES:=friendlyarm_nanopi-r1 +endef + define U-Boot/orangepi_r1 BUILD_SUBTARGET:=cortexa7 NAME:=Orange Pi R1 (H2+) @@ -272,7 +284,7 @@ endef define U-Boot/Bananapi_M2_Ultra BUILD_SUBTARGET:=cortexa7 NAME:=Bananapi M2 Ultra - BUILD_DEVICES:=lemaker_bananapi-m2-ultra + BUILD_DEVICES:=sinovoip_bananapi-m2-ultra endef UBOOT_TARGETS := \ @@ -299,10 +311,12 @@ UBOOT_TARGETS := \ Linksprite_pcDuino3 \ Lamobo_R1 \ nanopi_m1_plus \ + zeropi \ nanopi_neo \ nanopi_neo_air \ nanopi_neo_plus2 \ nanopi_neo2 \ + nanopi_r1 \ orangepi_zero \ orangepi_r1 \ orangepi_one \ diff --git a/package/boot/uboot-sunxi/patches/250-sun8i-h3-zeropi-add-device-tree.patch b/package/boot/uboot-sunxi/patches/250-sun8i-h3-zeropi-add-device-tree.patch new file mode 100644 index 000000000..4250e4e9d --- /dev/null +++ b/package/boot/uboot-sunxi/patches/250-sun8i-h3-zeropi-add-device-tree.patch @@ -0,0 +1,81 @@ +--- a/arch/arm/dts/Makefile ++++ b/arch/arm/dts/Makefile +@@ -539,7 +539,8 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \ + sun8i-h3-orangepi-plus.dtb \ + sun8i-h3-orangepi-plus2e.dtb \ + sun8i-h3-orangepi-zero-plus2.dtb \ +- sun8i-h3-rervision-dvk.dtb ++ sun8i-h3-rervision-dvk.dtb \ ++ sun8i-h3-zeropi.dtb + dtb-$(CONFIG_MACH_SUN8I_R40) += \ + sun8i-r40-bananapi-m2-ultra.dtb \ + sun8i-v40-bananapi-m2-berry.dtb +--- /dev/null ++++ b/arch/arm/dts/sun8i-h3-zeropi.dts +@@ -0,0 +1,66 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include "sun8i-h3-nanopi.dtsi" ++ ++/ { ++ model = "FriendlyElec ZeroPi"; ++ compatible = "friendlyarm,zeropi", "allwinner,sun8i-h3"; ++ ++ aliases { ++ ethernet0 = &emac; ++ }; ++ ++ reg_gmac_3v3: gmac-3v3 { ++ compatible = "regulator-fixed"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&gmac_power_pin_nanopi>; ++ regulator-name = "gmac-3v3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ startup-delay-us = <100000>; ++ enable-active-high; ++ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; ++ }; ++}; ++ ++&ehci0 { ++ status = "okay"; ++}; ++ ++&ohci0 { ++ status = "okay"; ++}; ++ ++&pio { ++ gmac_power_pin_nanopi: gmac_power_pin@0 { ++ pins = "PD6"; ++ function = "gpio_out"; ++ }; ++}; ++ ++&external_mdio { ++ ext_rgmii_phy: ethernet-phy@1 { ++ compatible = "ethernet-phy-ieee802.3-c22"; ++ reg = <7>; ++ }; ++}; ++ ++&emac { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&emac_rgmii_pins>; ++ phy-supply = <®_gmac_3v3>; ++ phy-handle = <&ext_rgmii_phy>; ++ phy-mode = "rgmii"; ++ ++ allwinner,leds-active-low; ++ status = "okay"; ++}; ++ ++&usb_otg { ++ status = "okay"; ++ dr_mode = "peripheral"; ++}; ++ ++&usbphy { ++ usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ ++}; diff --git a/package/boot/uboot-sunxi/patches/251-sun8i-h3-zeropi-add-defconfig.patch b/package/boot/uboot-sunxi/patches/251-sun8i-h3-zeropi-add-defconfig.patch new file mode 100644 index 000000000..76e333298 --- /dev/null +++ b/package/boot/uboot-sunxi/patches/251-sun8i-h3-zeropi-add-defconfig.patch @@ -0,0 +1,24 @@ +--- /dev/null ++++ b/configs/zeropi_defconfig +@@ -0,0 +1,21 @@ ++CONFIG_ARM=y ++CONFIG_ARCH_SUNXI=y ++CONFIG_MACH_SUN8I_H3=y ++CONFIG_DRAM_CLK=408 ++CONFIG_DRAM_ZQ=3881979 ++CONFIG_DRAM_ODT_EN=y ++CONFIG_MACPWR="PD6" ++# CONFIG_VIDEO_DE2 is not set ++CONFIG_NR_DRAM_BANKS=1 ++CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-zeropi" ++# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set ++CONFIG_CONSOLE_MUX=y ++CONFIG_SPL=y ++CONFIG_SYS_CLK_FREQ=480000000 ++# CONFIG_CMD_IMLS is not set ++# CONFIG_CMD_FLASH is not set ++# CONFIG_CMD_FPGA is not set ++CONFIG_SUN8I_EMAC=y ++CONFIG_USB_EHCI_HCD=y ++CONFIG_USB_EHCI_HCD=y ++CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y diff --git a/package/boot/uboot-sunxi/patches/252-sunxi-h3-add-support-for-nanopi-r1.patch b/package/boot/uboot-sunxi/patches/252-sunxi-h3-add-support-for-nanopi-r1.patch new file mode 100644 index 000000000..0db7be542 --- /dev/null +++ b/package/boot/uboot-sunxi/patches/252-sunxi-h3-add-support-for-nanopi-r1.patch @@ -0,0 +1,198 @@ +From 0e8043aff1aae95d1f7b7422b91b57d9569860d3 Mon Sep 17 00:00:00 2001 +From: Jayantajit Gogoi +Date: Mon, 12 Oct 2020 18:39:53 +0000 +Subject: [PATCH] sunxi: add support for FriendlyARM NanoPi R1 + +Signed-off-by: Jayantajit Gogoi +--- + arch/arm/dts/Makefile | 1 + + arch/arm/dts/sun8i-h3-nanopi-r1.dts | 146 ++++++++++++++++++++++++++++ + configs/nanopi_r1_defconfig | 22 +++++ + 3 files changed, 169 insertions(+) + create mode 100644 arch/arm/dts/sun8i-h3-nanopi-r1.dts + create mode 100644 configs/nanopi_r1_defconfig + +--- a/arch/arm/dts/Makefile ++++ b/arch/arm/dts/Makefile +@@ -531,6 +531,7 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \ + sun8i-h3-nanopi-m1-plus.dtb \ + sun8i-h3-nanopi-neo.dtb \ + sun8i-h3-nanopi-neo-air.dtb \ ++ sun8i-h3-nanopi-r1.dtb \ + sun8i-h3-orangepi-2.dtb \ + sun8i-h3-orangepi-lite.dtb \ + sun8i-h3-orangepi-one.dtb \ +--- /dev/null ++++ b/arch/arm/dts/sun8i-h3-nanopi-r1.dts +@@ -0,0 +1,146 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright (C) 2019 Igor Pecovnik ++ * Copyright (C) 2020 Jayantajit Gogoi ++ */ ++ ++/* NanoPi R1 is based on the NanoPi-H3 design from FriendlyARM */ ++#include "sun8i-h3-nanopi.dtsi" ++ ++/ { ++ model = "FriendlyARM NanoPi R1"; ++ compatible = "friendlyarm,nanopi-r1", "allwinner,sun8i-h3"; ++ ++ reg_gmac_3v3: gmac-3v3 { ++ compatible = "regulator-fixed"; ++ regulator-name = "gmac-3v3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ startup-delay-us = <100000>; ++ enable-active-high; ++ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ vdd_cpux: gpio-regulator { ++ compatible = "regulator-gpio"; ++ pinctrl-names = "default"; ++ regulator-name = "vdd-cpux"; ++ regulator-type = "voltage"; ++ regulator-boot-on; ++ regulator-always-on; ++ regulator-min-microvolt = <1100000>; ++ regulator-max-microvolt = <1300000>; ++ regulator-ramp-delay = <50>; ++ gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; ++ gpios-states = <0x1>; ++ states = <1100000 0x0 ++ 1300000 0x1>; ++ }; ++ ++ wifi_pwrseq: wifi_pwrseq { ++ compatible = "mmc-pwrseq-simple"; ++ pinctrl-names = "default"; ++ reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; ++ }; ++ ++ leds { ++ /delete-node/ pwr; ++ status { ++ label = "nanopi:red:status"; ++ gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "heartbeat"; ++ }; ++ ++ wan { ++ label = "nanopi:green:wan"; ++ gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ lan { ++ label = "nanopi:green:lan"; ++ gpios = <&pio 0 9 GPIO_ACTIVE_HIGH>; ++ }; ++ }; ++ ++ r_gpio_keys { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&sw_r_npi>; ++ ++ /delete-node/ k1; ++ reset { ++ label = "reset"; ++ linux,code = ; ++ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&cpu0 { ++ cpu-supply = <&vdd_cpux>; ++}; ++ ++&ehci1 { ++ status = "okay"; ++}; ++ ++&ehci2 { ++ status = "okay"; ++}; ++ ++&emac { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&emac_rgmii_pins>; ++ phy-supply = <®_gmac_3v3>; ++ phy-handle = <&ext_rgmii_phy>; ++ phy-mode = "rgmii"; ++ status = "okay"; ++}; ++ ++&external_mdio { ++ ext_rgmii_phy: ethernet-phy@1 { ++ compatible = "ethernet-phy-ieee802.3-c22"; ++ reg = <7>; ++ }; ++}; ++ ++&mmc1 { ++ vmmc-supply = <®_vcc3v3>; ++ vqmmc-supply = <®_vcc3v3>; ++ mmc-pwrseq = <&wifi_pwrseq>; ++ bus-width = <4>; ++ non-removable; ++ status = "okay"; ++ ++ sdio_wifi: sdio_wifi@1 { ++ reg = <1>; ++ compatible = "brcm,bcm4329-fmac"; ++ interrupt-parent = <&pio>; ++ interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; ++ interrupt-names = "host-wake"; ++ }; ++}; ++ ++&mmc2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc2_8bit_pins>; ++ vmmc-supply = <®_vcc3v3>; ++ vqmmc-supply = <®_vcc3v3>; ++ bus-width = <8>; ++ non-removable; ++ status = "okay"; ++}; ++ ++&ohci1 { ++ status = "okay"; ++}; ++ ++&ohci2 { ++ status = "okay"; ++}; ++ ++&r_pio { ++ sw_r_npi: key_pins { ++ pins = "PL3"; ++ function = "gpio_in"; ++ }; ++}; +--- /dev/null ++++ b/configs/nanopi_r1_defconfig +@@ -0,0 +1,22 @@ ++CONFIG_ARM=y ++CONFIG_ARCH_SUNXI=y ++CONFIG_SPL=y ++CONFIG_MACH_SUN8I_H3=y ++CONFIG_DRAM_CLK=408 ++CONFIG_DRAM_ZQ=3881979 ++CONFIG_DRAM_ODT_EN=y ++CONFIG_MACPWR="PD6" ++# CONFIG_VIDEO_DE2 is not set ++CONFIG_NR_DRAM_BANKS=1 ++# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set ++CONFIG_CONSOLE_MUX=y ++CONFIG_SYS_CLK_FREQ=480000000 ++# CONFIG_CMD_FLASH is not set ++# CONFIG_SPL_DOS_PARTITION is not set ++# CONFIG_SPL_EFI_PARTITION is not set ++CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-r1" ++CONFIG_SUN8I_EMAC=y ++CONFIG_USB_EHCI_HCD=y ++CONFIG_USB_OHCI_HCD=y ++CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y ++CONFIG_MMC_SUNXI_SLOT_EXTRA=2 diff --git a/package/firmware/amd64-microcode/Makefile b/package/firmware/amd64-microcode/Makefile index 4fd3d0461..cf21aba56 100644 --- a/package/firmware/amd64-microcode/Makefile +++ b/package/firmware/amd64-microcode/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=amd64-microcode -PKG_VERSION:=20180524 +PKG_VERSION:=20191218 PKG_RELEASE:=1 PKG_SOURCE:=amd64-microcode_3.$(PKG_VERSION).$(PKG_RELEASE).tar.xz PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/non-free/a/amd64-microcode/ -PKG_HASH:=7c389c357c242e7161f6872bf4e12011a71e4c0683f06fb1bcfad650a78bf0a9 +PKG_HASH:=f469b79348097c5f04641b67a39d0ee5a2a1916c9556281626c04f2275d4132d PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-3.$(PKG_VERSION).$(PKG_RELEASE) PKG_LICENSE_FILE:=LICENSE.amd-ucode diff --git a/package/firmware/ath10k-firmware/Makefile b/package/firmware/ath10k-firmware/Makefile index c427f0884..52c974e9f 100644 --- a/package/firmware/ath10k-firmware/Makefile +++ b/package/firmware/ath10k-firmware/Makefile @@ -173,9 +173,9 @@ define Package/ath10k-firmware-qca9984/install $(1)/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin endef -$(eval $(call BuildPackage,ath10k-firmware-qca9887)) +#$(eval $(call BuildPackage,ath10k-firmware-qca9887)) #$(eval $(call BuildPackage,ath10k-firmware-qca9888)) -$(eval $(call BuildPackage,ath10k-firmware-qca988x)) +#$(eval $(call BuildPackage,ath10k-firmware-qca988x)) #$(eval $(call BuildPackage,ath10k-firmware-qca99x0)) #$(eval $(call BuildPackage,ath10k-firmware-qca6174)) #$(eval $(call BuildPackage,ath10k-firmware-qca9984)) diff --git a/package/firmware/intel-microcode/Makefile b/package/firmware/intel-microcode/Makefile index de501622d..b3c3674f8 100644 --- a/package/firmware/intel-microcode/Makefile +++ b/package/firmware/intel-microcode/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=intel-microcode -PKG_VERSION:=20190918 +PKG_VERSION:=20200616 PKG_RELEASE:=1 PKG_SOURCE:=intel-microcode_3.$(PKG_VERSION).$(PKG_RELEASE).tar.xz PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/non-free/i/intel-microcode/ -PKG_HASH:=b7ecb5dd30d71e9b3c2ab184693a876171392e0d80d138c3560c662e5f2a2247 +PKG_HASH:=bcc3b81c452fe4649a948c022475d76c1cdfbb730f36749a082f412f1406a3b9 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-3.$(PKG_VERSION).$(PKG_RELEASE) PKG_BUILD_DEPENDS:=iucode-tool/host diff --git a/package/firmware/layerscape/ls-rcw/Makefile b/package/firmware/layerscape/ls-rcw/Makefile index dca0f0ff2..3853c9c3f 100644 --- a/package/firmware/layerscape/ls-rcw/Makefile +++ b/package/firmware/layerscape/ls-rcw/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ls-rcw -PKG_VERSION:=LSDK-20.04 -PKG_RELEASE:=2 +PKG_VERSION:=LSDK-20.04-update-290520 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/rcw -PKG_SOURCE_VERSION:=5689bf9c9f087f50aaa0d91b43d8a791fedbedd3 -PKG_MIRROR_HASH:=45709aa92f84fea8100b472a29762bfe69a333e6aca7a4fc4edc8cc3e10bf44e +PKG_SOURCE_VERSION:=e0fab6d9b61003caef577f7474c2fac61e6ba2ff +PKG_MIRROR_HASH:=b6bc66e27b7c6db31101fdc2e6be7255181861bd38d8f25eb5eb80c468983eb2 include $(INCLUDE_DIR)/package.mk diff --git a/package/firmware/linux-firmware/Makefile b/package/firmware/linux-firmware/Makefile index b50a02540..9acf5b5dc 100644 --- a/package/firmware/linux-firmware/Makefile +++ b/package/firmware/linux-firmware/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=linux-firmware -PKG_VERSION:=20200619 +PKG_VERSION:=20201022 PKG_RELEASE:=1 PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=962d3ae197d226c8259f9cc7746f7ef12a9d23787cd56bd27302021ba6339722 +PKG_HASH:=bf586e0beb4c65f22bf0a79811f259aa0a5a7cc9f70eebecb260525b6914cef7 PKG_MAINTAINER:=Felix Fietkau diff --git a/package/firmware/linux-firmware/marvell.mk b/package/firmware/linux-firmware/marvell.mk index 6c3f17121..78edac0ff 100644 --- a/package/firmware/linux-firmware/marvell.mk +++ b/package/firmware/linux-firmware/marvell.mk @@ -20,12 +20,14 @@ define Package/mwifiex-pcie-firmware/install endef $(eval $(call BuildPackage,mwifiex-pcie-firmware)) -Package/mwifiex-sdio-firmware = $(call Package/firmware-default,Marvell 8887 firmware) +Package/mwifiex-sdio-firmware = $(call Package/firmware-default,Marvell 8887/8997 firmware) define Package/mwifiex-sdio-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/mrvl $(INSTALL_DATA) \ $(PKG_BUILD_DIR)/mrvl/sd8887_uapsta.bin \ + $(PKG_BUILD_DIR)/mrvl/sdsd8997_combo_v4.bin \ $(1)/lib/firmware/mrvl/ + ln -s ../mrvl/sdsd8997_combo_v4.bin $(1)/lib/firmware/mrvl/sd8997_uapsta.bin endef $(eval $(call BuildPackage,mwifiex-sdio-firmware)) diff --git a/package/firmware/linux-firmware/qca_ath10k.mk b/package/firmware/linux-firmware/qca_ath10k.mk index 72735819f..a7c5b13b8 100644 --- a/package/firmware/linux-firmware/qca_ath10k.mk +++ b/package/firmware/linux-firmware/qca_ath10k.mk @@ -31,7 +31,7 @@ define Package/ath10k-firmware-qca9887/install $(PKG_BUILD_DIR)/ath10k/QCA9887/hw1.0/board.bin \ $(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin endef -# $(eval $(call BuildPackage,ath10k-firmware-qca9887)) +$(eval $(call BuildPackage,ath10k-firmware-qca9887)) Package/ath10k-firmware-qca9888 = $(call Package/firmware-default,ath10k qca9888 firmware) define Package/ath10k-firmware-qca9888/install @@ -55,7 +55,7 @@ define Package/ath10k-firmware-qca988x/install $(PKG_BUILD_DIR)/ath10k/QCA988X/hw2.0/firmware-5.bin \ $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin endef -# $(eval $(call BuildPackage,ath10k-firmware-qca988x)) +$(eval $(call BuildPackage,ath10k-firmware-qca988x)) Package/ath10k-firmware-qca6174 = $(call Package/firmware-default,ath10k qca6174 firmware) define Package/ath10k-firmware-qca6174/install diff --git a/package/kernel/linux/modules/sound.mk b/package/kernel/linux/modules/sound.mk index f975103e5..692ede30e 100644 --- a/package/kernel/linux/modules/sound.mk +++ b/package/kernel/linux/modules/sound.mk @@ -191,10 +191,10 @@ define KernelPackage/sound-soc-core KCONFIG:= \ CONFIG_SND_SOC \ CONFIG_SND_SOC_ADI=n \ - CONFIG_SND_SOC_DMAENGINE_PCM=y \ + CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y \ CONFIG_SND_SOC_ALL_CODECS=n FILES:=$(LINUX_DIR)/sound/soc/snd-soc-core.ko - AUTOLOAD:=$(call AutoLoad,55, snd-soc-core) + AUTOLOAD:=$(call AutoLoad,55,snd-soc-core) $(call AddDepends/sound) endef @@ -254,6 +254,20 @@ endef $(eval $(call KernelPackage,sound-soc-imx-sgtl5000)) +define KernelPackage/sound-soc-spdif + TITLE:=SoC S/PDIF codec support + KCONFIG:=CONFIG_SND_SOC_SPDIF + FILES:= \ + $(LINUX_DIR)/sound/soc/codecs/snd-soc-spdif-tx.ko \ + $(LINUX_DIR)/sound/soc/codecs/snd-soc-spdif-rx.ko + DEPENDS:=+kmod-sound-soc-core + AUTOLOAD:=$(call AutoProbe,snd-soc-spdif-tx snd-soc-spdif-rx) + $(call AddDepends/sound) +endef + +$(eval $(call KernelPackage,sound-soc-spdif)) + + define KernelPackage/pcspkr DEPENDS:=@TARGET_x86 +kmod-input-core TITLE:=PC speaker support diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index 8d6e953f1..92adf67ca 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -34,6 +34,7 @@ drv_mac80211_init_device_config() { config_add_boolean noscan ht_coex acs_exclude_dfs config_add_array ht_capab config_add_array channels + config_add_array scan_list config_add_boolean \ rxldpc \ short_gi_80 \ @@ -897,6 +898,7 @@ drv_mac80211_setup() { rxantenna txantenna \ frag rts beacon_int:100 htmode json_get_values basic_rate_list basic_rate + json_get_values scan_list scan_list json_select .. find_phy || { diff --git a/package/kernel/mac80211/patches/rt2x00/990-rt2x00-mt7620-introduce-accessors-for-CHIP_VER-register.patch b/package/kernel/mac80211/patches/rt2x00/990-rt2x00-mt7620-introduce-accessors-for-CHIP_VER-register.patch new file mode 100644 index 000000000..76114fe9a --- /dev/null +++ b/package/kernel/mac80211/patches/rt2x00/990-rt2x00-mt7620-introduce-accessors-for-CHIP_VER-register.patch @@ -0,0 +1,139 @@ +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.h ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.h +@@ -78,6 +78,9 @@ struct rt2800_ops { + int (*drv_init_registers)(struct rt2x00_dev *rt2x00dev); + __le32 *(*drv_get_txwi)(struct queue_entry *entry); + unsigned int (*drv_get_dma_done)(struct data_queue *queue); ++ int (*hw_get_chippkg)(void); ++ int (*hw_get_chipver)(void); ++ int (*hw_get_chipeco)(void); + }; + + static inline u32 rt2800_register_read(struct rt2x00_dev *rt2x00dev, +@@ -195,6 +198,27 @@ static inline unsigned int rt2800_drv_ge + return rt2800ops->drv_get_dma_done(queue); + } + ++static inline int rt2800_hw_get_chippkg(struct rt2x00_dev *rt2x00dev) ++{ ++ const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; ++ ++ return rt2800ops->hw_get_chippkg(); ++} ++ ++static inline int rt2800_hw_get_chipver(struct rt2x00_dev *rt2x00dev) ++{ ++ const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; ++ ++ return rt2800ops->hw_get_chipver(); ++} ++ ++static inline int rt2800_hw_get_chipeco(struct rt2x00_dev *rt2x00dev) ++{ ++ const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; ++ ++ return rt2800ops->hw_get_chipeco(); ++} ++ + void rt2800_mcu_request(struct rt2x00_dev *rt2x00dev, + const u8 command, const u8 token, + const u8 arg0, const u8 arg1); +--- a/drivers/net/wireless/ralink/rt2x00/rt2800pci.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800pci.c +@@ -286,6 +286,10 @@ static int rt2800pci_read_eeprom(struct + return retval; + } + ++static int rt2800pci_get_chippkg(void) { return 0; } ++static int rt2800pci_get_chipver(void) { return 0; } ++static int rt2800pci_get_chipeco(void) { return 0; } ++ + static const struct ieee80211_ops rt2800pci_mac80211_ops = { + .tx = rt2x00mac_tx, + .start = rt2x00mac_start, +@@ -328,6 +332,9 @@ static const struct rt2800_ops rt2800pci + .drv_init_registers = rt2800mmio_init_registers, + .drv_get_txwi = rt2800mmio_get_txwi, + .drv_get_dma_done = rt2800mmio_get_dma_done, ++ .hw_get_chippkg = rt2800pci_get_chippkg, ++ .hw_get_chipver = rt2800pci_get_chipver, ++ .hw_get_chipeco = rt2800pci_get_chipeco, + }; + + static const struct rt2x00lib_ops rt2800pci_rt2x00_ops = { +--- a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c +@@ -27,6 +27,12 @@ + #include "rt2800lib.h" + #include "rt2800mmio.h" + ++/* Needed to probe CHIP_VER register on MT7620 */ ++#ifdef CONFIG_SOC_MT7620 ++#include ++#include ++#endif ++ + /* Allow hardware encryption to be disabled. */ + static bool modparam_nohwcrypt; + module_param_named(nohwcrypt, modparam_nohwcrypt, bool, 0444); +@@ -118,6 +124,27 @@ static int rt2800soc_write_firmware(stru + return 0; + } + ++#ifdef CONFIG_SOC_MT7620 ++static int rt2800soc_get_chippkg(void) ++{ ++ return mt7620_get_pkg(); ++} ++ ++static int rt2800soc_get_chipver(void) ++{ ++ return mt7620_get_chipver(); ++} ++ ++static int rt2800soc_get_chipeco(void) ++{ ++ return mt7620_get_eco(); ++} ++#else ++static int rt2800soc_get_chippkg(void) { return 0; } ++static int rt2800soc_get_chipver(void) { return 0; } ++static int rt2800soc_get_chipeco(void) { return 0; } ++#endif ++ + static const struct ieee80211_ops rt2800soc_mac80211_ops = { + .tx = rt2x00mac_tx, + .start = rt2x00mac_start, +@@ -159,6 +186,9 @@ static const struct rt2800_ops rt2800soc + .drv_init_registers = rt2800mmio_init_registers, + .drv_get_txwi = rt2800mmio_get_txwi, + .drv_get_dma_done = rt2800mmio_get_dma_done, ++ .hw_get_chippkg = rt2800soc_get_chippkg, ++ .hw_get_chipver = rt2800soc_get_chipver, ++ .hw_get_chipeco = rt2800soc_get_chipeco, + }; + + static const struct rt2x00lib_ops rt2800soc_rt2x00_ops = { +--- a/drivers/net/wireless/ralink/rt2x00/rt2800usb.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800usb.c +@@ -628,6 +628,10 @@ static int rt2800usb_probe_hw(struct rt2 + return 0; + } + ++static int rt2800usb_get_chippkg(void) { return 0; } ++static int rt2800usb_get_chipver(void) { return 0; } ++static int rt2800usb_get_chipeco(void) { return 0; } ++ + static const struct ieee80211_ops rt2800usb_mac80211_ops = { + .tx = rt2x00mac_tx, + .start = rt2x00mac_start, +@@ -671,6 +675,9 @@ static const struct rt2800_ops rt2800usb + .drv_init_registers = rt2800usb_init_registers, + .drv_get_txwi = rt2800usb_get_txwi, + .drv_get_dma_done = rt2800usb_get_dma_done, ++ .hw_get_chippkg = rt2800usb_get_chippkg, ++ .hw_get_chipver = rt2800usb_get_chipver, ++ .hw_get_chipeco = rt2800usb_get_chipeco, + }; + + static const struct rt2x00lib_ops rt2800usb_rt2x00_ops = { diff --git a/package/kernel/mac80211/patches/rt2x00/991-rt2x00-mt7620-differentiate-based-on-SoC-CHIP_VER.patch b/package/kernel/mac80211/patches/rt2x00/991-rt2x00-mt7620-differentiate-based-on-SoC-CHIP_VER.patch new file mode 100644 index 000000000..3de00b226 --- /dev/null +++ b/package/kernel/mac80211/patches/rt2x00/991-rt2x00-mt7620-differentiate-based-on-SoC-CHIP_VER.patch @@ -0,0 +1,408 @@ +--- a/drivers/net/wireless/ralink/rt2x00/rt2800.h ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800.h +@@ -1042,6 +1042,11 @@ + #define MIMO_PS_CFG_RX_STBY_POL FIELD32(0x00000010) + #define MIMO_PS_CFG_RX_RX_STBY0 FIELD32(0x00000020) + ++#define BB_PA_MODE_CFG0 0x1214 ++#define BB_PA_MODE_CFG1 0x1218 ++#define RF_PA_MODE_CFG0 0x121C ++#define RF_PA_MODE_CFG1 0x1220 ++ + /* + * EDCA_AC0_CFG: + */ +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -3685,14 +3685,16 @@ static void rt2800_config_channel_rf7620 + rt2x00_set_field8(&rfcsr, RFCSR19_K, rf->rf4); + rt2800_rfcsr_write(rt2x00dev, 19, rfcsr); + +- /* Default: XO=20MHz , SDM mode */ +- rfcsr = rt2800_rfcsr_read(rt2x00dev, 16); +- rt2x00_set_field8(&rfcsr, RFCSR16_SDM_MODE_MT7620, 0x80); +- rt2800_rfcsr_write(rt2x00dev, 16, rfcsr); +- +- rfcsr = rt2800_rfcsr_read(rt2x00dev, 21); +- rt2x00_set_field8(&rfcsr, RFCSR21_BIT8, 1); +- rt2800_rfcsr_write(rt2x00dev, 21, rfcsr); ++ if (rt2800_hw_get_chipver(rt2x00dev) > 1) { ++ /* Default: XO=20MHz , SDM mode */ ++ rfcsr = rt2800_rfcsr_read(rt2x00dev, 16); ++ rt2x00_set_field8(&rfcsr, RFCSR16_SDM_MODE_MT7620, 0x80); ++ rt2800_rfcsr_write(rt2x00dev, 16, rfcsr); ++ ++ rfcsr = rt2800_rfcsr_read(rt2x00dev, 21); ++ rt2x00_set_field8(&rfcsr, RFCSR21_BIT8, 1); ++ rt2800_rfcsr_write(rt2x00dev, 21, rfcsr); ++ } + + rfcsr = rt2800_rfcsr_read(rt2x00dev, 1); + rt2x00_set_field8(&rfcsr, RFCSR1_TX2_EN_MT7620, +@@ -3726,18 +3728,23 @@ static void rt2800_config_channel_rf7620 + rt2800_rfcsr_write_dccal(rt2x00dev, 59, 0x20); + } + +- if (conf_is_ht40(conf)) { +- rt2800_rfcsr_write_dccal(rt2x00dev, 58, 0x08); +- rt2800_rfcsr_write_dccal(rt2x00dev, 59, 0x08); +- } else { +- rt2800_rfcsr_write_dccal(rt2x00dev, 58, 0x28); +- rt2800_rfcsr_write_dccal(rt2x00dev, 59, 0x28); ++ if (rt2800_hw_get_chipver(rt2x00dev) > 1) { ++ if (conf_is_ht40(conf)) { ++ rt2800_rfcsr_write_dccal(rt2x00dev, 58, 0x08); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 59, 0x08); ++ } else { ++ rt2800_rfcsr_write_dccal(rt2x00dev, 58, 0x28); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 59, 0x28); ++ } + } + +- rfcsr = rt2800_rfcsr_read(rt2x00dev, 28); +- rt2x00_set_field8(&rfcsr, RFCSR28_CH11_HT40, +- conf_is_ht40(conf) && (rf->channel == 11)); +- rt2800_rfcsr_write(rt2x00dev, 28, rfcsr); ++ if (rt2800_hw_get_chipver(rt2x00dev) > 1 && ++ rt2800_hw_get_chipeco(rt2x00dev) == 2) { ++ rfcsr = rt2800_rfcsr_read(rt2x00dev, 28); ++ rt2x00_set_field8(&rfcsr, RFCSR28_CH11_HT40, ++ conf_is_ht40(conf) && (rf->channel == 11)); ++ rt2800_rfcsr_write(rt2x00dev, 28, rfcsr); ++ } + + if (!test_bit(DEVICE_STATE_SCANNING, &rt2x00dev->flags)) { + if (conf_is_ht40(conf)) { +@@ -3837,25 +3844,29 @@ static void rt2800_config_alc(struct rt2 + if (i == 10000) + rt2x00_warn(rt2x00dev, "Wait MAC Status to MAX !!!\n"); + +- if (chan->center_freq > 2457) { +- bbp = rt2800_bbp_read(rt2x00dev, 30); +- bbp = 0x40; +- rt2800_bbp_write(rt2x00dev, 30, bbp); +- rt2800_rfcsr_write(rt2x00dev, 39, 0); +- if (rt2x00_has_cap_external_lna_bg(rt2x00dev)) +- rt2800_rfcsr_write(rt2x00dev, 42, 0xfb); +- else +- rt2800_rfcsr_write(rt2x00dev, 42, 0x7b); +- } else { +- bbp = rt2800_bbp_read(rt2x00dev, 30); +- bbp = 0x1f; +- rt2800_bbp_write(rt2x00dev, 30, bbp); +- rt2800_rfcsr_write(rt2x00dev, 39, 0x80); +- if (rt2x00_has_cap_external_lna_bg(rt2x00dev)) +- rt2800_rfcsr_write(rt2x00dev, 42, 0xdb); +- else +- rt2800_rfcsr_write(rt2x00dev, 42, 0x5b); ++ if (rt2800_hw_get_chipver(rt2x00dev) > 1 && ++ rt2800_hw_get_chipeco(rt2x00dev) >= 2) { ++ if (chan->center_freq > 2457) { ++ bbp = rt2800_bbp_read(rt2x00dev, 30); ++ bbp = 0x40; ++ rt2800_bbp_write(rt2x00dev, 30, bbp); ++ rt2800_rfcsr_write(rt2x00dev, 39, 0); ++ if (rt2x00_has_cap_external_lna_bg(rt2x00dev)) ++ rt2800_rfcsr_write(rt2x00dev, 42, 0xfb); ++ else ++ rt2800_rfcsr_write(rt2x00dev, 42, 0x7b); ++ } else { ++ bbp = rt2800_bbp_read(rt2x00dev, 30); ++ bbp = 0x1f; ++ rt2800_bbp_write(rt2x00dev, 30, bbp); ++ rt2800_rfcsr_write(rt2x00dev, 39, 0x80); ++ if (rt2x00_has_cap_external_lna_bg(rt2x00dev)) ++ rt2800_rfcsr_write(rt2x00dev, 42, 0xdb); ++ else ++ rt2800_rfcsr_write(rt2x00dev, 42, 0x5b); ++ } + } ++ + rt2800_register_write(rt2x00dev, MAC_SYS_CTRL, mac_sys_ctrl); + + rt2800_vco_calibration(rt2x00dev); +@@ -5887,18 +5898,33 @@ static int rt2800_init_registers(struct + } else if (rt2x00_rt(rt2x00dev, RT5350)) { + rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404); + } else if (rt2x00_rt(rt2x00dev, RT6352)) { +- rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000401); +- rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x000C0000); +- rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000); +- rt2800_register_write(rt2x00dev, TX_ALC_VGA3, 0x00000000); +- rt2800_register_write(rt2x00dev, TX0_BB_GAIN_ATTEN, 0x0); +- rt2800_register_write(rt2x00dev, TX1_BB_GAIN_ATTEN, 0x0); +- rt2800_register_write(rt2x00dev, TX0_RF_GAIN_ATTEN, 0x6C6C666C); +- rt2800_register_write(rt2x00dev, TX1_RF_GAIN_ATTEN, 0x6C6C666C); +- rt2800_register_write(rt2x00dev, TX0_RF_GAIN_CORRECT, +- 0x3630363A); +- rt2800_register_write(rt2x00dev, TX1_RF_GAIN_CORRECT, +- 0x3630363A); ++ if (rt2800_hw_get_chipver(rt2x00dev) <= 1) { ++ rt2800_register_write(rt2x00dev, TX_ALC_VGA3, ++ 0x00000000); ++ rt2800_register_write(rt2x00dev, BB_PA_MODE_CFG0, ++ 0x000055FF); ++ rt2800_register_write(rt2x00dev, BB_PA_MODE_CFG1, ++ 0x00550055); ++ rt2800_register_write(rt2x00dev, RF_PA_MODE_CFG0, ++ 0x000055FF); ++ rt2800_register_write(rt2x00dev, RF_PA_MODE_CFG1, ++ 0x00550055); ++ } else { ++ rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000401); ++ rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x000C0000); ++ rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000); ++ rt2800_register_write(rt2x00dev, TX_ALC_VGA3, 0x00000000); ++ rt2800_register_write(rt2x00dev, TX0_BB_GAIN_ATTEN, 0x0); ++ rt2800_register_write(rt2x00dev, TX1_BB_GAIN_ATTEN, 0x0); ++ rt2800_register_write(rt2x00dev, TX0_RF_GAIN_ATTEN, ++ 0x6C6C666C); ++ rt2800_register_write(rt2x00dev, TX1_RF_GAIN_ATTEN, ++ 0x6C6C666C); ++ rt2800_register_write(rt2x00dev, TX0_RF_GAIN_CORRECT, ++ 0x3630363A); ++ rt2800_register_write(rt2x00dev, TX1_RF_GAIN_CORRECT, ++ 0x3630363A); ++ } + reg = rt2800_register_read(rt2x00dev, TX_ALC_CFG_1); + rt2x00_set_field32(®, TX_ALC_CFG_1_ROS_BUSY_EN, 0); + rt2800_register_write(rt2x00dev, TX_ALC_CFG_1, reg); +@@ -7042,14 +7068,16 @@ static void rt2800_init_bbp_6352(struct + rt2800_bbp_write(rt2x00dev, 188, 0x00); + rt2800_bbp_write(rt2x00dev, 189, 0x00); + +- rt2800_bbp_write(rt2x00dev, 91, 0x06); +- rt2800_bbp_write(rt2x00dev, 92, 0x04); +- rt2800_bbp_write(rt2x00dev, 93, 0x54); +- rt2800_bbp_write(rt2x00dev, 99, 0x50); +- rt2800_bbp_write(rt2x00dev, 148, 0x84); +- rt2800_bbp_write(rt2x00dev, 167, 0x80); +- rt2800_bbp_write(rt2x00dev, 178, 0xFF); +- rt2800_bbp_write(rt2x00dev, 106, 0x13); ++ if (rt2800_hw_get_chipver(rt2x00dev) > 1) { ++ rt2800_bbp_write(rt2x00dev, 91, 0x06); ++ rt2800_bbp_write(rt2x00dev, 92, 0x04); ++ rt2800_bbp_write(rt2x00dev, 93, 0x54); ++ rt2800_bbp_write(rt2x00dev, 99, 0x50); ++ rt2800_bbp_write(rt2x00dev, 148, 0x84); ++ rt2800_bbp_write(rt2x00dev, 167, 0x80); ++ rt2800_bbp_write(rt2x00dev, 178, 0xFF); ++ rt2800_bbp_write(rt2x00dev, 106, 0x13); ++ } + + /* BBP for G band GLRT function (BBP_128 ~ BBP_221) */ + rt2800_bbp_glrt_write(rt2x00dev, 0, 0x00); +@@ -10388,31 +10416,36 @@ static void rt2800_init_rfcsr_6352(struc + rt2800_rfcsr_write(rt2x00dev, 42, 0x5B); + rt2800_rfcsr_write(rt2x00dev, 43, 0x00); + +- rt2800_rfcsr_write(rt2x00dev, 11, 0x21); +- if (rt2800_clk_is_20mhz(rt2x00dev)) +- rt2800_rfcsr_write(rt2x00dev, 13, 0x03); +- else +- rt2800_rfcsr_write(rt2x00dev, 13, 0x00); +- rt2800_rfcsr_write(rt2x00dev, 14, 0x7C); +- rt2800_rfcsr_write(rt2x00dev, 16, 0x80); +- rt2800_rfcsr_write(rt2x00dev, 17, 0x99); +- rt2800_rfcsr_write(rt2x00dev, 18, 0x99); +- rt2800_rfcsr_write(rt2x00dev, 19, 0x09); +- rt2800_rfcsr_write(rt2x00dev, 20, 0x50); +- rt2800_rfcsr_write(rt2x00dev, 21, 0xB0); +- rt2800_rfcsr_write(rt2x00dev, 22, 0x00); +- rt2800_rfcsr_write(rt2x00dev, 23, 0x06); +- rt2800_rfcsr_write(rt2x00dev, 24, 0x00); +- rt2800_rfcsr_write(rt2x00dev, 25, 0x00); +- rt2800_rfcsr_write(rt2x00dev, 26, 0x5D); +- rt2800_rfcsr_write(rt2x00dev, 27, 0x00); +- rt2800_rfcsr_write(rt2x00dev, 28, 0x61); +- rt2800_rfcsr_write(rt2x00dev, 29, 0xB5); +- rt2800_rfcsr_write(rt2x00dev, 43, 0x02); +- +- rt2800_rfcsr_write(rt2x00dev, 28, 0x62); +- rt2800_rfcsr_write(rt2x00dev, 29, 0xAD); +- rt2800_rfcsr_write(rt2x00dev, 39, 0x80); ++ if (rt2800_hw_get_chipver(rt2x00dev) > 1) { ++ rt2800_rfcsr_write(rt2x00dev, 11, 0x21); ++ if (rt2800_clk_is_20mhz(rt2x00dev)) ++ rt2800_rfcsr_write(rt2x00dev, 13, 0x03); ++ else ++ rt2800_rfcsr_write(rt2x00dev, 13, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 14, 0x7C); ++ rt2800_rfcsr_write(rt2x00dev, 16, 0x80); ++ rt2800_rfcsr_write(rt2x00dev, 17, 0x99); ++ rt2800_rfcsr_write(rt2x00dev, 18, 0x99); ++ rt2800_rfcsr_write(rt2x00dev, 19, 0x09); ++ rt2800_rfcsr_write(rt2x00dev, 20, 0x50); ++ rt2800_rfcsr_write(rt2x00dev, 21, 0xB0); ++ rt2800_rfcsr_write(rt2x00dev, 22, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 23, 0x06); ++ rt2800_rfcsr_write(rt2x00dev, 24, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 25, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 26, 0x5D); ++ rt2800_rfcsr_write(rt2x00dev, 27, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 28, 0x61); ++ rt2800_rfcsr_write(rt2x00dev, 29, 0xB5); ++ rt2800_rfcsr_write(rt2x00dev, 43, 0x02); ++ } ++ ++ if (rt2800_hw_get_chipver(rt2x00dev) > 1 && ++ rt2800_hw_get_chipeco(rt2x00dev) >= 2) { ++ rt2800_rfcsr_write(rt2x00dev, 28, 0x62); ++ rt2800_rfcsr_write(rt2x00dev, 29, 0xAD); ++ rt2800_rfcsr_write(rt2x00dev, 39, 0x80); ++ } + + /* Initialize RF channel register to default value */ + rt2800_rfcsr_write_chanreg(rt2x00dev, 0, 0x03); +@@ -10478,63 +10511,71 @@ static void rt2800_init_rfcsr_6352(struc + + rt2800_rfcsr_write_bank(rt2x00dev, 6, 45, 0xC5); + +- rt2800_rfcsr_write_chanreg(rt2x00dev, 9, 0x47); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 10, 0x71); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 11, 0x33); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x0E); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 17, 0x23); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 19, 0xA4); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 20, 0x02); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 21, 0x12); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 28, 0x1C); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 29, 0xEB); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 32, 0x7D); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 34, 0xD6); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 36, 0x08); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 38, 0xB4); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 43, 0xD3); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 44, 0xB3); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 45, 0xD5); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 46, 0x27); +- rt2800_rfcsr_write_bank(rt2x00dev, 4, 47, 0x67); +- rt2800_rfcsr_write_bank(rt2x00dev, 6, 47, 0x69); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 48, 0xFF); +- rt2800_rfcsr_write_bank(rt2x00dev, 4, 54, 0x27); +- rt2800_rfcsr_write_bank(rt2x00dev, 6, 54, 0x20); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x66); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 56, 0xFF); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 57, 0x1C); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 58, 0x20); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 59, 0x6B); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 60, 0xF7); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 61, 0x09); +- +- rt2800_rfcsr_write_chanreg(rt2x00dev, 10, 0x51); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x06); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 19, 0xA7); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 28, 0x2C); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x64); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 8, 0x51); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 9, 0x36); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 11, 0x53); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x16); +- +- rt2800_rfcsr_write_chanreg(rt2x00dev, 47, 0x6C); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 48, 0xFC); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 49, 0x1F); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 54, 0x27); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x66); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 59, 0x6B); +- +- /* Initialize RF channel register for DRQFN */ +- rt2800_rfcsr_write_chanreg(rt2x00dev, 43, 0xD3); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 44, 0xE3); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 45, 0xE5); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 47, 0x28); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x68); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 56, 0xF7); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 58, 0x02); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 60, 0xC7); ++ if (rt2800_hw_get_chipver(rt2x00dev) > 1) { ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 9, 0x47); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 10, 0x71); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 11, 0x33); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x0E); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 17, 0x23); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 19, 0xA4); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 20, 0x02); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 21, 0x12); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 28, 0x1C); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 29, 0xEB); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 32, 0x7D); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 34, 0xD6); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 36, 0x08); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 38, 0xB4); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 43, 0xD3); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 44, 0xB3); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 45, 0xD5); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 46, 0x27); ++ rt2800_rfcsr_write_bank(rt2x00dev, 4, 47, 0x67); ++ rt2800_rfcsr_write_bank(rt2x00dev, 6, 47, 0x69); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 48, 0xFF); ++ rt2800_rfcsr_write_bank(rt2x00dev, 4, 54, 0x27); ++ rt2800_rfcsr_write_bank(rt2x00dev, 6, 54, 0x20); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x66); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 56, 0xFF); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 57, 0x1C); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 58, 0x20); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 59, 0x6B); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 60, 0xF7); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 61, 0x09); ++ } ++ ++ if (rt2800_hw_get_chipver(rt2x00dev) > 1 && ++ rt2800_hw_get_chipeco(rt2x00dev) >= 2) { ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 10, 0x51); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x06); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 19, 0xA7); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 28, 0x2C); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x64); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 8, 0x51); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 9, 0x36); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 11, 0x53); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x16); ++ ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 47, 0x6C); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 48, 0xFC); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 49, 0x1F); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 54, 0x27); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x66); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 59, 0x6B); ++ } ++ ++ if (rt2800_hw_get_chippkg(rt2x00dev) == 0 && ++ rt2800_hw_get_chipver(rt2x00dev) == 1) { ++ /* Initialize RF channel register for DRQFN */ ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 43, 0xD3); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 44, 0xE3); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 45, 0xE5); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 47, 0x28); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x68); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 56, 0xF7); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 58, 0x02); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 60, 0xC7); ++ } + + /* Initialize RF DC calibration register to default value */ + rt2800_rfcsr_write_dccal(rt2x00dev, 0, 0x47); +@@ -10597,12 +10638,17 @@ static void rt2800_init_rfcsr_6352(struc + rt2800_rfcsr_write_dccal(rt2x00dev, 62, 0x00); + rt2800_rfcsr_write_dccal(rt2x00dev, 63, 0x00); + +- rt2800_rfcsr_write_dccal(rt2x00dev, 3, 0x08); +- rt2800_rfcsr_write_dccal(rt2x00dev, 4, 0x04); +- rt2800_rfcsr_write_dccal(rt2x00dev, 5, 0x20); ++ if (rt2800_hw_get_chipver(rt2x00dev) > 1) { ++ rt2800_rfcsr_write_dccal(rt2x00dev, 3, 0x08); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 4, 0x04); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 5, 0x20); ++ } + +- rt2800_rfcsr_write_dccal(rt2x00dev, 5, 0x00); +- rt2800_rfcsr_write_dccal(rt2x00dev, 17, 0x7C); ++ if (rt2800_hw_get_chipver(rt2x00dev) > 1 && ++ rt2800_hw_get_chipeco(rt2x00dev) >= 2) { ++ rt2800_rfcsr_write_dccal(rt2x00dev, 5, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 17, 0x7C); ++ } + + rt2800_r_calibration(rt2x00dev); + rt2800_rf_self_txdc_cal(rt2x00dev); diff --git a/package/kernel/mac80211/patches/subsys/072-backports-add-sched_set_fifo_low.patch b/package/kernel/mac80211/patches/subsys/072-backports-add-sched_set_fifo_low.patch new file mode 100644 index 000000000..9b266ffcb --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/072-backports-add-sched_set_fifo_low.patch @@ -0,0 +1,32 @@ +From: Felix Fietkau +Date: Mon, 28 Sep 2020 08:35:28 +0200 +Subject: [PATCH] backports: add sched_set_fifo_low + +It is needed for mt76 + +Signed-off-by: Felix Fietkau +--- + create mode 100644 backport/backport-include/linux/sched.h + +--- /dev/null ++++ b/backport-include/linux/sched.h +@@ -0,0 +1,19 @@ ++#ifndef __BACKPORT_LINUX_SCHED_H ++#define __BACKPORT_LINUX_SCHED_H ++ ++#include_next ++#include ++ ++#if LINUX_VERSION_IS_LESS(5,9,0) ++#include ++ ++static inline void sched_set_fifo_low(struct task_struct *p) ++{ ++ struct sched_param sparam = {.sched_priority = 1}; ++ ++ sched_setscheduler(p, SCHED_FIFO, &sparam); ++} ++ ++#endif ++ ++#endif diff --git a/package/kernel/mac80211/patches/subsys/332-mac80211-fix-regression-in-sta-connection-monitor.patch b/package/kernel/mac80211/patches/subsys/332-mac80211-fix-regression-in-sta-connection-monitor.patch index 72b6ed56c..cff8045c0 100644 --- a/package/kernel/mac80211/patches/subsys/332-mac80211-fix-regression-in-sta-connection-monitor.patch +++ b/package/kernel/mac80211/patches/subsys/332-mac80211-fix-regression-in-sta-connection-monitor.patch @@ -13,7 +13,18 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/status.c +++ b/net/mac80211/status.c -@@ -1129,6 +1129,8 @@ void ieee80211_tx_status_ext(struct ieee +@@ -991,10 +991,6 @@ static void __ieee80211_tx_status(struct + if (!(info->flags & IEEE80211_TX_CTL_INJECTED) && acked) + ieee80211_frame_acked(sta, skb); + +- if ((sta->sdata->vif.type == NL80211_IFTYPE_STATION) && +- ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) +- ieee80211_sta_tx_notify(sta->sdata, (void *) skb->data, +- acked, info->status.tx_time); + } + + /* SNMP counters +@@ -1129,11 +1125,18 @@ void ieee80211_tx_status_ext(struct ieee noack_success = !!(info->flags & IEEE80211_TX_STAT_NOACK_TRANSMITTED); if (pubsta) { @@ -22,17 +33,38 @@ Signed-off-by: Felix Fietkau if (!acked && !noack_success) sta->status_stats.retry_failed++; sta->status_stats.retry_count += retry_count; -@@ -1143,6 +1145,13 @@ void ieee80211_tx_status_ext(struct ieee + + if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) { ++ if (sdata->vif.type == NL80211_IFTYPE_STATION && ++ skb && !(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP)) ++ ieee80211_sta_tx_notify(sdata, (void *) skb->data, ++ acked, info->status.tx_time); ++ + if (acked) { + sta->status_stats.last_ack = jiffies; + +@@ -1143,6 +1146,11 @@ void ieee80211_tx_status_ext(struct ieee /* Track when last packet was ACKed */ sta->status_stats.last_pkt_time = jiffies; + /* Reset connection monitor */ + if (sdata->vif.type == NL80211_IFTYPE_STATION && -+ unlikely(sdata->u.mgd.probe_send_count > 0)) { ++ unlikely(sdata->u.mgd.probe_send_count > 0)) + sdata->u.mgd.probe_send_count = 0; -+ ieee80211_queue_work(&local->hw, &sdata->work); -+ } + if (info->status.is_valid_ack_signal) { sta->status_stats.last_ack_signal = (s8)info->status.ack_signal; +--- a/net/mac80211/mlme.c ++++ b/net/mac80211/mlme.c +@@ -2508,7 +2508,9 @@ void ieee80211_sta_tx_notify(struct ieee + !sdata->u.mgd.probe_send_count) + return; + +- if (!ack) ++ if (ack) ++ sdata->u.mgd.probe_send_count = 0; ++ else + sdata->u.mgd.nullfunc_failed = true; + ieee80211_queue_work(&sdata->local->hw, &sdata->work); + } diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 3b39b77ba..1277c6db8 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2020-08-25 -PKG_SOURCE_VERSION:=b36d7ae096a3d8c7d6a8a246f2e8a471a467041e -PKG_MIRROR_HASH:=da35e999f1bd50ce7061125ccb976129c8485e3593521206831380846953d3cf +PKG_SOURCE_DATE:=2020-09-23 +PKG_SOURCE_VERSION:=b22977c2727db7fea8d487573edb3aa668d8309d +PKG_MIRROR_HASH:=4182823ec5a97d842e7404b3c8139de8af4f35948008890d50e4dad95add996b PKG_MAINTAINER:=Felix Fietkau PKG_BUILD_PARALLEL:=1 diff --git a/package/kernel/nat46/Makefile b/package/kernel/nat46/Makefile index f37ee6e39..dd9d606d2 100644 --- a/package/kernel/nat46/Makefile +++ b/package/kernel/nat46/Makefile @@ -5,9 +5,9 @@ PKG_NAME:=nat46 PKG_MIRROR_HASH:=d0bc80038cadeb7e857118e8d6bae242670ab27377af49f74bad494e0e5da598 PKG_SOURCE_URL:=https://github.com/ayourtch/nat46.git -PKG_SOURCE_DATE:=2020-08-06 +PKG_SOURCE_DATE:=2020-08-17 PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=71e9f0941a666c7010bb6d31d45bb795439038fa +PKG_SOURCE_VERSION:=362640b41ae52b732d9e9729e61ac555492442a3 PKG_MAINTAINER:=Hans Dedecker PKG_LICENSE:=GPL-2.0 diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index d45c976f7..c2ecd2767 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -898,6 +898,7 @@ wpa_supplicant_prepare_interface() { fi wpa_supplicant_teardown_interface "$ifname" cat > "$_config" < #include "xhci.h" #include "xhci-trace.h" -@@ -60,6 +62,44 @@ +@@ -62,6 +64,44 @@ #define PCI_DEVICE_ID_ASMEDIA_1142_XHCI 0x1242 #define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142 @@ -93,7 +93,7 @@ Signed-off-by: Vinod Koul static const char hcd_name[] = "xhci_hcd"; static struct hc_driver __read_mostly xhci_pci_hc_driver; -@@ -291,6 +331,873 @@ static void xhci_pme_acpi_rtd3_enable(st +@@ -296,6 +336,873 @@ static void xhci_pme_acpi_rtd3_enable(st static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { } #endif /* CONFIG_ACPI */ @@ -967,7 +967,7 @@ Signed-off-by: Vinod Koul /* called during probe() after chip reset completes */ static int xhci_pci_setup(struct usb_hcd *hcd) { -@@ -332,6 +1239,27 @@ static int xhci_pci_probe(struct pci_dev +@@ -337,6 +1244,27 @@ static int xhci_pci_probe(struct pci_dev struct hc_driver *driver; struct usb_hcd *hcd; @@ -995,7 +995,7 @@ Signed-off-by: Vinod Koul driver = (struct hc_driver *)id->driver_data; /* Prevent runtime suspending between USB-2 and USB-3 initialization */ -@@ -393,6 +1321,16 @@ static void xhci_pci_remove(struct pci_d +@@ -398,6 +1326,16 @@ static void xhci_pci_remove(struct pci_d { struct xhci_hcd *xhci; @@ -1012,7 +1012,7 @@ Signed-off-by: Vinod Koul xhci = hcd_to_xhci(pci_get_drvdata(dev)); xhci->xhc_state |= XHCI_STATE_REMOVING; -@@ -520,6 +1458,11 @@ static int xhci_pci_resume(struct usb_hc +@@ -537,6 +1475,11 @@ static int xhci_pci_resume(struct usb_hc if (pdev->vendor == PCI_VENDOR_ID_INTEL) usb_enable_intel_xhci_ports(pdev); diff --git a/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch index 02c9bcb2b..be32823fe 100644 --- a/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch +++ b/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch @@ -13,7 +13,7 @@ produce a noisy warning. --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -278,6 +278,7 @@ static void xhci_pci_quirks(struct devic +@@ -283,6 +283,7 @@ static void xhci_pci_quirks(struct devic pdev->device == 0x0015) { xhci->quirks |= XHCI_RESET_ON_RESUME; xhci->quirks |= XHCI_ZERO_64B_REGS; @@ -43,7 +43,7 @@ produce a noisy warning. hcd->msi_enabled = 1; --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1880,6 +1880,7 @@ struct xhci_hcd { +@@ -1881,6 +1881,7 @@ struct xhci_hcd { struct xhci_hub usb2_rhub; struct xhci_hub usb3_rhub; /* support xHCI 1.0 spec USB2 hardware LPM */ diff --git a/target/linux/ath79/patches-5.4/0061-tty-serial-ar933x-uart-rs485-gpio.patch b/target/linux/ath79/patches-5.4/0061-tty-serial-ar933x-uart-rs485-gpio.patch index e27c0854f..fda91bfe7 100644 --- a/target/linux/ath79/patches-5.4/0061-tty-serial-ar933x-uart-rs485-gpio.patch +++ b/target/linux/ath79/patches-5.4/0061-tty-serial-ar933x-uart-rs485-gpio.patch @@ -34,7 +34,7 @@ v2: use bool to indicate ongoing half-duplex send, use it afterwards --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig -@@ -1279,6 +1279,7 @@ config SERIAL_AR933X +@@ -1280,6 +1280,7 @@ config SERIAL_AR933X tristate "AR933X serial port support" depends on HAVE_CLK && ATH79 select SERIAL_CORE diff --git a/target/linux/bcm27xx/patches-5.4/950-0018-Register-the-clocks-early-during-the-boot-process-so.patch b/target/linux/bcm27xx/patches-5.4/950-0018-Register-the-clocks-early-during-the-boot-process-so.patch index 322be7bc5..64b984802 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0018-Register-the-clocks-early-during-the-boot-process-so.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0018-Register-the-clocks-early-during-the-boot-process-so.patch @@ -13,7 +13,7 @@ Signed-off-by: Martin Sperl --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -2265,8 +2265,15 @@ static int bcm2835_clk_probe(struct plat +@@ -2267,8 +2267,15 @@ static int bcm2835_clk_probe(struct plat if (ret) return ret; @@ -30,7 +30,7 @@ Signed-off-by: Martin Sperl } static const struct cprman_plat_data cprman_bcm2835_plat_data = { -@@ -2292,7 +2299,11 @@ static struct platform_driver bcm2835_cl +@@ -2294,7 +2301,11 @@ static struct platform_driver bcm2835_cl .probe = bcm2835_clk_probe, }; diff --git a/target/linux/bcm27xx/patches-5.4/950-0020-clk-bcm2835-Mark-used-PLLs-and-dividers-CRITICAL.patch b/target/linux/bcm27xx/patches-5.4/950-0020-clk-bcm2835-Mark-used-PLLs-and-dividers-CRITICAL.patch index 63f116f68..309655861 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0020-clk-bcm2835-Mark-used-PLLs-and-dividers-CRITICAL.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0020-clk-bcm2835-Mark-used-PLLs-and-dividers-CRITICAL.patch @@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1379,6 +1379,11 @@ bcm2835_register_pll_divider(struct bcm2 +@@ -1381,6 +1381,11 @@ bcm2835_register_pll_divider(struct bcm2 divider->div.hw.init = &init; divider->div.table = NULL; diff --git a/target/linux/bcm27xx/patches-5.4/950-0021-clk-bcm2835-Add-claim-clocks-property.patch b/target/linux/bcm27xx/patches-5.4/950-0021-clk-bcm2835-Add-claim-clocks-property.patch index 87113e882..7479210c1 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0021-clk-bcm2835-Add-claim-clocks-property.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0021-clk-bcm2835-Add-claim-clocks-property.patch @@ -36,7 +36,7 @@ Signed-off-by: Phil Elwell pll = kzalloc(sizeof(*pll), GFP_KERNEL); if (!pll) return NULL; -@@ -1380,8 +1385,10 @@ bcm2835_register_pll_divider(struct bcm2 +@@ -1382,8 +1387,10 @@ bcm2835_register_pll_divider(struct bcm2 divider->div.table = NULL; if (!(cprman_read(cprman, data->cm_reg) & data->hold_mask)) { @@ -49,7 +49,7 @@ Signed-off-by: Phil Elwell } divider->cprman = cprman; -@@ -2189,6 +2196,8 @@ static const struct bcm2835_clk_desc clk +@@ -2191,6 +2198,8 @@ static const struct bcm2835_clk_desc clk .ctl_reg = CM_PERIICTL), }; @@ -58,7 +58,7 @@ Signed-off-by: Phil Elwell /* * Permanently take a reference on the parent of the SDRAM clock. * -@@ -2208,6 +2217,19 @@ static int bcm2835_mark_sdc_parent_criti +@@ -2210,6 +2219,19 @@ static int bcm2835_mark_sdc_parent_criti return clk_prepare_enable(parent); } @@ -78,7 +78,7 @@ Signed-off-by: Phil Elwell static int bcm2835_clk_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; -@@ -2218,6 +2240,7 @@ static int bcm2835_clk_probe(struct plat +@@ -2220,6 +2242,7 @@ static int bcm2835_clk_probe(struct plat const size_t asize = ARRAY_SIZE(clk_desc_array); const struct cprman_plat_data *pdata; size_t i; @@ -86,7 +86,7 @@ Signed-off-by: Phil Elwell int ret; pdata = of_device_get_match_data(&pdev->dev); -@@ -2237,6 +2260,13 @@ static int bcm2835_clk_probe(struct plat +@@ -2239,6 +2262,13 @@ static int bcm2835_clk_probe(struct plat if (IS_ERR(cprman->regs)) return PTR_ERR(cprman->regs); diff --git a/target/linux/bcm27xx/patches-5.4/950-0022-clk-bcm2835-Read-max-core-clock-from-firmware.patch b/target/linux/bcm27xx/patches-5.4/950-0022-clk-bcm2835-Read-max-core-clock-from-firmware.patch index 094eed705..0ddcf6f1a 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0022-clk-bcm2835-Read-max-core-clock-from-firmware.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0022-clk-bcm2835-Read-max-core-clock-from-firmware.patch @@ -90,7 +90,7 @@ Signed-off-by: Phil Elwell .set_rate = bcm2835_clock_set_rate, .determine_rate = bcm2835_clock_determine_rate, .set_parent = bcm2835_clock_set_parent, -@@ -2239,6 +2267,7 @@ static int bcm2835_clk_probe(struct plat +@@ -2241,6 +2269,7 @@ static int bcm2835_clk_probe(struct plat const struct bcm2835_clk_desc *desc; const size_t asize = ARRAY_SIZE(clk_desc_array); const struct cprman_plat_data *pdata; @@ -98,7 +98,7 @@ Signed-off-by: Phil Elwell size_t i; u32 clk_id; int ret; -@@ -2260,6 +2289,14 @@ static int bcm2835_clk_probe(struct plat +@@ -2262,6 +2291,14 @@ static int bcm2835_clk_probe(struct plat if (IS_ERR(cprman->regs)) return PTR_ERR(cprman->regs); diff --git a/target/linux/bcm27xx/patches-5.4/950-0023-clk-bcm2835-Mark-GPIO-clocks-enabled-at-boot-as-crit.patch b/target/linux/bcm27xx/patches-5.4/950-0023-clk-bcm2835-Mark-GPIO-clocks-enabled-at-boot-as-crit.patch index bee256b03..61d9edf3e 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0023-clk-bcm2835-Mark-GPIO-clocks-enabled-at-boot-as-crit.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0023-clk-bcm2835-Mark-GPIO-clocks-enabled-at-boot-as-crit.patch @@ -20,7 +20,7 @@ Signed-off-by: Eric Anholt --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1471,6 +1471,15 @@ static struct clk_hw *bcm2835_register_c +@@ -1473,6 +1473,15 @@ static struct clk_hw *bcm2835_register_c init.flags = data->flags | CLK_IGNORE_UNUSED; /* diff --git a/target/linux/bcm27xx/patches-5.4/950-0031-amba_pl011-Don-t-use-DT-aliases-for-numbering.patch b/target/linux/bcm27xx/patches-5.4/950-0031-amba_pl011-Don-t-use-DT-aliases-for-numbering.patch index e89250df0..79212447f 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0031-amba_pl011-Don-t-use-DT-aliases-for-numbering.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0031-amba_pl011-Don-t-use-DT-aliases-for-numbering.patch @@ -14,7 +14,7 @@ use the same logic. --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -2575,7 +2575,12 @@ static int pl011_setup_port(struct devic +@@ -2578,7 +2578,12 @@ static int pl011_setup_port(struct devic if (IS_ERR(base)) return PTR_ERR(base); diff --git a/target/linux/bcm27xx/patches-5.4/950-0032-amba_pl011-Round-input-clock-up.patch b/target/linux/bcm27xx/patches-5.4/950-0032-amba_pl011-Round-input-clock-up.patch index fec36493b..912ff563c 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0032-amba_pl011-Round-input-clock-up.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0032-amba_pl011-Round-input-clock-up.patch @@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -1650,6 +1650,23 @@ static void pl011_put_poll_char(struct u +@@ -1653,6 +1653,23 @@ static void pl011_put_poll_char(struct u #endif /* CONFIG_CONSOLE_POLL */ @@ -50,7 +50,7 @@ Signed-off-by: Phil Elwell static int pl011_hwinit(struct uart_port *port) { struct uart_amba_port *uap = -@@ -1666,7 +1683,7 @@ static int pl011_hwinit(struct uart_port +@@ -1669,7 +1686,7 @@ static int pl011_hwinit(struct uart_port if (retval) return retval; @@ -59,7 +59,7 @@ Signed-off-by: Phil Elwell /* Clear pending error and receive interrupts */ pl011_write(UART011_OEIS | UART011_BEIS | UART011_PEIS | -@@ -2321,7 +2338,7 @@ static int pl011_console_setup(struct co +@@ -2324,7 +2341,7 @@ static int pl011_console_setup(struct co plat->init(); } @@ -68,7 +68,7 @@ Signed-off-by: Phil Elwell if (uap->vendor->fixed_options) { baud = uap->fixed_baud; -@@ -2506,6 +2523,7 @@ static struct uart_driver amba_reg = { +@@ -2509,6 +2526,7 @@ static struct uart_driver amba_reg = { .cons = AMBA_CONSOLE, }; @@ -76,7 +76,7 @@ Signed-off-by: Phil Elwell static int pl011_probe_dt_alias(int index, struct device *dev) { struct device_node *np; -@@ -2537,6 +2555,7 @@ static int pl011_probe_dt_alias(int inde +@@ -2540,6 +2558,7 @@ static int pl011_probe_dt_alias(int inde return ret; } diff --git a/target/linux/bcm27xx/patches-5.4/950-0033-amba_pl011-Insert-mb-for-correct-FIFO-handling.patch b/target/linux/bcm27xx/patches-5.4/950-0033-amba_pl011-Insert-mb-for-correct-FIFO-handling.patch index f545ab1db..b07096b5e 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0033-amba_pl011-Insert-mb-for-correct-FIFO-handling.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0033-amba_pl011-Insert-mb-for-correct-FIFO-handling.patch @@ -17,7 +17,7 @@ Signed-off-by: Phil Elwell --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -1383,6 +1383,7 @@ static bool pl011_tx_char(struct uart_am +@@ -1386,6 +1386,7 @@ static bool pl011_tx_char(struct uart_am return false; /* unable to transmit character */ pl011_write(c, uap, REG_DR); diff --git a/target/linux/bcm27xx/patches-5.4/950-0034-amba_pl011-Add-cts-event-workaround-DT-property.patch b/target/linux/bcm27xx/patches-5.4/950-0034-amba_pl011-Add-cts-event-workaround-DT-property.patch index 4c4cbb13c..df8e9aba7 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0034-amba_pl011-Add-cts-event-workaround-DT-property.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0034-amba_pl011-Add-cts-event-workaround-DT-property.patch @@ -36,7 +36,7 @@ Signed-off-by: Phil Elwell - reg --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -2662,6 +2662,11 @@ static int pl011_probe(struct amba_devic +@@ -2665,6 +2665,11 @@ static int pl011_probe(struct amba_devic if (IS_ERR(uap->clk)) return PTR_ERR(uap->clk); diff --git a/target/linux/bcm27xx/patches-5.4/950-0040-fbdev-add-FBIOCOPYAREA-ioctl.patch b/target/linux/bcm27xx/patches-5.4/950-0040-fbdev-add-FBIOCOPYAREA-ioctl.patch index 77eb123cf..8fa4ddf5c 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0040-fbdev-add-FBIOCOPYAREA-ioctl.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0040-fbdev-add-FBIOCOPYAREA-ioctl.patch @@ -234,7 +234,7 @@ Signed-off-by: Dave Stevenson static int bcm2708_fb_register(struct bcm2708_fb *fb) --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c -@@ -1072,6 +1072,30 @@ fb_blank(struct fb_info *info, int blank +@@ -1076,6 +1076,30 @@ fb_blank(struct fb_info *info, int blank } EXPORT_SYMBOL(fb_blank); @@ -265,7 +265,7 @@ Signed-off-by: Dave Stevenson static long do_fb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) { -@@ -1080,6 +1104,7 @@ static long do_fb_ioctl(struct fb_info * +@@ -1084,6 +1108,7 @@ static long do_fb_ioctl(struct fb_info * struct fb_fix_screeninfo fix; struct fb_cmap cmap_from; struct fb_cmap_user cmap; @@ -273,7 +273,7 @@ Signed-off-by: Dave Stevenson void __user *argp = (void __user *)arg; long ret = 0; -@@ -1155,6 +1180,15 @@ static long do_fb_ioctl(struct fb_info * +@@ -1159,6 +1184,15 @@ static long do_fb_ioctl(struct fb_info * unlock_fb_info(info); console_unlock(); break; @@ -289,7 +289,7 @@ Signed-off-by: Dave Stevenson default: lock_fb_info(info); fb = info->fbops; -@@ -1300,6 +1334,7 @@ static long fb_compat_ioctl(struct file +@@ -1304,6 +1338,7 @@ static long fb_compat_ioctl(struct file case FBIOPAN_DISPLAY: case FBIOGET_CON2FBMAP: case FBIOPUT_CON2FBMAP: diff --git a/target/linux/bcm27xx/patches-5.4/950-0153-media-tc358743-Increase-FIFO-level-to-374.patch b/target/linux/bcm27xx/patches-5.4/950-0153-media-tc358743-Increase-FIFO-level-to-374.patch index 7bbcf395d..8ec643f10 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0153-media-tc358743-Increase-FIFO-level-to-374.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0153-media-tc358743-Increase-FIFO-level-to-374.patch @@ -20,7 +20,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c -@@ -1947,7 +1947,7 @@ static int tc358743_probe_of(struct tc35 +@@ -1949,7 +1949,7 @@ static int tc358743_probe_of(struct tc35 state->pdata.ddc5v_delay = DDC5V_DELAY_100_MS; state->pdata.enable_hdcp = false; /* A FIFO level of 16 should be enough for 2-lane 720p60 at 594 MHz. */ diff --git a/target/linux/bcm27xx/patches-5.4/950-0154-media-tc358743-fix-connected-active-CSI-2-lane-repor.patch b/target/linux/bcm27xx/patches-5.4/950-0154-media-tc358743-fix-connected-active-CSI-2-lane-repor.patch index 94911e920..2357c878d 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0154-media-tc358743-fix-connected-active-CSI-2-lane-repor.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0154-media-tc358743-fix-connected-active-CSI-2-lane-repor.patch @@ -24,7 +24,7 @@ Signed-off-by: Philipp Zabel --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c -@@ -1606,11 +1606,20 @@ static int tc358743_g_mbus_config(struct +@@ -1608,11 +1608,20 @@ static int tc358743_g_mbus_config(struct struct v4l2_mbus_config *cfg) { struct tc358743_state *state = to_state(sd); @@ -47,7 +47,7 @@ Signed-off-by: Philipp Zabel switch (state->csi_lanes_in_use) { case 1: -@@ -2052,6 +2061,7 @@ static int tc358743_probe(struct i2c_cli +@@ -2054,6 +2063,7 @@ static int tc358743_probe(struct i2c_cli if (pdata) { state->pdata = *pdata; state->bus.flags = V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; diff --git a/target/linux/bcm27xx/patches-5.4/950-0155-media-tc358743-Add-support-for-972Mbit-s-link-freq.patch b/target/linux/bcm27xx/patches-5.4/950-0155-media-tc358743-Add-support-for-972Mbit-s-link-freq.patch index 1b8805bf2..18ee169b1 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0155-media-tc358743-Add-support-for-972Mbit-s-link-freq.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0155-media-tc358743-Add-support-for-972Mbit-s-link-freq.patch @@ -13,7 +13,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c -@@ -1976,6 +1976,7 @@ static int tc358743_probe_of(struct tc35 +@@ -1978,6 +1978,7 @@ static int tc358743_probe_of(struct tc35 /* * The CSI bps per lane must be between 62.5 Mbps and 1 Gbps. * The default is 594 Mbps for 4-lane 1080p60 or 2-lane 720p60. @@ -21,7 +21,7 @@ Signed-off-by: Dave Stevenson */ bps_pr_lane = 2 * endpoint.link_frequencies[0]; if (bps_pr_lane < 62500000U || bps_pr_lane > 1000000000U) { -@@ -1988,23 +1989,41 @@ static int tc358743_probe_of(struct tc35 +@@ -1990,23 +1991,41 @@ static int tc358743_probe_of(struct tc35 state->pdata.refclk_hz * state->pdata.pll_prd; /* diff --git a/target/linux/bcm27xx/patches-5.4/950-0156-media-tc358743-Check-I2C-succeeded-during-probe.patch b/target/linux/bcm27xx/patches-5.4/950-0156-media-tc358743-Check-I2C-succeeded-during-probe.patch index eb52eea64..653602b30 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0156-media-tc358743-Check-I2C-succeeded-during-probe.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0156-media-tc358743-Check-I2C-succeeded-during-probe.patch @@ -78,7 +78,7 @@ Signed-off-by: Dave Stevenson static void i2c_wr16(struct v4l2_subdev *sd, u16 reg, u16 val) { i2c_wrreg(sd, reg, val, 2); -@@ -2062,6 +2079,7 @@ static int tc358743_probe(struct i2c_cli +@@ -2064,6 +2081,7 @@ static int tc358743_probe(struct i2c_cli struct tc358743_platform_data *pdata = client->dev.platform_data; struct v4l2_subdev *sd; u16 irq_mask = MASK_HDMI_MSK | MASK_CSI_MSK; @@ -86,7 +86,7 @@ Signed-off-by: Dave Stevenson int err; if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) -@@ -2094,7 +2112,8 @@ static int tc358743_probe(struct i2c_cli +@@ -2096,7 +2114,8 @@ static int tc358743_probe(struct i2c_cli sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS; /* i2c access */ diff --git a/target/linux/bcm27xx/patches-5.4/950-0162-media-tc358743-Return-an-appropriate-colorspace-from.patch b/target/linux/bcm27xx/patches-5.4/950-0162-media-tc358743-Return-an-appropriate-colorspace-from.patch index 6ea87b356..b5b9105f4 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0162-media-tc358743-Return-an-appropriate-colorspace-from.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0162-media-tc358743-Return-an-appropriate-colorspace-from.patch @@ -26,7 +26,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c -@@ -1688,12 +1688,23 @@ static int tc358743_enum_mbus_code(struc +@@ -1690,12 +1690,23 @@ static int tc358743_enum_mbus_code(struc return 0; } @@ -51,7 +51,7 @@ Signed-off-by: Dave Stevenson if (format->pad != 0) return -EINVAL; -@@ -1703,23 +1714,7 @@ static int tc358743_get_fmt(struct v4l2_ +@@ -1705,23 +1716,7 @@ static int tc358743_get_fmt(struct v4l2_ format->format.height = state->timings.bt.height; format->format.field = V4L2_FIELD_NONE; @@ -76,7 +76,7 @@ Signed-off-by: Dave Stevenson return 0; } -@@ -1734,18 +1729,11 @@ static int tc358743_set_fmt(struct v4l2_ +@@ -1736,18 +1731,11 @@ static int tc358743_set_fmt(struct v4l2_ int ret = tc358743_get_fmt(sd, cfg, format); format->format.code = code; diff --git a/target/linux/bcm27xx/patches-5.4/950-0179-clk-clk-bcm2835-Use-zd-when-printing-size_t.patch b/target/linux/bcm27xx/patches-5.4/950-0179-clk-clk-bcm2835-Use-zd-when-printing-size_t.patch index 717822f5c..c8acb1a37 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0179-clk-clk-bcm2835-Use-zd-when-printing-size_t.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0179-clk-clk-bcm2835-Use-zd-when-printing-size_t.patch @@ -13,7 +13,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -2352,7 +2352,7 @@ static int bcm2835_clk_probe(struct plat +@@ -2354,7 +2354,7 @@ static int bcm2835_clk_probe(struct plat return ret; /* note that we have registered all the clocks */ diff --git a/target/linux/bcm27xx/patches-5.4/950-0214-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch b/target/linux/bcm27xx/patches-5.4/950-0214-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch index 7a1c2991f..754a63985 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0214-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0214-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch @@ -10,7 +10,7 @@ Signed-off-by: Phil Elwell --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -247,6 +247,10 @@ static void xhci_pci_quirks(struct devic +@@ -252,6 +252,10 @@ static void xhci_pci_quirks(struct devic pdev->device == 0x3432) xhci->quirks |= XHCI_BROKEN_STREAMS; diff --git a/target/linux/bcm27xx/patches-5.4/950-0219-clk-bcm2835-Add-support-for-setting-leaf-clock-rates.patch b/target/linux/bcm27xx/patches-5.4/950-0219-clk-bcm2835-Add-support-for-setting-leaf-clock-rates.patch index 26b17393d..3227f8c91 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0219-clk-bcm2835-Add-support-for-setting-leaf-clock-rates.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0219-clk-bcm2835-Add-support-for-setting-leaf-clock-rates.patch @@ -42,7 +42,7 @@ Signed-off-by: Eric Anholt ctl |= (div & CM_DIV_FRAC_MASK) ? CM_FRAC : 0; cprman_write(cprman, data->ctl_reg, ctl); -@@ -1492,7 +1496,7 @@ static struct clk_hw *bcm2835_register_c +@@ -1494,7 +1498,7 @@ static struct clk_hw *bcm2835_register_c init.ops = &bcm2835_vpu_clock_clk_ops; } else { init.ops = &bcm2835_clock_clk_ops; diff --git a/target/linux/bcm27xx/patches-5.4/950-0220-clk-bcm2835-Allow-reparenting-leaf-clocks-while-they.patch b/target/linux/bcm27xx/patches-5.4/950-0220-clk-bcm2835-Allow-reparenting-leaf-clocks-while-they.patch index 22ecf91d6..bae0f84e1 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0220-clk-bcm2835-Allow-reparenting-leaf-clocks-while-they.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0220-clk-bcm2835-Allow-reparenting-leaf-clocks-while-they.patch @@ -61,7 +61,7 @@ Signed-off-by: Eric Anholt .determine_rate = bcm2835_clock_determine_rate, .set_parent = bcm2835_clock_set_parent, .get_parent = bcm2835_clock_get_parent, -@@ -1496,7 +1510,6 @@ static struct clk_hw *bcm2835_register_c +@@ -1498,7 +1512,6 @@ static struct clk_hw *bcm2835_register_c init.ops = &bcm2835_vpu_clock_clk_ops; } else { init.ops = &bcm2835_clock_clk_ops; diff --git a/target/linux/bcm27xx/patches-5.4/950-0222-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch b/target/linux/bcm27xx/patches-5.4/950-0222-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch index 5710a8834..5c241536d 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0222-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0222-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch @@ -15,7 +15,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -1453,6 +1453,103 @@ command_cleanup: +@@ -1456,6 +1456,103 @@ command_cleanup: } /* @@ -119,7 +119,7 @@ Signed-off-by: Jonathan Bell * non-error returns are a promise to giveback() the urb later * we drop ownership so next owner (or urb unlink) can get it */ -@@ -5335,6 +5432,7 @@ static const struct hc_driver xhci_hc_dr +@@ -5337,6 +5434,7 @@ static const struct hc_driver xhci_hc_dr .endpoint_reset = xhci_endpoint_reset, .check_bandwidth = xhci_check_bandwidth, .reset_bandwidth = xhci_reset_bandwidth, diff --git a/target/linux/bcm27xx/patches-5.4/950-0266-tty-amba-pl011-Make-TX-optimisation-conditional.patch b/target/linux/bcm27xx/patches-5.4/950-0266-tty-amba-pl011-Make-TX-optimisation-conditional.patch index 9214bda20..58829c9e9 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0266-tty-amba-pl011-Make-TX-optimisation-conditional.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0266-tty-amba-pl011-Make-TX-optimisation-conditional.patch @@ -42,7 +42,7 @@ Signed-off-by: Phil Elwell #ifdef CONFIG_DMA_ENGINE /* DMA stuff */ bool using_tx_dma; -@@ -813,6 +814,7 @@ __acquires(&uap->port.lock) +@@ -816,6 +817,7 @@ __acquires(&uap->port.lock) if (!uap->using_tx_dma) return; @@ -50,7 +50,7 @@ Signed-off-by: Phil Elwell dmaengine_terminate_async(uap->dmatx.chan); if (uap->dmatx.queued) { -@@ -939,6 +941,7 @@ static void pl011_dma_rx_chars(struct ua +@@ -942,6 +944,7 @@ static void pl011_dma_rx_chars(struct ua fifotaken = pl011_fifo_to_tty(uap); } @@ -58,7 +58,7 @@ Signed-off-by: Phil Elwell spin_unlock(&uap->port.lock); dev_vdbg(uap->port.dev, "Took %d chars from DMA buffer and %d chars from the FIFO\n", -@@ -1347,6 +1350,7 @@ __acquires(&uap->port.lock) +@@ -1350,6 +1353,7 @@ __acquires(&uap->port.lock) { pl011_fifo_to_tty(uap); @@ -66,7 +66,7 @@ Signed-off-by: Phil Elwell spin_unlock(&uap->port.lock); tty_flip_buffer_push(&uap->port.state->port); /* -@@ -1482,6 +1486,7 @@ static irqreturn_t pl011_int(int irq, vo +@@ -1485,6 +1489,7 @@ static irqreturn_t pl011_int(int irq, vo int handled = 0; spin_lock_irqsave(&uap->port.lock, flags); @@ -74,7 +74,7 @@ Signed-off-by: Phil Elwell status = pl011_read(uap, REG_RIS) & uap->im; if (status) { do { -@@ -1501,7 +1506,7 @@ static irqreturn_t pl011_int(int irq, vo +@@ -1504,7 +1509,7 @@ static irqreturn_t pl011_int(int irq, vo UART011_CTSMIS|UART011_RIMIS)) pl011_modem_status(uap); if (status & UART011_TXIS) diff --git a/target/linux/bcm27xx/patches-5.4/950-0267-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch b/target/linux/bcm27xx/patches-5.4/950-0267-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch index 83c86f616..45a03fd81 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0267-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0267-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch @@ -23,7 +23,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -248,8 +248,10 @@ static void xhci_pci_quirks(struct devic +@@ -253,8 +253,10 @@ static void xhci_pci_quirks(struct devic xhci->quirks |= XHCI_BROKEN_STREAMS; if (pdev->vendor == PCI_VENDOR_ID_VIA && @@ -85,6 +85,6 @@ Signed-off-by: Jonathan Bell #define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34) #define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35) +#define XHCI_EP_CTX_BROKEN_DCS BIT_ULL(36) + #define XHCI_DISABLE_SPARSE BIT_ULL(38) unsigned int num_active_eps; - unsigned int limit_active_eps; diff --git a/target/linux/bcm27xx/patches-5.4/950-0270-clk-bcm2835-Avoid-null-pointer-exception.patch b/target/linux/bcm27xx/patches-5.4/950-0270-clk-bcm2835-Avoid-null-pointer-exception.patch index 1542f781f..8a529af7b 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0270-clk-bcm2835-Avoid-null-pointer-exception.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0270-clk-bcm2835-Avoid-null-pointer-exception.patch @@ -12,7 +12,7 @@ Signed-off-by: popcornmix --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -2278,9 +2278,11 @@ static bool bcm2835_clk_is_claimed(const +@@ -2280,9 +2280,11 @@ static bool bcm2835_clk_is_claimed(const int i; for (i = 0; i < ARRAY_SIZE(clk_desc_array); i++) { diff --git a/target/linux/bcm27xx/patches-5.4/950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/bcm27xx/patches-5.4/950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index d2e7c9944..28f1c18c9 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch @@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell #define USB_VENDOR_ID_BELKIN 0x050d #define USB_DEVICE_ID_FLIP_KVM 0x3201 -@@ -1244,6 +1247,9 @@ +@@ -1245,6 +1248,9 @@ #define USB_VENDOR_ID_XAT 0x2505 #define USB_DEVICE_ID_XAT_CSR 0x0220 diff --git a/target/linux/bcm27xx/patches-5.4/950-0351-clk-bcm2835-Disable-v3d-clock.patch b/target/linux/bcm27xx/patches-5.4/950-0351-clk-bcm2835-Disable-v3d-clock.patch index 7e55e7d8a..a7a5221fa 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0351-clk-bcm2835-Disable-v3d-clock.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0351-clk-bcm2835-Disable-v3d-clock.patch @@ -12,7 +12,7 @@ Signed-off-by: popcornmix --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1732,16 +1732,12 @@ static const struct bcm2835_clk_desc clk +@@ -1734,16 +1734,12 @@ static const struct bcm2835_clk_desc clk .hold_mask = CM_PLLA_HOLDCORE, .fixed_divider = 1, .flags = CLK_SET_RATE_PARENT), @@ -35,7 +35,7 @@ Signed-off-by: popcornmix [BCM2835_PLLA_DSI0] = REGISTER_PLL_DIV( SOC_ALL, .name = "plla_dsi0", -@@ -2019,14 +2015,12 @@ static const struct bcm2835_clk_desc clk +@@ -2021,14 +2017,12 @@ static const struct bcm2835_clk_desc clk .int_bits = 6, .frac_bits = 0, .tcnt_mux = 3), diff --git a/target/linux/bcm27xx/patches-5.4/950-0394-Initialise-rpi-firmware-before-clk-bcm2835.patch b/target/linux/bcm27xx/patches-5.4/950-0394-Initialise-rpi-firmware-before-clk-bcm2835.patch index f993fb4e1..cdd5e7e9a 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0394-Initialise-rpi-firmware-before-clk-bcm2835.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0394-Initialise-rpi-firmware-before-clk-bcm2835.patch @@ -25,7 +25,7 @@ Co-authored-by: Phil Elwell --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -2399,7 +2399,7 @@ static int __init __bcm2835_clk_driver_i +@@ -2401,7 +2401,7 @@ static int __init __bcm2835_clk_driver_i { return platform_driver_register(&bcm2835_clk_driver); } diff --git a/target/linux/bcm27xx/patches-5.4/950-0397-tty-amba-pl011-Add-un-throttle-support.patch b/target/linux/bcm27xx/patches-5.4/950-0397-tty-amba-pl011-Add-un-throttle-support.patch index 7777e2df9..ced0bf2b7 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0397-tty-amba-pl011-Add-un-throttle-support.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0397-tty-amba-pl011-Add-un-throttle-support.patch @@ -17,7 +17,7 @@ Signed-off-by: Phil Elwell --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -1323,6 +1323,32 @@ static void pl011_start_tx(struct uart_p +@@ -1326,6 +1326,32 @@ static void pl011_start_tx(struct uart_p pl011_start_tx_pio(uap); } @@ -50,7 +50,7 @@ Signed-off-by: Phil Elwell static void pl011_stop_rx(struct uart_port *port) { struct uart_amba_port *uap = -@@ -2164,6 +2190,8 @@ static const struct uart_ops amba_pl011_ +@@ -2167,6 +2193,8 @@ static const struct uart_ops amba_pl011_ .stop_tx = pl011_stop_tx, .start_tx = pl011_start_tx, .stop_rx = pl011_stop_rx, diff --git a/target/linux/bcm27xx/patches-5.4/950-0407-tty-amba-pl011-Avoid-rare-write-when-full-error.patch b/target/linux/bcm27xx/patches-5.4/950-0407-tty-amba-pl011-Avoid-rare-write-when-full-error.patch index b2b27f258..6283b83e1 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0407-tty-amba-pl011-Avoid-rare-write-when-full-error.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0407-tty-amba-pl011-Avoid-rare-write-when-full-error.patch @@ -29,7 +29,7 @@ Signed-off-by: Phil Elwell --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -1444,6 +1444,10 @@ static bool pl011_tx_chars(struct uart_a +@@ -1447,6 +1447,10 @@ static bool pl011_tx_chars(struct uart_a if (likely(from_irq) && count-- == 0) break; diff --git a/target/linux/bcm27xx/patches-5.4/950-0447-PCI-of-Add-inbound-resource-parsing-to-helpers.patch b/target/linux/bcm27xx/patches-5.4/950-0447-PCI-of-Add-inbound-resource-parsing-to-helpers.patch index d8bb3bfbf..493ea6382 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0447-PCI-of-Add-inbound-resource-parsing-to-helpers.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0447-PCI-of-Add-inbound-resource-parsing-to-helpers.patch @@ -82,7 +82,7 @@ Cc: linux-rockchip@lists.infradead.org --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c -@@ -1019,7 +1019,8 @@ static int advk_pcie_probe(struct platfo +@@ -1018,7 +1018,8 @@ static int advk_pcie_probe(struct platfo return ret; } @@ -402,7 +402,7 @@ Cc: linux-rockchip@lists.infradead.org } --- a/include/linux/pci.h +++ b/include/linux/pci.h -@@ -2277,6 +2277,7 @@ struct irq_domain; +@@ -2278,6 +2278,7 @@ struct irq_domain; struct irq_domain *pci_host_bridge_of_msi_domain(struct pci_bus *bus); int pci_parse_request_of_pci_ranges(struct device *dev, struct list_head *resources, @@ -410,7 +410,7 @@ Cc: linux-rockchip@lists.infradead.org struct resource **bus_range); /* Arch may override this (weak) */ -@@ -2285,9 +2286,11 @@ struct device_node *pcibios_get_phb_of_n +@@ -2286,9 +2287,11 @@ struct device_node *pcibios_get_phb_of_n #else /* CONFIG_OF */ static inline struct irq_domain * pci_host_bridge_of_msi_domain(struct pci_bus *bus) { return NULL; } diff --git a/target/linux/bcm27xx/patches-5.4/950-0488-media-add-V4L2_CTRL_TYPE_AREA-control-type.patch b/target/linux/bcm27xx/patches-5.4/950-0488-media-add-V4L2_CTRL_TYPE_AREA-control-type.patch index 265533eb3..d82c3196b 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0488-media-add-V4L2_CTRL_TYPE_AREA-control-type.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0488-media-add-V4L2_CTRL_TYPE_AREA-control-type.patch @@ -135,7 +135,7 @@ Signed-off-by: Mauro Carvalho Chehab /* Internal helper functions that deal with control events. */ --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h -@@ -427,6 +427,11 @@ struct v4l2_fract { +@@ -426,6 +426,11 @@ struct v4l2_fract { __u32 denominator; }; @@ -147,7 +147,7 @@ Signed-off-by: Mauro Carvalho Chehab /** * struct v4l2_capability - Describes V4L2 device caps returned by VIDIOC_QUERYCAP * -@@ -1725,6 +1730,7 @@ enum v4l2_ctrl_type { +@@ -1724,6 +1729,7 @@ enum v4l2_ctrl_type { V4L2_CTRL_TYPE_U8 = 0x0100, V4L2_CTRL_TYPE_U16 = 0x0101, V4L2_CTRL_TYPE_U32 = 0x0102, diff --git a/target/linux/bcm27xx/patches-5.4/950-0492-media-vb2-add-V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF.patch b/target/linux/bcm27xx/patches-5.4/950-0492-media-vb2-add-V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF.patch index b114aefac..b05c34ccb 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0492-media-vb2-add-V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0492-media-vb2-add-V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF.patch @@ -155,7 +155,7 @@ Signed-off-by: Mauro Carvalho Chehab */ --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h -@@ -925,11 +925,12 @@ struct v4l2_requestbuffers { +@@ -924,11 +924,12 @@ struct v4l2_requestbuffers { }; /* capabilities for struct v4l2_requestbuffers and v4l2_create_buffers */ @@ -173,7 +173,7 @@ Signed-off-by: Mauro Carvalho Chehab /** * struct v4l2_plane - plane info for multi-planar buffers -@@ -1051,6 +1052,8 @@ static inline __u64 v4l2_timeval_to_ns(c +@@ -1050,6 +1051,8 @@ static inline __u64 v4l2_timeval_to_ns(c #define V4L2_BUF_FLAG_IN_REQUEST 0x00000080 /* timecode field is valid */ #define V4L2_BUF_FLAG_TIMECODE 0x00000100 diff --git a/target/linux/bcm27xx/patches-5.4/950-0494-media-videodev2.h-add-V4L2_DEC_CMD_FLUSH.patch b/target/linux/bcm27xx/patches-5.4/950-0494-media-videodev2.h-add-V4L2_DEC_CMD_FLUSH.patch index ef075fdb2..56fee1e02 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0494-media-videodev2.h-add-V4L2_DEC_CMD_FLUSH.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0494-media-videodev2.h-add-V4L2_DEC_CMD_FLUSH.patch @@ -47,7 +47,7 @@ Signed-off-by: Mauro Carvalho Chehab replace define V4L2_DEC_CMD_PAUSE_TO_BLACK decoder-cmds --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h -@@ -1989,6 +1989,7 @@ struct v4l2_encoder_cmd { +@@ -1988,6 +1988,7 @@ struct v4l2_encoder_cmd { #define V4L2_DEC_CMD_STOP (1) #define V4L2_DEC_CMD_PAUSE (2) #define V4L2_DEC_CMD_RESUME (3) diff --git a/target/linux/bcm27xx/patches-5.4/950-0505-media-videodev2.h-Add-a-format-for-column-YUV4-2-0-m.patch b/target/linux/bcm27xx/patches-5.4/950-0505-media-videodev2.h-Add-a-format-for-column-YUV4-2-0-m.patch index 840541cd2..5a309827e 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0505-media-videodev2.h-Add-a-format-for-column-YUV4-2-0-m.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0505-media-videodev2.h-Add-a-format-for-column-YUV4-2-0-m.patch @@ -289,7 +289,7 @@ Signed-off-by: Dave Stevenson case V4L2_PIX_FMT_YUV422M: descr = "Planar YUV 4:2:2 (N-C)"; break; --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h -@@ -737,6 +737,10 @@ struct v4l2_pix_format { +@@ -736,6 +736,10 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_INZI v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */ #define V4L2_PIX_FMT_SUNXI_TILED_NV12 v4l2_fourcc('S', 'T', '1', '2') /* Sunxi Tiled NV12 Format */ #define V4L2_PIX_FMT_CNF4 v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence information */ diff --git a/target/linux/bcm27xx/patches-5.4/950-0510-mmc-sdhci-Silence-MMC-warnings.patch b/target/linux/bcm27xx/patches-5.4/950-0510-mmc-sdhci-Silence-MMC-warnings.patch index 41fa6cb3d..38349280b 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0510-mmc-sdhci-Silence-MMC-warnings.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0510-mmc-sdhci-Silence-MMC-warnings.patch @@ -22,7 +22,7 @@ Signed-off-by: Maxime Ripard #define MAX_TUNING_LOOP 40 -@@ -2754,7 +2754,7 @@ static void sdhci_timeout_timer(struct t +@@ -2756,7 +2756,7 @@ static void sdhci_timeout_timer(struct t spin_lock_irqsave(&host->lock, flags); if (host->cmd && !sdhci_data_line_cmd(host->cmd)) { @@ -31,7 +31,7 @@ Signed-off-by: Maxime Ripard mmc_hostname(host->mmc)); sdhci_dumpregs(host); -@@ -2776,7 +2776,7 @@ static void sdhci_timeout_data_timer(str +@@ -2778,7 +2778,7 @@ static void sdhci_timeout_data_timer(str if (host->data || host->data_cmd || (host->cmd && sdhci_data_line_cmd(host->cmd))) { diff --git a/target/linux/bcm27xx/patches-5.4/950-0648-media-uapi-v4l2-core-Add-sensor-ancillary-data-V4L2-.patch b/target/linux/bcm27xx/patches-5.4/950-0648-media-uapi-v4l2-core-Add-sensor-ancillary-data-V4L2-.patch index de8f1d209..69414e381 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0648-media-uapi-v4l2-core-Add-sensor-ancillary-data-V4L2-.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0648-media-uapi-v4l2-core-Add-sensor-ancillary-data-V4L2-.patch @@ -75,7 +75,7 @@ Signed-off-by: Naushir Patuck /* Compressed formats */ --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h -@@ -769,6 +769,7 @@ struct v4l2_pix_format { +@@ -768,6 +768,7 @@ struct v4l2_pix_format { #define V4L2_META_FMT_VSP1_HGT v4l2_fourcc('V', 'S', 'P', 'T') /* R-Car VSP1 2-D Histogram */ #define V4L2_META_FMT_UVC v4l2_fourcc('U', 'V', 'C', 'H') /* UVC Payload Header metadata */ #define V4L2_META_FMT_D4XX v4l2_fourcc('D', '4', 'X', 'X') /* D4XX Payload Header metadata */ diff --git a/target/linux/bcm27xx/patches-5.4/950-0676-media-uapi-v4l2-core-Add-ISP-statistics-output-V4L2-.patch b/target/linux/bcm27xx/patches-5.4/950-0676-media-uapi-v4l2-core-Add-ISP-statistics-output-V4L2-.patch index 1af97e835..082dff510 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0676-media-uapi-v4l2-core-Add-ISP-statistics-output-V4L2-.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0676-media-uapi-v4l2-core-Add-ISP-statistics-output-V4L2-.patch @@ -84,7 +84,7 @@ Signed-off-by: Naushir Patuck /* Compressed formats */ --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h -@@ -770,6 +770,7 @@ struct v4l2_pix_format { +@@ -769,6 +769,7 @@ struct v4l2_pix_format { #define V4L2_META_FMT_UVC v4l2_fourcc('U', 'V', 'C', 'H') /* UVC Payload Header metadata */ #define V4L2_META_FMT_D4XX v4l2_fourcc('D', '4', 'X', 'X') /* D4XX Payload Header metadata */ #define V4L2_META_FMT_SENSOR_DATA v4l2_fourcc('S', 'E', 'N', 'S') /* Sensor Ancillary metadata */ diff --git a/target/linux/bcm27xx/patches-5.4/950-0706-media-i2c-tc358743-Fix-fallthrough-warning.patch b/target/linux/bcm27xx/patches-5.4/950-0706-media-i2c-tc358743-Fix-fallthrough-warning.patch index b0e74e5e1..26c1f95bf 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0706-media-i2c-tc358743-Fix-fallthrough-warning.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0706-media-i2c-tc358743-Fix-fallthrough-warning.patch @@ -10,7 +10,7 @@ Signed-off-by: Jacko Dirks --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c -@@ -2002,6 +2002,7 @@ static int tc358743_probe_of(struct tc35 +@@ -2004,6 +2004,7 @@ static int tc358743_probe_of(struct tc35 switch (bps_pr_lane) { default: dev_warn(dev, "untested bps per lane: %u bps\n", bps_pr_lane); diff --git a/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch index 4c4db76b0..b27cbcad9 100644 --- a/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch +++ b/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch @@ -132,6 +132,6 @@ it on BCM4708 family. #define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34) #define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35) +#define XHCI_FAKE_DOORBELL BIT_ULL(36) + #define XHCI_DISABLE_SPARSE BIT_ULL(38) unsigned int num_active_eps; - unsigned int limit_active_eps; diff --git a/target/linux/generic/backport-5.4/756-v5.8-net-dsa-rtl8366-Pass-GENMASK-signed-bits.patch b/target/linux/generic/backport-5.4/756-v5.8-net-dsa-rtl8366-Pass-GENMASK-signed-bits.patch index 4c5d559e1..b0ab59836 100644 --- a/target/linux/generic/backport-5.4/756-v5.8-net-dsa-rtl8366-Pass-GENMASK-signed-bits.patch +++ b/target/linux/generic/backport-5.4/756-v5.8-net-dsa-rtl8366-Pass-GENMASK-signed-bits.patch @@ -16,7 +16,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/rtl8366.c +++ b/drivers/net/dsa/rtl8366.c -@@ -285,7 +285,7 @@ int rtl8366_init_vlan(struct realtek_smi +@@ -311,7 +311,7 @@ int rtl8366_init_vlan(struct realtek_smi /* For the CPU port, make all ports members of this * VLAN. */ diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4 index 4b00fb4cb..04525e21a 100644 --- a/target/linux/generic/config-5.4 +++ b/target/linux/generic/config-5.4 @@ -297,6 +297,7 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8 # CONFIG_ARM64_CRYPTO is not set # CONFIG_ARM64_ERRATUM_1024718 is not set # CONFIG_ARM64_ERRATUM_1463225 is not set +# CONFIG_ARM64_ERRATUM_1542419 is not set # CONFIG_ARM64_ERRATUM_819472 is not set # CONFIG_ARM64_ERRATUM_824069 is not set # CONFIG_ARM64_ERRATUM_826319 is not set @@ -306,7 +307,6 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8 # CONFIG_ARM64_ERRATUM_843419 is not set # CONFIG_ARM64_ERRATUM_845719 is not set # CONFIG_ARM64_ERRATUM_858921 is not set -# CONFIG_ARM64_ERRATUM_1542419 is not set # CONFIG_ARM64_HW_AFDBM is not set # CONFIG_ARM64_LSE_ATOMICS is not set # CONFIG_ARM64_MODULE_PLTS is not set @@ -842,7 +842,7 @@ CONFIG_CIFS_POSIX=y CONFIG_CIFS_STATS=y # CONFIG_CIFS_STATS2 is not set # CONFIG_CIFS_WEAK_PW_HASH is not set -# CONFIG_CIFS_XATTR is not set +CONFIG_CIFS_XATTR=y # CONFIG_CIO_DAC is not set CONFIG_CLANG_VERSION=0 # CONFIG_CLEANCACHE is not set @@ -1216,6 +1216,7 @@ CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 # CONFIG_DEFAULT_RENO is not set CONFIG_DEFAULT_SECURITY="" CONFIG_DEFAULT_SECURITY_DAC=y +# CONFIG_DEFAULT_SECURITY_SELINUX is not set CONFIG_DEFAULT_TCP_CONG="cubic" CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set @@ -1381,8 +1382,8 @@ CONFIG_DQL=y # CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set # CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set # CONFIG_DRM_PANEL_SONY_ACX565AKM is not set -# CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set # CONFIG_DRM_PANEL_TPO_TD028TTEC1 is not set +# CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set # CONFIG_DRM_PANEL_TPO_TPG110 is not set # CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set # CONFIG_DRM_PANFROST is not set @@ -1490,12 +1491,13 @@ CONFIG_EPOLL=y CONFIG_ETHERNET=y # CONFIG_ETHOC is not set CONFIG_EVENTFD=y +# CONFIG_EVM is not set # CONFIG_EXFAT_FS is not set CONFIG_EXPERT=y CONFIG_EXPORTFS=y # CONFIG_EXPORTFS_BLOCK_OPS is not set # CONFIG_EXT2_FS is not set -# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT2_FS_XATTR=y # CONFIG_EXT3_FS is not set # CONFIG_EXT4_DEBUG is not set # CONFIG_EXT4_ENCRYPTION is not set @@ -1528,7 +1530,9 @@ CONFIG_EXTRA_TARGETS="" # CONFIG_F2FS_FS_ENCRYPTION is not set # CONFIG_F2FS_FS_POSIX_ACL is not set # CONFIG_F2FS_FS_SECURITY is not set +CONFIG_F2FS_FS_XATTR=y # CONFIG_F2FS_IO_TRACE is not set +CONFIG_F2FS_STAT_FS=y # CONFIG_FAILOVER is not set # CONFIG_FAIR_GROUP_SCHED is not set # CONFIG_FANOTIFY is not set @@ -2007,8 +2011,8 @@ CONFIG_HPET_MMAP_DEFAULT=y # CONFIG_HTC_PASIC3 is not set # CONFIG_HTS221 is not set # CONFIG_HTU21 is not set -# CONFIG_HUGETLB_PAGE is not set # CONFIG_HUGETLBFS is not set +# CONFIG_HUGETLB_PAGE is not set # CONFIG_HVC_DCC is not set # CONFIG_HVC_UDBG is not set # CONFIG_HWLAT_TRACER is not set @@ -2191,6 +2195,7 @@ CONFIG_IIO_CONSUMERS_PER_TRIGGER=2 # CONFIG_IKCONFIG is not set # CONFIG_IKCONFIG_PROC is not set # CONFIG_IKHEADERS is not set +# CONFIG_IMA is not set # CONFIG_IMAGE_CMDLINE_HACK is not set # CONFIG_IMGPDC_WDT is not set # CONFIG_IMG_MDC_DMA is not set @@ -2323,6 +2328,9 @@ CONFIG_INPUT_MISC=y # CONFIG_INPUT_WISTRON_BTNS is not set # CONFIG_INPUT_YEALINK is not set # CONFIG_INT340X_THERMAL is not set +# CONFIG_INTEGRITY is not set +# CONFIG_INTEGRITY_AUDIT is not set +# CONFIG_INTEGRITY_SIGNATURE is not set # CONFIG_INTEL_ATOMISP2_PM is not set # CONFIG_INTEL_CHT_INT33FE is not set # CONFIG_INTEL_HID_EVENT is not set @@ -2746,6 +2754,7 @@ CONFIG_LOG_CPU_MAX_BUF_SHIFT=12 # CONFIG_LP_CONSOLE is not set # CONFIG_LSI_ET1011C_PHY is not set CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity" +CONFIG_LSM_MMAP_MIN_ADDR=65536 # CONFIG_LTC1660 is not set # CONFIG_LTC2471 is not set # CONFIG_LTC2485 is not set @@ -2985,8 +2994,8 @@ CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 # CONFIG_MICROSEMI_PHY is not set # CONFIG_MIGRATION is not set CONFIG_MII=y -# CONFIG_MIKROTIK_RB532 is not set # CONFIG_MIKROTIK is not set +# CONFIG_MIKROTIK_RB532 is not set # CONFIG_MINIX_FS is not set # CONFIG_MINIX_FS_NATIVE_ENDIAN is not set # CONFIG_MINIX_SUBPARTITION is not set @@ -3372,11 +3381,13 @@ CONFIG_NETDEVICES=y # CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set # CONFIG_NETFILTER_XT_TARGET_RATEEST is not set # CONFIG_NETFILTER_XT_TARGET_REDIRECT is not set +# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set # CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set # CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set # CONFIG_NETFILTER_XT_TARGET_TEE is not set # CONFIG_NETFILTER_XT_TARGET_TPROXY is not set # CONFIG_NETFILTER_XT_TARGET_TRACE is not set +# CONFIG_NETLABEL is not set # CONFIG_NETLINK_DIAG is not set # CONFIG_NETLINK_MMAP is not set # CONFIG_NETPOLL is not set @@ -4285,7 +4296,7 @@ CONFIG_RCU_TORTURE_TEST_SLOW_INIT_DELAY=3 # CONFIG_REISERFS_FS is not set # CONFIG_REISERFS_FS_POSIX_ACL is not set # CONFIG_REISERFS_FS_SECURITY is not set -# CONFIG_REISERFS_FS_XATTR is not set +CONFIG_REISERFS_FS_XATTR=y # CONFIG_REISERFS_PROC_INFO is not set # CONFIG_RELAY is not set # CONFIG_RELOCATABLE is not set @@ -4581,7 +4592,20 @@ CONFIG_SCSI_PROC_FS=y CONFIG_SECTION_MISMATCH_WARN_ONLY=y # CONFIG_SECURITY is not set # CONFIG_SECURITYFS is not set +# CONFIG_SECURITY_APPARMOR is not set CONFIG_SECURITY_DMESG_RESTRICT=y +# CONFIG_SECURITY_LOADPIN is not set +# CONFIG_SECURITY_LOCKDOWN_LSM is not set +# CONFIG_SECURITY_PATH is not set +# CONFIG_SECURITY_SAFESETID is not set +# CONFIG_SECURITY_SELINUX_AVC_STATS is not set +# CONFIG_SECURITY_SELINUX_BOOTPARAM is not set +CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=0 +# CONFIG_SECURITY_SELINUX_DEVELOP is not set +# CONFIG_SECURITY_SELINUX_DISABLE is not set +# CONFIG_SECURITY_SMACK is not set +# CONFIG_SECURITY_TOMOYO is not set +# CONFIG_SECURITY_YAMA is not set CONFIG_SELECT_MEMORY_MODEL=y # CONFIG_SENSIRION_SGP30 is not set # CONFIG_SENSORS_ABITUGURU is not set @@ -5804,7 +5828,7 @@ CONFIG_TTY=y # CONFIG_UBIFS_FS_AUTHENTICATION is not set # CONFIG_UBIFS_FS_ENCRYPTION is not set # CONFIG_UBIFS_FS_SECURITY is not set -# CONFIG_UBIFS_FS_XATTR is not set +CONFIG_UBIFS_FS_XATTR=y # CONFIG_UBSAN is not set CONFIG_UBSAN_ALIGNMENT=y # CONFIG_UCB1400_CORE is not set diff --git a/target/linux/generic/hack-5.4/204-module_strip.patch b/target/linux/generic/hack-5.4/204-module_strip.patch index 458736b49..f311b176f 100644 --- a/target/linux/generic/hack-5.4/204-module_strip.patch +++ b/target/linux/generic/hack-5.4/204-module_strip.patch @@ -96,7 +96,7 @@ Signed-off-by: Felix Fietkau --- a/init/Kconfig +++ b/init/Kconfig -@@ -2195,6 +2195,13 @@ config TRIM_UNUSED_KSYMS +@@ -2196,6 +2196,13 @@ config TRIM_UNUSED_KSYMS If unsure, or if you need to build out-of-tree modules, say N. @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau config MODULES_TREE_LOOKUP --- a/kernel/module.c +++ b/kernel/module.c -@@ -3126,9 +3126,11 @@ static int setup_load_info(struct load_i +@@ -3127,9 +3127,11 @@ static int setup_load_info(struct load_i static int check_modinfo(struct module *mod, struct load_info *info, int flags) { @@ -125,7 +125,7 @@ Signed-off-by: Felix Fietkau if (flags & MODULE_INIT_IGNORE_VERMAGIC) modmagic = NULL; -@@ -3149,6 +3151,7 @@ static int check_modinfo(struct module * +@@ -3150,6 +3152,7 @@ static int check_modinfo(struct module * mod->name); add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK); } diff --git a/target/linux/generic/hack-5.4/703-add_vsc8504_support.patch b/target/linux/generic/hack-5.4/703-add_vsc8504_support.patch new file mode 100644 index 000000000..afb6ca6cf --- /dev/null +++ b/target/linux/generic/hack-5.4/703-add_vsc8504_support.patch @@ -0,0 +1,57 @@ +From: Roman Kuzmitskii +Date: Thu, 05 Nov 2020 02:00:00 +0000 +Subject: [PATCH] net: phy: vitesse: add vsc8504 support + +This patch adds support for vsc8504 phy. +That phy is changed owner: + vitesse -> microsemi -> microchip +So is its driver in kernel was changed and rewritten. + +there is no need to upstream this patch. +this vsc8504 is supported by newer kernels out of box. +support could be enabled by CONFIG_MICROSEMI_PHY. + +Tested-by: Johannes Kimmel +Signed-off-by: Roman Kuzmitskii +--- a/drivers/net/phy/vitesse.c ++++ b/drivers/net/phy/vitesse.c +@@ -61,6 +61,7 @@ + + #define PHY_ID_VSC8234 0x000fc620 + #define PHY_ID_VSC8244 0x000fc6c0 ++#define PHY_ID_VSC8504 0x000704c2 + #define PHY_ID_VSC8572 0x000704d0 + #define PHY_ID_VSC8601 0x00070420 + #define PHY_ID_VSC7385 0x00070450 +@@ -292,6 +293,7 @@ static int vsc82xx_config_intr(struct ph + err = phy_write(phydev, MII_VSC8244_IMASK, + (phydev->drv->phy_id == PHY_ID_VSC8234 || + phydev->drv->phy_id == PHY_ID_VSC8244 || ++ phydev->drv->phy_id == PHY_ID_VSC8504 || + phydev->drv->phy_id == PHY_ID_VSC8572 || + phydev->drv->phy_id == PHY_ID_VSC8601) ? + MII_VSC8244_IMASK_MASK : +@@ -402,6 +404,15 @@ static struct phy_driver vsc82xx_driver[ + .ack_interrupt = &vsc824x_ack_interrupt, + .config_intr = &vsc82xx_config_intr, + }, { ++ .phy_id = PHY_ID_VSC8504, ++ .name = "Vitesse VSC8504", ++ .phy_id_mask = 0x000ffff0, ++ /* PHY_GBIT_FEATURES */ ++ .config_init = &vsc824x_config_init, ++ .config_aneg = &vsc82x4_config_aneg, ++ .ack_interrupt = &vsc824x_ack_interrupt, ++ .config_intr = &vsc82xx_config_intr, ++}, { + .phy_id = PHY_ID_VSC8572, + .name = "Vitesse VSC8572", + .phy_id_mask = 0x000ffff0, +@@ -488,6 +499,7 @@ module_phy_driver(vsc82xx_driver); + static struct mdio_device_id __maybe_unused vitesse_tbl[] = { + { PHY_ID_VSC8234, 0x000ffff0 }, + { PHY_ID_VSC8244, 0x000fffc0 }, ++ { PHY_ID_VSC8504, 0x000ffff0 }, + { PHY_ID_VSC8572, 0x000ffff0 }, + { PHY_ID_VSC7385, 0x000ffff0 }, + { PHY_ID_VSC7388, 0x000ffff0 }, diff --git a/target/linux/generic/hack-5.4/901-debloat_sock_diag.patch b/target/linux/generic/hack-5.4/901-debloat_sock_diag.patch index 12ad4c684..7c9046c6e 100644 --- a/target/linux/generic/hack-5.4/901-debloat_sock_diag.patch +++ b/target/linux/generic/hack-5.4/901-debloat_sock_diag.patch @@ -69,7 +69,7 @@ Signed-off-by: Felix Fietkau struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie) { struct dst_entry *dst = __sk_dst_get(sk); -@@ -1747,9 +1760,11 @@ static void __sk_free(struct sock *sk) +@@ -1742,9 +1755,11 @@ static void __sk_free(struct sock *sk) if (likely(sk->sk_net_refcnt)) sock_inuse_add(sock_net(sk), -1); diff --git a/target/linux/generic/hack-5.4/902-debloat_proc.patch b/target/linux/generic/hack-5.4/902-debloat_proc.patch index 19926866a..d9febbada 100644 --- a/target/linux/generic/hack-5.4/902-debloat_proc.patch +++ b/target/linux/generic/hack-5.4/902-debloat_proc.patch @@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau --- a/net/core/sock.c +++ b/net/core/sock.c -@@ -3634,6 +3634,8 @@ static __net_initdata struct pernet_oper +@@ -3629,6 +3629,8 @@ static __net_initdata struct pernet_oper static int __init proto_init(void) { diff --git a/target/linux/generic/hack-5.4/904-debloat_dma_buf.patch b/target/linux/generic/hack-5.4/904-debloat_dma_buf.patch index 3216d2015..a5713a67e 100644 --- a/target/linux/generic/hack-5.4/904-debloat_dma_buf.patch +++ b/target/linux/generic/hack-5.4/904-debloat_dma_buf.patch @@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau * Perform scheduler related setup for a newly forked process p. --- a/fs/d_path.c +++ b/fs/d_path.c -@@ -307,6 +307,7 @@ char *dynamic_dname(struct dentry *dentr +@@ -311,6 +311,7 @@ char *dynamic_dname(struct dentry *dentr buffer += buflen - sz; return memcpy(buffer, temp, sz); } diff --git a/target/linux/generic/hack-5.4/952-net-conntrack-events-support-multiple-registrant.patch b/target/linux/generic/hack-5.4/952-net-conntrack-events-support-multiple-registrant.patch index b48db702c..4f2c9b504 100644 --- a/target/linux/generic/hack-5.4/952-net-conntrack-events-support-multiple-registrant.patch +++ b/target/linux/generic/hack-5.4/952-net-conntrack-events-support-multiple-registrant.patch @@ -2,7 +2,7 @@ diff --git a/include/net/netfilter/nf_conntrack_ecache.h b/include/net/netfilter index 12d967b..c2b98b6 100644 --- a/include/net/netfilter/nf_conntrack_ecache.h +++ b/include/net/netfilter/nf_conntrack_ecache.h -@@ -71,6 +71,10 @@ struct nf_ct_event { +@@ -72,6 +72,10 @@ struct nf_ct_event { int report; }; @@ -13,7 +13,7 @@ index 12d967b..c2b98b6 100644 struct nf_ct_event_notifier { int (*fcn)(unsigned int events, struct nf_ct_event *item); }; -@@ -79,7 +83,7 @@ int nf_conntrack_register_notifier(struc +@@ -80,7 +84,7 @@ int nf_conntrack_register_notifier(struc struct nf_ct_event_notifier *nb); void nf_conntrack_unregister_notifier(struct net *net, struct nf_ct_event_notifier *nb); @@ -22,7 +22,7 @@ index 12d967b..c2b98b6 100644 void nf_ct_deliver_cached_events(struct nf_conn *ct); int nf_conntrack_eventmask_report(unsigned int eventmask, struct nf_conn *ct, u32 portid, int report); -@@ -87,12 +91,15 @@ int nf_conntrack_eventmask_report(unsign +@@ -105,12 +109,15 @@ int nf_conntrack_eventmask_report(unsign nf_conntrack_event_cache(enum ip_conntrack_events event, struct nf_conn *ct) { #ifdef CONFIG_NF_CONNTRACK_EVENTS @@ -39,7 +39,7 @@ index 12d967b..c2b98b6 100644 e = nf_ct_ecache_find(ct); if (e == NULL) return; -@@ -104,10 +111,12 @@ static inline int +@@ -124,10 +131,12 @@ static inline int u32 portid, int report) { #ifdef CONFIG_NF_CONNTRACK_EVENTS @@ -52,7 +52,7 @@ index 12d967b..c2b98b6 100644 return nf_conntrack_eventmask_report(1 << event, ct, portid, report); } -@@ -115,11 +124,14 @@ nf_conntrack_event_report(enum ip_conntr +@@ -139,11 +148,14 @@ nf_conntrack_event_report(enum ip_conntr nf_conntrack_event(enum ip_conntrack_events event, struct nf_conn *ct) { #ifdef CONFIG_NF_CONNTRACK_EVENTS @@ -71,7 +71,7 @@ diff --git a/include/net/netns/conntrack.h b/include/net/netns/conntrack.h index e469e85..1d31db8 100644 --- a/include/net/netns/conntrack.h +++ b/include/net/netns/conntrack.h -@@ -114,7 +114,11 @@ struct netns_ct { +@@ -112,7 +112,11 @@ struct netns_ct { struct ct_pcpu __percpu *pcpu_lists; struct ip_conntrack_stat __percpu *stat; @@ -87,7 +87,7 @@ diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig index 63073be..08d7aab 100644 --- a/net/netfilter/Kconfig +++ b/net/netfilter/Kconfig -@@ -118,6 +118,14 @@ config NF_CONNTRACK_EVENTS +@@ -148,6 +148,14 @@ config NF_CONNTRACK_EVENTS If unsure, say `N'. @@ -106,7 +106,7 @@ diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core index 6bd1508..9b81c7c 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c -@@ -2522,7 +2522,10 @@ +@@ -2590,7 +2590,10 @@ nf_conntrack_ecache_pernet_init(net); nf_conntrack_helper_pernet_init(net); nf_conntrack_proto_pernet_init(net); @@ -123,7 +123,7 @@ diff --git a/net/netfilter/nf_conntrack_ecache.c b/net/netfilter/nf_conntrack_ec index da9df2d..e0e2a8f 100644 --- a/net/netfilter/nf_conntrack_ecache.c +++ b/net/netfilter/nf_conntrack_ecache.c -@@ -18,6 +18,9 @@ +@@ -17,6 +17,9 @@ #include #include #include @@ -240,7 +240,7 @@ index da9df2d..e0e2a8f 100644 +#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS +int nf_conntrack_register_notifier(struct net *net, struct notifier_block *nb) +{ -+ return atomic_notifier_chain_register(&net->ct.nf_conntrack_chain, nb); ++ return atomic_notifier_chain_register(&net->ct.nf_conntrack_chain, nb); +} +#else int nf_conntrack_register_notifier(struct net *net, @@ -286,7 +286,7 @@ index 04111c1..8c741f7 100644 #include #include -@@ -618,14 +623,22 @@ static size_t ctnetlink_nlmsg_size(const +@@ -676,14 +681,22 @@ static size_t ctnetlink_nlmsg_size(const ; } @@ -309,7 +309,7 @@ index 04111c1..8c741f7 100644 struct nf_conn *ct = item->ct; struct sk_buff *skb; unsigned int type; -@@ -3290,9 +3303,15 @@ static int ctnetlink_stat_exp_cpu(struct +@@ -3504,9 +3517,15 @@ static int ctnetlink_stat_exp_cpu(struct } #ifdef CONFIG_NF_CONNTRACK_EVENTS diff --git a/target/linux/generic/hack-5.4/953-net-patch-linux-kernel-to-support-shortcut-fe.patch b/target/linux/generic/hack-5.4/953-net-patch-linux-kernel-to-support-shortcut-fe.patch index 8c78bc3c8..ece2b89af 100644 --- a/target/linux/generic/hack-5.4/953-net-patch-linux-kernel-to-support-shortcut-fe.patch +++ b/target/linux/generic/hack-5.4/953-net-patch-linux-kernel-to-support-shortcut-fe.patch @@ -229,7 +229,7 @@ goto out_unlock; @@ -340,6 +363,11 @@ int nf_conntrack_register_notifier(struct net *net, struct notifier_block *nb) { - return atomic_notifier_chain_register(&net->ct.nf_conntrack_chain, nb); + return atomic_notifier_chain_register(&net->ct.nf_conntrack_chain, nb); } +int nf_conntrack_register_chain_notifier(struct net *net, struct notifier_block *nb) +{ diff --git a/target/linux/generic/hack-5.4/998-add-ndo-do-ioctl.patch b/target/linux/generic/hack-5.4/998-add-ndo-do-ioctl.patch index 9cbfc6a1d..263fb71b0 100644 --- a/target/linux/generic/hack-5.4/998-add-ndo-do-ioctl.patch +++ b/target/linux/generic/hack-5.4/998-add-ndo-do-ioctl.patch @@ -2,7 +2,7 @@ diff --git a/net/wireless/wext-core.c b/net/wireless/wext-core.c index 6cdb0544..7d1e09e3 100644 --- a/net/wireless/wext-core.c +++ b/net/wireless/wext-core.c -@@ -956,6 +956,9 @@ static int wireless_process_ioctl(struct net *net, struct iwreq *iwr, +@@ -955,6 +955,9 @@ static int wireless_process_ioctl(struct net *net, struct iwreq *iwr, else if (private) return private(dev, iwr, cmd, info, handler); } @@ -10,4 +10,5 @@ index 6cdb0544..7d1e09e3 100644 + if (dev->netdev_ops->ndo_do_ioctl) + return dev->netdev_ops->ndo_do_ioctl(dev, (struct ifreq *) iwr, cmd); return -EOPNOTSUPP; - } \ No newline at end of file + } + diff --git a/target/linux/generic/pending-5.4/203-kallsyms_uncompressed.patch b/target/linux/generic/pending-5.4/203-kallsyms_uncompressed.patch index c4c13b969..1f0c01768 100644 --- a/target/linux/generic/pending-5.4/203-kallsyms_uncompressed.patch +++ b/target/linux/generic/pending-5.4/203-kallsyms_uncompressed.patch @@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau --- a/init/Kconfig +++ b/init/Kconfig -@@ -1277,6 +1277,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW +@@ -1278,6 +1278,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW the unaligned access emulation. see arch/parisc/kernel/unaligned.c for reference diff --git a/target/linux/generic/pending-5.4/342-powerpc-Enable-kernel-XZ-compression-option-on-PPC_8.patch b/target/linux/generic/pending-5.4/342-powerpc-Enable-kernel-XZ-compression-option-on-PPC_8.patch index 26b8a8ce1..8d4c74219 100644 --- a/target/linux/generic/pending-5.4/342-powerpc-Enable-kernel-XZ-compression-option-on-PPC_8.patch +++ b/target/linux/generic/pending-5.4/342-powerpc-Enable-kernel-XZ-compression-option-on-PPC_8.patch @@ -14,7 +14,7 @@ Signed-off-by: Pawel Dembicki --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig -@@ -204,7 +204,7 @@ config PPC +@@ -205,7 +205,7 @@ config PPC select HAVE_KERNEL_GZIP select HAVE_KERNEL_LZMA if DEFAULT_UIMAGE select HAVE_KERNEL_LZO if DEFAULT_UIMAGE diff --git a/target/linux/generic/pending-5.4/445-mtd-spinand-gigadevice-Only-one-dummy-byte-in-QUA.patch b/target/linux/generic/pending-5.4/445-mtd-spinand-gigadevice-Only-one-dummy-byte-in-QUA.patch deleted file mode 100644 index 0391094d2..000000000 --- a/target/linux/generic/pending-5.4/445-mtd-spinand-gigadevice-Only-one-dummy-byte-in-QUA.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 5f312dcb38b8003d9711290366cd4b1def5daf3b Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sun, 16 Aug 2020 14:43:35 +0200 -Subject: [PATCH v2 445/447] mtd: spinand: gigadevice: Only one dummy byte in - QUADIO - -The datasheet only lists one dummy byte in the 0xEH operation for the -following chips: -* GD5F1GQ4xExxG -* GD5F1GQ4xFxxG -* GD5F1GQ4UAYIG -* GD5F4GQ4UAYIG - -Fixes: c93c613214ac ("mtd: spinand: add support for GigaDevice GD5FxGQ4xA") -Signed-off-by: Hauke Mehrtens ---- - drivers/mtd/nand/spi/gigadevice.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/drivers/mtd/nand/spi/gigadevice.c -+++ b/drivers/mtd/nand/spi/gigadevice.c -@@ -21,7 +21,7 @@ - #define GD5FXGQ4UXFXXG_STATUS_ECC_UNCOR_ERROR (7 << 4) - - static SPINAND_OP_VARIANTS(read_cache_variants, -- SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(0, 2, NULL, 0), -+ SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(0, 1, NULL, 0), - SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0), - SPINAND_PAGE_READ_FROM_CACHE_DUALIO_OP(0, 1, NULL, 0), - SPINAND_PAGE_READ_FROM_CACHE_X2_OP(0, 1, NULL, 0), -@@ -29,7 +29,7 @@ static SPINAND_OP_VARIANTS(read_cache_va - SPINAND_PAGE_READ_FROM_CACHE_OP(false, 0, 1, NULL, 0)); - - static SPINAND_OP_VARIANTS(read_cache_variants_f, -- SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(0, 2, NULL, 0), -+ SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(0, 1, NULL, 0), - SPINAND_PAGE_READ_FROM_CACHE_X4_OP_3A(0, 1, NULL, 0), - SPINAND_PAGE_READ_FROM_CACHE_DUALIO_OP(0, 1, NULL, 0), - SPINAND_PAGE_READ_FROM_CACHE_X2_OP_3A(0, 1, NULL, 0), diff --git a/target/linux/generic/pending-5.4/446-mtd-spinand-gigadevice-Add-QE-Bit.patch b/target/linux/generic/pending-5.4/446-mtd-spinand-gigadevice-Add-QE-Bit.patch deleted file mode 100644 index 034cd2a8f..000000000 --- a/target/linux/generic/pending-5.4/446-mtd-spinand-gigadevice-Add-QE-Bit.patch +++ /dev/null @@ -1,67 +0,0 @@ -From f72e99ada020a81e3e4ef79c0a83ede7e9d6c7b1 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sun, 16 Aug 2020 14:42:17 +0200 -Subject: [PATCH v2 446/447] mtd: spinand: gigadevice: Add QE Bit - -The following GigaDevice chips have the QE BIT in the feature flags, I -checked the datasheets, but did not try this. -* GD5F1GQ4xExxG -* GD5F1GQ4xFxxG -* GD5F1GQ4UAYIG -* GD5F4GQ4UAYIG - -The Quad operations like 0xEB mention that the QE bit has to be set. - -Fixes: c93c613214ac ("mtd: spinand: add support for GigaDevice GD5FxGQ4xA") -Signed-off-by: Hauke Mehrtens ---- - drivers/mtd/nand/spi/gigadevice.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - ---- a/drivers/mtd/nand/spi/gigadevice.c -+++ b/drivers/mtd/nand/spi/gigadevice.c -@@ -201,7 +201,7 @@ static const struct spinand_info gigadev - SPINAND_INFO_OP_VARIANTS(&read_cache_variants, - &write_cache_variants, - &update_cache_variants), -- 0, -+ SPINAND_HAS_QE_BIT, - SPINAND_ECCINFO(&gd5fxgq4xa_ooblayout, - gd5fxgq4xa_ecc_get_status)), - SPINAND_INFO("GD5F2GQ4xA", 0xF2, -@@ -210,7 +210,7 @@ static const struct spinand_info gigadev - SPINAND_INFO_OP_VARIANTS(&read_cache_variants, - &write_cache_variants, - &update_cache_variants), -- 0, -+ SPINAND_HAS_QE_BIT, - SPINAND_ECCINFO(&gd5fxgq4xa_ooblayout, - gd5fxgq4xa_ecc_get_status)), - SPINAND_INFO("GD5F4GQ4xA", 0xF4, -@@ -219,7 +219,7 @@ static const struct spinand_info gigadev - SPINAND_INFO_OP_VARIANTS(&read_cache_variants, - &write_cache_variants, - &update_cache_variants), -- 0, -+ SPINAND_HAS_QE_BIT, - SPINAND_ECCINFO(&gd5fxgq4xa_ooblayout, - gd5fxgq4xa_ecc_get_status)), - SPINAND_INFO("GD5F1GQ4UExxG", 0xd1, -@@ -228,7 +228,7 @@ static const struct spinand_info gigadev - SPINAND_INFO_OP_VARIANTS(&read_cache_variants, - &write_cache_variants, - &update_cache_variants), -- 0, -+ SPINAND_HAS_QE_BIT, - SPINAND_ECCINFO(&gd5fxgq4_variant2_ooblayout, - gd5fxgq4uexxg_ecc_get_status)), - SPINAND_INFO("GD5F1GQ4UFxxG", 0xb148, -@@ -237,7 +237,7 @@ static const struct spinand_info gigadev - SPINAND_INFO_OP_VARIANTS(&read_cache_variants_f, - &write_cache_variants, - &update_cache_variants), -- 0, -+ SPINAND_HAS_QE_BIT, - SPINAND_ECCINFO(&gd5fxgq4_variant2_ooblayout, - gd5fxgq4ufxxg_ecc_get_status)), - }; diff --git a/target/linux/generic/pending-5.4/613-netfilter_optional_tcp_window_check.patch b/target/linux/generic/pending-5.4/613-netfilter_optional_tcp_window_check.patch index 5ad13883e..711ffcd83 100644 --- a/target/linux/generic/pending-5.4/613-netfilter_optional_tcp_window_check.patch +++ b/target/linux/generic/pending-5.4/613-netfilter_optional_tcp_window_check.patch @@ -28,7 +28,7 @@ Signed-off-by: Felix Fietkau /* * Get the required data from the packet. */ -@@ -1123,7 +1129,7 @@ int nf_conntrack_tcp_packet(struct nf_co +@@ -1130,7 +1136,7 @@ int nf_conntrack_tcp_packet(struct nf_co IP_CT_TCP_FLAG_DATA_UNACKNOWLEDGED && timeouts[new_state] > timeouts[TCP_CONNTRACK_UNACK]) timeout = timeouts[TCP_CONNTRACK_UNACK]; diff --git a/target/linux/generic/pending-5.4/920-mangle_bootargs.patch b/target/linux/generic/pending-5.4/920-mangle_bootargs.patch index 7523b396b..45eabbd10 100644 --- a/target/linux/generic/pending-5.4/920-mangle_bootargs.patch +++ b/target/linux/generic/pending-5.4/920-mangle_bootargs.patch @@ -13,7 +13,7 @@ Signed-off-by: Imre Kaloz --- a/init/Kconfig +++ b/init/Kconfig -@@ -1662,6 +1662,15 @@ config EMBEDDED +@@ -1663,6 +1663,15 @@ config EMBEDDED an embedded system so certain expert options are available for configuration. diff --git a/target/linux/ipq806x/patches-5.4/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch b/target/linux/ipq806x/patches-5.4/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch index 5eb156077..204d6e62d 100644 --- a/target/linux/ipq806x/patches-5.4/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch +++ b/target/linux/ipq806x/patches-5.4/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch @@ -39,7 +39,7 @@ Signed-off-by: Sylwester Nawrocki --- a/drivers/opp/core.c +++ b/drivers/opp/core.c -@@ -2095,6 +2095,75 @@ put_table: +@@ -2101,6 +2101,75 @@ put_table: } /** diff --git a/target/linux/ipq806x/patches-5.4/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch b/target/linux/ipq806x/patches-5.4/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch index d4dd53d2d..122511e46 100644 --- a/target/linux/ipq806x/patches-5.4/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch +++ b/target/linux/ipq806x/patches-5.4/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch @@ -17,7 +17,7 @@ Signed-off-by: Georgi Djakov --- a/drivers/opp/core.c +++ b/drivers/opp/core.c -@@ -2135,6 +2135,7 @@ int dev_pm_opp_adjust_voltage(struct dev +@@ -2141,6 +2141,7 @@ int dev_pm_opp_adjust_voltage(struct dev struct opp_table *opp_table; struct dev_pm_opp *tmp_opp, *opp = ERR_PTR(-ENODEV); int r = 0; @@ -25,7 +25,7 @@ Signed-off-by: Georgi Djakov /* Find the opp_table */ opp_table = _find_opp_table(dev); -@@ -2164,8 +2165,17 @@ int dev_pm_opp_adjust_voltage(struct dev +@@ -2170,8 +2171,17 @@ int dev_pm_opp_adjust_voltage(struct dev goto adjust_unlock; opp->supplies->u_volt = u_volt; diff --git a/target/linux/ipq806x/patches-5.4/0067-generic-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/ipq806x/patches-5.4/0067-generic-Mangle-bootloader-s-kernel-arguments.patch index 0ca2c5f80..751ac10a1 100644 --- a/target/linux/ipq806x/patches-5.4/0067-generic-Mangle-bootloader-s-kernel-arguments.patch +++ b/target/linux/ipq806x/patches-5.4/0067-generic-Mangle-bootloader-s-kernel-arguments.patch @@ -22,7 +22,7 @@ Signed-off-by: Adrian Panella --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -1825,6 +1825,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN +@@ -1827,6 +1827,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN The command-line arguments provided by the boot loader will be appended to the the device tree bootargs property. diff --git a/target/linux/ipq806x/patches-5.4/096-PCI-qcom-Make-sure-PCIe-is-reset-before-init-for-rev.patch b/target/linux/ipq806x/patches-5.4/096-PCI-qcom-Make-sure-PCIe-is-reset-before-init-for-rev.patch new file mode 100644 index 000000000..2ca336b05 --- /dev/null +++ b/target/linux/ipq806x/patches-5.4/096-PCI-qcom-Make-sure-PCIe-is-reset-before-init-for-rev.patch @@ -0,0 +1,46 @@ +From 1960d75e3251659be8276529e4d01cf6993d9f4a Mon Sep 17 00:00:00 2001 +From: Ansuel Smith +Date: Tue, 1 Sep 2020 14:21:44 +0200 +Subject: [PATCH] PCI: qcom: Make sure PCIe is reset before init for rev 2.1.0 + +Qsdk U-Boot can incorrectly leave the PCIe interface in an undefined +state if bootm command is used instead of bootipq. This is caused by the +not deinit of PCIe when bootm is called. Reset the PCIe before init +anyway to fix this U-Boot bug. + +Signed-off-by: Ansuel Smith +Fixes: 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver") +Cc: stable@vger.kernel.org # v4.19+ +--- + drivers/pci/controller/dwc/pcie-qcom.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +--- a/drivers/pci/controller/dwc/pcie-qcom.c ++++ b/drivers/pci/controller/dwc/pcie-qcom.c +@@ -296,6 +296,9 @@ static void qcom_pcie_deinit_2_1_0(struc + reset_control_assert(res->por_reset); + reset_control_assert(res->ext_reset); + reset_control_assert(res->phy_reset); ++ ++ writel(1, pcie->parf + PCIE20_PARF_PHY_CTRL); ++ + regulator_bulk_disable(ARRAY_SIZE(res->supplies), res->supplies); + } + +@@ -308,6 +311,16 @@ static int qcom_pcie_init_2_1_0(struct q + u32 val; + int ret; + ++ /* reset the PCIe interface as uboot can leave it undefined state */ ++ reset_control_assert(res->pci_reset); ++ reset_control_assert(res->axi_reset); ++ reset_control_assert(res->ahb_reset); ++ reset_control_assert(res->por_reset); ++ reset_control_assert(res->ext_reset); ++ reset_control_assert(res->phy_reset); ++ ++ writel(1, pcie->parf + PCIE20_PARF_PHY_CTRL); ++ + ret = regulator_bulk_enable(ARRAY_SIZE(res->supplies), res->supplies); + if (ret < 0) { + dev_err(dev, "cannot enable regulators\n"); diff --git a/target/linux/lantiq/patches-5.4/0001-MIPS-lantiq-add-pcie-driver.patch b/target/linux/lantiq/patches-5.4/0001-MIPS-lantiq-add-pcie-driver.patch index 8fa0e9d5d..cb482bc52 100644 --- a/target/linux/lantiq/patches-5.4/0001-MIPS-lantiq-add-pcie-driver.patch +++ b/target/linux/lantiq/patches-5.4/0001-MIPS-lantiq-add-pcie-driver.patch @@ -5480,7 +5480,7 @@ Signed-off-by: John Crispin (transaction layer end-to-end CRC checking). --- a/include/linux/pci.h +++ b/include/linux/pci.h -@@ -1389,6 +1389,8 @@ void pci_walk_bus(struct pci_bus *top, i +@@ -1390,6 +1390,8 @@ void pci_walk_bus(struct pci_bus *top, i void *userdata); int pci_cfg_space_size(struct pci_dev *dev); unsigned char pci_bus_max_busnr(struct pci_bus *bus); diff --git a/target/linux/layerscape/Makefile b/target/linux/layerscape/Makefile index c5b27ad0c..903074782 100644 --- a/target/linux/layerscape/Makefile +++ b/target/linux/layerscape/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk BOARD:=layerscape BOARDNAME:=NXP Layerscape KERNEL_PATCHVER:=5.4 -FEATURES:=squashfs nand usb pcie gpio fpu ubifs ext4 +FEATURES:=squashfs nand usb pcie gpio fpu ubifs ext4 rootfs-part boot-part SUBTARGETS:=armv8_64b armv7 define Target/Description @@ -19,6 +19,6 @@ endef include $(INCLUDE_DIR)/target.mk DEFAULT_PACKAGES += kmod-usb3 kmod-usb-dwc3 kmod-usb-storage \ - partx-utils + mkf2fs e2fsprogs partx-utils $(eval $(call BuildTarget)) diff --git a/target/linux/layerscape/README b/target/linux/layerscape/README index 951f3e898..4bade4a9c 100644 --- a/target/linux/layerscape/README +++ b/target/linux/layerscape/README @@ -39,13 +39,14 @@ $ ./scripts/feeds install -a * Final firmware/image Path: bin/targets/layerscape// Firmware for flash: openwrt-layerscape----firmware.bin - Image for SD card: openwrt-layerscape----sdcard.img + Image for SD card: openwrt-layerscape----sdcard.img.gz + Sysupgrade images: openwrt-layerscape----sysupgrade.bin 3. Program NOR/QSPI flash or SD card ------------------------------------ -The firmware.bin or sdcard.img is an all-in-one image including all things for -OpenWrt staring up. (except LS1012AFRWY. Refer to 3.3.) +The firmware.bin or sdcard.img (after extract from gz) is an all-in-one image including all +things for OpenWrt staring up. (except LS1012AFRWY. Refer to 3.3.) If you want to install all things into flash, please use firmware.bin. If you want to install all things into SD card, please use sdcard.img. @@ -53,7 +54,7 @@ If you want to install all things into SD card, please use sdcard.img. --------------------------------- sdcard.img could be programmed to SD card in either u-boot environment or linux environment. After programming, configure the board to boot -from SD card. +from SD card. (sdcard.img images are gz-iped to save space. Please extract them first.) * u-boot environment @@ -71,6 +72,16 @@ from SD card. 3.2 Program firmware.bin to flash --------------------------------- +* LS1012FRDM (QSPI flash) + Board have only one nor flash bank. Those commands will replace stock + bootloader and firmware. Please refer point 4 for MAC recovery. + + => tftp a0000000 -firmware.bin + => sf probe 0:0 + => sf erase 0 +$filesize + => sf write a0000000 0 $filesize + => reset + * LS1012ARDB (QSPI flash) Start up from bank1, and program firmware to bank2 with below commands. Switch to bank2 to start up OpenWrt. @@ -155,6 +166,7 @@ from SD card. => setenv ethaddr 00:04:9F:04:65:4b => setenv eth1addr 00:04:9F:04:65:4c + => saveenv 5. Other references diff --git a/target/linux/layerscape/base-files/lib/preinit/79_move_config b/target/linux/layerscape/base-files/lib/preinit/79_move_config new file mode 100644 index 000000000..d691fa99f --- /dev/null +++ b/target/linux/layerscape/base-files/lib/preinit/79_move_config @@ -0,0 +1,26 @@ +. /lib/functions.sh +. /lib/upgrade/common.sh + +BOOTPART=/dev/mmcblk0p1 + +move_config() { + local board=$(board_name) + + case "$board" in + fsl,ls1012a-frwy-sdboot | \ + fsl,ls1021a-iot-sdboot | \ + fsl,ls1021a-twr-sdboot | \ + fsl,ls1043a-rdb-sdboot | \ + fsl,ls1046a-rdb-sdboot | \ + fsl,ls1088a-rdb-sdboot) + if [ -b $BOOTPART ]; then + mkdir -p /boot + mount -t ext4 -o rw,noatime $BOOTPART /boot 2>&1 + [ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" / + umount /boot + fi + ;; + esac +} + +boot_hook_add preinit_mount_root move_config diff --git a/target/linux/layerscape/base-files/lib/upgrade/platform.sh b/target/linux/layerscape/base-files/lib/upgrade/platform.sh index 8a136d943..a8d83de7e 100644 --- a/target/linux/layerscape/base-files/lib/upgrade/platform.sh +++ b/target/linux/layerscape/base-files/lib/upgrade/platform.sh @@ -8,83 +8,28 @@ RAMFS_COPY_DATA="/etc/fw_env.config /var/lock/fw_printenv.lock" REQUIRE_IMAGE_METADATA=1 -platform_check_image_sdboot() { - local diskdev partdev diff - - export_bootdevice && export_partdevice diskdev 0 || { - echo "Unable to determine upgrade device" - return 1 - } - - # get partitions table from boot device - get_partitions "/dev/$diskdev" bootdisk - - # get partitions table from sysupgrade.bin - dd if="$1" of=/tmp/image.bs bs=512b count=1 > /dev/null 2>&1 - sync - get_partitions /tmp/image.bs image - - # compare tables - diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)" - - rm -f /tmp/image.bs /tmp/partmap.bootdisk /tmp/partmap.image - - if [ -n "$diff" ]; then - echo "Partition layout has changed. Full image will be written." - ask_bool 0 "Abort" && exit 1 - return 0 - fi -} platform_do_upgrade_sdboot() { - local diskdev partdev diff + local diskdev partdev parttype=ext4 + local tar_file="$1" + local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$') + board_dir=${board_dir%/} export_bootdevice && export_partdevice diskdev 0 || { echo "Unable to determine upgrade device" return 1 } - if [ "$UPGRADE_OPT_SAVE_PARTITIONS" = "1" ]; then - # get partitions table from boot device - get_partitions "/dev/$diskdev" bootdisk - - # get partitions table from sysupgrade.bin - dd if="$1" of=/tmp/image.bs bs=512b count=1 > /dev/null 2>&1 - sync - get_partitions /tmp/image.bs image - - # compare tables - diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)" - else - diff=1 + if export_partdevice partdev 1; then + mount -t $parttype -o rw,noatime "/dev/$partdev" /mnt 2>&1 + echo "Writing kernel..." + tar xf $tar_file ${board_dir}/kernel -O > /mnt/fitImage + umount /mnt fi - if [ -n "$diff" ]; then - dd if="$1" of="/dev/$diskdev" bs=1024 count=4 > /dev/null 2>&1 - dd if="$1" of="$diskdev" bs=1024 skip=4 seek=16384 > /dev/null 2>&1 - sync - - # Separate removal and addtion is necessary; otherwise, partition 1 - # will be missing if it overlaps with the old partition 2 - partx -d - "/dev/$diskdev" - partx -a - "/dev/$diskdev" - - return 0 - fi - - # write kernel image - dd if="$1" of="$diskdev" bs=1024 skip=4 seek=16384 count=16384 > /dev/null 2>&1 - sync - - # iterate over each partition from the image and write it to the boot disk - while read part start size; do - if export_partdevice partdev $part; then - echo "Writing image to /dev/$partdev..." - dd if="$1" of="/dev/$partdev" bs=512 skip="$start" count="$size" > /dev/null 2>&1 - sync - else - echo "Unable to find partition $part device, skipped." - fi - done < /tmp/partmap.image + echo "Erasing rootfs..." + dd if=/dev/zero of=/dev/mmcblk0p2 bs=1M > /dev/null 2>&1 + echo "Writing rootfs..." + tar xf $tar_file ${board_dir}/root -O | dd of=/dev/mmcblk0p2 bs=512k > /dev/null 2>&1 } platform_do_upgrade_traverse_nandubi() { @@ -104,15 +49,35 @@ platform_do_upgrade_traverse_nandubi() { nand_do_upgrade "$1" || (echo "Upgrade failed, setting bootsys ${bootsys}" && fw_setenv bootsys $bootsys) } -platform_copy_config() { - local partdev parttype=ext4 +platform_copy_config_sdboot() { + local diskdev partdev parttype=ext4 + + export_bootdevice && export_partdevice diskdev 0 || { + echo "Unable to determine upgrade device" + return 1 + } if export_partdevice partdev 1; then - mount -t $parttype -o rw,noatime "/dev/$partdev" /mnt + mount -t $parttype -o rw,noatime "/dev/$partdev" /mnt 2>&1 + echo "Saving config backup..." cp -af "$UPGRADE_BACKUP" "/mnt/$BACKUP_FILE" umount /mnt fi } +platform_copy_config() { + local board=$(board_name) + + case "$board" in + fsl,ls1012a-frwy-sdboot | \ + fsl,ls1021a-iot-sdboot | \ + fsl,ls1021a-twr-sdboot | \ + fsl,ls1043a-rdb-sdboot | \ + fsl,ls1046a-rdb-sdboot | \ + fsl,ls1088a-rdb-sdboot) + platform_copy_config_sdboot + ;; + esac +} platform_check_image() { local board=$(board_name) @@ -123,20 +88,18 @@ platform_check_image() { return $? ;; fsl,ls1012a-frdm | \ - fsl,ls1012a-rdb | \ - fsl,ls1021a-twr | \ - fsl,ls1043a-rdb | \ - fsl,ls1046a-rdb | \ - fsl,ls1088a-rdb | \ - fsl,ls2088a-rdb) - return 0 - ;; fsl,ls1012a-frwy-sdboot | \ + fsl,ls1012a-rdb | \ + fsl,ls1021a-iot-sdboot | \ + fsl,ls1021a-twr | \ fsl,ls1021a-twr-sdboot | \ + fsl,ls1043a-rdb | \ fsl,ls1043a-rdb-sdboot | \ + fsl,ls1046a-rdb | \ fsl,ls1046a-rdb-sdboot | \ - fsl,ls1088a-rdb-sdboot) - platform_check_image_sdboot "$1" + fsl,ls1088a-rdb | \ + fsl,ls1088a-rdb-sdboot | \ + fsl,ls2088a-rdb) return 0 ;; *) @@ -169,6 +132,7 @@ platform_do_upgrade() { default_do_upgrade "$1" ;; fsl,ls1012a-frwy-sdboot | \ + fsl,ls1021a-iot-sdboot | \ fsl,ls1021a-twr-sdboot | \ fsl,ls1043a-rdb-sdboot | \ fsl,ls1046a-rdb-sdboot | \ diff --git a/target/linux/layerscape/image/Makefile b/target/linux/layerscape/image/Makefile index 8a38a2504..bfc4af4ca 100644 --- a/target/linux/layerscape/image/Makefile +++ b/target/linux/layerscape/image/Makefile @@ -7,12 +7,21 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk +LS_SD_KERNELPART_SIZE = 40 +LS_SD_KERNELPART_OFFSET = 16 LS_SD_ROOTFSPART_OFFSET = 64 LS_SD_IMAGE_SIZE = $(shell echo $$((($(LS_SD_ROOTFSPART_OFFSET) + \ - $(CONFIG_TARGET_ROOTFS_PARTSIZE)) * 1024 * 1024))) + $(CONFIG_TARGET_ROOTFS_PARTSIZE))))) -# The limitation of flash sysupgrade.bin is 16MB kernel + 32MB rootfs -LS_SYSUPGRADE_IMAGE_SIZE = 48m +# The limitation of flash sysupgrade.bin is 1MB dtb + 16MB kernel + 32MB rootfs +LS_SYSUPGRADE_IMAGE_SIZE = 49m + +define Image/Prepare + # Build .dtb for all boards we may run on + $(foreach dts,$(DEVICE_DTS_LIST), + $(call Image/BuildDTB,$(DTS_DIR)/$(dts).dts,$(DTS_DIR)/$(dts).dtb) + ) +endef define Build/ls-clean rm -f $@ @@ -23,12 +32,21 @@ define Build/ls-append endef define Build/ls-append-dtb - $(call Image/BuildDTB,$(DTS_DIR)/$(1).dts,$(DTS_DIR)/$(1).dtb) dd if=$(DTS_DIR)/$(1).dtb >> $@ endef +define Build/ls-append-kernel + mkdir -p $@.tmp && \ + cp $(IMAGE_KERNEL) $@.tmp/fitImage && \ + make_ext4fs -J -L kernel -l "$(LS_SD_KERNELPART_SIZE)M" "$@.kernel.part" "$@.tmp" && \ + dd if=$@.kernel.part >> $@ && \ + rm -rf $@.tmp && \ + rm -f $@.kernel.part +endef + define Build/ls-append-sdhead ./gen_sdcard_head_img.sh $(STAGING_DIR_IMAGE)/$(1)-sdcard-head.img \ + $(LS_SD_KERNELPART_OFFSET) $(LS_SD_KERNELPART_SIZE) \ $(LS_SD_ROOTFSPART_OFFSET) $(CONFIG_TARGET_ROOTFS_PARTSIZE) dd if=$(STAGING_DIR_IMAGE)/$(1)-sdcard-head.img >> $@ endef @@ -46,6 +64,19 @@ define Build/traverse-fit @mv -f $@.new $@ endef +define Device/fix-sysupgrade + DEVICE_COMPAT_VERSION := 2.0 + DEVICE_COMPAT_MESSAGE := DTB was added to sysupgrade. Image format is different. \ + To use sysupgrade You need to change firmware partition in bootargs to "49m@0xf00000(firmware)" and saveenv. \ + After that, You can use "sysupgrade -F". +endef + +define Device/rework-sdcard-images + DEVICE_COMPAT_VERSION := 2.0 + DEVICE_COMPAT_MESSAGE := SD-card images were changed to squashfs + ext4 overlay combined images. \ + It is required to flash the entire sd-card again and manually copy config. +endef + include $(SUBTARGET).mk $(eval $(call BuildImage)) diff --git a/target/linux/layerscape/image/armv7.mk b/target/linux/layerscape/image/armv7.mk index 8a8699739..776a6e5ac 100644 --- a/target/linux/layerscape/image/armv7.mk +++ b/target/linux/layerscape/image/armv7.mk @@ -16,12 +16,22 @@ define Device/Default DEVICE_DTS = $(lastword $(subst _, ,$(1))) SUPPORTED_DEVICES = $(subst _,$(comma),$(1)) IMAGE_SIZE := 64m - IMAGE/sysupgrade.bin := append-kernel | pad-to 16M | \ + IMAGE/sysupgrade.bin = \ + ls-append-dtb $$(DEVICE_DTS) | pad-to 1M | \ + append-kernel | pad-to 17M | \ append-rootfs | pad-rootfs | \ check-size $(LS_SYSUPGRADE_IMAGE_SIZE) | append-metadata endef +define Device/fsl-sdboot + $(Device/rework-sdcard-images) + KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb + IMAGES := sdcard.img.gz sysupgrade.bin + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata +endef + define Device/fsl_ls1021a-twr + $(Device/fix-sysupgrade) DEVICE_VENDOR := NXP DEVICE_MODEL := TWR-LS1021A DEVICE_VARIANT := Default @@ -38,43 +48,34 @@ endef TARGET_DEVICES += fsl_ls1021a-twr define Device/fsl_ls1021a-twr-sdboot + $(Device/fsl-sdboot) DEVICE_VENDOR := NXP DEVICE_MODEL := TWR-LS1021A DEVICE_VARIANT := SD Card Boot DEVICE_DTS := ls1021a-twr - FILESYSTEMS := ext4 - IMAGES := sdcard.img sysupgrade.bin - IMAGE/sdcard.img := \ + IMAGE/sdcard.img.gz := \ ls-clean | \ ls-append-sdhead $(1) | pad-to 4K | \ ls-append $(1)-uboot.bin | pad-to 3M | \ - ls-append $(1)-uboot-env.bin | pad-to 15M | \ - ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ - append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ - append-rootfs | check-size $(LS_SD_IMAGE_SIZE) - IMAGE/sysupgrade.bin := \ - ls-clean | \ - ls-append-sdhead $(1) | pad-to 16M | \ - append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ - append-rootfs | check-size $(LS_SD_IMAGE_SIZE) | append-metadata + ls-append $(1)-uboot-env.bin | pad-to 16M | \ + ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ + append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip endef TARGET_DEVICES += fsl_ls1021a-twr-sdboot define Device/fsl_ls1021a-iot-sdboot + $(Device/fsl-sdboot) DEVICE_VENDOR := NXP DEVICE_MODEL := LS1021A-IoT DEVICE_VARIANT := SD Card Boot DEVICE_DTS := ls1021a-iot - FILESYSTEMS := ext4 SUPPORTED_DEVICES := - IMAGES := sdcard.img - IMAGE/sdcard.img := \ + IMAGE/sdcard.img.gz := \ ls-clean | \ ls-append-sdhead $(1) | pad-to 4K | \ ls-append $(1)-uboot.bin | pad-to 1M | \ - ls-append $(1)-uboot-env.bin | pad-to 15M | \ - ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ - append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ - append-rootfs | check-size $(LS_SD_IMAGE_SIZE) + ls-append $(1)-uboot-env.bin | pad-to 16M | \ + ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ + append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip endef TARGET_DEVICES += fsl_ls1021a-iot-sdboot diff --git a/target/linux/layerscape/image/armv8_64b.mk b/target/linux/layerscape/image/armv8_64b.mk index 1bf956584..23af3e26a 100644 --- a/target/linux/layerscape/image/armv8_64b.mk +++ b/target/linux/layerscape/image/armv8_64b.mk @@ -15,11 +15,20 @@ define Device/Default DEVICE_DTS = freescale/$(subst _,-,$(1)) SUPPORTED_DEVICES = $(subst _,$(comma),$(1)) IMAGE_SIZE := 64m - IMAGE/sysupgrade.bin := append-kernel | pad-to 16M | \ + IMAGE/sysupgrade.bin = \ + ls-append-dtb $$(DEVICE_DTS) | pad-to 1M | \ + append-kernel | pad-to 17M | \ append-rootfs | pad-rootfs | \ check-size $(LS_SYSUPGRADE_IMAGE_SIZE) | append-metadata endef +define Device/fsl-sdboot + $(Device/rework-sdcard-images) + KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb + IMAGES := sdcard.img.gz sysupgrade.bin + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata +endef + define Device/fsl_ls1012a-frdm DEVICE_VENDOR := NXP DEVICE_MODEL := FRDM-LS1012A @@ -37,7 +46,8 @@ define Device/fsl_ls1012a-frdm ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ append-kernel | pad-to $$(BLOCKSIZE) | \ append-rootfs | pad-rootfs | check-size - IMAGE/sysupgrade.bin := append-kernel | pad-to $$(BLOCKSIZE) | \ + IMAGE/sysupgrade.bin := \ + append-kernel | pad-to $$(BLOCKSIZE) | \ append-rootfs | pad-rootfs | \ check-size $(LS_SYSUPGRADE_IMAGE_SIZE) | append-metadata KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb @@ -46,6 +56,7 @@ endef TARGET_DEVICES += fsl_ls1012a-frdm define Device/fsl_ls1012a-rdb + $(Device/fix-sysupgrade) DEVICE_VENDOR := NXP DEVICE_MODEL := LS1012A-RDB DEVICE_PACKAGES += \ @@ -65,6 +76,7 @@ endef TARGET_DEVICES += fsl_ls1012a-rdb define Device/fsl_ls1012a-frwy-sdboot + $(Device/fsl-sdboot) DEVICE_VENDOR := NXP DEVICE_MODEL := FRWY-LS1012A DEVICE_PACKAGES += \ @@ -72,8 +84,7 @@ define Device/fsl_ls1012a-frwy-sdboot tfa-ls1012a-frwy-sdboot \ kmod-ppfe DEVICE_DTS := freescale/fsl-ls1012a-frwy - FILESYSTEMS := ext4 - IMAGES := firmware.bin sdcard.img sysupgrade.bin + IMAGES += firmware.bin IMAGE/firmware.bin := \ ls-clean | \ ls-append $(1)-bl2.pbl | pad-to 128K | \ @@ -81,28 +92,26 @@ define Device/fsl_ls1012a-frwy-sdboot ls-append $(1)-fip.bin | pad-to 1856K | \ ls-append $(1)-uboot-env.bin | pad-to 2048K | \ check-size 2097153 - IMAGE/sdcard.img := \ - ls-clean | \ - ls-append-sdhead $(1) | pad-to 15M | \ - ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ - append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ - append-rootfs | check-size $(LS_SD_IMAGE_SIZE) - IMAGE/sysupgrade.bin := \ + IMAGE/sdcard.img.gz := \ ls-clean | \ ls-append-sdhead $(1) | pad-to 16M | \ - append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ - append-rootfs | check-size $(LS_SD_IMAGE_SIZE) | append-metadata + ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ + append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip endef TARGET_DEVICES += fsl_ls1012a-frwy-sdboot define Device/fsl_ls1043a-rdb + $(Device/fix-sysupgrade) DEVICE_VENDOR := NXP DEVICE_MODEL := LS1043A-RDB DEVICE_VARIANT := Default DEVICE_PACKAGES += \ layerscape-fman \ tfa-ls1043a-rdb \ - fmc fmc-eth-config + fmc fmc-eth-config \ + kmod-ahci-qoriq \ + kmod-hwmon-ina2xx \ + kmod-hwmon-lm90 DEVICE_DTS := freescale/fsl-ls1043a-rdb-sdk IMAGE/firmware.bin := \ ls-clean | \ @@ -117,42 +126,42 @@ endef TARGET_DEVICES += fsl_ls1043a-rdb define Device/fsl_ls1043a-rdb-sdboot + $(Device/fsl-sdboot) DEVICE_VENDOR := NXP DEVICE_MODEL := LS1043A-RDB DEVICE_VARIANT := SD Card Boot DEVICE_PACKAGES += \ layerscape-fman \ tfa-ls1043a-rdb-sdboot \ - fmc fmc-eth-config + fmc fmc-eth-config \ + kmod-ahci-qoriq \ + kmod-hwmon-ina2xx \ + kmod-hwmon-lm90 DEVICE_DTS := freescale/fsl-ls1043a-rdb-sdk - FILESYSTEMS := ext4 - IMAGES := sdcard.img sysupgrade.bin - IMAGE/sdcard.img := \ + IMAGE/sdcard.img.gz := \ ls-clean | \ ls-append-sdhead $(1) | pad-to 4K | \ ls-append $(1)-bl2.pbl | pad-to 1M | \ ls-append $(1)-fip.bin | pad-to 5M | \ ls-append $(1)-uboot-env.bin | pad-to 9M | \ - ls-append fsl_ls1043a-rdb-fman.bin | pad-to 15M | \ - ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ - append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ - append-rootfs | check-size $(LS_SD_IMAGE_SIZE) - IMAGE/sysupgrade.bin := \ - ls-clean | \ - ls-append-sdhead $(1) | pad-to 16M | \ - append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ - append-rootfs | check-size $(LS_SD_IMAGE_SIZE) | append-metadata + ls-append fsl_ls1043a-rdb-fman.bin | pad-to 16M | \ + ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ + append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip endef TARGET_DEVICES += fsl_ls1043a-rdb-sdboot define Device/fsl_ls1046a-rdb + $(Device/fix-sysupgrade) DEVICE_VENDOR := NXP DEVICE_MODEL := LS1046A-RDB DEVICE_VARIANT := Default DEVICE_PACKAGES += \ layerscape-fman \ tfa-ls1046a-rdb \ - fmc fmc-eth-config + fmc fmc-eth-config \ + kmod-ahci-qoriq \ + kmod-hwmon-ina2xx \ + kmod-hwmon-lm90 DEVICE_DTS := freescale/fsl-ls1046a-rdb-sdk IMAGE/firmware.bin := \ ls-clean | \ @@ -167,35 +176,32 @@ endef TARGET_DEVICES += fsl_ls1046a-rdb define Device/fsl_ls1046a-rdb-sdboot + $(Device/fsl-sdboot) DEVICE_VENDOR := NXP DEVICE_MODEL := LS1046A-RDB DEVICE_VARIANT := SD Card Boot DEVICE_PACKAGES += \ layerscape-fman \ tfa-ls1046a-rdb-sdboot \ - fmc fmc-eth-config + fmc fmc-eth-config \ + kmod-ahci-qoriq \ + kmod-hwmon-ina2xx \ + kmod-hwmon-lm90 DEVICE_DTS := freescale/fsl-ls1046a-rdb-sdk - FILESYSTEMS := ext4 - IMAGES := sdcard.img sysupgrade.bin - IMAGE/sdcard.img := \ + IMAGE/sdcard.img.gz := \ ls-clean | \ ls-append-sdhead $(1) | pad-to 4K | \ ls-append $(1)-bl2.pbl | pad-to 1M | \ ls-append $(1)-fip.bin | pad-to 5M | \ ls-append $(1)-uboot-env.bin | pad-to 9M | \ - ls-append fsl_ls1046a-rdb-fman.bin | pad-to 15M | \ - ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ - append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ - append-rootfs | check-size $(LS_SD_IMAGE_SIZE) - IMAGE/sysupgrade.bin := \ - ls-clean | \ - ls-append-sdhead $(1) | pad-to 16M | \ - append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ - append-rootfs | check-size $(LS_SD_IMAGE_SIZE) | append-metadata + ls-append fsl_ls1046a-rdb-fman.bin | pad-to 16M | \ + ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ + append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip endef TARGET_DEVICES += fsl_ls1046a-rdb-sdboot define Device/fsl_ls1088a-rdb + $(Device/fix-sysupgrade) DEVICE_VENDOR := NXP DEVICE_MODEL := LS1088A-RDB DEVICE_VARIANT := Default @@ -203,7 +209,10 @@ define Device/fsl_ls1088a-rdb layerscape-mc \ layerscape-dpl \ tfa-ls1088a-rdb \ - restool + restool \ + kmod-ahci-qoriq \ + kmod-hwmon-ina2xx \ + kmod-hwmon-lm90 IMAGE/firmware.bin := \ ls-clean | \ ls-append $(1)-bl2.pbl | pad-to 1M | \ @@ -219,6 +228,7 @@ endef TARGET_DEVICES += fsl_ls1088a-rdb define Device/fsl_ls1088a-rdb-sdboot + $(Device/fsl-sdboot) DEVICE_VENDOR := NXP DEVICE_MODEL := LS1088A-RDB DEVICE_VARIANT := SD Card Boot @@ -226,11 +236,12 @@ define Device/fsl_ls1088a-rdb-sdboot layerscape-mc \ layerscape-dpl \ tfa-ls1088a-rdb-sdboot \ - restool + restool \ + kmod-ahci-qoriq \ + kmod-hwmon-ina2xx \ + kmod-hwmon-lm90 DEVICE_DTS := freescale/fsl-ls1088a-rdb - FILESYSTEMS := ext4 - IMAGES := sdcard.img sysupgrade.bin - IMAGE/sdcard.img := \ + IMAGE/sdcard.img.gz := \ ls-clean | \ ls-append-sdhead $(1) | pad-to 4K | \ ls-append $(1)-bl2.pbl | pad-to 1M | \ @@ -238,26 +249,22 @@ define Device/fsl_ls1088a-rdb-sdboot ls-append $(1)-uboot-env.bin | pad-to 10M | \ ls-append fsl_ls1088a-rdb-mc.itb | pad-to 13M | \ ls-append fsl_ls1088a-rdb-dpl.dtb | pad-to 14M | \ - ls-append fsl_ls1088a-rdb-dpc.dtb | pad-to 15M | \ - ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ - append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ - append-rootfs | check-size $(LS_SD_IMAGE_SIZE) - IMAGE/sysupgrade.bin := \ - ls-clean | \ - ls-append-sdhead $(1) | pad-to 16M | \ - append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ - append-rootfs | check-size $(LS_SD_IMAGE_SIZE) | append-metadata + ls-append fsl_ls1088a-rdb-dpc.dtb | pad-to 16M | \ + ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ + append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip endef TARGET_DEVICES += fsl_ls1088a-rdb-sdboot define Device/fsl_ls2088a-rdb + $(Device/fix-sysupgrade) DEVICE_VENDOR := NXP DEVICE_MODEL := LS2088ARDB DEVICE_PACKAGES += \ layerscape-mc \ layerscape-dpl \ tfa-ls2088a-rdb \ - restool + restool \ + kmod-ahci-qoriq IMAGE/firmware.bin := \ ls-clean | \ ls-append $(1)-bl2.pbl | pad-to 1M | \ diff --git a/target/linux/layerscape/image/gen_sdcard_head_img.sh b/target/linux/layerscape/image/gen_sdcard_head_img.sh index 08ab4497d..d3a8fd2d1 100755 --- a/target/linux/layerscape/image/gen_sdcard_head_img.sh +++ b/target/linux/layerscape/image/gen_sdcard_head_img.sh @@ -7,16 +7,18 @@ # set -x -[ $# -eq 3 ] || { - echo "SYNTAX: $0 " +[ $# -eq 5 ] || { + echo "SYNTAX: $0 " exit 1 } OUTPUT="$1" -ROOTFSOFFSET="$(($2 * 1024))" -ROOTFSSIZE="$3" +KERNELOFFSET="$(($2 * 1024))" +KERNELSIZE="$3" +ROOTFSOFFSET="$(($4 * 1024))" +ROOTFSSIZE="$5" head=4 -sect=16 +sect=63 -set $(ptgen -o $OUTPUT -h $head -s $sect -l $ROOTFSOFFSET -t 83 -p ${ROOTFSSIZE}M) +set $(ptgen -o $OUTPUT -h $head -s $sect -t 83 -p ${KERNELSIZE}M@${KERNELOFFSET} -p ${ROOTFSSIZE}M@${ROOTFSOFFSET}) diff --git a/target/linux/layerscape/modules.mk b/target/linux/layerscape/modules.mk index 5f2d472c9..4d713b597 100644 --- a/target/linux/layerscape/modules.mk +++ b/target/linux/layerscape/modules.mk @@ -5,6 +5,22 @@ # See /LICENSE for more information. # +define KernelPackage/ahci-qoriq + SUBMENU:=$(BLOCK_MENU) + TITLE:=Freescale QorIQ AHCI SATA support + KCONFIG:=CONFIG_AHCI_QORIQ + FILES:=$(LINUX_DIR)/drivers/ata/ahci_qoriq.ko + AUTOLOAD:=$(call AutoLoad,40,ahci-qoriq,1) + $(call AddDepends/ata,+kmod-ata-ahci-platform @TARGET_layerscape) +endef + +define KernelPackage/ahci-qoriq/description + This option enables support for the Freescale QorIQ AHCI SoC's + onboard AHCI SATA. +endef + +$(eval $(call KernelPackage,ahci-qoriq)) + define KernelPackage/ppfe SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=Freescale PPFE Driver support diff --git a/target/linux/layerscape/patches-5.4/302-dts-0119-arm64-dts-lx2160a-add-more-thermal-zone-support.patch b/target/linux/layerscape/patches-5.4/302-dts-0119-arm64-dts-lx2160a-add-more-thermal-zone-support.patch new file mode 100644 index 000000000..5a2945156 --- /dev/null +++ b/target/linux/layerscape/patches-5.4/302-dts-0119-arm64-dts-lx2160a-add-more-thermal-zone-support.patch @@ -0,0 +1,184 @@ +From eba73069e7f6ac3bcb3669d980994ec42ddd810a Mon Sep 17 00:00:00 2001 +From: Yuantian Tang +Date: Thu, 16 Apr 2020 17:40:06 +0800 +Subject: [PATCH] arm64: dts: lx2160a: add more thermal zone support + +There are 7 thermal zones in lx2160a soc. Add the +rest thermal zone node to enable them. +Also correct one of the values for tmu-calibration property. + +Signed-off-by: Yuantian Tang +--- + .../arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 130 +++++++++++++++++- + 1 file changed, 125 insertions(+), 5 deletions(-) + +--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi ++++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi +@@ -440,19 +440,19 @@ + }; + + thermal-zones { +- core_thermal1: core-thermal1 { ++ cluster6-7 { + polling-delay-passive = <1000>; + polling-delay = <5000>; + thermal-sensors = <&tmu 0>; + + trips { +- core_cluster_alert: core-cluster-alert { ++ cluster6_7_alert: cluster6-7-alert { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + +- core_cluster_crit: core-cluster-crit { ++ cluster6_7_crit: cluster6-7-crit { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; +@@ -461,7 +461,7 @@ + + cooling-maps { + map0 { +- trip = <&core_cluster_alert>; ++ trip = <&cluster6_7_alert>; + cooling-device = + <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, +@@ -482,6 +482,126 @@ + }; + }; + }; ++ ++ ddr-cluster5 { ++ polling-delay-passive = <1000>; ++ polling-delay = <5000>; ++ thermal-sensors = <&tmu 1>; ++ ++ trips { ++ ddr-cluster5-alert { ++ temperature = <85000>; ++ hysteresis = <2000>; ++ type = "passive"; ++ }; ++ ++ ddr-cluster5-crit { ++ temperature = <95000>; ++ hysteresis = <2000>; ++ type = "critical"; ++ }; ++ }; ++ }; ++ ++ wriop { ++ polling-delay-passive = <1000>; ++ polling-delay = <5000>; ++ thermal-sensors = <&tmu 2>; ++ ++ trips { ++ wriop-alert { ++ temperature = <85000>; ++ hysteresis = <2000>; ++ type = "passive"; ++ }; ++ ++ wriop-crit { ++ temperature = <95000>; ++ hysteresis = <2000>; ++ type = "critical"; ++ }; ++ }; ++ }; ++ ++ dce-qbman-hsio2 { ++ polling-delay-passive = <1000>; ++ polling-delay = <5000>; ++ thermal-sensors = <&tmu 3>; ++ ++ trips { ++ dce-qbman-alert { ++ temperature = <85000>; ++ hysteresis = <2000>; ++ type = "passive"; ++ }; ++ ++ dce-qbman-crit { ++ temperature = <95000>; ++ hysteresis = <2000>; ++ type = "critical"; ++ }; ++ }; ++ }; ++ ++ ccn-dpaa-tbu { ++ polling-delay-passive = <1000>; ++ polling-delay = <5000>; ++ thermal-sensors = <&tmu 4>; ++ ++ trips { ++ ccn-dpaa-alert { ++ temperature = <85000>; ++ hysteresis = <2000>; ++ type = "passive"; ++ }; ++ ++ ccn-dpaa-crit { ++ temperature = <95000>; ++ hysteresis = <2000>; ++ type = "critical"; ++ }; ++ }; ++ }; ++ ++ cluster4-hsio3 { ++ polling-delay-passive = <1000>; ++ polling-delay = <5000>; ++ thermal-sensors = <&tmu 5>; ++ ++ trips { ++ clust4-hsio3-alert { ++ temperature = <85000>; ++ hysteresis = <2000>; ++ type = "passive"; ++ }; ++ ++ clust4-hsio3-crit { ++ temperature = <95000>; ++ hysteresis = <2000>; ++ type = "critical"; ++ }; ++ }; ++ }; ++ ++ cluster2-3 { ++ polling-delay-passive = <1000>; ++ polling-delay = <5000>; ++ thermal-sensors = <&tmu 6>; ++ ++ trips { ++ cluster2-3-alert { ++ temperature = <85000>; ++ hysteresis = <2000>; ++ type = "passive"; ++ }; ++ ++ cluster2-3-crit { ++ temperature = <95000>; ++ hysteresis = <2000>; ++ type = "critical"; ++ }; ++ }; ++ }; + }; + + soc { +@@ -760,7 +880,7 @@ + /* Calibration data group 1 */ + <0x00000000 0x00000035 + /* Calibration data group 2 */ +- 0x00010001 0x00000154>; ++ 0x00000001 0x00000154>; + little-endian; + #thermal-sensor-cells = <1>; + }; diff --git a/target/linux/layerscape/patches-5.4/302-dts-0120-arm64-dts-ls1046a-fix-ippdexpcr-offset-not-correct.patch b/target/linux/layerscape/patches-5.4/302-dts-0120-arm64-dts-ls1046a-fix-ippdexpcr-offset-not-correct.patch new file mode 100644 index 000000000..3fb96c913 --- /dev/null +++ b/target/linux/layerscape/patches-5.4/302-dts-0120-arm64-dts-ls1046a-fix-ippdexpcr-offset-not-correct.patch @@ -0,0 +1,25 @@ +From d589ed7b9aa91de94eb558ae83ccebd59b881d61 Mon Sep 17 00:00:00 2001 +From: Ran Wang +Date: Tue, 10 Mar 2020 21:06:29 +0800 +Subject: [PATCH] arm64: dts: ls1046a: fix ippdexpcr offset not correct + +The wrong offset of ippdexpcr in dtsi causes RCPM driver did not +program ippdexpcr properly, which lead to LPM20 cannot exit by wakeup +source. + +Signed-off-by: Ran Wang +--- + arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi ++++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi +@@ -808,7 +808,7 @@ + + rcpm: rcpm@1ee208c { + compatible = "fsl,ls1046a-rcpm", "fsl,qoriq-rcpm-2.1+"; +- reg = <0x0 0x1ee208c 0x0 0x4>; ++ reg = <0x0 0x1ee2140 0x0 0x4>; + #fsl,rcpm-wakeup-cells = <1>; + }; + diff --git a/target/linux/layerscape/patches-5.4/302-dts-0121-arm64-dts-ls1043a-update-USB-nodes-status-to-match-b.patch b/target/linux/layerscape/patches-5.4/302-dts-0121-arm64-dts-ls1043a-update-USB-nodes-status-to-match-b.patch new file mode 100644 index 000000000..952238f2c --- /dev/null +++ b/target/linux/layerscape/patches-5.4/302-dts-0121-arm64-dts-ls1043a-update-USB-nodes-status-to-match-b.patch @@ -0,0 +1,78 @@ +From 2dfd145470894296d70873942ae056340e3fd78d Mon Sep 17 00:00:00 2001 +From: Ran Wang +Date: Tue, 7 Jul 2020 15:40:31 +0800 +Subject: [PATCH] arm64: dts: ls1043a: update USB nodes status to match board + config +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +ls1043a-rdb and ls1043a-qds board’s default HW config (such as +pin mux selection) would not enable some USB controllers’ +data path, which causing over-current detected on those +controllers. This will hit the case of ‘xhci driver prevent bus suspend +if a root hub port detected over-current condition’, causing system +failed to be suspended. So disable them in device tree to resolve this +issue. + +Signed-off-by: Ran Wang +Signed-off-by: Shawn Guo +--- + arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts | 4 ++++ + arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts | 8 ++++++++ + arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 3 +++ + 3 files changed, 15 insertions(+) + +--- a/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts ++++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts +@@ -167,6 +167,10 @@ + }; + }; + ++&usb0 { ++ status = "okay"; ++}; ++ + #include "fsl-ls1043-post.dtsi" + + &fman0 { +--- a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts ++++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts +@@ -212,3 +212,11 @@ + }; + }; + }; ++ ++&usb0 { ++ status = "okay"; ++}; ++ ++&usb1 { ++ status = "okay"; ++}; +--- a/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi ++++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi +@@ -706,6 +706,7 @@ + snps,host-vbus-glitches; + configure-gfladj; + dma-coherent; ++ status = "disabled"; + }; + + usb1: usb3@3000000 { +@@ -721,6 +722,7 @@ + snps,host-vbus-glitches; + configure-gfladj; + dma-coherent; ++ status = "disabled"; + }; + + usb2: usb3@3100000 { +@@ -736,6 +738,7 @@ + snps,host-vbus-glitches; + configure-gfladj; + dma-coherent; ++ status = "disabled"; + }; + + sata: sata@3200000 { diff --git a/target/linux/layerscape/patches-5.4/302-dts-0122-arm64-dts-ls1043a-remove-thermal-zone-5-from-dts.patch b/target/linux/layerscape/patches-5.4/302-dts-0122-arm64-dts-ls1043a-remove-thermal-zone-5-from-dts.patch new file mode 100644 index 000000000..0a9f683ea --- /dev/null +++ b/target/linux/layerscape/patches-5.4/302-dts-0122-arm64-dts-ls1043a-remove-thermal-zone-5-from-dts.patch @@ -0,0 +1,24 @@ +From aa5e9dc53636e5ae40fc1460c7d3897c2d8588fe Mon Sep 17 00:00:00 2001 +From: Yuantian Tang +Date: Mon, 9 Mar 2020 10:44:54 +0800 +Subject: [PATCH] arm64: dts: ls1043a: remove thermal zone 5 from dts + +Thermal monitor zone 5 does not exist. So remove it +from dts. + +Signed-off-by: Yuantian +--- + arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 4 ---- + 1 file changed, 4 deletions(-) + +--- a/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi ++++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi +@@ -918,8 +918,4 @@ + thermal-zone4 { + status = "okay"; + }; +- +- thermal-zone5 { +- status = "okay"; +- }; + }; diff --git a/target/linux/layerscape/patches-5.4/701-net-0147-bus-fsl-mc-Allocate-mc-portal-from-root-dprc-contain.patch b/target/linux/layerscape/patches-5.4/701-net-0147-bus-fsl-mc-Allocate-mc-portal-from-root-dprc-contain.patch index 655c4780d..8fd2bb273 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0147-bus-fsl-mc-Allocate-mc-portal-from-root-dprc-contain.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0147-bus-fsl-mc-Allocate-mc-portal-from-root-dprc-contain.patch @@ -22,7 +22,7 @@ Signed-off-by: Bharat Bhushan --- a/drivers/bus/fsl-mc/mc-io.c +++ b/drivers/bus/fsl-mc/mc-io.c -@@ -169,14 +169,16 @@ int __must_check fsl_mc_portal_allocate( +@@ -174,14 +174,16 @@ int __must_check fsl_mc_portal_allocate( int error = -EINVAL; struct fsl_mc_resource *resource = NULL; struct fsl_mc_io *mc_io = NULL; diff --git a/target/linux/layerscape/patches-5.4/801-audio-0001-Revert-ASoC-fsl_sai-Fix-noise-when-using-EDMA.patch b/target/linux/layerscape/patches-5.4/801-audio-0001-Revert-ASoC-fsl_sai-Fix-noise-when-using-EDMA.patch index 5b51fa279..98c9214ea 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0001-Revert-ASoC-fsl_sai-Fix-noise-when-using-EDMA.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0001-Revert-ASoC-fsl_sai-Fix-noise-when-using-EDMA.patch @@ -28,7 +28,7 @@ This reverts commit e75f4940e8ad0dd76527302a10c06b58bf7eb590. ret = snd_pcm_hw_constraint_list(substream->runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &fsl_sai_rate_constraints); -@@ -1049,35 +1039,30 @@ static int fsl_sai_remove(struct platfor +@@ -1052,35 +1042,30 @@ static int fsl_sai_remove(struct platfor static const struct fsl_sai_soc_data fsl_sai_vf610_data = { .use_imx_pcm = false, diff --git a/target/linux/layerscape/patches-5.4/801-audio-0002-Revert-ASoC-fsl_sai-Implement-set_bclk_ratio.patch b/target/linux/layerscape/patches-5.4/801-audio-0002-Revert-ASoC-fsl_sai-Implement-set_bclk_ratio.patch index a8aeca7ac..60e3e3e85 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0002-Revert-ASoC-fsl_sai-Implement-set_bclk_ratio.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0002-Revert-ASoC-fsl_sai-Implement-set_bclk_ratio.patch @@ -62,4 +62,4 @@ This reverts commit 63d1a3488ff58e094a7f517cf93c0250f0a3f6be. - unsigned int bclk_ratio; const struct fsl_sai_soc_data *soc_data; - struct snd_dmaengine_dai_dma_data dma_params_rx; + struct snd_soc_dai_driver cpu_dai_drv; diff --git a/target/linux/layerscape/patches-5.4/801-audio-0003-Revert-ASoC-fsl_sai-Add-support-for-imx8qm.patch b/target/linux/layerscape/patches-5.4/801-audio-0003-Revert-ASoC-fsl_sai-Add-support-for-imx8qm.patch index 08198f2c4..1fe6c649d 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0003-Revert-ASoC-fsl_sai-Add-support-for-imx8qm.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0003-Revert-ASoC-fsl_sai-Add-support-for-imx8qm.patch @@ -10,7 +10,7 @@ This reverts commit 6eeb60be5ebb73b2e5911e26fb1aed02940b7d09. --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -1044,19 +1044,12 @@ static const struct fsl_sai_soc_data fsl +@@ -1047,19 +1047,12 @@ static const struct fsl_sai_soc_data fsl .reg_offset = 8, }; diff --git a/target/linux/layerscape/patches-5.4/801-audio-0004-Revert-ASoC-fsl_sai-Add-support-for-imx7ulp-imx8mq.patch b/target/linux/layerscape/patches-5.4/801-audio-0004-Revert-ASoC-fsl_sai-Add-support-for-imx7ulp-imx8mq.patch index d3518b277..f08d8e0e3 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0004-Revert-ASoC-fsl_sai-Add-support-for-imx7ulp-imx8mq.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0004-Revert-ASoC-fsl_sai-Add-support-for-imx7ulp-imx8mq.patch @@ -10,7 +10,7 @@ This reverts commit a860fac420971c5a90d4f78959b44ead793aee4f. --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -1032,24 +1032,10 @@ static const struct fsl_sai_soc_data fsl +@@ -1035,24 +1035,10 @@ static const struct fsl_sai_soc_data fsl .reg_offset = 0, }; diff --git a/target/linux/layerscape/patches-5.4/801-audio-0005-Revert-ASoC-fsl_sai-Add-support-for-SAI-new-version.patch b/target/linux/layerscape/patches-5.4/801-audio-0005-Revert-ASoC-fsl_sai-Add-support-for-SAI-new-version.patch index bf5ee6024..86ea03174 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0005-Revert-ASoC-fsl_sai-Add-support-for-SAI-new-version.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0005-Revert-ASoC-fsl_sai-Add-support-for-SAI-new-version.patch @@ -494,7 +494,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. sai->regmap = devm_regmap_init_mmio_clk(&pdev->dev, "bus", base, &fsl_sai_regmap_config); -@@ -1023,13 +983,11 @@ static int fsl_sai_remove(struct platfor +@@ -1026,13 +986,11 @@ static int fsl_sai_remove(struct platfor static const struct fsl_sai_soc_data fsl_sai_vf610_data = { .use_imx_pcm = false, .fifo_depth = 32, @@ -508,7 +508,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. }; static const struct of_device_id fsl_sai_ids[] = { -@@ -1062,7 +1020,6 @@ static int fsl_sai_runtime_suspend(struc +@@ -1065,7 +1023,6 @@ static int fsl_sai_runtime_suspend(struc static int fsl_sai_runtime_resume(struct device *dev) { struct fsl_sai *sai = dev_get_drvdata(dev); @@ -516,7 +516,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. int ret; ret = clk_prepare_enable(sai->bus_clk); -@@ -1084,11 +1041,11 @@ static int fsl_sai_runtime_resume(struct +@@ -1087,11 +1044,11 @@ static int fsl_sai_runtime_resume(struct } regcache_cache_only(sai->regmap, false); diff --git a/target/linux/layerscape/patches-5.4/801-audio-0007-Revert-ASoC-fsl_sai-Add-registers-definition-for-mul.patch b/target/linux/layerscape/patches-5.4/801-audio-0007-Revert-ASoC-fsl_sai-Add-registers-definition-for-mul.patch index 0cca97f4f..d73a4269d 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0007-Revert-ASoC-fsl_sai-Add-registers-definition-for-mul.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0007-Revert-ASoC-fsl_sai-Add-registers-definition-for-mul.patch @@ -119,7 +119,7 @@ This reverts commit 5f0ac20ed6db1d6da2eea8b862cf3d54fdfb5830. case FSL_SAI_TMR: case FSL_SAI_RCSR: case FSL_SAI_RCR1: -@@ -939,8 +883,8 @@ static int fsl_sai_probe(struct platform +@@ -942,8 +886,8 @@ static int fsl_sai_probe(struct platform MCLK_DIR(index)); } diff --git a/target/linux/layerscape/patches-5.4/801-audio-0008-Revert-ASoC-Remove-dev_err-usage-after-platform_get_.patch b/target/linux/layerscape/patches-5.4/801-audio-0008-Revert-ASoC-Remove-dev_err-usage-after-platform_get_.patch index 8d86b4e25..e604d351b 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0008-Revert-ASoC-Remove-dev_err-usage-after-platform_get_.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0008-Revert-ASoC-Remove-dev_err-usage-after-platform_get_.patch @@ -295,7 +295,7 @@ This reverts commit cf9441adb1a35506d7606866c382b9d8614169b5. ret = devm_request_irq(&pdev->dev, irq, mxs_saif_irq, 0, --- a/sound/soc/qcom/lpass-platform.c +++ b/sound/soc/qcom/lpass-platform.c -@@ -564,8 +564,11 @@ int asoc_qcom_lpass_platform_register(st +@@ -565,8 +565,11 @@ int asoc_qcom_lpass_platform_register(st int ret; drvdata->lpaif_irq = platform_get_irq_byname(pdev, "lpass-irq-lpaif"); diff --git a/target/linux/layerscape/patches-5.4/801-audio-0010-Revert-ASoC-fsl_sai-derive-TX-FIFO-watermark-from-FI.patch b/target/linux/layerscape/patches-5.4/801-audio-0010-Revert-ASoC-fsl_sai-derive-TX-FIFO-watermark-from-FI.patch index 33e6c7d13..07c3b87b0 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0010-Revert-ASoC-fsl_sai-derive-TX-FIFO-watermark-from-FI.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0010-Revert-ASoC-fsl_sai-derive-TX-FIFO-watermark-from-FI.patch @@ -21,7 +21,7 @@ This reverts commit bd517707d85f19a7339ea8b882fcbf0fd9976bd6. regmap_update_bits(sai->regmap, FSL_SAI_RCR1, FSL_SAI_CR1_RFW_MASK, FSL_SAI_MAXBURST_RX - 1); -@@ -925,12 +925,10 @@ static int fsl_sai_remove(struct platfor +@@ -928,12 +928,10 @@ static int fsl_sai_remove(struct platfor static const struct fsl_sai_soc_data fsl_sai_vf610_data = { .use_imx_pcm = false, diff --git a/target/linux/layerscape/patches-5.4/801-audio-0011-Revert-ASoC-fsl_sai-add-of_match-data.patch b/target/linux/layerscape/patches-5.4/801-audio-0011-Revert-ASoC-fsl_sai-add-of_match-data.patch index 465c3314d..12a32bc26 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0011-Revert-ASoC-fsl_sai-add-of_match-data.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0011-Revert-ASoC-fsl_sai-add-of_match-data.patch @@ -34,7 +34,7 @@ Signed-off-by: Yangbo Lu sai->is_lsb_first = of_property_read_bool(np, "lsb-first"); -@@ -898,7 +900,7 @@ static int fsl_sai_probe(struct platform +@@ -901,7 +903,7 @@ static int fsl_sai_probe(struct platform if (ret) goto err_pm_disable; @@ -43,7 +43,7 @@ Signed-off-by: Yangbo Lu ret = imx_pcm_dma_init(pdev, IMX_SAI_DMABUF_SIZE); if (ret) goto err_pm_disable; -@@ -923,18 +925,10 @@ static int fsl_sai_remove(struct platfor +@@ -926,18 +928,10 @@ static int fsl_sai_remove(struct platfor return 0; } @@ -91,6 +91,6 @@ Signed-off-by: Yangbo Lu unsigned int slot_width; - const struct fsl_sai_soc_data *soc_data; + struct snd_soc_dai_driver cpu_dai_drv; struct snd_dmaengine_dai_dma_data dma_params_rx; struct snd_dmaengine_dai_dma_data dma_params_tx; - }; diff --git a/target/linux/layerscape/patches-5.4/801-audio-0018-MLK-13574-2-ASoC-fsl_sai-refine-driver-for-ip-upgrad.patch b/target/linux/layerscape/patches-5.4/801-audio-0018-MLK-13574-2-ASoC-fsl_sai-refine-driver-for-ip-upgrad.patch index 2d770d0e4..793936d37 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0018-MLK-13574-2-ASoC-fsl_sai-refine-driver-for-ip-upgrad.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0018-MLK-13574-2-ASoC-fsl_sai-refine-driver-for-ip-upgrad.patch @@ -277,7 +277,7 @@ Signed-off-by: Yangbo Lu irq = platform_get_irq(pdev, 0); if (irq < 0) { dev_err(&pdev->dev, "no irq for node %s\n", pdev->name); -@@ -933,8 +1027,8 @@ static int fsl_sai_probe(struct platform +@@ -936,8 +1030,8 @@ static int fsl_sai_probe(struct platform MCLK_DIR(index)); } @@ -288,7 +288,7 @@ Signed-off-by: Yangbo Lu sai->dma_params_rx.maxburst = FSL_SAI_MAXBURST_RX; sai->dma_params_tx.maxburst = FSL_SAI_MAXBURST_TX; -@@ -947,7 +1041,7 @@ static int fsl_sai_probe(struct platform +@@ -950,7 +1044,7 @@ static int fsl_sai_probe(struct platform if (ret) goto err_pm_disable; @@ -297,7 +297,7 @@ Signed-off-by: Yangbo Lu ret = imx_pcm_dma_init(pdev, IMX_SAI_DMABUF_SIZE); if (ret) goto err_pm_disable; -@@ -993,6 +1087,9 @@ static int fsl_sai_runtime_suspend(struc +@@ -996,6 +1090,9 @@ static int fsl_sai_runtime_suspend(struc clk_disable_unprepare(sai->bus_clk); @@ -307,7 +307,7 @@ Signed-off-by: Yangbo Lu regcache_cache_only(sai->regmap, true); regcache_mark_dirty(sai->regmap); -@@ -1022,6 +1119,10 @@ static int fsl_sai_runtime_resume(struct +@@ -1025,6 +1122,10 @@ static int fsl_sai_runtime_resume(struct goto disable_tx_clk; } @@ -412,8 +412,8 @@ Signed-off-by: Yangbo Lu unsigned int mclk_id[2]; unsigned int mclk_streams; -@@ -146,6 +173,8 @@ struct fsl_sai { - +@@ -147,6 +174,8 @@ struct fsl_sai { + struct snd_soc_dai_driver cpu_dai_drv; struct snd_dmaengine_dai_dma_data dma_params_rx; struct snd_dmaengine_dai_dma_data dma_params_tx; + const struct fsl_sai_soc_data *soc; diff --git a/target/linux/layerscape/patches-5.4/801-audio-0027-MLK-15140-1-ASoC-fsl_sai-support-latest-sai-module.patch b/target/linux/layerscape/patches-5.4/801-audio-0027-MLK-15140-1-ASoC-fsl_sai-support-latest-sai-module.patch index 7f234a27c..f0063453d 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0027-MLK-15140-1-ASoC-fsl_sai-support-latest-sai-module.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0027-MLK-15140-1-ASoC-fsl_sai-support-latest-sai-module.patch @@ -590,7 +590,7 @@ Signed-off-by: Shengjiu Wang if (ret) { dev_err(&pdev->dev, "failed to claim irq %u\n", irq); return ret; -@@ -1088,6 +1132,7 @@ static int fsl_sai_runtime_suspend(struc +@@ -1091,6 +1135,7 @@ static int fsl_sai_runtime_suspend(struc static int fsl_sai_runtime_resume(struct device *dev) { struct fsl_sai *sai = dev_get_drvdata(dev); @@ -598,7 +598,7 @@ Signed-off-by: Shengjiu Wang int ret; ret = clk_prepare_enable(sai->bus_clk); -@@ -1113,11 +1158,11 @@ static int fsl_sai_runtime_resume(struct +@@ -1116,11 +1161,11 @@ static int fsl_sai_runtime_resume(struct PM_QOS_CPU_DMA_LATENCY, 0); regcache_cache_only(sai->regmap, false); diff --git a/target/linux/layerscape/patches-5.4/801-audio-0030-MLK-15960-2-ASoC-fsl_sai-refine-the-pm-runtime-funct.patch b/target/linux/layerscape/patches-5.4/801-audio-0030-MLK-15960-2-ASoC-fsl_sai-refine-the-pm-runtime-funct.patch index 9f9db86f6..03201fea9 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0030-MLK-15960-2-ASoC-fsl_sai-refine-the-pm-runtime-funct.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0030-MLK-15960-2-ASoC-fsl_sai-refine-the-pm-runtime-funct.patch @@ -16,16 +16,16 @@ Signed-off-by: Shengjiu Wang --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -1094,6 +1094,8 @@ static int fsl_sai_probe(struct platform +@@ -1097,6 +1097,8 @@ static int fsl_sai_probe(struct platform pm_runtime_enable(&pdev->dev); + regcache_cache_only(sai->regmap, true); + ret = devm_snd_soc_register_component(&pdev->dev, &fsl_component, - &fsl_sai_dai, 1); + &sai->cpu_dai_drv, 1); if (ret) -@@ -1137,6 +1139,8 @@ static int fsl_sai_runtime_suspend(struc +@@ -1140,6 +1142,8 @@ static int fsl_sai_runtime_suspend(struc { struct fsl_sai *sai = dev_get_drvdata(dev); diff --git a/target/linux/layerscape/patches-5.4/801-audio-0035-MLK-16929-1-ASoC-fsl_sai-add-bitclk_freq.patch b/target/linux/layerscape/patches-5.4/801-audio-0035-MLK-16929-1-ASoC-fsl_sai-add-bitclk_freq.patch index 72078d981..c095f5ff3 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0035-MLK-16929-1-ASoC-fsl_sai-add-bitclk_freq.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0035-MLK-16929-1-ASoC-fsl_sai-add-bitclk_freq.patch @@ -51,5 +51,5 @@ Signed-off-by: Adrian Alonso unsigned int slot_width; + unsigned int bitclk_freq; + struct snd_soc_dai_driver cpu_dai_drv; struct snd_dmaengine_dai_dma_data dma_params_rx; - struct snd_dmaengine_dai_dma_data dma_params_tx; diff --git a/target/linux/layerscape/patches-5.4/801-audio-0037-MLK-16224-4-ASoC-fsl_sai-support-multi-fifo-and-DSD.patch b/target/linux/layerscape/patches-5.4/801-audio-0037-MLK-16224-4-ASoC-fsl_sai-support-multi-fifo-and-DSD.patch index b5802d325..c2952deaa 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0037-MLK-16224-4-ASoC-fsl_sai-support-multi-fifo-and-DSD.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0037-MLK-16224-4-ASoC-fsl_sai-support-multi-fifo-and-DSD.patch @@ -274,7 +274,7 @@ Reviewed-by: Viorel Suman if ((of_find_property(np, "fsl,i2s-xtor", NULL) != NULL) || (of_find_property(np, "fsl,txm-rxs", NULL) != NULL)) { -@@ -1141,6 +1280,11 @@ static int fsl_sai_probe(struct platform +@@ -1144,6 +1283,11 @@ static int fsl_sai_probe(struct platform sai->dma_params_rx.maxburst = FSL_SAI_MAXBURST_RX; sai->dma_params_tx.maxburst = FSL_SAI_MAXBURST_TX; @@ -315,7 +315,7 @@ Reviewed-by: Viorel Suman unsigned int masterflag[2]; unsigned int mclk_id[2]; -@@ -187,6 +195,8 @@ struct fsl_sai { +@@ -188,6 +196,8 @@ struct fsl_sai { struct snd_dmaengine_dai_dma_data dma_params_tx; const struct fsl_sai_soc_data *soc; struct pm_qos_request pm_qos_req; diff --git a/target/linux/layerscape/patches-5.4/801-audio-0039-MLK-16224-6-ASoC-fsl_sai-fix-DSD-suspend-resume.patch b/target/linux/layerscape/patches-5.4/801-audio-0039-MLK-16224-6-ASoC-fsl_sai-fix-DSD-suspend-resume.patch index 8ca538cd6..a01ac6518 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0039-MLK-16224-6-ASoC-fsl_sai-fix-DSD-suspend-resume.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0039-MLK-16224-6-ASoC-fsl_sai-fix-DSD-suspend-resume.patch @@ -36,7 +36,7 @@ Reviewed-by: Shengjiu Wang + return 0; +} + - static struct snd_soc_dai_driver fsl_sai_dai = { + static struct snd_soc_dai_driver fsl_sai_dai_template = { .probe = fsl_sai_dai_probe, .playback = { @@ -913,6 +930,7 @@ static struct snd_soc_dai_driver fsl_sai diff --git a/target/linux/layerscape/patches-5.4/801-audio-0048-MLK-17580-ASoC-fsl-sai-Use-DSD-helper.patch b/target/linux/layerscape/patches-5.4/801-audio-0048-MLK-17580-ASoC-fsl-sai-Use-DSD-helper.patch index 856f2bb6d..edfbd57fb 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0048-MLK-17580-ASoC-fsl-sai-Use-DSD-helper.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0048-MLK-17580-ASoC-fsl-sai-Use-DSD-helper.patch @@ -73,7 +73,7 @@ Reviewed-by: Shengjiu Wang dev, "failed to set proper pins state: %d\n", ret); -@@ -1354,9 +1345,6 @@ static int fsl_sai_probe(struct platform +@@ -1357,9 +1348,6 @@ static int fsl_sai_probe(struct platform sai->pinctrl = devm_pinctrl_get(&pdev->dev); @@ -85,7 +85,7 @@ Reviewed-by: Shengjiu Wang dev); --- a/sound/soc/fsl/fsl_sai.h +++ b/sound/soc/fsl/fsl_sai.h -@@ -211,7 +211,7 @@ struct fsl_sai { +@@ -212,7 +212,7 @@ struct fsl_sai { const struct fsl_sai_soc_data *soc; struct pm_qos_request pm_qos_req; struct pinctrl *pinctrl; diff --git a/target/linux/layerscape/patches-5.4/801-audio-0049-MLK-17580-ASoC-fsl-sai-check-for-pinctrl-status.patch b/target/linux/layerscape/patches-5.4/801-audio-0049-MLK-17580-ASoC-fsl-sai-check-for-pinctrl-status.patch index ebd71672b..f93bdfe63 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0049-MLK-17580-ASoC-fsl-sai-check-for-pinctrl-status.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0049-MLK-17580-ASoC-fsl-sai-check-for-pinctrl-status.patch @@ -49,7 +49,7 @@ Signed-off-by: Viorel Suman ret = pinctrl_select_state(sai->pinctrl, sai->pins_state); if (ret) { dev_err(cpu_dai->dev, -@@ -1343,7 +1346,7 @@ static int fsl_sai_probe(struct platform +@@ -1346,7 +1349,7 @@ static int fsl_sai_probe(struct platform sai->dma_params_rx.maxburst = FSL_SAI_MAXBURST_RX; sai->dma_params_tx.maxburst = FSL_SAI_MAXBURST_TX; diff --git a/target/linux/layerscape/patches-5.4/801-audio-0050-MLK-17531-1-ASoC-fsl-sai-add-support-for-SAI-v3.01.patch b/target/linux/layerscape/patches-5.4/801-audio-0050-MLK-17531-1-ASoC-fsl-sai-add-support-for-SAI-v3.01.patch index d2ce7e21c..0df0f2fa9 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0050-MLK-17531-1-ASoC-fsl-sai-add-support-for-SAI-v3.01.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0050-MLK-17531-1-ASoC-fsl-sai-add-support-for-SAI-v3.01.patch @@ -238,7 +238,7 @@ Reviewed-by: Daniel Baluta struct fsl_sai { struct platform_device *pdev; struct regmap *regmap; -@@ -212,6 +266,9 @@ struct fsl_sai { +@@ -213,6 +267,9 @@ struct fsl_sai { struct pm_qos_request pm_qos_req; struct pinctrl *pinctrl; struct pinctrl_state *pins_state; diff --git a/target/linux/layerscape/patches-5.4/801-audio-0052-MLK-18682-1-ASoC-fsl-sai-use-set_bclk_ratio-to-calcu.patch b/target/linux/layerscape/patches-5.4/801-audio-0052-MLK-18682-1-ASoC-fsl-sai-use-set_bclk_ratio-to-calcu.patch index 7c3685f65..281974fc6 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0052-MLK-18682-1-ASoC-fsl-sai-use-set_bclk_ratio-to-calcu.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0052-MLK-18682-1-ASoC-fsl-sai-use-set_bclk_ratio-to-calcu.patch @@ -94,5 +94,5 @@ Signed-off-by: Dong Aisheng - unsigned int bitclk_freq; + unsigned int bitclk_ratio; + struct snd_soc_dai_driver cpu_dai_drv; struct snd_dmaengine_dai_dma_data dma_params_rx; - struct snd_dmaengine_dai_dma_data dma_params_tx; diff --git a/target/linux/layerscape/patches-5.4/801-audio-0062-ASoC-fsl-sai-fix-build-failture-due-to-5.1-RC7-upgra.patch b/target/linux/layerscape/patches-5.4/801-audio-0062-ASoC-fsl-sai-fix-build-failture-due-to-5.1-RC7-upgra.patch index 3f92c2185..061b8e034 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0062-ASoC-fsl-sai-fix-build-failture-due-to-5.1-RC7-upgra.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0062-ASoC-fsl-sai-fix-build-failture-due-to-5.1-RC7-upgra.patch @@ -25,7 +25,7 @@ Signed-off-by: Dong Aisheng break; case SND_SOC_DAIFMT_CBM_CFS: val_cr4 |= FSL_SAI_CR4_FSD_MSTR; -@@ -1572,14 +1570,6 @@ static int fsl_sai_remove(struct platfor +@@ -1575,14 +1573,6 @@ static int fsl_sai_remove(struct platfor return 0; } diff --git a/target/linux/layerscape/patches-5.4/801-audio-0064-ASoC-fsl_sai-Mark-cache-dirty-at-resume.patch b/target/linux/layerscape/patches-5.4/801-audio-0064-ASoC-fsl_sai-Mark-cache-dirty-at-resume.patch index 3fd355498..9dcab4e3b 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0064-ASoC-fsl_sai-Mark-cache-dirty-at-resume.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0064-ASoC-fsl_sai-Mark-cache-dirty-at-resume.patch @@ -17,7 +17,7 @@ Signed-off-by: Daniel Baluta --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -1614,6 +1614,8 @@ static int fsl_sai_runtime_resume(struct +@@ -1617,6 +1617,8 @@ static int fsl_sai_runtime_resume(struct PM_QOS_CPU_DMA_LATENCY, 0); regcache_cache_only(sai->regmap, false); diff --git a/target/linux/layerscape/patches-5.4/801-audio-0065-LF-106-ASoC-fsl_sai-request-BUS_FREQ_AUDIO.patch b/target/linux/layerscape/patches-5.4/801-audio-0065-LF-106-ASoC-fsl_sai-request-BUS_FREQ_AUDIO.patch index ed0afdbac..76b7b607e 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0065-LF-106-ASoC-fsl_sai-request-BUS_FREQ_AUDIO.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0065-LF-106-ASoC-fsl_sai-request-BUS_FREQ_AUDIO.patch @@ -20,7 +20,7 @@ Signed-off-by: Shengjiu Wang #include "fsl_dsd.h" #include "fsl_sai.h" -@@ -1568,6 +1569,8 @@ static int fsl_sai_runtime_suspend(struc +@@ -1571,6 +1572,8 @@ static int fsl_sai_runtime_suspend(struc regcache_cache_only(sai->regmap, true); @@ -29,7 +29,7 @@ Signed-off-by: Shengjiu Wang if (sai->mclk_streams & BIT(SNDRV_PCM_STREAM_CAPTURE)) clk_disable_unprepare(sai->mclk_clk[sai->mclk_id[0]]); -@@ -1609,6 +1612,8 @@ static int fsl_sai_runtime_resume(struct +@@ -1612,6 +1615,8 @@ static int fsl_sai_runtime_resume(struct goto disable_tx_clk; } diff --git a/target/linux/layerscape/patches-5.4/801-audio-0071-MLK-21957-2-ASoC-fsl_sai-read-SAI-version-and-params.patch b/target/linux/layerscape/patches-5.4/801-audio-0071-MLK-21957-2-ASoC-fsl_sai-read-SAI-version-and-params.patch index 005f4b507..c400f7a5f 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0071-MLK-21957-2-ASoC-fsl_sai-read-SAI-version-and-params.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0071-MLK-21957-2-ASoC-fsl_sai-read-SAI-version-and-params.patch @@ -79,7 +79,7 @@ Signed-off-by: Viorel Suman for (id = 0; id < FSL_SAI_MCLK_MAX; id++) { clk_rate = clk_get_rate(sai->mclk_clk[id]); if (!clk_rate) -@@ -1517,6 +1523,10 @@ static int fsl_sai_probe(struct platform +@@ -1520,6 +1526,10 @@ static int fsl_sai_probe(struct platform platform_set_drvdata(pdev, sai); diff --git a/target/linux/layerscape/patches-5.4/801-audio-0073-MLK-21957-3-ASoC-fsl_sai-add-bitcount-and-timestamp-.patch b/target/linux/layerscape/patches-5.4/801-audio-0073-MLK-21957-3-ASoC-fsl_sai-add-bitcount-and-timestamp-.patch index 0bee58339..92de8196e 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0073-MLK-21957-3-ASoC-fsl_sai-add-bitcount-and-timestamp-.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0073-MLK-21957-3-ASoC-fsl_sai-add-bitcount-and-timestamp-.patch @@ -109,7 +109,7 @@ Signed-off-by: Viorel Suman @@ -1030,6 +1114,7 @@ static int fsl_sai_dai_resume(struct snd } - static struct snd_soc_dai_driver fsl_sai_dai = { + static struct snd_soc_dai_driver fsl_sai_dai_template = { + .pcm_new = fsl_sai_pcm_new, .probe = fsl_sai_dai_probe, .playback = { diff --git a/target/linux/layerscape/patches-5.4/801-audio-0074-ASoC-fsl_sai-fix-build-issue-of-incomplete-parenthes.patch b/target/linux/layerscape/patches-5.4/801-audio-0074-ASoC-fsl_sai-fix-build-issue-of-incomplete-parenthes.patch index a511504f6..e9083294d 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0074-ASoC-fsl_sai-fix-build-issue-of-incomplete-parenthes.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0074-ASoC-fsl_sai-fix-build-issue-of-incomplete-parenthes.patch @@ -13,7 +13,7 @@ Signed-off-by: Yangbo Lu --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -1631,7 +1631,7 @@ static int fsl_sai_probe(struct platform +@@ -1634,7 +1634,7 @@ static int fsl_sai_probe(struct platform if (ret) goto err_pm_disable; diff --git a/target/linux/layerscape/patches-5.4/802-can-0007-can-flexcan-use-devm_platform_ioremap_resource-to-si.patch b/target/linux/layerscape/patches-5.4/802-can-0007-can-flexcan-use-devm_platform_ioremap_resource-to-si.patch index 5d88a5807..b576cec2f 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0007-can-flexcan-use-devm_platform_ioremap_resource-to-si.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0007-can-flexcan-use-devm_platform_ioremap_resource-to-si.patch @@ -17,7 +17,7 @@ Signed-off-by: Marc Kleine-Budde --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c -@@ -1548,7 +1548,6 @@ static int flexcan_probe(struct platform +@@ -1570,7 +1570,6 @@ static int flexcan_probe(struct platform struct net_device *dev; struct flexcan_priv *priv; struct regulator *reg_xceiver; @@ -25,7 +25,7 @@ Signed-off-by: Marc Kleine-Budde struct clk *clk_ipg = NULL, *clk_per = NULL; struct flexcan_regs __iomem *regs; int err, irq; -@@ -1583,12 +1582,11 @@ static int flexcan_probe(struct platform +@@ -1605,12 +1604,11 @@ static int flexcan_probe(struct platform clock_freq = clk_get_rate(clk_per); } diff --git a/target/linux/layerscape/patches-5.4/802-can-0009-can-flexcan-rename-macro-FLEXCAN_IFLAG_MB-FLEXCAN_IF.patch b/target/linux/layerscape/patches-5.4/802-can-0009-can-flexcan-rename-macro-FLEXCAN_IFLAG_MB-FLEXCAN_IF.patch index d67fc9c1c..c6960bace 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0009-can-flexcan-rename-macro-FLEXCAN_IFLAG_MB-FLEXCAN_IF.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0009-can-flexcan-rename-macro-FLEXCAN_IFLAG_MB-FLEXCAN_IF.patch @@ -50,7 +50,7 @@ Signed-off-by: Marc Kleine-Budde netif_wake_queue(dev); } -@@ -1299,7 +1299,7 @@ static int flexcan_open(struct net_devic +@@ -1321,7 +1321,7 @@ static int flexcan_open(struct net_devic priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx); priv->reg_imask1_default = 0; diff --git a/target/linux/layerscape/patches-5.4/802-can-0011-can-flexcan-rename-struct-flexcan_priv-reg_imask-1-2.patch b/target/linux/layerscape/patches-5.4/802-can-0011-can-flexcan-rename-struct-flexcan_priv-reg_imask-1-2.patch index 12030a289..f8ea72551 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0011-can-flexcan-rename-struct-flexcan_priv-reg_imask-1-2.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0011-can-flexcan-rename-struct-flexcan_priv-reg_imask-1-2.patch @@ -72,7 +72,7 @@ Signed-off-by: Marc Kleine-Budde enable_irq(dev->irq); /* print chip status */ -@@ -1298,8 +1298,8 @@ static int flexcan_open(struct net_devic +@@ -1320,8 +1320,8 @@ static int flexcan_open(struct net_devic priv->tx_mb_idx = priv->mb_count - 1; priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx); @@ -83,7 +83,7 @@ Signed-off-by: Marc Kleine-Budde priv->offload.mailbox_read = flexcan_mailbox_read; -@@ -1311,12 +1311,12 @@ static int flexcan_open(struct net_devic +@@ -1333,12 +1333,12 @@ static int flexcan_open(struct net_devic imask = GENMASK_ULL(priv->offload.mb_last, priv->offload.mb_first); diff --git a/target/linux/layerscape/patches-5.4/802-can-0012-can-flexcan-remove-TX-mailbox-bit-from-struct-flexca.patch b/target/linux/layerscape/patches-5.4/802-can-0012-can-flexcan-remove-TX-mailbox-bit-from-struct-flexca.patch index a066764a4..ef8fd9d83 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0012-can-flexcan-remove-TX-mailbox-bit-from-struct-flexca.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0012-can-flexcan-remove-TX-mailbox-bit-from-struct-flexca.patch @@ -43,7 +43,7 @@ Signed-off-by: Marc Kleine-Budde enable_irq(dev->irq); /* print chip status */ -@@ -1298,9 +1297,6 @@ static int flexcan_open(struct net_devic +@@ -1320,9 +1319,6 @@ static int flexcan_open(struct net_devic priv->tx_mb_idx = priv->mb_count - 1; priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx); @@ -53,7 +53,7 @@ Signed-off-by: Marc Kleine-Budde priv->offload.mailbox_read = flexcan_mailbox_read; if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) { -@@ -1311,12 +1307,12 @@ static int flexcan_open(struct net_devic +@@ -1333,12 +1329,12 @@ static int flexcan_open(struct net_devic imask = GENMASK_ULL(priv->offload.mb_last, priv->offload.mb_first); diff --git a/target/linux/layerscape/patches-5.4/802-can-0013-can-flexcan-convert-struct-flexcan_priv-rx_mask-1-2-.patch b/target/linux/layerscape/patches-5.4/802-can-0013-can-flexcan-convert-struct-flexcan_priv-rx_mask-1-2-.patch index 8cf6215e2..c52da3a14 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0013-can-flexcan-convert-struct-flexcan_priv-rx_mask-1-2-.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0013-can-flexcan-convert-struct-flexcan_priv-rx_mask-1-2-.patch @@ -82,7 +82,7 @@ Signed-off-by: Marc Kleine-Budde enable_irq(dev->irq); /* print chip status */ -@@ -1300,19 +1301,14 @@ static int flexcan_open(struct net_devic +@@ -1322,19 +1323,14 @@ static int flexcan_open(struct net_devic priv->offload.mailbox_read = flexcan_mailbox_read; if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) { diff --git a/target/linux/layerscape/patches-5.4/802-can-0014-can-flexcan-introduce-struct-flexcan_priv-tx_mask-an.patch b/target/linux/layerscape/patches-5.4/802-can-0014-can-flexcan-introduce-struct-flexcan_priv-tx_mask-an.patch index 3df5afd81..b724dc435 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0014-can-flexcan-introduce-struct-flexcan_priv-tx_mask-an.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0014-can-flexcan-introduce-struct-flexcan_priv-tx_mask-an.patch @@ -80,7 +80,7 @@ Signed-off-by: Marc Kleine-Budde priv->write(upper_32_bits(reg_imask), ®s->imask2); priv->write(lower_32_bits(reg_imask), ®s->imask1); enable_irq(dev->irq); -@@ -1297,6 +1298,7 @@ static int flexcan_open(struct net_devic +@@ -1319,6 +1320,7 @@ static int flexcan_open(struct net_devic flexcan_get_mb(priv, FLEXCAN_TX_MB_RESERVED_OFF_FIFO); priv->tx_mb_idx = priv->mb_count - 1; priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx); diff --git a/target/linux/layerscape/patches-5.4/802-can-0019-can-flexcan-add-CAN-FD-mode-support.patch b/target/linux/layerscape/patches-5.4/802-can-0019-can-flexcan-add-CAN-FD-mode-support.patch index f762ed639..e9c8740e6 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0019-can-flexcan-add-CAN-FD-mode-support.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0019-can-flexcan-add-CAN-FD-mode-support.patch @@ -351,7 +351,7 @@ Signed-off-by: Marc Kleine-Budde if ((priv->devtype_data->quirks & FLEXCAN_QUIRK_ENABLE_EACEN_RRS)) { reg_ctrl2 = priv->read(®s->ctrl2); reg_ctrl2 |= FLEXCAN_CTRL2_EACEN | FLEXCAN_CTRL2_RRS; -@@ -1288,6 +1456,12 @@ static int flexcan_open(struct net_devic +@@ -1310,6 +1478,12 @@ static int flexcan_open(struct net_devic struct flexcan_priv *priv = netdev_priv(dev); int err; @@ -364,7 +364,7 @@ Signed-off-by: Marc Kleine-Budde err = pm_runtime_get_sync(priv->dev); if (err < 0) return err; -@@ -1300,7 +1474,10 @@ static int flexcan_open(struct net_devic +@@ -1322,7 +1496,10 @@ static int flexcan_open(struct net_devic if (err) goto out_close; @@ -376,7 +376,7 @@ Signed-off-by: Marc Kleine-Budde priv->mb_count = (sizeof(priv->regs->mb[0]) / priv->mb_size) + (sizeof(priv->regs->mb[1]) / priv->mb_size); -@@ -1645,6 +1822,18 @@ static int flexcan_probe(struct platform +@@ -1667,6 +1844,18 @@ static int flexcan_probe(struct platform priv->devtype_data = devtype_data; priv->reg_xceiver = reg_xceiver; diff --git a/target/linux/layerscape/patches-5.4/802-can-0021-can-flexcan-add-ISO-CAN-FD-feature-support.patch b/target/linux/layerscape/patches-5.4/802-can-0021-can-flexcan-add-ISO-CAN-FD-feature-support.patch index df95f0509..2c3452b0d 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0021-can-flexcan-add-ISO-CAN-FD-feature-support.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0021-can-flexcan-add-ISO-CAN-FD-feature-support.patch @@ -54,7 +54,7 @@ Signed-off-by: Marc Kleine-Budde } if ((priv->devtype_data->quirks & FLEXCAN_QUIRK_ENABLE_EACEN_RRS)) { -@@ -1831,7 +1837,7 @@ static int flexcan_probe(struct platform +@@ -1853,7 +1859,7 @@ static int flexcan_probe(struct platform if (priv->devtype_data->quirks & FLEXCAN_QUIRK_TIMESTAMP_SUPPORT_FD) { if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) { diff --git a/target/linux/layerscape/patches-5.4/802-can-0023-can-flexcan-add-imx8qm-support.patch b/target/linux/layerscape/patches-5.4/802-can-0023-can-flexcan-add-imx8qm-support.patch index 569026398..3c8645692 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0023-can-flexcan-add-imx8qm-support.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0023-can-flexcan-add-imx8qm-support.patch @@ -52,7 +52,7 @@ Signed-off-by: Marc Kleine-Budde static const struct flexcan_devtype_data fsl_vf610_devtype_data = { .quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS | FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP | -@@ -1738,6 +1745,7 @@ out_put_node: +@@ -1760,6 +1767,7 @@ out_put_node: } static const struct of_device_id flexcan_of_match[] = { diff --git a/target/linux/layerscape/patches-5.4/802-can-0024-can-flexcan-add-lx2160ar1-support.patch b/target/linux/layerscape/patches-5.4/802-can-0024-can-flexcan-add-lx2160ar1-support.patch index aeb6a1c48..0c9dc7d14 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0024-can-flexcan-add-lx2160ar1-support.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0024-can-flexcan-add-lx2160ar1-support.patch @@ -35,7 +35,7 @@ Signed-off-by: Marc Kleine-Budde static const struct flexcan_devtype_data fsl_ls1021a_r2_devtype_data = { .quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS | FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_BROKEN_PERR_STATE | -@@ -1754,6 +1761,7 @@ static const struct of_device_id flexcan +@@ -1776,6 +1783,7 @@ static const struct of_device_id flexcan { .compatible = "fsl,p1010-flexcan", .data = &fsl_p1010_devtype_data, }, { .compatible = "fsl,vf610-flexcan", .data = &fsl_vf610_devtype_data, }, { .compatible = "fsl,ls1021ar2-flexcan", .data = &fsl_ls1021a_r2_devtype_data, }, diff --git a/target/linux/layerscape/patches-5.4/802-can-0025-can-flexcan-add-LPSR-mode-support-for-i.MX7D.patch b/target/linux/layerscape/patches-5.4/802-can-0025-can-flexcan-add-LPSR-mode-support-for-i.MX7D.patch index afb555770..806a02030 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0025-can-flexcan-add-LPSR-mode-support-for-i.MX7D.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0025-can-flexcan-add-LPSR-mode-support-for-i.MX7D.patch @@ -28,57 +28,21 @@ Signed-off-by: Joakim Zhang #include #define DRV_NAME "flexcan" -@@ -1920,7 +1921,7 @@ static int __maybe_unused flexcan_suspen - { - struct net_device *dev = dev_get_drvdata(device); - struct flexcan_priv *priv = netdev_priv(dev); -- int err = 0; -+ int err; - - if (netif_running(dev)) { - /* if wakeup is enabled, enter stop mode -@@ -1932,25 +1933,27 @@ static int __maybe_unused flexcan_suspen +@@ -1954,9 +1955,7 @@ static int __maybe_unused flexcan_suspen if (err) return err; } else { - err = flexcan_chip_disable(priv); +- if (err) +- return err; + flexcan_chip_stop(dev); -+ -+ err = pm_runtime_force_suspend(device); - if (err) - return err; - -- err = pm_runtime_force_suspend(device); -+ pinctrl_pm_select_sleep_state(device); } netif_stop_queue(dev); netif_device_detach(dev); - } - priv->can.state = CAN_STATE_SLEEPING; - -- return err; -+ return 0; - } - - static int __maybe_unused flexcan_resume(struct device *device) - { - struct net_device *dev = dev_get_drvdata(device); - struct flexcan_priv *priv = netdev_priv(dev); -- int err = 0; -+ int err; - - priv->can.state = CAN_STATE_ERROR_ACTIVE; - if (netif_running(dev)) { -@@ -1962,15 +1965,19 @@ static int __maybe_unused flexcan_resume +@@ -1982,7 +1981,9 @@ static int __maybe_unused flexcan_resume if (err) return err; } else { -+ pinctrl_pm_select_default_state(device); -+ - err = pm_runtime_force_resume(device); - if (err) - return err; - - err = flexcan_chip_enable(priv); + err = flexcan_chip_start(dev); + if (err) @@ -86,8 +50,3 @@ Signed-off-by: Joakim Zhang } } -- return err; -+ return 0; - } - - static int __maybe_unused flexcan_runtime_suspend(struct device *device) diff --git a/target/linux/layerscape/patches-5.4/802-can-0027-can-flexcan-add-CAN-wakeup-function-for-i.MX8.patch b/target/linux/layerscape/patches-5.4/802-can-0027-can-flexcan-add-CAN-wakeup-function-for-i.MX8.patch index bf0eac482..06fd55aaa 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0027-can-flexcan-add-CAN-wakeup-function-for-i.MX8.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0027-can-flexcan-add-CAN-wakeup-function-for-i.MX8.patch @@ -126,7 +126,7 @@ Signed-off-by: Joakim Zhang reg_mcr = priv->read(®s->mcr); -@@ -1745,11 +1789,6 @@ static int flexcan_setup_stop_mode(struc +@@ -1767,11 +1811,6 @@ static int flexcan_setup_stop_mode(struc gpr_np->full_name, priv->stm.req_gpr, priv->stm.req_bit, priv->stm.ack_gpr, priv->stm.ack_bit); @@ -138,7 +138,7 @@ Signed-off-by: Joakim Zhang return 0; out_put_node: -@@ -1757,6 +1796,30 @@ out_put_node: +@@ -1779,6 +1818,30 @@ out_put_node: return ret; } @@ -169,7 +169,7 @@ Signed-off-by: Joakim Zhang static const struct of_device_id flexcan_of_match[] = { { .compatible = "fsl,imx8qm-flexcan", .data = &fsl_imx8qm_devtype_data, }, { .compatible = "fsl,imx6q-flexcan", .data = &fsl_imx6q_devtype_data, }, -@@ -1899,9 +1962,19 @@ static int flexcan_probe(struct platform +@@ -1921,9 +1984,19 @@ static int flexcan_probe(struct platform devm_can_led_init(dev); if (priv->devtype_data->quirks & FLEXCAN_QUIRK_SETUP_STOP_MODE) { diff --git a/target/linux/layerscape/patches-5.4/802-can-0028-can-flexcan-Add-S32V234-support-to-FlexCAN-driver.patch b/target/linux/layerscape/patches-5.4/802-can-0028-can-flexcan-Add-S32V234-support-to-FlexCAN-driver.patch index 0474969ca..0c631356f 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0028-can-flexcan-Add-S32V234-support-to-FlexCAN-driver.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0028-can-flexcan-Add-S32V234-support-to-FlexCAN-driver.patch @@ -36,7 +36,7 @@ Reviewed-by: Leonard Crestez static const struct can_bittiming_const flexcan_bittiming_const = { .name = DRV_NAME, .tseg1_min = 4, -@@ -1831,6 +1836,8 @@ static const struct of_device_id flexcan +@@ -1853,6 +1858,8 @@ static const struct of_device_id flexcan { .compatible = "fsl,vf610-flexcan", .data = &fsl_vf610_devtype_data, }, { .compatible = "fsl,ls1021ar2-flexcan", .data = &fsl_ls1021a_r2_devtype_data, }, { .compatible = "fsl,lx2160ar1-flexcan", .data = &fsl_lx2160a_r1_devtype_data, }, diff --git a/target/linux/layerscape/patches-5.4/804-crypto-0014-MLK-9769-8-crypto-caam-add-a-test-for-the-RNG.patch b/target/linux/layerscape/patches-5.4/804-crypto-0014-MLK-9769-8-crypto-caam-add-a-test-for-the-RNG.patch index b5a4bf1b2..3a9174557 100644 --- a/target/linux/layerscape/patches-5.4/804-crypto-0014-MLK-9769-8-crypto-caam-add-a-test-for-the-RNG.patch +++ b/target/linux/layerscape/patches-5.4/804-crypto-0014-MLK-9769-8-crypto-caam-add-a-test-for-the-RNG.patch @@ -28,7 +28,7 @@ Signed-off-by: Horia Geantă --- a/drivers/crypto/caam/Kconfig +++ b/drivers/crypto/caam/Kconfig -@@ -147,6 +147,14 @@ config CRYPTO_DEV_FSL_CAAM_RNG_API +@@ -148,6 +148,14 @@ config CRYPTO_DEV_FSL_CAAM_RNG_API Selecting this will register the SEC4 hardware rng to the hw_random API for suppying the kernel entropy pool. diff --git a/target/linux/layerscape/patches-5.4/804-crypto-0019-MLKU-38-3-crypto-caam-add-SNVS-SECVIO-support.patch b/target/linux/layerscape/patches-5.4/804-crypto-0019-MLKU-38-3-crypto-caam-add-SNVS-SECVIO-support.patch index 4ad7a7e5e..fc48884cd 100644 --- a/target/linux/layerscape/patches-5.4/804-crypto-0019-MLKU-38-3-crypto-caam-add-SNVS-SECVIO-support.patch +++ b/target/linux/layerscape/patches-5.4/804-crypto-0019-MLKU-38-3-crypto-caam-add-SNVS-SECVIO-support.patch @@ -67,7 +67,7 @@ Signed-off-by: Horia Geantă --- a/drivers/crypto/caam/Kconfig +++ b/drivers/crypto/caam/Kconfig -@@ -155,6 +155,13 @@ config CRYPTO_DEV_FSL_CAAM_RNG_TEST +@@ -156,6 +156,13 @@ config CRYPTO_DEV_FSL_CAAM_RNG_TEST caam RNG. This test is several minutes long and executes just before the RNG is registered with the hw_random API. diff --git a/target/linux/layerscape/patches-5.4/804-crypto-0020-MLKU-25-3-crypto-caam-add-Secure-Memory-support.patch b/target/linux/layerscape/patches-5.4/804-crypto-0020-MLKU-25-3-crypto-caam-add-Secure-Memory-support.patch index 697f24bb0..91f1cebd5 100644 --- a/target/linux/layerscape/patches-5.4/804-crypto-0020-MLKU-25-3-crypto-caam-add-Secure-Memory-support.patch +++ b/target/linux/layerscape/patches-5.4/804-crypto-0020-MLKU-25-3-crypto-caam-add-Secure-Memory-support.patch @@ -91,7 +91,7 @@ Signed-off-by: Horia Geantă --- a/drivers/crypto/caam/Kconfig +++ b/drivers/crypto/caam/Kconfig -@@ -155,6 +155,36 @@ config CRYPTO_DEV_FSL_CAAM_RNG_TEST +@@ -156,6 +156,36 @@ config CRYPTO_DEV_FSL_CAAM_RNG_TEST caam RNG. This test is several minutes long and executes just before the RNG is registered with the hw_random API. diff --git a/target/linux/layerscape/patches-5.4/804-crypto-0021-MLK-19801-1-crypto-caam-add-tag-functionality.patch b/target/linux/layerscape/patches-5.4/804-crypto-0021-MLK-19801-1-crypto-caam-add-tag-functionality.patch index cb2477c2e..11d267354 100644 --- a/target/linux/layerscape/patches-5.4/804-crypto-0021-MLK-19801-1-crypto-caam-add-tag-functionality.patch +++ b/target/linux/layerscape/patches-5.4/804-crypto-0021-MLK-19801-1-crypto-caam-add-tag-functionality.patch @@ -44,7 +44,7 @@ Signed-off-by: Horia Geantă --- a/drivers/crypto/caam/Kconfig +++ b/drivers/crypto/caam/Kconfig -@@ -147,6 +147,16 @@ config CRYPTO_DEV_FSL_CAAM_RNG_API +@@ -148,6 +148,16 @@ config CRYPTO_DEV_FSL_CAAM_RNG_API Selecting this will register the SEC4 hardware rng to the hw_random API for suppying the kernel entropy pool. diff --git a/target/linux/layerscape/patches-5.4/804-crypto-0028-crypto-caam-qi-add-support-for-TLS-1.0-record.patch b/target/linux/layerscape/patches-5.4/804-crypto-0028-crypto-caam-qi-add-support-for-TLS-1.0-record.patch index 162f89a19..967266ea4 100644 --- a/target/linux/layerscape/patches-5.4/804-crypto-0028-crypto-caam-qi-add-support-for-TLS-1.0-record.patch +++ b/target/linux/layerscape/patches-5.4/804-crypto-0028-crypto-caam-qi-add-support-for-TLS-1.0-record.patch @@ -485,7 +485,7 @@ Signed-off-by: Radu Alexe const bool is_qi); --- a/drivers/crypto/caam/caamalg_qi.c +++ b/drivers/crypto/caam/caamalg_qi.c -@@ -290,6 +290,167 @@ static int des3_aead_setkey(struct crypt +@@ -296,6 +296,167 @@ static int des3_aead_setkey(struct crypt return err; } @@ -653,7 +653,7 @@ Signed-off-by: Radu Alexe static int gcm_set_sh_desc(struct crypto_aead *aead) { struct caam_ctx *ctx = crypto_aead_ctx(aead); -@@ -809,6 +970,29 @@ struct aead_edesc { +@@ -820,6 +981,29 @@ struct aead_edesc { }; /* @@ -683,7 +683,7 @@ Signed-off-by: Radu Alexe * skcipher_edesc - s/w-extended skcipher descriptor * @src_nents: number of segments in input scatterlist * @dst_nents: number of segments in output scatterlist -@@ -900,6 +1084,18 @@ static void aead_unmap(struct device *de +@@ -911,6 +1095,18 @@ static void aead_unmap(struct device *de dma_unmap_single(dev, edesc->assoclen_dma, 4, DMA_TO_DEVICE); } @@ -702,7 +702,7 @@ Signed-off-by: Radu Alexe static void skcipher_unmap(struct device *dev, struct skcipher_edesc *edesc, struct skcipher_request *req) { -@@ -1192,6 +1388,243 @@ static int aead_decrypt(struct aead_requ +@@ -1203,6 +1399,243 @@ static int aead_decrypt(struct aead_requ return aead_crypt(req, false); } @@ -946,7 +946,7 @@ Signed-off-by: Radu Alexe static int ipsec_gcm_encrypt(struct aead_request *req) { return crypto_ipsec_check_assoclen(req->assoclen) ? : aead_crypt(req, -@@ -2411,6 +2844,26 @@ static struct caam_aead_alg driver_aeads +@@ -2446,6 +2879,26 @@ static struct caam_aead_alg driver_aeads .geniv = true, } }, @@ -973,7 +973,7 @@ Signed-off-by: Radu Alexe }; static int caam_init_common(struct caam_ctx *ctx, struct caam_alg_entry *caam, -@@ -2418,6 +2871,16 @@ static int caam_init_common(struct caam_ +@@ -2453,6 +2906,16 @@ static int caam_init_common(struct caam_ { struct caam_drv_private *priv; struct device *dev; @@ -990,7 +990,7 @@ Signed-off-by: Radu Alexe /* * distribute tfms across job rings to ensure in-order -@@ -2449,6 +2912,21 @@ static int caam_init_common(struct caam_ +@@ -2484,6 +2947,21 @@ static int caam_init_common(struct caam_ ctx->adata.algtype = OP_TYPE_CLASS2_ALG | caam->class2_alg_type; ctx->qidev = dev; diff --git a/target/linux/layerscape/patches-5.4/804-crypto-0032-crypto-caam-add-CAAM-job-ring-UIO-support.patch b/target/linux/layerscape/patches-5.4/804-crypto-0032-crypto-caam-add-CAAM-job-ring-UIO-support.patch index 469fb2e36..56566ffad 100644 --- a/target/linux/layerscape/patches-5.4/804-crypto-0032-crypto-caam-add-CAAM-job-ring-UIO-support.patch +++ b/target/linux/layerscape/patches-5.4/804-crypto-0032-crypto-caam-add-CAAM-job-ring-UIO-support.patch @@ -20,7 +20,7 @@ Signed-off-by: Gagandeep Singh --- a/drivers/crypto/caam/Kconfig +++ b/drivers/crypto/caam/Kconfig -@@ -202,6 +202,17 @@ config CRYPTO_DEV_FSL_CAAM_SECVIO +@@ -203,6 +203,17 @@ config CRYPTO_DEV_FSL_CAAM_SECVIO handler functions which can be specified to act on the consequences of a security violation. diff --git a/target/linux/layerscape/patches-5.4/804-crypto-0033-LFV-26-crypto-caam-fix-Secure-Memory-driver-init.patch b/target/linux/layerscape/patches-5.4/804-crypto-0033-LFV-26-crypto-caam-fix-Secure-Memory-driver-init.patch index 8bece6371..53de880d7 100644 --- a/target/linux/layerscape/patches-5.4/804-crypto-0033-LFV-26-crypto-caam-fix-Secure-Memory-driver-init.patch +++ b/target/linux/layerscape/patches-5.4/804-crypto-0033-LFV-26-crypto-caam-fix-Secure-Memory-driver-init.patch @@ -33,7 +33,7 @@ Reviewed-by: Iuliana Prodan --- a/drivers/crypto/caam/Kconfig +++ b/drivers/crypto/caam/Kconfig -@@ -166,7 +166,7 @@ config CRYPTO_DEV_FSL_CAAM_RNG_TEST +@@ -167,7 +167,7 @@ config CRYPTO_DEV_FSL_CAAM_RNG_TEST just before the RNG is registered with the hw_random API. config CRYPTO_DEV_FSL_CAAM_SM diff --git a/target/linux/layerscape/patches-5.4/804-crypto-0034-LF-63-1-crypto-caam-fix-SM-test-init.patch b/target/linux/layerscape/patches-5.4/804-crypto-0034-LF-63-1-crypto-caam-fix-SM-test-init.patch index 04c14ca92..7e3299ec9 100644 --- a/target/linux/layerscape/patches-5.4/804-crypto-0034-LF-63-1-crypto-caam-fix-SM-test-init.patch +++ b/target/linux/layerscape/patches-5.4/804-crypto-0034-LF-63-1-crypto-caam-fix-SM-test-init.patch @@ -46,7 +46,7 @@ Acked-by: Leonard Crestez --- a/drivers/crypto/caam/Kconfig +++ b/drivers/crypto/caam/Kconfig -@@ -190,6 +190,7 @@ config CRYPTO_DEV_FSL_CAAM_SM_SLOTSIZE +@@ -191,6 +191,7 @@ config CRYPTO_DEV_FSL_CAAM_SM_SLOTSIZE config CRYPTO_DEV_FSL_CAAM_SM_TEST tristate "CAAM Secure Memory - Keystore Test/Example (EXPERIMENTAL)" depends on CRYPTO_DEV_FSL_CAAM_SM diff --git a/target/linux/layerscape/patches-5.4/808-i2c-0002-MLK-10893-i2c-imx-add-irqf_no_suspend.patch b/target/linux/layerscape/patches-5.4/808-i2c-0002-MLK-10893-i2c-imx-add-irqf_no_suspend.patch index 08f44e795..48432e1ec 100644 --- a/target/linux/layerscape/patches-5.4/808-i2c-0002-MLK-10893-i2c-imx-add-irqf_no_suspend.patch +++ b/target/linux/layerscape/patches-5.4/808-i2c-0002-MLK-10893-i2c-imx-add-irqf_no_suspend.patch @@ -17,13 +17,13 @@ Signed-off-by: Vipul Kumar --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c -@@ -1113,7 +1113,8 @@ static int i2c_imx_probe(struct platform - } +@@ -1131,7 +1131,8 @@ static int i2c_imx_probe(struct platform + goto rpm_disable; /* Request IRQ */ -- ret = devm_request_irq(&pdev->dev, irq, i2c_imx_isr, IRQF_SHARED, -+ ret = devm_request_irq(&pdev->dev, irq, i2c_imx_isr, -+ IRQF_SHARED | IRQF_NO_SUSPEND, - pdev->name, i2c_imx); +- ret = request_threaded_irq(irq, i2c_imx_isr, NULL, IRQF_SHARED, ++ ret = request_threaded_irq(irq, i2c_imx_isr, NULL, ++ IRQF_SHARED | IRQF_NO_SUSPEND, + pdev->name, i2c_imx); if (ret) { dev_err(&pdev->dev, "can't claim irq %d\n", irq); diff --git a/target/linux/layerscape/patches-5.4/808-i2c-0003-MLK-11403-I2C-imx-restore-pin-setting-for-i2c.patch b/target/linux/layerscape/patches-5.4/808-i2c-0003-MLK-11403-I2C-imx-restore-pin-setting-for-i2c.patch index 0c7c64433..a017e0993 100644 --- a/target/linux/layerscape/patches-5.4/808-i2c-0003-MLK-11403-I2C-imx-restore-pin-setting-for-i2c.patch +++ b/target/linux/layerscape/patches-5.4/808-i2c-0003-MLK-11403-I2C-imx-restore-pin-setting-for-i2c.patch @@ -15,7 +15,7 @@ Signed-off-by: Vipul Kumar --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c -@@ -1227,7 +1227,8 @@ static int __maybe_unused i2c_imx_runtim +@@ -1229,7 +1229,8 @@ static int __maybe_unused i2c_imx_runtim { struct imx_i2c_struct *i2c_imx = dev_get_drvdata(dev); @@ -25,7 +25,7 @@ Signed-off-by: Vipul Kumar return 0; } -@@ -1237,14 +1238,28 @@ static int __maybe_unused i2c_imx_runtim +@@ -1239,14 +1240,28 @@ static int __maybe_unused i2c_imx_runtim struct imx_i2c_struct *i2c_imx = dev_get_drvdata(dev); int ret; diff --git a/target/linux/layerscape/patches-5.4/808-i2c-0004-MLK-16203-enable-runtime-pm-of-i2c-temporary-when-do.patch b/target/linux/layerscape/patches-5.4/808-i2c-0004-MLK-16203-enable-runtime-pm-of-i2c-temporary-when-do.patch index 3157750f3..16ac77c6f 100644 --- a/target/linux/layerscape/patches-5.4/808-i2c-0004-MLK-16203-enable-runtime-pm-of-i2c-temporary-when-do.patch +++ b/target/linux/layerscape/patches-5.4/808-i2c-0004-MLK-16203-enable-runtime-pm-of-i2c-temporary-when-do.patch @@ -47,7 +47,7 @@ Signed-off-by: Vipul Kumar dev_dbg(&i2c_imx->adapter.dev, "<%s> exit with: %s: %d\n", __func__, (result < 0) ? "error" : "success msg", (result < 0) ? result : num); -@@ -1259,7 +1269,7 @@ static int i2c_imx_resume(struct device +@@ -1261,7 +1271,7 @@ static int i2c_imx_resume(struct device } static const struct dev_pm_ops i2c_imx_pm_ops = { diff --git a/target/linux/layerscape/patches-5.4/808-i2c-0016-LF-162-i2c-imx-Defer-probing-if-EDMA-not-available.patch b/target/linux/layerscape/patches-5.4/808-i2c-0016-LF-162-i2c-imx-Defer-probing-if-EDMA-not-available.patch index ce19d0b98..53440f896 100644 --- a/target/linux/layerscape/patches-5.4/808-i2c-0016-LF-162-i2c-imx-Defer-probing-if-EDMA-not-available.patch +++ b/target/linux/layerscape/patches-5.4/808-i2c-0016-LF-162-i2c-imx-Defer-probing-if-EDMA-not-available.patch @@ -67,4 +67,4 @@ Signed-off-by: Peng Ma + i2c_del_adapter(&i2c_imx->adapter); clk_notifier_unregister: clk_notifier_unregister(i2c_imx->clk, &i2c_imx->clk_change_nb); - rpm_disable: + free_irq(irq, i2c_imx); diff --git a/target/linux/layerscape/patches-5.4/812-pcie-0004-pci-add-support-aer-pme-interrupts-with-none-MSI-MSI.patch b/target/linux/layerscape/patches-5.4/812-pcie-0004-pci-add-support-aer-pme-interrupts-with-none-MSI-MSI.patch index d01ee99a5..1175efa43 100644 --- a/target/linux/layerscape/patches-5.4/812-pcie-0004-pci-add-support-aer-pme-interrupts-with-none-MSI-MSI.patch +++ b/target/linux/layerscape/patches-5.4/812-pcie-0004-pci-add-support-aer-pme-interrupts-with-none-MSI-MSI.patch @@ -229,7 +229,7 @@ Signed-off-by: Hou Zhiqiang * fall back to INTx or other interrupts, e.g., a system shared --- a/include/linux/pci.h +++ b/include/linux/pci.h -@@ -2020,6 +2020,7 @@ static inline void pcibios_penalize_isa_ +@@ -2021,6 +2021,7 @@ static inline void pcibios_penalize_isa_ int pcibios_alloc_irq(struct pci_dev *dev); void pcibios_free_irq(struct pci_dev *dev); resource_size_t pcibios_default_alignment(void); diff --git a/target/linux/layerscape/patches-5.4/816-sdhc-0003-LF-605-mmc-sdhci-of-esdhc-update-tuning-erratum-A-00.patch b/target/linux/layerscape/patches-5.4/816-sdhc-0003-LF-605-mmc-sdhci-of-esdhc-update-tuning-erratum-A-00.patch index 1d2e9386c..4a16dbd50 100644 --- a/target/linux/layerscape/patches-5.4/816-sdhc-0003-LF-605-mmc-sdhci-of-esdhc-update-tuning-erratum-A-00.patch +++ b/target/linux/layerscape/patches-5.4/816-sdhc-0003-LF-605-mmc-sdhci-of-esdhc-update-tuning-erratum-A-00.patch @@ -68,7 +68,7 @@ Acked-by: Adrian Hunter *window_start = 8 * esdhc->div_ratio; *window_end = 4 * esdhc->div_ratio; } else { -@@ -1050,6 +1050,19 @@ static int esdhc_execute_tuning(struct m +@@ -1061,6 +1061,19 @@ static int esdhc_execute_tuning(struct m if (ret) break; diff --git a/target/linux/layerscape/patches-5.4/818-thermal-0004-thermal-qoriq-Update-the-settings-for-TMUv2.patch b/target/linux/layerscape/patches-5.4/818-thermal-0004-thermal-qoriq-Update-the-settings-for-TMUv2.patch new file mode 100644 index 000000000..5b90b63aa --- /dev/null +++ b/target/linux/layerscape/patches-5.4/818-thermal-0004-thermal-qoriq-Update-the-settings-for-TMUv2.patch @@ -0,0 +1,80 @@ +From da5a7765a20d34508036ba8ed1db87e546abcf4b Mon Sep 17 00:00:00 2001 +From: Yuantian Tang +Date: Mon, 25 May 2020 17:33:22 +0800 +Subject: [PATCH] thermal: qoriq: Update the settings for TMUv2 + +For TMU v2, TMSAR registers need to be set properly to get the +accurate temperature values. +Also the temperature read needs to be converted to degree Celsius +since it is in degrees Kelvin. + +Signed-off-by: Yuantian Tang +--- + drivers/thermal/qoriq_thermal.c | 21 +++++++++++++++++++-- + 1 file changed, 19 insertions(+), 2 deletions(-) + +--- a/drivers/thermal/qoriq_thermal.c ++++ b/drivers/thermal/qoriq_thermal.c +@@ -23,6 +23,7 @@ + #define TMTMIR_DEFAULT 0x0000000f + #define TIER_DISABLE 0x0 + #define TEUMR0_V2 0x51009c00 ++#define TMSARA_V2 0xe + #define TMU_VER1 0x1 + #define TMU_VER2 0x2 + +@@ -35,6 +36,13 @@ struct qoriq_tmu_site_regs { + u8 res0[0x8]; + }; + ++struct qoriq_tmu_tmsar { ++ u32 res0; ++ u32 tmsar; ++ u32 res1; ++ u32 res2; ++}; ++ + struct qoriq_tmu_regs_v1 { + u32 tmr; /* Mode Register */ + u32 tsr; /* Status Register */ +@@ -95,7 +103,9 @@ struct qoriq_tmu_regs_v2 { + u32 tscfgr; /* Sensor Configuration Register */ + u8 res6[0x78]; + struct qoriq_tmu_site_regs site[SITES_MAX]; +- u8 res7[0x9f8]; ++ u8 res10[0x100]; ++ struct qoriq_tmu_tmsar tmsar[16]; ++ u8 res7[0x7f8]; + u32 ipbrr0; /* IP Block Revision Register 0 */ + u32 ipbrr1; /* IP Block Revision Register 1 */ + u8 res8[0x300]; +@@ -158,7 +168,10 @@ static int tmu_get_temp(void *p, int *te + u32 val; + + val = tmu_read(qdata, &qdata->regs->site[qsensor->id].tritsr); +- *temp = (val & 0xff) * 1000; ++ if (qdata->ver == TMU_VER1) ++ *temp = (val & 0xff) * 1000; ++ else ++ *temp = (val & 0x1ff) * 1000 - 273150; + + return 0; + } +@@ -319,6 +332,8 @@ static int qoriq_tmu_calibration(struct + + static void qoriq_tmu_init_device(struct qoriq_tmu_data *data) + { ++ int i; ++ + /* Disable interrupt, using polling instead */ + tmu_write(data, TIER_DISABLE, &data->regs->tier); + +@@ -328,6 +343,8 @@ static void qoriq_tmu_init_device(struct + } else { + tmu_write(data, TMTMIR_DEFAULT, &data->regs_v2->tmtmir); + tmu_write(data, TEUMR0_V2, &data->regs_v2->teumr0); ++ for (i = 0; i < 7; i++) ++ tmu_write(data, TMSARA_V2, &data->regs_v2->tmsar[i].tmsar); + } + + /* Disable monitoring */ diff --git a/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch b/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch index bad4128bf..aa14f1750 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch @@ -27,7 +27,7 @@ Signed-off-by: Fugang Duan #include #include #include -@@ -2369,6 +2371,54 @@ static struct uart_driver lpuart_reg = { +@@ -2367,6 +2369,54 @@ static struct uart_driver lpuart_reg = { .cons = LPUART_CONSOLE, }; @@ -82,7 +82,7 @@ Signed-off-by: Fugang Duan static int lpuart_probe(struct platform_device *pdev) { const struct of_device_id *of_id = of_match_device(lpuart_dt_ids, -@@ -2406,6 +2456,10 @@ static int lpuart_probe(struct platform_ +@@ -2404,6 +2454,10 @@ static int lpuart_probe(struct platform_ sport->port.rs485_config = lpuart_config_rs485; diff --git a/target/linux/layerscape/patches-5.4/819-uart-0002-tty-serial-fsl_lpuart-add-modem-device-reset.patch b/target/linux/layerscape/patches-5.4/819-uart-0002-tty-serial-fsl_lpuart-add-modem-device-reset.patch index 37fd23d20..9f409a1fa 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0002-tty-serial-fsl_lpuart-add-modem-device-reset.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0002-tty-serial-fsl_lpuart-add-modem-device-reset.patch @@ -20,7 +20,7 @@ Signed-off-by: Fugang Duan #include #include #include -@@ -1544,8 +1545,17 @@ static void lpuart32_configure(struct lp +@@ -1542,8 +1543,17 @@ static void lpuart32_configure(struct lp static int lpuart32_startup(struct uart_port *port) { struct lpuart_port *sport = container_of(port, struct lpuart_port, port); diff --git a/target/linux/layerscape/patches-5.4/819-uart-0003-tty-serial-fsl_lpuart-add-magic-SysRq-support.patch b/target/linux/layerscape/patches-5.4/819-uart-0003-tty-serial-fsl_lpuart-add-magic-SysRq-support.patch index 043d24611..bb94b0247 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0003-tty-serial-fsl_lpuart-add-magic-SysRq-support.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0003-tty-serial-fsl_lpuart-add-magic-SysRq-support.patch @@ -12,7 +12,7 @@ Signed-off-by: Fugang Duan --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c -@@ -920,7 +920,12 @@ static void lpuart32_rxint(struct lpuart +@@ -918,7 +918,12 @@ static void lpuart32_rxint(struct lpuart */ sr = lpuart32_read(&sport->port, UARTSTAT); rx = lpuart32_read(&sport->port, UARTDATA); diff --git a/target/linux/layerscape/patches-5.4/819-uart-0004-MLK-18137-fsl_lpuart-Fix-loopback-mode.patch b/target/linux/layerscape/patches-5.4/819-uart-0004-MLK-18137-fsl_lpuart-Fix-loopback-mode.patch index 0f9f2dcb3..aab529fc7 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0004-MLK-18137-fsl_lpuart-Fix-loopback-mode.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0004-MLK-18137-fsl_lpuart-Fix-loopback-mode.patch @@ -17,7 +17,7 @@ Signed-off-by: Adriana Reus --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c -@@ -2454,7 +2454,7 @@ static int lpuart_probe(struct platform_ +@@ -2452,7 +2452,7 @@ static int lpuart_probe(struct platform_ return PTR_ERR(sport->port.membase); sport->port.membase += sdata->reg_off; diff --git a/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch b/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch index 1a2d6c2df..d4034bb9d 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch @@ -117,7 +117,7 @@ Signed-off-by: Fugang Duan static inline bool is_imx8qxp_lpuart(struct lpuart_port *sport) { -@@ -1000,19 +1021,15 @@ static irqreturn_t lpuart32_int(int irq, +@@ -998,19 +1019,15 @@ static irqreturn_t lpuart32_int(int irq, if ((sts & UARTSTAT_TDRE) && !sport->lpuart_dma_tx_use) lpuart32_txint(sport); @@ -141,7 +141,7 @@ Signed-off-by: Fugang Duan if (lpuart_is_32(sport)) { unsigned long sr = lpuart32_read(&sport->port, UARTSTAT); -@@ -1064,8 +1081,21 @@ static void lpuart_copy_rx_to_tty(struct +@@ -1062,8 +1079,21 @@ static void lpuart_copy_rx_to_tty(struct writeb(cr2, sport->port.membase + UARTCR2); } } @@ -164,7 +164,7 @@ Signed-off-by: Fugang Duan spin_lock_irqsave(&sport->port.lock, flags); -@@ -1128,7 +1158,33 @@ static void lpuart_copy_rx_to_tty(struct +@@ -1126,7 +1156,33 @@ static void lpuart_copy_rx_to_tty(struct spin_unlock_irqrestore(&sport->port.lock, flags); tty_flip_buffer_push(port); @@ -199,7 +199,7 @@ Signed-off-by: Fugang Duan } static void lpuart_dma_rx_complete(void *arg) -@@ -1136,6 +1192,8 @@ static void lpuart_dma_rx_complete(void +@@ -1134,6 +1190,8 @@ static void lpuart_dma_rx_complete(void struct lpuart_port *sport = arg; lpuart_copy_rx_to_tty(sport); @@ -208,7 +208,7 @@ Signed-off-by: Fugang Duan } static void lpuart_timer_func(struct timer_list *t) -@@ -1143,13 +1201,78 @@ static void lpuart_timer_func(struct tim +@@ -1141,13 +1199,78 @@ static void lpuart_timer_func(struct tim struct lpuart_port *sport = from_timer(sport, t, lpuart_timer); lpuart_copy_rx_to_tty(sport); @@ -291,7 +291,7 @@ Signed-off-by: Fugang Duan int bits, baud; struct tty_port *port = &sport->port.state->port; struct tty_struct *tty = port->tty; -@@ -1169,6 +1292,18 @@ static inline int lpuart_start_rx_dma(st +@@ -1167,6 +1290,18 @@ static inline int lpuart_start_rx_dma(st sport->rx_dma_rng_buf_len = (1 << (fls(sport->rx_dma_rng_buf_len) - 1)); if (sport->rx_dma_rng_buf_len < 16) sport->rx_dma_rng_buf_len = 16; @@ -310,7 +310,7 @@ Signed-off-by: Fugang Duan ring->buf = kzalloc(sport->rx_dma_rng_buf_len, GFP_ATOMIC); if (!ring->buf) -@@ -1194,32 +1329,7 @@ static inline int lpuart_start_rx_dma(st +@@ -1192,32 +1327,7 @@ static inline int lpuart_start_rx_dma(st return ret; } @@ -344,7 +344,7 @@ Signed-off-by: Fugang Duan } static void lpuart_dma_rx_free(struct uart_port *port) -@@ -1405,8 +1515,10 @@ static void lpuart_setup_watermark(struc +@@ -1403,8 +1513,10 @@ static void lpuart_setup_watermark(struc writeb(UARTSFIFO_RXUF, sport->port.membase + UARTSFIFO); } @@ -356,7 +356,7 @@ Signed-off-by: Fugang Duan /* Restore cr2 */ writeb(cr2_saved, sport->port.membase + UARTCR2); -@@ -1427,6 +1539,7 @@ static void lpuart32_setup_watermark(str +@@ -1425,6 +1537,7 @@ static void lpuart32_setup_watermark(str { unsigned long val, ctrl; unsigned long ctrl_saved; @@ -364,7 +364,7 @@ Signed-off-by: Fugang Duan ctrl = lpuart32_read(&sport->port, UARTCTRL); ctrl_saved = ctrl; -@@ -1438,12 +1551,26 @@ static void lpuart32_setup_watermark(str +@@ -1436,12 +1549,26 @@ static void lpuart32_setup_watermark(str val = lpuart32_read(&sport->port, UARTFIFO); val |= UARTFIFO_TXFE | UARTFIFO_RXFE; val |= UARTFIFO_TXFLUSH | UARTFIFO_RXFLUSH; @@ -392,7 +392,7 @@ Signed-off-by: Fugang Duan /* Restore cr2 */ lpuart32_write(&sport->port, ctrl_saved, UARTCTRL); } -@@ -1455,17 +1582,29 @@ static void lpuart32_setup_watermark_ena +@@ -1453,17 +1580,29 @@ static void lpuart32_setup_watermark_ena lpuart32_setup_watermark(sport); temp = lpuart32_read(&sport->port, UARTCTRL); @@ -423,7 +423,7 @@ Signed-off-by: Fugang Duan static void lpuart_tx_dma_startup(struct lpuart_port *sport) { u32 uartbaud; -@@ -1529,19 +1668,23 @@ static int lpuart_startup(struct uart_po +@@ -1527,19 +1666,23 @@ static int lpuart_startup(struct uart_po return 0; } @@ -454,7 +454,7 @@ Signed-off-by: Fugang Duan if (!sport->lpuart_dma_tx_use) temp |= UARTCTRL_TIE; lpuart32_write(&sport->port, temp, UARTCTRL); -@@ -1574,12 +1717,12 @@ static int lpuart32_startup(struct uart_ +@@ -1572,12 +1715,12 @@ static int lpuart32_startup(struct uart_ spin_lock_irqsave(&sport->port.lock, flags); @@ -469,7 +469,7 @@ Signed-off-by: Fugang Duan lpuart32_configure(sport); spin_unlock_irqrestore(&sport->port.lock, flags); -@@ -1589,7 +1732,7 @@ static int lpuart32_startup(struct uart_ +@@ -1587,7 +1730,7 @@ static int lpuart32_startup(struct uart_ static void lpuart_dma_shutdown(struct lpuart_port *sport) { if (sport->lpuart_dma_rx_use) { @@ -478,7 +478,7 @@ Signed-off-by: Fugang Duan lpuart_dma_rx_free(&sport->port); } -@@ -1630,11 +1773,22 @@ static void lpuart32_shutdown(struct uar +@@ -1628,11 +1771,22 @@ static void lpuart32_shutdown(struct uar spin_lock_irqsave(&port->lock, flags); @@ -503,7 +503,7 @@ Signed-off-by: Fugang Duan spin_unlock_irqrestore(&port->lock, flags); -@@ -1731,10 +1885,10 @@ lpuart_set_termios(struct uart_port *por +@@ -1729,10 +1883,10 @@ lpuart_set_termios(struct uart_port *por * baud rate and restart Rx DMA path. * * Since timer function acqures sport->port.lock, need to stop before @@ -516,7 +516,7 @@ Signed-off-by: Fugang Duan lpuart_dma_rx_free(&sport->port); } -@@ -1946,10 +2100,10 @@ lpuart32_set_termios(struct uart_port *p +@@ -1944,10 +2098,10 @@ lpuart32_set_termios(struct uart_port *p * baud rate and restart Rx DMA path. * * Since timer function acqures sport->port.lock, need to stop before @@ -529,7 +529,7 @@ Signed-off-by: Fugang Duan lpuart_dma_rx_free(&sport->port); } -@@ -2458,6 +2612,10 @@ static int lpuart_probe(struct platform_ +@@ -2456,6 +2610,10 @@ static int lpuart_probe(struct platform_ sport->port.dev = &pdev->dev; sport->port.type = PORT_LPUART; sport->devtype = sdata->devtype; @@ -540,7 +540,7 @@ Signed-off-by: Fugang Duan ret = platform_get_irq(pdev, 0); if (ret < 0) return ret; -@@ -2620,7 +2778,7 @@ static int lpuart_suspend(struct device +@@ -2618,7 +2776,7 @@ static int lpuart_suspend(struct device * Rx DMA path before suspend and start Rx DMA path on resume. */ if (irq_wake) { diff --git a/target/linux/layerscape/patches-5.4/819-uart-0006-tty-serial-fsl_lpuart-enable-loopback-mode.patch b/target/linux/layerscape/patches-5.4/819-uart-0006-tty-serial-fsl_lpuart-enable-loopback-mode.patch index f643b27dd..cfcb6e83f 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0006-tty-serial-fsl_lpuart-enable-loopback-mode.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0006-tty-serial-fsl_lpuart-enable-loopback-mode.patch @@ -12,7 +12,7 @@ Signed-off-by: Fugang Duan --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c -@@ -1464,6 +1464,14 @@ static void lpuart32_set_mctrl(struct ua +@@ -1462,6 +1462,14 @@ static void lpuart32_set_mctrl(struct ua temp |= UARTMODIR_TXCTSE; lpuart32_write(port, temp, UARTMODIR); diff --git a/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch b/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch index 8892bc9ef..edb0bd20c 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch @@ -105,7 +105,7 @@ Signed-off-by: Shrikant Bobade static void lpuart_stop_tx(struct uart_port *port) { unsigned char temp; -@@ -2704,6 +2746,10 @@ static int lpuart_probe(struct platform_ +@@ -2702,6 +2744,10 @@ static int lpuart_probe(struct platform_ if (ret) goto failed_attach_port; @@ -116,7 +116,7 @@ Signed-off-by: Shrikant Bobade uart_get_rs485_mode(&pdev->dev, &sport->port.rs485); if (sport->port.rs485.flags & SER_RS485_RX_DURING_TX) -@@ -2727,6 +2773,8 @@ static int lpuart_probe(struct platform_ +@@ -2725,6 +2771,8 @@ static int lpuart_probe(struct platform_ return 0; diff --git a/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch b/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch index 457b4836d..7021a6e3c 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch @@ -22,7 +22,7 @@ Reviewed-by: Robin Gong #define DRIVER_NAME "fsl-lpuart" #define DEV_NAME "ttyLP" -@@ -846,6 +847,20 @@ static void lpuart32_start_tx(struct uar +@@ -844,6 +845,20 @@ static void lpuart32_start_tx(struct uar } } @@ -43,7 +43,7 @@ Reviewed-by: Robin Gong /* return TIOCSER_TEMT when transmitter is not busy */ static unsigned int lpuart_tx_empty(struct uart_port *port) { -@@ -2259,6 +2274,7 @@ static const struct uart_ops lpuart_pops +@@ -2257,6 +2272,7 @@ static const struct uart_ops lpuart_pops .break_ctl = lpuart_break_ctl, .startup = lpuart_startup, .shutdown = lpuart_shutdown, @@ -51,7 +51,7 @@ Reviewed-by: Robin Gong .set_termios = lpuart_set_termios, .type = lpuart_type, .request_port = lpuart_request_port, -@@ -2283,6 +2299,7 @@ static const struct uart_ops lpuart32_po +@@ -2281,6 +2297,7 @@ static const struct uart_ops lpuart32_po .break_ctl = lpuart32_break_ctl, .startup = lpuart32_startup, .shutdown = lpuart32_shutdown, @@ -59,7 +59,7 @@ Reviewed-by: Robin Gong .set_termios = lpuart32_set_termios, .type = lpuart_type, .request_port = lpuart_request_port, -@@ -2742,6 +2759,11 @@ static int lpuart_probe(struct platform_ +@@ -2740,6 +2757,11 @@ static int lpuart_probe(struct platform_ if (ret) goto failed_irq_request; @@ -71,7 +71,7 @@ Reviewed-by: Robin Gong ret = uart_add_one_port(&lpuart_reg, &sport->port); if (ret) goto failed_attach_port; -@@ -2776,6 +2798,9 @@ static int lpuart_probe(struct platform_ +@@ -2774,6 +2796,9 @@ static int lpuart_probe(struct platform_ failed_reset: uart_remove_one_port(&lpuart_reg, &sport->port); failed_attach_port: @@ -81,7 +81,7 @@ Reviewed-by: Robin Gong failed_irq_request: lpuart_disable_clks(sport); failed_clock_enable: -@@ -2802,15 +2827,41 @@ static int lpuart_remove(struct platform +@@ -2800,15 +2825,41 @@ static int lpuart_remove(struct platform if (sport->dma_rx_chan) dma_release_channel(sport->dma_rx_chan); @@ -123,7 +123,7 @@ Reviewed-by: Robin Gong if (lpuart_is_32(sport)) { /* disable Rx/Tx and interrupts */ -@@ -2824,10 +2875,14 @@ static int lpuart_suspend(struct device +@@ -2822,10 +2873,14 @@ static int lpuart_suspend(struct device writeb(temp, sport->port.membase + UARTCR2); } @@ -138,7 +138,7 @@ Reviewed-by: Robin Gong if (sport->lpuart_dma_rx_use) { /* -@@ -2858,9 +2913,6 @@ static int lpuart_suspend(struct device +@@ -2856,9 +2911,6 @@ static int lpuart_suspend(struct device dmaengine_terminate_all(sport->dma_tx_chan); } @@ -148,7 +148,7 @@ Reviewed-by: Robin Gong return 0; } -@@ -2868,9 +2920,11 @@ static int lpuart_resume(struct device * +@@ -2866,9 +2918,11 @@ static int lpuart_resume(struct device * { struct lpuart_port *sport = dev_get_drvdata(dev); bool irq_wake = irqd_is_wakeup_set(irq_get_irq_data(sport->port.irq)); @@ -162,7 +162,7 @@ Reviewed-by: Robin Gong if (lpuart_is_32(sport)) lpuart32_setup_watermark_enable(sport); -@@ -2891,13 +2945,23 @@ static int lpuart_resume(struct device * +@@ -2889,13 +2943,23 @@ static int lpuart_resume(struct device * if (lpuart_is_32(sport)) lpuart32_configure(sport); @@ -188,7 +188,7 @@ Reviewed-by: Robin Gong static struct platform_driver lpuart_driver = { .probe = lpuart_probe, -@@ -2905,7 +2969,7 @@ static struct platform_driver lpuart_dri +@@ -2903,7 +2967,7 @@ static struct platform_driver lpuart_dri .driver = { .name = "fsl-lpuart", .of_match_table = lpuart_dt_ids, diff --git a/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch b/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch index b3c03bc24..71c75584b 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch @@ -28,7 +28,7 @@ Signed-off-by: Fugang Duan #include #include #include -@@ -1709,10 +1710,23 @@ static void lpuart_rx_dma_startup(struct +@@ -1707,10 +1708,23 @@ static void lpuart_rx_dma_startup(struct } } @@ -53,7 +53,7 @@ Signed-off-by: Fugang Duan unsigned char temp; /* determine FIFO size and enable FIFO mode */ -@@ -1725,14 +1739,7 @@ static int lpuart_startup(struct uart_po +@@ -1723,14 +1737,7 @@ static int lpuart_startup(struct uart_po sport->rxfifo_size = UARTFIFO_DEPTH((temp >> UARTPFIFO_RXSIZE_OFF) & UARTPFIFO_FIFOSIZE_MASK); @@ -69,7 +69,7 @@ Signed-off-by: Fugang Duan return 0; } -@@ -1759,11 +1766,27 @@ static void lpuart32_configure(struct lp +@@ -1757,11 +1764,27 @@ static void lpuart32_configure(struct lp lpuart32_write(&sport->port, temp, UARTCTRL); } @@ -98,7 +98,7 @@ Signed-off-by: Fugang Duan unsigned long temp; int ret; -@@ -1784,17 +1807,8 @@ static int lpuart32_startup(struct uart_ +@@ -1782,17 +1805,8 @@ static int lpuart32_startup(struct uart_ sport->rxfifo_size = UARTFIFO_DEPTH((temp >> UARTFIFO_RXSIZE_OFF) & UARTFIFO_FIFOSIZE_MASK); @@ -117,7 +117,7 @@ Signed-off-by: Fugang Duan return 0; } -@@ -2852,108 +2866,205 @@ static int lpuart_runtime_resume(struct +@@ -2850,108 +2864,205 @@ static int lpuart_runtime_resume(struct return lpuart_enable_clks(sport); }; diff --git a/target/linux/layerscape/patches-5.4/819-uart-0011-serial-fsl_lpuart-enable-two-stop-bits.patch b/target/linux/layerscape/patches-5.4/819-uart-0011-serial-fsl_lpuart-enable-two-stop-bits.patch index 107909567..3f92a1491 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0011-serial-fsl_lpuart-enable-two-stop-bits.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0011-serial-fsl_lpuart-enable-two-stop-bits.patch @@ -14,7 +14,7 @@ Signed-off-by: Fugang Duan --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c -@@ -2111,11 +2111,12 @@ lpuart32_set_termios(struct uart_port *p +@@ -2109,11 +2109,12 @@ lpuart32_set_termios(struct uart_port *p { struct lpuart_port *sport = container_of(port, struct lpuart_port, port); unsigned long flags; @@ -28,7 +28,7 @@ Signed-off-by: Fugang Duan modem = lpuart32_read(&sport->port, UARTMODIR); /* * only support CS8 and CS7, and for CS7 must enable PE. -@@ -2152,7 +2153,9 @@ lpuart32_set_termios(struct uart_port *p +@@ -2150,7 +2151,9 @@ lpuart32_set_termios(struct uart_port *p } if (termios->c_cflag & CSTOPB) @@ -39,7 +39,7 @@ Signed-off-by: Fugang Duan /* parity must be enabled when CS7 to match 8-bits format */ if ((termios->c_cflag & CSIZE) == CS7) -@@ -2222,6 +2225,7 @@ lpuart32_set_termios(struct uart_port *p +@@ -2220,6 +2223,7 @@ lpuart32_set_termios(struct uart_port *p lpuart32_write(&sport->port, old_ctrl & ~(UARTCTRL_TE | UARTCTRL_RE), UARTCTRL); diff --git a/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch b/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch index b94389c0e..125502ff9 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch @@ -24,7 +24,7 @@ Signed-off-by: Peng Fan --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c -@@ -2600,7 +2600,9 @@ static int __init lpuart32_early_console +@@ -2598,7 +2598,9 @@ static int __init lpuart32_early_console if (!device->port.membase) return -ENODEV; diff --git a/target/linux/layerscape/patches-5.4/820-usb-0004-usb-dwc3-use-suspend-clock-from-dt-to-set-power-down.patch b/target/linux/layerscape/patches-5.4/820-usb-0004-usb-dwc3-use-suspend-clock-from-dt-to-set-power-down.patch index a1a06f0b9..a60167e94 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0004-usb-dwc3-use-suspend-clock-from-dt-to-set-power-down.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0004-usb-dwc3-use-suspend-clock-from-dt-to-set-power-down.patch @@ -15,7 +15,7 @@ Signed-off-by: Li Jun --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c -@@ -894,6 +894,25 @@ static void dwc3_set_incr_burst_type(str +@@ -900,6 +900,25 @@ static void dwc3_set_incr_burst_type(str dwc3_writel(dwc->regs, DWC3_GSBUSCFG0, cfg); } @@ -41,7 +41,7 @@ Signed-off-by: Li Jun /** * dwc3_core_init - Low-level initialization of DWC3 Core * @dwc: Pointer to our controller context structure -@@ -918,6 +937,8 @@ static int dwc3_core_init(struct dwc3 *d +@@ -924,6 +943,8 @@ static int dwc3_core_init(struct dwc3 *d dwc->maximum_speed = USB_SPEED_HIGH; } @@ -52,7 +52,7 @@ Signed-off-by: Li Jun goto err0; --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h -@@ -223,6 +223,7 @@ +@@ -224,6 +224,7 @@ /* Global Configuration Register */ #define DWC3_GCTL_PWRDNSCALE(n) ((n) << 19) diff --git a/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch b/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch index 1d1e63a07..8a8486b36 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch @@ -16,7 +16,7 @@ Signed-off-by: Peter Chen --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c -@@ -1263,6 +1263,17 @@ static void dwc3_get_properties(struct d +@@ -1269,6 +1269,17 @@ static void dwc3_get_properties(struct d dwc->maximum_speed = usb_get_maximum_speed(dev); dwc->dr_mode = usb_get_dr_mode(dev); @@ -36,7 +36,7 @@ Signed-off-by: Peter Chen dwc->sysdev_is_parent = device_property_read_bool(dev, --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h -@@ -949,6 +949,7 @@ struct dwc3_scratchpad_array { +@@ -954,6 +954,7 @@ struct dwc3_scratchpad_array { * @nr_scratch: number of scratch buffers * @u1u2: only used on revisions <1.83a for workaround * @maximum_speed: maximum speed requested (mainly for testing purposes) @@ -44,7 +44,7 @@ Signed-off-by: Peter Chen * @revision: revision register contents * @version_type: VERSIONTYPE register contents, a sub release of a revision * @dr_mode: requested mode of operation -@@ -1104,6 +1105,7 @@ struct dwc3 { +@@ -1110,6 +1111,7 @@ struct dwc3 { u32 nr_scratch; u32 u1u2; u32 maximum_speed; @@ -54,7 +54,7 @@ Signed-off-by: Peter Chen * All 3.1 IP version constants are greater than the 3.0 IP --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c -@@ -3495,6 +3495,10 @@ int dwc3_gadget_init(struct dwc3 *dwc) +@@ -3525,6 +3525,10 @@ int dwc3_gadget_init(struct dwc3 *dwc) dwc->gadget.sg_supported = true; dwc->gadget.name = "dwc3-gadget"; dwc->gadget.lpm_capable = true; diff --git a/target/linux/layerscape/patches-5.4/820-usb-0006-usb-dwc3-drd-add-usb-role-switch-class-support-for-d.patch b/target/linux/layerscape/patches-5.4/820-usb-0006-usb-dwc3-drd-add-usb-role-switch-class-support-for-d.patch index 046b4fd2d..b8f0c6a2c 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0006-usb-dwc3-drd-add-usb-role-switch-class-support-for-d.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0006-usb-dwc3-drd-add-usb-role-switch-class-support-for-d.patch @@ -23,7 +23,7 @@ Signed-off-by: Li Jun #include #include -@@ -1089,6 +1090,7 @@ struct dwc3 { +@@ -1095,6 +1096,7 @@ struct dwc3 { void __iomem *regs; size_t regs_size; diff --git a/target/linux/layerscape/patches-5.4/820-usb-0009-usb-dwc3-Add-workaround-for-host-mode-VBUS-glitch-wh.patch b/target/linux/layerscape/patches-5.4/820-usb-0009-usb-dwc3-Add-workaround-for-host-mode-VBUS-glitch-wh.patch index f72c6171a..a8d23623b 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0009-usb-dwc3-Add-workaround-for-host-mode-VBUS-glitch-wh.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0009-usb-dwc3-Add-workaround-for-host-mode-VBUS-glitch-wh.patch @@ -32,9 +32,9 @@ Reviewed-by: Peter Chen --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c -@@ -1355,6 +1355,9 @@ static void dwc3_get_properties(struct d - dwc->dis_metastability_quirk = device_property_read_bool(dev, - "snps,dis_metastability_quirk"); +@@ -1364,6 +1364,9 @@ static void dwc3_get_properties(struct d + dwc->dis_split_quirk = device_property_read_bool(dev, + "snps,dis-split-quirk"); + dwc->host_vbus_glitches = device_property_read_bool(dev, + "snps,host-vbus-glitches"); @@ -44,23 +44,24 @@ Reviewed-by: Peter Chen --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h -@@ -1041,6 +1041,8 @@ struct dwc3_scratchpad_array { - * 2 - No de-emphasis +@@ -1047,6 +1047,8 @@ struct dwc3_scratchpad_array { * 3 - Reserved * @dis_metastability_quirk: set to disable metastability quirk. + * @dis_split_quirk: set to disable split boundary. + * @host_vbus_glitches: set to avoid vbus glitch during + * xhci reset. * @imod_interval: set the interrupt moderation interval in 250ns * increments or 0 to disable. */ -@@ -1233,6 +1235,7 @@ struct dwc3 { - unsigned tx_de_emphasis:2; +@@ -1242,6 +1244,8 @@ struct dwc3 { + + unsigned dis_split_quirk:1; - unsigned dis_metastability_quirk:1; + unsigned host_vbus_glitches:1; - ++ u16 imod_interval; }; + --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -9,8 +9,49 @@ diff --git a/target/linux/layerscape/patches-5.4/820-usb-0010-MLK-22675-usb-dwc3-host-disable-park-mode.patch b/target/linux/layerscape/patches-5.4/820-usb-0010-MLK-22675-usb-dwc3-host-disable-park-mode.patch index 963f9df07..0e6a9278d 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0010-MLK-22675-usb-dwc3-host-disable-park-mode.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0010-MLK-22675-usb-dwc3-host-disable-park-mode.patch @@ -54,7 +54,7 @@ Signed-off-by: Li Jun --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c -@@ -1033,6 +1033,21 @@ static int dwc3_core_init(struct dwc3 *d +@@ -1039,6 +1039,21 @@ static int dwc3_core_init(struct dwc3 *d reg |= DWC3_GUCTL_HSTINAUTORETRY; dwc3_writel(dwc->regs, DWC3_GUCTL, reg); @@ -78,7 +78,7 @@ Signed-off-by: Li Jun /* --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h -@@ -254,6 +254,7 @@ +@@ -255,6 +255,7 @@ #define DWC3_GUCTL1_PARKMODE_DISABLE_SS BIT(17) #define DWC3_GUCTL1_TX_IPGAP_LINECHECK_DIS BIT(28) #define DWC3_GUCTL1_DEV_L1_EXIT_BY_HW BIT(24) diff --git a/target/linux/layerscape/patches-5.4/820-usb-0011-usb-dwc3-Add-cache-type-configuration-support.patch b/target/linux/layerscape/patches-5.4/820-usb-0011-usb-dwc3-Add-cache-type-configuration-support.patch index 3f9395f59..3357acc76 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0011-usb-dwc3-Add-cache-type-configuration-support.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0011-usb-dwc3-Add-cache-type-configuration-support.patch @@ -43,7 +43,7 @@ Reviewed-by: Jun Li --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c -@@ -913,6 +913,54 @@ static void dwc3_set_power_down_clk_scal +@@ -919,6 +919,54 @@ static void dwc3_set_power_down_clk_scal dwc3_writel(dwc->regs, DWC3_GCTL, reg); } @@ -98,7 +98,7 @@ Reviewed-by: Jun Li /** * dwc3_core_init - Low-level initialization of DWC3 Core * @dwc: Pointer to our controller context structure -@@ -973,6 +1021,10 @@ static int dwc3_core_init(struct dwc3 *d +@@ -979,6 +1027,10 @@ static int dwc3_core_init(struct dwc3 *d dwc3_set_incr_burst_type(dwc); @@ -109,7 +109,7 @@ Reviewed-by: Jun Li usb_phy_set_suspend(dwc->usb2_phy, 0); usb_phy_set_suspend(dwc->usb3_phy, 0); ret = phy_power_on(dwc->usb2_generic_phy); -@@ -1895,12 +1947,9 @@ static const struct dev_pm_ops dwc3_dev_ +@@ -1931,12 +1983,9 @@ static const struct dev_pm_ops dwc3_dev_ #ifdef CONFIG_OF static const struct of_device_id of_dwc3_match[] = { @@ -127,7 +127,7 @@ Reviewed-by: Jun Li MODULE_DEVICE_TABLE(of, of_dwc3_match); --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h -@@ -166,6 +166,21 @@ +@@ -167,6 +167,21 @@ /* Bit fields */ /* Global SoC Bus Configuration INCRx Register 0 */ diff --git a/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch b/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch index 0ecfb978e..d57fb7c01 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch @@ -174,7 +174,7 @@ Signed-off-by: Peter Chen * bursts that are required to move all packets in this TD. Only SuperSpeed --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -5362,6 +5362,7 @@ static const struct hc_driver xhci_hc_dr +@@ -5364,6 +5364,7 @@ static const struct hc_driver xhci_hc_dr .disable_usb3_lpm_timeout = xhci_disable_usb3_lpm_timeout, .find_raw_port_number = xhci_find_raw_port_number, .clear_tt_buffer_complete = xhci_clear_tt_buffer_complete, @@ -184,7 +184,7 @@ Signed-off-by: Peter Chen void xhci_init_driver(struct hc_driver *drv, --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -2143,6 +2143,16 @@ int xhci_find_raw_port_number(struct usb +@@ -2144,6 +2144,16 @@ int xhci_find_raw_port_number(struct usb struct xhci_hub *xhci_get_rhub(struct usb_hcd *hcd); void xhci_hc_died(struct xhci_hcd *xhci); diff --git a/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch b/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch index 23e509470..a934f289d 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch @@ -37,6 +37,6 @@ Signed-off-by: Peter Chen #define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34) #define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35) +#define XHCI_CDNS_HOST BIT_ULL(36) + #define XHCI_DISABLE_SPARSE BIT_ULL(38) unsigned int num_active_eps; - unsigned int limit_active_eps; diff --git a/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch b/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch index 314005868..c74b2460b 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch @@ -24,7 +24,7 @@ Signed-off-by: Peter Chen --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -5379,6 +5379,8 @@ void xhci_init_driver(struct hc_driver * +@@ -5381,6 +5381,8 @@ void xhci_init_driver(struct hc_driver * drv->reset = over->reset; if (over->start) drv->start = over->start; @@ -35,7 +35,7 @@ Signed-off-by: Peter Chen EXPORT_SYMBOL_GPL(xhci_init_driver); --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1911,6 +1911,7 @@ struct xhci_driver_overrides { +@@ -1912,6 +1912,7 @@ struct xhci_driver_overrides { size_t extra_priv_size; int (*reset)(struct usb_hcd *hcd); int (*start)(struct usb_hcd *hcd); diff --git a/target/linux/layerscape/patches-5.4/820-usb-0024-LF-387-1-Revert-usb-dwc3-Add-cache-type-configuratio.patch b/target/linux/layerscape/patches-5.4/820-usb-0024-LF-387-1-Revert-usb-dwc3-Add-cache-type-configuratio.patch index 52c60b069..4bc9f4d46 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0024-LF-387-1-Revert-usb-dwc3-Add-cache-type-configuratio.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0024-LF-387-1-Revert-usb-dwc3-Add-cache-type-configuratio.patch @@ -15,7 +15,7 @@ Signed-off-by: Ran Wang --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c -@@ -913,54 +913,6 @@ static void dwc3_set_power_down_clk_scal +@@ -919,54 +919,6 @@ static void dwc3_set_power_down_clk_scal dwc3_writel(dwc->regs, DWC3_GCTL, reg); } @@ -70,7 +70,7 @@ Signed-off-by: Ran Wang /** * dwc3_core_init - Low-level initialization of DWC3 Core * @dwc: Pointer to our controller context structure -@@ -1021,10 +973,6 @@ static int dwc3_core_init(struct dwc3 *d +@@ -1027,10 +979,6 @@ static int dwc3_core_init(struct dwc3 *d dwc3_set_incr_burst_type(dwc); @@ -81,7 +81,7 @@ Signed-off-by: Ran Wang usb_phy_set_suspend(dwc->usb2_phy, 0); usb_phy_set_suspend(dwc->usb3_phy, 0); ret = phy_power_on(dwc->usb2_generic_phy); -@@ -1947,9 +1895,12 @@ static const struct dev_pm_ops dwc3_dev_ +@@ -1983,9 +1931,12 @@ static const struct dev_pm_ops dwc3_dev_ #ifdef CONFIG_OF static const struct of_device_id of_dwc3_match[] = { @@ -99,7 +99,7 @@ Signed-off-by: Ran Wang MODULE_DEVICE_TABLE(of, of_dwc3_match); --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h -@@ -166,21 +166,6 @@ +@@ -167,21 +167,6 @@ /* Bit fields */ /* Global SoC Bus Configuration INCRx Register 0 */ diff --git a/target/linux/layerscape/patches-5.4/820-usb-0025-LF-387-4-usb-dwc3-Add-cache-type-configuration-suppo.patch b/target/linux/layerscape/patches-5.4/820-usb-0025-LF-387-4-usb-dwc3-Add-cache-type-configuration-suppo.patch index 8971c6af6..9c5818c26 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0025-LF-387-4-usb-dwc3-Add-cache-type-configuration-suppo.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0025-LF-387-4-usb-dwc3-Add-cache-type-configuration-suppo.patch @@ -43,7 +43,7 @@ Reviewed-by: Jun Li --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c -@@ -913,6 +913,53 @@ static void dwc3_set_power_down_clk_scal +@@ -919,6 +919,53 @@ static void dwc3_set_power_down_clk_scal dwc3_writel(dwc->regs, DWC3_GCTL, reg); } @@ -97,7 +97,7 @@ Reviewed-by: Jun Li /** * dwc3_core_init - Low-level initialization of DWC3 Core * @dwc: Pointer to our controller context structure -@@ -973,6 +1020,10 @@ static int dwc3_core_init(struct dwc3 *d +@@ -979,6 +1026,10 @@ static int dwc3_core_init(struct dwc3 *d dwc3_set_incr_burst_type(dwc); @@ -108,7 +108,7 @@ Reviewed-by: Jun Li usb_phy_set_suspend(dwc->usb2_phy, 0); usb_phy_set_suspend(dwc->usb3_phy, 0); ret = phy_power_on(dwc->usb2_generic_phy); -@@ -1895,12 +1946,16 @@ static const struct dev_pm_ops dwc3_dev_ +@@ -1931,12 +1982,16 @@ static const struct dev_pm_ops dwc3_dev_ #ifdef CONFIG_OF static const struct of_device_id of_dwc3_match[] = { @@ -133,7 +133,7 @@ Reviewed-by: Jun Li MODULE_DEVICE_TABLE(of, of_dwc3_match); --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h -@@ -166,6 +166,21 @@ +@@ -167,6 +167,21 @@ /* Bit fields */ /* Global SoC Bus Configuration INCRx Register 0 */ diff --git a/target/linux/malta/Makefile b/target/linux/malta/Makefile index 3f2c92c76..4beeb64b8 100644 --- a/target/linux/malta/Makefile +++ b/target/linux/malta/Makefile @@ -8,7 +8,6 @@ include $(TOPDIR)/rules.mk BOARD:=malta BOARDNAME:=MIPS Malta CoreLV board (qemu) -CPU_TYPE:=24kc SUBTARGETS:=le be le64 be64 INITRAMFS_EXTRA_FILES:= FEATURES:=cpiogz ext4 ramdisk squashfs targz diff --git a/target/linux/malta/README b/target/linux/malta/README index 0bb1a1e35..bbe806de3 100644 --- a/target/linux/malta/README +++ b/target/linux/malta/README @@ -11,9 +11,9 @@ For the 32 bit big-endian image: qemu-system-mips -kernel bin/targets/malta/be/openwrt-malta-be-vmlinux-initramfs.elf -nographic -m 256 For the 64 bit little-endian image: -qemu-system-mips64el -kernel bin/targets/malta/le64/openwrt-malta-le64-vmlinux-initramfs.elf -nographic -m 256 +qemu-system-mips64el -kernel bin/targets/malta/le64/openwrt-malta-le64-vmlinux-initramfs.elf -cpu MIPS64R2-generic -nographic -m 256 For the 64 bit big-endian image: -qemu-system-mips64 -kernel bin/targets/malta/be64/openwrt-malta-be64-vmlinux-initramfs.elf -nographic -m 256 +qemu-system-mips64 -kernel bin/targets/malta/be64/openwrt-malta-be64-vmlinux-initramfs.elf -cpu MIPS64R2-generic -nographic -m 256 and enjoy the system bootin. diff --git a/target/linux/malta/be/target.mk b/target/linux/malta/be/target.mk index 45949f50c..8d306c8a1 100644 --- a/target/linux/malta/be/target.mk +++ b/target/linux/malta/be/target.mk @@ -1,4 +1,5 @@ ARCH:=mips +CPU_TYPE:=24kc SUBTARGET:=be BOARDNAME:=Big Endian diff --git a/target/linux/malta/be64/config-default b/target/linux/malta/be64/config-default index e7352e68e..fee1bc8c9 100644 --- a/target/linux/malta/be64/config-default +++ b/target/linux/malta/be64/config-default @@ -6,18 +6,27 @@ CONFIG_ARCH_MMAP_RND_BITS_MAX=18 CONFIG_ARCH_MMAP_RND_BITS_MIN=12 CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y CONFIG_CPU_BIG_ENDIAN=y +CONFIG_CPU_HAS_RIXI=y # CONFIG_CPU_LITTLE_ENDIAN is not set CONFIG_CPU_MIPS64=y -CONFIG_CPU_MIPS64_R1=y +CONFIG_CPU_MIPS64_R2=y +CONFIG_CPU_MIPSR2=y CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y CONFIG_CPU_SUPPORTS_HUGEPAGES=y +CONFIG_CPU_SUPPORTS_MSA=y CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y +CONFIG_HAVE_EBPF_JIT=y +CONFIG_HAVE_KVM=y CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y # CONFIG_MIPS32_N32 is not set # CONFIG_MIPS32_O32 is not set +CONFIG_MIPS_EBPF_JIT=y +CONFIG_MIPS_PGD_C0_CONTEXT=y +CONFIG_MIPS_SPRAM=y # CONFIG_MIPS_VA_BITS_48 is not set CONFIG_MODULES_USE_ELF_RELA=y CONFIG_PGTABLE_LEVELS=3 CONFIG_PHYS_ADDR_T_64BIT=y CONFIG_SYS_SUPPORTS_HUGETLBFS=y +CONFIG_TARGET_ISA_REV=2 CONFIG_ZONE_DMA32=y diff --git a/target/linux/malta/be64/target.mk b/target/linux/malta/be64/target.mk index 3a5bb6a6d..e992c2c69 100644 --- a/target/linux/malta/be64/target.mk +++ b/target/linux/malta/be64/target.mk @@ -1,5 +1,5 @@ ARCH:=mips64 -CPU_TYPE:=mips64 +CPU_TYPE:=mips64r2 SUBTARGET:=be64 FEATURES+=source-only BOARDNAME:=Big Endian (64-bits) diff --git a/target/linux/malta/le/target.mk b/target/linux/malta/le/target.mk index e64251062..feb0f1d04 100644 --- a/target/linux/malta/le/target.mk +++ b/target/linux/malta/le/target.mk @@ -1,4 +1,5 @@ ARCH:=mipsel +CPU_TYPE:=24kc SUBTARGET:=le FEATURES+=source-only BOARDNAME:=Little Endian diff --git a/target/linux/malta/le64/config-default b/target/linux/malta/le64/config-default index 23e838aab..531d93d58 100644 --- a/target/linux/malta/le64/config-default +++ b/target/linux/malta/le64/config-default @@ -5,18 +5,27 @@ CONFIG_ARCH_MMAP_RND_BITS=12 CONFIG_ARCH_MMAP_RND_BITS_MAX=18 CONFIG_ARCH_MMAP_RND_BITS_MIN=12 CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y +CONFIG_CPU_HAS_RIXI=y CONFIG_CPU_LITTLE_ENDIAN=y CONFIG_CPU_MIPS64=y -CONFIG_CPU_MIPS64_R1=y +CONFIG_CPU_MIPS64_R2=y +CONFIG_CPU_MIPSR2=y CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y CONFIG_CPU_SUPPORTS_HUGEPAGES=y +CONFIG_CPU_SUPPORTS_MSA=y CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y +CONFIG_HAVE_EBPF_JIT=y +CONFIG_HAVE_KVM=y CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y # CONFIG_MIPS32_N32 is not set # CONFIG_MIPS32_O32 is not set +CONFIG_MIPS_EBPF_JIT=y +CONFIG_MIPS_PGD_C0_CONTEXT=y +CONFIG_MIPS_SPRAM=y # CONFIG_MIPS_VA_BITS_48 is not set CONFIG_MODULES_USE_ELF_RELA=y CONFIG_PGTABLE_LEVELS=3 CONFIG_PHYS_ADDR_T_64BIT=y CONFIG_SYS_SUPPORTS_HUGETLBFS=y +CONFIG_TARGET_ISA_REV=2 CONFIG_ZONE_DMA32=y diff --git a/target/linux/malta/le64/target.mk b/target/linux/malta/le64/target.mk index a0a55af5f..59dcc86be 100644 --- a/target/linux/malta/le64/target.mk +++ b/target/linux/malta/le64/target.mk @@ -1,5 +1,5 @@ ARCH:=mips64el -CPU_TYPE:=mips64 +CPU_TYPE:=mips64r2 SUBTARGET:=le64 FEATURES+=source-only BOARDNAME:=Little Endian (64-bits) diff --git a/target/linux/mediatek/patches-5.4/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch b/target/linux/mediatek/patches-5.4/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch index 6473dc19c..d2a9c65cd 100644 --- a/target/linux/mediatek/patches-5.4/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch +++ b/target/linux/mediatek/patches-5.4/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch @@ -127,7 +127,7 @@ Signed-off-by: David S. Miller phylink_config); --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -@@ -951,8 +951,10 @@ static void stmmac_mac_link_down(struct +@@ -925,8 +925,10 @@ static void stmmac_mac_link_down(struct } static void stmmac_mac_link_up(struct phylink_config *config, @@ -199,10 +199,7 @@ Signed-off-by: David S. Miller + * @duplex: link duplex + * @tx_pause: link transmit pause enablement status + * @rx_pause: link receive pause enablement status - * -- * If @mode is not an in-band negotiation mode (as defined by -- * phylink_autoneg_inband()), allow the link to come up. If @phy -- * is non-%NULL, configure Energy Efficient Ethernet by calling ++ * + * Configure the MAC for an established link. + * + * @speed, @duplex, @tx_pause and @rx_pause indicate the finalised link @@ -214,7 +211,10 @@ Signed-off-by: David S. Miller + * Note that when 802.3z in-band negotiation is in use, it is possible + * that the user wishes to override the pause settings, and this should + * be allowed when considering the implementation of this method. -+ * + * +- * If @mode is not an in-band negotiation mode (as defined by +- * phylink_autoneg_inband()), allow the link to come up. If @phy +- * is non-%NULL, configure Energy Efficient Ethernet by calling + * If in-band negotiation mode is disabled, allow the link to come up. If + * @phy is non-%NULL, configure Energy Efficient Ethernet by calling * phy_init_eee() and perform appropriate MAC configuration for EEE. diff --git a/target/linux/mediatek/patches-5.4/0700-arm-dts-mt7623-add-missing-pause-for-switchport.patch b/target/linux/mediatek/patches-5.4/0700-arm-dts-mt7623-add-missing-pause-for-switchport.patch deleted file mode 100644 index 94d5bbfb0..000000000 --- a/target/linux/mediatek/patches-5.4/0700-arm-dts-mt7623-add-missing-pause-for-switchport.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Frank Wunderlich -Date: Mon, 7 Sep 2020 09:05:17 +0200 - -port6 of mt7530 switch (= cpu port 0) on bananapi-r2 misses pause option -which causes rx drops on running iperf. - -Cc: stable@vger.kernel.org -Fixes: f4ff257cd160 ("arm: dts: mt7623: add support for Bananapi R2 (BPI-R2) board") -Signed-off-by: Frank Wunderlich ---- - arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 1 + - 1 file changed, 1 insertion(+) - ---- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts -+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts -@@ -193,6 +193,7 @@ - fixed-link { - speed = <1000>; - full-duplex; -+ pause; - }; - }; - }; diff --git a/target/linux/mpc85xx/patches-5.4/102-powerpc-add-cmdline-override.patch b/target/linux/mpc85xx/patches-5.4/102-powerpc-add-cmdline-override.patch index 19bbf9f2f..924ce9307 100644 --- a/target/linux/mpc85xx/patches-5.4/102-powerpc-add-cmdline-override.patch +++ b/target/linux/mpc85xx/patches-5.4/102-powerpc-add-cmdline-override.patch @@ -1,6 +1,6 @@ --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig -@@ -884,6 +884,14 @@ config CMDLINE_FORCE +@@ -885,6 +885,14 @@ config CMDLINE_FORCE This is useful if you cannot or don't want to change the command-line options your boot loader passes to the kernel. diff --git a/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/03_wireless b/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/03_wireless index 6d4298c09..2039aeaf1 100644 --- a/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/03_wireless +++ b/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/03_wireless @@ -14,9 +14,10 @@ linksys,wrt1200ac|\ linksys,wrt1900ac-v1|\ linksys,wrt1900ac-v2|\ linksys,wrt1900acs|\ +linksys,wrt3200acm|\ linksys,wrt32x) SKU=$(strings /dev/mtd3|sed -ne 's/^cert_region=//p') - WIFIMAC2G=$(macaddr_add $(cat /sys/class/net/eth0/address) +1) + WIFIMAC2G=$(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) +1) WIFIMAC5G=$(macaddr_add $WIFIMAC2G +1) case "$SKU" in AP) diff --git a/target/linux/mvebu/image/cortexa53.mk b/target/linux/mvebu/image/cortexa53.mk index ff8f2c093..b65f25472 100644 --- a/target/linux/mvebu/image/cortexa53.mk +++ b/target/linux/mvebu/image/cortexa53.mk @@ -15,6 +15,7 @@ define Device/globalscale_espressobin DEVICE_ALT0_MODEL := Armada 3700 Community Board DEVICE_ALT0_VARIANT := Non-eMMC SOC := armada-3720 + BOOT_SCRIPT := espressobin endef TARGET_DEVICES += globalscale_espressobin @@ -27,6 +28,7 @@ define Device/globalscale_espressobin-emmc DEVICE_ALT0_MODEL := Armada 3700 Community Board DEVICE_ALT0_VARIANT := eMMC SOC := armada-3720 + BOOT_SCRIPT := espressobin endef TARGET_DEVICES += globalscale_espressobin-emmc @@ -39,6 +41,7 @@ define Device/globalscale_espressobin-v7 DEVICE_ALT0_MODEL := Armada 3700 Community Board DEVICE_ALT0_VARIANT := V7 Non-eMMC SOC := armada-3720 + BOOT_SCRIPT := espressobin endef TARGET_DEVICES += globalscale_espressobin-v7 @@ -51,6 +54,7 @@ define Device/globalscale_espressobin-v7-emmc DEVICE_ALT0_MODEL := Armada 3700 Community Board DEVICE_ALT0_VARIANT := V7 eMMC SOC := armada-3720 + BOOT_SCRIPT := espressobin endef TARGET_DEVICES += globalscale_espressobin-v7-emmc diff --git a/target/linux/mvebu/image/espressobin.bootscript b/target/linux/mvebu/image/espressobin.bootscript new file mode 100644 index 000000000..07765df97 --- /dev/null +++ b/target/linux/mvebu/image/espressobin.bootscript @@ -0,0 +1,34 @@ +# Bootscript for Globalscale ESPRESSOBin Board + +# Set distro variables if necessary for compability with downstream firmware +if test -z "${kernel_addr_r}"; then + setenv kernel_addr_r 0x7000000 +fi + +if test -z "${fdt_add_r}"; then + setenv fdt_addr_r 0x6f00000 +fi + +if test -z "${devtype}"; then + setenv devtype mmc +fi + +if test -z "${devnum}"; then + if mmc dev 0; then + setenv devnum 0 + elif mmc dev 1; then + setenv devnum 1 + fi +fi + +# figure out partition uuid to pass to the kernel as root= +part uuid ${devtype} ${devnum}:2 uuid + +setenv console "console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000" +setenv bootargs "root=PARTUUID=${uuid} rw rootwait ${console}" + +echo "Booting Linux from ${devtype} ${devnum} with args: ${bootargs}" +load ${devtype} ${devnum}:1 ${fdt_addr_r} @DTB@.dtb +load ${devtype} ${devnum}:1 ${kernel_addr_r} Image + +booti ${kernel_addr_r} - ${fdt_addr_r} diff --git a/target/linux/mvebu/patches-5.4/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/mvebu/patches-5.4/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch index ed9247630..fd60cdb32 100644 --- a/target/linux/mvebu/patches-5.4/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch +++ b/target/linux/mvebu/patches-5.4/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch @@ -28,7 +28,7 @@ Signed-off-by: Michael Gray --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -1825,6 +1825,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN +@@ -1827,6 +1827,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN The command-line arguments provided by the boot loader will be appended to the the device tree bootargs property. diff --git a/target/linux/mvebu/patches-5.4/402-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch b/target/linux/mvebu/patches-5.4/402-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch new file mode 100644 index 000000000..95abbce00 --- /dev/null +++ b/target/linux/mvebu/patches-5.4/402-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch @@ -0,0 +1,50 @@ +From f4c7d053d7f77cd5c1a1ba7c7ce085ddba13d1d7 Mon Sep 17 00:00:00 2001 +From: Remi Pommarel +Date: Wed, 22 May 2019 23:33:50 +0200 +Subject: [PATCH] PCI: aardvark: Wait for endpoint to be ready before training + link + +When configuring pcie reset pin from gpio (e.g. initially set by +u-boot) to pcie function this pin goes low for a brief moment +asserting the PERST# signal. Thus connected device enters fundamental +reset process and link configuration can only begin after a minimal +100ms delay (see [1]). + +Because the pin configuration comes from the "default" pinctrl it is +implicitly configured before the probe callback is called: + +driver_probe_device() + really_probe() + ... + pinctrl_bind_pins() /* Here pin goes from gpio to PCIE reset + function and PERST# is asserted */ + ... + drv->probe() + +[1] "PCI Express Base Specification", REV. 4.0 + PCI Express, February 19 2014, 6.6.1 Conventional Reset + +Signed-off-by: Remi Pommarel +Signed-off-by: Lorenzo Pieralisi +Acked-by: Thomas Petazzoni +--- + drivers/pci/controller/pci-aardvark.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/pci/controller/pci-aardvark.c ++++ b/drivers/pci/controller/pci-aardvark.c +@@ -337,6 +337,14 @@ static void advk_pcie_setup_hw(struct ad + reg |= PIO_CTRL_ADDR_WIN_DISABLE; + advk_writel(pcie, reg, PIO_CTRL); + ++ /* ++ * PERST# signal could have been asserted by pinctrl subsystem before ++ * probe() callback has been called, making the endpoint going into ++ * fundamental reset. As required by PCI Express spec a delay for at ++ * least 100ms after such a reset before link training is needed. ++ */ ++ msleep(PCI_PM_D3COLD_WAIT); ++ + /* Start link training */ + reg = advk_readl(pcie, PCIE_CORE_LINK_CTRL_STAT_REG); + reg |= PCIE_CORE_LINK_TRAINING; diff --git a/target/linux/mvebu/patches-5.4/403-PCI-aardvark-Don-t-rely-on-jiffies-while-holding-spi.patch b/target/linux/mvebu/patches-5.4/403-PCI-aardvark-Don-t-rely-on-jiffies-while-holding-spi.patch new file mode 100644 index 000000000..db4afd22a --- /dev/null +++ b/target/linux/mvebu/patches-5.4/403-PCI-aardvark-Don-t-rely-on-jiffies-while-holding-spi.patch @@ -0,0 +1,54 @@ +From 7fbcb5da811be7d47468417c7795405058abb3da Mon Sep 17 00:00:00 2001 +From: Remi Pommarel +Date: Fri, 27 Sep 2019 10:55:02 +0200 +Subject: [PATCH] PCI: aardvark: Don't rely on jiffies while holding spinlock + +advk_pcie_wait_pio() can be called while holding a spinlock (from +pci_bus_read_config_dword()), then depends on jiffies in order to +timeout while polling on PIO state registers. In the case the PIO +transaction failed, the timeout will never happen and will also cause +the cpu to stall. + +This decrements a variable and wait instead of using jiffies. + +Signed-off-by: Remi Pommarel +Signed-off-by: Lorenzo Pieralisi +Reviewed-by: Andrew Murray +Acked-by: Thomas Petazzoni +--- + drivers/pci/controller/pci-aardvark.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +--- a/drivers/pci/controller/pci-aardvark.c ++++ b/drivers/pci/controller/pci-aardvark.c +@@ -175,7 +175,8 @@ + (PCIE_CONF_BUS(bus) | PCIE_CONF_DEV(PCI_SLOT(devfn)) | \ + PCIE_CONF_FUNC(PCI_FUNC(devfn)) | PCIE_CONF_REG(where)) + +-#define PIO_TIMEOUT_MS 1 ++#define PIO_RETRY_CNT 500 ++#define PIO_RETRY_DELAY 2 /* 2 us*/ + + #define LINK_WAIT_MAX_RETRIES 10 + #define LINK_WAIT_USLEEP_MIN 90000 +@@ -400,17 +401,16 @@ static void advk_pcie_check_pio_status(s + static int advk_pcie_wait_pio(struct advk_pcie *pcie) + { + struct device *dev = &pcie->pdev->dev; +- unsigned long timeout; ++ int i; + +- timeout = jiffies + msecs_to_jiffies(PIO_TIMEOUT_MS); +- +- while (time_before(jiffies, timeout)) { ++ for (i = 0; i < PIO_RETRY_CNT; i++) { + u32 start, isr; + + start = advk_readl(pcie, PIO_START); + isr = advk_readl(pcie, PIO_ISR); + if (!start && isr) + return 0; ++ udelay(PIO_RETRY_DELAY); + } + + dev_err(dev, "config read/write timed out\n"); diff --git a/target/linux/mvebu/patches-5.4/404-PCI-aardvark-Train-link-immediately-after-enabling-t.patch b/target/linux/mvebu/patches-5.4/404-PCI-aardvark-Train-link-immediately-after-enabling-t.patch new file mode 100644 index 000000000..c9e49ac2f --- /dev/null +++ b/target/linux/mvebu/patches-5.4/404-PCI-aardvark-Train-link-immediately-after-enabling-t.patch @@ -0,0 +1,60 @@ +From 6964494582f56a3882c2c53b0edbfe99eb32b2e1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pali=20Roh=C3=A1r?= +Date: Thu, 30 Apr 2020 10:06:14 +0200 +Subject: [PATCH] PCI: aardvark: Train link immediately after enabling training +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Adding even 100ms (PCI_PM_D3COLD_WAIT) delay between enabling link +training and starting link training causes detection issues with some +buggy cards (such as Compex WLE900VX). + +Move the code which enables link training immediately before the one +which starts link traning. + +This fixes detection issues of Compex WLE900VX card on Turris MOX after +cold boot. + +Link: https://lore.kernel.org/r/20200430080625.26070-2-pali@kernel.org +Fixes: f4c7d053d7f7 ("PCI: aardvark: Wait for endpoint to be ready...") +Tested-by: Tomasz Maciej Nowak +Signed-off-by: Pali Rohár +Signed-off-by: Lorenzo Pieralisi +Acked-by: Rob Herring +Acked-by: Thomas Petazzoni +--- + drivers/pci/controller/pci-aardvark.c | 15 +++++++++------ + 1 file changed, 9 insertions(+), 6 deletions(-) + +--- a/drivers/pci/controller/pci-aardvark.c ++++ b/drivers/pci/controller/pci-aardvark.c +@@ -300,11 +300,6 @@ static void advk_pcie_setup_hw(struct ad + reg |= LANE_COUNT_1; + advk_writel(pcie, reg, PCIE_CORE_CTRL0_REG); + +- /* Enable link training */ +- reg = advk_readl(pcie, PCIE_CORE_CTRL0_REG); +- reg |= LINK_TRAINING_EN; +- advk_writel(pcie, reg, PCIE_CORE_CTRL0_REG); +- + /* Enable MSI */ + reg = advk_readl(pcie, PCIE_CORE_CTRL2_REG); + reg |= PCIE_CORE_CTRL2_MSI_ENABLE; +@@ -346,7 +341,15 @@ static void advk_pcie_setup_hw(struct ad + */ + msleep(PCI_PM_D3COLD_WAIT); + +- /* Start link training */ ++ /* Enable link training */ ++ reg = advk_readl(pcie, PCIE_CORE_CTRL0_REG); ++ reg |= LINK_TRAINING_EN; ++ advk_writel(pcie, reg, PCIE_CORE_CTRL0_REG); ++ ++ /* ++ * Start link training immediately after enabling it. ++ * This solves problems for some buggy cards. ++ */ + reg = advk_readl(pcie, PCIE_CORE_LINK_CTRL_STAT_REG); + reg |= PCIE_CORE_LINK_TRAINING; + advk_writel(pcie, reg, PCIE_CORE_LINK_CTRL_STAT_REG); diff --git a/target/linux/mvebu/patches-5.4/405-PCI-aardvark-Improve-link-training.patch b/target/linux/mvebu/patches-5.4/405-PCI-aardvark-Improve-link-training.patch new file mode 100644 index 000000000..2bf838432 --- /dev/null +++ b/target/linux/mvebu/patches-5.4/405-PCI-aardvark-Improve-link-training.patch @@ -0,0 +1,208 @@ +From 43fc679ced18006b12d918d7a8a4af392b7fbfe7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Thu, 30 Apr 2020 10:06:17 +0200 +Subject: [PATCH] PCI: aardvark: Improve link training +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Currently the aardvark driver trains link in PCIe gen2 mode. This may +cause some buggy gen1 cards (such as Compex WLE900VX) to be unstable or +even not detected. Moreover when ASPM code tries to retrain link second +time, these cards may stop responding and link goes down. If gen1 is +used this does not happen. + +Unconditionally forcing gen1 is not a good solution since it may have +performance impact on gen2 cards. + +To overcome this, read 'max-link-speed' property (as defined in PCI +device tree bindings) and use this as max gen mode. Then iteratively try +link training at this mode or lower until successful. After successful +link training choose final controller gen based on Negotiated Link Speed +from Link Status register, which should match card speed. + +Link: https://lore.kernel.org/r/20200430080625.26070-5-pali@kernel.org +Tested-by: Tomasz Maciej Nowak +Signed-off-by: Pali Rohár +Signed-off-by: Marek Behún +Signed-off-by: Lorenzo Pieralisi +Reviewed-by: Rob Herring +Acked-by: Thomas Petazzoni +--- + drivers/pci/controller/pci-aardvark.c | 114 ++++++++++++++++++++------ + 1 file changed, 89 insertions(+), 25 deletions(-) + +--- a/drivers/pci/controller/pci-aardvark.c ++++ b/drivers/pci/controller/pci-aardvark.c +@@ -39,6 +39,7 @@ + #define PCIE_CORE_LINK_CTRL_STAT_REG 0xd0 + #define PCIE_CORE_LINK_L0S_ENTRY BIT(0) + #define PCIE_CORE_LINK_TRAINING BIT(5) ++#define PCIE_CORE_LINK_SPEED_SHIFT 16 + #define PCIE_CORE_LINK_WIDTH_SHIFT 20 + #define PCIE_CORE_ERR_CAPCTL_REG 0x118 + #define PCIE_CORE_ERR_CAPCTL_ECRC_CHK_TX BIT(5) +@@ -201,6 +202,7 @@ struct advk_pcie { + struct mutex msi_used_lock; + u16 msi_msg; + int root_bus_nr; ++ int link_gen; + struct pci_bridge_emul bridge; + }; + +@@ -225,20 +227,16 @@ static int advk_pcie_link_up(struct advk + + static int advk_pcie_wait_for_link(struct advk_pcie *pcie) + { +- struct device *dev = &pcie->pdev->dev; + int retries; + + /* check if the link is up or not */ + for (retries = 0; retries < LINK_WAIT_MAX_RETRIES; retries++) { +- if (advk_pcie_link_up(pcie)) { +- dev_info(dev, "link up\n"); ++ if (advk_pcie_link_up(pcie)) + return 0; +- } + + usleep_range(LINK_WAIT_USLEEP_MIN, LINK_WAIT_USLEEP_MAX); + } + +- dev_err(dev, "link never came up\n"); + return -ETIMEDOUT; + } + +@@ -253,6 +251,85 @@ static void advk_pcie_wait_for_retrain(s + } + } + ++static int advk_pcie_train_at_gen(struct advk_pcie *pcie, int gen) ++{ ++ int ret, neg_gen; ++ u32 reg; ++ ++ /* Setup link speed */ ++ reg = advk_readl(pcie, PCIE_CORE_CTRL0_REG); ++ reg &= ~PCIE_GEN_SEL_MSK; ++ if (gen == 3) ++ reg |= SPEED_GEN_3; ++ else if (gen == 2) ++ reg |= SPEED_GEN_2; ++ else ++ reg |= SPEED_GEN_1; ++ advk_writel(pcie, reg, PCIE_CORE_CTRL0_REG); ++ ++ /* ++ * Enable link training. This is not needed in every call to this ++ * function, just once suffices, but it does not break anything either. ++ */ ++ reg = advk_readl(pcie, PCIE_CORE_CTRL0_REG); ++ reg |= LINK_TRAINING_EN; ++ advk_writel(pcie, reg, PCIE_CORE_CTRL0_REG); ++ ++ /* ++ * Start link training immediately after enabling it. ++ * This solves problems for some buggy cards. ++ */ ++ reg = advk_readl(pcie, PCIE_CORE_LINK_CTRL_STAT_REG); ++ reg |= PCIE_CORE_LINK_TRAINING; ++ advk_writel(pcie, reg, PCIE_CORE_LINK_CTRL_STAT_REG); ++ ++ ret = advk_pcie_wait_for_link(pcie); ++ if (ret) ++ return ret; ++ ++ reg = advk_readl(pcie, PCIE_CORE_LINK_CTRL_STAT_REG); ++ neg_gen = (reg >> PCIE_CORE_LINK_SPEED_SHIFT) & 0xf; ++ ++ return neg_gen; ++} ++ ++static void advk_pcie_train_link(struct advk_pcie *pcie) ++{ ++ struct device *dev = &pcie->pdev->dev; ++ int neg_gen = -1, gen; ++ ++ /* ++ * Try link training at link gen specified by device tree property ++ * 'max-link-speed'. If this fails, iteratively train at lower gen. ++ */ ++ for (gen = pcie->link_gen; gen > 0; --gen) { ++ neg_gen = advk_pcie_train_at_gen(pcie, gen); ++ if (neg_gen > 0) ++ break; ++ } ++ ++ if (neg_gen < 0) ++ goto err; ++ ++ /* ++ * After successful training if negotiated gen is lower than requested, ++ * train again on negotiated gen. This solves some stability issues for ++ * some buggy gen1 cards. ++ */ ++ if (neg_gen < gen) { ++ gen = neg_gen; ++ neg_gen = advk_pcie_train_at_gen(pcie, gen); ++ } ++ ++ if (neg_gen == gen) { ++ dev_info(dev, "link up at gen %i\n", gen); ++ return; ++ } ++ ++err: ++ dev_err(dev, "link never came up\n"); ++} ++ + static void advk_pcie_setup_hw(struct advk_pcie *pcie) + { + u32 reg; +@@ -288,12 +365,6 @@ static void advk_pcie_setup_hw(struct ad + PCIE_CORE_CTRL2_TD_ENABLE; + advk_writel(pcie, reg, PCIE_CORE_CTRL2_REG); + +- /* Set GEN2 */ +- reg = advk_readl(pcie, PCIE_CORE_CTRL0_REG); +- reg &= ~PCIE_GEN_SEL_MSK; +- reg |= SPEED_GEN_2; +- advk_writel(pcie, reg, PCIE_CORE_CTRL0_REG); +- + /* Set lane X1 */ + reg = advk_readl(pcie, PCIE_CORE_CTRL0_REG); + reg &= ~LANE_CNT_MSK; +@@ -341,20 +412,7 @@ static void advk_pcie_setup_hw(struct ad + */ + msleep(PCI_PM_D3COLD_WAIT); + +- /* Enable link training */ +- reg = advk_readl(pcie, PCIE_CORE_CTRL0_REG); +- reg |= LINK_TRAINING_EN; +- advk_writel(pcie, reg, PCIE_CORE_CTRL0_REG); +- +- /* +- * Start link training immediately after enabling it. +- * This solves problems for some buggy cards. +- */ +- reg = advk_readl(pcie, PCIE_CORE_LINK_CTRL_STAT_REG); +- reg |= PCIE_CORE_LINK_TRAINING; +- advk_writel(pcie, reg, PCIE_CORE_LINK_CTRL_STAT_REG); +- +- advk_pcie_wait_for_link(pcie); ++ advk_pcie_train_link(pcie); + + reg = advk_readl(pcie, PCIE_CORE_CMD_STATUS_REG); + reg |= PCIE_CORE_CMD_MEM_ACCESS_EN | +@@ -1035,6 +1093,12 @@ static int advk_pcie_probe(struct platfo + return ret; + } + ++ ret = of_pci_get_max_link_speed(dev->of_node); ++ if (ret <= 0 || ret > 3) ++ pcie->link_gen = 3; ++ else ++ pcie->link_gen = ret; ++ + advk_pcie_setup_hw(pcie); + + ret = advk_sw_pci_bridge_init(pcie); diff --git a/target/linux/mvebu/patches-5.4/406-PCI-aardvark-Issue-PERST-via-GPIO.patch b/target/linux/mvebu/patches-5.4/406-PCI-aardvark-Issue-PERST-via-GPIO.patch new file mode 100644 index 000000000..83212ec47 --- /dev/null +++ b/target/linux/mvebu/patches-5.4/406-PCI-aardvark-Issue-PERST-via-GPIO.patch @@ -0,0 +1,123 @@ +From 5169a9851daaa2782a7bd2bb83d5b1bd224b2879 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pali=20Roh=C3=A1r?= +Date: Thu, 30 Apr 2020 10:06:18 +0200 +Subject: [PATCH] PCI: aardvark: Issue PERST via GPIO +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Add support for issuing PERST via GPIO specified in 'reset-gpios' +property (as described in PCI device tree bindings). + +Some buggy cards (e.g. Compex WLE900VX or WLE1216) are not detected +after reboot when PERST is not issued during driver initialization. + +If bootloader already enabled link training then issuing PERST has no +effect for some buggy cards (e.g. Compex WLE900VX) and these cards are +not detected. We therefore clear the LINK_TRAINING_EN register before. + +It was observed that Compex WLE900VX card needs to be in PERST reset +for at least 10ms if bootloader enabled link training. + +Tested on Turris MOX. + +Link: https://lore.kernel.org/r/20200430080625.26070-6-pali@kernel.org +Tested-by: Tomasz Maciej Nowak +Signed-off-by: Pali Rohár +Signed-off-by: Lorenzo Pieralisi +Acked-by: Thomas Petazzoni +--- + drivers/pci/controller/pci-aardvark.c | 43 ++++++++++++++++++++++++++- + 1 file changed, 42 insertions(+), 1 deletion(-) + +--- a/drivers/pci/controller/pci-aardvark.c ++++ b/drivers/pci/controller/pci-aardvark.c +@@ -9,6 +9,7 @@ + */ + + #include ++#include + #include + #include + #include +@@ -17,6 +18,7 @@ + #include + #include + #include ++#include + #include + + #include "../pci.h" +@@ -204,6 +206,7 @@ struct advk_pcie { + int root_bus_nr; + int link_gen; + struct pci_bridge_emul bridge; ++ struct gpio_desc *reset_gpio; + }; + + static inline void advk_writel(struct advk_pcie *pcie, u32 val, u64 reg) +@@ -330,10 +333,31 @@ err: + dev_err(dev, "link never came up\n"); + } + ++static void advk_pcie_issue_perst(struct advk_pcie *pcie) ++{ ++ u32 reg; ++ ++ if (!pcie->reset_gpio) ++ return; ++ ++ /* PERST does not work for some cards when link training is enabled */ ++ reg = advk_readl(pcie, PCIE_CORE_CTRL0_REG); ++ reg &= ~LINK_TRAINING_EN; ++ advk_writel(pcie, reg, PCIE_CORE_CTRL0_REG); ++ ++ /* 10ms delay is needed for some cards */ ++ dev_info(&pcie->pdev->dev, "issuing PERST via reset GPIO for 10ms\n"); ++ gpiod_set_value_cansleep(pcie->reset_gpio, 1); ++ usleep_range(10000, 11000); ++ gpiod_set_value_cansleep(pcie->reset_gpio, 0); ++} ++ + static void advk_pcie_setup_hw(struct advk_pcie *pcie) + { + u32 reg; + ++ advk_pcie_issue_perst(pcie); ++ + /* Set to Direct mode */ + reg = advk_readl(pcie, CTRL_CONFIG_REG); + reg &= ~(CTRL_MODE_MASK << CTRL_MODE_SHIFT); +@@ -406,7 +430,8 @@ static void advk_pcie_setup_hw(struct ad + + /* + * PERST# signal could have been asserted by pinctrl subsystem before +- * probe() callback has been called, making the endpoint going into ++ * probe() callback has been called or issued explicitly by reset gpio ++ * function advk_pcie_issue_perst(), making the endpoint going into + * fundamental reset. As required by PCI Express spec a delay for at + * least 100ms after such a reset before link training is needed. + */ +@@ -1093,6 +1118,22 @@ static int advk_pcie_probe(struct platfo + return ret; + } + ++ pcie->reset_gpio = devm_gpiod_get_from_of_node(dev, dev->of_node, ++ "reset-gpios", 0, ++ GPIOD_OUT_LOW, ++ "pcie1-reset"); ++ ret = PTR_ERR_OR_ZERO(pcie->reset_gpio); ++ if (ret) { ++ if (ret == -ENOENT) { ++ pcie->reset_gpio = NULL; ++ } else { ++ if (ret != -EPROBE_DEFER) ++ dev_err(dev, "Failed to get reset-gpio: %i\n", ++ ret); ++ return ret; ++ } ++ } ++ + ret = of_pci_get_max_link_speed(dev->of_node); + if (ret <= 0 || ret > 3) + pcie->link_gen = 3; diff --git a/target/linux/mvebu/patches-5.4/407-PCI-aardvark-Add-PHY-support.patch b/target/linux/mvebu/patches-5.4/407-PCI-aardvark-Add-PHY-support.patch new file mode 100644 index 000000000..fa04861e8 --- /dev/null +++ b/target/linux/mvebu/patches-5.4/407-PCI-aardvark-Add-PHY-support.patch @@ -0,0 +1,152 @@ +From 366697018c9a2aa67d457bfdc495115cface6ae8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Thu, 30 Apr 2020 10:06:20 +0200 +Subject: [PATCH] PCI: aardvark: Add PHY support +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +With recent proposed changes for U-Boot it is possible that bootloader +won't initialize the PHY for this controller (currently the PHY is +initialized regardless whether PCI is used in U-Boot, but with these +proposed changes the PHY is initialized only on request). + +Since the mvebu-a3700-comphy driver by Miquèl Raynal supports enabling +PCIe PHY, and since Linux' functionality should be independent on what +bootloader did, add code for enabling generic PHY if found in device OF +node. + +The mvebu-a3700-comphy driver does PHY powering via SMC calls to ARM +Trusted Firmware. The corresponding code in ARM Trusted Firmware skips +one register write which U-Boot does not: step 7 ("Enable TX"), see [1]. +Instead ARM Trusted Firmware expects PCIe driver to do this step, +probably because the register is in PCIe controller address space, +instead of PHY address space. We therefore add this step into the +advk_pcie_setup_hw function. + +[1] https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/drivers/marvell/comphy/phy-comphy-3700.c?h=v2.3-rc2#n836 + +Link: https://lore.kernel.org/r/20200430080625.26070-8-pali@kernel.org +Tested-by: Tomasz Maciej Nowak +Signed-off-by: Marek Behún +Signed-off-by: Lorenzo Pieralisi +Reviewed-by: Rob Herring +Acked-by: Thomas Petazzoni +Cc: Miquèl Raynal +--- + drivers/pci/controller/pci-aardvark.c | 69 +++++++++++++++++++++++++++ + 1 file changed, 69 insertions(+) + +--- a/drivers/pci/controller/pci-aardvark.c ++++ b/drivers/pci/controller/pci-aardvark.c +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -103,6 +104,8 @@ + #define PCIE_CORE_CTRL2_STRICT_ORDER_ENABLE BIT(5) + #define PCIE_CORE_CTRL2_OB_WIN_ENABLE BIT(6) + #define PCIE_CORE_CTRL2_MSI_ENABLE BIT(10) ++#define PCIE_CORE_REF_CLK_REG (CONTROL_BASE_ADDR + 0x14) ++#define PCIE_CORE_REF_CLK_TX_ENABLE BIT(1) + #define PCIE_MSG_LOG_REG (CONTROL_BASE_ADDR + 0x30) + #define PCIE_ISR0_REG (CONTROL_BASE_ADDR + 0x40) + #define PCIE_MSG_PM_PME_MASK BIT(7) +@@ -207,6 +210,7 @@ struct advk_pcie { + int link_gen; + struct pci_bridge_emul bridge; + struct gpio_desc *reset_gpio; ++ struct phy *phy; + }; + + static inline void advk_writel(struct advk_pcie *pcie, u32 val, u64 reg) +@@ -358,6 +362,11 @@ static void advk_pcie_setup_hw(struct ad + + advk_pcie_issue_perst(pcie); + ++ /* Enable TX */ ++ reg = advk_readl(pcie, PCIE_CORE_REF_CLK_REG); ++ reg |= PCIE_CORE_REF_CLK_TX_ENABLE; ++ advk_writel(pcie, reg, PCIE_CORE_REF_CLK_REG); ++ + /* Set to Direct mode */ + reg = advk_readl(pcie, CTRL_CONFIG_REG); + reg &= ~(CTRL_MODE_MASK << CTRL_MODE_SHIFT); +@@ -1083,6 +1092,62 @@ out_release_res: + return err; + } + ++static void __maybe_unused advk_pcie_disable_phy(struct advk_pcie *pcie) ++{ ++ phy_power_off(pcie->phy); ++ phy_exit(pcie->phy); ++} ++ ++static int advk_pcie_enable_phy(struct advk_pcie *pcie) ++{ ++ int ret; ++ ++ if (!pcie->phy) ++ return 0; ++ ++ ret = phy_init(pcie->phy); ++ if (ret) ++ return ret; ++ ++ ret = phy_set_mode(pcie->phy, PHY_MODE_PCIE); ++ if (ret) { ++ phy_exit(pcie->phy); ++ return ret; ++ } ++ ++ ret = phy_power_on(pcie->phy); ++ if (ret) { ++ phy_exit(pcie->phy); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int advk_pcie_setup_phy(struct advk_pcie *pcie) ++{ ++ struct device *dev = &pcie->pdev->dev; ++ struct device_node *node = dev->of_node; ++ int ret = 0; ++ ++ pcie->phy = devm_of_phy_get(dev, node, NULL); ++ if (IS_ERR(pcie->phy) && (PTR_ERR(pcie->phy) == -EPROBE_DEFER)) ++ return PTR_ERR(pcie->phy); ++ ++ /* Old bindings miss the PHY handle */ ++ if (IS_ERR(pcie->phy)) { ++ dev_warn(dev, "PHY unavailable (%ld)\n", PTR_ERR(pcie->phy)); ++ pcie->phy = NULL; ++ return 0; ++ } ++ ++ ret = advk_pcie_enable_phy(pcie); ++ if (ret) ++ dev_err(dev, "Failed to initialize PHY (%d)\n", ret); ++ ++ return ret; ++} ++ + static int advk_pcie_probe(struct platform_device *pdev) + { + struct device *dev = &pdev->dev; +@@ -1140,6 +1205,10 @@ static int advk_pcie_probe(struct platfo + else + pcie->link_gen = ret; + ++ ret = advk_pcie_setup_phy(pcie); ++ if (ret) ++ return ret; ++ + advk_pcie_setup_hw(pcie); + + ret = advk_sw_pci_bridge_init(pcie); diff --git a/target/linux/mvebu/patches-5.4/408-PCI-aardvark-Don-t-touch-PCIe-registers-if-no-card-c.patch b/target/linux/mvebu/patches-5.4/408-PCI-aardvark-Don-t-touch-PCIe-registers-if-no-card-c.patch new file mode 100644 index 000000000..dfc068c8c --- /dev/null +++ b/target/linux/mvebu/patches-5.4/408-PCI-aardvark-Don-t-touch-PCIe-registers-if-no-card-c.patch @@ -0,0 +1,50 @@ +From 70e380250c3621c55ff218cbaf2272830d9dbb1d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pali=20Roh=C3=A1r?= +Date: Thu, 2 Jul 2020 10:30:36 +0200 +Subject: [PATCH] PCI: aardvark: Don't touch PCIe registers if no card + connected +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When there is no PCIe card connected and advk_pcie_rd_conf() or +advk_pcie_wr_conf() is called for PCI bus which doesn't belong to emulated +root bridge, the aardvark driver throws the following error message: + + advk-pcie d0070000.pcie: config read/write timed out + +Obviously accessing PCIe registers of disconnected card is not possible. + +Extend check in advk_pcie_valid_device() function for validating +availability of PCIe bus. If PCIe link is down, then the device is marked +as Not Found and the driver does not try to access these registers. + +This is just an optimization to prevent accessing PCIe registers when card +is disconnected. Trying to access PCIe registers of disconnected card does +not cause any crash, kernel just needs to wait for a timeout. So if card +disappear immediately after checking for PCIe link (before accessing PCIe +registers), it does not cause any problems. + +Link: https://lore.kernel.org/r/20200702083036.12230-1-pali@kernel.org +Signed-off-by: Pali Rohár +Signed-off-by: Lorenzo Pieralisi +--- + drivers/pci/controller/pci-aardvark.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/pci/controller/pci-aardvark.c ++++ b/drivers/pci/controller/pci-aardvark.c +@@ -639,6 +639,13 @@ static bool advk_pcie_valid_device(struc + if ((bus->number == pcie->root_bus_nr) && PCI_SLOT(devfn) != 0) + return false; + ++ /* ++ * If the link goes down after we check for link-up, nothing bad ++ * happens but the config access times out. ++ */ ++ if (bus->number != pcie->root_bus_nr && !advk_pcie_link_up(pcie)) ++ return false; ++ + return true; + } + diff --git a/target/linux/mvebu/patches-5.4/410-PCI-aardvark-Fix-initialization-with-old-Marvell-s-A.patch b/target/linux/mvebu/patches-5.4/410-PCI-aardvark-Fix-initialization-with-old-Marvell-s-A.patch new file mode 100644 index 000000000..bb9d7b784 --- /dev/null +++ b/target/linux/mvebu/patches-5.4/410-PCI-aardvark-Fix-initialization-with-old-Marvell-s-A.patch @@ -0,0 +1,44 @@ +From b0c6ae0f8948a2be6bf4e8b4bbab9ca1343289b6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pali=20Roh=C3=A1r?= +Date: Wed, 2 Sep 2020 16:43:44 +0200 +Subject: [PATCH] PCI: aardvark: Fix initialization with old Marvell's Arm + Trusted Firmware +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Old ATF automatically power on pcie phy and does not provide SMC call for +phy power on functionality which leads to aardvark initialization failure: + +[ 0.330134] mvebu-a3700-comphy d0018300.phy: unsupported SMC call, try updating your firmware +[ 0.338846] phy phy-d0018300.phy.1: phy poweron failed --> -95 +[ 0.344753] advk-pcie d0070000.pcie: Failed to initialize PHY (-95) +[ 0.351160] advk-pcie: probe of d0070000.pcie failed with error -95 + +This patch fixes above failure by ignoring 'not supported' error in +aardvark driver. In this case it is expected that phy is already power on. + +Tested-by: Tomasz Maciej Nowak +Link: https://lore.kernel.org/r/20200902144344.16684-3-pali@kernel.org +Fixes: 366697018c9a ("PCI: aardvark: Add PHY support") +Signed-off-by: Pali Rohár +Signed-off-by: Lorenzo Pieralisi +Reviewed-by: Rob Herring +Cc: # 5.8+: ea17a0f153af: phy: marvell: comphy: Convert internal SMCC firmware return codes to errno +--- + drivers/pci/controller/pci-aardvark.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/pci/controller/pci-aardvark.c ++++ b/drivers/pci/controller/pci-aardvark.c +@@ -1123,7 +1123,9 @@ static int advk_pcie_enable_phy(struct a + } + + ret = phy_power_on(pcie->phy); +- if (ret) { ++ if (ret == -EOPNOTSUPP) { ++ dev_warn(&pcie->pdev->dev, "PHY unsupported by firmware\n"); ++ } else if (ret) { + phy_exit(pcie->phy); + return ret; + } diff --git a/target/linux/mvebu/patches-5.4/521-arm64-dts-marvell-espressobin-Add-ethernet-switch-al.patch b/target/linux/mvebu/patches-5.4/521-arm64-dts-marvell-espressobin-Add-ethernet-switch-al.patch new file mode 100644 index 000000000..61225387d --- /dev/null +++ b/target/linux/mvebu/patches-5.4/521-arm64-dts-marvell-espressobin-Add-ethernet-switch-al.patch @@ -0,0 +1,134 @@ +From b64d814257b027e29a474bcd660f6372490138c7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pali=20Roh=C3=A1r?= +Date: Mon, 7 Sep 2020 13:27:17 +0200 +Subject: [PATCH] arm64: dts: marvell: espressobin: Add ethernet switch aliases +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Espressobin boards have 3 ethernet ports and some of them got assigned more +then one MAC address. MAC addresses are stored in U-Boot environment. + +Since commit a2c7023f7075c ("net: dsa: read mac address from DT for slave +device") kernel can use MAC addresses from DT for particular DSA port. + +Currently Espressobin DTS file contains alias just for ethernet0. + +This patch defines additional ethernet aliases in Espressobin DTS files, so +bootloader can fill correct MAC address for DSA switch ports if more MAC +addresses were specified. + +DT alias ethernet1 is used for wan port, DT aliases ethernet2 and ethernet3 +are used for lan ports for both Espressobin revisions (V5 and V7). + +Fixes: 5253cb8c00a6f ("arm64: dts: marvell: espressobin: add ethernet alias") +Cc: # a2c7023f7075c: dsa: read mac address +Signed-off-by: Pali Rohár +Reviewed-by: Andrew Lunn +Reviewed-by: Andre Heider +Signed-off-by: Gregory CLEMENT +--- + .../dts/marvell/armada-3720-espressobin-v7-emmc.dts | 10 ++++++++-- + .../boot/dts/marvell/armada-3720-espressobin-v7.dts | 10 ++++++++-- + .../boot/dts/marvell/armada-3720-espressobin.dtsi | 12 ++++++++---- + 3 files changed, 24 insertions(+), 8 deletions(-) + +--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts ++++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts +@@ -15,16 +15,22 @@ + compatible = "globalscale,espressobin-v7-emmc", "globalscale,espressobin-v7", + "globalscale,espressobin", "marvell,armada3720", + "marvell,armada3710"; ++ ++ aliases { ++ /* ethernet1 is wan port */ ++ ethernet1 = &switch0port3; ++ ethernet3 = &switch0port1; ++ }; + }; + + &ports { +- port@1 { ++ switch0port1: port@1 { + reg = <1>; + label = "lan1"; + phy-handle = <&switch0phy0>; + }; + +- port@3 { ++ switch0port3: port@3 { + reg = <3>; + label = "wan"; + phy-handle = <&switch0phy2>; +--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts ++++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts +@@ -14,16 +14,22 @@ + model = "Globalscale Marvell ESPRESSOBin Board V7"; + compatible = "globalscale,espressobin-v7", "globalscale,espressobin", + "marvell,armada3720", "marvell,armada3710"; ++ ++ aliases { ++ /* ethernet1 is wan port */ ++ ethernet1 = &switch0port3; ++ ethernet3 = &switch0port1; ++ }; + }; + + &ports { +- port@1 { ++ switch0port1: port@1 { + reg = <1>; + label = "lan1"; + phy-handle = <&switch0phy0>; + }; + +- port@3 { ++ switch0port3: port@3 { + reg = <3>; + label = "wan"; + phy-handle = <&switch0phy2>; +--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts ++++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +@@ -21,6 +21,10 @@ + + aliases { + ethernet0 = ð0; ++ /* for dsa slave device */ ++ ethernet1 = &switch0port1; ++ ethernet2 = &switch0port2; ++ ethernet3 = &switch0port3; + serial0 = &uart0; + serial1 = &uart1; + }; +@@ -147,7 +151,7 @@ + #address-cells = <1>; + #size-cells = <0>; + +- port@0 { ++ switch0port0: port@0 { + reg = <0>; + label = "cpu"; + ethernet = <ð0>; +@@ -158,19 +162,19 @@ + }; + }; + +- port@1 { ++ switch0port1: port@1 { + reg = <1>; + label = "wan"; + phy-handle = <&switch0phy0>; + }; + +- port@2 { ++ switch0port2: port@2 { + reg = <2>; + label = "lan0"; + phy-handle = <&switch0phy1>; + }; + +- port@3 { ++ switch0port3: port@3 { + reg = <3>; + label = "lan1"; + phy-handle = <&switch0phy2>; diff --git a/target/linux/mvebu/patches-5.4/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch b/target/linux/mvebu/patches-5.4/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch index 7b112eb8a..a741e378d 100644 --- a/target/linux/mvebu/patches-5.4/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch +++ b/target/linux/mvebu/patches-5.4/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch @@ -15,7 +15,7 @@ Signed-off-by: Tomasz Maciej Nowak --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -143,7 +143,7 @@ +@@ -147,7 +147,7 @@ dsa,member = <0 0>; diff --git a/target/linux/mvebu/patches-5.4/523-arm64-dts-marvell-espressobin-remove-COMPHY-nodes-as.patch b/target/linux/mvebu/patches-5.4/523-arm64-dts-marvell-espressobin-remove-COMPHY-nodes-as.patch index dd7a9b2cd..44e9a9237 100644 --- a/target/linux/mvebu/patches-5.4/523-arm64-dts-marvell-espressobin-remove-COMPHY-nodes-as.patch +++ b/target/linux/mvebu/patches-5.4/523-arm64-dts-marvell-espressobin-remove-COMPHY-nodes-as.patch @@ -24,7 +24,7 @@ Signed-off-by: Tomasz Maciej Nowak --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -60,8 +60,6 @@ +@@ -64,8 +64,6 @@ /* J6 */ &sata { status = "okay"; @@ -33,7 +33,7 @@ Signed-off-by: Tomasz Maciej Nowak }; /* J1 */ -@@ -127,11 +125,17 @@ +@@ -131,11 +129,17 @@ /* J7 */ &usb3 { status = "okay"; diff --git a/target/linux/mvebu/patches-5.4/552-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch b/target/linux/mvebu/patches-5.4/552-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch new file mode 100644 index 000000000..9eeddaeba --- /dev/null +++ b/target/linux/mvebu/patches-5.4/552-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch @@ -0,0 +1,93 @@ +From 715878016984b2617f6c1f177c50039e12e7bd5b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Thu, 30 Apr 2020 10:06:23 +0200 +Subject: [PATCH] arm64: dts: marvell: armada-37xx: Set pcie_reset_pin to gpio + function +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +We found out that we are unable to control the PERST# signal via the +default pin dedicated to be PERST# pin (GPIO2[3] pin) on A3700 SOC when +this pin is in EP_PCIE1_Resetn mode. There is a register in the PCIe +register space called PERSTN_GPIO_EN (D0088004[3]), but changing the +value of this register does not change the pin output when measuring +with voltmeter. + +We do not know if this is a bug in the SOC, or if it works only when +PCIe controller is in a certain state. + +Commit f4c7d053d7f7 ("PCI: aardvark: Wait for endpoint to be ready +before training link") says that when this pin changes pinctrl mode +from EP_PCIE1_Resetn to GPIO, the PERST# signal is asserted for a brief +moment. + +So currently the situation is that on A3700 boards the PERST# signal is +asserted in U-Boot (because the code in U-Boot issues reset via this pin +via GPIO mode), and then in Linux by the obscure and undocumented +mechanism described by the above mentioned commit. + +We want to issue PERST# signal in a known way, therefore this patch +changes the pcie_reset_pin function from "pcie" to "gpio" and adds the +reset-gpios property to the PCIe node in device tree files of +EspressoBin and Armada 3720 Dev Board (Turris Mox device tree already +has this property and uDPU does not have a PCIe port). + +Signed-off-by: Marek Behún +Cc: Remi Pommarel +Tested-by: Tomasz Maciej Nowak +Acked-by: Thomas Petazzoni +Signed-off-by: Gregory CLEMENT +--- + arch/arm64/boot/dts/marvell/armada-3720-db.dts | 3 +++ + arch/arm64/boot/dts/marvell/armada-3720-espressobin.dtsi | 1 + + arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts | 4 ---- + arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 2 +- + 4 files changed, 5 insertions(+), 5 deletions(-) + +--- a/arch/arm64/boot/dts/marvell/armada-3720-db.dts ++++ b/arch/arm64/boot/dts/marvell/armada-3720-db.dts +@@ -128,6 +128,9 @@ + + /* CON15(V2.0)/CON17(V1.4) : PCIe / CON15(V2.0)/CON12(V1.4) :mini-PCIe */ + &pcie0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pcie_reset_pins &pcie_clkreq_pins>; ++ reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>; + status = "okay"; + }; + +--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts ++++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +@@ -59,6 +59,7 @@ + phys = <&comphy1 0>; + pinctrl-names = "default"; + pinctrl-0 = <&pcie_reset_pins &pcie_clkreq_pins>; ++ reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>; + }; + + /* J6 */ +--- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts ++++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts +@@ -120,10 +120,6 @@ + }; + }; + +-&pcie_reset_pins { +- function = "gpio"; +-}; +- + &pcie0 { + pinctrl-names = "default"; + pinctrl-0 = <&pcie_reset_pins &pcie_clkreq_pins>; +--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi ++++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi +@@ -318,7 +318,7 @@ + + pcie_reset_pins: pcie-reset-pins { + groups = "pcie1"; +- function = "pcie"; ++ function = "gpio"; + }; + + pcie_clkreq_pins: pcie-clkreq-pins { diff --git a/target/linux/mvebu/patches-5.4/553-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch b/target/linux/mvebu/patches-5.4/553-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch new file mode 100644 index 000000000..0c7830cb4 --- /dev/null +++ b/target/linux/mvebu/patches-5.4/553-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch @@ -0,0 +1,57 @@ +From df749cdb015011e9ed8b60ebb84b4e76a9f35735 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Thu, 30 Apr 2020 10:06:24 +0200 +Subject: [PATCH] arm64: dts: marvell: armada-37xx: Move PCIe comphy handle + property +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Move the comphy handle property of the PCIe node from board specific +device tree files (EspressoBin and Turris Mox) to the generic +armada-37xx.dtsi. + +This is correct since this is the only possible PCIe PHY configuration +on Armada 37xx, so when PCIe is enabled on any board, this handle is +correct. + +Signed-off-by: Marek Behún +Tested-by: Tomasz Maciej Nowak +Acked-by: Thomas Petazzoni +Signed-off-by: Gregory CLEMENT +--- + arch/arm64/boot/dts/marvell/armada-3720-espressobin.dtsi | 1 - + arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts | 1 - + arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 1 + + 3 files changed, 1 insertion(+), 2 deletions(-) + +--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts ++++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +@@ -56,7 +56,6 @@ + /* J9 */ + &pcie0 { + status = "okay"; +- phys = <&comphy1 0>; + pinctrl-names = "default"; + pinctrl-0 = <&pcie_reset_pins &pcie_clkreq_pins>; + reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>; +--- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts ++++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts +@@ -126,7 +126,6 @@ + status = "okay"; + max-link-speed = <2>; + reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>; +- phys = <&comphy1 0>; + + /* enabled by U-Boot if PCIe module is present */ + status = "disabled"; +--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi ++++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi +@@ -494,6 +494,7 @@ + <0 0 0 2 &pcie_intc 1>, + <0 0 0 3 &pcie_intc 2>, + <0 0 0 4 &pcie_intc 3>; ++ phys = <&comphy1 0>; + pcie_intc: interrupt-controller { + interrupt-controller; + #interrupt-cells = <1>; diff --git a/target/linux/mvebu/patches-5.4/554-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch b/target/linux/mvebu/patches-5.4/554-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch new file mode 100644 index 000000000..04002480c --- /dev/null +++ b/target/linux/mvebu/patches-5.4/554-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch @@ -0,0 +1,44 @@ +From 1b5a2dd9e266d78d5fddd7e6b116e47ba9577b5e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pali=20Roh=C3=A1r?= +Date: Thu, 30 Apr 2020 10:06:25 +0200 +Subject: [PATCH] arm64: dts: marvell: armada-37xx: Move PCIe max-link-speed + property +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Move the max-link-speed property of the PCIe node from board specific +device tree files to the generic armada-37xx.dtsi. + +Armada 37xx supports only PCIe gen2 speed so max-link-speed property +should be in the generic armada-37xx.dtsi file. + +Signed-off-by: Pali Rohár +Tested-by: Tomasz Maciej Nowak +Acked-by: Thomas Petazzoni +Signed-off-by: Gregory CLEMENT +--- + arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts | 1 - + arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 1 + + 2 files changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts ++++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts +@@ -124,7 +124,6 @@ + pinctrl-names = "default"; + pinctrl-0 = <&pcie_reset_pins &pcie_clkreq_pins>; + status = "okay"; +- max-link-speed = <2>; + reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>; + + /* enabled by U-Boot if PCIe module is present */ +--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi ++++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi +@@ -494,6 +494,7 @@ + <0 0 0 2 &pcie_intc 1>, + <0 0 0 3 &pcie_intc 2>, + <0 0 0 4 &pcie_intc 3>; ++ max-link-speed = <2>; + phys = <&comphy1 0>; + pcie_intc: interrupt-controller { + interrupt-controller; diff --git a/target/linux/octeon/base-files/etc/board.d/01_network b/target/linux/octeon/base-files/etc/board.d/01_network index c1b614f60..749d99be1 100755 --- a/target/linux/octeon/base-files/etc/board.d/01_network +++ b/target/linux/octeon/base-files/etc/board.d/01_network @@ -11,6 +11,9 @@ case "$(board_name)" in itus,shield-router) ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0" ;; +ubnt,edgerouter-4) + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "lan0" + ;; *) ucidef_set_interfaces_lan_wan "eth0" "eth1" ;; diff --git a/target/linux/octeon/base-files/lib/preinit/01_sysinfo b/target/linux/octeon/base-files/lib/preinit/01_sysinfo index 34fa7392d..d66618b0c 100644 --- a/target/linux/octeon/base-files/lib/preinit/01_sysinfo +++ b/target/linux/octeon/base-files/lib/preinit/01_sysinfo @@ -17,6 +17,11 @@ do_sysinfo_octeon() { name="erpro" ;; + "UBNT_E300"*) + # let generic 02_sysinfo handle it since device has its own device tree + return 0 + ;; + "ITUS_SHIELD"*) name="itus,shield-router" ;; diff --git a/target/linux/octeon/base-files/lib/preinit/79_move_config b/target/linux/octeon/base-files/lib/preinit/79_move_config index fd780a946..5a84e6f18 100644 --- a/target/linux/octeon/base-files/lib/preinit/79_move_config +++ b/target/linux/octeon/base-files/lib/preinit/79_move_config @@ -1,21 +1,30 @@ # Copyright (C) 2014 OpenWrt.org move_config() { - . /lib/functions.sh . /lib/upgrade/common.sh + local device="$1" + [ -n "$device" ] && [ -b "$device" ] && { + mount -t vfat "$device" /mnt + [ -f "/mnt/$BACKUP_FILE" ] && mv -f "/mnt/$BACKUP_FILE" / + umount /mnt + } +} + +octeon_move_config() { + . /lib/functions.sh + case "$(board_name)" in erlite) - mount -t vfat /dev/sda1 /mnt - [ -f "/mnt/$BACKUP_FILE" ] && mv -f "/mnt/$BACKUP_FILE" / - umount /mnt + move_config "/dev/sda1" ;; itus,shield-router) - mount -t vfat /dev/mmcblk1p1 /mnt - [ -f "/mnt/$BACKUP_FILE" ] && mv -f "/mnt/$BACKUP_FILE" / - umount /mnt + move_config "/dev/mmcblk1p1" + ;; + ubnt,edgerouter-4) + move_config "/dev/mmcblk0p1" ;; esac } -boot_hook_add preinit_mount_root move_config +boot_hook_add preinit_mount_root octeon_move_config diff --git a/target/linux/octeon/base-files/lib/upgrade/platform.sh b/target/linux/octeon/base-files/lib/upgrade/platform.sh index d93895090..34d322d5b 100755 --- a/target/linux/octeon/base-files/lib/upgrade/platform.sh +++ b/target/linux/octeon/base-files/lib/upgrade/platform.sh @@ -33,6 +33,11 @@ platform_copy_config() { cp -af "$UPGRADE_BACKUP" "/mnt/$BACKUP_FILE" umount /mnt ;; + ubnt,edgerouter-4) + mount -t vfat /dev/mmcblk0p1 /mnt + cp -af "$UPGRADE_BACKUP" "/mnt/$BACKUP_FILE" + umount /mnt + ;; esac } @@ -82,7 +87,8 @@ platform_do_upgrade() { [ -b "${rootfs}" ] || return 1 case "$board" in - er) + er | \ + ubnt,edgerouter-4) kernel=mmcblk0p1 ;; erlite) @@ -111,7 +117,8 @@ platform_check_image() { case "$board" in er | \ erlite | \ - itus,shield-router) + itus,shield-router | \ + ubnt,edgerouter-4) local kernel_length=$(tar xf $tar_file $board_dir/kernel -O | wc -c 2> /dev/null) local rootfs_length=$(tar xf $tar_file $board_dir/root -O | wc -c 2> /dev/null) [ "$kernel_length" = 0 -o "$rootfs_length" = 0 ] && { diff --git a/target/linux/octeon/config-5.4 b/target/linux/octeon/config-5.4 index 4d16b81d3..9a2e953be 100644 --- a/target/linux/octeon/config-5.4 +++ b/target/linux/octeon/config-5.4 @@ -25,7 +25,7 @@ CONFIG_BLK_MQ_PCI=y CONFIG_BLK_SCSI_REQUEST=y CONFIG_BUILTIN_DTB=y # CONFIG_CAVIUM_CN63XXP1 is not set -CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE=2 +CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE=0 CONFIG_CAVIUM_OCTEON_LOCK_L2=y CONFIG_CAVIUM_OCTEON_LOCK_L2_EXCEPTION=y CONFIG_CAVIUM_OCTEON_LOCK_L2_INTERRUPT=y @@ -68,7 +68,14 @@ CONFIG_CRYPTO_RNG2=y CONFIG_DNOTIFY=y CONFIG_DTC=y CONFIG_EARLY_PRINTK=y +CONFIG_EDAC=y CONFIG_EDAC_ATOMIC_SCRUB=y +# CONFIG_EDAC_DEBUG is not set +CONFIG_EDAC_LEGACY_SYSFS=y +CONFIG_EDAC_OCTEON_PC=y +CONFIG_EDAC_OCTEON_L2C=y +CONFIG_EDAC_OCTEON_LMC=y +CONFIG_EDAC_OCTEON_PCI=y CONFIG_EDAC_SUPPORT=y CONFIG_EFI_EARLYCON=y CONFIG_ENABLE_MUST_CHECK=y @@ -153,6 +160,8 @@ CONFIG_HZ=250 CONFIG_HZ_250=y CONFIG_HZ_PERIODIC=y CONFIG_IMAGE_CMDLINE_HACK=y +CONFIG_I2C=y +CONFIG_I2C_OCTEON=y CONFIG_INITRAMFS_SOURCE="" CONFIG_IRQCHIP=y CONFIG_IRQ_DOMAIN=y @@ -176,14 +185,14 @@ CONFIG_MIPS_ASID_SHIFT=0 CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER=y # CONFIG_MIPS_CMDLINE_FROM_DTB is not set CONFIG_MIPS_EBPF_JIT=y -# CONFIG_MIPS_ELF_APPENDED_DTB is not set +CONFIG_MIPS_ELF_APPENDED_DTB=y CONFIG_MIPS_L1_CACHE_SHIFT=7 CONFIG_MIPS_L1_CACHE_SHIFT_7=y # CONFIG_MIPS_NO_APPENDED_DTB is not set CONFIG_MIPS_NR_CPU_NR_MAP=1024 CONFIG_MIPS_NR_CPU_NR_MAP_1024=y CONFIG_MIPS_PGD_C0_CONTEXT=y -CONFIG_MIPS_RAW_APPENDED_DTB=y +# CONFIG_MIPS_RAW_APPENDED_DTB is not set CONFIG_MIPS_SPRAM=y # CONFIG_MIPS_VA_BITS_48 is not set CONFIG_MMC=y @@ -195,7 +204,10 @@ CONFIG_MODULES_USE_ELF_RELA=y # CONFIG_MTD_CFI_INTELEXT is not set CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_SPI_NOR=y +CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NET_DSA=y CONFIG_NET_FLOW_LIMIT=y CONFIG_NLS=y CONFIG_NLS_CODEPAGE_437=y @@ -205,7 +217,7 @@ CONFIG_NR_CPUS=16 CONFIG_NR_CPUS_DEFAULT_64=y CONFIG_NVMEM=y CONFIG_OCTEON_ETHERNET=y -# CONFIG_OCTEON_ILM is not set +CONFIG_OCTEON_ILM=y CONFIG_OCTEON_MGMT_ETHERNET=y CONFIG_OCTEON_USB=y CONFIG_OCTEON_WDT=y @@ -223,6 +235,8 @@ CONFIG_PADATA=y CONFIG_PCI=y CONFIG_PCI_DOMAINS=y CONFIG_PCI_DRIVERS_LEGACY=y +CONFIG_PCIEAER=y +CONFIG_PCIEPORTBUS=y CONFIG_PERF_USE_VMALLOC=y CONFIG_PGTABLE_LEVELS=3 CONFIG_PHYLIB=y @@ -246,6 +260,9 @@ CONFIG_SG_POOL=y CONFIG_SMP=y CONFIG_SPARSEMEM=y CONFIG_SPARSEMEM_STATIC=y +CONFIG_SPI=y +CONFIG_SPI_MASTER=y +CONFIG_SPI_OCTEON=y CONFIG_SRCU=y CONFIG_SWIOTLB=y CONFIG_SWPHY=y @@ -278,6 +295,7 @@ CONFIG_USB_STORAGE=y CONFIG_USB_SUPPORT=y CONFIG_USE_OF=y CONFIG_VFAT_FS=y +CONFIG_VITESSE_PHY=y CONFIG_VM_EVENT_COUNTERS=y CONFIG_WATCHDOG_CORE=y CONFIG_WEAK_ORDERING=y diff --git a/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-4.dts b/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-4.dts new file mode 100644 index 000000000..a89455c61 --- /dev/null +++ b/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-4.dts @@ -0,0 +1,213 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "cn71xx.dtsi" + +#include +#include + +/ { + compatible = "ubnt,edgerouter-4", "cavium,cn7130"; + model = "Ubiquiti EdgeRouter 4"; + + aliases { + /* White + Blinking Blue */ + led-boot = &led_power_white; + /* Blue + Blinking White */ + led-failsafe = &led_power_blue; + /* Constant Blue */ + led-running = &led_power_blue; + /* Blue + Blinking White */ + led-upgrade = &led_power_blue; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x00000000>, + <0x0 0x10000000>, + <0x0 0x20000000>, + <0x0 0x30000000>; + }; + + leds { + compatible = "gpio-leds"; + + led_power_blue: power_blue { + label = "blue:power"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + led_power_white: power_white { + label = "white:power"; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + sfp: sfp { + compatible = "sff,sfp"; + i2c-bus = <&twsi0>; + /* Pins 12, 13 and 14 gets pulled low when SFP is plugged in */ + mod-def0-gpio = <&gpio 12 GPIO_ACTIVE_LOW>; + }; +}; + +&uart0 { + status = "okay"; +}; + +&usb0 { + status = "okay"; +}; + +&xhci0 { + status = "okay"; + dr_mode = "host"; +}; + +&twsi0 { + status = "okay"; + + sfp_eeprom@50 { + compatible = "at,24c04"; + reg = <0x50>; + }; + + sfp_eeprom@51 { + compatible = "at,24c04"; + reg = <0x51>; + }; +}; + +&spi { + status = "okay"; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "Macronix,mx25l6405d", "spi-flash"; + reg = <0>; + spi-max-frequency = <25000000>; + + partition@0 { + label = "boot0"; + read-only; + reg = <0x000000 0x300000>; + }; + + partition@300000 { + label = "dummy"; + read-only; + reg = <0x300000 0x100000>; + }; + + eeprom: partition@400000 { + label = "eeprom"; + read-only; + reg = <0x400000 0x10000>; + }; + }; +}; + +&mmc { + status = "okay"; + + mmc-slot@0 { + compatible = "mmc-slot"; + reg = <0>; + non-removable; + max-frequency = <26000000>; + voltage-ranges = <3300 3300>; + bus-width = <8>; + }; +}; + +&smi0 { + status = "okay"; + + phy4: ethernet-phy@4 { + device_type = "ethernet-phy"; + interrupts = <17 8>; + interrupt-parent = <&gpio>; + compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22"; + reg = <4>; + sfp = <&sfp>; + }; + + phy5: ethernet-phy@5 { + device_type = "ethernet-phy"; + interrupts = <17 8>; + interrupt-parent = <&gpio>; + compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22"; + reg = <5>; + }; + + phy6: ethernet-phy@6 { + device_type = "ethernet-phy"; + interrupts = <17 8>; + interrupt-parent = <&gpio>; + compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22"; + reg = <6>; + }; + + phy7: ethernet-phy@7 { + device_type = "ethernet-phy"; + interrupts = <17 8>; + interrupt-parent = <&gpio>; + compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22"; + reg = <7>; + }; +}; + +&pip { + status = "okay"; + + interface@0 { + status = "okay"; + + ethernet@0 { + label = "lan3"; + status = "okay"; + phy-mode = "sgmii"; + phy-handle = <&phy4>; + mtd-mac-address = <&eeprom 0>; + }; + + ethernet@1 { + label = "lan0"; + status = "okay"; + phy-mode = "sgmii"; + phy-handle = <&phy5>; + mtd-mac-address = <&eeprom 0>; + mtd-mac-address-increment = <(1)>; + }; + + ethernet@2 { + label = "lan1"; + status = "okay"; + phy-mode = "sgmii"; + phy-handle = <&phy6>; + mtd-mac-address = <&eeprom 0>; + mtd-mac-address-increment = <(2)>; + }; + + ethernet@3 { + label = "lan2"; + status = "okay"; + phy-mode = "sgmii"; + phy-handle = <&phy7>; + mtd-mac-address = <&eeprom 0>; + mtd-mac-address-increment = <(3)>; + }; + }; +}; diff --git a/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn71xx.dtsi b/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn71xx.dtsi new file mode 100644 index 000000000..4b6d1e28d --- /dev/null +++ b/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn71xx.dtsi @@ -0,0 +1,357 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +/ { + compatible = "cavium,cn71xx"; + #address-cells = <2>; + #size-cells = <2>; + interrupt-parent = <&ciu>; + + soc { + #address-cells = <2>; + #size-cells = <2>; + compatible = "simple-bus"; + ranges; + + bootbus@1180000000000 { + #address-cells = <2>; + #size-cells = <1>; + compatible = "cavium,octeon-3860-bootbus"; + reg = <0x11800 0x00 0x00 0x200>; + ranges = <0x00 0x00 0x10000 0x10000000 0x00>, + <0x01 0x00 0x10000 0x20000000 0x00>, + <0x02 0x00 0x10000 0x30000000 0x00>, + <0x03 0x00 0x10000 0x40000000 0x00>, + <0x04 0x00 0x10000 0x50000000 0x00>, + <0x05 0x00 0x10000 0x60000000 0x00>, + <0x06 0x00 0x10000 0x70000000 0x00>, + <0x07 0x00 0x10000 0x80000000 0x00>; + }; + + dma0: dma-engine@1180000000100 { + status = "disabled"; + compatible = "cavium,octeon-5750-bootbus-dma"; + reg = <0x11800 0x100 0x0 0x08>; + interrupts = <0 63>; + }; + + dma1: dma-engine@1180000000108 { + status = "disabled"; + compatible = "cavium,octeon-5750-bootbus-dma"; + reg = <0x11800 0x108 0x0 0x08>; + interrupts = <0 63>; + }; + + ciu: interrupt-controller@1070000000000 { + #interrupt-cells = <2>; + compatible = "cavium,octeon-3860-ciu"; + reg = <0x10700 0x00000000 0x0 0x7000>; + interrupt-controller; + }; + + cib0: interrupt-controller@107000000e000 { + #interrupt-cells = <2>; + compatible = "cavium,octeon-7130-cib"; + reg = <0x10700 0xe000 0x0 0x08>, /* RAW */ + <0x10700 0xe100 0x0 0x08>; /* EN */ + cavium,max-bits = <23>; + interrupts = <1 24>; + interrupt-parent = <&ciu>; + interrupt-controller; + }; + + cib1: interrupt-controller@107000000e200 { + #interrupt-cells = <2>; + compatible = "cavium,octeon-7130-cib"; + reg = <0x10700 0xe200 0x0 0x08>, /* RAW */ + <0x10700 0xe300 0x0 0x08>; /* EN */ + cavium,max-bits = <12>; + interrupts = <1 52>; + interrupt-parent = <&ciu>; + interrupt-controller; + }; + + cib2: interrupt-controller@107000000e400 { + #interrupt-cells = <2>; + compatible = "cavium,octeon-7130-cib"; + reg = <0x10700 0xe400 0x0 0x08>, /* RAW */ + <0x10700 0xe500 0x0 0x08>; /* EN */ + cavium,max-bits = <6>; + interrupts = <1 63>; + interrupt-parent = <&ciu>; + interrupt-controller; + }; + + cib3: interrupt-controller@107000000e600 { + #interrupt-cells = <2>; + compatible = "cavium,octeon-7130-cib"; + reg = <0x10700 0xe600 0x0 0x08>, /* RAW */ + <0x10700 0xe700 0x0 0x08>; /* EN */ + cavium,max-bits = <4>; + interrupts = <2 16>; + interrupt-parent = <&ciu>; + interrupt-controller; + }; + + cib4: interrupt-controller@107000000e800 { + #interrupt-cells = <2>; + compatible = "cavium,octeon-7130-cib"; + reg = <0x10700 0xe800 0x0 0x08>, /* RAW */ + <0x10700 0xea00 0x0 0x08>; /* EN */ + cavium,max-bits = <11>; + interrupts = <1 33>; + interrupt-parent = <&ciu>; + interrupt-controller; + }; + + cib5: interrupt-controller@107000000e900 { + #interrupt-cells = <2>; + compatible = "cavium,octeon-7130-cib"; + reg = <0x10700 0xe900 0x00 0x08>, /* RAW */ + <0x10700 0xeb00 0x00 0x08>; /* EN */ + cavium,max-bits = <11>; + interrupts = <1 23>; + interrupt-parent = <&ciu>; + interrupt-controller; + }; + + cib6: interrupt-controller@107000000ec00 { + #interrupt-cells = <2>; + compatible = "cavium,octeon-7130-cib"; + reg = <0x10700 0xec00 0x0 0x08>, /* RAW */ + <0x10700 0xee00 0x0 0x08>; /* EN */ + cavium,max-bits = <15>; + interrupts = <2 17>; + interrupt-parent = <&ciu>; + interrupt-controller; + }; + + gpio: gpio-controller@1070000000800 { + #interrupt-cells = <2>; + #gpio-cells = <2>; + compatible = "cavium,octeon-3860-gpio"; + reg = <0x10700 0x800 0x0 0x100>; + interrupts = <0 16>, <0 17>, <0 18>, <0 19>, + <0 20>, <0 21>, <0 22>, <0 23>, + <0 24>, <0 25>, <0 26>, <0 27>, + <0 28>, <0 29>, <0 30>, <0 31>; + interrupt-controller; + gpio-controller; + }; + + mmc: mmc@1180000002000 { + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + compatible = "cavium,octeon-6130-mmc"; + reg = <0x11800 0x2000 0x0 0x100>, + <0x11800 0x168 0x0 0x20>; + interrupts = <1 19>, <0 63>; + }; + + smi0: mdio@1180000001800 { + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + compatible = "cavium,octeon-3860-mdio"; + reg = <0x11800 0x1800 0x0 0x40>; + }; + + smi1: mdio@1180000001900 { + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + compatible = "cavium,octeon-3860-mdio"; + reg = <0x11800 0x1900 0x0 0x40>; + }; + + pip: pip@11800a0000000 { + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + compatible = "cavium,octeon-3860-pip"; + reg = <0x11800 0xa0000000 0x0 0x2000>; + + interface@0 { + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + compatible = "cavium,octeon-3860-pip-interface"; + reg = <0>; /* Interface */ + + ethernet@0 { + status = "disabled"; + compatible = "cavium,octeon-3860-pip-port"; + reg = <0>; /* Port */ + }; + + ethernet@1 { + status = "disabled"; + compatible = "cavium,octeon-3860-pip-port"; + reg = <1>; /* Port */ + }; + + ethernet@2 { + status = "disabled"; + compatible = "cavium,octeon-3860-pip-port"; + reg = <2>; /* Port */ + }; + + ethernet@3 { + status = "disabled"; + compatible = "cavium,octeon-3860-pip-port"; + reg = <3>; /* Port */ + }; + }; + + interface@1 { + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + compatible = "cavium,octeon-3860-pip-interface"; + reg = <1>; /* Interface */ + + ethernet@0 { + status = "disabled"; + compatible = "cavium,octeon-3860-pip-port"; + reg = <0>; /* Port */ + }; + + ethernet@1 { + status = "disabled"; + compatible = "cavium,octeon-3860-pip-port"; + reg = <1>; /* Port */ + }; + + ethernet@2 { + status = "disabled"; + compatible = "cavium,octeon-3860-pip-port"; + reg = <2>; /* Port */ + }; + + ethernet@3 { + status = "disabled"; + compatible = "cavium,octeon-3860-pip-port"; + reg = <3>; /* Port */ + }; + }; + }; + + twsi0: i2c@1180000001000 { + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + compatible = "cavium,octeon-3860-twsi"; + reg = <0x11800 0x1000 0x0 0x200>; + interrupts = <0 45>; + clock-frequency = <100000>; + }; + + twsi1: i2c@1180000001200 { + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + compatible = "cavium,octeon-3860-twsi"; + reg = <0x11800 0x1200 0x0 0x200>; + interrupts = <0 59>; + clock-frequency = <100000>; + }; + + uctl@118006c000000 { + status = "disabled"; + #address-cells = <2>; + #size-cells = <2>; + compatible = "cavium,octeon-7130-sata-uctl"; + reg = <0x11800 0x6c000000 0x00 0x100>; + ranges; + + sata@16c0000000000 { + status = "disabled"; + compatible = "cavium,octeon-7130-ahci"; + reg = <0x16c00 0x00 0x00 0x200>; + interrupt-parent = <&cib3>; + interrupts = <2 4>; + }; + }; + + usb0: uctl@1180068000000 { + status = "disabled"; + #address-cells = <2>; + #size-cells = <2>; + compatible = "cavium,octeon-7130-usb-uctl"; + reg = <0x11800 0x68000000 0x00 0x100>; + ranges; + power = <0x02 0x01 0x00>; + refclk-frequency = <100000000>; + refclk-type-hs = "pll_ref_clk"; + refclk-type-ss = "dlmc_ref_clk1"; + + xhci0: xhci@1680000000000 { + status = "disabled"; + compatible = "cavium,octeon-7130-xhci", "synopsys,dwc3"; + reg = <0x16800 0x0 0x10 0x00>; + interrupts = <9 4>; + interrupt-parent = <&cib4>; + }; + }; + + usb1: uctl@1180069000000 { + status = "disabled"; + #address-cells = <2>; + #size-cells = <2>; + compatible = "cavium,octeon-7130-usb-uctl"; + reg = <0x11800 0x69000000 0x00 0x100>; + ranges; + power = <0x02 0x02 0x01>; + refclk-frequency = <100000000>; + refclk-type-hs = "pll_ref_clk"; + refclk-type-ss = "dlmc_ref_clk1"; + + xhci1: xhci@1690000000000 { + status = "disabled"; + compatible = "cavium,octeon-7130-xhci", "synopsys,dwc3"; + reg = <0x16900 0x0 0x10 0x00>; + interrupts = <9 4>; + interrupt-parent = <&cib5>; + }; + }; + + uart0: serial@1180000000800 { + status = "disabled"; + compatible = "cavium,octeon-3860-uart", "ns16550"; + reg = <0x11800 0x800 0x0 0x400>; + reg-shift = <3>; + interrupts = <0 34>; + clock-frequency = <400000000>; + current-speed = <115200>; + }; + + uart1: serial@1180000000c00 { + status = "disabled"; + compatible = "cavium,octeon-3860-uart", "ns16550"; + reg = <0x11800 0xc00 0x0 0x400>; + reg-shift = <3>; + interrupts = <0 35>; + clock-frequency = <400000000>; + current-speed = <115200>; + }; + + ocla0@11800a8000000 { + status = "disabled"; + compatible = "cavium,octeon-7130-ocla"; + reg = <0x11800 0xa8000000 0x0 0x500000>; + interrupts = <0x08 0x01 0x09 0x01 0x0b 0x01>; + interrupt-parent = <&cib6>; + }; + + spi: spi@1070000001000 { + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + compatible = "cavium,octeon-3010-spi"; + reg = <0x10700 0x1000 0x00 0x100>; + interrupts = <0 58>; + spi-max-frequency = <100000000>; + }; + }; +}; diff --git a/target/linux/octeon/image/Makefile b/target/linux/octeon/image/Makefile index 1dbb60edb..b91c26244 100644 --- a/target/linux/octeon/image/Makefile +++ b/target/linux/octeon/image/Makefile @@ -7,11 +7,17 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk +define Build/append-dtb-to-elf + $(TARGET_CROSS)objcopy --update-section .appended_dtb=$(KDIR)/image-$(DEVICE_DTS).dtb $@ +endef + define Build/strip-kernel # Workaround pre-SDK-1.9.0 u-boot versions not handling the .notes section $(TARGET_CROSS)strip -R .notes $@ -o $@.stripped && mv $@.stripped $@ endef +DTS_DIR := $(DTS_DIR)/cavium-octeon + define Device/Default PROFILES = Default $$(DEVICE_NAME) KERNEL_NAME := vmlinux.elf @@ -44,9 +50,21 @@ define Device/ubnt_edgerouter DEVICE_MODEL := EdgeRouter BOARD_NAME := er CMDLINE := $(ER_CMDLINE) + DEFAULT := n endef TARGET_DEVICES += ubnt_edgerouter +define Device/ubnt_edgerouter-4 + DEVICE_VENDOR := Ubiquiti + DEVICE_MODEL := EdgeRouter 4 + DEVICE_DTS := cn7130_ubnt_edgerouter-4 + DEVICE_PACKAGES += kmod-gpio-button-hotplug kmod-leds-gpio kmod-of-mdio kmod-sfp kmod-usb3 kmod-usb-dwc3 kmod-usb-storage-uas + KERNEL := kernel-bin | patch-cmdline | append-dtb-to-elf + KERNEL_DEPENDS := $$(wildcard $(DTS_DIR)/$(DEVICE_DTS).dts) + CMDLINE := root=/dev/mmcblk0p2 rootfstype=squashfs,ext4 rootwait +endef +TARGET_DEVICES += ubnt_edgerouter-4 + ERLITE_CMDLINE:=-mtdparts=phys_mapped_flash:512k(boot0)ro,512k(boot1)ro,64k(eeprom)ro root=/dev/sda2 rootfstype=squashfs,ext4 rootwait define Device/ubnt_edgerouter-lite DEVICE_VENDOR := Ubiquiti diff --git a/target/linux/octeon/patches-5.4/110-er200-ethernet_probe_order.patch b/target/linux/octeon/patches-5.4/110-er200-ethernet_probe_order.patch index c1b6f73a3..7afa29275 100644 --- a/target/linux/octeon/patches-5.4/110-er200-ethernet_probe_order.patch +++ b/target/linux/octeon/patches-5.4/110-er200-ethernet_probe_order.patch @@ -1,6 +1,6 @@ --- a/drivers/staging/octeon/ethernet.c +++ b/drivers/staging/octeon/ethernet.c -@@ -682,6 +682,7 @@ static int cvm_oct_probe(struct platform +@@ -683,6 +683,7 @@ static int cvm_oct_probe(struct platform int interface; int fau = FAU_NUM_PACKET_BUFFERS_TO_FREE; int qos; @@ -8,7 +8,7 @@ struct device_node *pip; int mtu_overhead = ETH_HLEN + ETH_FCS_LEN; -@@ -805,13 +806,19 @@ static int cvm_oct_probe(struct platform +@@ -806,13 +807,19 @@ static int cvm_oct_probe(struct platform } num_interfaces = cvmx_helper_get_number_of_interfaces(); diff --git a/target/linux/octeon/patches-5.4/140-octeon_e300_support.patch b/target/linux/octeon/patches-5.4/140-octeon_e300_support.patch new file mode 100644 index 000000000..7fe56a47d --- /dev/null +++ b/target/linux/octeon/patches-5.4/140-octeon_e300_support.patch @@ -0,0 +1,18 @@ +--- a/arch/mips/include/asm/octeon/cvmx-bootinfo.h ++++ b/arch/mips/include/asm/octeon/cvmx-bootinfo.h +@@ -298,6 +298,7 @@ enum cvmx_board_types_enum { + CVMX_BOARD_TYPE_UBNT_E200 = 20003, + CVMX_BOARD_TYPE_UBNT_E220 = 20005, + CVMX_BOARD_TYPE_ITUS_SHIELD = 20006, ++ CVMX_BOARD_TYPE_UBNT_E300 = 20300, + CVMX_BOARD_TYPE_KONTRON_S1901 = 21901, + CVMX_BOARD_TYPE_CUST_PRIVATE_MAX = 30000, + +@@ -401,6 +402,7 @@ static inline const char *cvmx_board_typ + ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_UBNT_E200) + ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_UBNT_E220) + ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_ITUS_SHIELD) ++ ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_UBNT_E300) + ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_KONTRON_S1901) + ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MAX) + } diff --git a/target/linux/octeon/patches-5.4/700-allocate_interface_by_label.patch b/target/linux/octeon/patches-5.4/700-allocate_interface_by_label.patch new file mode 100644 index 000000000..3a9b2eb7c --- /dev/null +++ b/target/linux/octeon/patches-5.4/700-allocate_interface_by_label.patch @@ -0,0 +1,38 @@ +From: Roman Kuzmitskii +Date: Wed, 28 Oct 2020 19:00:00 +0000 +Subject: [PATCH] staging: octeon: add net-labels support + +With this patch, device name can be set within dts file +in the same way as dsa port can. + +Add label to pip interface node to use this feature: +label = "lan0"; + +Tested-by: Johannes Kimmel +Signed-off-by: Roman Kuzmitskii +--- a/drivers/staging/octeon/ethernet.c ++++ b/drivers/staging/octeon/ethernet.c +@@ -408,9 +408,12 @@ int cvm_oct_common_init(struct net_devic + { + struct octeon_ethernet *priv = netdev_priv(dev); + const u8 *mac = NULL; ++ const u8 *label = NULL; + +- if (priv->of_node) ++ if (priv->of_node) { + mac = of_get_mac_address(priv->of_node); ++ label = of_get_property(priv->of_node, "label", NULL); ++ } + + if (!IS_ERR_OR_NULL(mac)) + ether_addr_copy(dev->dev_addr, mac); +@@ -445,6 +448,9 @@ int cvm_oct_common_init(struct net_devic + if (dev->netdev_ops->ndo_stop) + dev->netdev_ops->ndo_stop(dev); + ++ if (!IS_ERR_OR_NULL(label)) ++ dev_alloc_name(dev, label); ++ + return 0; + } + diff --git a/target/linux/octeon/patches-5.4/701-honor_sgmii_node_device_tree_status.patch b/target/linux/octeon/patches-5.4/701-honor_sgmii_node_device_tree_status.patch new file mode 100644 index 000000000..9fb0c2f0a --- /dev/null +++ b/target/linux/octeon/patches-5.4/701-honor_sgmii_node_device_tree_status.patch @@ -0,0 +1,27 @@ +From: Roman Kuzmitskii +Date: Sun, 01 Nov 2020 19:00:00 +0000 +Subject: [PATCH] staging: octeon: sgmii to honor disabled dt node status + +With this patch, sgmii interface device tree node could be disabled and +that disabled interface will not be unnecessarily initialized. + +It solves the problem with Octeon boards that have 8 sgmii or more ports +initialized but have nothing connected to them. + +Tested-by: Johannes Kimmel +Signed-off-by: Roman Kuzmitskii +--- a/drivers/staging/octeon/ethernet.c ++++ b/drivers/staging/octeon/ethernet.c +@@ -885,8 +885,10 @@ static int cvm_oct_probe(struct platform + + case CVMX_HELPER_INTERFACE_MODE_SGMII: + priv->phy_mode = PHY_INTERFACE_MODE_SGMII; +- dev->netdev_ops = &cvm_oct_sgmii_netdev_ops; +- strscpy(dev->name, "eth%d", sizeof(dev->name)); ++ if (of_device_is_available(priv->of_node)) { ++ dev->netdev_ops = &cvm_oct_sgmii_netdev_ops; ++ strscpy(dev->name, "eth%d", sizeof(dev->name)); ++ } + break; + + case CVMX_HELPER_INTERFACE_MODE_SPI: diff --git a/target/linux/oxnas/patches-5.4/996-generic-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/oxnas/patches-5.4/996-generic-Mangle-bootloader-s-kernel-arguments.patch index 699d131c9..8c83d55b6 100644 --- a/target/linux/oxnas/patches-5.4/996-generic-Mangle-bootloader-s-kernel-arguments.patch +++ b/target/linux/oxnas/patches-5.4/996-generic-Mangle-bootloader-s-kernel-arguments.patch @@ -22,7 +22,7 @@ Signed-off-by: Adrian Panella --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -1825,6 +1825,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN +@@ -1827,6 +1827,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN The command-line arguments provided by the boot loader will be appended to the the device tree bootargs property. diff --git a/target/linux/pistachio/patches-5.4/150-pwm-img-Fix-null-pointer-access-in-probe.patch b/target/linux/pistachio/patches-5.4/150-pwm-img-Fix-null-pointer-access-in-probe.patch deleted file mode 100644 index d5c573c75..000000000 --- a/target/linux/pistachio/patches-5.4/150-pwm-img-Fix-null-pointer-access-in-probe.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 502396fe598126ffd91f962d53a507aa6c7276fc Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sat, 15 Aug 2020 16:37:43 +0200 -Subject: [PATCH v2] pwm: img: Fix null pointer access in probe - -dev_get_drvdata() is called in img_pwm_runtime_resume() before the -driver data is set. -When pm_runtime_enabled() returns false in img_pwm_probe() it calls -img_pwm_runtime_resume() which results in a null pointer access. - -This patch fixes the problem by setting the driver data earlier in the -img_pwm_probe() function. - -This crash was seen when booting the Imagination Technologies Creator -Ci40 (Marduk) with kernel 5.4 in OpenWrt. - -Fixes: e690ae526216 ("pwm: img: Add runtime PM") -Signed-off-by: Hauke Mehrtens -Acked-by: Lee Jones ---- - drivers/pwm/pwm-img.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- a/drivers/pwm/pwm-img.c -+++ b/drivers/pwm/pwm-img.c -@@ -277,6 +277,8 @@ static int img_pwm_probe(struct platform - return PTR_ERR(pwm->pwm_clk); - } - -+ platform_set_drvdata(pdev, pwm); -+ - pm_runtime_set_autosuspend_delay(&pdev->dev, IMG_PWM_PM_TIMEOUT); - pm_runtime_use_autosuspend(&pdev->dev); - pm_runtime_enable(&pdev->dev); -@@ -313,7 +315,6 @@ static int img_pwm_probe(struct platform - goto err_suspend; - } - -- platform_set_drvdata(pdev, pwm); - return 0; - - err_suspend: diff --git a/target/linux/sunxi/base-files/etc/board.d/01_leds b/target/linux/sunxi/base-files/etc/board.d/01_leds new file mode 100755 index 000000000..32fa00f8a --- /dev/null +++ b/target/linux/sunxi/base-files/etc/board.d/01_leds @@ -0,0 +1,19 @@ +#!/bin/sh + +. /lib/functions/uci-defaults.sh + +board=$(board_name) +boardname="${board##*,}" + +board_config_update + +case $board in +friendlyarm,nanopi-r1) + ucidef_set_led_netdev "wan" "WAN" "nanopi:green:wan" "eth0" + ucidef_set_led_netdev "lan" "LAN" "nanopi:green:lan" "eth1" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/sunxi/base-files/etc/board.d/02_network b/target/linux/sunxi/base-files/etc/board.d/02_network index 5cf000ccc..08d31caad 100755 --- a/target/linux/sunxi/base-files/etc/board.d/02_network +++ b/target/linux/sunxi/base-files/etc/board.d/02_network @@ -8,6 +8,9 @@ board_config_update case $(board_name) in +friendlyarm,nanopi-r1) + ucidef_set_interfaces_lan_wan "eth1" "eth0" + ;; lamobo,lamobo-r1) ucidef_add_switch "switch0" \ "4:lan:1" "0:lan:2" "1:lan:3" "2:lan:4" "3:wan" "8@eth0" diff --git a/target/linux/sunxi/config-5.4 b/target/linux/sunxi/config-5.4 index 1e54e980a..3061bddfc 100644 --- a/target/linux/sunxi/config-5.4 +++ b/target/linux/sunxi/config-5.4 @@ -487,6 +487,8 @@ CONFIG_SND_COMPRESS_OFFLOAD=y CONFIG_SND_JACK=y CONFIG_SND_JACK_INPUT_DEV=y CONFIG_SND_PCM=y +CONFIG_SND_SIMPLE_CARD=y +CONFIG_SND_SIMPLE_CARD_UTILS=y CONFIG_SND_SOC=y CONFIG_SND_SOC_I2C_AND_SPI=y # CONFIG_SND_SUN4I_I2S is not set diff --git a/target/linux/sunxi/image/cortexa7.mk b/target/linux/sunxi/image/cortexa7.mk index 083010ad8..a87817037 100644 --- a/target/linux/sunxi/image/cortexa7.mk +++ b/target/linux/sunxi/image/cortexa7.mk @@ -47,6 +47,24 @@ define Device/friendlyarm_nanopi-neo-air endef TARGET_DEVICES += friendlyarm_nanopi-neo-air +define Device/friendlyarm_nanopi-r1 + DEVICE_VENDOR := FriendlyARM + DEVICE_MODEL := NanoPi R1 + DEVICE_PACKAGES := kmod-rtc-sunxi kmod-usb-net-rtl8152 \ + kmod-brcmfmac kmod-leds-gpio kmod-ledtrig-heartbeat wpad-basic-wolfssl \ + brcmfmac-firmware-43430-sdio + SOC := sun8i-h3 +endef +TARGET_DEVICES += friendlyarm_nanopi-r1 + +define Device/friendlyarm_zeropi + DEVICE_VENDOR := FriendlyARM + DEVICE_MODEL := ZeroPi + DEVICE_PACKAGES := kmod-rtc-sunxi + SOC := sun8i-h3 +endef +TARGET_DEVICES += friendlyarm_zeropi + define Device/lamobo_lamobo-r1 DEVICE_VENDOR := Lamobo DEVICE_MODEL := Lamobo R1 @@ -63,13 +81,15 @@ define Device/lemaker_bananapi endef TARGET_DEVICES += lemaker_bananapi -define Device/lemaker_bananapi-m2-ultra - DEVICE_VENDOR := LeMaker +define Device/sinovoip_bananapi-m2-ultra + DEVICE_VENDOR := Sinovoip DEVICE_MODEL := Banana Pi M2 Ultra - DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-ata-sunxi + DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-ata-sunxi kmod-brcmfmac \ + brcmfmac-firmware-43430a0-sdio wpad-basic-wolfssl + SUPPORTED_DEVICES:=lemaker,bananapi-m2-ultra SOC := sun8i-r40 endef -TARGET_DEVICES += lemaker_bananapi-m2-ultra +TARGET_DEVICES += sinovoip_bananapi-m2-ultra define Device/lemaker_bananapro DEVICE_VENDOR := LeMaker diff --git a/target/linux/sunxi/modules.mk b/target/linux/sunxi/modules.mk index b8ea7d5cb..6d2de9865 100644 --- a/target/linux/sunxi/modules.mk +++ b/target/linux/sunxi/modules.mk @@ -68,7 +68,6 @@ endef $(eval $(call KernelPackage,sun4i-emac)) - define KernelPackage/sound-soc-sunxi TITLE:=AllWinner built-in SoC sound support KCONFIG:=CONFIG_SND_SUN4I_CODEC @@ -83,3 +82,18 @@ define KernelPackage/sound-soc-sunxi/description endef $(eval $(call KernelPackage,sound-soc-sunxi)) + +define KernelPackage/sound-soc-sunxi-spdif + TITLE:=Allwinner A10 SPDIF Support + KCONFIG:=CONFIG_SND_SUN4I_SPDIF + FILES:=$(LINUX_DIR)/sound/soc/sunxi/sun4i-spdif.ko + AUTOLOAD:=$(call AutoLoad,65,sun4i-spdif) + DEPENDS:=@TARGET_sunxi +kmod-sound-soc-spdif + $(call AddDepends/sound) +endef + +define KernelPackage/sound-soc-sunxi-spdif/description + Kernel support for Allwinner A10 SPDIF Support +endef + +$(eval $(call KernelPackage,sound-soc-sunxi-spdif)) diff --git a/target/linux/sunxi/patches-5.4/062-add-sun8i-h3-zeropi-support.patch b/target/linux/sunxi/patches-5.4/062-add-sun8i-h3-zeropi-support.patch new file mode 100644 index 000000000..dc69f70bb --- /dev/null +++ b/target/linux/sunxi/patches-5.4/062-add-sun8i-h3-zeropi-support.patch @@ -0,0 +1,79 @@ +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -1118,6 +1118,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ + sun8i-h3-orangepi-plus2e.dtb \ + sun8i-h3-orangepi-zero-plus2.dtb \ + sun8i-h3-rervision-dvk.dtb \ ++ sun8i-h3-zeropi.dtb \ + sun8i-r16-bananapi-m2m.dtb \ + sun8i-r16-nintendo-nes-classic.dtb \ + sun8i-r16-nintendo-super-nes-classic.dtb \ +--- /dev/null ++++ b/arch/arm/boot/dts/sun8i-h3-zeropi.dts +@@ -0,0 +1,66 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++ ++#include "sun8i-h3-nanopi.dtsi" ++ ++/ { ++ model = "FriendlyElec ZeroPi"; ++ compatible = "friendlyarm,zeropi", "allwinner,sun8i-h3"; ++ ++ aliases { ++ ethernet0 = &emac; ++ }; ++ ++ reg_gmac_3v3: gmac-3v3 { ++ compatible = "regulator-fixed"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&gmac_power_pin_nanopi>; ++ regulator-name = "gmac-3v3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ startup-delay-us = <100000>; ++ enable-active-high; ++ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; ++ }; ++}; ++ ++&ehci0 { ++ status = "okay"; ++}; ++ ++&ohci0 { ++ status = "okay"; ++}; ++ ++&pio { ++ gmac_power_pin_nanopi: gmac_power_pin@0 { ++ pins = "PD6"; ++ function = "gpio_out"; ++ }; ++}; ++ ++&external_mdio { ++ ext_rgmii_phy: ethernet-phy@1 { ++ compatible = "ethernet-phy-ieee802.3-c22"; ++ reg = <7>; ++ }; ++}; ++ ++&emac { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&emac_rgmii_pins>; ++ phy-supply = <®_gmac_3v3>; ++ phy-handle = <&ext_rgmii_phy>; ++ phy-mode = "rgmii"; ++ ++ allwinner,leds-active-low; ++ status = "okay"; ++}; ++ ++&usb_otg { ++ status = "okay"; ++ dr_mode = "peripheral"; ++}; ++ ++&usbphy { ++ usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ ++}; diff --git a/target/linux/sunxi/patches-5.4/100-sunxi-h3-add-support-for-nanopi-r1.patch b/target/linux/sunxi/patches-5.4/100-sunxi-h3-add-support-for-nanopi-r1.patch new file mode 100644 index 000000000..834ea153c --- /dev/null +++ b/target/linux/sunxi/patches-5.4/100-sunxi-h3-add-support-for-nanopi-r1.patch @@ -0,0 +1,186 @@ +From 5aee0b1272cd5b42933ef629d66b677669e2e8d2 Mon Sep 17 00:00:00 2001 +From: Jayantajit Gogoi +Date: Mon, 12 Oct 2020 05:24:51 +0000 +Subject: [PATCH] sunxi: add support for friendlyarm nanopi r1 + +Signed-off-by: Jayantajit Gogoi +--- + .../devicetree/bindings/arm/sunxi.yaml | 5 + + arch/arm/boot/dts/Makefile | 1 + + arch/arm/boot/dts/sun8i-h3-nanopi-r1.dts | 146 ++++++++++++++++++ + 3 files changed, 152 insertions(+) + create mode 100644 arch/arm/boot/dts/sun8i-h3-nanopi-r1.dts + +--- a/Documentation/devicetree/bindings/arm/sunxi.yaml ++++ b/Documentation/devicetree/bindings/arm/sunxi.yaml +@@ -241,6 +241,11 @@ properties: + - const: friendlyarm,nanopi-neo-plus2 + - const: allwinner,sun50i-h5 + ++ - description: FriendlyARM NanoPi R1 ++ items: ++ - const: friendlyarm,nanopi-r1 ++ - const: allwinner,sun8i-h3 ++ + - description: Gemei G9 Tablet + items: + - const: gemei,g9 +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -1109,6 +1109,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ + sun8i-h3-nanopi-m1-plus.dtb \ + sun8i-h3-nanopi-neo.dtb \ + sun8i-h3-nanopi-neo-air.dtb \ ++ sun8i-h3-nanopi-r1.dtb \ + sun8i-h3-orangepi-2.dtb \ + sun8i-h3-orangepi-lite.dtb \ + sun8i-h3-orangepi-one.dtb \ +--- /dev/null ++++ b/arch/arm/boot/dts/sun8i-h3-nanopi-r1.dts +@@ -0,0 +1,146 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright (C) 2019 Igor Pecovnik ++ * Copyright (C) 2020 Jayantajit Gogoi ++ */ ++ ++/* NanoPi R1 is based on the NanoPi-H3 design from FriendlyARM */ ++#include "sun8i-h3-nanopi.dtsi" ++ ++/ { ++ model = "FriendlyARM NanoPi R1"; ++ compatible = "friendlyarm,nanopi-r1", "allwinner,sun8i-h3"; ++ ++ reg_gmac_3v3: gmac-3v3 { ++ compatible = "regulator-fixed"; ++ regulator-name = "gmac-3v3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ startup-delay-us = <100000>; ++ enable-active-high; ++ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ vdd_cpux: gpio-regulator { ++ compatible = "regulator-gpio"; ++ pinctrl-names = "default"; ++ regulator-name = "vdd-cpux"; ++ regulator-type = "voltage"; ++ regulator-boot-on; ++ regulator-always-on; ++ regulator-min-microvolt = <1100000>; ++ regulator-max-microvolt = <1300000>; ++ regulator-ramp-delay = <50>; ++ gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; ++ gpios-states = <0x1>; ++ states = <1100000 0x0 ++ 1300000 0x1>; ++ }; ++ ++ wifi_pwrseq: wifi_pwrseq { ++ compatible = "mmc-pwrseq-simple"; ++ pinctrl-names = "default"; ++ reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; ++ }; ++ ++ leds { ++ /delete-node/ pwr; ++ status { ++ label = "nanopi:red:status"; ++ gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "heartbeat"; ++ }; ++ ++ wan { ++ label = "nanopi:green:wan"; ++ gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ lan { ++ label = "nanopi:green:lan"; ++ gpios = <&pio 0 9 GPIO_ACTIVE_HIGH>; ++ }; ++ }; ++ ++ r_gpio_keys { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&sw_r_npi>; ++ ++ /delete-node/ k1; ++ reset { ++ label = "reset"; ++ linux,code = ; ++ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&cpu0 { ++ cpu-supply = <&vdd_cpux>; ++}; ++ ++&ehci1 { ++ status = "okay"; ++}; ++ ++&ehci2 { ++ status = "okay"; ++}; ++ ++&emac { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&emac_rgmii_pins>; ++ phy-supply = <®_gmac_3v3>; ++ phy-handle = <&ext_rgmii_phy>; ++ phy-mode = "rgmii"; ++ status = "okay"; ++}; ++ ++&external_mdio { ++ ext_rgmii_phy: ethernet-phy@1 { ++ compatible = "ethernet-phy-ieee802.3-c22"; ++ reg = <7>; ++ }; ++}; ++ ++&mmc1 { ++ vmmc-supply = <®_vcc3v3>; ++ vqmmc-supply = <®_vcc3v3>; ++ mmc-pwrseq = <&wifi_pwrseq>; ++ bus-width = <4>; ++ non-removable; ++ status = "okay"; ++ ++ sdio_wifi: sdio_wifi@1 { ++ reg = <1>; ++ compatible = "brcm,bcm4329-fmac"; ++ interrupt-parent = <&pio>; ++ interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; ++ interrupt-names = "host-wake"; ++ }; ++}; ++ ++&mmc2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc2_8bit_pins>; ++ vmmc-supply = <®_vcc3v3>; ++ vqmmc-supply = <®_vcc3v3>; ++ bus-width = <8>; ++ non-removable; ++ status = "okay"; ++}; ++ ++&ohci1 { ++ status = "okay"; ++}; ++ ++&ohci2 { ++ status = "okay"; ++}; ++ ++&r_pio { ++ sw_r_npi: key_pins { ++ pins = "PL3"; ++ function = "gpio_in"; ++ }; ++};