From c8f2abfa619f6069dccc5b4f4bd9b76961abd761 Mon Sep 17 00:00:00 2001 From: chewitt Date: Sat, 19 Sep 2020 15:05:01 +0000 Subject: [PATCH] linux: bump Amlogic to Linux 5.11.y kernel --- packages/linux/package.mk | 6 + projects/Amlogic/linux/linux.aarch64.conf | 963 +++++++++++------- ...-HACK-set-meson-gx-cma-pool-to-768MB.patch | 8 +- ...-HACK-set-meson-gx-cma-pool-to-896MB.patch | 25 + ...ACK-set-meson-g12-cma-pool-to-768MB.patch} | 8 +- ...HACK-set-meson-g12-cma-pool-to-896MB.patch | 25 + ...64-fix-Kodi-sysinfo-CPU-information.patch} | 8 +- ...edia-cec-silence-CEC-timeout-message.patch | 40 - ...son-gx-add-ATF-BL32-reserved-memory.patch} | 8 +- ...-mm-emit-tracepoint-when-RSS-changes.patch | 112 -- ...-drm-meson-add-YUV422-output-support.patch | 49 + ...ways-re-init-sdcards-to-set-default-.patch | 58 -- ...ngs-net-bluetooth-Add-device-tree-bi.patch | 39 - ...nfrost-force-governor-to-performance.patch | 29 + ...meson-axg-tdm-interface-fix-loopback.patch | 59 ++ ...h-hci_qca-add-compatible-for-QCA9377.patch | 28 - ...-meson-axg-tdmin-fix-axg-skew-offset.patch | 53 + ...h-hci_qca-allow-max-speed-to-be-set-.patch | 61 -- ...s-amlogic-meson-g12-Set-FL-adj-prope.patch | 37 + ...ts-meson-S922X-extend-cpu-opp-points.patch | 57 -- ...s-meson-Fix-schema-warnings-for-pwm-.patch | 85 ++ ...4-dts-meson-kvim3-move-hdmi-to-tdm-a.patch | 76 -- ...m64-dts-meson-vim3-whitespace-fixups.patch | 60 ++ ...ngs-sram-Add-Amlogic-SCP-SRAM-compat.patch | 29 - ...fconfig-enable-meson-gx-audio-as-mod.patch | 44 - ...n-clk-pll-fix-initializing-the-old-r.patch | 32 + ...T-arm64-dts-meson-gx-add-aiu-support.patch | 121 --- ...on-clk-pll-make-ret-a-signed-integer.patch | 35 + ...s-meson-p230-q200-add-initial-audio-.patch | 107 -- ...n-clk-pll-propagate-the-error-from-m.patch | 41 + ...s-meson-libretech-cc-add-initial-aud.patch | 77 -- ...ngs-net-dwmac-meson-use-picoseconds-.patch | 97 ++ ...s-meson-libretech-ac-add-initial-aud.patch | 77 -- ...ac-dwmac-meson8b-fix-enabling-the-ti.patch | 39 + ...s-meson-libretech-pc-add-initial-aud.patch | 77 -- ...ac-dwmac-meson8b-use-picoseconds-for.patch | 74 ++ ...ge-dw-hdmi-Add-support-for-RGB-limit.patch | 134 --- ...ac-dwmac-meson8b-move-RGMII-delays-i.patch | 60 ++ ...ge-dw-hdmi-rework-csc-related-functi.patch | 89 -- ...ac-dwmac-meson8b-add-support-for-the.patch | 156 +++ ...4-dts-meson-vim3-enable-hdmi-audio-l.patch | 103 ++ ...s-meson-sm1-add-support-for-Hardkern.patch | 440 -------- ...4-dts-meson-switch-TFLASH_VDD_EN-pin.patch | 37 + ...s-meson-g12b-move-G12B-thermal-nodes.patch | 82 -- ...-dts-meson-add-initial-Beelink-GS-K.patch} | 101 +- ...-dts-meson-sm1-add-cpu-thermal-nodes.patch | 79 -- ...4-dts-meson-add-i2c3-rtc-nodes-and-r.patch | 49 + ...m64-dts-meson-gxl-add-acodec-support.patch | 37 - ...ndings-arm-amlogic-add-support-for-.patch} | 10 +- ...s-meson-p230-q200-add-internal-DAC-s.patch | 85 -- ...panfrost-fix-reference-leak-in-panfr.patch | 39 + ...s-meson-libretech-cc-add-internal-DA.patch | 82 -- ...panfrost-Use-delayed-timer-as-defaul.patch | 30 + ...s-meson-libretech-ac-add-internal-DA.patch | 82 -- ...lima-fix-reference-leak-in-lima_pm_b.patch | 39 + ...s-meson-libretech-pc-add-internal-DA.patch | 83 -- ...meson-gx-check-for-scatterlist-size-.patch | 86 ++ ...arm64-dts-meson-g12-add-internal-DAC.patch | 37 - ...amlogic-phy-meson-gxl-usb2-fix-share.patch | 48 + ...-dts-meson-g12-add-internal-DAC-glue.patch | 38 - ...dwc3-meson-g12a-fix-shared-reset-con.patch | 105 ++ ...ngs-reset-meson-add-gxl-internal-dac.patch | 29 - ...-meson-Use-managed-DMA-buffer-alloca.patch | 97 ++ ...ngs-add-vendor-prefix-for-Smartlabs-.patch | 32 - ...-Make-sure-MMU-context-lifetime-is-n.patch | 459 +++++++++ ...ngs-arm-amlogic-add-support-for-the-.patch | 43 - ...eson-add-Amlogic-Meson-GX-PM-Suspend.patch | 135 +++ ...s-meson-add-support-for-the-Smartlab.patch | 122 --- ...son-add-support-for-GX-PM-and-Virtua.patch | 41 + ...s-meson-add-ethernet-interrupt-to-we.patch | 32 - ...son-add-audio-playback-to-nexbox-a1.patch} | 7 +- ...s-meson-convert-ugoos-am6-to-common-.patch | 915 ----------------- ...ts-meson-add-audio-playback-to-p201.patch} | 4 +- ...ngs-arm-amlogic-add-support-for-the-.patch | 30 - ...ts-meson-add-audio-playback-to-p200.patch} | 4 +- ...s-meson-g12b-gtking-add-initial-devi.patch | 194 ---- ...on-add-audio-playback-to-p212-s905x.patch} | 6 +- ...ngs-arm-amlogic-add-support-for-the-.patch | 30 - ...eson-add-audio-playback-to-rbox-pro.patch} | 7 +- ...ts-meson-add-audio-playback-to-u200.patch} | 4 +- ...ERS-update-the-Amlogic-VDEC-driver-m.patch | 34 - ...on-add-audio-playback-to-vega-s95-d.patch} | 9 +- ...edia-meson-vdec-enable-mcrcc-for-VP9.patch | 67 -- ...-meson-g12a-fix-gp0-and-hifi-ranges.patch} | 8 +- ...ngs-net-meson-dwmac-Add-the-amlogic-.patch | 43 - ...IP-clk-meson-g12a-fix-hifi-pll-lock.patch} | 10 +- ...ngs-net-dwmac-meson-Document-the-tim.patch | 58 -- ...ge-dw-hdmi-i2s-HBR-audio-experiments.patch | 197 ++++ ...ac-dwmac-meson8b-use-FIELD_PREP-inst.patch | 49 - ...odec-reorder-channel-allocation-list.patch | 202 ++++ ...ac-dwmac-meson8b-Move-the-documentat.patch | 46 - ...iu-encoder-spdif-implement-the-.mute.patch | 60 ++ ...ac-dwmac-meson8b-Add-the-PRG_ETH0_AD.patch | 54 - ...iu-encoder-i2s-implement-the-.mute_s.patch | 69 ++ ...ac-dwmac-meson8b-Fetch-the-timing-ad.patch | 47 - ...dts-meson-add-common-SM1-ac2xx-dtsi.patch} | 103 +- ...ac-dwmac-meson8b-Make-the-clock-enab.patch | 66 -- ...gs-arm-amlogic-add-X96-AIR-bindings.patch} | 8 +- ...ac-dwmac-meson8b-add-support-for-the.patch | 172 ---- ...dd-initial-device-trees-for-X96-AIR.patch} | 124 ++- ...ngs-phy-meson8b-usb2-Convert-to-json.patch | 129 --- ...arm-amlogic-add-A95XF3-AIR-bindings.patch} | 16 +- ...ngs-phy-meson8b-usb2-Add-compatible-.patch | 34 - ...sm1-add-initial-device-trees-for-A95.patch | 314 ++++++ ...logic-meson8b-usb2-Use-a-MMIO-regmap.patch | 166 --- ...mlogic-add-support-for-the-Tanix-TX.patch} | 10 +- ...gic-meson8b-usb2-Don-t-set-REG_ADP_B.patch | 112 -- ...n-add-support-for-the-Tanix-TX5-Max.patch} | 13 +- ...gic-meson8b-usb2-unset-the-IDDQ-bit-.patch | 92 -- ...on-add-multiple-MeCool-device-trees.patch} | 70 +- ...gic-meson8b-usb2-Add-a-compatible-st.patch | 56 - ...-convert-meson-sm1-odroid-c4-to-dtsi.patch | 952 +++++++++++++++++ ...meson-Add-the-Ethernet-timing-adjust.patch | 51 - ...-arm-amlogic-add-ODROID-HC4-bindings.patch | 27 + ...meson-Switch-existing-boards-with-RG.patch | 66 -- ...add-initial-device-tree-for-ODROID-H.patch | 123 +++ ...n-gx-limit-segments-to-1-when-dram-a.patch | 46 - ...mlogic-add-Bananapi-BPI-M5-bindings.patch} | 23 +- ...a-meson-vdec-fix-another-case-of-VP9.patch | 133 --- ...add-initial-device-tree-for-Bananapi.patch | 108 ++ ...bridge-dw-hdmi-do-not-force-none-sca.patch | 38 - ...ndor-prefixes-add-haochuangyi-prefix.patch | 29 + ...meson-add-mode-selection-limits-agai.patch | 182 ---- ...ngs-arm-amlogic-add-H96-Max-bindings.patch | 27 + ...fourcc-Add-modifier-definitions-for-.patch | 129 --- ...add-initial-device-tree-for-H96-Max.patch} | 100 +- ...meson-add-Amlogic-Video-FBC-register.patch | 62 -- ...ts-meson-fixes-for-WeTek-common-dtsi.patch | 36 + ...meson-overlay-setup-overlay-for-Amlo.patch | 418 -------- ...shorten-audio-card-names-upstream-ca.patch | 316 ++++++ ...meson-overlay-setup-overlay-for-Amlo.patch | 86 -- ...shorten-audio-card-name-for-sm1-odro.patch | 26 + ...meson-overlay-setup-overlay-for-Amlo.patch | 105 -- ...n-shorten-audio-card-name-for-a95xf3.patch | 39 + ...meson-crtc-handle-commit-of-Amlogic-.patch | 161 --- ...shorten-audio-card-name-for-gs-king-.patch | 26 + ...mal-devfreq_cooling-Use-PM-QoS-to-se.patch | 165 --- ...shorten-audio-card-name-for-nexbox-a.patch | 26 + ...-drm-meson-Remove-unneeded-semicolon.patch | 31 - ...son-shorten-audio-card-name-for-p200.patch | 25 + ...meson-viu-fix-setting-the-OSD-burst-.patch | 81 -- ...son-shorten-audio-card-name-for-p201.patch | 25 + ...indings-mfd-add-Khadas-Microcontroll.patch | 72 -- ...son-shorten-audio-card-name-for-p212.patch | 25 + ...add-support-for-the-Khadas-System-co.patch | 310 ------ ...shorten-audio-card-name-for-rbox-pro.patch | 25 + ...mal-add-support-for-the-MCU-controll.patch | 231 ----- ...shorten-audio-card-name-for-tanix-tx.patch | 26 + ...m-add-support-for-the-Khadas-MCU-Pro.patch | 193 ---- ...son-shorten-audio-card-name-for-u200.patch | 25 + ...TAINERS-add-myself-as-maintainer-for.patch | 38 - ...shorten-audio-card-name-for-vega-s95.patch | 25 + ...4-dts-meson-khadas-vim3-add-Khadas-M.patch | 58 -- ...-shorten-audio-card-name-for-x96-air.patch | 39 + ...-meson-gx-card-fix-sound-dai-dt-sche.patch | 48 - ...-meson-convert-axg-tdm-interface-to-.patch | 111 -- ...-meson-convert-axg-tdm-formatters-to.patch | 160 --- ...ASoC-meson-convert-axg-pdm-to-schema.patch | 139 --- ...SoC-meson-convert-axg-fifo-to-schema.patch | 176 ---- ...-meson-convert-axg-spdif-input-to-sc.patch | 143 --- ...-meson-convert-axg-spdif-output-to-s.patch | 134 --- ...-meson-convert-g12a-tohdmitx-control.patch | 143 --- ...-meson-convert-axg-sound-card-contro.patch | 337 ------ ...a-videodev2-add-Compressed-Framebuff.patch | 60 -- ...a-meson-vdec-handle-bitdepth-on-sour.patch | 117 --- ...a-meson-vdec-update-compressed-buffe.patch | 190 ---- ...a-meson-vdec-add-support-for-compres.patch | 322 ------ ...a-meson-vdec-handle-compressed-outpu.patch | 213 ---- ...amlogic-meson-gx-socinfo-Fix-S905X3-.patch | 45 - ...dt-bindings-amlogic-meson-gx-spicc-F.patch | 79 -- ...trl-meson-fix-drive-strength-registe.patch | 40 - ...indings-clk-g12a-clkc-Add-NNA-CLK-So.patch | 29 - ...meson-g12a-Add-support-for-NNA-CLK-s.patch | 192 ---- ...panfrost-Fix-inbalance-of-devfreq-re.patch | 66 -- ...panfrost-Fix-runtime-PM-imbalance-on.patch | 31 - ...panfrost-Fix-runtime-PM-imbalance-in.patch | 49 - ...panfrost-Reduce-the-amount-of-logs-o.patch | 48 - ...-panfrost-Use-kvfree-to-free-bo-sgts.patch | 46 - ...rost-Add-compatible-string-for-bifro.patch | 28 - ...rost-Make-sure-GPU-is-powered-on-whe.patch | 51 - ...4-dts-meson-add-missing-gxl-rng-cloc.patch | 34 - ...-meson-imply-acodec-glue-on-axg-soun.patch | 26 - ...indings-net-dwmac-meson-Add-a-compat.patch | 51 - ...stmmac-dwmac-meson8b-add-a-compatibl.patch | 38 - ...stmmac-dwmac-meson8b-use-clk_parent_.patch | 143 --- ...4-dts-meson-odroid-n2-enable-audio-l.patch | 124 --- ...4-dts-meson-odroid-n2-add-jack-audio.patch | 170 ---- ...serial-meson_uart-Init-port-lock-ear.patch | 39 - ...pcm-dpcm-fix-playback-capture-checks.patch | 74 -- ...-add-support-for-custom-soft-reset-o.patch | 63 -- ...arm-amlogic-add-support-for-the-WeTe.patch | 45 - ...son-add-support-for-the-WeTek-Core-2.patch | 132 --- ...son-add-initial-Beelink-GS-King-X-de.patch | 276 ----- ...dts-meson-add-audio-playback-to-a95x.patch | 73 -- ...son-add-audio-playback-to-khadas-vim.patch | 86 -- ...son-add-audio-playback-to-khadas-vim.patch | 133 --- ...eson-add-audio-playback-to-nanopi-k2.patch | 74 -- ...eson-add-audio-playback-to-odroid-c2.patch | 74 -- ...eson-add-audio-playback-to-odroid-c4.patch | 136 --- ...eson-add-audio-playback-to-wetek-hub.patch | 71 -- ...son-add-audio-playback-to-wetek-play.patch | 100 -- ...-dev_err-g-drivers-net-phy-realtek.c.patch | 44 - ...int-PRG_ETH0-PRG_ETH1-values-at-init.patch | 26 - ...-dts-meson-misc-fixups-for-w400-dtsi.patch | 70 -- ...son-add-i2c3-rtc-nodes-and-vrtc-alia.patch | 50 - ...son-add-i2c3-rtc-nodes-and-vrtc-alia.patch | 49 - ...son-add-i2c3-rtc-nodes-and-vrtc-alia.patch | 44 - ...son-enable-rtc-node-on-Khadas-VIM1-V.patch | 48 - ...son-fix-spifc-node-on-Khadas-VIM3-VI.patch | 31 - ...son-fix-mmc0-tuning-error-on-Khadas-.patch | 54 - ...-meson-switch-VIM3-VIM3L-to-rgmii-id.patch | 28 - ...s-meson-switch-ODROID-N2-to-rgmii-id.patch | 27 - ...s-meson-switch-ODROID-C4-to-rgmii-id.patch | 27 - ...-definition-of-traceid_list-global-v.patch | 66 -- 214 files changed, 5985 insertions(+), 13771 deletions(-) create mode 100644 projects/Amlogic/patches/linux/amlogic-0002-HACK-set-meson-gx-cma-pool-to-896MB.patch rename projects/Amlogic/patches/linux/{amlogic-0002-HACK-set-meson-g12-cma-pool-to-768MB.patch => amlogic-0003-HACK-set-meson-g12-cma-pool-to-768MB.patch} (80%) create mode 100644 projects/Amlogic/patches/linux/amlogic-0004-HACK-set-meson-g12-cma-pool-to-896MB.patch rename projects/Amlogic/patches/linux/{amlogic-0003-HACK-arm64-fix-Kodi-sysinfo-CPU-information.patch => amlogic-0005-HACK-arm64-fix-Kodi-sysinfo-CPU-information.patch} (78%) delete mode 100644 projects/Amlogic/patches/linux/amlogic-0005-HACK-media-cec-silence-CEC-timeout-message.patch rename projects/Amlogic/patches/linux/{amlogic-0004-HACK-arm64-dts-meson-gx-add-ATF-BL32-reserved-memory.patch => amlogic-0006-HACK-arm64-dts-meson-gx-add-ATF-BL32-reserved-memory.patch} (83%) delete mode 100644 projects/Amlogic/patches/linux/amlogic-0006-HACK-revert-mm-emit-tracepoint-when-RSS-changes.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0007-HACK-drm-meson-add-YUV422-output-support.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0007-HACK-mmc-core-always-re-init-sdcards-to-set-default-.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0008-FROMGIT-dt-bindings-net-bluetooth-Add-device-tree-bi.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0008-HACK-drm-panfrost-force-governor-to-performance.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0009-FROMGIT-ASoC-meson-axg-tdm-interface-fix-loopback.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0009-FROMGIT-Bluetooth-hci_qca-add-compatible-for-QCA9377.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0010-FROMGIT-ASoC-meson-axg-tdmin-fix-axg-skew-offset.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0010-FROMGIT-Bluetooth-hci_qca-allow-max-speed-to-be-set-.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0011-FROMGIT-arm64-dts-amlogic-meson-g12-Set-FL-adj-prope.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0011-FROMGIT-arm64-dts-meson-S922X-extend-cpu-opp-points.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0012-FROMGIT-arm64-dts-meson-Fix-schema-warnings-for-pwm-.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0012-FROMGIT-arm64-dts-meson-kvim3-move-hdmi-to-tdm-a.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0013-FROMGIT-arm64-dts-meson-vim3-whitespace-fixups.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0013-FROMGIT-dt-bindings-sram-Add-Amlogic-SCP-SRAM-compat.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0014-FROMGIT-arm64-defconfig-enable-meson-gx-audio-as-mod.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0014-FROMGIT-clk-meson-clk-pll-fix-initializing-the-old-r.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0015-FROMGIT-arm64-dts-meson-gx-add-aiu-support.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0015-FROMGIT-clk-meson-clk-pll-make-ret-a-signed-integer.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0016-FROMGIT-arm64-dts-meson-p230-q200-add-initial-audio-.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0016-FROMGIT-clk-meson-clk-pll-propagate-the-error-from-m.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0017-FROMGIT-arm64-dts-meson-libretech-cc-add-initial-aud.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0017-FROMGIT-dt-bindings-net-dwmac-meson-use-picoseconds-.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0018-FROMGIT-arm64-dts-meson-libretech-ac-add-initial-aud.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0018-FROMGIT-net-stmmac-dwmac-meson8b-fix-enabling-the-ti.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0019-FROMGIT-arm64-dts-meson-libretech-pc-add-initial-aud.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0019-FROMGIT-net-stmmac-dwmac-meson8b-use-picoseconds-for.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0020-FROMGIT-drm-bridge-dw-hdmi-Add-support-for-RGB-limit.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0020-FROMGIT-net-stmmac-dwmac-meson8b-move-RGMII-delays-i.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0021-FROMGIT-drm-bridge-dw-hdmi-rework-csc-related-functi.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0021-FROMGIT-net-stmmac-dwmac-meson8b-add-support-for-the.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0022-FROMLIST-v1-arm64-dts-meson-vim3-enable-hdmi-audio-l.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0023-FROMGIT-arm64-dts-meson-sm1-add-support-for-Hardkern.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0023-FROMLIST-v1-arm64-dts-meson-switch-TFLASH_VDD_EN-pin.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0024-FROMGIT-arm64-dts-meson-g12b-move-G12B-thermal-nodes.patch rename projects/Amlogic/patches/linux/{amlogic-0042-FROMGIT-arm64-dts-meson-g12b-gtking-pro-add-initial-.patch => amlogic-0024-FROMLIST-v2-arm64-dts-meson-add-initial-Beelink-GS-K.patch} (57%) delete mode 100644 projects/Amlogic/patches/linux/amlogic-0025-FROMGIT-arm64-dts-meson-sm1-add-cpu-thermal-nodes.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0025-FROMLIST-v1-arm64-dts-meson-add-i2c3-rtc-nodes-and-r.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0026-FROMGIT-arm64-dts-meson-gxl-add-acodec-support.patch rename projects/Amlogic/patches/linux/{amlogic-0127-WIP-dt-bindings-arm-amlogic-add-support-for-the-Beel.patch => amlogic-0026-FROMLIST-v2-dt-bindings-arm-amlogic-add-support-for-.patch} (77%) delete mode 100644 projects/Amlogic/patches/linux/amlogic-0027-FROMGIT-arm64-dts-meson-p230-q200-add-internal-DAC-s.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0027-FROMLIST-v1-drm-panfrost-fix-reference-leak-in-panfr.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0028-FROMGIT-arm64-dts-meson-libretech-cc-add-internal-DA.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0028-FROMLIST-v1-drm-panfrost-Use-delayed-timer-as-defaul.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0029-FROMGIT-arm64-dts-meson-libretech-ac-add-internal-DA.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0029-FROMLIST-v1-drm-lima-fix-reference-leak-in-lima_pm_b.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0030-FROMGIT-arm64-dts-meson-libretech-pc-add-internal-DA.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0030-FROMLIST-v1-mmc-meson-gx-check-for-scatterlist-size-.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0031-FROMGIT-arm64-dts-meson-g12-add-internal-DAC.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0031-FROMLIST-v1-phy-amlogic-phy-meson-gxl-usb2-fix-share.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0032-FROMGIT-arm64-dts-meson-g12-add-internal-DAC-glue.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0032-FROMLIST-v1-usb-dwc3-meson-g12a-fix-shared-reset-con.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0033-FROMGIT-dt-bindings-reset-meson-add-gxl-internal-dac.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0033-FROMLIST-v1-ASoC-meson-Use-managed-DMA-buffer-alloca.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0034-FROMGIT-dt-bindings-add-vendor-prefix-for-Smartlabs-.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0034-WIP-drm-panfrost-Make-sure-MMU-context-lifetime-is-n.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0035-FROMGIT-dt-bindings-arm-amlogic-add-support-for-the-.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0035-WIP-arm64-meson-add-Amlogic-Meson-GX-PM-Suspend.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0036-FROMGIT-arm64-dts-meson-add-support-for-the-Smartlab.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0036-WIP-arm64-dts-meson-add-support-for-GX-PM-and-Virtua.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0037-FROMGIT-arm64-dts-meson-add-ethernet-interrupt-to-we.patch rename projects/Amlogic/patches/linux/{amlogic-0134-WIP-arm64-dts-meson-add-audio-playback-to-nexbox-a1.patch => amlogic-0037-WIP-arm64-dts-meson-add-audio-playback-to-nexbox-a1.patch} (93%) delete mode 100644 projects/Amlogic/patches/linux/amlogic-0038-FROMGIT-arm64-dts-meson-convert-ugoos-am6-to-common-.patch rename projects/Amlogic/patches/linux/{amlogic-0137-WIP-arm64-dts-meson-add-audio-playback-to-p201.patch => amlogic-0038-WIP-arm64-dts-meson-add-audio-playback-to-p201.patch} (91%) delete mode 100644 projects/Amlogic/patches/linux/amlogic-0039-FROMGIT-dt-bindings-arm-amlogic-add-support-for-the-.patch rename projects/Amlogic/patches/linux/{amlogic-0138-WIP-arm64-dts-meson-add-audio-playback-to-p200.patch => amlogic-0039-WIP-arm64-dts-meson-add-audio-playback-to-p200.patch} (94%) delete mode 100644 projects/Amlogic/patches/linux/amlogic-0040-FROMGIT-arm64-dts-meson-g12b-gtking-add-initial-devi.patch rename projects/Amlogic/patches/linux/{amlogic-0139-WIP-arm64-dts-meson-add-audio-playback-to-p212-s905x.patch => amlogic-0040-WIP-arm64-dts-meson-add-audio-playback-to-p212-s905x.patch} (90%) delete mode 100644 projects/Amlogic/patches/linux/amlogic-0041-FROMGIT-dt-bindings-arm-amlogic-add-support-for-the-.patch rename projects/Amlogic/patches/linux/{amlogic-0140-WIP-arm64-dts-meson-add-audio-playback-to-rbox-pro.patch => amlogic-0041-WIP-arm64-dts-meson-add-audio-playback-to-rbox-pro.patch} (93%) rename projects/Amlogic/patches/linux/{amlogic-0141-WIP-arm64-dts-meson-add-audio-playback-to-u200.patch => amlogic-0042-WIP-arm64-dts-meson-add-audio-playback-to-u200.patch} (96%) delete mode 100644 projects/Amlogic/patches/linux/amlogic-0043-FROMGIT-MAINTAINERS-update-the-Amlogic-VDEC-driver-m.patch rename projects/Amlogic/patches/linux/{amlogic-0142-WIP-arm64-dts-meson-add-audio-playback-to-vega-s95-d.patch => amlogic-0043-WIP-arm64-dts-meson-add-audio-playback-to-vega-s95-d.patch} (89%) delete mode 100644 projects/Amlogic/patches/linux/amlogic-0044-FROMGIT-media-meson-vdec-enable-mcrcc-for-VP9.patch rename projects/Amlogic/patches/linux/{amlogic-0116-WIP-clk-meson-g12a-fix-gp0-and-hifi-ranges.patch => amlogic-0044-WIP-clk-meson-g12a-fix-gp0-and-hifi-ranges.patch} (81%) delete mode 100644 projects/Amlogic/patches/linux/amlogic-0045-FROMGIT-dt-bindings-net-meson-dwmac-Add-the-amlogic-.patch rename projects/Amlogic/patches/linux/{amlogic-0117-WIP-clk-meson-g12a-fix-hifi-pll-lock.patch => amlogic-0045-WIP-clk-meson-g12a-fix-hifi-pll-lock.patch} (74%) delete mode 100644 projects/Amlogic/patches/linux/amlogic-0046-FROMGIT-dt-bindings-net-dwmac-meson-Document-the-tim.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0046-WIP-drm-bridge-dw-hdmi-i2s-HBR-audio-experiments.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0047-FROMGIT-net-stmmac-dwmac-meson8b-use-FIELD_PREP-inst.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0047-WIP-ASoC-hdmi-codec-reorder-channel-allocation-list.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0048-FROMGIT-net-stmmac-dwmac-meson8b-Move-the-documentat.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0048-WIP-ASoC-meson-aiu-encoder-spdif-implement-the-.mute.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0049-FROMGIT-net-stmmac-dwmac-meson8b-Add-the-PRG_ETH0_AD.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0049-WIP-ASoC-meson-aiu-encoder-i2s-implement-the-.mute_s.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0050-FROMGIT-net-stmmac-dwmac-meson8b-Fetch-the-timing-ad.patch rename projects/Amlogic/patches/linux/{amlogic-0122-WIP-arm64-dts-meson-add-common-SM1-ac2xx-dtsi.patch => amlogic-0050-arm64-dts-meson-add-common-SM1-ac2xx-dtsi.patch} (78%) delete mode 100644 projects/Amlogic/patches/linux/amlogic-0051-FROMGIT-net-stmmac-dwmac-meson8b-Make-the-clock-enab.patch rename projects/Amlogic/patches/linux/{amlogic-0123-WIP-dt-bindings-arm-amlogic-add-X96-AIR-bindings.patch => amlogic-0051-dt-bindings-arm-amlogic-add-X96-AIR-bindings.patch} (84%) delete mode 100644 projects/Amlogic/patches/linux/amlogic-0052-FROMGIT-net-stmmac-dwmac-meson8b-add-support-for-the.patch rename projects/Amlogic/patches/linux/{amlogic-0124-WIP-arm64-dts-meson-add-initial-device-trees-for-X96.patch => amlogic-0052-arm64-dts-meson-add-initial-device-trees-for-X96-AIR.patch} (79%) delete mode 100644 projects/Amlogic/patches/linux/amlogic-0053-FROMGIT-dt-bindings-phy-meson8b-usb2-Convert-to-json.patch rename projects/Amlogic/patches/linux/{amlogic-0125-WIP-dt-bindings-arm-amlogic-add-A95XF3-AIR-bindings.patch => amlogic-0053-dt-bindings-arm-amlogic-add-A95XF3-AIR-bindings.patch} (65%) delete mode 100644 projects/Amlogic/patches/linux/amlogic-0054-FROMGIT-dt-bindings-phy-meson8b-usb2-Add-compatible-.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0054-arm64-dts-meson-sm1-add-initial-device-trees-for-A95.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0055-FROMGIT-phy-amlogic-meson8b-usb2-Use-a-MMIO-regmap.patch rename projects/Amlogic/patches/linux/{amlogic-0120-WIP-dt-bindings-arm-amlogic-add-support-for-the-Tani.patch => amlogic-0055-dt-bindings-arm-amlogic-add-support-for-the-Tanix-TX.patch} (78%) delete mode 100644 projects/Amlogic/patches/linux/amlogic-0056-FROMGIT-phy-amlogic-meson8b-usb2-Don-t-set-REG_ADP_B.patch rename projects/Amlogic/patches/linux/{amlogic-0121-WIP-arm64-dts-meson-add-support-for-the-Tanix-TX5-Ma.patch => amlogic-0056-arm64-dts-meson-add-support-for-the-Tanix-TX5-Max.patch} (97%) delete mode 100644 projects/Amlogic/patches/linux/amlogic-0057-FROMGIT-phy-amlogic-meson8b-usb2-unset-the-IDDQ-bit-.patch rename projects/Amlogic/patches/linux/{amlogic-0129-WIP-arm64-dts-meson-add-multiple-MeCool-device-trees.patch => amlogic-0057-arm64-dts-meson-add-multiple-MeCool-device-trees.patch} (79%) delete mode 100644 projects/Amlogic/patches/linux/amlogic-0058-FROMGIT-phy-amlogic-meson8b-usb2-Add-a-compatible-st.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0058-arm64-dts-meson-convert-meson-sm1-odroid-c4-to-dtsi.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0059-FROMGIT-ARM-dts-meson-Add-the-Ethernet-timing-adjust.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0059-dt-bindings-arm-amlogic-add-ODROID-HC4-bindings.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0060-FROMGIT-ARM-dts-meson-Switch-existing-boards-with-RG.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0060-arm64-dts-meson-add-initial-device-tree-for-ODROID-H.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0061-FROMGIT-mmc-meson-gx-limit-segments-to-1-when-dram-a.patch rename projects/Amlogic/patches/linux/{amlogic-0022-FROMGIT-dt-bindings-arm-amlogic-add-odroid-c4-bindin.patch => amlogic-0061-dt-bindings-arm-amlogic-add-Bananapi-BPI-M5-bindings.patch} (50%) delete mode 100644 projects/Amlogic/patches/linux/amlogic-0062-FROMLIST-v1-media-meson-vdec-fix-another-case-of-VP9.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0062-arm64-dts-meson-add-initial-device-tree-for-Bananapi.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0063-FROMLIST-v2-drm-bridge-dw-hdmi-do-not-force-none-sca.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0063-dt-bindings-vendor-prefixes-add-haochuangyi-prefix.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0064-FROMLIST-v2-drm-meson-add-mode-selection-limits-agai.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0064-dt-bindings-arm-amlogic-add-H96-Max-bindings.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0065-FROMLIST-v6-drm-fourcc-Add-modifier-definitions-for-.patch rename projects/Amlogic/patches/linux/{amlogic-0126-WIP-arm64-dts-meson-sm1-add-support-for-CYX-A95XF3-A.patch => amlogic-0065-arm64-dts-meson-add-initial-device-tree-for-H96-Max.patch} (52%) delete mode 100644 projects/Amlogic/patches/linux/amlogic-0066-FROMLIST-v6-drm-meson-add-Amlogic-Video-FBC-register.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0066-arm64-dts-meson-fixes-for-WeTek-common-dtsi.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0067-FROMLIST-v6-drm-meson-overlay-setup-overlay-for-Amlo.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0067-arm64-dts-meson-shorten-audio-card-names-upstream-ca.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0068-FROMLIST-v6-drm-meson-overlay-setup-overlay-for-Amlo.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0068-arm64-dts-meson-shorten-audio-card-name-for-sm1-odro.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0069-FROMLIST-v6-drm-meson-overlay-setup-overlay-for-Amlo.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0069-arm64-dts-meson-shorten-audio-card-name-for-a95xf3.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0070-FROMLIST-v6-drm-meson-crtc-handle-commit-of-Amlogic-.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0070-arm64-dts-meson-shorten-audio-card-name-for-gs-king-.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0071-FROMLIST-v1-thermal-devfreq_cooling-Use-PM-QoS-to-se.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0071-arm64-dts-meson-shorten-audio-card-name-for-nexbox-a.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0072-FROMLIST-v1-drm-meson-Remove-unneeded-semicolon.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0072-arm64-dts-meson-shorten-audio-card-name-for-p200.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0073-FROMLIST-v1-drm-meson-viu-fix-setting-the-OSD-burst-.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0073-arm64-dts-meson-shorten-audio-card-name-for-p201.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0074-FROMLIST-v2-dt-bindings-mfd-add-Khadas-Microcontroll.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0074-arm64-dts-meson-shorten-audio-card-name-for-p212.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0075-FROMLIST-v2-mfd-add-support-for-the-Khadas-System-co.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0075-arm64-dts-meson-shorten-audio-card-name-for-rbox-pro.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0076-FROMLIST-v2-thermal-add-support-for-the-MCU-controll.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0076-arm64-dts-meson-shorten-audio-card-name-for-tanix-tx.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0077-FROMLIST-v2-nvmem-add-support-for-the-Khadas-MCU-Pro.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0077-arm64-dts-meson-shorten-audio-card-name-for-u200.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0078-FROMLIST-v2-MAINTAINERS-add-myself-as-maintainer-for.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0078-arm64-dts-meson-shorten-audio-card-name-for-vega-s95.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0079-FROMLIST-v2-arm64-dts-meson-khadas-vim3-add-Khadas-M.patch create mode 100644 projects/Amlogic/patches/linux/amlogic-0079-arm64-dts-meson-shorten-audio-card-name-for-x96-air.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0080-FROMLIST-v1-ASoC-meson-gx-card-fix-sound-dai-dt-sche.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0081-FROMLIST-v1-ASoC-meson-convert-axg-tdm-interface-to-.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0082-FROMLIST-v1-ASoC-meson-convert-axg-tdm-formatters-to.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0083-FROMLIST-v1-ASoC-meson-convert-axg-pdm-to-schema.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0084-FROMLIST-v1-ASoC-meson-convert-axg-fifo-to-schema.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0085-FROMLIST-v1-ASoC-meson-convert-axg-spdif-input-to-sc.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0086-FROMLIST-v1-ASoC-meson-convert-axg-spdif-output-to-s.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0087-FROMLIST-v1-ASoC-meson-convert-g12a-tohdmitx-control.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0088-FROMLIST-v1-ASoC-meson-convert-axg-sound-card-contro.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0089-FROMLIST-v1-media-videodev2-add-Compressed-Framebuff.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0090-FROMLIST-v1-media-meson-vdec-handle-bitdepth-on-sour.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0091-FROMLIST-v1-media-meson-vdec-update-compressed-buffe.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0092-FROMLIST-v1-media-meson-vdec-add-support-for-compres.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0093-FROMLIST-v1-media-meson-vdec-handle-compressed-outpu.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0094-FROMLIST-v2-soc-amlogic-meson-gx-socinfo-Fix-S905X3-.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0095-FROMLIST-v1-spi-dt-bindings-amlogic-meson-gx-spicc-F.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0096-FROMLIST-v1-pinctrl-meson-fix-drive-strength-registe.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0097-FROMLIST-v1-dt-bindings-clk-g12a-clkc-Add-NNA-CLK-So.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0098-FROMLIST-v1-clk-meson-g12a-Add-support-for-NNA-CLK-s.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0099-FROMLIST-v1-drm-panfrost-Fix-inbalance-of-devfreq-re.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0100-FROMLIST-v2-drm-panfrost-Fix-runtime-PM-imbalance-on.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0101-FROMLIST-v1-drm-panfrost-Fix-runtime-PM-imbalance-in.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0102-FROMLIST-v3-drm-panfrost-Reduce-the-amount-of-logs-o.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0103-FROMLIST-v2-drm-panfrost-Use-kvfree-to-free-bo-sgts.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0104-FROMLIST-v1-panfrost-Add-compatible-string-for-bifro.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0105-FROMLIST-v1-panfrost-Make-sure-GPU-is-powered-on-whe.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0106-FROMLIST-v1-arm64-dts-meson-add-missing-gxl-rng-cloc.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0107-FROMLIST-v1-ASoC-meson-imply-acodec-glue-on-axg-soun.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0108-FROMLIST-v1-dt-bindings-net-dwmac-meson-Add-a-compat.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0109-FROMLIST-v1-net-stmmac-dwmac-meson8b-add-a-compatibl.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0110-FROMLIST-v1-net-stmmac-dwmac-meson8b-use-clk_parent_.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0111-FROMLIST-v1-arm64-dts-meson-odroid-n2-enable-audio-l.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0112-FROMLIST-v1-arm64-dts-meson-odroid-n2-add-jack-audio.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0113-FROMLIST-v1-tty-serial-meson_uart-Init-port-lock-ear.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0114-REVERT-ASoC-soc-pcm-dpcm-fix-playback-capture-checks.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0115-WIP-drm-panfrost-add-support-for-custom-soft-reset-o.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0118-WIP-dt-bindings-arm-amlogic-add-support-for-the-WeTe.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0119-WIP-arm64-dts-meson-add-support-for-the-WeTek-Core-2.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0128-WIP-arm64-dts-meson-add-initial-Beelink-GS-King-X-de.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0130-WIP-arm64-dts-meson-add-audio-playback-to-a95x.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0131-WIP-arm64-dts-meson-add-audio-playback-to-khadas-vim.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0132-WIP-arm64-dts-meson-add-audio-playback-to-khadas-vim.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0133-WIP-arm64-dts-meson-add-audio-playback-to-nanopi-k2.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0135-WIP-arm64-dts-meson-add-audio-playback-to-odroid-c2.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0136-WIP-arm64-dts-meson-add-audio-playback-to-odroid-c4.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0143-WIP-arm64-dts-meson-add-audio-playback-to-wetek-hub.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0144-WIP-arm64-dts-meson-add-audio-playback-to-wetek-play.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0145-DEBUG-s-dev_dbg-dev_err-g-drivers-net-phy-realtek.c.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0146-DEBUG-print-PRG_ETH0-PRG_ETH1-values-at-init.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0147-WIP-arm64-dts-meson-misc-fixups-for-w400-dtsi.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0148-WIP-arm64-dts-meson-add-i2c3-rtc-nodes-and-vrtc-alia.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0149-WIP-arm64-dts-meson-add-i2c3-rtc-nodes-and-vrtc-alia.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0150-WIP-arm64-dts-meson-add-i2c3-rtc-nodes-and-vrtc-alia.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0151-WIP-arm64-dts-meson-enable-rtc-node-on-Khadas-VIM1-V.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0152-WIP-arm64-dts-meson-fix-spifc-node-on-Khadas-VIM3-VI.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0153-WIP-arm64-dts-meson-fix-mmc0-tuning-error-on-Khadas-.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0154-WIP-arm64-dts-meson-switch-VIM3-VIM3L-to-rgmii-id.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0155-WIP-arm64-dts-meson-switch-ODROID-N2-to-rgmii-id.patch delete mode 100644 projects/Amlogic/patches/linux/amlogic-0156-WIP-arm64-dts-meson-switch-ODROID-C4-to-rgmii-id.patch delete mode 100644 projects/Amlogic/patches/linux/linux-0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch diff --git a/packages/linux/package.mk b/packages/linux/package.mk index 9a4397c611d..f1ffee98ac2 100644 --- a/packages/linux/package.mk +++ b/packages/linux/package.mk @@ -15,6 +15,12 @@ PKG_STAMP="$KERNEL_TARGET $KERNEL_MAKE_EXTRACMD" PKG_PATCH_DIRS="$LINUX" case "$LINUX" in + amlogic) + PKG_VERSION="7c53f6b671f4aba70ff15e1b05148b10d58c2837" # 5.11-rc3 + PKG_SHA256="30206f178c9c151a0c387c7967800bc0bf89a893958241a3add0098d443f323a" + PKG_URL="https://github.com/torvalds/linux/archive/$PKG_VERSION.tar.gz" + PKG_SOURCE_NAME="linux-$LINUX-$PKG_VERSION.tar.gz" + ;; raspberrypi) PKG_VERSION="a896a00ebffd0b016627f65ff236b660e66e782b" # 5.10.5 PKG_SHA256="654cb832818ec70022c6c4d880a8ca4795603af850f285894899a23f302c4de3" diff --git a/projects/Amlogic/linux/linux.aarch64.conf b/projects/Amlogic/linux/linux.aarch64.conf index 98a10a1df62..b8b9c009607 100644 --- a/projects/Amlogic/linux/linux.aarch64.conf +++ b/projects/Amlogic/linux/linux.aarch64.conf @@ -1,19 +1,17 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/arm64 5.7.0-rc1 Kernel Configuration -# - -# -# Compiler: aarch64-none-linux-gnu-gcc.real (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025 +# Linux/arm64 5.11.0-rc3 Kernel Configuration # +CONFIG_CC_VERSION_TEXT="aarch64-none-linux-gnu-gcc.real (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025" CONFIG_CC_IS_GCC=y CONFIG_GCC_VERSION=90201 CONFIG_LD_VERSION=233010000 CONFIG_CLANG_VERSION=0 +CONFIG_LLD_VERSION=0 CONFIG_CC_CAN_LINK=y +CONFIG_CC_CAN_LINK_STATIC=y CONFIG_CC_HAS_ASM_GOTO=y CONFIG_CC_HAS_ASM_INLINE=y -CONFIG_CC_HAS_WARN_MAYBE_UNINITIALIZED=y CONFIG_IRQ_WORK=y CONFIG_BUILDTIME_TABLE_SORT=y CONFIG_THREAD_INFO_IN_TASK=y @@ -26,12 +24,14 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_LOCALVERSION="" # CONFIG_LOCALVERSION_AUTO is not set CONFIG_BUILD_SALT="" +CONFIG_DEFAULT_INIT="" CONFIG_DEFAULT_HOSTNAME="@DISTRONAME@" CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_SYSVIPC_SYSCTL=y CONFIG_POSIX_MQUEUE=y CONFIG_POSIX_MQUEUE_SYSCTL=y +# CONFIG_WATCH_QUEUE is not set CONFIG_CROSS_MEMORY_ATTACH=y # CONFIG_USELIB is not set # CONFIG_AUDIT is not set @@ -46,9 +46,9 @@ CONFIG_GENERIC_IRQ_SHOW_LEVEL=y CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y CONFIG_GENERIC_IRQ_MIGRATION=y CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_GENERIC_IRQ_CHIP=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_DOMAIN_HIERARCHY=y +CONFIG_GENERIC_IRQ_IPI=y CONFIG_GENERIC_MSI_IRQ=y CONFIG_GENERIC_MSI_IRQ_DOMAIN=y CONFIG_IRQ_MSI_IOMMU=y @@ -77,8 +77,10 @@ CONFIG_HIGH_RES_TIMERS=y # end of Timers subsystem # CONFIG_PREEMPT_NONE is not set -CONFIG_PREEMPT_VOLUNTARY=y -# CONFIG_PREEMPT is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_PREEMPT_COUNT=y +CONFIG_PREEMPTION=y # # CPU/Task time and stats accounting @@ -87,7 +89,6 @@ CONFIG_TICK_CPU_ACCOUNTING=y # CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set CONFIG_IRQ_TIME_ACCOUNTING=y CONFIG_HAVE_SCHED_AVG_IRQ=y -# CONFIG_SCHED_THERMAL_PRESSURE is not set # CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_TASKSTATS is not set # CONFIG_PSI is not set @@ -99,9 +100,13 @@ CONFIG_CPU_ISOLATION=y # RCU Subsystem # CONFIG_TREE_RCU=y +CONFIG_PREEMPT_RCU=y # CONFIG_RCU_EXPERT is not set CONFIG_SRCU=y CONFIG_TREE_SRCU=y +CONFIG_TASKS_RCU_GENERIC=y +CONFIG_TASKS_RCU=y +CONFIG_TASKS_TRACE_RCU=y CONFIG_RCU_STALL_COMMON=y CONFIG_RCU_NEED_SEGCBLIST=y # end of RCU Subsystem @@ -125,7 +130,7 @@ CONFIG_ARCH_SUPPORTS_INT128=y CONFIG_CGROUPS=y CONFIG_PAGE_COUNTER=y CONFIG_MEMCG=y -# CONFIG_MEMCG_SWAP is not set +CONFIG_MEMCG_SWAP=y CONFIG_MEMCG_KMEM=y CONFIG_BLK_CGROUP=y CONFIG_CGROUP_WRITEBACK=y @@ -146,6 +151,7 @@ CONFIG_CGROUP_BPF=y CONFIG_SOCK_CGROUP_DATA=y CONFIG_NAMESPACES=y CONFIG_UTS_NS=y +CONFIG_TIME_NS=y CONFIG_IPC_NS=y # CONFIG_USER_NS is not set CONFIG_PID_NS=y @@ -164,10 +170,12 @@ CONFIG_INITRAMFS_ROOT_GID=0 # CONFIG_RD_XZ is not set # CONFIG_RD_LZO is not set # CONFIG_RD_LZ4 is not set +# CONFIG_RD_ZSTD is not set CONFIG_INITRAMFS_COMPRESSION_NONE=y CONFIG_BOOT_CONFIG=y CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_LD_ORPHAN_WARN=y CONFIG_SYSCTL=y CONFIG_HAVE_UID16=y CONFIG_SYSCTL_EXCEPTION_TRACE=y @@ -201,6 +209,7 @@ CONFIG_KALLSYMS_ALL=y CONFIG_KALLSYMS_BASE_RELATIVE=y CONFIG_BPF_SYSCALL=y CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y +# CONFIG_BPF_PRELOAD is not set # CONFIG_USERFAULTFD is not set CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y CONFIG_RSEQ=y @@ -224,7 +233,7 @@ CONFIG_SLUB_DEBUG=y CONFIG_SLUB=y # CONFIG_SLOB is not set CONFIG_SLAB_MERGE_DEFAULT=y -CONFIG_SLAB_FREELIST_RANDOM=y +# CONFIG_SLAB_FREELIST_RANDOM is not set # CONFIG_SLAB_FREELIST_HARDENED is not set # CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set CONFIG_SLUB_CPU_PARTIAL=y @@ -236,7 +245,8 @@ CONFIG_ARM64=y CONFIG_64BIT=y CONFIG_MMU=y CONFIG_ARM64_PAGE_SHIFT=12 -CONFIG_ARM64_CONT_SHIFT=4 +CONFIG_ARM64_CONT_PTE_SHIFT=4 +CONFIG_ARM64_CONT_PMD_SHIFT=4 CONFIG_ARCH_MMAP_RND_BITS_MIN=18 CONFIG_ARCH_MMAP_RND_BITS_MAX=33 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11 @@ -270,15 +280,18 @@ CONFIG_ARCH_PROC_KCORE_TEXT=y # CONFIG_ARCH_SUNXI is not set # CONFIG_ARCH_ALPINE is not set # CONFIG_ARCH_BCM2835 is not set +# CONFIG_ARCH_BCM4908 is not set # CONFIG_ARCH_BCM_IPROC is not set # CONFIG_ARCH_BERLIN is not set # CONFIG_ARCH_BITMAIN is not set # CONFIG_ARCH_BRCMSTB is not set # CONFIG_ARCH_EXYNOS is not set +# CONFIG_ARCH_SPARX5 is not set # CONFIG_ARCH_K3 is not set # CONFIG_ARCH_LAYERSCAPE is not set # CONFIG_ARCH_LG1K is not set # CONFIG_ARCH_HISI is not set +# CONFIG_ARCH_KEEMBAY is not set # CONFIG_ARCH_MEDIATEK is not set CONFIG_ARCH_MESON=y # CONFIG_ARCH_MVEBU is not set @@ -297,6 +310,7 @@ CONFIG_ARCH_MESON=y # CONFIG_ARCH_THUNDER2 is not set # CONFIG_ARCH_UNIPHIER is not set # CONFIG_ARCH_VEXPRESS is not set +# CONFIG_ARCH_VISCONTI is not set # CONFIG_ARCH_XGENE is not set # CONFIG_ARCH_ZX is not set # CONFIG_ARCH_ZYNQMP is not set @@ -319,27 +333,27 @@ CONFIG_ARM64_ERRATUM_845719=y CONFIG_ARM64_ERRATUM_843419=y CONFIG_ARM64_ERRATUM_1024718=y CONFIG_ARM64_ERRATUM_1418040=y -CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT_VHE=y +CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y CONFIG_ARM64_ERRATUM_1165522=y +CONFIG_ARM64_ERRATUM_1319367=y CONFIG_ARM64_ERRATUM_1530923=y +CONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y CONFIG_ARM64_ERRATUM_1286807=y -CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT_NVHE=y -CONFIG_ARM64_ERRATUM_1319367=y CONFIG_ARM64_ERRATUM_1463225=y CONFIG_ARM64_ERRATUM_1542419=y +CONFIG_ARM64_ERRATUM_1508412=y # CONFIG_CAVIUM_ERRATUM_22375 is not set # CONFIG_CAVIUM_ERRATUM_23154 is not set # CONFIG_CAVIUM_ERRATUM_27456 is not set # CONFIG_CAVIUM_ERRATUM_30115 is not set # CONFIG_CAVIUM_TX2_ERRATUM_219 is not set +# CONFIG_FUJITSU_ERRATUM_010001 is not set +# CONFIG_HISILICON_ERRATUM_161600802 is not set # CONFIG_QCOM_FALKOR_ERRATUM_1003 is not set -CONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y # CONFIG_QCOM_FALKOR_ERRATUM_1009 is not set # CONFIG_QCOM_QDF2400_ERRATUM_0065 is not set -# CONFIG_SOCIONEXT_SYNQUACER_PREITS is not set -# CONFIG_HISILICON_ERRATUM_161600802 is not set # CONFIG_QCOM_FALKOR_ERRATUM_E1041 is not set -# CONFIG_FUJITSU_ERRATUM_010001 is not set +# CONFIG_SOCIONEXT_SYNQUACER_PREITS is not set # end of ARM errata workarounds via the alternatives framework CONFIG_ARM64_4K_PAGES=y @@ -364,18 +378,14 @@ CONFIG_HZ_250=y # CONFIG_HZ_1000 is not set CONFIG_HZ=250 CONFIG_SCHED_HRTICK=y -CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_DEFAULT=y CONFIG_ARCH_SELECT_MEMORY_MODEL=y CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HW_PERF_EVENTS=y CONFIG_SYS_SUPPORTS_HUGETLBFS=y CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y -CONFIG_SECCOMP=y # CONFIG_PARAVIRT is not set # CONFIG_PARAVIRT_TIME_ACCOUNTING is not set # CONFIG_KEXEC is not set @@ -384,24 +394,22 @@ CONFIG_SECCOMP=y # CONFIG_XEN is not set CONFIG_FORCE_MAX_ZONEORDER=11 CONFIG_UNMAP_KERNEL_AT_EL0=y -CONFIG_HARDEN_BRANCH_PREDICTOR=y -CONFIG_HARDEN_EL2_VECTORS=y -CONFIG_ARM64_SSBD=y CONFIG_RODATA_FULL_DEFAULT_ENABLED=y # CONFIG_ARM64_SW_TTBR0_PAN is not set CONFIG_ARM64_TAGGED_ADDR_ABI=y CONFIG_COMPAT=y CONFIG_KUSER_HELPERS=y CONFIG_ARMV8_DEPRECATED=y -CONFIG_SWP_EMULATION=y -CONFIG_CP15_BARRIER_EMULATION=y -CONFIG_SETEND_EMULATION=y +# CONFIG_SWP_EMULATION is not set +# CONFIG_CP15_BARRIER_EMULATION is not set +# CONFIG_SETEND_EMULATION is not set # # ARMv8.1 architectural features # CONFIG_ARM64_HW_AFDBM=y CONFIG_ARM64_PAN=y +CONFIG_AS_HAS_LDAPR=y CONFIG_ARM64_LSE_ATOMICS=y CONFIG_ARM64_USE_LSE_ATOMICS=y CONFIG_ARM64_VHE=y @@ -410,7 +418,6 @@ CONFIG_ARM64_VHE=y # # ARMv8.2 architectural features # -CONFIG_ARM64_UAO=y # CONFIG_ARM64_PMEM is not set CONFIG_ARM64_RAS_EXTN=y CONFIG_ARM64_CNP=y @@ -430,13 +437,20 @@ CONFIG_AS_HAS_CFI_NEGATE_RA_STATE=y # ARMv8.4 architectural features # CONFIG_ARM64_AMU_EXTN=y +CONFIG_AS_HAS_ARMV8_4=y +CONFIG_ARM64_TLB_RANGE=y # end of ARMv8.4 architectural features # # ARMv8.5 architectural features # +CONFIG_AS_HAS_ARMV8_5=y +CONFIG_ARM64_BTI=y +CONFIG_CC_HAS_BRANCH_PROT_PAC_RET_BTI=y CONFIG_ARM64_E0PD=y CONFIG_ARCH_RANDOM=y +CONFIG_ARM64_AS_HAS_MTE=y +CONFIG_ARM64_MTE=y # end of ARMv8.5 architectural features CONFIG_ARM64_SVE=y @@ -458,6 +472,7 @@ CONFIG_CMDLINE="" # end of Boot options CONFIG_SYSVIPC_COMPAT=y +CONFIG_ARCH_ENABLE_THP_MIGRATION=y # # Power management options @@ -492,16 +507,16 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y # CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y -CONFIG_CPU_IDLE_GOV_LADDER=y +# CONFIG_CPU_IDLE_GOV_LADDER is not set CONFIG_CPU_IDLE_GOV_MENU=y -CONFIG_CPU_IDLE_GOV_TEO=y +# CONFIG_CPU_IDLE_GOV_TEO is not set CONFIG_DT_IDLE_STATES=y # # ARM CPU Idle Drivers # CONFIG_ARM_CPUIDLE=y -CONFIG_ARM_PSCI_CPUIDLE=y +# CONFIG_ARM_PSCI_CPUIDLE is not set # end of ARM CPU Idle Drivers # end of CPU Idle @@ -520,7 +535,7 @@ CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y # CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y CONFIG_CPU_FREQ_GOV_POWERSAVE=y -# CONFIG_CPU_FREQ_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set # CONFIG_CPU_FREQ_GOV_SCHEDUTIL is not set @@ -531,7 +546,6 @@ CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_CPUFREQ_DT=y CONFIG_CPUFREQ_DT_PLATDEV=y CONFIG_ARM_SCPI_CPUFREQ=y -# CONFIG_QORIQ_CPUFREQ is not set # end of CPU Frequency scaling # end of CPU Power Management @@ -543,15 +557,14 @@ CONFIG_ARM_SCPI_PROTOCOL=y CONFIG_ARM_SCPI_POWER_DOMAIN=y # CONFIG_ARM_SDE_INTERFACE is not set # CONFIG_FIRMWARE_MEMMAP is not set -CONFIG_HAVE_ARM_SMCCC=y -CONFIG_ARM_PSCI_FW=y -# CONFIG_ARM_PSCI_CHECKER is not set # CONFIG_GOOGLE_FIRMWARE is not set -CONFIG_EFI_EARLYCON=y CONFIG_MESON_SM=y -CONFIG_MFD_KHADAS_MCU=m -CONFIG_KHADAS_MCU_FAN_THERMAL=m -CONFIG_NVMEM_KHADAS_MCU_USER_MEM=m +CONFIG_MESON_GX_PM=y +CONFIG_ARM_PSCI_FW=y +# CONFIG_ARM_PSCI_CHECKER is not set +CONFIG_HAVE_ARM_SMCCC=y +CONFIG_HAVE_ARM_SMCCC_DISCOVERY=y +CONFIG_ARM_SMCCC_SOC_ID=y # # Tegra firmware driver @@ -562,7 +575,7 @@ CONFIG_NVMEM_KHADAS_MCU_USER_MEM=m # CONFIG_VIRTUALIZATION is not set CONFIG_ARM64_CRYPTO=y CONFIG_CRYPTO_SHA256_ARM64=y -# CONFIG_CRYPTO_SHA512_ARM64 is not set +CONFIG_CRYPTO_SHA512_ARM64=y CONFIG_CRYPTO_SHA1_ARM64_CE=y CONFIG_CRYPTO_SHA2_ARM64_CE=y # CONFIG_CRYPTO_SHA512_ARM64_CE is not set @@ -570,6 +583,7 @@ CONFIG_CRYPTO_SHA2_ARM64_CE=y # CONFIG_CRYPTO_SM3_ARM64_CE is not set # CONFIG_CRYPTO_SM4_ARM64_CE is not set CONFIG_CRYPTO_GHASH_ARM64_CE=y +# CONFIG_CRYPTO_CRCT10DIF_ARM64_CE is not set CONFIG_CRYPTO_AES_ARM64=y CONFIG_CRYPTO_AES_ARM64_CE=y CONFIG_CRYPTO_AES_ARM64_CE_CCM=y @@ -604,7 +618,6 @@ CONFIG_HAVE_ASM_MODVERSIONS=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y CONFIG_HAVE_RSEQ=y CONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y -CONFIG_HAVE_CLK=y CONFIG_HAVE_HW_BREAKPOINT=y CONFIG_HAVE_PERF_REGS=y CONFIG_HAVE_PERF_USER_STACK_DUMP=y @@ -617,16 +630,20 @@ CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y CONFIG_HAVE_CMPXCHG_LOCAL=y CONFIG_HAVE_CMPXCHG_DOUBLE=y CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y +CONFIG_HAVE_ARCH_SECCOMP=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_SECCOMP=y CONFIG_SECCOMP_FILTER=y +# CONFIG_SECCOMP_CACHE_DEBUG is not set CONFIG_HAVE_ARCH_STACKLEAK=y CONFIG_HAVE_STACKPROTECTOR=y -CONFIG_CC_HAS_STACKPROTECTOR_NONE=y CONFIG_STACKPROTECTOR=y CONFIG_STACKPROTECTOR_STRONG=y CONFIG_HAVE_CONTEXT_TRACKING=y CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y +CONFIG_HAVE_MOVE_PUD=y +CONFIG_HAVE_MOVE_PMD=y CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y CONFIG_HAVE_ARCH_HUGE_VMAP=y CONFIG_HAVE_MOD_ARCH_SPECIFIC=y @@ -637,7 +654,6 @@ CONFIG_ARCH_MMAP_RND_BITS=18 CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y CONFIG_ARCH_MMAP_RND_COMPAT_BITS=11 CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y -CONFIG_HAVE_COPY_THREAD_TLS=y CONFIG_CLONE_BACKWARDS=y CONFIG_OLD_SIGSUSPEND3=y CONFIG_COMPAT_OLD_SIGACTION=y @@ -650,9 +666,11 @@ CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y CONFIG_STRICT_MODULE_RWX=y CONFIG_HAVE_ARCH_COMPILER_H=y CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y -CONFIG_ARCH_USE_MEMREMAP_PROT=y # CONFIG_LOCK_EVENT_COUNTS is not set CONFIG_ARCH_HAS_RELR=y +CONFIG_ARCH_WANT_LD_ORPHAN_WARN=y +CONFIG_HAVE_ARCH_PFN_VALID=y +CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y # # GCOV-based kernel profiling @@ -687,15 +705,18 @@ CONFIG_BLK_SCSI_REQUEST=y CONFIG_BLK_CGROUP_RWSTAT=y CONFIG_BLK_DEV_BSG=y CONFIG_BLK_DEV_BSGLIB=y -# CONFIG_BLK_DEV_INTEGRITY is not set +CONFIG_BLK_DEV_INTEGRITY=y +CONFIG_BLK_DEV_INTEGRITY_T10=y # CONFIG_BLK_DEV_ZONED is not set -# CONFIG_BLK_DEV_THROTTLING is not set +CONFIG_BLK_DEV_THROTTLING=y +# CONFIG_BLK_DEV_THROTTLING_LOW is not set # CONFIG_BLK_CMDLINE_PARSER is not set # CONFIG_BLK_WBT is not set -# CONFIG_BLK_CGROUP_IOLATENCY is not set +CONFIG_BLK_CGROUP_IOLATENCY=y # CONFIG_BLK_CGROUP_IOCOST is not set CONFIG_BLK_DEBUG_FS=y # CONFIG_BLK_SED_OPAL is not set +# CONFIG_BLK_INLINE_ENCRYPTION is not set # # Partition Types @@ -731,64 +752,12 @@ CONFIG_BLK_PM=y # CONFIG_MQ_IOSCHED_DEADLINE=y CONFIG_MQ_IOSCHED_KYBER=y -CONFIG_IOSCHED_BFQ=y -CONFIG_BFQ_GROUP_IOSCHED=y -# CONFIG_BFQ_CGROUP_DEBUG is not set +# CONFIG_IOSCHED_BFQ is not set # end of IO Schedulers CONFIG_PADATA=y CONFIG_ASN1=y -CONFIG_ARCH_INLINE_SPIN_TRYLOCK=y -CONFIG_ARCH_INLINE_SPIN_TRYLOCK_BH=y -CONFIG_ARCH_INLINE_SPIN_LOCK=y -CONFIG_ARCH_INLINE_SPIN_LOCK_BH=y -CONFIG_ARCH_INLINE_SPIN_LOCK_IRQ=y -CONFIG_ARCH_INLINE_SPIN_LOCK_IRQSAVE=y -CONFIG_ARCH_INLINE_SPIN_UNLOCK=y -CONFIG_ARCH_INLINE_SPIN_UNLOCK_BH=y -CONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQ=y -CONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE=y -CONFIG_ARCH_INLINE_READ_LOCK=y -CONFIG_ARCH_INLINE_READ_LOCK_BH=y -CONFIG_ARCH_INLINE_READ_LOCK_IRQ=y -CONFIG_ARCH_INLINE_READ_LOCK_IRQSAVE=y -CONFIG_ARCH_INLINE_READ_UNLOCK=y -CONFIG_ARCH_INLINE_READ_UNLOCK_BH=y -CONFIG_ARCH_INLINE_READ_UNLOCK_IRQ=y -CONFIG_ARCH_INLINE_READ_UNLOCK_IRQRESTORE=y -CONFIG_ARCH_INLINE_WRITE_LOCK=y -CONFIG_ARCH_INLINE_WRITE_LOCK_BH=y -CONFIG_ARCH_INLINE_WRITE_LOCK_IRQ=y -CONFIG_ARCH_INLINE_WRITE_LOCK_IRQSAVE=y -CONFIG_ARCH_INLINE_WRITE_UNLOCK=y -CONFIG_ARCH_INLINE_WRITE_UNLOCK_BH=y -CONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQ=y -CONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE=y -CONFIG_INLINE_SPIN_TRYLOCK=y -CONFIG_INLINE_SPIN_TRYLOCK_BH=y -CONFIG_INLINE_SPIN_LOCK=y -CONFIG_INLINE_SPIN_LOCK_BH=y -CONFIG_INLINE_SPIN_LOCK_IRQ=y -CONFIG_INLINE_SPIN_LOCK_IRQSAVE=y -CONFIG_INLINE_SPIN_UNLOCK_BH=y -CONFIG_INLINE_SPIN_UNLOCK_IRQ=y -CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE=y -CONFIG_INLINE_READ_LOCK=y -CONFIG_INLINE_READ_LOCK_BH=y -CONFIG_INLINE_READ_LOCK_IRQ=y -CONFIG_INLINE_READ_LOCK_IRQSAVE=y -CONFIG_INLINE_READ_UNLOCK=y -CONFIG_INLINE_READ_UNLOCK_BH=y -CONFIG_INLINE_READ_UNLOCK_IRQ=y -CONFIG_INLINE_READ_UNLOCK_IRQRESTORE=y -CONFIG_INLINE_WRITE_LOCK=y -CONFIG_INLINE_WRITE_LOCK_BH=y -CONFIG_INLINE_WRITE_LOCK_IRQ=y -CONFIG_INLINE_WRITE_LOCK_IRQSAVE=y -CONFIG_INLINE_WRITE_UNLOCK=y -CONFIG_INLINE_WRITE_UNLOCK_BH=y -CONFIG_INLINE_WRITE_UNLOCK_IRQ=y -CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE=y +CONFIG_UNINLINE_SPIN_UNLOCK=y CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_RWSEM_SPIN_ON_OWNER=y @@ -797,6 +766,7 @@ CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y CONFIG_QUEUED_SPINLOCKS=y CONFIG_ARCH_USE_QUEUED_RWLOCKS=y CONFIG_QUEUED_RWLOCKS=y +CONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y CONFIG_FREEZER=y @@ -805,6 +775,9 @@ CONFIG_FREEZER=y # CONFIG_BINFMT_ELF=y CONFIG_COMPAT_BINFMT_ELF=y +CONFIG_ARCH_BINFMT_ELF_STATE=y +CONFIG_ARCH_HAVE_ELF_PROT=y +CONFIG_ARCH_USE_GNU_PROPERTY=y CONFIG_ELFCORE=y # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set CONFIG_BINFMT_SCRIPT=y @@ -819,7 +792,6 @@ CONFIG_SELECT_MEMORY_MODEL=y # CONFIG_FLATMEM_MANUAL is not set CONFIG_SPARSEMEM_MANUAL=y CONFIG_SPARSEMEM=y -CONFIG_HAVE_MEMORY_PRESENT=y CONFIG_SPARSEMEM_EXTREME=y CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y CONFIG_SPARSEMEM_VMEMMAP=y @@ -837,9 +809,12 @@ CONFIG_BOUNCE=y # CONFIG_KSM is not set CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y -# CONFIG_MEMORY_FAILURE is not set -# CONFIG_TRANSPARENT_HUGEPAGE is not set -CONFIG_CLEANCACHE=y +CONFIG_MEMORY_FAILURE=y +# CONFIG_HWPOISON_INJECT is not set +CONFIG_TRANSPARENT_HUGEPAGE=y +CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y +# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set +# CONFIG_CLEANCACHE is not set CONFIG_FRONTSWAP=y CONFIG_CMA=y # CONFIG_CMA_DEBUG is not set @@ -854,8 +829,10 @@ CONFIG_GENERIC_EARLY_IOREMAP=y # CONFIG_IDLE_PAGE_TRACKING is not set CONFIG_ARCH_HAS_PTE_DEVMAP=y CONFIG_FRAME_VECTOR=y +CONFIG_ARCH_USES_HIGH_VMA_FLAGS=y # CONFIG_PERCPU_STATS is not set -# CONFIG_GUP_BENCHMARK is not set +# CONFIG_GUP_TEST is not set +# CONFIG_READ_ONLY_THP_FOR_FS is not set CONFIG_ARCH_HAS_PTE_SPECIAL=y # end of Memory Management options @@ -1164,6 +1141,8 @@ CONFIG_STP=m CONFIG_BRIDGE=m CONFIG_BRIDGE_IGMP_SNOOPING=y # CONFIG_BRIDGE_VLAN_FILTERING is not set +# CONFIG_BRIDGE_MRP is not set +# CONFIG_BRIDGE_CFM is not set CONFIG_HAVE_NET_DSA=y # CONFIG_NET_DSA is not set CONFIG_VLAN_8021Q=m @@ -1243,6 +1222,7 @@ CONFIG_DNS_RESOLVER=y # CONFIG_HSR is not set # CONFIG_NET_SWITCHDEV is not set # CONFIG_NET_L3_MASTER_DEV is not set +# CONFIG_QRTR is not set # CONFIG_NET_NCSI is not set CONFIG_RPS=y CONFIG_RFS_ACCEL=y @@ -1273,8 +1253,10 @@ CONFIG_BT_HIDP=m CONFIG_BT_HS=y CONFIG_BT_LE=y # CONFIG_BT_LEDS is not set -# CONFIG_BT_SELFTEST is not set +# CONFIG_BT_MSFTEXT is not set # CONFIG_BT_DEBUGFS is not set +# CONFIG_BT_SELFTEST is not set +# CONFIG_BT_FEATURE_DEBUG is not set # # Bluetooth device drivers @@ -1309,8 +1291,8 @@ CONFIG_BT_HCIUART_QCA=y # CONFIG_BT_HCIVHCI is not set # CONFIG_BT_MRVL is not set # CONFIG_BT_ATH3K is not set -# CONFIG_BT_MTKSDIO is not set -# CONFIG_BT_MTKUART is not set +CONFIG_BT_MTKSDIO=m +CONFIG_BT_MTKUART=m # end of Bluetooth device drivers # CONFIG_AF_RXRPC is not set @@ -1342,7 +1324,6 @@ CONFIG_MAC80211_LEDS=y # CONFIG_MAC80211_MESSAGE_TRACING is not set # CONFIG_MAC80211_DEBUG_MENU is not set CONFIG_MAC80211_STA_HASH_MAX_SIZE=0 -# CONFIG_WIMAX is not set CONFIG_RFKILL=m CONFIG_RFKILL_LEDS=y CONFIG_RFKILL_INPUT=y @@ -1420,7 +1401,101 @@ CONFIG_GENERIC_ARCH_TOPOLOGY=y # CONFIG_CONNECTOR is not set # CONFIG_GNSS is not set -# CONFIG_MTD is not set +CONFIG_MTD=y +# CONFIG_MTD_TESTS is not set + +# +# Partition parsers +# +# CONFIG_MTD_AR7_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set +CONFIG_MTD_OF_PARTS=y +# CONFIG_MTD_AFS_PARTS is not set +# CONFIG_MTD_REDBOOT_PARTS is not set +# end of Partition parsers + +# +# User Modules And Translation Layers +# +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set +# CONFIG_SM_FTL is not set +# CONFIG_MTD_OOPS is not set +# CONFIG_MTD_SWAP is not set +# CONFIG_MTD_PARTITIONED_MASTER is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# end of RAM/ROM/Flash chip drivers + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PLATRAM is not set +# end of Mapping drivers for chip access + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_DATAFLASH is not set +# CONFIG_MTD_MCHP23K256 is not set +# CONFIG_MTD_SST25L is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOCG3 is not set +# end of Self-contained MTD device drivers + +# +# NAND +# +# CONFIG_MTD_ONENAND is not set +# CONFIG_MTD_RAW_NAND is not set +# CONFIG_MTD_SPI_NAND is not set + +# +# ECC engine support +# +# CONFIG_MTD_NAND_ECC_SW_HAMMING is not set +# CONFIG_MTD_NAND_ECC_SW_BCH is not set +# end of ECC engine support +# end of NAND + +# +# LPDDR & LPDDR2 PCM memory drivers +# +# CONFIG_MTD_LPDDR is not set +# end of LPDDR & LPDDR2 PCM memory drivers + +CONFIG_MTD_SPI_NOR=y +CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y +# CONFIG_MTD_SPI_NOR_SWP_DISABLE is not set +CONFIG_MTD_SPI_NOR_SWP_DISABLE_ON_VOLATILE=y +# CONFIG_MTD_SPI_NOR_SWP_KEEP is not set +# CONFIG_MTD_UBI is not set +# CONFIG_MTD_HYPERBUS is not set CONFIG_DTC=y CONFIG_OF=y # CONFIG_OF_UNITTEST is not set @@ -1431,7 +1506,6 @@ CONFIG_OF_DYNAMIC=y CONFIG_OF_ADDRESS=y CONFIG_OF_IRQ=y CONFIG_OF_NET=y -CONFIG_OF_MDIO=y CONFIG_OF_RESERVED_MEM=y CONFIG_OF_RESOLVE=y CONFIG_OF_OVERLAY=y @@ -1477,12 +1551,13 @@ CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_SRAM is not set # CONFIG_XILINX_SDFEC is not set # CONFIG_PVPANIC is not set +# CONFIG_HISI_HIKEY_USB is not set # CONFIG_C2PORT is not set # # EEPROM support # -CONFIG_EEPROM_AT24=m +# CONFIG_EEPROM_AT24 is not set # CONFIG_EEPROM_AT25 is not set # CONFIG_EEPROM_LEGACY is not set # CONFIG_EEPROM_MAX6875 is not set @@ -1501,13 +1576,6 @@ CONFIG_EEPROM_93CX6=m # CONFIG_SENSORS_LIS3_SPI is not set # CONFIG_SENSORS_LIS3_I2C is not set # CONFIG_ALTERA_STAPL is not set - -# -# Intel MIC & related support -# -# CONFIG_VOP_BUS is not set -# end of Intel MIC & related support - # CONFIG_ECHO is not set # CONFIG_MISC_RTSX_USB is not set # CONFIG_UACCE is not set @@ -1542,6 +1610,7 @@ CONFIG_BLK_DEV_SR=y CONFIG_SCSI_ISCSI_ATTRS=y CONFIG_SCSI_SAS_ATTRS=y CONFIG_SCSI_SAS_LIBSAS=y +# CONFIG_SCSI_SAS_ATA is not set CONFIG_SCSI_SAS_HOST_SMP=y # CONFIG_SCSI_SRP_ATTRS is not set # end of SCSI Transports @@ -1549,14 +1618,52 @@ CONFIG_SCSI_SAS_HOST_SMP=y CONFIG_SCSI_LOWLEVEL=y CONFIG_ISCSI_TCP=y CONFIG_ISCSI_BOOT_SYSFS=y +# CONFIG_SCSI_HISI_SAS is not set # CONFIG_SCSI_UFSHCD is not set # CONFIG_SCSI_DEBUG is not set # CONFIG_SCSI_DH is not set # end of SCSI device support CONFIG_HAVE_PATA_PLATFORM=y -# CONFIG_ATA is not set -# CONFIG_MD is not set +CONFIG_ATA=y +CONFIG_SATA_HOST=y +CONFIG_ATA_VERBOSE_ERROR=y +CONFIG_ATA_FORCE=y +CONFIG_SATA_PMP=y + +# +# Controllers with non-SFF native interface +# +CONFIG_SATA_AHCI_PLATFORM=y +# CONFIG_AHCI_CEVA is not set +# CONFIG_AHCI_QORIQ is not set +CONFIG_ATA_SFF=y + +# +# SFF controllers with custom DMA interface +# +CONFIG_ATA_BMDMA=y + +# +# SATA SFF controllers with BMDMA +# + +# +# PATA SFF controllers with BMDMA +# + +# +# PIO-only SFF controllers +# +# CONFIG_PATA_PLATFORM is not set + +# +# Generic fallback / legacy drivers +# +CONFIG_MD=y +# CONFIG_BLK_DEV_MD is not set +# CONFIG_BCACHE is not set +# CONFIG_BLK_DEV_DM is not set # CONFIG_TARGET_CORE is not set CONFIG_NETDEVICES=y CONFIG_MII=y @@ -1632,59 +1739,40 @@ CONFIG_STMMAC_PLATFORM=y # CONFIG_DWMAC_DWC_QOS_ETH is not set CONFIG_DWMAC_GENERIC=y CONFIG_DWMAC_MESON=y +# CONFIG_DWMAC_INTEL_PLAT is not set # CONFIG_NET_VENDOR_SYNOPSYS is not set # CONFIG_NET_VENDOR_VIA is not set # CONFIG_NET_VENDOR_WIZNET is not set # CONFIG_NET_VENDOR_XILINX is not set -CONFIG_MDIO_DEVICE=y -CONFIG_MDIO_BUS=y -# CONFIG_MDIO_BCM_UNIMAC is not set -CONFIG_MDIO_BITBANG=y -CONFIG_MDIO_BUS_MUX=y -CONFIG_MDIO_BUS_MUX_GPIO=y -CONFIG_MDIO_BUS_MUX_MESON_G12A=y -CONFIG_MDIO_BUS_MUX_MMIOREG=y -CONFIG_MDIO_BUS_MUX_MULTIPLEXER=y -# CONFIG_MDIO_GPIO is not set -# CONFIG_MDIO_HISI_FEMAC is not set -# CONFIG_MDIO_IPQ8064 is not set -# CONFIG_MDIO_MSCC_MIIM is not set -# CONFIG_MDIO_MVUSB is not set -# CONFIG_MDIO_OCTEON is not set -CONFIG_MDIO_XPCS=y CONFIG_PHYLINK=y CONFIG_PHYLIB=y CONFIG_SWPHY=y CONFIG_LED_TRIGGER_PHY=y +CONFIG_FIXED_PHY=y +# CONFIG_SFP is not set # # MII PHY device drivers # -# CONFIG_SFP is not set -# CONFIG_ADIN_PHY is not set # CONFIG_AMD_PHY is not set +CONFIG_MESON_GXL_PHY=y +# CONFIG_ADIN_PHY is not set # CONFIG_AQUANTIA_PHY is not set # CONFIG_AX88796B_PHY is not set -# CONFIG_BCM7XXX_PHY is not set -# CONFIG_BCM87XX_PHY is not set # CONFIG_BROADCOM_PHY is not set +# CONFIG_BCM54140_PHY is not set +# CONFIG_BCM7XXX_PHY is not set # CONFIG_BCM84881_PHY is not set +# CONFIG_BCM87XX_PHY is not set # CONFIG_CICADA_PHY is not set # CONFIG_CORTINA_PHY is not set # CONFIG_DAVICOM_PHY is not set -# CONFIG_DP83822_PHY is not set -# CONFIG_DP83TC811_PHY is not set -# CONFIG_DP83848_PHY is not set -# CONFIG_DP83867_PHY is not set -# CONFIG_DP83869_PHY is not set -CONFIG_FIXED_PHY=y # CONFIG_ICPLUS_PHY is not set +# CONFIG_LXT_PHY is not set # CONFIG_INTEL_XWAY_PHY is not set # CONFIG_LSI_ET1011C_PHY is not set -# CONFIG_LXT_PHY is not set # CONFIG_MARVELL_PHY is not set # CONFIG_MARVELL_10G_PHY is not set -CONFIG_MESON_GXL_PHY=y # CONFIG_MICREL_PHY is not set CONFIG_MICROCHIP_PHY=m # CONFIG_MICROCHIP_T1_PHY is not set @@ -1696,12 +1784,46 @@ CONFIG_MICROCHIP_PHY=m CONFIG_REALTEK_PHY=y # CONFIG_RENESAS_PHY is not set # CONFIG_ROCKCHIP_PHY is not set -# CONFIG_SMSC_PHY is not set +CONFIG_SMSC_PHY=m # CONFIG_STE10XP is not set # CONFIG_TERANETICS_PHY is not set +# CONFIG_DP83822_PHY is not set +# CONFIG_DP83TC811_PHY is not set +# CONFIG_DP83848_PHY is not set +# CONFIG_DP83867_PHY is not set +# CONFIG_DP83869_PHY is not set # CONFIG_VITESSE_PHY is not set # CONFIG_XILINX_GMII2RGMII is not set # CONFIG_MICREL_KS8995MA is not set +CONFIG_MDIO_DEVICE=y +CONFIG_MDIO_BUS=y +CONFIG_OF_MDIO=y +CONFIG_MDIO_DEVRES=y +CONFIG_MDIO_BITBANG=y +# CONFIG_MDIO_BCM_UNIMAC is not set +# CONFIG_MDIO_GPIO is not set +# CONFIG_MDIO_HISI_FEMAC is not set +# CONFIG_MDIO_MVUSB is not set +# CONFIG_MDIO_MSCC_MIIM is not set +# CONFIG_MDIO_OCTEON is not set +# CONFIG_MDIO_IPQ4019 is not set +# CONFIG_MDIO_IPQ8064 is not set + +# +# MDIO Multiplexers +# +CONFIG_MDIO_BUS_MUX=y +CONFIG_MDIO_BUS_MUX_MESON_G12A=y +CONFIG_MDIO_BUS_MUX_GPIO=y +CONFIG_MDIO_BUS_MUX_MULTIPLEXER=y +CONFIG_MDIO_BUS_MUX_MMIOREG=y + +# +# PCS device drivers +# +CONFIG_PCS_XPCS=y +# end of PCS device drivers + CONFIG_PPP=m CONFIG_PPP_BSDCOMP=m CONFIG_PPP_DEFLATE=m @@ -1750,8 +1872,8 @@ CONFIG_USB_IPHETH=m # CONFIG_USB_VL600 is not set # CONFIG_USB_NET_CH9200 is not set # CONFIG_USB_NET_AQC111 is not set +CONFIG_USB_RTL8153_ECM=m CONFIG_WLAN=y -# CONFIG_WIRELESS_WDS is not set CONFIG_WLAN_VENDOR_ADMTEK=y CONFIG_ATH_COMMON=m CONFIG_WLAN_VENDOR_ATH=y @@ -1832,12 +1954,20 @@ CONFIG_MT7601U=m CONFIG_MT76_CORE=m CONFIG_MT76_LEDS=y CONFIG_MT76_USB=m +CONFIG_MT76_SDIO=m CONFIG_MT76x02_LIB=m CONFIG_MT76x02_USB=m CONFIG_MT76x0_COMMON=m CONFIG_MT76x0U=m CONFIG_MT76x2_COMMON=m CONFIG_MT76x2U=m +CONFIG_MT7615_COMMON=m +CONFIG_MT7663_USB_SDIO_COMMON=m +CONFIG_MT7663U=m +CONFIG_MT7663S=m +CONFIG_WLAN_VENDOR_MICROCHIP=y +# CONFIG_WILC1000_SDIO is not set +# CONFIG_WILC1000_SPI is not set CONFIG_WLAN_VENDOR_RALINK=y CONFIG_RT2X00=m CONFIG_RT2500USB=m @@ -1870,16 +2000,8 @@ CONFIG_RTL8XXXU=m CONFIG_RTW88=m CONFIG_WLAN_VENDOR_RSI=y # CONFIG_RSI_91X is not set -CONFIG_WLAN_VENDOR_ST=y -# CONFIG_CW1200 is not set -CONFIG_WLAN_VENDOR_TI=y -# CONFIG_WL1251 is not set -# CONFIG_WL12XX is not set -CONFIG_WL18XX=m -CONFIG_WLCORE=m -# CONFIG_WLCORE_SPI is not set -CONFIG_WLCORE_SDIO=m -CONFIG_WILINK_PLATFORM_DATA=y +# CONFIG_WLAN_VENDOR_ST is not set +# CONFIG_WLAN_VENDOR_TI is not set CONFIG_WLAN_VENDOR_ZYDAS=y CONFIG_USB_ZD1201=m CONFIG_ZD1211RW=m @@ -1888,10 +2010,6 @@ CONFIG_ZD1211RW=m # CONFIG_MAC80211_HWSIM is not set CONFIG_USB_NET_RNDIS_WLAN=m # CONFIG_VIRT_WIFI is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# # CONFIG_WAN is not set # CONFIG_NETDEVSIM is not set # CONFIG_NET_FAILOVER is not set @@ -1904,7 +2022,6 @@ CONFIG_USB_NET_RNDIS_WLAN=m CONFIG_INPUT=y CONFIG_INPUT_LEDS=y CONFIG_INPUT_FF_MEMLESS=y -CONFIG_INPUT_POLLDEV=m # CONFIG_INPUT_SPARSEKMAP is not set # CONFIG_INPUT_MATRIXKMAP is not set @@ -1966,6 +2083,7 @@ CONFIG_INPUT_MOUSE=y CONFIG_INPUT_JOYSTICK=y # CONFIG_JOYSTICK_ANALOG is not set # CONFIG_JOYSTICK_A3D is not set +# CONFIG_JOYSTICK_ADC is not set # CONFIG_JOYSTICK_ADI is not set # CONFIG_JOYSTICK_COBRA is not set # CONFIG_JOYSTICK_GF2K is not set @@ -1996,13 +2114,10 @@ CONFIG_JOYSTICK_PSXPAD_SPI_FF=y # CONFIG_INPUT_TOUCHSCREEN is not set CONFIG_INPUT_MISC=y # CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_ARIZONA_HAPTICS is not set # CONFIG_INPUT_ATMEL_CAPTOUCH is not set # CONFIG_INPUT_BMA150 is not set # CONFIG_INPUT_E3X0_BUTTON is not set -# CONFIG_INPUT_MSM_VIBRATOR is not set # CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_GP2A is not set # CONFIG_INPUT_GPIO_BEEPER is not set # CONFIG_INPUT_GPIO_DECODER is not set # CONFIG_INPUT_GPIO_VIBRA is not set @@ -2019,8 +2134,10 @@ CONFIG_INPUT_UINPUT=y # CONFIG_INPUT_PWM_VIBRA is not set # CONFIG_INPUT_RK805_PWRKEY is not set CONFIG_INPUT_GPIO_ROTARY_ENCODER=m +# CONFIG_INPUT_DA7280_HAPTICS is not set # CONFIG_INPUT_ADXL34X is not set # CONFIG_INPUT_IMS_PCU is not set +# CONFIG_INPUT_IQS269A is not set # CONFIG_INPUT_CMA3000 is not set # CONFIG_INPUT_DRV260X_HAPTICS is not set # CONFIG_INPUT_DRV2665_HAPTICS is not set @@ -2036,6 +2153,7 @@ CONFIG_RMI4_F11=y CONFIG_RMI4_F12=y CONFIG_RMI4_F30=y # CONFIG_RMI4_F34 is not set +# CONFIG_RMI4_F3A is not set # CONFIG_RMI4_F54 is not set # CONFIG_RMI4_F55 is not set @@ -2110,6 +2228,7 @@ CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_SIFIVE is not set # CONFIG_SERIAL_SCCNXP is not set # CONFIG_SERIAL_SC16IS7XX is not set +# CONFIG_SERIAL_BCM63XX is not set # CONFIG_SERIAL_ALTERA_JTAGUART is not set # CONFIG_SERIAL_ALTERA_UART is not set # CONFIG_SERIAL_IFX6X60 is not set @@ -2130,12 +2249,16 @@ CONFIG_SERIAL_MCTRL_GPIO=y CONFIG_SERIAL_DEV_BUS=y CONFIG_SERIAL_DEV_CTRL_TTYPORT=y # CONFIG_TTY_PRINTK is not set +# CONFIG_VIRTIO_CONSOLE is not set # CONFIG_IPMI_HANDLER is not set # CONFIG_IPMB_DEVICE_INTERFACE is not set CONFIG_HW_RANDOM=y # CONFIG_HW_RANDOM_TIMERIOMEM is not set +# CONFIG_HW_RANDOM_BA431 is not set CONFIG_HW_RANDOM_MESON=y CONFIG_HW_RANDOM_OPTEE=m +# CONFIG_HW_RANDOM_CCTRNG is not set +# CONFIG_HW_RANDOM_XIPHERA is not set CONFIG_DEVMEM=y # CONFIG_RAW_DRIVER is not set # CONFIG_TCG_TPM is not set @@ -2182,8 +2305,8 @@ CONFIG_I2C_ALGOBIT=y # CONFIG_I2C_CADENCE is not set # CONFIG_I2C_CBUS_GPIO is not set CONFIG_I2C_DESIGNWARE_CORE=y -CONFIG_I2C_DESIGNWARE_PLATFORM=y # CONFIG_I2C_DESIGNWARE_SLAVE is not set +CONFIG_I2C_DESIGNWARE_PLATFORM=y # CONFIG_I2C_EMEV2 is not set CONFIG_I2C_GPIO=y # CONFIG_I2C_GPIO_FAULT_INJECTOR is not set @@ -2211,6 +2334,7 @@ CONFIG_I2C_MESON=y # CONFIG_I2C_STUB is not set CONFIG_I2C_SLAVE=y # CONFIG_I2C_SLAVE_EEPROM is not set +# CONFIG_I2C_SLAVE_TESTUNIT is not set # CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set @@ -2229,6 +2353,7 @@ CONFIG_SPI_MEM=y # CONFIG_SPI_AXI_SPI_ENGINE is not set # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_CADENCE is not set +# CONFIG_SPI_CADENCE_QUADSPI is not set # CONFIG_SPI_DESIGNWARE is not set # CONFIG_SPI_NXP_FLEXSPI is not set # CONFIG_SPI_GPIO is not set @@ -2244,6 +2369,7 @@ CONFIG_SPI_PL022=y # CONFIG_SPI_XCOMM is not set # CONFIG_SPI_XILINX is not set # CONFIG_SPI_ZYNQMP_GQSPI is not set +# CONFIG_SPI_AMD is not set # # SPI Multiplexer support @@ -2257,6 +2383,7 @@ CONFIG_SPI_SPIDEV=m # CONFIG_SPI_LOOPBACK_TEST is not set # CONFIG_SPI_TLE62X0 is not set # CONFIG_SPI_SLAVE is not set +CONFIG_SPI_DYNAMIC=y CONFIG_SPMI=y # CONFIG_HSI is not set CONFIG_PPS=y @@ -2288,13 +2415,19 @@ CONFIG_PINMUX=y CONFIG_PINCONF=y CONFIG_GENERIC_PINCONF=y # CONFIG_DEBUG_PINCTRL is not set -# CONFIG_PINCTRL_AMD is not set # CONFIG_PINCTRL_MCP23S08 is not set # CONFIG_PINCTRL_SINGLE is not set # CONFIG_PINCTRL_SX150X is not set # CONFIG_PINCTRL_STMFX is not set # CONFIG_PINCTRL_RK805 is not set # CONFIG_PINCTRL_OCELOT is not set +# CONFIG_PINCTRL_MICROCHIP_SGPIO is not set + +# +# Renesas pinctrl drivers +# +# end of Renesas pinctrl drivers + CONFIG_PINCTRL_MESON=y CONFIG_PINCTRL_MESON_GXBB=y CONFIG_PINCTRL_MESON_GXL=y @@ -2303,12 +2436,14 @@ CONFIG_PINCTRL_MESON_AXG=y CONFIG_PINCTRL_MESON_AXG_PMX=y CONFIG_PINCTRL_MESON_G12A=y CONFIG_PINCTRL_MESON_A1=y -# CONFIG_PINCTRL_EQUILIBRIUM is not set CONFIG_GPIOLIB=y CONFIG_GPIOLIB_FASTPATH_LIMIT=512 CONFIG_OF_GPIO=y +CONFIG_GPIOLIB_IRQCHIP=y # CONFIG_DEBUG_GPIO is not set CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_CDEV=y +CONFIG_GPIO_CDEV_V1=y CONFIG_GPIO_GENERIC=y # @@ -2342,6 +2477,8 @@ CONFIG_GPIO_GENERIC_PLATFORM=y # CONFIG_GPIO_MAX7300 is not set # CONFIG_GPIO_MAX732X is not set CONFIG_GPIO_PCA953X=m +# CONFIG_GPIO_PCA953X_IRQ is not set +# CONFIG_GPIO_PCA9570 is not set # CONFIG_GPIO_PCF857X is not set # CONFIG_GPIO_TPIC2810 is not set # end of I2C GPIO expanders @@ -2349,7 +2486,6 @@ CONFIG_GPIO_PCA953X=m # # MFD GPIO expanders # -# CONFIG_GPIO_ARIZONA is not set # end of MFD GPIO expanders # @@ -2368,14 +2504,20 @@ CONFIG_GPIO_PCA953X=m # # end of USB GPIO expanders +# +# Virtual GPIO drivers +# +# CONFIG_GPIO_AGGREGATOR is not set # CONFIG_GPIO_MOCKUP is not set +# end of Virtual GPIO drivers + # CONFIG_W1 is not set -# CONFIG_POWER_AVS is not set CONFIG_POWER_RESET=y # CONFIG_POWER_RESET_BRCMSTB is not set CONFIG_POWER_RESET_GPIO=y CONFIG_POWER_RESET_GPIO_RESTART=y # CONFIG_POWER_RESET_LTC2952 is not set +# CONFIG_POWER_RESET_REGULATOR is not set # CONFIG_POWER_RESET_RESTART is not set # CONFIG_POWER_RESET_XGENE is not set CONFIG_POWER_RESET_SYSCON=y @@ -2384,15 +2526,15 @@ CONFIG_POWER_RESET_SYSCON=y # CONFIG_NVMEM_REBOOT_MODE is not set CONFIG_POWER_SUPPLY=y # CONFIG_POWER_SUPPLY_DEBUG is not set -# CONFIG_POWER_SUPPLY_HWMON is not set +CONFIG_POWER_SUPPLY_HWMON=y # CONFIG_PDA_POWER is not set # CONFIG_GENERIC_ADC_BATTERY is not set # CONFIG_TEST_POWER is not set # CONFIG_CHARGER_ADP5061 is not set +# CONFIG_BATTERY_CW2015 is not set # CONFIG_BATTERY_DS2780 is not set # CONFIG_BATTERY_DS2781 is not set # CONFIG_BATTERY_DS2782 is not set -# CONFIG_BATTERY_LEGO_EV3 is not set # CONFIG_BATTERY_SBS is not set # CONFIG_CHARGER_SBS is not set # CONFIG_MANAGER_SBS is not set @@ -2409,11 +2551,14 @@ CONFIG_POWER_SUPPLY=y # CONFIG_CHARGER_BQ24190 is not set # CONFIG_CHARGER_BQ24257 is not set # CONFIG_CHARGER_BQ24735 is not set +# CONFIG_CHARGER_BQ2515X is not set # CONFIG_CHARGER_BQ25890 is not set +# CONFIG_CHARGER_BQ25980 is not set # CONFIG_CHARGER_SMB347 is not set # CONFIG_BATTERY_GAUGE_LTC2941 is not set # CONFIG_CHARGER_RT9455 is not set # CONFIG_CHARGER_UCS1002 is not set +# CONFIG_CHARGER_BD99954 is not set CONFIG_HWMON=y # CONFIG_HWMON_DEBUG_CHIP is not set @@ -2442,6 +2587,9 @@ CONFIG_HWMON=y CONFIG_SENSORS_ARM_SCPI=y # CONFIG_SENSORS_ASPEED is not set # CONFIG_SENSORS_ATXP1 is not set +# CONFIG_SENSORS_CORSAIR_CPRO is not set +# CONFIG_SENSORS_CORSAIR_PSU is not set +# CONFIG_SENSORS_DRIVETEMP is not set # CONFIG_SENSORS_DS620 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_F71805F is not set @@ -2463,6 +2611,7 @@ CONFIG_SENSORS_GPIO_FAN=m # CONFIG_SENSORS_LTC2947_I2C is not set # CONFIG_SENSORS_LTC2947_SPI is not set # CONFIG_SENSORS_LTC2990 is not set +# CONFIG_SENSORS_LTC2992 is not set # CONFIG_SENSORS_LTC4151 is not set # CONFIG_SENSORS_LTC4215 is not set # CONFIG_SENSORS_LTC4222 is not set @@ -2470,6 +2619,7 @@ CONFIG_SENSORS_GPIO_FAN=m # CONFIG_SENSORS_LTC4260 is not set # CONFIG_SENSORS_LTC4261 is not set # CONFIG_SENSORS_MAX1111 is not set +# CONFIG_SENSORS_MAX127 is not set # CONFIG_SENSORS_MAX16065 is not set # CONFIG_SENSORS_MAX1619 is not set # CONFIG_SENSORS_MAX1668 is not set @@ -2484,6 +2634,7 @@ CONFIG_SENSORS_GPIO_FAN=m # CONFIG_SENSORS_MAX31790 is not set # CONFIG_SENSORS_MCP3021 is not set # CONFIG_SENSORS_TC654 is not set +# CONFIG_SENSORS_MR75203 is not set # CONFIG_SENSORS_ADCXX is not set # CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM70 is not set @@ -2513,6 +2664,7 @@ CONFIG_SENSORS_GPIO_FAN=m # CONFIG_SENSORS_PCF8591 is not set # CONFIG_PMBUS is not set CONFIG_SENSORS_PWM_FAN=m +# CONFIG_SENSORS_SBTSI is not set # CONFIG_SENSORS_SHT15 is not set # CONFIG_SENSORS_SHT21 is not set # CONFIG_SENSORS_SHT3x is not set @@ -2555,6 +2707,7 @@ CONFIG_SENSORS_PWM_FAN=m # CONFIG_SENSORS_W83627HF is not set # CONFIG_SENSORS_W83627EHF is not set CONFIG_THERMAL=y +# CONFIG_THERMAL_NETLINK is not set # CONFIG_THERMAL_STATISTICS is not set CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 CONFIG_THERMAL_HWMON=y @@ -2568,13 +2721,12 @@ CONFIG_THERMAL_GOV_STEP_WISE=y # CONFIG_THERMAL_GOV_BANG_BANG is not set # CONFIG_THERMAL_GOV_USER_SPACE is not set # CONFIG_CPU_THERMAL is not set -# CONFIG_CLOCK_THERMAL is not set -# CONFIG_DEVFREQ_THERMAL is not set +CONFIG_DEVFREQ_THERMAL=y # CONFIG_THERMAL_EMULATION is not set # CONFIG_THERMAL_MMIO is not set -# CONFIG_QORIQ_THERMAL is not set CONFIG_AMLOGIC_THERMAL=y # CONFIG_GENERIC_ADC_THERMAL is not set +CONFIG_KHADAS_MCU_FAN_THERMAL=m CONFIG_WATCHDOG=y CONFIG_WATCHDOG_CORE=y # CONFIG_WATCHDOG_NOWAYOUT is not set @@ -2601,6 +2753,7 @@ CONFIG_WATCHDOG_OPEN_TIMEOUT=0 # CONFIG_MAX63XX_WATCHDOG is not set CONFIG_MESON_GXBB_WATCHDOG=y CONFIG_MESON_WATCHDOG=y +# CONFIG_ARM_SMC_WATCHDOG is not set # CONFIG_MEN_A21_WDT is not set # @@ -2644,8 +2797,10 @@ CONFIG_MFD_CORE=y # CONFIG_MFD_DA9063 is not set # CONFIG_MFD_DA9150 is not set # CONFIG_MFD_DLN2 is not set +# CONFIG_MFD_GATEWORKS_GSC is not set # CONFIG_MFD_MC13XXX_SPI is not set # CONFIG_MFD_MC13XXX_I2C is not set +# CONFIG_MFD_MP2629 is not set # CONFIG_MFD_HI6421_PMIC is not set # CONFIG_HTC_PASIC3 is not set # CONFIG_HTC_I2CPLD is not set @@ -2664,6 +2819,7 @@ CONFIG_MFD_CORE=y # CONFIG_MFD_MAX8925 is not set # CONFIG_MFD_MAX8997 is not set # CONFIG_MFD_MAX8998 is not set +# CONFIG_MFD_MT6360 is not set # CONFIG_MFD_MT6397 is not set # CONFIG_MFD_MENF21BMC is not set # CONFIG_EZX_PCAP is not set @@ -2679,7 +2835,6 @@ CONFIG_MFD_SEC_CORE=y # CONFIG_MFD_SI476X_CORE is not set # CONFIG_MFD_SM501 is not set # CONFIG_MFD_SKY81452 is not set -# CONFIG_MFD_SMSC is not set # CONFIG_ABX500_CORE is not set # CONFIG_MFD_STMPE is not set CONFIG_MFD_SYSCON=y @@ -2709,14 +2864,8 @@ CONFIG_MFD_SYSCON=y # CONFIG_MFD_TC3589X is not set # CONFIG_MFD_TQMX86 is not set # CONFIG_MFD_LOCHNAGAR is not set -CONFIG_MFD_ARIZONA=y -CONFIG_MFD_ARIZONA_I2C=m -CONFIG_MFD_ARIZONA_SPI=m -# CONFIG_MFD_CS47L24 is not set -CONFIG_MFD_WM5102=y -# CONFIG_MFD_WM5110 is not set -# CONFIG_MFD_WM8997 is not set -# CONFIG_MFD_WM8998 is not set +# CONFIG_MFD_ARIZONA_I2C is not set +# CONFIG_MFD_ARIZONA_SPI is not set # CONFIG_MFD_WM8400 is not set # CONFIG_MFD_WM831X_I2C is not set # CONFIG_MFD_WM831X_SPI is not set @@ -2727,7 +2876,9 @@ CONFIG_MFD_WM5102=y # CONFIG_MFD_ROHM_BD71828 is not set # CONFIG_MFD_STPMIC1 is not set # CONFIG_MFD_STMFX is not set +CONFIG_MFD_KHADAS_MCU=m # CONFIG_RAVE_SP_CORE is not set +# CONFIG_MFD_INTEL_M10_BMC is not set # end of Multifunction device drivers CONFIG_REGULATOR=y @@ -2738,11 +2889,11 @@ CONFIG_REGULATOR_FIXED_VOLTAGE=y # CONFIG_REGULATOR_88PG86X is not set # CONFIG_REGULATOR_ACT8865 is not set # CONFIG_REGULATOR_AD5398 is not set -# CONFIG_REGULATOR_ARIZONA_LDO1 is not set -# CONFIG_REGULATOR_ARIZONA_MICSUPP is not set +# CONFIG_REGULATOR_DA9121 is not set # CONFIG_REGULATOR_DA9210 is not set # CONFIG_REGULATOR_DA9211 is not set # CONFIG_REGULATOR_FAN53555 is not set +# CONFIG_REGULATOR_FAN53880 is not set CONFIG_REGULATOR_GPIO=y # CONFIG_REGULATOR_ISL9305 is not set # CONFIG_REGULATOR_ISL6271A is not set @@ -2757,25 +2908,33 @@ CONFIG_REGULATOR_GPIO=y # CONFIG_REGULATOR_MAX8660 is not set # CONFIG_REGULATOR_MAX8952 is not set # CONFIG_REGULATOR_MAX8973 is not set +# CONFIG_REGULATOR_MAX77826 is not set # CONFIG_REGULATOR_MCP16502 is not set # CONFIG_REGULATOR_MP5416 is not set # CONFIG_REGULATOR_MP8859 is not set # CONFIG_REGULATOR_MP886X is not set # CONFIG_REGULATOR_MPQ7920 is not set # CONFIG_REGULATOR_MT6311 is not set +# CONFIG_REGULATOR_PCA9450 is not set +# CONFIG_REGULATOR_PF8X00 is not set # CONFIG_REGULATOR_PFUZE100 is not set # CONFIG_REGULATOR_PV88060 is not set # CONFIG_REGULATOR_PV88080 is not set # CONFIG_REGULATOR_PV88090 is not set CONFIG_REGULATOR_PWM=y # CONFIG_REGULATOR_QCOM_SPMI is not set +# CONFIG_REGULATOR_QCOM_USB_VBUS is not set +# CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY is not set # CONFIG_REGULATOR_RK808 is not set +# CONFIG_REGULATOR_RT4801 is not set +# CONFIG_REGULATOR_RTMV20 is not set # CONFIG_REGULATOR_S2MPA01 is not set # CONFIG_REGULATOR_S2MPS11 is not set # CONFIG_REGULATOR_S5M8767 is not set # CONFIG_REGULATOR_SLG51000 is not set # CONFIG_REGULATOR_SY8106A is not set # CONFIG_REGULATOR_SY8824X is not set +# CONFIG_REGULATOR_SY8827N is not set # CONFIG_REGULATOR_TPS51632 is not set # CONFIG_REGULATOR_TPS62360 is not set # CONFIG_REGULATOR_TPS65023 is not set @@ -2783,8 +2942,7 @@ CONFIG_REGULATOR_PWM=y # CONFIG_REGULATOR_TPS65132 is not set # CONFIG_REGULATOR_TPS6524X is not set # CONFIG_REGULATOR_VCTRL is not set -CONFIG_CEC_CORE=y -CONFIG_CEC_NOTIFIER=y +# CONFIG_REGULATOR_QCOM_LABIBB is not set CONFIG_RC_CORE=y CONFIG_RC_MAP=m CONFIG_LIRC=y @@ -2821,43 +2979,76 @@ CONFIG_IR_PWM_TX=m # CONFIG_IR_SERIAL is not set # CONFIG_IR_SIR is not set CONFIG_RC_XBOX_DVD=m +# CONFIG_IR_TOY is not set +CONFIG_CEC_CORE=y +CONFIG_CEC_NOTIFIER=y +# CONFIG_MEDIA_CEC_RC is not set +CONFIG_MEDIA_CEC_SUPPORT=y +# CONFIG_CEC_CH7322 is not set +CONFIG_CEC_MESON_AO=y +CONFIG_CEC_MESON_G12A_AO=y +# CONFIG_CEC_GPIO is not set +# CONFIG_USB_PULSE8_CEC is not set +# CONFIG_USB_RAINSHADOW_CEC is not set CONFIG_MEDIA_SUPPORT=y +# CONFIG_MEDIA_SUPPORT_FILTER is not set +CONFIG_MEDIA_SUBDRV_AUTOSELECT=y # -# Multimedia core support +# Media device types # CONFIG_MEDIA_CAMERA_SUPPORT=y CONFIG_MEDIA_ANALOG_TV_SUPPORT=y CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y CONFIG_MEDIA_RADIO_SUPPORT=y -# CONFIG_MEDIA_SDR_SUPPORT is not set -CONFIG_MEDIA_CEC_SUPPORT=y -# CONFIG_MEDIA_CEC_RC is not set -CONFIG_MEDIA_CONTROLLER=y -CONFIG_MEDIA_CONTROLLER_DVB=y -CONFIG_MEDIA_CONTROLLER_REQUEST_API=y +CONFIG_MEDIA_SDR_SUPPORT=y +CONFIG_MEDIA_PLATFORM_SUPPORT=y +CONFIG_MEDIA_TEST_SUPPORT=y +# end of Media device types + +# +# Media core support +# CONFIG_VIDEO_DEV=y -CONFIG_VIDEO_V4L2_SUBDEV_API=y +CONFIG_MEDIA_CONTROLLER=y +CONFIG_DVB_CORE=y +# end of Media core support + +# +# Video4Linux options +# CONFIG_VIDEO_V4L2=y CONFIG_VIDEO_V4L2_I2C=y +CONFIG_VIDEO_V4L2_SUBDEV_API=y # CONFIG_VIDEO_ADV_DEBUG is not set # CONFIG_VIDEO_FIXED_MINOR_RANGES is not set CONFIG_VIDEO_TUNER=m -CONFIG_V4L2_MEM2MEM_DEV=m +CONFIG_V4L2_MEM2MEM_DEV=y CONFIG_VIDEOBUF_GEN=m CONFIG_VIDEOBUF_VMALLOC=m -CONFIG_DVB_CORE=y +# end of Video4Linux options + +# +# Media controller options +# +CONFIG_MEDIA_CONTROLLER_DVB=y +# end of Media controller options + +# +# Digital TV options +# # CONFIG_DVB_MMAP is not set CONFIG_DVB_NET=y -CONFIG_TTPCI_EEPROM=m CONFIG_DVB_MAX_ADAPTERS=8 # CONFIG_DVB_DYNAMIC_MINORS is not set # CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set # CONFIG_DVB_ULE_DEBUG is not set +# end of Digital TV options # # Media drivers # +CONFIG_TTPCI_EEPROM=m CONFIG_MEDIA_USB_SUPPORT=y # @@ -2959,24 +3150,11 @@ CONFIG_VIDEO_EM28XX_DVB=m CONFIG_VIDEO_EM28XX_RC=m # -# USB HDMI CEC adapters -# -# CONFIG_USB_PULSE8_CEC is not set -# CONFIG_USB_RAINSHADOW_CEC is not set -# CONFIG_V4L_PLATFORM_DRIVERS is not set -CONFIG_V4L_MEM2MEM_DRIVERS=y -CONFIG_VIDEO_MEM2MEM_DEINTERLACE=m -# CONFIG_VIDEO_SH_VEU is not set -# CONFIG_V4L_TEST_DRIVERS is not set -# CONFIG_DVB_PLATFORM_DRIVERS is not set -CONFIG_CEC_PLATFORM_DRIVERS=y -CONFIG_VIDEO_MESON_AO_CEC=m -CONFIG_VIDEO_MESON_G12A_AO_CEC=m - -# -# Supported MMC/SDIO adapters +# Software defined radio USB devices # -# CONFIG_SMS_SDIO_DRV is not set +# CONFIG_USB_AIRSPY is not set +# CONFIG_USB_HACKRF is not set +# CONFIG_USB_MSI2500 is not set # CONFIG_RADIO_ADAPTERS is not set CONFIG_MEDIA_COMMON_OPTIONS=y @@ -2986,25 +3164,38 @@ CONFIG_MEDIA_COMMON_OPTIONS=y CONFIG_VIDEO_CX2341X=m CONFIG_VIDEO_TVEEPROM=m CONFIG_CYPRESS_FIRMWARE=m -CONFIG_VIDEOBUF2_CORE=m -CONFIG_VIDEOBUF2_V4L2=m -CONFIG_VIDEOBUF2_MEMOPS=m -CONFIG_VIDEOBUF2_DMA_CONTIG=m +CONFIG_VIDEOBUF2_CORE=y +CONFIG_VIDEOBUF2_V4L2=y +CONFIG_VIDEOBUF2_MEMOPS=y +CONFIG_VIDEOBUF2_DMA_CONTIG=y CONFIG_VIDEOBUF2_VMALLOC=m CONFIG_DVB_B2C2_FLEXCOP=m CONFIG_SMS_SIANO_MDTV=m CONFIG_SMS_SIANO_RC=y +# CONFIG_V4L_PLATFORM_DRIVERS is not set +CONFIG_V4L_MEM2MEM_DRIVERS=y +CONFIG_VIDEO_MEM2MEM_DEINTERLACE=m +# CONFIG_VIDEO_MESON_GE2D is not set +# CONFIG_DVB_PLATFORM_DRIVERS is not set +# CONFIG_SDR_PLATFORM_DRIVERS is not set # -# Media ancillary drivers (tuners, sensors, i2c, spi, frontends) +# MMC/SDIO DVB adapters +# +# CONFIG_SMS_SDIO_DRV is not set +# CONFIG_V4L_TEST_DRIVERS is not set +# CONFIG_DVB_TEST_DRIVERS is not set +# end of Media drivers + +# +# Media ancillary drivers # -CONFIG_MEDIA_SUBDRV_AUTOSELECT=y CONFIG_MEDIA_ATTACH=y -CONFIG_VIDEO_IR_I2C=m # -# I2C Encoders, decoders, sensors and other helper chips +# IR I2C driver auto-selected by 'Autoselect ancillary drivers' # +CONFIG_VIDEO_IR_I2C=m # # Audio decoders, processors and mixers @@ -3025,11 +3216,13 @@ CONFIG_VIDEO_WM8775=m # CONFIG_VIDEO_WM8739 is not set # CONFIG_VIDEO_VP27SMPX is not set # CONFIG_VIDEO_SONY_BTF_MPX is not set +# end of Audio decoders, processors and mixers # # RDS decoders # # CONFIG_VIDEO_SAA6588 is not set +# end of RDS decoders # # Video decoders @@ -3055,12 +3248,14 @@ CONFIG_VIDEO_SAA711X=m # CONFIG_VIDEO_TW9906 is not set # CONFIG_VIDEO_TW9910 is not set # CONFIG_VIDEO_VPX3220 is not set +# CONFIG_VIDEO_MAX9286 is not set # # Video and audio decoders # # CONFIG_VIDEO_SAA717X is not set CONFIG_VIDEO_CX25840=m +# end of Video decoders # # Video encoders @@ -3075,17 +3270,48 @@ CONFIG_VIDEO_CX25840=m # CONFIG_VIDEO_AD9389B is not set # CONFIG_VIDEO_AK881X is not set # CONFIG_VIDEO_THS8200 is not set +# end of Video encoders + +# +# Video improvement chips +# +# CONFIG_VIDEO_UPD64031A is not set +# CONFIG_VIDEO_UPD64083 is not set +# end of Video improvement chips + +# +# Audio/Video compression chips +# +# CONFIG_VIDEO_SAA6752HS is not set +# end of Audio/Video compression chips + +# +# SDR tuner chips +# +# CONFIG_SDR_MAX2175 is not set +# end of SDR tuner chips + +# +# Miscellaneous helper chips +# +# CONFIG_VIDEO_THS7303 is not set +# CONFIG_VIDEO_M52790 is not set +# CONFIG_VIDEO_I2C is not set +# CONFIG_VIDEO_ST_MIPID02 is not set +# end of Miscellaneous helper chips # # Camera sensor devices # # CONFIG_VIDEO_HI556 is not set +# CONFIG_VIDEO_IMX214 is not set # CONFIG_VIDEO_IMX219 is not set # CONFIG_VIDEO_IMX258 is not set # CONFIG_VIDEO_IMX274 is not set # CONFIG_VIDEO_IMX290 is not set # CONFIG_VIDEO_IMX319 is not set # CONFIG_VIDEO_IMX355 is not set +# CONFIG_VIDEO_OV02A10 is not set # CONFIG_VIDEO_OV2640 is not set # CONFIG_VIDEO_OV2659 is not set # CONFIG_VIDEO_OV2680 is not set @@ -3119,14 +3345,16 @@ CONFIG_VIDEO_CX25840=m # CONFIG_VIDEO_SR030PC30 is not set # CONFIG_VIDEO_NOON010PC30 is not set # CONFIG_VIDEO_M5MOLS is not set +# CONFIG_VIDEO_RDACM20 is not set # CONFIG_VIDEO_RJ54N1 is not set # CONFIG_VIDEO_S5K6AA is not set # CONFIG_VIDEO_S5K6A3 is not set # CONFIG_VIDEO_S5K4ECGX is not set # CONFIG_VIDEO_S5K5BAF is not set -# CONFIG_VIDEO_SMIAPP is not set +# CONFIG_VIDEO_CCS is not set # CONFIG_VIDEO_ET8EK8 is not set # CONFIG_VIDEO_S5C73M3 is not set +# end of Camera sensor devices # # Lens drivers @@ -3134,7 +3362,9 @@ CONFIG_VIDEO_CX25840=m # CONFIG_VIDEO_AD5820 is not set # CONFIG_VIDEO_AK7375 is not set # CONFIG_VIDEO_DW9714 is not set +# CONFIG_VIDEO_DW9768 is not set # CONFIG_VIDEO_DW9807_VCM is not set +# end of Lens drivers # # Flash devices @@ -3142,30 +3372,7 @@ CONFIG_VIDEO_CX25840=m # CONFIG_VIDEO_ADP1653 is not set # CONFIG_VIDEO_LM3560 is not set # CONFIG_VIDEO_LM3646 is not set - -# -# Video improvement chips -# -# CONFIG_VIDEO_UPD64031A is not set -# CONFIG_VIDEO_UPD64083 is not set - -# -# Audio/Video compression chips -# -# CONFIG_VIDEO_SAA6752HS is not set - -# -# SDR tuner chips -# - -# -# Miscellaneous helper chips -# -# CONFIG_VIDEO_THS7303 is not set -# CONFIG_VIDEO_M52790 is not set -# CONFIG_VIDEO_I2C is not set -# CONFIG_VIDEO_ST_MIPID02 is not set -# end of I2C Encoders, decoders, sensors and other helper chips +# end of Flash devices # # SPI helper chips @@ -3306,6 +3513,7 @@ CONFIG_DVB_CXD2820R=m CONFIG_DVB_CXD2841ER=m CONFIG_DVB_RTL2830=m CONFIG_DVB_RTL2832=m +CONFIG_DVB_RTL2832_SDR=m CONFIG_DVB_SI2168=m CONFIG_DVB_AS102_FE=m CONFIG_DVB_ZD1301_DEMOD=m @@ -3385,12 +3593,13 @@ CONFIG_DVB_AF9033=m # # CONFIG_DVB_CXD2099 is not set CONFIG_DVB_SP2=m +# end of Customise DVB Frontends # # Tools to develop new frontends # CONFIG_DVB_DUMMY_FE=m -# end of Customise DVB Frontends +# end of Media ancillary drivers # # Graphics support @@ -3434,12 +3643,12 @@ CONFIG_DRM_SCHED=m # CONFIG_DRM_UDL is not set # CONFIG_DRM_RCAR_DW_HDMI is not set # CONFIG_DRM_RCAR_LVDS is not set -CONFIG_DRM_RCAR_WRITEBACK=y CONFIG_DRM_PANEL=y # # Display Panels # +# CONFIG_DRM_PANEL_ABT_Y030XX067A is not set # CONFIG_DRM_PANEL_ARM_VERSATILE is not set # CONFIG_DRM_PANEL_LVDS is not set # CONFIG_DRM_PANEL_SIMPLE is not set @@ -3469,9 +3678,13 @@ CONFIG_DRM_PANEL_BRIDGE=y # Display Interface Bridges # # CONFIG_DRM_CDNS_DSI is not set +# CONFIG_DRM_CHRONTEL_CH7033 is not set CONFIG_DRM_DISPLAY_CONNECTOR=y +# CONFIG_DRM_LONTIUM_LT9611 is not set +# CONFIG_DRM_LONTIUM_LT9611UXC is not set # CONFIG_DRM_LVDS_CODEC is not set # CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set +# CONFIG_DRM_NWL_MIPI_DSI is not set # CONFIG_DRM_NXP_PTN3460 is not set # CONFIG_DRM_PARADE_PS8622 is not set # CONFIG_DRM_PARADE_PS8640 is not set @@ -3480,19 +3693,23 @@ CONFIG_DRM_DISPLAY_CONNECTOR=y # CONFIG_DRM_SII9234 is not set # CONFIG_DRM_SIMPLE_BRIDGE is not set # CONFIG_DRM_THINE_THC63LVD1024 is not set +# CONFIG_DRM_TOSHIBA_TC358762 is not set # CONFIG_DRM_TOSHIBA_TC358764 is not set # CONFIG_DRM_TOSHIBA_TC358767 is not set # CONFIG_DRM_TOSHIBA_TC358768 is not set +# CONFIG_DRM_TOSHIBA_TC358775 is not set # CONFIG_DRM_TI_TFP410 is not set # CONFIG_DRM_TI_SN65DSI86 is not set # CONFIG_DRM_TI_TPD12S015 is not set # CONFIG_DRM_ANALOGIX_ANX6345 is not set # CONFIG_DRM_ANALOGIX_ANX78XX is not set +# CONFIG_DRM_ANALOGIX_ANX7625 is not set # CONFIG_DRM_I2C_ADV7511 is not set +# CONFIG_DRM_CDNS_MHDP8546 is not set CONFIG_DRM_DW_HDMI=y # CONFIG_DRM_DW_HDMI_AHB_AUDIO is not set CONFIG_DRM_DW_HDMI_I2S_AUDIO=y -# CONFIG_DRM_DW_HDMI_CEC is not set +CONFIG_DRM_DW_HDMI_CEC=y # end of Display Interface Bridges # CONFIG_DRM_ETNAVIV is not set @@ -3539,7 +3756,7 @@ CONFIG_FB_MODE_HELPERS=y # # Frame buffer hardware drivers # -CONFIG_FB_ARMCLCD=y +# CONFIG_FB_ARMCLCD is not set # CONFIG_FB_OPENCORES is not set # CONFIG_FB_S1D13XXX is not set # CONFIG_FB_SMSCUFX is not set @@ -3556,7 +3773,7 @@ CONFIG_FB_SIMPLE=y # # CONFIG_LCD_CLASS_DEVICE is not set CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_BACKLIGHT_GENERIC is not set +# CONFIG_BACKLIGHT_KTD253 is not set # CONFIG_BACKLIGHT_PWM is not set # CONFIG_BACKLIGHT_QCOM_WLED is not set # CONFIG_BACKLIGHT_ADP8860 is not set @@ -3604,7 +3821,7 @@ CONFIG_SND_PCM_TIMER=y # CONFIG_SND_HRTIMER is not set CONFIG_SND_DYNAMIC_MINORS=y CONFIG_SND_MAX_CARDS=32 -# CONFIG_SND_SUPPORT_OLD_API is not set +CONFIG_SND_SUPPORT_OLD_API=y CONFIG_SND_PROC_FS=y CONFIG_SND_VERBOSE_PROCFS=y # CONFIG_SND_VERBOSE_PRINTK is not set @@ -3618,7 +3835,7 @@ CONFIG_SND_VMASTER=y # # end of HD-Audio -CONFIG_SND_HDA_PREALLOC_SIZE=2048 +CONFIG_SND_HDA_PREALLOC_SIZE=64 CONFIG_SND_SPI=y CONFIG_SND_USB=y CONFIG_SND_USB_AUDIO=m @@ -3635,6 +3852,7 @@ CONFIG_SND_USB_PODHD=m CONFIG_SND_USB_TONEPORT=m CONFIG_SND_USB_VARIAX=m CONFIG_SND_SOC=y +# CONFIG_SND_SOC_ADI is not set # CONFIG_SND_SOC_AMD_ACP is not set # CONFIG_SND_ATMEL_SOC is not set # CONFIG_SND_BCM63XX_I2S_WHISTLER is not set @@ -3654,6 +3872,7 @@ CONFIG_SND_SOC=y # CONFIG_SND_SOC_FSL_SPDIF is not set # CONFIG_SND_SOC_FSL_ESAI is not set # CONFIG_SND_SOC_FSL_MICFIL is not set +# CONFIG_SND_SOC_FSL_XCVR is not set # CONFIG_SND_SOC_IMX_AUDMUX is not set # end of SoC Audio for Freescale CPUs @@ -3702,6 +3921,8 @@ CONFIG_SND_SOC_I2C_AND_SPI=y # CODEC drivers # # CONFIG_SND_SOC_AC97_CODEC is not set +# CONFIG_SND_SOC_ADAU1372_I2C is not set +# CONFIG_SND_SOC_ADAU1372_SPI is not set # CONFIG_SND_SOC_ADAU1701 is not set # CONFIG_SND_SOC_ADAU1761_I2C is not set # CONFIG_SND_SOC_ADAU1761_SPI is not set @@ -3729,6 +3950,7 @@ CONFIG_SND_SOC_I2C_AND_SPI=y # CONFIG_SND_SOC_CS42L52 is not set # CONFIG_SND_SOC_CS42L56 is not set # CONFIG_SND_SOC_CS42L73 is not set +# CONFIG_SND_SOC_CS4234 is not set # CONFIG_SND_SOC_CS4265 is not set # CONFIG_SND_SOC_CS4270 is not set # CONFIG_SND_SOC_CS4271_I2C is not set @@ -3754,7 +3976,8 @@ CONFIG_SND_SOC_MAX98357A=y # CONFIG_SND_SOC_MAX98504 is not set # CONFIG_SND_SOC_MAX9867 is not set # CONFIG_SND_SOC_MAX98927 is not set -# CONFIG_SND_SOC_MAX98373 is not set +# CONFIG_SND_SOC_MAX98373_I2C is not set +# CONFIG_SND_SOC_MAX98390 is not set # CONFIG_SND_SOC_MAX9860 is not set # CONFIG_SND_SOC_MSM8916_WCD_ANALOG is not set # CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set @@ -3768,6 +3991,7 @@ CONFIG_SND_SOC_MAX98357A=y # CONFIG_SND_SOC_PCM3060_SPI is not set # CONFIG_SND_SOC_PCM3168A_I2C is not set # CONFIG_SND_SOC_PCM3168A_SPI is not set +# CONFIG_SND_SOC_PCM5102A is not set # CONFIG_SND_SOC_PCM512x_I2C is not set # CONFIG_SND_SOC_PCM512x_SPI is not set # CONFIG_SND_SOC_RK3328 is not set @@ -3775,6 +3999,7 @@ CONFIG_SND_SOC_MAX98357A=y # CONFIG_SND_SOC_RT5631 is not set # CONFIG_SND_SOC_SGTL5000 is not set CONFIG_SND_SOC_SIMPLE_AMPLIFIER=y +# CONFIG_SND_SOC_SIMPLE_MUX is not set # CONFIG_SND_SOC_SIRF_AUDIO_CODEC is not set CONFIG_SND_SOC_SPDIF=y # CONFIG_SND_SOC_SSM2305 is not set @@ -3786,6 +4011,7 @@ CONFIG_SND_SOC_SPDIF=y # CONFIG_SND_SOC_STI_SAS is not set # CONFIG_SND_SOC_TAS2552 is not set # CONFIG_SND_SOC_TAS2562 is not set +# CONFIG_SND_SOC_TAS2764 is not set # CONFIG_SND_SOC_TAS2770 is not set # CONFIG_SND_SOC_TAS5086 is not set # CONFIG_SND_SOC_TAS571X is not set @@ -3827,21 +4053,25 @@ CONFIG_SND_SOC_SPDIF=y # CONFIG_SND_SOC_WM8974 is not set # CONFIG_SND_SOC_WM8978 is not set # CONFIG_SND_SOC_WM8985 is not set +# CONFIG_SND_SOC_ZL38060 is not set # CONFIG_SND_SOC_ZX_AUD96P22 is not set # CONFIG_SND_SOC_MAX9759 is not set # CONFIG_SND_SOC_MT6351 is not set # CONFIG_SND_SOC_MT6358 is not set # CONFIG_SND_SOC_MT6660 is not set +# CONFIG_SND_SOC_NAU8315 is not set # CONFIG_SND_SOC_NAU8540 is not set # CONFIG_SND_SOC_NAU8810 is not set # CONFIG_SND_SOC_NAU8822 is not set # CONFIG_SND_SOC_NAU8824 is not set # CONFIG_SND_SOC_TPA6130A2 is not set +# CONFIG_SND_SOC_LPASS_WSA_MACRO is not set +# CONFIG_SND_SOC_LPASS_VA_MACRO is not set # end of CODEC drivers -CONFIG_SND_SIMPLE_CARD_UTILS=m -CONFIG_SND_SIMPLE_CARD=m -# CONFIG_SND_AUDIO_GRAPH_CARD is not set +CONFIG_SND_SIMPLE_CARD_UTILS=y +CONFIG_SND_SIMPLE_CARD=y +CONFIG_SND_AUDIO_GRAPH_CARD=y # # HID support @@ -3886,6 +4116,7 @@ CONFIG_HID_EZKEY=y # CONFIG_HID_GFRM is not set # CONFIG_HID_GLORIOUS is not set # CONFIG_HID_HOLTEK is not set +# CONFIG_HID_VIVALDI is not set # CONFIG_HID_GT683R is not set # CONFIG_HID_KEYTOUCH is not set CONFIG_HID_KYE=y @@ -3984,10 +4215,11 @@ CONFIG_USB_ANNOUNCE_NEW_DEVICES=y # Miscellaneous USB options # CONFIG_USB_DEFAULT_PERSIST=y +# CONFIG_USB_FEW_INIT_RETRIES is not set # CONFIG_USB_DYNAMIC_MINORS is not set CONFIG_USB_OTG=y -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set +# CONFIG_USB_OTG_PRODUCTLIST is not set +# CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB is not set # CONFIG_USB_OTG_FSM is not set # CONFIG_USB_LEDS_TRIGGER_USBPORT is not set CONFIG_USB_AUTOSUSPEND_DELAY=2 @@ -3999,6 +4231,7 @@ CONFIG_USB_MON=m # CONFIG_USB_C67X00_HCD is not set CONFIG_USB_XHCI_HCD=y # CONFIG_USB_XHCI_DBGCAP is not set +# CONFIG_USB_XHCI_PCI_RENESAS is not set CONFIG_USB_XHCI_PLATFORM=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_ROOT_HUB_TT=y @@ -4126,7 +4359,6 @@ CONFIG_USB_SERIAL_PL2303=m # CONFIG_USB_SERIAL_SYMBOL is not set # CONFIG_USB_SERIAL_TI is not set # CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set # CONFIG_USB_SERIAL_OPTION is not set # CONFIG_USB_SERIAL_OMNINET is not set # CONFIG_USB_SERIAL_OPTICON is not set @@ -4233,6 +4465,7 @@ CONFIG_TYPEC_FUSB302=m # CONFIG_TYPEC_UCSI is not set # CONFIG_TYPEC_HD3SS3220 is not set # CONFIG_TYPEC_TPS6598X is not set +# CONFIG_TYPEC_STUSB160X is not set # # USB Type-C Multiplexer/DeMultiplexer Switch support @@ -4275,12 +4508,14 @@ CONFIG_MMC_SPI=y CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y # CONFIG_LEDS_CLASS_FLASH is not set +# CONFIG_LEDS_CLASS_MULTICOLOR is not set # CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set # # LED drivers # # CONFIG_LEDS_AN30259A is not set +# CONFIG_LEDS_AW2013 is not set # CONFIG_LEDS_BCM6328 is not set # CONFIG_LEDS_BCM6358 is not set # CONFIG_LEDS_CR0014114 is not set @@ -4293,15 +4528,13 @@ CONFIG_LEDS_CLASS=y CONFIG_LEDS_GPIO=y # CONFIG_LEDS_LP3944 is not set # CONFIG_LEDS_LP3952 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_LP8501 is not set +# CONFIG_LEDS_LP50XX is not set +# CONFIG_LEDS_LP55XX_COMMON is not set # CONFIG_LEDS_LP8860 is not set # CONFIG_LEDS_PCA955X is not set # CONFIG_LEDS_PCA963X is not set # CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_PWM is not set +CONFIG_LEDS_PWM=y # CONFIG_LEDS_REGULATOR is not set # CONFIG_LEDS_BD2802 is not set # CONFIG_LEDS_LT3593 is not set @@ -4327,12 +4560,14 @@ CONFIG_LEDS_SYSCON=y CONFIG_LEDS_TRIGGERS=y # CONFIG_LEDS_TRIGGER_TIMER is not set # CONFIG_LEDS_TRIGGER_ONESHOT is not set +# CONFIG_LEDS_TRIGGER_DISK is not set +# CONFIG_LEDS_TRIGGER_MTD is not set CONFIG_LEDS_TRIGGER_HEARTBEAT=y # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set CONFIG_LEDS_TRIGGER_CPU=y -# CONFIG_LEDS_TRIGGER_ACTIVITY is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set +CONFIG_LEDS_TRIGGER_ACTIVITY=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y # # iptables trigger is under Netfilter config (LED target) @@ -4346,6 +4581,7 @@ CONFIG_LEDS_TRIGGER_CPU=y # CONFIG_ACCESSIBILITY is not set # CONFIG_INFINIBAND is not set CONFIG_EDAC_SUPPORT=y +# CONFIG_EDAC is not set CONFIG_RTC_LIB=y CONFIG_RTC_CLASS=y CONFIG_RTC_HCTOSYS=y @@ -4395,6 +4631,7 @@ CONFIG_RTC_DRV_PCF8563=m # CONFIG_RTC_DRV_RX8025 is not set # CONFIG_RTC_DRV_EM3027 is not set # CONFIG_RTC_DRV_RV3028 is not set +# CONFIG_RTC_DRV_RV3032 is not set # CONFIG_RTC_DRV_RV8803 is not set # CONFIG_RTC_DRV_S5M is not set # CONFIG_RTC_DRV_SD3078 is not set @@ -4412,7 +4649,6 @@ CONFIG_RTC_DRV_PCF8563=m # CONFIG_RTC_DRV_MAX6916 is not set # CONFIG_RTC_DRV_R9701 is not set # CONFIG_RTC_DRV_RX4581 is not set -# CONFIG_RTC_DRV_RX6110 is not set # CONFIG_RTC_DRV_RS5C348 is not set # CONFIG_RTC_DRV_MAX6902 is not set # CONFIG_RTC_DRV_PCF2123 is not set @@ -4426,6 +4662,7 @@ CONFIG_RTC_DRV_DS3232=y CONFIG_RTC_DRV_DS3232_HWMON=y # CONFIG_RTC_DRV_PCF2127 is not set # CONFIG_RTC_DRV_RV3029C2 is not set +# CONFIG_RTC_DRV_RX6110 is not set # # Platform RTC drivers @@ -4459,6 +4696,7 @@ CONFIG_RTC_DRV_PL031=y # # HID Sensor RTC drivers # +# CONFIG_RTC_DRV_GOLDFISH is not set # CONFIG_DMADEVICES is not set # @@ -4479,7 +4717,7 @@ CONFIG_DMABUF_HEAPS_CMA=y # CONFIG_VFIO is not set # CONFIG_VIRT_DRIVERS is not set # CONFIG_VIRTIO_MENU is not set -# CONFIG_VDPA_MENU is not set +# CONFIG_VDPA is not set # CONFIG_VHOST_MENU is not set # @@ -4554,19 +4792,8 @@ CONFIG_STAGING=y # end of Resolver to digital converters # end of IIO staging drivers -# -# Speakup console speech -# -# CONFIG_SPEAKUP is not set -# end of Speakup console speech - CONFIG_STAGING_MEDIA=y -CONFIG_VIDEO_MESON_VDEC=m - -# -# soc_camera sensor drivers -# -CONFIG_VIDEO_USBVISION=m +CONFIG_VIDEO_MESON_VDEC=y # # Android @@ -4577,10 +4804,7 @@ CONFIG_VIDEO_USBVISION=m # CONFIG_LTE_GDM724X is not set # CONFIG_GS_FPGABOOT is not set # CONFIG_UNISYSSPAR is not set -# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set # CONFIG_FB_TFT is not set -# CONFIG_WILC1000_SDIO is not set -# CONFIG_WILC1000_SPI is not set # CONFIG_KS7010 is not set # CONFIG_PI433 is not set @@ -4591,21 +4815,18 @@ CONFIG_VIDEO_USBVISION=m # CONFIG_XIL_AXIS_FIFO is not set # CONFIG_FIELDBUS_DEV is not set +# CONFIG_WIMAX is not set # CONFIG_WFX is not set +# CONFIG_SPMI_HISI3670 is not set +# CONFIG_MFD_HI6421_SPMI is not set # CONFIG_GOLDFISH is not set -# CONFIG_MFD_CROS_EC is not set # CONFIG_CHROME_PLATFORMS is not set # CONFIG_MELLANOX_PLATFORM is not set +CONFIG_SURFACE_PLATFORMS=y +CONFIG_HAVE_CLK=y CONFIG_CLKDEV_LOOKUP=y CONFIG_HAVE_CLK_PREPARE=y CONFIG_COMMON_CLK=y - -# -# Common Clock Framework -# -CONFIG_COMMON_CLK_VERSATILE=y -CONFIG_CLK_SP810=y -# CONFIG_CLK_HSDK is not set # CONFIG_COMMON_CLK_MAX9485 is not set CONFIG_COMMON_CLK_RK808=y CONFIG_COMMON_CLK_SCPI=y @@ -4616,13 +4837,16 @@ CONFIG_COMMON_CLK_SCPI=y # CONFIG_COMMON_CLK_SI570 is not set # CONFIG_COMMON_CLK_CDCE706 is not set # CONFIG_COMMON_CLK_CDCE925 is not set -CONFIG_COMMON_CLK_CS2000_CP=y -CONFIG_COMMON_CLK_S2MPS11=y -CONFIG_CLK_QORIQ=y -CONFIG_COMMON_CLK_XGENE=y +# CONFIG_COMMON_CLK_CS2000_CP is not set +# CONFIG_COMMON_CLK_S2MPS11 is not set +# CONFIG_COMMON_CLK_XGENE is not set CONFIG_COMMON_CLK_PWM=y # CONFIG_COMMON_CLK_VC5 is not set CONFIG_COMMON_CLK_FIXED_MMIO=y + +# +# Clock support for Amlogic platforms +# CONFIG_COMMON_CLK_MESON_REGMAP=y CONFIG_COMMON_CLK_MESON_DUALDIV=y CONFIG_COMMON_CLK_MESON_MPLL=y @@ -4637,7 +4861,7 @@ CONFIG_COMMON_CLK_GXBB=y CONFIG_COMMON_CLK_AXG=y CONFIG_COMMON_CLK_AXG_AUDIO=y CONFIG_COMMON_CLK_G12A=y -# end of Common Clock Framework +# end of Clock support for Amlogic platforms # CONFIG_HWSPINLOCK is not set @@ -4651,12 +4875,13 @@ CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y CONFIG_FSL_ERRATUM_A008585=y # CONFIG_HISILICON_ERRATUM_161010101 is not set -# CONFIG_ARM64_ERRATUM_858921 is not set +CONFIG_ARM64_ERRATUM_858921=y # CONFIG_MICROCHIP_PIT64B is not set # end of Clock Source drivers CONFIG_MAILBOX=y CONFIG_ARM_MHU=y +# CONFIG_ARM_MHU_V2 is not set CONFIG_PLATFORM_MHU=y # CONFIG_PL320_MBOX is not set # CONFIG_ALTERA_MBOX is not set @@ -4709,14 +4934,8 @@ CONFIG_MESON_GX_SOCINFO=y CONFIG_MESON_GX_PM_DOMAINS=y CONFIG_MESON_EE_PM_DOMAINS=y CONFIG_MESON_SECURE_PM_DOMAINS=y -CONFIG_MESON_MX_SOCINFO=y # end of Amlogic SoC drivers -# -# Aspeed SoC drivers -# -# end of Aspeed SoC drivers - # # Broadcom SoC drivers # @@ -4735,6 +4954,12 @@ CONFIG_MESON_MX_SOCINFO=y # # end of i.MX SoC drivers +# +# Enable LiteX SoC Builder specific drivers +# +# CONFIG_LITEX_SOC_CONTROLLER is not set +# end of Enable LiteX SoC Builder specific drivers + # # Qualcomm SoC drivers # @@ -4756,7 +4981,7 @@ CONFIG_PM_DEVFREQ=y # CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=m CONFIG_DEVFREQ_GOV_PERFORMANCE=m -CONFIG_DEVFREQ_GOV_POWERSAVE=m +# CONFIG_DEVFREQ_GOV_POWERSAVE is not set # CONFIG_DEVFREQ_GOV_USERSPACE is not set # CONFIG_DEVFREQ_GOV_PASSIVE is not set @@ -4770,7 +4995,6 @@ CONFIG_EXTCON=y # Extcon Device Drivers # # CONFIG_EXTCON_ADC_JACK is not set -# CONFIG_EXTCON_ARIZONA is not set # CONFIG_EXTCON_FSA9480 is not set # CONFIG_EXTCON_GPIO is not set # CONFIG_EXTCON_MAX3355 is not set @@ -4778,10 +5002,13 @@ CONFIG_EXTCON=y # CONFIG_EXTCON_RT8973A is not set # CONFIG_EXTCON_SM5502 is not set CONFIG_EXTCON_USB_GPIO=y +# CONFIG_EXTCON_USBC_TUSB320 is not set # CONFIG_MEMORY is not set CONFIG_IIO=y CONFIG_IIO_BUFFER=y # CONFIG_IIO_BUFFER_CB is not set +# CONFIG_IIO_BUFFER_DMA is not set +# CONFIG_IIO_BUFFER_DMAENGINE is not set # CONFIG_IIO_BUFFER_HW_CONSUMER is not set CONFIG_IIO_KFIFO_BUF=m CONFIG_IIO_TRIGGERED_BUFFER=m @@ -4790,6 +5017,7 @@ CONFIG_IIO_TRIGGER=y CONFIG_IIO_CONSUMERS_PER_TRIGGER=2 # CONFIG_IIO_SW_DEVICE is not set # CONFIG_IIO_SW_TRIGGER is not set +# CONFIG_IIO_TRIGGERED_EVENT is not set # # Accelerometers @@ -4811,7 +5039,7 @@ CONFIG_IIO_CONSUMERS_PER_TRIGGER=2 # CONFIG_DMARD10 is not set # CONFIG_IIO_ST_ACCEL_3AXIS is not set # CONFIG_KXSD9 is not set -CONFIG_KXCJK1013=m +# CONFIG_KXCJK1013 is not set # CONFIG_MC3230 is not set # CONFIG_MMA7455_I2C is not set # CONFIG_MMA7455_SPI is not set @@ -4848,6 +5076,8 @@ CONFIG_KXCJK1013=m # CONFIG_AD7923 is not set # CONFIG_AD7949 is not set # CONFIG_AD799X is not set +# CONFIG_AD9467 is not set +# CONFIG_ADI_AXI_ADC is not set # CONFIG_CC10001_ADC is not set # CONFIG_ENVELOPE_DETECTOR is not set # CONFIG_HI8435 is not set @@ -4860,6 +5090,7 @@ CONFIG_KXCJK1013=m # CONFIG_MAX1027 is not set # CONFIG_MAX11100 is not set # CONFIG_MAX1118 is not set +# CONFIG_MAX1241 is not set # CONFIG_MAX1363 is not set # CONFIG_MAX9611 is not set # CONFIG_MCP320X is not set @@ -4905,10 +5136,12 @@ CONFIG_MESON_SARADC=y # Chemical Sensors # # CONFIG_ATLAS_PH_SENSOR is not set +# CONFIG_ATLAS_EZO_SENSOR is not set # CONFIG_BME680 is not set # CONFIG_CCS811 is not set # CONFIG_IAQCORE is not set # CONFIG_PMS7003 is not set +# CONFIG_SCD30_CORE is not set # CONFIG_SENSIRION_SGP30 is not set # CONFIG_SPS30 is not set # CONFIG_VZ89X is not set @@ -4994,6 +5227,7 @@ CONFIG_MESON_SARADC=y # CONFIG_ADIS16130 is not set # CONFIG_ADIS16136 is not set # CONFIG_ADIS16260 is not set +# CONFIG_ADXRS290 is not set # CONFIG_ADXRS450 is not set # CONFIG_BMG160 is not set # CONFIG_FXAS21002C is not set @@ -5022,6 +5256,7 @@ CONFIG_MESON_SARADC=y # CONFIG_AM2315 is not set # CONFIG_DHT11 is not set # CONFIG_HDC100X is not set +# CONFIG_HDC2010 is not set # CONFIG_HTS221 is not set # CONFIG_HTU21 is not set # CONFIG_SI7005 is not set @@ -5033,12 +5268,15 @@ CONFIG_MESON_SARADC=y # # CONFIG_ADIS16400 is not set # CONFIG_ADIS16460 is not set +# CONFIG_ADIS16475 is not set # CONFIG_ADIS16480 is not set # CONFIG_BMI160_I2C is not set # CONFIG_BMI160_SPI is not set # CONFIG_FXOS8700_I2C is not set # CONFIG_FXOS8700_SPI is not set # CONFIG_KMX61 is not set +# CONFIG_INV_ICM42600_I2C is not set +# CONFIG_INV_ICM42600_SPI is not set # CONFIG_INV_MPU6050_I2C is not set # CONFIG_INV_MPU6050_SPI is not set # CONFIG_IIO_ST_LSM6DSX is not set @@ -5053,6 +5291,7 @@ CONFIG_MESON_SARADC=y # CONFIG_AL3320A is not set # CONFIG_APDS9300 is not set # CONFIG_APDS9960 is not set +# CONFIG_AS73211 is not set # CONFIG_BH1750 is not set # CONFIG_BH1780 is not set # CONFIG_CM32181 is not set @@ -5189,8 +5428,10 @@ CONFIG_MESON_SARADC=y # CONFIG_PING is not set # CONFIG_RFD77402 is not set # CONFIG_SRF04 is not set +# CONFIG_SX9310 is not set # CONFIG_SX9500 is not set # CONFIG_SRF08 is not set +# CONFIG_VCNL3020 is not set # CONFIG_VL53L0X_I2C is not set # end of Proximity and distance sensors @@ -5218,6 +5459,7 @@ CONFIG_MESON_SARADC=y CONFIG_PWM=y CONFIG_PWM_SYSFS=y # CONFIG_PWM_DEBUG is not set +# CONFIG_PWM_ATMEL_TCB is not set # CONFIG_PWM_FSL_FTM is not set CONFIG_PWM_MESON=y # CONFIG_PWM_PCA9685 is not set @@ -5247,18 +5489,21 @@ CONFIG_RESET_MESON_AUDIO_ARB=y # PHY Subsystem # CONFIG_GENERIC_PHY=y +CONFIG_GENERIC_PHY_MIPI_DPHY=y # CONFIG_PHY_XGENE is not set +# CONFIG_USB_LGM_PHY is not set CONFIG_PHY_MESON8B_USB2=y CONFIG_PHY_MESON_GXL_USB2=y -CONFIG_PHY_MESON_GXL_USB3=y CONFIG_PHY_MESON_G12A_USB2=y CONFIG_PHY_MESON_G12A_USB3_PCIE=y CONFIG_PHY_MESON_AXG_PCIE=y CONFIG_PHY_MESON_AXG_MIPI_PCIE_ANALOG=y +CONFIG_PHY_MESON_AXG_MIPI_DPHY=y # CONFIG_BCM_KONA_USB2_PHY is not set # CONFIG_PHY_CADENCE_TORRENT is not set # CONFIG_PHY_CADENCE_DPHY is not set # CONFIG_PHY_CADENCE_SIERRA is not set +# CONFIG_PHY_CADENCE_SALVO is not set # CONFIG_PHY_FSL_IMX8MQ_USB is not set # CONFIG_PHY_MIXEL_MIPI_DPHY is not set # CONFIG_PHY_PXA_28NM_HSIC is not set @@ -5267,7 +5512,6 @@ CONFIG_PHY_MESON_AXG_MIPI_PCIE_ANALOG=y # CONFIG_PHY_MAPPHONE_MDM6600 is not set # CONFIG_PHY_OCELOT_SERDES is not set # CONFIG_PHY_SAMSUNG_USB2 is not set -# CONFIG_PHY_INTEL_EMMC is not set # end of PHY Subsystem # CONFIG_POWERCAP is not set @@ -5278,12 +5522,13 @@ CONFIG_PHY_MESON_AXG_MIPI_PCIE_ANALOG=y # # CONFIG_ARM_CCI_PMU is not set # CONFIG_ARM_CCN is not set -CONFIG_ARM_PMU=y +# CONFIG_ARM_CMN is not set +# CONFIG_ARM_PMU is not set # CONFIG_ARM_DSU_PMU is not set # CONFIG_ARM_SPE_PMU is not set # end of Performance monitor support -# CONFIG_RAS is not set +CONFIG_RAS=y # # Android @@ -5362,6 +5607,7 @@ CONFIG_JFS_FS=m # CONFIG_JFS_DEBUG is not set # CONFIG_JFS_STATISTICS is not set CONFIG_XFS_FS=m +CONFIG_XFS_SUPPORT_V4=y # CONFIG_XFS_QUOTA is not set # CONFIG_XFS_POSIX_ACL is not set # CONFIG_XFS_RT is not set @@ -5456,6 +5702,7 @@ CONFIG_SYSFS=y CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y CONFIG_TMPFS_XATTR=y +# CONFIG_TMPFS_INODE64 is not set # CONFIG_HUGETLBFS is not set CONFIG_MEMFD_CREATE=y CONFIG_ARCH_HAS_GIGANTIC_PAGE=y @@ -5472,6 +5719,7 @@ CONFIG_HFSPLUS_FS=m # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set +# CONFIG_JFFS2_FS is not set # CONFIG_CRAMFS is not set CONFIG_SQUASHFS=y # CONFIG_SQUASHFS_FILE_CACHE is not set @@ -5479,7 +5727,7 @@ CONFIG_SQUASHFS_FILE_DIRECT=y # CONFIG_SQUASHFS_DECOMP_SINGLE is not set # CONFIG_SQUASHFS_DECOMP_MULTI is not set CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y -# CONFIG_SQUASHFS_XATTR is not set +CONFIG_SQUASHFS_XATTR=y CONFIG_SQUASHFS_ZLIB=y CONFIG_SQUASHFS_LZ4=y CONFIG_SQUASHFS_LZO=y @@ -5517,6 +5765,7 @@ CONFIG_NFS_FSCACHE=y # CONFIG_NFS_USE_LEGACY_DNS is not set CONFIG_NFS_USE_KERNEL_DNS=y CONFIG_NFS_DISABLE_UDP_SUPPORT=y +# CONFIG_NFS_V4_2_READ_PLUS is not set # CONFIG_NFSD is not set CONFIG_GRACE_PERIOD=y CONFIG_LOCKD=y @@ -5537,6 +5786,7 @@ CONFIG_CIFS_ALLOW_INSECURE_LEGACY=y # CONFIG_CIFS_XATTR is not set # CONFIG_CIFS_DEBUG is not set # CONFIG_CIFS_DFS_UPCALL is not set +# CONFIG_CIFS_SWN_UPCALL is not set CONFIG_CIFS_FSCACHE=y # CONFIG_CIFS_ROOT is not set # CONFIG_CODA_FS is not set @@ -5678,6 +5928,7 @@ CONFIG_CRYPTO_DH=y CONFIG_CRYPTO_ECC=m CONFIG_CRYPTO_ECDH=m # CONFIG_CRYPTO_ECRDSA is not set +# CONFIG_CRYPTO_SM2 is not set # CONFIG_CRYPTO_CURVE25519 is not set # @@ -5788,6 +6039,7 @@ CONFIG_CRYPTO_USER_API_HASH=y CONFIG_CRYPTO_USER_API_SKCIPHER=y # CONFIG_CRYPTO_USER_API_RNG is not set # CONFIG_CRYPTO_USER_API_AEAD is not set +CONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE=y CONFIG_CRYPTO_HASH_INFO=y # @@ -5840,6 +6092,7 @@ CONFIG_SYSTEM_TRUSTED_KEYS="" # CONFIG_RAID6_PQ=m # CONFIG_RAID6_PQ_BENCHMARK is not set +CONFIG_LINEAR_RANGES=y # CONFIG_PACKING is not set CONFIG_BITREVERSE=y CONFIG_HAVE_ARCH_BITREVERSE=y @@ -5847,14 +6100,16 @@ CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_NET_UTILS=y CONFIG_CORDIC=m +# CONFIG_PRIME_NUMBERS is not set CONFIG_RATIONAL=y CONFIG_GENERIC_PCI_IOMAP=y CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y CONFIG_ARCH_HAS_FAST_MULTIPLIER=y +CONFIG_ARCH_USE_SYM_ANNOTATIONS=y # CONFIG_INDIRECT_PIO is not set CONFIG_CRC_CCITT=m CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set +CONFIG_CRC_T10DIF=y CONFIG_CRC_ITU_T=y CONFIG_CRC32=y # CONFIG_CRC32_SELFTEST is not set @@ -5886,9 +6141,11 @@ CONFIG_XZ_DEC=y # CONFIG_XZ_DEC_SPARC is not set # CONFIG_XZ_DEC_TEST is not set CONFIG_GENERIC_ALLOCATOR=y +CONFIG_XARRAY_MULTI=y CONFIG_ASSOCIATIVE_ARRAY=y CONFIG_HAS_IOMEM=y CONFIG_HAS_DMA=y +CONFIG_DMA_OPS=y CONFIG_NEED_SG_DMA_LENGTH=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_ARCH_DMA_ADDR_T_64BIT=y @@ -5900,9 +6157,11 @@ CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y CONFIG_ARCH_HAS_DMA_PREP_COHERENT=y CONFIG_SWIOTLB=y CONFIG_DMA_NONCOHERENT_MMAP=y +CONFIG_DMA_COHERENT_POOL=y CONFIG_DMA_REMAP=y CONFIG_DMA_DIRECT_REMAP=y CONFIG_DMA_CMA=y +# CONFIG_DMA_PERNUMA_CMA is not set # # Default contiguous memory area size: @@ -5914,6 +6173,7 @@ CONFIG_CMA_SIZE_SEL_MBYTES=y # CONFIG_CMA_SIZE_SEL_MAX is not set CONFIG_CMA_ALIGNMENT=8 # CONFIG_DMA_API_DEBUG is not set +# CONFIG_DMA_MAP_BENCHMARK is not set CONFIG_SGL_ALLOC=y CONFIG_CPU_RMAP=y CONFIG_DQL=y @@ -5927,15 +6187,19 @@ CONFIG_LIBFDT=y CONFIG_OID_REGISTRY=y CONFIG_HAVE_GENERIC_VDSO=y CONFIG_GENERIC_GETTIMEOFDAY=y +CONFIG_GENERIC_VDSO_TIME_NS=y CONFIG_FONT_SUPPORT=y # CONFIG_FONTS is not set CONFIG_FONT_8x8=y CONFIG_FONT_8x16=y CONFIG_SG_POOL=y +CONFIG_ARCH_STACKWALK=y CONFIG_SBITMAP=y # CONFIG_STRING_SELFTEST is not set # end of Library routines +CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y + # # Kernel hacking # @@ -5949,22 +6213,23 @@ CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 CONFIG_CONSOLE_LOGLEVEL_QUIET=4 CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 # CONFIG_BOOT_PRINTK_DELAY is not set -CONFIG_DYNAMIC_DEBUG=y +# CONFIG_DYNAMIC_DEBUG is not set +# CONFIG_DYNAMIC_DEBUG_CORE is not set CONFIG_SYMBOLIC_ERRNAME=y -# CONFIG_DEBUG_BUGVERBOSE is not set +CONFIG_DEBUG_BUGVERBOSE=y # end of printk and dmesg options # # Compile-time checks and compiler options # # CONFIG_DEBUG_INFO is not set -CONFIG_ENABLE_MUST_CHECK=y CONFIG_FRAME_WARN=2048 CONFIG_STRIP_ASM_SYMS=y # CONFIG_READABLE_ASM is not set # CONFIG_HEADERS_INSTALL is not set # CONFIG_DEBUG_SECTION_MISMATCH is not set CONFIG_SECTION_MISMATCH_WARN_ONLY=y +# CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_32B is not set CONFIG_ARCH_WANT_FRAME_POINTERS=y CONFIG_FRAME_POINTER=y # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set @@ -5978,6 +6243,9 @@ CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 CONFIG_MAGIC_SYSRQ_SERIAL=y CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE="" CONFIG_DEBUG_FS=y +CONFIG_DEBUG_FS_ALLOW_ALL=y +# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set +# CONFIG_DEBUG_FS_ALLOW_NONE is not set CONFIG_HAVE_ARCH_KGDB=y # CONFIG_KGDB is not set CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y @@ -5995,6 +6263,8 @@ CONFIG_DEBUG_MISC=y # CONFIG_PAGE_OWNER is not set # CONFIG_PAGE_POISONING is not set # CONFIG_DEBUG_RODATA_TEST is not set +CONFIG_ARCH_HAS_DEBUG_WX=y +# CONFIG_DEBUG_WX is not set CONFIG_GENERIC_PTDUMP=y # CONFIG_PTDUMP_DEBUGFS is not set # CONFIG_DEBUG_OBJECTS is not set @@ -6004,16 +6274,19 @@ CONFIG_HAVE_DEBUG_KMEMLEAK=y # CONFIG_DEBUG_KMEMLEAK is not set # CONFIG_DEBUG_STACK_USAGE is not set # CONFIG_SCHED_STACK_END_CHECK is not set +CONFIG_ARCH_HAS_DEBUG_VM_PGTABLE=y # CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_VM_PGTABLE is not set CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y # CONFIG_DEBUG_VIRTUAL is not set # CONFIG_DEBUG_MEMORY_INIT is not set # CONFIG_DEBUG_PER_CPU_MAPS is not set CONFIG_HAVE_ARCH_KASAN=y CONFIG_HAVE_ARCH_KASAN_SW_TAGS=y +CONFIG_HAVE_ARCH_KASAN_HW_TAGS=y CONFIG_CC_HAS_KASAN_GENERIC=y +CONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y # CONFIG_KASAN is not set -CONFIG_KASAN_STACK=1 # end of Memory Debugging # CONFIG_DEBUG_SHIRQ is not set @@ -6025,10 +6298,7 @@ CONFIG_KASAN_STACK=1 CONFIG_PANIC_ON_OOPS_VALUE=0 CONFIG_PANIC_TIMEOUT=0 # CONFIG_SOFTLOCKUP_DETECTOR is not set -CONFIG_DETECT_HUNG_TASK=y -CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 -# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set -CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 +# CONFIG_DETECT_HUNG_TASK is not set # CONFIG_WQ_WATCHDOG is not set # CONFIG_TEST_LOCKUP is not set # end of Debug Oops, Lockups and Hangs @@ -6041,6 +6311,7 @@ CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 # end of Scheduler Debugging # CONFIG_DEBUG_TIMEKEEPING is not set +CONFIG_DEBUG_PREEMPT=y # # Lock Debugging (spinlocks, mutexes, etc...) @@ -6048,19 +6319,23 @@ CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y # CONFIG_PROVE_LOCKING is not set # CONFIG_LOCK_STAT is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set +CONFIG_DEBUG_RT_MUTEXES=y +CONFIG_DEBUG_SPINLOCK=y +CONFIG_DEBUG_MUTEXES=y +CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y +CONFIG_DEBUG_RWSEMS=y +CONFIG_DEBUG_LOCK_ALLOC=y +CONFIG_LOCKDEP=y +# CONFIG_DEBUG_LOCKDEP is not set # CONFIG_DEBUG_ATOMIC_SLEEP is not set # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_LOCK_TORTURE_TEST is not set # CONFIG_WW_MUTEX_SELFTEST is not set +# CONFIG_SCF_TORTURE_TEST is not set +# CONFIG_CSD_LOCK_WAIT_DEBUG is not set # end of Lock Debugging (spinlocks, mutexes, etc...) -# CONFIG_STACKTRACE is not set +CONFIG_STACKTRACE=y # CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_HAVE_DEBUG_BUGVERBOSE=y @@ -6080,8 +6355,9 @@ CONFIG_HAVE_DEBUG_BUGVERBOSE=y # # RCU Debugging # -# CONFIG_RCU_PERF_TEST is not set +# CONFIG_RCU_SCALE_TEST is not set # CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_RCU_REF_SCALE_TEST is not set CONFIG_RCU_CPU_STALL_TIMEOUT=21 # CONFIG_RCU_TRACE is not set # CONFIG_RCU_EQS_DEBUG is not set @@ -6101,15 +6377,12 @@ CONFIG_HAVE_C_RECORDMCOUNT=y CONFIG_TRACING_SUPPORT=y # CONFIG_FTRACE is not set # CONFIG_SAMPLES is not set -CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y # CONFIG_STRICT_DEVMEM is not set # # arm64 Debugging # # CONFIG_PID_IN_CONTEXTIDR is not set -# CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set -# CONFIG_DEBUG_WX is not set # CONFIG_ARM64_RELOC_TEST is not set # CONFIG_CORESIGHT is not set # end of arm64 Debugging diff --git a/projects/Amlogic/patches/linux/amlogic-0001-HACK-set-meson-gx-cma-pool-to-768MB.patch b/projects/Amlogic/patches/linux/amlogic-0001-HACK-set-meson-gx-cma-pool-to-768MB.patch index 6a218f25eb7..0b5def5c11c 100644 --- a/projects/Amlogic/patches/linux/amlogic-0001-HACK-set-meson-gx-cma-pool-to-768MB.patch +++ b/projects/Amlogic/patches/linux/amlogic-0001-HACK-set-meson-gx-cma-pool-to-768MB.patch @@ -1,7 +1,7 @@ -From 35808d659a3d8d50fcefbd640c327efe43e47a3a Mon Sep 17 00:00:00 2001 +From b74116343cce0ffed44770904e11f865acf0aa7c Mon Sep 17 00:00:00 2001 From: chewitt Date: Sat, 13 Apr 2019 05:41:51 +0000 -Subject: [PATCH 001/156] HACK: set meson-gx cma pool to 768MB +Subject: [PATCH 01/79] HACK: set meson-gx cma pool to 768MB This change sets the CMA pool to a larger 768MB! value for vdec use @@ -11,10 +11,10 @@ Signed-off-by: Christian Hewitt 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi -index e2bb68ec8502..b9b16f48cb1e 100644 +index 726b91d3a905..2ac6eaa451cf 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi -@@ -45,7 +45,7 @@ +@@ -47,7 +47,7 @@ linux,cma { compatible = "shared-dma-pool"; reusable; diff --git a/projects/Amlogic/patches/linux/amlogic-0002-HACK-set-meson-gx-cma-pool-to-896MB.patch b/projects/Amlogic/patches/linux/amlogic-0002-HACK-set-meson-gx-cma-pool-to-896MB.patch new file mode 100644 index 00000000000..053254222e4 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0002-HACK-set-meson-gx-cma-pool-to-896MB.patch @@ -0,0 +1,25 @@ +From 00eb6cb04920d82eea717b49a28c0d061a145c97 Mon Sep 17 00:00:00 2001 +From: chewitt +Date: Wed, 28 Oct 2020 14:14:30 +0000 +Subject: [PATCH 02/79] HACK: set meson-gx cma pool to 896MB + +--- + arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi +index 2ac6eaa451cf..d90a7e376a62 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi ++++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi +@@ -47,7 +47,7 @@ + linux,cma { + compatible = "shared-dma-pool"; + reusable; +- size = <0x0 0x30000000>; ++ size = <0x0 0x38000000>; + alignment = <0x0 0x400000>; + linux,cma-default; + }; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0002-HACK-set-meson-g12-cma-pool-to-768MB.patch b/projects/Amlogic/patches/linux/amlogic-0003-HACK-set-meson-g12-cma-pool-to-768MB.patch similarity index 80% rename from projects/Amlogic/patches/linux/amlogic-0002-HACK-set-meson-g12-cma-pool-to-768MB.patch rename to projects/Amlogic/patches/linux/amlogic-0003-HACK-set-meson-g12-cma-pool-to-768MB.patch index a8a7ec503a2..9d955ab4fe7 100644 --- a/projects/Amlogic/patches/linux/amlogic-0002-HACK-set-meson-g12-cma-pool-to-768MB.patch +++ b/projects/Amlogic/patches/linux/amlogic-0003-HACK-set-meson-g12-cma-pool-to-768MB.patch @@ -1,7 +1,7 @@ -From 93dd716407924c12783a795708314952387b3f83 Mon Sep 17 00:00:00 2001 +From 3e935a9c199bb929c29689d7feb28f7b430dac90 Mon Sep 17 00:00:00 2001 From: chewitt Date: Wed, 14 Aug 2019 19:58:14 +0000 -Subject: [PATCH 002/156] HACK: set meson-g12 cma pool to 768MB +Subject: [PATCH 03/79] HACK: set meson-g12 cma pool to 768MB This change sets the CMA pool to a larger 768MB! value for vdec use @@ -11,10 +11,10 @@ Signed-off-by: Christian Hewitt 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi -index c0aef7d69117..0a625ad14712 100644 +index 9c90d562ada1..e117a914c4d6 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi -@@ -71,7 +71,7 @@ +@@ -104,7 +104,7 @@ linux,cma { compatible = "shared-dma-pool"; reusable; diff --git a/projects/Amlogic/patches/linux/amlogic-0004-HACK-set-meson-g12-cma-pool-to-896MB.patch b/projects/Amlogic/patches/linux/amlogic-0004-HACK-set-meson-g12-cma-pool-to-896MB.patch new file mode 100644 index 00000000000..65c76e866b9 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0004-HACK-set-meson-g12-cma-pool-to-896MB.patch @@ -0,0 +1,25 @@ +From abbe7433cb0ade15c56fa310df0b160046c1cdc5 Mon Sep 17 00:00:00 2001 +From: chewitt +Date: Wed, 28 Oct 2020 14:15:27 +0000 +Subject: [PATCH 04/79] HACK: set meson-g12 cma pool to 896MB + +--- + arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +index e117a914c4d6..9f79f594c6a7 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi ++++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +@@ -104,7 +104,7 @@ + linux,cma { + compatible = "shared-dma-pool"; + reusable; +- size = <0x0 0x30000000>; ++ size = <0x0 0x38000000>; + alignment = <0x0 0x400000>; + linux,cma-default; + }; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0003-HACK-arm64-fix-Kodi-sysinfo-CPU-information.patch b/projects/Amlogic/patches/linux/amlogic-0005-HACK-arm64-fix-Kodi-sysinfo-CPU-information.patch similarity index 78% rename from projects/Amlogic/patches/linux/amlogic-0003-HACK-arm64-fix-Kodi-sysinfo-CPU-information.patch rename to projects/Amlogic/patches/linux/amlogic-0005-HACK-arm64-fix-Kodi-sysinfo-CPU-information.patch index 7d8a3525188..e65b023a0cd 100644 --- a/projects/Amlogic/patches/linux/amlogic-0003-HACK-arm64-fix-Kodi-sysinfo-CPU-information.patch +++ b/projects/Amlogic/patches/linux/amlogic-0005-HACK-arm64-fix-Kodi-sysinfo-CPU-information.patch @@ -1,7 +1,7 @@ -From 4a35e44d38d156e292f0b9c9c4166fe98ebc847d Mon Sep 17 00:00:00 2001 +From 852df5d6c6d7bf165c5485a7d878feddc02df7ed Mon Sep 17 00:00:00 2001 From: chewitt Date: Sat, 13 Apr 2019 05:45:18 +0000 -Subject: [PATCH 003/156] HACK: arm64: fix Kodi sysinfo CPU information +Subject: [PATCH 05/79] HACK: arm64: fix Kodi sysinfo CPU information This allows the CPU information to show in the Kodi sysinfo screen, e.g. @@ -13,10 +13,10 @@ Signed-off-by: Christian Hewitt 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c -index 86136075ae41..f321dc2d8129 100644 +index 77605aec25fe..d69b4e486098 100644 --- a/arch/arm64/kernel/cpuinfo.c +++ b/arch/arm64/kernel/cpuinfo.c -@@ -147,8 +147,7 @@ static int c_show(struct seq_file *m, void *v) +@@ -148,8 +148,7 @@ static int c_show(struct seq_file *m, void *v) * "processor". Give glibc what it expects. */ seq_printf(m, "processor\t: %d\n", i); diff --git a/projects/Amlogic/patches/linux/amlogic-0005-HACK-media-cec-silence-CEC-timeout-message.patch b/projects/Amlogic/patches/linux/amlogic-0005-HACK-media-cec-silence-CEC-timeout-message.patch deleted file mode 100644 index fbe15c8bc8e..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0005-HACK-media-cec-silence-CEC-timeout-message.patch +++ /dev/null @@ -1,40 +0,0 @@ -From d7ba0960e3bc51f8368ef9d3b98ce33be91e3570 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Tue, 7 Jan 2020 07:12:47 +0000 -Subject: [PATCH 005/156] HACK: media: cec: silence CEC timeout message - -If testing with an AVR that does not pass-through CEC state the system -log fills with timeout messages. Silence this to stop the log rotation -and ensure other issues are visible. - -[ 42.718009] cec-meson_ao_cec: message ff 84 50 00 01 timed out -[ 45.021994] cec-meson_ao_cec: message ff 87 00 15 82 timed out -[ 47.325965] cec-meson_ao_cec: message 10 timed out -[ 49.630023] cec-meson_ao_cec: message 10 timed out -[ 51.933960] cec-meson_ao_cec: message 10 timed out - -Signed-off-by: Christian Hewitt ---- - drivers/media/cec/cec-adap.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/drivers/media/cec/cec-adap.c b/drivers/media/cec/cec-adap.c -index 6a04d19a96b2..fcb29dba8de1 100644 ---- a/drivers/media/cec/cec-adap.c -+++ b/drivers/media/cec/cec-adap.c -@@ -510,9 +510,9 @@ int cec_thread_func(void *_adap) - * unable to transmit for CEC_XFER_TIMEOUT_MS (2.1s). - */ - if (adap->transmitting) { -- pr_warn("cec-%s: message %*ph timed out\n", adap->name, -- adap->transmitting->msg.len, -- adap->transmitting->msg.msg); -+ //pr_warn("cec-%s: message %*ph timed out\n", adap->name, -+ // adap->transmitting->msg.len, -+ // adap->transmitting->msg.msg); - /* Just give up on this. */ - cec_data_cancel(adap->transmitting, - CEC_TX_STATUS_TIMEOUT); --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0004-HACK-arm64-dts-meson-gx-add-ATF-BL32-reserved-memory.patch b/projects/Amlogic/patches/linux/amlogic-0006-HACK-arm64-dts-meson-gx-add-ATF-BL32-reserved-memory.patch similarity index 83% rename from projects/Amlogic/patches/linux/amlogic-0004-HACK-arm64-dts-meson-gx-add-ATF-BL32-reserved-memory.patch rename to projects/Amlogic/patches/linux/amlogic-0006-HACK-arm64-dts-meson-gx-add-ATF-BL32-reserved-memory.patch index 7fa6c57cb87..8de2ebca9a6 100644 --- a/projects/Amlogic/patches/linux/amlogic-0004-HACK-arm64-dts-meson-gx-add-ATF-BL32-reserved-memory.patch +++ b/projects/Amlogic/patches/linux/amlogic-0006-HACK-arm64-dts-meson-gx-add-ATF-BL32-reserved-memory.patch @@ -1,7 +1,7 @@ -From 5b92e88cc625b65870b246103dd6ed2d2967ee07 Mon Sep 17 00:00:00 2001 +From e61e3429cc2d3bcac28191cb57e6dbcf7b91feb4 Mon Sep 17 00:00:00 2001 From: kszaq Date: Sat, 6 Jul 2019 07:54:44 +0000 -Subject: [PATCH 004/156] HACK: arm64: dts: meson-gx: add ATF BL32 reserved +Subject: [PATCH 06/79] HACK: arm64: dts: meson-gx: add ATF BL32 reserved memory region Vendor firmware/uboot has an additional reserved region for BL32 trusted @@ -16,10 +16,10 @@ Signed-off-by: kszaq 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi -index b9b16f48cb1e..ea4dac8506bc 100644 +index d90a7e376a62..ac6e99a9c95f 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi -@@ -42,6 +42,12 @@ +@@ -44,6 +44,12 @@ no-map; }; diff --git a/projects/Amlogic/patches/linux/amlogic-0006-HACK-revert-mm-emit-tracepoint-when-RSS-changes.patch b/projects/Amlogic/patches/linux/amlogic-0006-HACK-revert-mm-emit-tracepoint-when-RSS-changes.patch deleted file mode 100644 index f71e78491ad..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0006-HACK-revert-mm-emit-tracepoint-when-RSS-changes.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 776e38d46393b542029e4fcd908c344fa83342dd Mon Sep 17 00:00:00 2001 -From: chewitt -Date: Thu, 12 Dec 2019 13:48:45 +0000 -Subject: [PATCH 006/156] HACK: revert mm: emit tracepoint when RSS changes - ---- - include/linux/mm.h | 14 +++----------- - include/trace/events/kmem.h | 28 ---------------------------- - mm/memory.c | 6 ------ - 3 files changed, 3 insertions(+), 45 deletions(-) - -diff --git a/include/linux/mm.h b/include/linux/mm.h -index 465e8ad671f8..474bbd14b065 100644 ---- a/include/linux/mm.h -+++ b/include/linux/mm.h -@@ -1848,27 +1848,19 @@ static inline unsigned long get_mm_counter(struct mm_struct *mm, int member) - return (unsigned long)val; - } - --void mm_trace_rss_stat(struct mm_struct *mm, int member, long count); -- - static inline void add_mm_counter(struct mm_struct *mm, int member, long value) - { -- long count = atomic_long_add_return(value, &mm->rss_stat.count[member]); -- -- mm_trace_rss_stat(mm, member, count); -+ atomic_long_add(value, &mm->rss_stat.count[member]); - } - - static inline void inc_mm_counter(struct mm_struct *mm, int member) - { -- long count = atomic_long_inc_return(&mm->rss_stat.count[member]); -- -- mm_trace_rss_stat(mm, member, count); -+ atomic_long_inc(&mm->rss_stat.count[member]); - } - - static inline void dec_mm_counter(struct mm_struct *mm, int member) - { -- long count = atomic_long_dec_return(&mm->rss_stat.count[member]); -- -- mm_trace_rss_stat(mm, member, count); -+ atomic_long_dec(&mm->rss_stat.count[member]); - } - - /* Optimized variant when page is already known not to be PageAnon */ -diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h -index f65b1f6db22d..788e049f899c 100644 ---- a/include/trace/events/kmem.h -+++ b/include/trace/events/kmem.h -@@ -335,34 +335,6 @@ static unsigned int __maybe_unused mm_ptr_to_hash(const void *ptr) - #define __PTR_TO_HASHVAL - #endif - --TRACE_EVENT(rss_stat, -- -- TP_PROTO(struct mm_struct *mm, -- int member, -- long count), -- -- TP_ARGS(mm, member, count), -- -- TP_STRUCT__entry( -- __field(unsigned int, mm_id) -- __field(unsigned int, curr) -- __field(int, member) -- __field(long, size) -- ), -- -- TP_fast_assign( -- __entry->mm_id = mm_ptr_to_hash(mm); -- __entry->curr = !!(current->mm == mm); -- __entry->member = member; -- __entry->size = (count << PAGE_SHIFT); -- ), -- -- TP_printk("mm_id=%u curr=%d member=%d size=%ldB", -- __entry->mm_id, -- __entry->curr, -- __entry->member, -- __entry->size) -- ); - #endif /* _TRACE_KMEM_H */ - - /* This part must be outside protection */ -diff --git a/mm/memory.c b/mm/memory.c -index f703fe8c8346..796c5a62e173 100644 ---- a/mm/memory.c -+++ b/mm/memory.c -@@ -72,8 +72,6 @@ - #include - #include - --#include -- - #include - #include - #include -@@ -154,10 +152,6 @@ static int __init init_zero_pfn(void) - } - core_initcall(init_zero_pfn); - --void mm_trace_rss_stat(struct mm_struct *mm, int member, long count) --{ -- trace_rss_stat(mm, member, count); --} - - #if defined(SPLIT_RSS_COUNTING) - --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0007-HACK-drm-meson-add-YUV422-output-support.patch b/projects/Amlogic/patches/linux/amlogic-0007-HACK-drm-meson-add-YUV422-output-support.patch new file mode 100644 index 00000000000..9643b417a14 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0007-HACK-drm-meson-add-YUV422-output-support.patch @@ -0,0 +1,49 @@ +From a168bc7413bf9d8a67bf5cad5009434e75f380e7 Mon Sep 17 00:00:00 2001 +From: Dongjin Kim +Date: Wed, 29 Jul 2020 04:05:03 +0900 +Subject: [PATCH 07/79] HACK: drm/meson: add YUV422 output support + +Support YUV422 output from the Amlogic Meson SoC VPU to the HDMI +controller. This incorrectly fixes the green-line on GX devices. + +Signed-off-by: Dongjin Kim +--- + drivers/gpu/drm/meson/meson_dw_hdmi.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c +index aad75a22dc33..97d670081824 100644 +--- a/drivers/gpu/drm/meson/meson_dw_hdmi.c ++++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c +@@ -703,6 +703,7 @@ dw_hdmi_mode_valid(struct dw_hdmi *hdmi, void *data, + + static const u32 meson_dw_hdmi_out_bus_fmts[] = { + MEDIA_BUS_FMT_YUV8_1X24, ++ MEDIA_BUS_FMT_UYVY8_1X16, + MEDIA_BUS_FMT_UYYVYY8_0_5X24, + }; + +@@ -802,7 +803,8 @@ static void meson_venc_hdmi_encoder_mode_set(struct drm_bridge *bridge, + if (dw_hdmi->output_bus_fmt == MEDIA_BUS_FMT_UYYVYY8_0_5X24) { + ycrcb_map = VPU_HDMI_OUTPUT_CRYCB; + yuv420_mode = true; +- } ++ } else if (dw_hdmi->output_bus_fmt == MEDIA_BUS_FMT_UYVY8_1X16) ++ ycrcb_map = VPU_HDMI_OUTPUT_CRYCB; + + /* VENC + VENC-DVI Mode setup */ + meson_venc_hdmi_mode_set(priv, vic, ycrcb_map, yuv420_mode, mode); +@@ -814,6 +816,10 @@ static void meson_venc_hdmi_encoder_mode_set(struct drm_bridge *bridge, + /* Setup YUV420 to HDMI-TX, no 10bit diphering */ + writel_relaxed(2 | (2 << 2), + priv->io_base + _REG(VPU_HDMI_FMT_CTRL)); ++ else if (dw_hdmi->output_bus_fmt == MEDIA_BUS_FMT_UYVY8_1X16) ++ /* Setup YUV422 to HDMI-TX, no 10bit diphering */ ++ writel_relaxed(1 | (2 << 2), ++ priv->io_base + _REG(VPU_HDMI_FMT_CTRL)); + else + /* Setup YUV444 to HDMI-TX, no 10bit diphering */ + writel_relaxed(0, priv->io_base + _REG(VPU_HDMI_FMT_CTRL)); +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0007-HACK-mmc-core-always-re-init-sdcards-to-set-default-.patch b/projects/Amlogic/patches/linux/amlogic-0007-HACK-mmc-core-always-re-init-sdcards-to-set-default-.patch deleted file mode 100644 index 00053a00615..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0007-HACK-mmc-core-always-re-init-sdcards-to-set-default-.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 14f9943b4aef5e3ef444c0cc131ebaaef2b1c3d3 Mon Sep 17 00:00:00 2001 -From: Neil Armstrong -Date: Thu, 16 Apr 2020 08:31:55 +0000 -Subject: [PATCH 007/156] HACK: mmc: core: always re-init sdcards to set - default 3.3v regulator ios - -sd-uhs-** in device-tree changes the voltage to 1.8v, so we need to ensure -the card is reset to 3.3v before rebooting else on reboot there is no card -to boot from. - -Signed-off-by: Neil Armstrong ---- - drivers/mmc/core/sd.c | 22 +++++++++++++++++++++- - 1 file changed, 21 insertions(+), 1 deletion(-) - -diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c -index 76c7add367d5..5b974fbda160 100644 ---- a/drivers/mmc/core/sd.c -+++ b/drivers/mmc/core/sd.c -@@ -1191,6 +1191,26 @@ static int mmc_sd_suspend(struct mmc_host *host) - return err; - } - -+/* -+ * Callback for shutdown -+ */ -+static int mmc_sd_shutdown(struct mmc_host *host) -+{ -+ mmc_claim_host(host); -+ -+ if (mmc_card_suspended(host->card)) -+ goto out; -+ -+ mmc_power_off(host); -+ mmc_card_set_suspended(host->card); -+ -+ pm_runtime_disable(&host->card->dev); -+ pm_runtime_set_suspended(&host->card->dev); -+ -+out: -+ return 0; -+} -+ - /* - * This function tries to determine if the same card is still present - * and, if so, restore all state to it. -@@ -1269,7 +1289,7 @@ static const struct mmc_bus_ops mmc_sd_ops = { - .suspend = mmc_sd_suspend, - .resume = mmc_sd_resume, - .alive = mmc_sd_alive, -- .shutdown = mmc_sd_suspend, -+ .shutdown = mmc_sd_shutdown, - .hw_reset = mmc_sd_hw_reset, - }; - --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0008-FROMGIT-dt-bindings-net-bluetooth-Add-device-tree-bi.patch b/projects/Amlogic/patches/linux/amlogic-0008-FROMGIT-dt-bindings-net-bluetooth-Add-device-tree-bi.patch deleted file mode 100644 index 19d838dec49..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0008-FROMGIT-dt-bindings-net-bluetooth-Add-device-tree-bi.patch +++ /dev/null @@ -1,39 +0,0 @@ -From ae11001b43297957b54d1ffbf05be1b1f616f065 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Tue, 21 Apr 2020 06:21:10 +0000 -Subject: [PATCH 008/156] FROMGIT: dt-bindings: net: bluetooth: Add device tree - bindings for QCA9377 - -QCA9377 is a QCA ROME device frequently found in Android TV boxes. - -Signed-off-by: Christian Hewitt ---- - Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt -index d2202791c1d4..2fec6912e160 100644 ---- a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt -+++ b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt -@@ -10,6 +10,7 @@ device the slave device is attached to. - Required properties: - - compatible: should contain one of the following: - * "qcom,qca6174-bt" -+ * "qcom,qca9377-bt" - * "qcom,wcn3990-bt" - * "qcom,wcn3991-bt" - * "qcom,wcn3998-bt" -@@ -20,6 +21,10 @@ Optional properties for compatible string qcom,qca6174-bt: - - clocks: clock provided to the controller (SUSCLK_32KHZ) - - firmware-name: specify the name of nvm firmware to load - -+Optional properties for compatible string qcom,qca9377-bt: -+ -+ - max-speed: see Documentation/devicetree/bindings/serial/serial.yaml -+ - Required properties for compatible string qcom,wcn399x-bt: - - - vddio-supply: VDD_IO supply regulator handle. --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0008-HACK-drm-panfrost-force-governor-to-performance.patch b/projects/Amlogic/patches/linux/amlogic-0008-HACK-drm-panfrost-force-governor-to-performance.patch new file mode 100644 index 00000000000..363481bd165 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0008-HACK-drm-panfrost-force-governor-to-performance.patch @@ -0,0 +1,29 @@ +From 293bbf42eebeabd97333684096b375f8423ac4dd Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Sat, 19 Dec 2020 19:14:32 +0000 +Subject: [PATCH 08/79] HACK: drm/panfrost: force governor to performance + +Kodi GUI is sluggish with ondemand, and it never seems to use higher +clock speeds. Override this and use the performance governor. + +Signed-off-by: Christian Hewitt +--- + drivers/gpu/drm/panfrost/panfrost_devfreq.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c +index f44d28fad085..102a3dc146be 100644 +--- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c ++++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c +@@ -130,7 +130,7 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev) + dev_pm_opp_put(opp); + + devfreq = devm_devfreq_add_device(dev, &panfrost_devfreq_profile, +- DEVFREQ_GOV_SIMPLE_ONDEMAND, NULL); ++ DEVFREQ_GOV_PERFORMANCE, NULL); + if (IS_ERR(devfreq)) { + DRM_DEV_ERROR(dev, "Couldn't initialize GPU devfreq\n"); + ret = PTR_ERR(devfreq); +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0009-FROMGIT-ASoC-meson-axg-tdm-interface-fix-loopback.patch b/projects/Amlogic/patches/linux/amlogic-0009-FROMGIT-ASoC-meson-axg-tdm-interface-fix-loopback.patch new file mode 100644 index 00000000000..27fdb542d38 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0009-FROMGIT-ASoC-meson-axg-tdm-interface-fix-loopback.patch @@ -0,0 +1,59 @@ +From e0f9450bbd596602eb184cd51ed3b6eed09acaa8 Mon Sep 17 00:00:00 2001 +From: Jerome Brunet +Date: Thu, 17 Dec 2020 19:03:07 +0000 +Subject: [PATCH 09/79] FROMGIT: ASoC: meson: axg-tdm-interface: fix loopback + +When the axg-tdm-interface was introduced, the backend DAI was marked as an +endpoint when DPCM was walking the DAPM graph to find a its BE. + +It is no longer the case since this +commit 8dd26dff00c0 ("ASoC: dapm: Fix handling of custom_stop_condition on DAPM graph walks") +Because of this, when DPCM finds a BE it does everything it needs on the +DAIs but it won't power up the widgets between the FE and the BE if there +is no actual endpoint after the BE. + +On meson-axg HWs, the loopback is a special DAI of the tdm-interface BE. +It is only linked to the dummy codec since there no actual HW after it. +>From the DAPM perspective, the DAI has no endpoint. Because of this, the TDM +decoder, which is a widget between the FE and BE is not powered up. + +>From the user perspective, everything seems fine but no data is produced. + +Connecting the Loopback DAI to a dummy DAPM endpoint solves the problem. + +Fixes: 8dd26dff00c0 ("ASoC: dapm: Fix handling of custom_stop_condition on DAPM graph walks") +Cc: Charles Keepax +Signed-off-by: Jerome Brunet +--- + sound/soc/meson/axg-tdm-interface.c | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/sound/soc/meson/axg-tdm-interface.c b/sound/soc/meson/axg-tdm-interface.c +index c8664ab80d45..87cac440b369 100644 +--- a/sound/soc/meson/axg-tdm-interface.c ++++ b/sound/soc/meson/axg-tdm-interface.c +@@ -467,8 +467,20 @@ static int axg_tdm_iface_set_bias_level(struct snd_soc_component *component, + return ret; + } + ++static const struct snd_soc_dapm_widget axg_tdm_iface_dapm_widgets[] = { ++ SND_SOC_DAPM_SIGGEN("Playback Signal"), ++}; ++ ++static const struct snd_soc_dapm_route axg_tdm_iface_dapm_routes[] = { ++ { "Loopback", NULL, "Playback Signal" }, ++}; ++ + static const struct snd_soc_component_driver axg_tdm_iface_component_drv = { +- .set_bias_level = axg_tdm_iface_set_bias_level, ++ .dapm_widgets = axg_tdm_iface_dapm_widgets, ++ .num_dapm_widgets = ARRAY_SIZE(axg_tdm_iface_dapm_widgets), ++ .dapm_routes = axg_tdm_iface_dapm_routes, ++ .num_dapm_routes = ARRAY_SIZE(axg_tdm_iface_dapm_routes), ++ .set_bias_level = axg_tdm_iface_set_bias_level, + }; + + static const struct of_device_id axg_tdm_iface_of_match[] = { +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0009-FROMGIT-Bluetooth-hci_qca-add-compatible-for-QCA9377.patch b/projects/Amlogic/patches/linux/amlogic-0009-FROMGIT-Bluetooth-hci_qca-add-compatible-for-QCA9377.patch deleted file mode 100644 index 6240651eb10..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0009-FROMGIT-Bluetooth-hci_qca-add-compatible-for-QCA9377.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 763a8b759e9a394acdae62ecb99d10d202c4062d Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Thu, 5 Mar 2020 04:19:18 +0000 -Subject: [PATCH 009/156] FROMGIT: Bluetooth: hci_qca: add compatible for - QCA9377 - -Add a compatible so QCA9377 devices can be defined in device-tree. - -Signed-off-by: Christian Hewitt ---- - drivers/bluetooth/hci_qca.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c -index 0b1036e5e963..27c24af739a0 100644 ---- a/drivers/bluetooth/hci_qca.c -+++ b/drivers/bluetooth/hci_qca.c -@@ -2048,6 +2048,7 @@ static SIMPLE_DEV_PM_OPS(qca_pm_ops, qca_suspend, qca_resume); - - static const struct of_device_id qca_bluetooth_of_match[] = { - { .compatible = "qcom,qca6174-bt" }, -+ { .compatible = "qcom,qca9377-bt" }, - { .compatible = "qcom,wcn3990-bt", .data = &qca_soc_data_wcn3990}, - { .compatible = "qcom,wcn3991-bt", .data = &qca_soc_data_wcn3991}, - { .compatible = "qcom,wcn3998-bt", .data = &qca_soc_data_wcn3998}, --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0010-FROMGIT-ASoC-meson-axg-tdmin-fix-axg-skew-offset.patch b/projects/Amlogic/patches/linux/amlogic-0010-FROMGIT-ASoC-meson-axg-tdmin-fix-axg-skew-offset.patch new file mode 100644 index 00000000000..425cd8b3902 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0010-FROMGIT-ASoC-meson-axg-tdmin-fix-axg-skew-offset.patch @@ -0,0 +1,53 @@ +From f035ed084e24c370281c29b43f1d7cdc8925fbfc Mon Sep 17 00:00:00 2001 +From: Jerome Brunet +Date: Thu, 17 Dec 2020 19:05:00 +0000 +Subject: [PATCH 10/79] FROMGIT: ASoC: meson: axg-tdmin: fix axg skew offset + +The signal captured on from tdm decoder of the AXG SoC is incorrect. It +appears amplified. The skew offset of the decoder is wrong. + +Setting the skew offset to 3, like the g12 and sm1 SoCs, solves and gives +correct data. + +Fixes: 13a22e6a98f8 ("ASoC: meson: add tdm input driver") +Signed-off-by: Jerome Brunet +--- + sound/soc/meson/axg-tdmin.c | 13 ++----------- + 1 file changed, 2 insertions(+), 11 deletions(-) + +diff --git a/sound/soc/meson/axg-tdmin.c b/sound/soc/meson/axg-tdmin.c +index 88ed95ae886b..b4faf9d5c1aa 100644 +--- a/sound/soc/meson/axg-tdmin.c ++++ b/sound/soc/meson/axg-tdmin.c +@@ -224,15 +224,6 @@ static const struct axg_tdm_formatter_ops axg_tdmin_ops = { + }; + + static const struct axg_tdm_formatter_driver axg_tdmin_drv = { +- .component_drv = &axg_tdmin_component_drv, +- .regmap_cfg = &axg_tdmin_regmap_cfg, +- .ops = &axg_tdmin_ops, +- .quirks = &(const struct axg_tdm_formatter_hw) { +- .skew_offset = 2, +- }, +-}; +- +-static const struct axg_tdm_formatter_driver g12a_tdmin_drv = { + .component_drv = &axg_tdmin_component_drv, + .regmap_cfg = &axg_tdmin_regmap_cfg, + .ops = &axg_tdmin_ops, +@@ -247,10 +238,10 @@ static const struct of_device_id axg_tdmin_of_match[] = { + .data = &axg_tdmin_drv, + }, { + .compatible = "amlogic,g12a-tdmin", +- .data = &g12a_tdmin_drv, ++ .data = &axg_tdmin_drv, + }, { + .compatible = "amlogic,sm1-tdmin", +- .data = &g12a_tdmin_drv, ++ .data = &axg_tdmin_drv, + }, {} + }; + MODULE_DEVICE_TABLE(of, axg_tdmin_of_match); +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0010-FROMGIT-Bluetooth-hci_qca-allow-max-speed-to-be-set-.patch b/projects/Amlogic/patches/linux/amlogic-0010-FROMGIT-Bluetooth-hci_qca-allow-max-speed-to-be-set-.patch deleted file mode 100644 index c21ad715a8d..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0010-FROMGIT-Bluetooth-hci_qca-allow-max-speed-to-be-set-.patch +++ /dev/null @@ -1,61 +0,0 @@ -From e2d049bb10b4a35ba06259ee89ff366f23fbc69e Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Tue, 21 Apr 2020 01:00:14 +0000 -Subject: [PATCH 010/156] FROMGIT: Bluetooth: hci_qca: allow max-speed to be - set for QCA9377 devices - -Move the read of max-speed from device-tree out of the qca_is_wcn399x -if block so oper_speed can be set for QCA9377 devices as well. - -Suggested-by: Abhishek Pandit-Subedi -Signed-off-by: Christian Hewitt ---- - drivers/bluetooth/hci_qca.c | 16 +++++++++------- - 1 file changed, 9 insertions(+), 7 deletions(-) - -diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c -index 27c24af739a0..3b47635bdf66 100644 ---- a/drivers/bluetooth/hci_qca.c -+++ b/drivers/bluetooth/hci_qca.c -@@ -596,10 +596,12 @@ static int qca_open(struct hci_uart *hu) - - if (hu->serdev) { - qcadev = serdev_device_get_drvdata(hu->serdev); -- if (qca_is_wcn399x(qcadev->btsoc_type)) { -+ -+ if (qca_is_wcn399x(qcadev->btsoc_type)) - hu->init_speed = qcadev->init_speed; -+ -+ if (qcadev->oper_speed) - hu->oper_speed = qcadev->oper_speed; -- } - } - - timer_setup(&qca->wake_retrans_timer, hci_ibs_wake_retrans_timeout, 0); -@@ -1865,6 +1867,11 @@ static int qca_serdev_probe(struct serdev_device *serdev) - serdev_device_set_drvdata(serdev, qcadev); - device_property_read_string(&serdev->dev, "firmware-name", - &qcadev->firmware_name); -+ device_property_read_u32(&serdev->dev, "max-speed", -+ &qcadev->oper_speed); -+ if (!qcadev->oper_speed) -+ BT_DBG("UART will pick default operating speed"); -+ - if (data && qca_is_wcn399x(data->soc_type)) { - qcadev->btsoc_type = data->soc_type; - qcadev->bt_power = devm_kzalloc(&serdev->dev, -@@ -1889,11 +1896,6 @@ static int qca_serdev_probe(struct serdev_device *serdev) - return PTR_ERR(qcadev->susclk); - } - -- device_property_read_u32(&serdev->dev, "max-speed", -- &qcadev->oper_speed); -- if (!qcadev->oper_speed) -- BT_DBG("UART will pick default operating speed"); -- - err = hci_uart_register_device(&qcadev->serdev_hu, &qca_proto); - if (err) { - BT_ERR("wcn3990 serdev registration failed"); --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0011-FROMGIT-arm64-dts-amlogic-meson-g12-Set-FL-adj-prope.patch b/projects/Amlogic/patches/linux/amlogic-0011-FROMGIT-arm64-dts-amlogic-meson-g12-Set-FL-adj-prope.patch new file mode 100644 index 00000000000..080935bf58d --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0011-FROMGIT-arm64-dts-amlogic-meson-g12-Set-FL-adj-prope.patch @@ -0,0 +1,37 @@ +From 2d4d5eed504288fb2dfbc748bf0f14247107338f Mon Sep 17 00:00:00 2001 +From: Serge Semin +Date: Mon, 11 Jan 2021 14:45:19 +0000 +Subject: [PATCH 11/79] FROMGIT: arm64: dts: amlogic: meson-g12: Set FL-adj + property value + +In accordance with the DWC USB3 bindings the property is supposed to have +uint32 type. It's erroneous from the DT schema and driver points of view +to declare it as boolean. As Neil suggested set it to 0x20 so not break +the platform and to make the dtbs checker happy. + +Signed-off-by: Serge Semin +Reviewed-by: Martin Blumenstingl +Reviewed-by: Neil Armstrong +Reviewed-by: Krzysztof Kozlowski +Fixes: 9baf7d6be730 ("arm64: dts: meson: g12a: Add G12A USB nodes") +Signed-off-by: Kevin Hilman +--- + arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +index 9f79f594c6a7..85def57463db 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi ++++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +@@ -2390,7 +2390,7 @@ + interrupts = ; + dr_mode = "host"; + snps,dis_u2_susphy_quirk; +- snps,quirk-frame-length-adjustment; ++ snps,quirk-frame-length-adjustment = <0x20>; + snps,parkmode-disable-ss-quirk; + }; + }; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0011-FROMGIT-arm64-dts-meson-S922X-extend-cpu-opp-points.patch b/projects/Amlogic/patches/linux/amlogic-0011-FROMGIT-arm64-dts-meson-S922X-extend-cpu-opp-points.patch deleted file mode 100644 index e59521b0bcd..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0011-FROMGIT-arm64-dts-meson-S922X-extend-cpu-opp-points.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 8444d8f5d9133e1061b62fc15962522b8190b11a Mon Sep 17 00:00:00 2001 -From: Tim Lewis -Date: Sun, 26 Apr 2020 12:21:19 -0400 -Subject: [PATCH 011/156] FROMGIT: arm64: dts: meson: S922X: extend cpu - opp-points - -Add extra cpu pop points to allow mild overclock on S922X. The opp -points are found in Hardkernel N2 sources [1] and testing shows no -obvious issues on other S922X devices. Thermal throttling should -keep things in-check if needed. - -[1] https://github.com/hardkernel/linux/commit/f86cd9487c7483b2a05f448b9ebacf6bd5a2ad2f - -Signed-off-by: Tim Lewis -Signed-off-by: Kevin Hilman -Tested-by: Christian Hewitt -Reviewed-by: Neil Armstrong -Link: https://lore.kernel.org/r/20200426162119.GA23268@imac ---- - arch/arm64/boot/dts/amlogic/meson-g12b-s922x.dtsi | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-s922x.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-s922x.dtsi -index 046cc332d07f..1e5d0ee5d541 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-g12b-s922x.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-s922x.dtsi -@@ -65,6 +65,11 @@ - opp-hz = /bits/ 64 <1896000000>; - opp-microvolt = <981000>; - }; -+ -+ opp-1992000000 { -+ opp-hz = /bits/ 64 <1992000000>; -+ opp-microvolt = <1001000>; -+ }; - }; - - cpub_opp_table_1: opp-table-1 { -@@ -120,5 +125,15 @@ - opp-hz = /bits/ 64 <1704000000>; - opp-microvolt = <891000>; - }; -+ -+ opp-1800000000 { -+ opp-hz = /bits/ 64 <1800000000>; -+ opp-microvolt = <981000>; -+ }; -+ -+ opp-1908000000 { -+ opp-hz = /bits/ 64 <1908000000>; -+ opp-microvolt = <1022000>; -+ }; - }; - }; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0012-FROMGIT-arm64-dts-meson-Fix-schema-warnings-for-pwm-.patch b/projects/Amlogic/patches/linux/amlogic-0012-FROMGIT-arm64-dts-meson-Fix-schema-warnings-for-pwm-.patch new file mode 100644 index 00000000000..d535b606efe --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0012-FROMGIT-arm64-dts-meson-Fix-schema-warnings-for-pwm-.patch @@ -0,0 +1,85 @@ +From 5b1d18153478ce0bb436e9caded357b7d5ab44f9 Mon Sep 17 00:00:00 2001 +From: Alexander Dahl +Date: Mon, 11 Jan 2021 14:47:38 +0000 +Subject: [PATCH 12/79] FROMGIT: arm64: dts: meson: Fix schema warnings for + pwm-leds + +The node names for devices using the pwm-leds driver follow a certain +naming scheme (now). Parent node name is not enforced, but recommended +by DT project. + +Signed-off-by: Alexander Dahl +Reviewed-by: Neil Armstrong +Signed-off-by: Kevin Hilman +--- + .../arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 4 ++-- + arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 4 ++-- + arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts | 8 ++++---- + 3 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts +index 6fe589cd2ba2..45adae480a3d 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts +@@ -42,10 +42,10 @@ + }; + }; + +- pwmleds { ++ led-controller { + compatible = "pwm-leds"; + +- power { ++ led-1 { + label = "vim:red:power"; + pwms = <&pwm_AO_ab 1 7812500 0>; + max-brightness = <255>; +diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +index bf9877d33427..25857e0c0831 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +@@ -81,10 +81,10 @@ + }; + }; + +- pwmleds { ++ led-controller { + compatible = "pwm-leds"; + +- power { ++ led-1 { + label = "vim:red:power"; + pwms = <&pwm_AO_ab 1 7812500 0>; + max-brightness = <255>; +diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts +index 5ab139a34c01..039a8d0d1e9b 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts +@@ -101,20 +101,20 @@ + }; + }; + +- leds { ++ led-controller-1 { + compatible = "gpio-leds"; + +- led-bluetooth { ++ led-1 { + label = "sei610:blue:bt"; + gpios = <&gpio GPIOC_7 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; + default-state = "off"; + }; + }; + +- pwmleds { ++ led-controller-2 { + compatible = "pwm-leds"; + +- power { ++ led-2 { + label = "sei610:red:power"; + pwms = <&pwm_AO_ab 0 30518 0>; + max-brightness = <255>; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0012-FROMGIT-arm64-dts-meson-kvim3-move-hdmi-to-tdm-a.patch b/projects/Amlogic/patches/linux/amlogic-0012-FROMGIT-arm64-dts-meson-kvim3-move-hdmi-to-tdm-a.patch deleted file mode 100644 index bcc7e2472b4..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0012-FROMGIT-arm64-dts-meson-kvim3-move-hdmi-to-tdm-a.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 68b4683a553a622e585715061327b82939b0792b Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Tue, 21 Apr 2020 16:18:14 +0200 -Subject: [PATCH 012/156] FROMGIT: arm64: dts: meson: kvim3: move hdmi to tdm a - -The tdmout b is physically routed to the 40 pin header and the tdmout c -is routed to the m2 connector. It makes these interfaces poor -candidates to handle the HDMI 8ch i2s link (2ch i2s * 4 lanes) as it would -force the same link format on the related connectors. - -Instead use the TDM A interface. This one is not routed to the outside -world on the vim3, so it can only be used for HDMI. - -Signed-off-by: Jerome Brunet -Signed-off-by: Kevin Hilman -Link: https://lore.kernel.org/r/20200421141814.639480-1-jbrunet@baylibre.com ---- - .../dts/amlogic/meson-g12b-khadas-vim3.dtsi | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-khadas-vim3.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-khadas-vim3.dtsi -index c6c8caed8327..224c890d32d3 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-g12b-khadas-vim3.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-khadas-vim3.dtsi -@@ -51,11 +51,11 @@ - sound { - compatible = "amlogic,axg-sound-card"; - model = "G12B-KHADAS-VIM3"; -- audio-aux-devs = <&tdmout_b>; -- audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", -- "TDMOUT_B IN 1", "FRDDR_B OUT 1", -- "TDMOUT_B IN 2", "FRDDR_C OUT 1", -- "TDM_B Playback", "TDMOUT_B OUT"; -+ audio-aux-devs = <&tdmout_a>; -+ audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0", -+ "TDMOUT_A IN 1", "FRDDR_B OUT 0", -+ "TDMOUT_A IN 2", "FRDDR_C OUT 0", -+ "TDM_A Playback", "TDMOUT_A OUT"; - - assigned-clocks = <&clkc CLKID_MPLL2>, - <&clkc CLKID_MPLL0>, -@@ -80,7 +80,7 @@ - - /* 8ch hdmi interface */ - dai-link-3 { -- sound-dai = <&tdmif_b>; -+ sound-dai = <&tdmif_a>; - dai-format = "i2s"; - dai-tdm-slot-tx-mask-0 = <1 1>; - dai-tdm-slot-tx-mask-1 = <1 1>; -@@ -89,7 +89,7 @@ - mclk-fs = <256>; - - codec { -- sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; -+ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>; - }; - }; - -@@ -182,11 +182,11 @@ - status = "okay"; - }; - --&tdmif_b { -+&tdmif_a { - status = "okay"; - }; - --&tdmout_b { -+&tdmout_a { - status = "okay"; - }; - --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0013-FROMGIT-arm64-dts-meson-vim3-whitespace-fixups.patch b/projects/Amlogic/patches/linux/amlogic-0013-FROMGIT-arm64-dts-meson-vim3-whitespace-fixups.patch new file mode 100644 index 00000000000..d0d20db1e44 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0013-FROMGIT-arm64-dts-meson-vim3-whitespace-fixups.patch @@ -0,0 +1,60 @@ +From ae6f50b1d2b5881739d65713238d79237ab016a9 Mon Sep 17 00:00:00 2001 +From: Jerome Brunet +Date: Fri, 4 Dec 2020 14:48:41 +0100 +Subject: [PATCH 13/79] FROMGIT: arm64: dts: meson: vim3: whitespace fixups + +Spaces have been used to indent 2 nodes. +Replace those with tabs and remove one extra newline + +Signed-off-by: Jerome Brunet +--- + .../boot/dts/amlogic/meson-khadas-vim3.dtsi | 19 +++++++++---------- + 1 file changed, 9 insertions(+), 10 deletions(-) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi +index 8f8656262ae7..d3b25163b421 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi ++++ b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi +@@ -283,12 +283,12 @@ + }; + + ðmac { +- pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; +- pinctrl-names = "default"; +- status = "okay"; +- phy-mode = "rgmii"; +- phy-handle = <&external_phy>; +- amlogic,tx-delay-ns = <2>; ++ pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; ++ pinctrl-names = "default"; ++ status = "okay"; ++ phy-mode = "rgmii"; ++ phy-handle = <&external_phy>; ++ amlogic,tx-delay-ns = <2>; + }; + + &frddr_a { +@@ -354,9 +354,9 @@ + }; + + &pwm_ef { +- status = "okay"; +- pinctrl-0 = <&pwm_e_pins>; +- pinctrl-names = "default"; ++ status = "okay"; ++ pinctrl-0 = <&pwm_e_pins>; ++ pinctrl-names = "default"; + }; + + &saradc { +@@ -450,7 +450,6 @@ + }; + }; + +- + &tdmif_a { + status = "okay"; + }; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0013-FROMGIT-dt-bindings-sram-Add-Amlogic-SCP-SRAM-compat.patch b/projects/Amlogic/patches/linux/amlogic-0013-FROMGIT-dt-bindings-sram-Add-Amlogic-SCP-SRAM-compat.patch deleted file mode 100644 index 7dbd18d70a1..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0013-FROMGIT-dt-bindings-sram-Add-Amlogic-SCP-SRAM-compat.patch +++ /dev/null @@ -1,29 +0,0 @@ -From b03284d1862da4875003a0662081eea91ec47f3c Mon Sep 17 00:00:00 2001 -From: Neil Armstrong -Date: Thu, 26 Mar 2020 17:46:45 +0100 -Subject: [PATCH 013/156] FROMGIT: dt-bindings: sram: Add Amlogic SCP SRAM - compatibles - -Add compatibles for the Amlogic SCP SRAM memory zones. - -Signed-off-by: Neil Armstrong ---- - Documentation/devicetree/bindings/sram/sram.yaml | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/Documentation/devicetree/bindings/sram/sram.yaml b/Documentation/devicetree/bindings/sram/sram.yaml -index 7b83cc6c9bfa..0aea3d239a48 100644 ---- a/Documentation/devicetree/bindings/sram/sram.yaml -+++ b/Documentation/devicetree/bindings/sram/sram.yaml -@@ -73,6 +73,8 @@ patternProperties: - - allwinner,sun50i-a64-sram-c - - amlogic,meson8-smp-sram - - amlogic,meson8b-smp-sram -+ - amlogic,meson-gxbb-scp-shmem -+ - amlogic,meson-axg-scp-shmem - - renesas,smp-sram - - rockchip,rk3066-smp-sram - - samsung,exynos4210-sysram --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0014-FROMGIT-arm64-defconfig-enable-meson-gx-audio-as-mod.patch b/projects/Amlogic/patches/linux/amlogic-0014-FROMGIT-arm64-defconfig-enable-meson-gx-audio-as-mod.patch deleted file mode 100644 index b7f72bf5255..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0014-FROMGIT-arm64-defconfig-enable-meson-gx-audio-as-mod.patch +++ /dev/null @@ -1,44 +0,0 @@ -From aadd713ceaf3b515f04a4e8e03251b3fa11b5848 Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Tue, 21 Apr 2020 18:39:30 +0200 -Subject: [PATCH 014/156] FROMGIT: arm64: defconfig: enable meson gx audio as - module - -Enable the module config for the Amlogic GX audio card. -This module will imply the internal components usually associated -with it to make a functional sound card on these platforms. - -Also enable the simple amplifier module which often used on the -output stage of those cards. - -Signed-off-by: Jerome Brunet -Signed-off-by: Kevin Hilman -Tested-by: Christian Hewitt -Link: https://lore.kernel.org/r/20200421163935.775935-2-jbrunet@baylibre.com ---- - arch/arm64/configs/defconfig | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig -index 03d0189f7d68..ceb60ee9c340 100644 ---- a/arch/arm64/configs/defconfig -+++ b/arch/arm64/configs/defconfig -@@ -644,6 +644,7 @@ CONFIG_SND_HDA_CODEC_HDMI=m - CONFIG_SND_SOC=y - CONFIG_SND_BCM2835_SOC_I2S=m - CONFIG_SND_MESON_AXG_SOUND_CARD=m -+CONFIG_SND_MESON_GX_SOUND_CARD=m - CONFIG_SND_SOC_SDM845=m - CONFIG_SND_SOC_ROCKCHIP=m - CONFIG_SND_SOC_ROCKCHIP_SPDIF=m -@@ -656,6 +657,7 @@ CONFIG_SND_SOC_AK4613=m - CONFIG_SND_SOC_ES7134=m - CONFIG_SND_SOC_ES7241=m - CONFIG_SND_SOC_PCM3168A_I2C=m -+CONFIG_SND_SOC_SIMPLE_AMPLIFIER=m - CONFIG_SND_SOC_TAS571X=m - CONFIG_SND_SOC_WCD934X=m - CONFIG_SND_SOC_WSA881X=m --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0014-FROMGIT-clk-meson-clk-pll-fix-initializing-the-old-r.patch b/projects/Amlogic/patches/linux/amlogic-0014-FROMGIT-clk-meson-clk-pll-fix-initializing-the-old-r.patch new file mode 100644 index 00000000000..c14f74494da --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0014-FROMGIT-clk-meson-clk-pll-fix-initializing-the-old-r.patch @@ -0,0 +1,32 @@ +From 1ccea9de12033004d440f7aad8eb3c62fe8d45a8 Mon Sep 17 00:00:00 2001 +From: Martin Blumenstingl +Date: Sat, 26 Dec 2020 23:34:18 +0000 +Subject: [PATCH 14/79] FROMGIT: clk: meson: clk-pll: fix initializing the old + rate (fallback) for a PLL + +The "rate" parameter in meson_clk_pll_set_rate() contains the new rate. +Retrieve the old rate with clk_hw_get_rate() so we don't inifinitely try +to switch from the new rate to the same ratte again. + +Fixes: 7a29a869434e8b ("clk: meson: Add support for Meson clock controller") +Signed-off-by: Martin Blumenstingl +--- + drivers/clk/meson/clk-pll.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/clk/meson/clk-pll.c b/drivers/clk/meson/clk-pll.c +index b17a13e9337c..9404609b5ebf 100644 +--- a/drivers/clk/meson/clk-pll.c ++++ b/drivers/clk/meson/clk-pll.c +@@ -371,7 +371,7 @@ static int meson_clk_pll_set_rate(struct clk_hw *hw, unsigned long rate, + if (parent_rate == 0 || rate == 0) + return -EINVAL; + +- old_rate = rate; ++ old_rate = clk_hw_get_rate(hw); + + ret = meson_clk_get_pll_settings(rate, parent_rate, &m, &n, pll); + if (ret) +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0015-FROMGIT-arm64-dts-meson-gx-add-aiu-support.patch b/projects/Amlogic/patches/linux/amlogic-0015-FROMGIT-arm64-dts-meson-gx-add-aiu-support.patch deleted file mode 100644 index 28fbccd35fe..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0015-FROMGIT-arm64-dts-meson-gx-add-aiu-support.patch +++ /dev/null @@ -1,121 +0,0 @@ -From 4ce33650c52b51f1893841641e6cd8c254bb33d9 Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Tue, 21 Apr 2020 18:39:31 +0200 -Subject: [PATCH 015/156] FROMGIT: arm64: dts: meson-gx: add aiu support - -Add the AIU audio device to the Amlogic GX SoC family DT. -ATM, this device provides the i2s and spdif output stages and also -the hdmi and internal codec glues. - -Signed-off-by: Jerome Brunet -Signed-off-by: Kevin Hilman -Tested-by: Christian Hewitt -Link: https://lore.kernel.org/r/20200421163935.775935-3-jbrunet@baylibre.com ---- - arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 13 ++++++++++++ - arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 23 +++++++++++++++++++++ - arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 23 +++++++++++++++++++++ - 3 files changed, 59 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi -index ea4dac8506bc..4045f51ac572 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi -@@ -284,6 +284,17 @@ - #reset-cells = <1>; - }; - -+ aiu: audio-controller@5400 { -+ compatible = "amlogic,aiu"; -+ #sound-dai-cells = <2>; -+ sound-name-prefix = "AIU"; -+ reg = <0x0 0x5400 0x0 0x2ac>; -+ interrupts = , -+ ; -+ interrupt-names = "i2s", "spdif"; -+ status = "disabled"; -+ }; -+ - uart_A: serial@84c0 { - compatible = "amlogic,meson-gx-uart"; - reg = <0x0 0x84c0 0x0 0x18>; -@@ -632,6 +643,8 @@ - interrupts = ; - #address-cells = <1>; - #size-cells = <0>; -+ #sound-dai-cells = <0>; -+ sound-name-prefix = "HDMITX"; - status = "disabled"; - - /* VPU VENC Input */ -diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi -index 0cb40326b0d3..234490d3ee68 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi -@@ -60,6 +60,29 @@ - }; - }; - -+&aiu { -+ compatible = "amlogic,aiu-gxbb", "amlogic,aiu"; -+ clocks = <&clkc CLKID_AIU_GLUE>, -+ <&clkc CLKID_I2S_OUT>, -+ <&clkc CLKID_AOCLK_GATE>, -+ <&clkc CLKID_CTS_AMCLK>, -+ <&clkc CLKID_MIXER_IFACE>, -+ <&clkc CLKID_IEC958>, -+ <&clkc CLKID_IEC958_GATE>, -+ <&clkc CLKID_CTS_MCLK_I958>, -+ <&clkc CLKID_CTS_I958>; -+ clock-names = "pclk", -+ "i2s_pclk", -+ "i2s_aoclk", -+ "i2s_mclk", -+ "i2s_mixer", -+ "spdif_pclk", -+ "spdif_aoclk", -+ "spdif_mclk", -+ "spdif_mclk_sel"; -+ resets = <&reset RESET_AIU>; -+}; -+ - &aobus { - pinctrl_aobus: pinctrl@14 { - compatible = "amlogic,meson-gxbb-aobus-pinctrl"; -diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi -index 259d86399390..d9f00c5a9a5c 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi -@@ -49,6 +49,29 @@ - }; - }; - -+&aiu { -+ compatible = "amlogic,aiu-gxl", "amlogic,aiu"; -+ clocks = <&clkc CLKID_AIU_GLUE>, -+ <&clkc CLKID_I2S_OUT>, -+ <&clkc CLKID_AOCLK_GATE>, -+ <&clkc CLKID_CTS_AMCLK>, -+ <&clkc CLKID_MIXER_IFACE>, -+ <&clkc CLKID_IEC958>, -+ <&clkc CLKID_IEC958_GATE>, -+ <&clkc CLKID_CTS_MCLK_I958>, -+ <&clkc CLKID_CTS_I958>; -+ clock-names = "pclk", -+ "i2s_pclk", -+ "i2s_aoclk", -+ "i2s_mclk", -+ "i2s_mixer", -+ "spdif_pclk", -+ "spdif_aoclk", -+ "spdif_mclk", -+ "spdif_mclk_sel"; -+ resets = <&reset RESET_AIU>; -+}; -+ - &apb { - usb2_phy0: phy@78000 { - compatible = "amlogic,meson-gxl-usb2-phy"; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0015-FROMGIT-clk-meson-clk-pll-make-ret-a-signed-integer.patch b/projects/Amlogic/patches/linux/amlogic-0015-FROMGIT-clk-meson-clk-pll-make-ret-a-signed-integer.patch new file mode 100644 index 00000000000..4227b65ee49 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0015-FROMGIT-clk-meson-clk-pll-make-ret-a-signed-integer.patch @@ -0,0 +1,35 @@ +From 4531d5040a1d6c04cffc76684f9dfcf65bd7d87e Mon Sep 17 00:00:00 2001 +From: Martin Blumenstingl +Date: Sat, 26 Dec 2020 23:35:18 +0000 +Subject: [PATCH 15/79] FROMGIT: clk: meson: clk-pll: make "ret" a signed + integer + +The error codes returned by meson_clk_get_pll_settings() are all +negative. Make "ret" a signed integer in meson_clk_pll_set_rate() to +make it match with the clk_ops.set_rate API as well as the data type +returned by meson_clk_get_pll_settings(). + +Fixes: 8eed1db1adec6a ("clk: meson: pll: update driver for the g12a") +Signed-off-by: Martin Blumenstingl +--- + drivers/clk/meson/clk-pll.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/clk/meson/clk-pll.c b/drivers/clk/meson/clk-pll.c +index 9404609b5ebf..5b932976483f 100644 +--- a/drivers/clk/meson/clk-pll.c ++++ b/drivers/clk/meson/clk-pll.c +@@ -365,8 +365,9 @@ static int meson_clk_pll_set_rate(struct clk_hw *hw, unsigned long rate, + { + struct clk_regmap *clk = to_clk_regmap(hw); + struct meson_clk_pll_data *pll = meson_clk_pll_data(clk); +- unsigned int enabled, m, n, frac = 0, ret; ++ unsigned int enabled, m, n, frac = 0; + unsigned long old_rate; ++ int ret; + + if (parent_rate == 0 || rate == 0) + return -EINVAL; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0016-FROMGIT-arm64-dts-meson-p230-q200-add-initial-audio-.patch b/projects/Amlogic/patches/linux/amlogic-0016-FROMGIT-arm64-dts-meson-p230-q200-add-initial-audio-.patch deleted file mode 100644 index 4e0833bae07..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0016-FROMGIT-arm64-dts-meson-p230-q200-add-initial-audio-.patch +++ /dev/null @@ -1,107 +0,0 @@ -From 9132d7f6d3753eceecd18d7e660fcffb12da9ffe Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Tue, 21 Apr 2020 18:39:32 +0200 -Subject: [PATCH 016/156] FROMGIT: arm64: dts: meson: p230-q200: add initial - audio playback support - -Add basic audio support on the p230/q200 reference design. -This initial support is limited to HDMI i2s and SPDIF (LPCM). - -Signed-off-by: Jerome Brunet -Signed-off-by: Kevin Hilman -Tested-by: Christian Hewitt -Link: https://lore.kernel.org/r/20200421163935.775935-4-jbrunet@baylibre.com ---- - .../boot/dts/amlogic/meson-gx-p23x-q20x.dtsi | 63 +++++++++++++++++++ - 1 file changed, 63 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi -index 12d5e333e5f2..99c1f7f9d37e 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi -@@ -8,12 +8,21 @@ - * the pin-compatible S912 (GXM) or S905D (GXL) SoCs. - */ - -+#include -+ - / { - aliases { - serial0 = &uart_AO; - ethernet0 = ðmac; - }; - -+ spdif_dit: audio-codec-0 { -+ #sound-dai-cells = <0>; -+ compatible = "linux,spdif-dit"; -+ status = "okay"; -+ sound-name-prefix = "DIT"; -+ }; -+ - chosen { - stdout-path = "serial0:115200n8"; - }; -@@ -102,6 +111,60 @@ - }; - }; - }; -+ -+ sound { -+ compatible = "amlogic,gx-sound-card"; -+ model = "GX-P230-Q200"; -+ assigned-clocks = <&clkc CLKID_MPLL0>, -+ <&clkc CLKID_MPLL1>, -+ <&clkc CLKID_MPLL2>; -+ assigned-clock-parents = <0>, <0>, <0>; -+ assigned-clock-rates = <294912000>, -+ <270950400>, -+ <393216000>; -+ status = "okay"; -+ -+ dai-link-0 { -+ sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; -+ }; -+ -+ dai-link-1 { -+ sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>; -+ }; -+ -+ dai-link-2 { -+ sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; -+ dai-format = "i2s"; -+ mclk-fs = <256>; -+ -+ codec-0 { -+ sound-dai = <&aiu AIU_HDMI CTRL_I2S>; -+ }; -+ }; -+ -+ dai-link-3 { -+ sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>; -+ -+ codec-0 { -+ sound-dai = <&spdif_dit>; -+ }; -+ }; -+ -+ dai-link-4 { -+ sound-dai = <&aiu AIU_HDMI CTRL_OUT>; -+ -+ codec-0 { -+ sound-dai = <&hdmi_tx>; -+ }; -+ }; -+ }; -+}; -+ -+&aiu { -+ status = "okay"; -+ pinctrl-0 = <&spdif_out_h_pins>; -+ pinctrl-names = "default"; -+ - }; - - &cec_AO { --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0016-FROMGIT-clk-meson-clk-pll-propagate-the-error-from-m.patch b/projects/Amlogic/patches/linux/amlogic-0016-FROMGIT-clk-meson-clk-pll-propagate-the-error-from-m.patch new file mode 100644 index 00000000000..3aeb0689b14 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0016-FROMGIT-clk-meson-clk-pll-propagate-the-error-from-m.patch @@ -0,0 +1,41 @@ +From 6c888b9a837e8e9e40bb72479744c8b8f25ad456 Mon Sep 17 00:00:00 2001 +From: Martin Blumenstingl +Date: Sat, 26 Dec 2020 23:36:09 +0000 +Subject: [PATCH 16/79] FROMGIT: clk: meson: clk-pll: propagate the error from + meson_clk_pll_set_rate() + +Popagate the error code from meson_clk_pll_set_rate() when the PLL does +not lock with the new settings. + +Fixes: 722825dcd54b2e ("clk: meson: migrate plls clocks to clk_regmap") +Signed-off-by: Martin Blumenstingl +--- + drivers/clk/meson/clk-pll.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/drivers/clk/meson/clk-pll.c b/drivers/clk/meson/clk-pll.c +index 5b932976483f..49f27fe53213 100644 +--- a/drivers/clk/meson/clk-pll.c ++++ b/drivers/clk/meson/clk-pll.c +@@ -394,7 +394,8 @@ static int meson_clk_pll_set_rate(struct clk_hw *hw, unsigned long rate, + if (!enabled) + return 0; + +- if (meson_clk_pll_enable(hw)) { ++ ret = meson_clk_pll_enable(hw); ++ if (ret) { + pr_warn("%s: pll did not lock, trying to restore old rate %lu\n", + __func__, old_rate); + /* +@@ -406,7 +407,7 @@ static int meson_clk_pll_set_rate(struct clk_hw *hw, unsigned long rate, + meson_clk_pll_set_rate(hw, old_rate, parent_rate); + } + +- return 0; ++ return ret; + } + + /* +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0017-FROMGIT-arm64-dts-meson-libretech-cc-add-initial-aud.patch b/projects/Amlogic/patches/linux/amlogic-0017-FROMGIT-arm64-dts-meson-libretech-cc-add-initial-aud.patch deleted file mode 100644 index 29f56fee999..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0017-FROMGIT-arm64-dts-meson-libretech-cc-add-initial-aud.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 40f98dae93d648fd915d5f1c57a3f8fbe8ed708f Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Tue, 21 Apr 2020 18:39:33 +0200 -Subject: [PATCH 017/156] FROMGIT: arm64: dts: meson: libretech-cc: add initial - audio playback support - -Add initial audio support limited to HDMI i2s. - -Signed-off-by: Jerome Brunet -Signed-off-by: Kevin Hilman -Tested-by: Christian Hewitt -Link: https://lore.kernel.org/r/20200421163935.775935-5-jbrunet@baylibre.com ---- - .../amlogic/meson-gxl-s905x-libretech-cc.dts | 40 +++++++++++++++++++ - 1 file changed, 40 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts -index a4a71c13891b..2b821c501065 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts -@@ -8,6 +8,7 @@ - /dts-v1/; - - #include -+#include - - #include "meson-gxl-s905x.dtsi" - -@@ -124,6 +125,45 @@ - regulator-max-microvolt = <1800000>; - vin-supply = <&vcc_3v3>; - }; -+ -+ sound { -+ compatible = "amlogic,gx-sound-card"; -+ model = "GXL-LIBRETECH-S905X-CC"; -+ assigned-clocks = <&clkc CLKID_MPLL0>, -+ <&clkc CLKID_MPLL1>, -+ <&clkc CLKID_MPLL2>; -+ assigned-clock-parents = <0>, <0>, <0>; -+ assigned-clock-rates = <294912000>, -+ <270950400>, -+ <393216000>; -+ status = "okay"; -+ -+ dai-link-0 { -+ sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; -+ }; -+ -+ dai-link-1 { -+ sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; -+ dai-format = "i2s"; -+ mclk-fs = <256>; -+ -+ codec-0 { -+ sound-dai = <&aiu AIU_HDMI CTRL_I2S>; -+ }; -+ }; -+ -+ dai-link-2 { -+ sound-dai = <&aiu AIU_HDMI CTRL_OUT>; -+ -+ codec-0 { -+ sound-dai = <&hdmi_tx>; -+ }; -+ }; -+ }; -+}; -+ -+&aiu { -+ status = "okay"; - }; - - &cec_AO { --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0017-FROMGIT-dt-bindings-net-dwmac-meson-use-picoseconds-.patch b/projects/Amlogic/patches/linux/amlogic-0017-FROMGIT-dt-bindings-net-dwmac-meson-use-picoseconds-.patch new file mode 100644 index 00000000000..0a5a7c4abab --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0017-FROMGIT-dt-bindings-net-dwmac-meson-use-picoseconds-.patch @@ -0,0 +1,97 @@ +From b3c25d5936f587b6dcdbebfbd1f7e424713defa6 Mon Sep 17 00:00:00 2001 +From: Martin Blumenstingl +Date: Sat, 14 Nov 2020 17:37:09 +0100 +Subject: [PATCH 17/79] FROMGIT: dt-bindings: net: dwmac-meson: use picoseconds + for the RGMII RX delay + +Amlogic Meson G12A, G12B and SM1 SoCs have a more advanced RGMII RX +delay register which allows picoseconds precision. Deprecate the old +"amlogic,rx-delay-ns" in favour of the generic "rx-internal-delay-ps" +property. + +For older SoCs the only known supported values were 0ns and 2ns. The new +SoCs have support for RGMII RX delays between 0ps and 3000ps in 200ps +steps. + +Don't carry over the description for the "rx-internal-delay-ps" property +and inherit that from ethernet-controller.yaml instead. + +Signed-off-by: Martin Blumenstingl +--- + .../bindings/net/amlogic,meson-dwmac.yaml | 55 +++++++++++++++++-- + 1 file changed, 49 insertions(+), 6 deletions(-) + +diff --git a/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml b/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml +index 1f133f4a2924..0467441d7037 100644 +--- a/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml ++++ b/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml +@@ -74,17 +74,60 @@ allOf: + Any configuration is ignored when the phy-mode is set to "rmii". + + amlogic,rx-delay-ns: ++ deprecated: true + enum: + - 0 + - 2 + default: 0 + description: +- The internal RGMII RX clock delay (provided by this IP block) in +- nanoseconds. When phy-mode is set to "rgmii" then the RX delay +- should be explicitly configured. When the phy-mode is set to +- either "rgmii-id" or "rgmii-rxid" the RX clock delay is already +- provided by the PHY. Any configuration is ignored when the +- phy-mode is set to "rmii". ++ The internal RGMII RX clock delay in nanoseconds. Deprecated, use ++ rx-internal-delay-ps instead. ++ ++ rx-internal-delay-ps: ++ default: 0 ++ ++ - if: ++ properties: ++ compatible: ++ contains: ++ enum: ++ - amlogic,meson8b-dwmac ++ - amlogic,meson8m2-dwmac ++ - amlogic,meson-gxbb-dwmac ++ - amlogic,meson-axg-dwmac ++ then: ++ properties: ++ rx-internal-delay-ps: ++ enum: ++ - 0 ++ - 2000 ++ ++ - if: ++ properties: ++ compatible: ++ contains: ++ enum: ++ - amlogic,meson-g12a-dwmac ++ then: ++ properties: ++ rx-internal-delay-ps: ++ enum: ++ - 0 ++ - 200 ++ - 400 ++ - 600 ++ - 800 ++ - 1000 ++ - 1200 ++ - 1400 ++ - 1600 ++ - 1800 ++ - 2000 ++ - 2200 ++ - 2400 ++ - 2600 ++ - 2800 ++ - 3000 + + properties: + compatible: +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0018-FROMGIT-arm64-dts-meson-libretech-ac-add-initial-aud.patch b/projects/Amlogic/patches/linux/amlogic-0018-FROMGIT-arm64-dts-meson-libretech-ac-add-initial-aud.patch deleted file mode 100644 index 76b9258af9c..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0018-FROMGIT-arm64-dts-meson-libretech-ac-add-initial-aud.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 5af6823fc49037004221dd7c34128fd09824f939 Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Tue, 21 Apr 2020 18:39:34 +0200 -Subject: [PATCH 018/156] FROMGIT: arm64: dts: meson: libretech-ac: add initial - audio playback support - -Add initial audio support limited to HDMI i2s. - -Signed-off-by: Jerome Brunet -Signed-off-by: Kevin Hilman -Tested-by: Christian Hewitt -Link: https://lore.kernel.org/r/20200421163935.775935-6-jbrunet@baylibre.com ---- - .../amlogic/meson-gxl-s805x-libretech-ac.dts | 40 +++++++++++++++++++ - 1 file changed, 40 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dts -index 4d5949496596..3f35331c1652 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dts -@@ -8,6 +8,7 @@ - /dts-v1/; - - #include -+#include - - #include "meson-gxl-s905x.dtsi" - -@@ -105,6 +106,45 @@ - vin-supply = <&vcc_3v3>; - regulator-always-on; - }; -+ -+ sound { -+ compatible = "amlogic,gx-sound-card"; -+ model = "GXL-LIBRETECH-S805X-AC"; -+ assigned-clocks = <&clkc CLKID_MPLL0>, -+ <&clkc CLKID_MPLL1>, -+ <&clkc CLKID_MPLL2>; -+ assigned-clock-parents = <0>, <0>, <0>; -+ assigned-clock-rates = <294912000>, -+ <270950400>, -+ <393216000>; -+ status = "okay"; -+ -+ dai-link-0 { -+ sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; -+ }; -+ -+ dai-link-1 { -+ sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; -+ dai-format = "i2s"; -+ mclk-fs = <256>; -+ -+ codec-0 { -+ sound-dai = <&aiu AIU_HDMI CTRL_I2S>; -+ }; -+ }; -+ -+ dai-link-2 { -+ sound-dai = <&aiu AIU_HDMI CTRL_OUT>; -+ -+ codec-0 { -+ sound-dai = <&hdmi_tx>; -+ }; -+ }; -+ }; -+}; -+ -+&aiu { -+ status = "okay"; - }; - - &cec_AO { --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0018-FROMGIT-net-stmmac-dwmac-meson8b-fix-enabling-the-ti.patch b/projects/Amlogic/patches/linux/amlogic-0018-FROMGIT-net-stmmac-dwmac-meson8b-fix-enabling-the-ti.patch new file mode 100644 index 00000000000..749008d29c0 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0018-FROMGIT-net-stmmac-dwmac-meson8b-fix-enabling-the-ti.patch @@ -0,0 +1,39 @@ +From 4d18c18cc0d04d9ca9fd88f2132fa5a7c9645a48 Mon Sep 17 00:00:00 2001 +From: Martin Blumenstingl +Date: Sun, 15 Nov 2020 10:23:02 +0100 +Subject: [PATCH 18/79] FROMGIT: net: stmmac: dwmac-meson8b: fix enabling the + timing-adjustment clock + +The timing-adjustment clock only has to be enabled when a) there is a +2ns RX delay configured using device-tree and b) the phy-mode indicates +that the RX delay should be enabled. + +Only enable the RX delay if both are true, instead of (by accident) also +enabling it when there's the 2ns RX delay configured but the phy-mode +incicates that the RX delay is not used. + +Fixes: 9308c47640d515 ("net: stmmac: dwmac-meson8b: add support for the RX delay configuration") +Reported-by: Andrew Lunn +Reviewed-by: Andrew Lunn +Reviewed-by: Florian Fainelli +Signed-off-by: Martin Blumenstingl +--- + drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c +index f184b00f5116..5f500141567d 100644 +--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c ++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c +@@ -301,7 +301,7 @@ static int meson8b_init_prg_eth(struct meson8b_dwmac *dwmac) + return -EINVAL; + } + +- if (rx_dly_config & PRG_ETH0_ADJ_ENABLE) { ++ if (delay_config & PRG_ETH0_ADJ_ENABLE) { + if (!dwmac->timing_adj_clk) { + dev_err(dwmac->dev, + "The timing-adjustment clock is mandatory for the RX delay re-timing\n"); +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0019-FROMGIT-arm64-dts-meson-libretech-pc-add-initial-aud.patch b/projects/Amlogic/patches/linux/amlogic-0019-FROMGIT-arm64-dts-meson-libretech-pc-add-initial-aud.patch deleted file mode 100644 index 4f1204c8e80..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0019-FROMGIT-arm64-dts-meson-libretech-pc-add-initial-aud.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 45baf9b9d199f17bf4e5eb3ad0da6968e30bde9e Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Tue, 21 Apr 2020 18:39:35 +0200 -Subject: [PATCH 019/156] FROMGIT: arm64: dts: meson: libretech-pc: add initial - audio playback support - -Add initial audio support limited to HDMI i2s. - -Signed-off-by: Jerome Brunet -Signed-off-by: Kevin Hilman -Tested-by: Christian Hewitt -Link: https://lore.kernel.org/r/20200421163935.775935-7-jbrunet@baylibre.com ---- - .../dts/amlogic/meson-gx-libretech-pc.dtsi | 40 +++++++++++++++++++ - 1 file changed, 40 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi -index b1da36fdeac6..4cc5f3df5677 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi -@@ -8,6 +8,7 @@ - - #include - #include -+#include - - / { - adc-keys { -@@ -175,6 +176,45 @@ - regulator-settling-time-up-us = <200>; - regulator-settling-time-down-us = <50000>; - }; -+ -+ sound { -+ compatible = "amlogic,gx-sound-card"; -+ model = "GXL-LIBRETECH-S9XX-PC"; -+ assigned-clocks = <&clkc CLKID_MPLL0>, -+ <&clkc CLKID_MPLL1>, -+ <&clkc CLKID_MPLL2>; -+ assigned-clock-parents = <0>, <0>, <0>; -+ assigned-clock-rates = <294912000>, -+ <270950400>, -+ <393216000>; -+ status = "okay"; -+ -+ dai-link-0 { -+ sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; -+ }; -+ -+ dai-link-1 { -+ sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; -+ dai-format = "i2s"; -+ mclk-fs = <256>; -+ -+ codec-0 { -+ sound-dai = <&aiu AIU_HDMI CTRL_I2S>; -+ }; -+ }; -+ -+ dai-link-2 { -+ sound-dai = <&aiu AIU_HDMI CTRL_OUT>; -+ -+ codec-0 { -+ sound-dai = <&hdmi_tx>; -+ }; -+ }; -+ }; -+}; -+ -+&aiu { -+ status = "okay"; - }; - - &cec_AO { --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0019-FROMGIT-net-stmmac-dwmac-meson8b-use-picoseconds-for.patch b/projects/Amlogic/patches/linux/amlogic-0019-FROMGIT-net-stmmac-dwmac-meson8b-use-picoseconds-for.patch new file mode 100644 index 00000000000..1719a7d06e4 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0019-FROMGIT-net-stmmac-dwmac-meson8b-use-picoseconds-for.patch @@ -0,0 +1,74 @@ +From 2c74f4d1663225c4e735690a65eec62dc7816c75 Mon Sep 17 00:00:00 2001 +From: Martin Blumenstingl +Date: Sat, 14 Nov 2020 17:41:04 +0100 +Subject: [PATCH 19/79] FROMGIT: net: stmmac: dwmac-meson8b: use picoseconds + for the RGMII RX delay + +Amlogic Meson G12A, G12B and SM1 SoCs have a more advanced RGMII RX +delay register which allows picoseconds precision. Parse the new +"rx-internal-delay-ps" property or fall back to the value from the old +"amlogic,rx-delay-ns" property. + +No upstream DTB uses the old "amlogic,rx-delay-ns" property (yet). +Only include minimalistic logic to fall back to the old property, +without any special validation (for example if the old and new +property are given at the same time). + +Reviewed-by: Andrew Lunn +Reviewed-by: Florian Fainelli +Signed-off-by: Martin Blumenstingl +--- + .../ethernet/stmicro/stmmac/dwmac-meson8b.c | 21 ++++++++++++------- + 1 file changed, 13 insertions(+), 8 deletions(-) + +diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c +index 5f500141567d..d2be3a7bd8fd 100644 +--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c ++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c +@@ -82,7 +82,7 @@ struct meson8b_dwmac { + phy_interface_t phy_mode; + struct clk *rgmii_tx_clk; + u32 tx_delay_ns; +- u32 rx_delay_ns; ++ u32 rx_delay_ps; + struct clk *timing_adj_clk; + }; + +@@ -276,7 +276,7 @@ static int meson8b_init_prg_eth(struct meson8b_dwmac *dwmac) + tx_dly_config = FIELD_PREP(PRG_ETH0_TXDLY_MASK, + dwmac->tx_delay_ns >> 1); + +- if (dwmac->rx_delay_ns == 2) ++ if (dwmac->rx_delay_ps == 2000) + rx_dly_config = PRG_ETH0_ADJ_ENABLE | PRG_ETH0_ADJ_SETUP; + else + rx_dly_config = 0; +@@ -406,14 +406,19 @@ static int meson8b_dwmac_probe(struct platform_device *pdev) + &dwmac->tx_delay_ns)) + dwmac->tx_delay_ns = 2; + +- /* use 0ns as fallback since this is what most boards actually use */ +- if (of_property_read_u32(pdev->dev.of_node, "amlogic,rx-delay-ns", +- &dwmac->rx_delay_ns)) +- dwmac->rx_delay_ns = 0; ++ /* RX delay defaults to 0ps since this is what many boards use */ ++ if (of_property_read_u32(pdev->dev.of_node, "rx-internal-delay-ps", ++ &dwmac->rx_delay_ps)) { ++ if (!of_property_read_u32(pdev->dev.of_node, ++ "amlogic,rx-delay-ns", ++ &dwmac->rx_delay_ps)) ++ /* convert ns to ps */ ++ dwmac->rx_delay_ps *= 1000; ++ } + +- if (dwmac->rx_delay_ns != 0 && dwmac->rx_delay_ns != 2) { ++ if (dwmac->rx_delay_ps != 0 && dwmac->rx_delay_ps != 2000) { + dev_err(&pdev->dev, +- "The only allowed RX delays values are: 0ns, 2ns"); ++ "The only allowed RX delays values are: 0ps, 2000ps"); + ret = -EINVAL; + goto err_remove_config_dt; + } +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0020-FROMGIT-drm-bridge-dw-hdmi-Add-support-for-RGB-limit.patch b/projects/Amlogic/patches/linux/amlogic-0020-FROMGIT-drm-bridge-dw-hdmi-Add-support-for-RGB-limit.patch deleted file mode 100644 index c609c1c3516..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0020-FROMGIT-drm-bridge-dw-hdmi-Add-support-for-RGB-limit.patch +++ /dev/null @@ -1,134 +0,0 @@ -From 274f0a22be97107589d444a3bbb6bcf53ceec2eb Mon Sep 17 00:00:00 2001 -From: Jernej Skrabec -Date: Thu, 14 May 2020 11:32:27 +0000 -Subject: [PATCH 020/156] FROMGIT: drm/bridge: dw-hdmi: Add support for RGB - limited range - -CEA 861 standard requestis that RGB quantization range is "limited" for -CEA modes. Support that by adding CSC matrix which downscales values. - -This allows proper color reproduction on TV and PC monitor at the same -time. In future, override property can be added, like "Broadcast RGB" -in i915 driver. - -Reviewed-by: Laurent Pinchart -Signed-off-by: Jernej Skrabec ---- - drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 63 +++++++++++++++++------ - 1 file changed, 46 insertions(+), 17 deletions(-) - -diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c -index 383b1073d7de..b8f6ecd4fbeb 100644 ---- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c -+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c -@@ -92,6 +92,12 @@ static const u16 csc_coeff_rgb_in_eitu709[3][4] = { - { 0x6756, 0x78ab, 0x2000, 0x0200 } - }; - -+static const u16 csc_coeff_rgb_full_to_rgb_limited[3][4] = { -+ { 0x1b7c, 0x0000, 0x0000, 0x0020 }, -+ { 0x0000, 0x1b7c, 0x0000, 0x0020 }, -+ { 0x0000, 0x0000, 0x1b7c, 0x0020 } -+}; -+ - struct hdmi_vmode { - bool mdataenablepolarity; - -@@ -109,6 +115,7 @@ struct hdmi_data_info { - unsigned int pix_repet_factor; - unsigned int hdcp_enable; - struct hdmi_vmode video_mode; -+ bool rgb_limited_range; - }; - - struct dw_hdmi_i2c { -@@ -956,7 +963,11 @@ static void hdmi_video_sample(struct dw_hdmi *hdmi) - - static int is_color_space_conversion(struct dw_hdmi *hdmi) - { -- return hdmi->hdmi_data.enc_in_bus_format != hdmi->hdmi_data.enc_out_bus_format; -+ return (hdmi->hdmi_data.enc_in_bus_format != -+ hdmi->hdmi_data.enc_out_bus_format) || -+ (hdmi_bus_fmt_is_rgb(hdmi->hdmi_data.enc_in_bus_format) && -+ hdmi_bus_fmt_is_rgb(hdmi->hdmi_data.enc_out_bus_format) && -+ hdmi->hdmi_data.rgb_limited_range); - } - - static int is_color_space_decimation(struct dw_hdmi *hdmi) -@@ -986,25 +997,27 @@ static int is_color_space_interpolation(struct dw_hdmi *hdmi) - static void dw_hdmi_update_csc_coeffs(struct dw_hdmi *hdmi) - { - const u16 (*csc_coeff)[3][4] = &csc_coeff_default; -+ bool is_input_rgb, is_output_rgb; - unsigned i; - u32 csc_scale = 1; - -- if (is_color_space_conversion(hdmi)) { -- if (hdmi_bus_fmt_is_rgb(hdmi->hdmi_data.enc_out_bus_format)) { -- if (hdmi->hdmi_data.enc_out_encoding == -- V4L2_YCBCR_ENC_601) -- csc_coeff = &csc_coeff_rgb_out_eitu601; -- else -- csc_coeff = &csc_coeff_rgb_out_eitu709; -- } else if (hdmi_bus_fmt_is_rgb( -- hdmi->hdmi_data.enc_in_bus_format)) { -- if (hdmi->hdmi_data.enc_out_encoding == -- V4L2_YCBCR_ENC_601) -- csc_coeff = &csc_coeff_rgb_in_eitu601; -- else -- csc_coeff = &csc_coeff_rgb_in_eitu709; -- csc_scale = 0; -- } -+ is_input_rgb = hdmi_bus_fmt_is_rgb(hdmi->hdmi_data.enc_in_bus_format); -+ is_output_rgb = hdmi_bus_fmt_is_rgb(hdmi->hdmi_data.enc_out_bus_format); -+ -+ if (!is_input_rgb && is_output_rgb) { -+ if (hdmi->hdmi_data.enc_out_encoding == V4L2_YCBCR_ENC_601) -+ csc_coeff = &csc_coeff_rgb_out_eitu601; -+ else -+ csc_coeff = &csc_coeff_rgb_out_eitu709; -+ } else if (is_input_rgb && !is_output_rgb) { -+ if (hdmi->hdmi_data.enc_out_encoding == V4L2_YCBCR_ENC_601) -+ csc_coeff = &csc_coeff_rgb_in_eitu601; -+ else -+ csc_coeff = &csc_coeff_rgb_in_eitu709; -+ csc_scale = 0; -+ } else if (is_input_rgb && is_output_rgb && -+ hdmi->hdmi_data.rgb_limited_range) { -+ csc_coeff = &csc_coeff_rgb_full_to_rgb_limited; - } - - /* The CSC registers are sequential, alternating MSB then LSB */ -@@ -1614,6 +1627,18 @@ static void hdmi_config_AVI(struct dw_hdmi *hdmi, struct drm_display_mode *mode) - drm_hdmi_avi_infoframe_from_display_mode(&frame, - &hdmi->connector, mode); - -+ if (hdmi_bus_fmt_is_rgb(hdmi->hdmi_data.enc_out_bus_format)) { -+ drm_hdmi_avi_infoframe_quant_range(&frame, &hdmi->connector, -+ mode, -+ hdmi->hdmi_data.rgb_limited_range ? -+ HDMI_QUANTIZATION_RANGE_LIMITED : -+ HDMI_QUANTIZATION_RANGE_FULL); -+ } else { -+ frame.quantization_range = HDMI_QUANTIZATION_RANGE_DEFAULT; -+ frame.ycc_quantization_range = -+ HDMI_YCC_QUANTIZATION_RANGE_LIMITED; -+ } -+ - if (hdmi_bus_fmt_is_yuv444(hdmi->hdmi_data.enc_out_bus_format)) - frame.colorspace = HDMI_COLORSPACE_YUV444; - else if (hdmi_bus_fmt_is_yuv422(hdmi->hdmi_data.enc_out_bus_format)) -@@ -2119,6 +2144,10 @@ static int dw_hdmi_setup(struct dw_hdmi *hdmi, struct drm_display_mode *mode) - if (hdmi->hdmi_data.enc_out_bus_format == MEDIA_BUS_FMT_FIXED) - hdmi->hdmi_data.enc_out_bus_format = MEDIA_BUS_FMT_RGB888_1X24; - -+ hdmi->hdmi_data.rgb_limited_range = hdmi->sink_is_hdmi && -+ drm_default_rgb_quant_range(mode) == -+ HDMI_QUANTIZATION_RANGE_LIMITED; -+ - hdmi->hdmi_data.pix_repet_factor = 0; - hdmi->hdmi_data.hdcp_enable = 0; - hdmi->hdmi_data.video_mode.mdataenablepolarity = true; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0020-FROMGIT-net-stmmac-dwmac-meson8b-move-RGMII-delays-i.patch b/projects/Amlogic/patches/linux/amlogic-0020-FROMGIT-net-stmmac-dwmac-meson8b-move-RGMII-delays-i.patch new file mode 100644 index 00000000000..2784cdcec8e --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0020-FROMGIT-net-stmmac-dwmac-meson8b-move-RGMII-delays-i.patch @@ -0,0 +1,60 @@ +From c2a20a85df641aaf33cac447a52aa32ffffd80bc Mon Sep 17 00:00:00 2001 +From: Martin Blumenstingl +Date: Sat, 14 Nov 2020 18:02:03 +0100 +Subject: [PATCH 20/79] FROMGIT: net: stmmac: dwmac-meson8b: move RGMII delays + into a separate function + +Newer SoCs starting with the Amlogic Meson G12A have more a precise +RGMII RX delay configuration register. This means more complexity in the +code. Extract the existing RGMII delay configuration code into a +separate function to make it easier to read/understand even when adding +more logic in the future. + +Reviewed-by: Andrew Lunn +Reviewed-by: Florian Fainelli +Signed-off-by: Martin Blumenstingl +--- + drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c +index d2be3a7bd8fd..4937432ac70d 100644 +--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c ++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c +@@ -268,7 +268,7 @@ static int meson8b_devm_clk_prepare_enable(struct meson8b_dwmac *dwmac, + return 0; + } + +-static int meson8b_init_prg_eth(struct meson8b_dwmac *dwmac) ++static int meson8b_init_rgmii_delays(struct meson8b_dwmac *dwmac) + { + u32 tx_dly_config, rx_dly_config, delay_config; + int ret; +@@ -323,6 +323,13 @@ static int meson8b_init_prg_eth(struct meson8b_dwmac *dwmac) + PRG_ETH0_ADJ_DELAY | PRG_ETH0_ADJ_SKEW, + delay_config); + ++ return 0; ++} ++ ++static int meson8b_init_prg_eth(struct meson8b_dwmac *dwmac) ++{ ++ int ret; ++ + if (phy_interface_mode_is_rgmii(dwmac->phy_mode)) { + /* only relevant for RMII mode -> disable in RGMII mode */ + meson8b_dwmac_mask_bits(dwmac, PRG_ETH0, +@@ -430,6 +437,10 @@ static int meson8b_dwmac_probe(struct platform_device *pdev) + goto err_remove_config_dt; + } + ++ ret = meson8b_init_rgmii_delays(dwmac); ++ if (ret) ++ goto err_remove_config_dt; ++ + ret = meson8b_init_rgmii_tx_clk(dwmac); + if (ret) + goto err_remove_config_dt; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0021-FROMGIT-drm-bridge-dw-hdmi-rework-csc-related-functi.patch b/projects/Amlogic/patches/linux/amlogic-0021-FROMGIT-drm-bridge-dw-hdmi-rework-csc-related-functi.patch deleted file mode 100644 index 3ed63b6340e..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0021-FROMGIT-drm-bridge-dw-hdmi-rework-csc-related-functi.patch +++ /dev/null @@ -1,89 +0,0 @@ -From ace2c05e270e103e3e026169a987ee7a6a0730b1 Mon Sep 17 00:00:00 2001 -From: Jernej Skrabec -Date: Thu, 14 May 2020 11:33:19 +0000 -Subject: [PATCH 021/156] FROMGIT: drm/bridge: dw-hdmi: rework csc related - functions - -is_color_space_conversion() is a misnomer. It checks not only if color -space conversion is needed, but also if format conversion is needed. -This is actually desired behaviour because result of this function -determines if CSC block should be enabled or not (CSC block can also do -format conversion). - -In order to clear misunderstandings, let's rework -is_color_space_conversion() to do exactly what is supposed to do and add -another function which will determine if CSC block must be enabled or -not. - -Reviewed-by: Laurent Pinchart -Signed-off-by: Jernej Skrabec ---- - drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 31 +++++++++++++++-------- - 1 file changed, 21 insertions(+), 10 deletions(-) - -diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c -index b8f6ecd4fbeb..512398dbeb76 100644 ---- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c -+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c -@@ -963,11 +963,14 @@ static void hdmi_video_sample(struct dw_hdmi *hdmi) - - static int is_color_space_conversion(struct dw_hdmi *hdmi) - { -- return (hdmi->hdmi_data.enc_in_bus_format != -- hdmi->hdmi_data.enc_out_bus_format) || -- (hdmi_bus_fmt_is_rgb(hdmi->hdmi_data.enc_in_bus_format) && -- hdmi_bus_fmt_is_rgb(hdmi->hdmi_data.enc_out_bus_format) && -- hdmi->hdmi_data.rgb_limited_range); -+ struct hdmi_data_info *hdmi_data = &hdmi->hdmi_data; -+ bool is_input_rgb, is_output_rgb; -+ -+ is_input_rgb = hdmi_bus_fmt_is_rgb(hdmi_data->enc_in_bus_format); -+ is_output_rgb = hdmi_bus_fmt_is_rgb(hdmi_data->enc_out_bus_format); -+ -+ return (is_input_rgb != is_output_rgb) || -+ (is_input_rgb && is_output_rgb && hdmi_data->rgb_limited_range); - } - - static int is_color_space_decimation(struct dw_hdmi *hdmi) -@@ -994,6 +997,13 @@ static int is_color_space_interpolation(struct dw_hdmi *hdmi) - return 0; - } - -+static bool is_csc_needed(struct dw_hdmi *hdmi) -+{ -+ return is_color_space_conversion(hdmi) || -+ is_color_space_decimation(hdmi) || -+ is_color_space_interpolation(hdmi); -+} -+ - static void dw_hdmi_update_csc_coeffs(struct dw_hdmi *hdmi) - { - const u16 (*csc_coeff)[3][4] = &csc_coeff_default; -@@ -2035,18 +2045,19 @@ static void dw_hdmi_enable_video_path(struct dw_hdmi *hdmi) - hdmi_writeb(hdmi, hdmi->mc_clkdis, HDMI_MC_CLKDIS); - - /* Enable csc path */ -- if (is_color_space_conversion(hdmi)) { -+ if (is_csc_needed(hdmi)) { - hdmi->mc_clkdis &= ~HDMI_MC_CLKDIS_CSCCLK_DISABLE; - hdmi_writeb(hdmi, hdmi->mc_clkdis, HDMI_MC_CLKDIS); -- } - -- /* Enable color space conversion if needed */ -- if (is_color_space_conversion(hdmi)) - hdmi_writeb(hdmi, HDMI_MC_FLOWCTRL_FEED_THROUGH_OFF_CSC_IN_PATH, - HDMI_MC_FLOWCTRL); -- else -+ } else { -+ hdmi->mc_clkdis |= HDMI_MC_CLKDIS_CSCCLK_DISABLE; -+ hdmi_writeb(hdmi, hdmi->mc_clkdis, HDMI_MC_CLKDIS); -+ - hdmi_writeb(hdmi, HDMI_MC_FLOWCTRL_FEED_THROUGH_OFF_CSC_BYPASS, - HDMI_MC_FLOWCTRL); -+ } - } - - /* Workaround to clear the overflow condition */ --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0021-FROMGIT-net-stmmac-dwmac-meson8b-add-support-for-the.patch b/projects/Amlogic/patches/linux/amlogic-0021-FROMGIT-net-stmmac-dwmac-meson8b-add-support-for-the.patch new file mode 100644 index 00000000000..95ab7b8eb43 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0021-FROMGIT-net-stmmac-dwmac-meson8b-add-support-for-the.patch @@ -0,0 +1,156 @@ +From 28f7bd400691b66d51db47de83b8c87fb6bae42a Mon Sep 17 00:00:00 2001 +From: Martin Blumenstingl +Date: Sat, 14 Nov 2020 19:41:11 +0100 +Subject: [PATCH 21/79] FROMGIT: net: stmmac: dwmac-meson8b: add support for + the RGMII RX delay on G12A + +Amlogic Meson G12A (and newer: G12B, SM1) SoCs have a more advanced RX +delay logic. Instead of fine-tuning the delay in the nanoseconds range +it now allows tuning in 200 picosecond steps. This support comes with +new bits in the PRG_ETH1[19:16] register. + +Add support for validating the RGMII RX delay as well as configuring the +register accordingly on these platforms. + +Reviewed-by: Andrew Lunn +Reviewed-by: Florian Fainelli +Signed-off-by: Martin Blumenstingl +--- + .../ethernet/stmicro/stmmac/dwmac-meson8b.c | 61 +++++++++++++++---- + 1 file changed, 48 insertions(+), 13 deletions(-) + +diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c +index 4937432ac70d..55152d7ba99a 100644 +--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c ++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c +@@ -68,10 +68,21 @@ + */ + #define PRG_ETH0_ADJ_SKEW GENMASK(24, 20) + ++#define PRG_ETH1 0x4 ++ ++/* Defined for adding a delay to the input RX_CLK for better timing. ++ * Each step is 200ps. These bits are used with external RGMII PHYs ++ * because RGMII RX only has the small window. cfg_rxclk_dly can ++ * adjust the window between RX_CLK and RX_DATA and improve the stability ++ * of "rx data valid". ++ */ ++#define PRG_ETH1_CFG_RXCLK_DLY GENMASK(19, 16) ++ + struct meson8b_dwmac; + + struct meson8b_dwmac_data { + int (*set_phy_mode)(struct meson8b_dwmac *dwmac); ++ bool has_prg_eth1_rgmii_rx_delay; + }; + + struct meson8b_dwmac { +@@ -270,30 +281,35 @@ static int meson8b_devm_clk_prepare_enable(struct meson8b_dwmac *dwmac, + + static int meson8b_init_rgmii_delays(struct meson8b_dwmac *dwmac) + { +- u32 tx_dly_config, rx_dly_config, delay_config; ++ u32 tx_dly_config, rx_adj_config, cfg_rxclk_dly, delay_config; + int ret; + ++ rx_adj_config = 0; ++ cfg_rxclk_dly = 0; + tx_dly_config = FIELD_PREP(PRG_ETH0_TXDLY_MASK, + dwmac->tx_delay_ns >> 1); + +- if (dwmac->rx_delay_ps == 2000) +- rx_dly_config = PRG_ETH0_ADJ_ENABLE | PRG_ETH0_ADJ_SETUP; +- else +- rx_dly_config = 0; ++ if (dwmac->data->has_prg_eth1_rgmii_rx_delay) ++ cfg_rxclk_dly = FIELD_PREP(PRG_ETH1_CFG_RXCLK_DLY, ++ dwmac->rx_delay_ps / 200); ++ else if (dwmac->rx_delay_ps == 2000) ++ rx_adj_config = PRG_ETH0_ADJ_ENABLE | PRG_ETH0_ADJ_SETUP; + + switch (dwmac->phy_mode) { + case PHY_INTERFACE_MODE_RGMII: +- delay_config = tx_dly_config | rx_dly_config; ++ delay_config = tx_dly_config | rx_adj_config; + break; + case PHY_INTERFACE_MODE_RGMII_RXID: + delay_config = tx_dly_config; ++ cfg_rxclk_dly = 0; + break; + case PHY_INTERFACE_MODE_RGMII_TXID: +- delay_config = rx_dly_config; ++ delay_config = rx_adj_config; + break; + case PHY_INTERFACE_MODE_RGMII_ID: + case PHY_INTERFACE_MODE_RMII: + delay_config = 0; ++ cfg_rxclk_dly = 0; + break; + default: + dev_err(dwmac->dev, "unsupported phy-mode %s\n", +@@ -323,6 +339,9 @@ static int meson8b_init_rgmii_delays(struct meson8b_dwmac *dwmac) + PRG_ETH0_ADJ_DELAY | PRG_ETH0_ADJ_SKEW, + delay_config); + ++ meson8b_dwmac_mask_bits(dwmac, PRG_ETH1, PRG_ETH1_CFG_RXCLK_DLY, ++ cfg_rxclk_dly); ++ + return 0; + } + +@@ -423,11 +442,20 @@ static int meson8b_dwmac_probe(struct platform_device *pdev) + dwmac->rx_delay_ps *= 1000; + } + +- if (dwmac->rx_delay_ps != 0 && dwmac->rx_delay_ps != 2000) { +- dev_err(&pdev->dev, +- "The only allowed RX delays values are: 0ps, 2000ps"); +- ret = -EINVAL; +- goto err_remove_config_dt; ++ if (dwmac->data->has_prg_eth1_rgmii_rx_delay) { ++ if (dwmac->rx_delay_ps != 0 && dwmac->rx_delay_ps != 2000) { ++ dev_err(dwmac->dev, ++ "The only allowed RGMII RX delays values are: 0ps, 2000ps"); ++ ret = -EINVAL; ++ goto err_remove_config_dt; ++ } ++ } else { ++ if (dwmac->rx_delay_ps > 3000 || dwmac->rx_delay_ps % 200) { ++ dev_err(dwmac->dev, ++ "The RGMII RX delay range is 0..3000ps in 200ps steps"); ++ ret = -EINVAL; ++ goto err_remove_config_dt; ++ } + } + + dwmac->timing_adj_clk = devm_clk_get_optional(dwmac->dev, +@@ -469,10 +497,17 @@ static int meson8b_dwmac_probe(struct platform_device *pdev) + + static const struct meson8b_dwmac_data meson8b_dwmac_data = { + .set_phy_mode = meson8b_set_phy_mode, ++ .has_prg_eth1_rgmii_rx_delay = false, + }; + + static const struct meson8b_dwmac_data meson_axg_dwmac_data = { + .set_phy_mode = meson_axg_set_phy_mode, ++ .has_prg_eth1_rgmii_rx_delay = false, ++}; ++ ++static const struct meson8b_dwmac_data meson_g12a_dwmac_data = { ++ .set_phy_mode = meson_axg_set_phy_mode, ++ .has_prg_eth1_rgmii_rx_delay = true, + }; + + static const struct of_device_id meson8b_dwmac_match[] = { +@@ -494,7 +529,7 @@ static const struct of_device_id meson8b_dwmac_match[] = { + }, + { + .compatible = "amlogic,meson-g12a-dwmac", +- .data = &meson_axg_dwmac_data, ++ .data = &meson_g12a_dwmac_data, + }, + { } + }; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0022-FROMLIST-v1-arm64-dts-meson-vim3-enable-hdmi-audio-l.patch b/projects/Amlogic/patches/linux/amlogic-0022-FROMLIST-v1-arm64-dts-meson-vim3-enable-hdmi-audio-l.patch new file mode 100644 index 00000000000..6c1ef7fd99e --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0022-FROMLIST-v1-arm64-dts-meson-vim3-enable-hdmi-audio-l.patch @@ -0,0 +1,103 @@ +From d6a28cac968ef3683baf3b6f8b329a096de6393a Mon Sep 17 00:00:00 2001 +From: Jerome Brunet +Date: Fri, 4 Dec 2020 16:23:55 +0100 +Subject: [PATCH 22/79] FROMLIST(v1): arm64: dts: meson: vim3: enable hdmi + audio loopback + +Enable audio capture frontends and a tdm decoder. +This makes it possible to loopback the audio played on the hdmi codec, +which is the only output interface at the moment. + +Of course, one TODDR device would be enough to do that but since +the 3 FRDDRs are enabled on the playback side, let's do the same on the +capture side. + +Signed-off-by: Jerome Brunet +--- + .../boot/dts/amlogic/meson-khadas-vim3.dtsi | 41 +++++++++++++++++-- + 1 file changed, 37 insertions(+), 4 deletions(-) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi +index d3b25163b421..4e4c2f924486 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi ++++ b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi +@@ -171,11 +171,16 @@ + sound { + compatible = "amlogic,axg-sound-card"; + model = "G12B-KHADAS-VIM3"; +- audio-aux-devs = <&tdmout_a>; ++ audio-aux-devs = <&tdmin_a>, <&tdmout_a>; + audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0", + "TDMOUT_A IN 1", "FRDDR_B OUT 0", + "TDMOUT_A IN 2", "FRDDR_C OUT 0", +- "TDM_A Playback", "TDMOUT_A OUT"; ++ "TDM_A Playback", "TDMOUT_A OUT", ++ "TDMIN_A IN 1", "TDM_A Capture", ++ "TDMIN_A IN 3", "TDM_A Loopback", ++ "TODDR_A IN 0", "TDMIN_A OUT", ++ "TODDR_B IN 0", "TDMIN_A OUT", ++ "TODDR_C IN 0", "TDMIN_A OUT"; + + assigned-clocks = <&clkc CLKID_MPLL2>, + <&clkc CLKID_MPLL0>, +@@ -198,8 +203,20 @@ + sound-dai = <&frddr_c>; + }; + +- /* 8ch hdmi interface */ + dai-link-3 { ++ sound-dai = <&toddr_a>; ++ }; ++ ++ dai-link-4 { ++ sound-dai = <&toddr_b>; ++ }; ++ ++ dai-link-5 { ++ sound-dai = <&toddr_c>; ++ }; ++ ++ /* 8ch hdmi interface */ ++ dai-link-6 { + sound-dai = <&tdmif_a>; + dai-format = "i2s"; + dai-tdm-slot-tx-mask-0 = <1 1>; +@@ -214,7 +231,7 @@ + }; + + /* hdmi glue */ +- dai-link-4 { ++ dai-link-7 { + sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; + + codec { +@@ -454,10 +471,26 @@ + status = "okay"; + }; + ++&tdmin_a { ++ status = "okay"; ++}; ++ + &tdmout_a { + status = "okay"; + }; + ++&toddr_a { ++ status = "okay"; ++}; ++ ++&toddr_b { ++ status = "okay"; ++}; ++ ++&toddr_c { ++ status = "okay"; ++}; ++ + &tohdmitx { + status = "okay"; + }; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0023-FROMGIT-arm64-dts-meson-sm1-add-support-for-Hardkern.patch b/projects/Amlogic/patches/linux/amlogic-0023-FROMGIT-arm64-dts-meson-sm1-add-support-for-Hardkern.patch deleted file mode 100644 index d836f18a861..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0023-FROMGIT-arm64-dts-meson-sm1-add-support-for-Hardkern.patch +++ /dev/null @@ -1,440 +0,0 @@ -From 6055acd420bf7e12b70ea56a79c7a7f9dfef7b07 Mon Sep 17 00:00:00 2001 -From: Dongjin Kim -Date: Wed, 13 May 2020 04:04:11 +0000 -Subject: [PATCH 023/156] FROMGIT: arm64: dts: meson-sm1: add support for - Hardkernel ODROID-C4 - -Add the board support for the Hardkernel Odroid-C4 single board computer. - -The Odroid-C4 is the Odroid-C2 successor with same form factor, but using -a modern Amlogic S905X3 (SM1) SoC and 4x USB3 ports. - -Signed-off-by: Dongjin Kim -Signed-off-by: Neil Armstrong ---- - arch/arm64/boot/dts/amlogic/Makefile | 1 + - .../boot/dts/amlogic/meson-sm1-odroid-c4.dts | 402 ++++++++++++++++++ - 2 files changed, 403 insertions(+) - create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts - -diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile -index eef0045320f2..5daab72f5639 100644 ---- a/arch/arm64/boot/dts/amlogic/Makefile -+++ b/arch/arm64/boot/dts/amlogic/Makefile -@@ -40,4 +40,5 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-libretech-pc.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-sm1-sei610.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-sm1-khadas-vim3l.dtb -+dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-c4.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-a1-ad401.dtb -diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts -new file mode 100644 -index 000000000000..00d90b30f8b4 ---- /dev/null -+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts -@@ -0,0 +1,402 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+/* -+ * Copyright (c) 2020 Dongjin Kim -+ */ -+ -+/dts-v1/; -+ -+#include "meson-sm1.dtsi" -+#include -+#include -+ -+/ { -+ compatible = "hardkernel,odroid-c4", "amlogic,sm1"; -+ model = "Hardkernel ODROID-C4"; -+ -+ aliases { -+ serial0 = &uart_AO; -+ ethernet0 = ðmac; -+ }; -+ -+ chosen { -+ stdout-path = "serial0:115200n8"; -+ }; -+ -+ memory@0 { -+ device_type = "memory"; -+ reg = <0x0 0x0 0x0 0x40000000>; -+ }; -+ -+ emmc_pwrseq: emmc-pwrseq { -+ compatible = "mmc-pwrseq-emmc"; -+ reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ -+ led-blue { -+ color = ; -+ function = LED_FUNCTION_STATUS; -+ gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>; -+ linux,default-trigger = "heartbeat"; -+ panic-indicator; -+ }; -+ }; -+ -+ tflash_vdd: regulator-tflash_vdd { -+ compatible = "regulator-fixed"; -+ -+ regulator-name = "TFLASH_VDD"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ -+ gpio = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; -+ enable-active-high; -+ regulator-always-on; -+ }; -+ -+ tf_io: gpio-regulator-tf_io { -+ compatible = "regulator-gpio"; -+ -+ regulator-name = "TF_IO"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <3300000>; -+ -+ gpios = <&gpio_ao GPIOAO_6 GPIO_ACTIVE_HIGH>; -+ gpios-states = <0>; -+ -+ states = <3300000 0>, -+ <1800000 1>; -+ }; -+ -+ flash_1v8: regulator-flash_1v8 { -+ compatible = "regulator-fixed"; -+ regulator-name = "FLASH_1V8"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ vin-supply = <&vcc_3v3>; -+ regulator-always-on; -+ }; -+ -+ main_12v: regulator-main_12v { -+ compatible = "regulator-fixed"; -+ regulator-name = "12V"; -+ regulator-min-microvolt = <12000000>; -+ regulator-max-microvolt = <12000000>; -+ regulator-always-on; -+ }; -+ -+ vcc_5v: regulator-vcc_5v { -+ compatible = "regulator-fixed"; -+ regulator-name = "5V"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ regulator-always-on; -+ vin-supply = <&main_12v>; -+ }; -+ -+ vcc_1v8: regulator-vcc_1v8 { -+ compatible = "regulator-fixed"; -+ regulator-name = "VCC_1V8"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ vin-supply = <&vcc_3v3>; -+ regulator-always-on; -+ }; -+ -+ vcc_3v3: regulator-vcc_3v3 { -+ compatible = "regulator-fixed"; -+ regulator-name = "VCC_3V3"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ vin-supply = <&vddao_3v3>; -+ regulator-always-on; -+ /* FIXME: actually controlled by VDDCPU_B_EN */ -+ }; -+ -+ vddcpu: regulator-vddcpu { -+ /* -+ * MP8756GD Regulator. -+ */ -+ compatible = "pwm-regulator"; -+ -+ regulator-name = "VDDCPU"; -+ regulator-min-microvolt = <721000>; -+ regulator-max-microvolt = <1022000>; -+ -+ vin-supply = <&main_12v>; -+ -+ pwms = <&pwm_AO_cd 1 1250 0>; -+ pwm-dutycycle-range = <100 0>; -+ -+ regulator-boot-on; -+ regulator-always-on; -+ }; -+ -+ hub_5v: regulator-hub_5v { -+ compatible = "regulator-fixed"; -+ regulator-name = "HUB_5V"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ vin-supply = <&vcc_5v>; -+ -+ /* Connected to the Hub CHIPENABLE, LOW sets low power state */ -+ gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>; -+ enable-active-high; -+ }; -+ -+ usb_pwr_en: regulator-usb_pwr_en { -+ compatible = "regulator-fixed"; -+ regulator-name = "USB_PWR_EN"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ vin-supply = <&vcc_5v>; -+ -+ /* Connected to the microUSB port power enable */ -+ gpio = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>; -+ enable-active-high; -+ }; -+ -+ vddao_1v8: regulator-vddao_1v8 { -+ compatible = "regulator-fixed"; -+ regulator-name = "VDDAO_1V8"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ vin-supply = <&vddao_3v3>; -+ regulator-always-on; -+ }; -+ -+ vddao_3v3: regulator-vddao_3v3 { -+ compatible = "regulator-fixed"; -+ regulator-name = "VDDAO_3V3"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ vin-supply = <&main_12v>; -+ regulator-always-on; -+ }; -+ -+ hdmi-connector { -+ compatible = "hdmi-connector"; -+ type = "a"; -+ -+ port { -+ hdmi_connector_in: endpoint { -+ remote-endpoint = <&hdmi_tx_tmds_out>; -+ }; -+ }; -+ }; -+}; -+ -+&cpu0 { -+ cpu-supply = <&vddcpu>; -+ operating-points-v2 = <&cpu_opp_table>; -+ clocks = <&clkc CLKID_CPU_CLK>; -+ clock-latency = <50000>; -+}; -+ -+&cpu1 { -+ cpu-supply = <&vddcpu>; -+ operating-points-v2 = <&cpu_opp_table>; -+ clocks = <&clkc CLKID_CPU1_CLK>; -+ clock-latency = <50000>; -+}; -+ -+&cpu2 { -+ cpu-supply = <&vddcpu>; -+ operating-points-v2 = <&cpu_opp_table>; -+ clocks = <&clkc CLKID_CPU2_CLK>; -+ clock-latency = <50000>; -+}; -+ -+&cpu3 { -+ cpu-supply = <&vddcpu>; -+ operating-points-v2 = <&cpu_opp_table>; -+ clocks = <&clkc CLKID_CPU3_CLK>; -+ clock-latency = <50000>; -+}; -+ -+&ext_mdio { -+ external_phy: ethernet-phy@0 { -+ /* Realtek RTL8211F (0x001cc916) */ -+ reg = <0>; -+ max-speed = <1000>; -+ -+ interrupt-parent = <&gpio_intc>; -+ /* MAC_INTR on GPIOZ_14 */ -+ interrupts = <26 IRQ_TYPE_LEVEL_LOW>; -+ }; -+}; -+ -+ðmac { -+ pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; -+ pinctrl-names = "default"; -+ status = "okay"; -+ phy-mode = "rgmii"; -+ phy-handle = <&external_phy>; -+ amlogic,tx-delay-ns = <2>; -+}; -+ -+&gpio { -+ gpio-line-names = -+ /* GPIOZ */ -+ "", "", "", "", "", "", "", "", -+ "", "", "", "", "", "", "", "", -+ /* GPIOH */ -+ "", "", "", "", "", -+ "PIN_36", /* GPIOH_5 */ -+ "PIN_26", /* GPIOH_6 */ -+ "PIN_32", /* GPIOH_7 */ -+ "", -+ /* BOOT */ -+ "", "", "", "", "", "", "", "", -+ "", "", "", "", "", "", "", "", -+ /* GPIOC */ -+ "", "", "", "", "", "", "", "", -+ /* GPIOA */ -+ "", "", "", "", "", "", "", "", -+ "", "", "", "", "", "", -+ "PIN_27", /* GPIOA_14 */ -+ "PIN_28", /* GPIOA_15 */ -+ /* GPIOX */ -+ "PIN_16", /* GPIOX_0 */ -+ "PIN_18", /* GPIOX_1 */ -+ "PIN_22", /* GPIOX_2 */ -+ "PIN_11", /* GPIOX_3 */ -+ "PIN_13", /* GPIOX_4 */ -+ "PIN_7", /* GPIOX_5 */ -+ "PIN_33", /* GPIOX_6 */ -+ "PIN_15", /* GPIOX_7 */ -+ "PIN_19", /* GPIOX_8 */ -+ "PIN_21", /* GPIOX_9 */ -+ "PIN_24", /* GPIOX_10 */ -+ "PIN_23", /* GPIOX_11 */ -+ "PIN_8", /* GPIOX_12 */ -+ "PIN_10", /* GPIOX_13 */ -+ "PIN_29", /* GPIOX_14 */ -+ "PIN_31", /* GPIOX_15 */ -+ "PIN_12", /* GPIOX_16 */ -+ "PIN_3", /* GPIOX_17 */ -+ "PIN_5", /* GPIOX_18 */ -+ "PIN_35"; /* GPIOX_19 */ -+ -+ /* -+ * WARNING: The USB Hub on the Odroid-C4 needs a reset signal -+ * to be turned high in order to be detected by the USB Controller -+ * This signal should be handled by a USB specific power sequence -+ * in order to reset the Hub when USB bus is powered down. -+ */ -+ usb-hub { -+ gpio-hog; -+ gpios = ; -+ output-high; -+ line-name = "usb-hub-reset"; -+ }; -+}; -+ -+&gpio_ao { -+ gpio-line-names = -+ /* GPIOAO */ -+ "", "", "", "", -+ "PIN_47", /* GPIOAO_4 */ -+ "", "", -+ "PIN_45", /* GPIOAO_7 */ -+ "PIN_46", /* GPIOAO_8 */ -+ "PIN_44", /* GPIOAO_9 */ -+ "PIN_42", /* GPIOAO_10 */ -+ "", -+ /* GPIOE */ -+ "", "", ""; -+}; -+ -+&hdmi_tx { -+ status = "okay"; -+ pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>; -+ pinctrl-names = "default"; -+ hdmi-supply = <&vcc_5v>; -+}; -+ -+&hdmi_tx_tmds_port { -+ hdmi_tx_tmds_out: endpoint { -+ remote-endpoint = <&hdmi_connector_in>; -+ }; -+}; -+ -+&ir { -+ status = "okay"; -+ pinctrl-0 = <&remote_input_ao_pins>; -+ pinctrl-names = "default"; -+ linux,rc-map-name = "rc-odroid"; -+}; -+ -+&pwm_AO_cd { -+ pinctrl-0 = <&pwm_ao_d_e_pins>; -+ pinctrl-names = "default"; -+ clocks = <&xtal>; -+ clock-names = "clkin1"; -+ status = "okay"; -+}; -+ -+&saradc { -+ status = "okay"; -+}; -+ -+/* SD card */ -+&sd_emmc_b { -+ status = "okay"; -+ pinctrl-0 = <&sdcard_c_pins>; -+ pinctrl-1 = <&sdcard_clk_gate_c_pins>; -+ pinctrl-names = "default", "clk-gate"; -+ -+ bus-width = <4>; -+ cap-sd-highspeed; -+ max-frequency = <200000000>; -+ sd-uhs-sdr12; -+ sd-uhs-sdr25; -+ sd-uhs-sdr50; -+ sd-uhs-sdr104; -+ disable-wp; -+ -+ cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>; -+ vmmc-supply = <&tflash_vdd>; -+ vqmmc-supply = <&tf_io>; -+}; -+ -+/* eMMC */ -+&sd_emmc_c { -+ status = "okay"; -+ pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>; -+ pinctrl-1 = <&emmc_clk_gate_pins>; -+ pinctrl-names = "default", "clk-gate"; -+ -+ bus-width = <8>; -+ cap-mmc-highspeed; -+ mmc-ddr-1_8v; -+ mmc-hs200-1_8v; -+ max-frequency = <200000000>; -+ disable-wp; -+ -+ mmc-pwrseq = <&emmc_pwrseq>; -+ vmmc-supply = <&vcc_3v3>; -+ vqmmc-supply = <&flash_1v8>; -+}; -+ -+&uart_AO { -+ status = "okay"; -+ pinctrl-0 = <&uart_ao_a_pins>; -+ pinctrl-names = "default"; -+}; -+ -+&usb { -+ status = "okay"; -+ vbus-supply = <&usb_pwr_en>; -+}; -+ -+&usb2_phy0 { -+ phy-supply = <&vcc_5v>; -+}; -+ -+&usb2_phy1 { -+ /* Enable the hub which is connected to this port */ -+ phy-supply = <&hub_5v>; -+}; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0023-FROMLIST-v1-arm64-dts-meson-switch-TFLASH_VDD_EN-pin.patch b/projects/Amlogic/patches/linux/amlogic-0023-FROMLIST-v1-arm64-dts-meson-switch-TFLASH_VDD_EN-pin.patch new file mode 100644 index 00000000000..2884398d8b7 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0023-FROMLIST-v1-arm64-dts-meson-switch-TFLASH_VDD_EN-pin.patch @@ -0,0 +1,37 @@ +From 8034a2829adeb23b0431ace73b1b09221d6f27a7 Mon Sep 17 00:00:00 2001 +From: Marek Szyprowski +Date: Sun, 27 Dec 2020 14:42:02 +0000 +Subject: [PATCH 23/79] FROMLIST(v1): arm64: dts: meson: switch TFLASH_VDD_EN + pin to open drain on Odroid-C4 + +For the proper reboot Odroid-C4 board requires to switch TFLASH_VDD_EN +pin to the high impedance mode, otherwise the board is stuck in the +middle of loading early stages of the bootloader from SD card. + +This can be achieved by using the OPEN_DRAIN flag instead if the +ACTIVE_HIGH, what will leave the pin in input to achieve high state (pin +has the pull-up) and solve the issue. + +Suggested-by: Neil Armstrong +Fixes: 326e57518b0d ("arm64: dts: meson-sm1: add support for Hardkernel ODROID-C4") +Signed-off-by: Marek Szyprowski +--- + arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts +index cf5a98f0e47c..a712273c905a 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts +@@ -52,7 +52,7 @@ + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + +- gpio = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; ++ gpio = <&gpio_ao GPIOAO_3 GPIO_OPEN_DRAIN>; + enable-active-high; + regulator-always-on; + }; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0024-FROMGIT-arm64-dts-meson-g12b-move-G12B-thermal-nodes.patch b/projects/Amlogic/patches/linux/amlogic-0024-FROMGIT-arm64-dts-meson-g12b-move-G12B-thermal-nodes.patch deleted file mode 100644 index fb96048f396..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0024-FROMGIT-arm64-dts-meson-g12b-move-G12B-thermal-nodes.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 7c1c1d86645c337d0f3d32e90abe557bfde9b093 Mon Sep 17 00:00:00 2001 -From: Neil Armstrong -Date: Wed, 13 May 2020 06:53:19 +0000 -Subject: [PATCH 024/156] FROMGIT: arm64: dts: meson-g12b: move G12B thermal - nodes to meson-g12b.dtsi - -The G12B thermal nodes should be in the meson-g12b.dtsi file. - -Fixes: 195f140318a9 ("arm64: dts: meson: g12b: add cooling properties") -Signed-off-by: Neil Armstrong ---- - arch/arm64/boot/dts/amlogic/meson-g12.dtsi | 23 --------------------- - arch/arm64/boot/dts/amlogic/meson-g12b.dtsi | 22 ++++++++++++++++++++ - 2 files changed, 22 insertions(+), 23 deletions(-) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12.dtsi -index 55d39020ec72..f5a4bc819247 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-g12.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-g12.dtsi -@@ -354,29 +354,6 @@ - }; - }; - --&cpu_thermal { -- cooling-maps { -- map0 { -- trip = <&cpu_passive>; -- cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -- <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -- <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -- <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -- <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -- <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; -- }; -- map1 { -- trip = <&cpu_hot>; -- cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -- <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -- <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -- <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -- <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -- <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; -- }; -- }; --}; -- - ðmac { - power-domains = <&pwrc PWRC_G12A_ETH_ID>; - }; -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi -index 6dbc3968045b..9b8548e5f6e5 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi -@@ -113,3 +113,25 @@ - compatible = "amlogic,g12b-clkc"; - }; - -+&cpu_thermal { -+ cooling-maps { -+ map0 { -+ trip = <&cpu_passive>; -+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -+ <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -+ <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -+ <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -+ <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; -+ }; -+ map1 { -+ trip = <&cpu_hot>; -+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -+ <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -+ <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -+ <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -+ <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; -+ }; -+ }; -+}; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0042-FROMGIT-arm64-dts-meson-g12b-gtking-pro-add-initial-.patch b/projects/Amlogic/patches/linux/amlogic-0024-FROMLIST-v2-arm64-dts-meson-add-initial-Beelink-GS-K.patch similarity index 57% rename from projects/Amlogic/patches/linux/amlogic-0042-FROMGIT-arm64-dts-meson-g12b-gtking-pro-add-initial-.patch rename to projects/Amlogic/patches/linux/amlogic-0024-FROMLIST-v2-arm64-dts-meson-add-initial-Beelink-GS-K.patch index 1004354baee..561a341059e 100644 --- a/projects/Amlogic/patches/linux/amlogic-0042-FROMGIT-arm64-dts-meson-g12b-gtking-pro-add-initial-.patch +++ b/projects/Amlogic/patches/linux/amlogic-0024-FROMLIST-v2-arm64-dts-meson-add-initial-Beelink-GS-K.patch @@ -1,50 +1,53 @@ -From 1bf06c1222c6de12bc80462b1df332e8d375cf27 Mon Sep 17 00:00:00 2001 +From ea775ccb6a304e9b294f4aee512d578d271b3a4a Mon Sep 17 00:00:00 2001 From: Christian Hewitt -Date: Sun, 1 Mar 2020 05:43:00 +0000 -Subject: [PATCH 042/156] FROMGIT: arm64: dts: meson-g12b-gtking-pro: add - initial device-tree +Date: Fri, 12 Jun 2020 08:05:20 +0000 +Subject: [PATCH 24/79] FROMLIST(v2): arm64: dts: meson: add initial Beelink + GS-King-X device-tree -The Shenzen AZW (Beelink) GT-King Pro is based on the Amlogic W400 -reference board with an S922X chip. +The Shenzen AZW (Beelink) GS-King-X is based on the Amlogic W400 reference +board with an S922X-H chip. - 4GB LPDDR4 RAM - 64GB eMMC storage - 10/100/1000 Base-T Ethernet - AP6356S Wireless (802.11 a/b/g/n/ac, BT 4.1) - HDMI 2.1 video -- Analogue audio output -- 1x RS232 port -- 2x USB 2.0 port -- 2x USB 3.0 ports +- S/PDIF optical output +- 2x ESS9018 audio DACs +- 4x Ricor RT6862 audio amps +- Analogue headphone output +- 1x USB 2.0 OTG port +- 3x USB 3.0 ports - IR receiver -- 1x micro SD card slot +- 1x micro SD card slot (internal) +- USB SATA controller with 2x 3.5" drive bays - 1x Power on/off button Signed-off-by: Christian Hewitt --- arch/arm64/boot/dts/amlogic/Makefile | 1 + - .../dts/amlogic/meson-g12b-gtking-pro.dts | 125 ++++++++++++++++++ - 2 files changed, 126 insertions(+) - create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts + .../boot/dts/amlogic/meson-g12b-gsking-x.dts | 133 ++++++++++++++++++ + 2 files changed, 134 insertions(+) + create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile -index 8c9e9dfa5da3..5cac4d1d487d 100644 +index ced03946314f..dce41cd3f347 100644 --- a/arch/arm64/boot/dts/amlogic/Makefile +++ b/arch/arm64/boot/dts/amlogic/Makefile -@@ -4,6 +4,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12a-sei510.dtb +@@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-axg-s400.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-g12a-sei510.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb ++dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gsking-x.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking.dtb -+dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts +diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts new file mode 100644 -index 000000000000..f0c56a16af3d +index 000000000000..c9d9dcb0cd65 --- /dev/null -+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts -@@ -0,0 +1,125 @@ ++++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts +@@ -0,0 +1,133 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 BayLibre, SAS @@ -55,11 +58,17 @@ index 000000000000..f0c56a16af3d +/dts-v1/; + +#include "meson-g12b-w400.dtsi" ++#include +#include + +/ { -+ compatible = "azw,gtking", "amlogic,g12b"; -+ model = "Beelink GT-King Pro"; ++ compatible = "azw,gsking-x", "amlogic,g12b"; ++ model = "Beelink GS-King X"; ++ ++ aliases { ++ rtc0 = &rtc; ++ rtc1 = &vrtc; ++ }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; @@ -74,24 +83,14 @@ index 000000000000..f0c56a16af3d + }; + }; + -+ leds { -+ compatible = "gpio-leds"; -+ -+ white { -+ label = "power:white"; -+ gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ }; -+ + sound { + compatible = "amlogic,axg-sound-card"; -+ model = "G12B-GTKING-PRO"; -+ audio-aux-devs = <&tdmout_b>; -+ audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", -+ "TDMOUT_B IN 1", "FRDDR_B OUT 1", -+ "TDMOUT_B IN 2", "FRDDR_C OUT 1", -+ "TDM_B Playback", "TDMOUT_B OUT"; ++ model = "G12B-GSKING-X"; ++ audio-aux-devs = <&tdmout_a>; ++ audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 1", ++ "TDMOUT_A IN 1", "FRDDR_B OUT 1", ++ "TDMOUT_A IN 2", "FRDDR_C OUT 1", ++ "TDM_A Playback", "TDMOUT_A OUT"; + + assigned-clocks = <&clkc CLKID_MPLL2>, + <&clkc CLKID_MPLL0>, @@ -116,7 +115,7 @@ index 000000000000..f0c56a16af3d + + /* 8ch hdmi interface */ + dai-link-3 { -+ sound-dai = <&tdmif_b>; ++ sound-dai = <&tdmif_a>; + dai-format = "i2s"; + dai-tdm-slot-tx-mask-0 = <1 1>; + dai-tdm-slot-tx-mask-1 = <1 1>; @@ -125,7 +124,7 @@ index 000000000000..f0c56a16af3d + mclk-fs = <256>; + + codec { -+ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; ++ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>; + }; + }; + @@ -159,11 +158,23 @@ index 000000000000..f0c56a16af3d + status = "okay"; +}; + -+&tdmif_b { ++&i2c3 { ++ status = "okay"; ++ pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>; ++ pinctrl-names = "default"; ++ ++ rtc: rtc@51 { ++ compatible = "nxp,pcf8563"; ++ reg = <0x51>; ++ wakeup-source; ++ }; ++}; ++ ++&tdmif_a { + status = "okay"; +}; + -+&tdmout_b { ++&tdmout_a { + status = "okay"; +}; + diff --git a/projects/Amlogic/patches/linux/amlogic-0025-FROMGIT-arm64-dts-meson-sm1-add-cpu-thermal-nodes.patch b/projects/Amlogic/patches/linux/amlogic-0025-FROMGIT-arm64-dts-meson-sm1-add-cpu-thermal-nodes.patch deleted file mode 100644 index b1918dd5a3a..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0025-FROMGIT-arm64-dts-meson-sm1-add-cpu-thermal-nodes.patch +++ /dev/null @@ -1,79 +0,0 @@ -From c1f1a4675a0b6d121c952eea2edbe9b34081fbe6 Mon Sep 17 00:00:00 2001 -From: Neil Armstrong -Date: Wed, 13 May 2020 06:54:09 +0000 -Subject: [PATCH 025/156] FROMGIT: arm64: dts: meson-sm1: add cpu thermal nodes - -Add thermal nodes for the Amlogic SM1 SoCs based on the G12A and G12B -thermal nodes. - -Signed-off-by: Neil Armstrong ---- - arch/arm64/boot/dts/amlogic/meson-sm1.dtsi | 24 ++++++++++++++++++++++ - 1 file changed, 24 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi -index d4ec735fb1a5..71317f5aada1 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi -@@ -56,6 +56,7 @@ - reg = <0x0 0x0>; - enable-method = "psci"; - next-level-cache = <&l2>; -+ #cooling-cells = <2>; - }; - - cpu1: cpu@1 { -@@ -64,6 +65,7 @@ - reg = <0x0 0x1>; - enable-method = "psci"; - next-level-cache = <&l2>; -+ #cooling-cells = <2>; - }; - - cpu2: cpu@2 { -@@ -72,6 +74,7 @@ - reg = <0x0 0x2>; - enable-method = "psci"; - next-level-cache = <&l2>; -+ #cooling-cells = <2>; - }; - - cpu3: cpu@3 { -@@ -80,6 +83,7 @@ - reg = <0x0 0x3>; - enable-method = "psci"; - next-level-cache = <&l2>; -+ #cooling-cells = <2>; - }; - - l2: l2-cache0 { -@@ -466,6 +470,26 @@ - compatible = "amlogic,sm1-clkc"; - }; - -+&cpu_thermal { -+ cooling-maps { -+ map0 { -+ trip = <&cpu_passive>; -+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -+ <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -+ <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; -+ }; -+ -+ map1 { -+ trip = <&cpu_hot>; -+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -+ <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, -+ <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; -+ }; -+ }; -+}; -+ - ðmac { - power-domains = <&pwrc PWRC_SM1_ETH_ID>; - }; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0025-FROMLIST-v1-arm64-dts-meson-add-i2c3-rtc-nodes-and-r.patch b/projects/Amlogic/patches/linux/amlogic-0025-FROMLIST-v1-arm64-dts-meson-add-i2c3-rtc-nodes-and-r.patch new file mode 100644 index 00000000000..7a0e5579db0 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0025-FROMLIST-v1-arm64-dts-meson-add-i2c3-rtc-nodes-and-r.patch @@ -0,0 +1,49 @@ +From dad355f2881fee1ef3239f68650feb84c1eb121a Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Mon, 21 Dec 2020 12:06:25 +0000 +Subject: [PATCH 25/79] FROMLIST(v1): arm64: dts: meson: add i2c3/rtc nodes and + rtc aliases to ODROID-N2 dtsi + +Enable the onboard pcf8563 rtc hardware on ODROID N2/N2+ boards via the +common dtsi. Also add aliases to ensure vrtc does not claim /dev/rtc0. + +Signed-off-by: Christian Hewitt +--- + .../boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi +index 39a09661c5f6..b78be3e6974d 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi ++++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi +@@ -13,6 +13,8 @@ + aliases { + serial0 = &uart_AO; + ethernet0 = ðmac; ++ rtc0 = &rtc; ++ rtc1 = &vrtc; + }; + + dioo2133: audio-amplifier-0 { +@@ -478,6 +480,18 @@ + linux,rc-map-name = "rc-odroid"; + }; + ++&i2c3 { ++ status = "okay"; ++ pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>; ++ pinctrl-names = "default"; ++ ++ rtc: rtc@51 { ++ compatible = "nxp,pcf8563"; ++ reg = <0x51>; ++ wakeup-source; ++ }; ++}; ++ + &pwm_ab { + pinctrl-0 = <&pwm_a_e_pins>; + pinctrl-names = "default"; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0026-FROMGIT-arm64-dts-meson-gxl-add-acodec-support.patch b/projects/Amlogic/patches/linux/amlogic-0026-FROMGIT-arm64-dts-meson-gxl-add-acodec-support.patch deleted file mode 100644 index 22ccefb1c0c..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0026-FROMGIT-arm64-dts-meson-gxl-add-acodec-support.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 358f6d732c3032cc33991d39c3d9c69723ae9383 Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Wed, 13 May 2020 07:17:31 +0000 -Subject: [PATCH 026/156] FROMGIT: arm64: dts: meson: gxl: add acodec support - -Add the internal audio DAC to the gxl SoC DT - -Signed-off-by: Jerome Brunet ---- - arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi -index d9f00c5a9a5c..4e0d8ef97f99 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi -@@ -37,6 +37,17 @@ - }; - }; - -+ acodec: audio-controller@c8832000 { -+ compatible = "amlogic,t9015"; -+ reg = <0x0 0xc8832000 0x0 0x14>; -+ #sound-dai-cells = <0>; -+ sound-name-prefix = "ACODEC"; -+ clocks = <&clkc CLKID_ACODEC>; -+ clock-names = "pclk"; -+ resets = <&reset RESET_ACODEC>; -+ status = "disabled"; -+ }; -+ - crypto: crypto@c883e000 { - compatible = "amlogic,gxl-crypto"; - reg = <0x0 0xc883e000 0x0 0x36>; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0127-WIP-dt-bindings-arm-amlogic-add-support-for-the-Beel.patch b/projects/Amlogic/patches/linux/amlogic-0026-FROMLIST-v2-dt-bindings-arm-amlogic-add-support-for-.patch similarity index 77% rename from projects/Amlogic/patches/linux/amlogic-0127-WIP-dt-bindings-arm-amlogic-add-support-for-the-Beel.patch rename to projects/Amlogic/patches/linux/amlogic-0026-FROMLIST-v2-dt-bindings-arm-amlogic-add-support-for-.patch index 3149382f831..875125b2285 100644 --- a/projects/Amlogic/patches/linux/amlogic-0127-WIP-dt-bindings-arm-amlogic-add-support-for-the-Beel.patch +++ b/projects/Amlogic/patches/linux/amlogic-0026-FROMLIST-v2-dt-bindings-arm-amlogic-add-support-for-.patch @@ -1,8 +1,8 @@ -From f0de6c272c4804d00a1979cdc2f4f1b8cb2c9cf2 Mon Sep 17 00:00:00 2001 +From f1f897b6cf618ab7d4739cde6c7a184d7a05b580 Mon Sep 17 00:00:00 2001 From: Christian Hewitt Date: Fri, 12 Jun 2020 08:04:00 +0000 -Subject: [PATCH 127/156] WIP: dt-bindings: arm: amlogic: add support for the - Beelink GS-King-X +Subject: [PATCH 26/79] FROMLIST(v2): dt-bindings: arm: amlogic: add support + for the Beelink GS-King-X The Shenzen AZW (Beelink) GS-King-X is based on the Amlogic W400 reference board with an S922X-H chip. @@ -13,14 +13,14 @@ Signed-off-by: Christian Hewitt 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml -index 55605571e182..52440e38436a 100644 +index 3341788d1096..6bef60ddda64 100644 --- a/Documentation/devicetree/bindings/arm/amlogic.yaml +++ b/Documentation/devicetree/bindings/arm/amlogic.yaml @@ -151,6 +151,7 @@ properties: - description: Boards with the Amlogic Meson G12B S922X SoC items: - enum: -+ - awz,gsking-x ++ - azw,gsking-x - azw,gtking - azw,gtking-pro - hardkernel,odroid-n2 diff --git a/projects/Amlogic/patches/linux/amlogic-0027-FROMGIT-arm64-dts-meson-p230-q200-add-internal-DAC-s.patch b/projects/Amlogic/patches/linux/amlogic-0027-FROMGIT-arm64-dts-meson-p230-q200-add-internal-DAC-s.patch deleted file mode 100644 index 6cd3b0e84ac..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0027-FROMGIT-arm64-dts-meson-p230-q200-add-internal-DAC-s.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 268e19c0f927b6dc83b549f0458b3e2f0d6127f4 Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Wed, 13 May 2020 07:18:27 +0000 -Subject: [PATCH 027/156] FROMGIT: arm64: dts: meson: p230-q200: add internal - DAC support - -Add the necessary bits to support the internal audio DAC the p230/q200 -reference design derivated boards. The output of this DAC is provided -on the 3.5mm jack connector - -Signed-off-by: Jerome Brunet ---- - .../boot/dts/amlogic/meson-gx-p23x-q20x.dtsi | 32 +++++++++++++++++++ - 1 file changed, 32 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi -index 99c1f7f9d37e..358728f1ee93 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi -@@ -16,6 +16,13 @@ - ethernet0 = ðmac; - }; - -+ dio2133: analog-amplifier { -+ compatible = "simple-audio-amplifier"; -+ sound-name-prefix = "AU2"; -+ VCC-supply = <&hdmi_5v>; -+ enable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>; -+ }; -+ - spdif_dit: audio-codec-0 { - #sound-dai-cells = <0>; - compatible = "linux,spdif-dit"; -@@ -115,6 +122,14 @@ - sound { - compatible = "amlogic,gx-sound-card"; - model = "GX-P230-Q200"; -+ audio-aux-devs = <&dio2133>; -+ audio-widgets = "Line", "Lineout"; -+ audio-routing = "AU2 INL", "ACODEC LOLP", -+ "AU2 INR", "ACODEC LORP", -+ "AU2 INL", "ACODEC LOLN", -+ "AU2 INR", "ACODEC LORN", -+ "Lineout", "AU2 OUTL", -+ "Lineout", "AU2 OUTR"; - assigned-clocks = <&clkc CLKID_MPLL0>, - <&clkc CLKID_MPLL1>, - <&clkc CLKID_MPLL2>; -@@ -140,6 +155,10 @@ - codec-0 { - sound-dai = <&aiu AIU_HDMI CTRL_I2S>; - }; -+ -+ codec-1 { -+ sound-dai = <&aiu AIU_ACODEC CTRL_I2S>; -+ }; - }; - - dai-link-3 { -@@ -157,9 +176,22 @@ - sound-dai = <&hdmi_tx>; - }; - }; -+ -+ dai-link-5 { -+ sound-dai = <&aiu AIU_ACODEC CTRL_OUT>; -+ -+ codec-0 { -+ sound-dai = <&acodec>; -+ }; -+ }; - }; - }; - -+&acodec { -+ AVDD-supply = <&vddio_ao18>; -+ status = "okay"; -+}; -+ - &aiu { - status = "okay"; - pinctrl-0 = <&spdif_out_h_pins>; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0027-FROMLIST-v1-drm-panfrost-fix-reference-leak-in-panfr.patch b/projects/Amlogic/patches/linux/amlogic-0027-FROMLIST-v1-drm-panfrost-fix-reference-leak-in-panfr.patch new file mode 100644 index 00000000000..77e4007aeeb --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0027-FROMLIST-v1-drm-panfrost-fix-reference-leak-in-panfr.patch @@ -0,0 +1,39 @@ +From 2fb7343e4a5a82681549c417d668a4b45ed28a07 Mon Sep 17 00:00:00 2001 +From: Qinglang Miao +Date: Sat, 28 Nov 2020 16:10:04 +0000 +Subject: [PATCH 27/79] FROMLIST(v1): drm/panfrost: fix reference leak in + panfrost_job_hw_submit + +pm_runtime_get_sync will increment pm usage counter even it +failed. Forgetting to putting operation will result in a +reference leak here. + +A new function pm_runtime_resume_and_get is introduced in +[0] to keep usage counter balanced. So We fix the reference +leak by replacing it with new funtion. + +[0] dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") + +Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver") +Reported-by: Hulk Robot +Signed-off-by: Qinglang Miao +--- + drivers/gpu/drm/panfrost/panfrost_job.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c +index 04e6f6f9b742..d6d5c15184f9 100644 +--- a/drivers/gpu/drm/panfrost/panfrost_job.c ++++ b/drivers/gpu/drm/panfrost/panfrost_job.c +@@ -157,7 +157,7 @@ static void panfrost_job_hw_submit(struct panfrost_job *job, int js) + + panfrost_devfreq_record_busy(&pfdev->pfdevfreq); + +- ret = pm_runtime_get_sync(pfdev->dev); ++ ret = pm_runtime_resume_and_get(pfdev->dev); + if (ret < 0) + return; + +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0028-FROMGIT-arm64-dts-meson-libretech-cc-add-internal-DA.patch b/projects/Amlogic/patches/linux/amlogic-0028-FROMGIT-arm64-dts-meson-libretech-cc-add-internal-DA.patch deleted file mode 100644 index 7891d657fd5..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0028-FROMGIT-arm64-dts-meson-libretech-cc-add-internal-DA.patch +++ /dev/null @@ -1,82 +0,0 @@ -From bc8d9a3ec6b9e18fbc8829f2a409f430e8800338 Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Wed, 13 May 2020 07:19:24 +0000 -Subject: [PATCH 028/156] FROMGIT: arm64: dts: meson: libretech-cc: add - internal DAC support - -Add the internal DAC support on the libretech CC. The output of this -DAC is provided on the 3.5mm jack connector. - -Signed-off-by: Jerome Brunet ---- - .../amlogic/meson-gxl-s905x-libretech-cc.dts | 30 +++++++++++++++++++ - 1 file changed, 30 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts -index 2b821c501065..785c72319551 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts -@@ -22,6 +22,13 @@ - ethernet0 = ðmac; - }; - -+ dio2133: analog-amplifier { -+ compatible = "simple-audio-amplifier"; -+ sound-name-prefix = "AU2"; -+ VCC-supply = <&hdmi_5v>; -+ enable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>; -+ }; -+ - chosen { - stdout-path = "serial0:115200n8"; - }; -@@ -129,6 +136,12 @@ - sound { - compatible = "amlogic,gx-sound-card"; - model = "GXL-LIBRETECH-S905X-CC"; -+ audio-aux-devs = <&dio2133>; -+ audio-widgets = "Line", "Lineout"; -+ audio-routing = "AU2 INL", "ACODEC LOLN", -+ "AU2 INR", "ACODEC LORN", -+ "Lineout", "AU2 OUTL", -+ "Lineout", "AU2 OUTR"; - assigned-clocks = <&clkc CLKID_MPLL0>, - <&clkc CLKID_MPLL1>, - <&clkc CLKID_MPLL2>; -@@ -150,6 +163,10 @@ - codec-0 { - sound-dai = <&aiu AIU_HDMI CTRL_I2S>; - }; -+ -+ codec-1 { -+ sound-dai = <&aiu AIU_ACODEC CTRL_I2S>; -+ }; - }; - - dai-link-2 { -@@ -159,9 +176,22 @@ - sound-dai = <&hdmi_tx>; - }; - }; -+ -+ dai-link-3 { -+ sound-dai = <&aiu AIU_ACODEC CTRL_OUT>; -+ -+ codec-0 { -+ sound-dai = <&acodec>; -+ }; -+ }; - }; - }; - -+&acodec { -+ AVDD-supply = <&vddio_ao18>; -+ status = "okay"; -+}; -+ - &aiu { - status = "okay"; - }; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0028-FROMLIST-v1-drm-panfrost-Use-delayed-timer-as-defaul.patch b/projects/Amlogic/patches/linux/amlogic-0028-FROMLIST-v1-drm-panfrost-Use-delayed-timer-as-defaul.patch new file mode 100644 index 00000000000..97a4120bbcb --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0028-FROMLIST-v1-drm-panfrost-Use-delayed-timer-as-defaul.patch @@ -0,0 +1,30 @@ +From bf90debfd857025cd854feee6bd5c3983db94f21 Mon Sep 17 00:00:00 2001 +From: Lukasz Luba +Date: Tue, 12 Jan 2021 02:49:18 +0000 +Subject: [PATCH 28/79] FROMLIST(v1): drm/panfrost: Use delayed timer as + default in devfreq profile + +Devfreq framework supports 2 modes for monitoring devices. +Use delayed timer as default instead of deferrable timer +in order to monitor the GPU status regardless of CPU idle. + +Signed-off-by: Lukasz Luba +--- + drivers/gpu/drm/panfrost/panfrost_devfreq.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c +index 102a3dc146be..df8f2305b988 100644 +--- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c ++++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c +@@ -76,6 +76,7 @@ static int panfrost_devfreq_get_dev_status(struct device *dev, + } + + static struct devfreq_dev_profile panfrost_devfreq_profile = { ++ .timer = DEVFREQ_TIMER_DELAYED, + .polling_ms = 50, /* ~3 frames */ + .target = panfrost_devfreq_target, + .get_dev_status = panfrost_devfreq_get_dev_status, +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0029-FROMGIT-arm64-dts-meson-libretech-ac-add-internal-DA.patch b/projects/Amlogic/patches/linux/amlogic-0029-FROMGIT-arm64-dts-meson-libretech-ac-add-internal-DA.patch deleted file mode 100644 index 0ad1b97040b..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0029-FROMGIT-arm64-dts-meson-libretech-ac-add-internal-DA.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 930dcfee8439e97981e6d05a79f39aa768532a8e Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Wed, 13 May 2020 07:20:23 +0000 -Subject: [PATCH 029/156] FROMGIT: arm64: dts: meson: libretech-ac: add - internal DAC support - -Add the internal DAC support on the libretech CC. The output of this -DAC is provided on the 9J5 connector. - -Signed-off-by: Jerome Brunet ---- - .../amlogic/meson-gxl-s805x-libretech-ac.dts | 30 +++++++++++++++++++ - 1 file changed, 30 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dts -index 3f35331c1652..63bdc0407eea 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dts -@@ -98,6 +98,15 @@ - regulator-always-on; - }; - -+ vddio_ao18: regulator-vddio_ao18 { -+ compatible = "regulator-fixed"; -+ regulator-name = "VDDIO_AO18"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ vin-supply = <&vcc_3v3>; -+ regulator-always-on; -+ }; -+ - vddio_boot: regulator-vddio_boot { - compatible = "regulator-fixed"; - regulator-name = "VDDIO_BOOT"; -@@ -110,6 +119,10 @@ - sound { - compatible = "amlogic,gx-sound-card"; - model = "GXL-LIBRETECH-S805X-AC"; -+ audio-widgets = "Speaker", "9J5-3 LEFT", -+ "Speaker", "9J5-2 RIGHT"; -+ audio-routing = "9J5-3 LEFT", "ACODEC LOLN", -+ "9J5-2 RIGHT", "ACODEC LORN"; - assigned-clocks = <&clkc CLKID_MPLL0>, - <&clkc CLKID_MPLL1>, - <&clkc CLKID_MPLL2>; -@@ -131,6 +144,10 @@ - codec-0 { - sound-dai = <&aiu AIU_HDMI CTRL_I2S>; - }; -+ -+ codec-1 { -+ sound-dai = <&aiu AIU_ACODEC CTRL_I2S>; -+ }; - }; - - dai-link-2 { -@@ -140,9 +157,22 @@ - sound-dai = <&hdmi_tx>; - }; - }; -+ -+ dai-link-3 { -+ sound-dai = <&aiu AIU_ACODEC CTRL_OUT>; -+ -+ codec-0 { -+ sound-dai = <&acodec>; -+ }; -+ }; - }; - }; - -+&acodec { -+ AVDD-supply = <&vddio_ao18>; -+ status = "okay"; -+}; -+ - &aiu { - status = "okay"; - }; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0029-FROMLIST-v1-drm-lima-fix-reference-leak-in-lima_pm_b.patch b/projects/Amlogic/patches/linux/amlogic-0029-FROMLIST-v1-drm-lima-fix-reference-leak-in-lima_pm_b.patch new file mode 100644 index 00000000000..f5ebc829b3a --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0029-FROMLIST-v1-drm-lima-fix-reference-leak-in-lima_pm_b.patch @@ -0,0 +1,39 @@ +From 792b4a7db1a6427d446be9da31c10ee1687f5e4c Mon Sep 17 00:00:00 2001 +From: Qinglang Miao +Date: Sat, 28 Nov 2020 16:39:27 +0000 +Subject: [PATCH 29/79] FROMLIST(v1): drm/lima: fix reference leak in + lima_pm_busy + +pm_runtime_get_sync will increment pm usage counter even it +failed. Forgetting to putting operation will result in a +reference leak here. + +A new function pm_runtime_resume_and_get is introduced in +[0] to keep usage counter balanced. So We fix the reference +leak by replacing it with new funtion. + +[0] dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") + +Fixes: 50de2e9ebbc0 ("drm/lima: enable runtime pm") +Reported-by: Hulk Robot +Signed-off-by: Qinglang Miao +--- + drivers/gpu/drm/lima/lima_sched.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/lima/lima_sched.c b/drivers/gpu/drm/lima/lima_sched.c +index 63b4c5643f9c..5cc20b403a25 100644 +--- a/drivers/gpu/drm/lima/lima_sched.c ++++ b/drivers/gpu/drm/lima/lima_sched.c +@@ -201,7 +201,7 @@ static int lima_pm_busy(struct lima_device *ldev) + int ret; + + /* resume GPU if it has been suspended by runtime PM */ +- ret = pm_runtime_get_sync(ldev->dev); ++ ret = pm_runtime_resume_and_get(ldev->dev); + if (ret < 0) + return ret; + +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0030-FROMGIT-arm64-dts-meson-libretech-pc-add-internal-DA.patch b/projects/Amlogic/patches/linux/amlogic-0030-FROMGIT-arm64-dts-meson-libretech-pc-add-internal-DA.patch deleted file mode 100644 index c229ea3a06a..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0030-FROMGIT-arm64-dts-meson-libretech-pc-add-internal-DA.patch +++ /dev/null @@ -1,83 +0,0 @@ -From fc4b8fed5cc950d9ef07a4b4894a9d60a7393510 Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Wed, 13 May 2020 07:21:28 +0000 -Subject: [PATCH 030/156] FROMGIT: arm64: dts: meson: libretech-pc: add - internal DAC support - -Add the internal DAC support on the libretech CC. The output of this -DAC is provided on the 9J4 connector. - -Signed-off-by: Jerome Brunet ---- - .../dts/amlogic/meson-gx-libretech-pc.dtsi | 31 +++++++++++++++++++ - 1 file changed, 31 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi -index 4cc5f3df5677..0967d1f4820e 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi -@@ -30,6 +30,13 @@ - spi0 = &spifc; - }; - -+ dio2133: analog-amplifier { -+ compatible = "simple-audio-amplifier"; -+ sound-name-prefix = "AU2"; -+ VCC-supply = <&vcc5v>; -+ enable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>; -+ }; -+ - chosen { - stdout-path = "serial0:115200n8"; - }; -@@ -180,6 +187,13 @@ - sound { - compatible = "amlogic,gx-sound-card"; - model = "GXL-LIBRETECH-S9XX-PC"; -+ audio-aux-devs = <&dio2133>; -+ audio-widgets = "Speaker", "7J4-14 LEFT", -+ "Speaker", "7J4-11 RIGHT"; -+ audio-routing = "AU2 INL", "ACODEC LOLN", -+ "AU2 INR", "ACODEC LORN", -+ "7J4-14 LEFT", "AU2 OUTL", -+ "7J4-11 RIGHT", "AU2 OUTR"; - assigned-clocks = <&clkc CLKID_MPLL0>, - <&clkc CLKID_MPLL1>, - <&clkc CLKID_MPLL2>; -@@ -201,6 +215,10 @@ - codec-0 { - sound-dai = <&aiu AIU_HDMI CTRL_I2S>; - }; -+ -+ codec-1 { -+ sound-dai = <&aiu AIU_ACODEC CTRL_I2S>; -+ }; - }; - - dai-link-2 { -@@ -210,9 +228,22 @@ - sound-dai = <&hdmi_tx>; - }; - }; -+ -+ dai-link-3 { -+ sound-dai = <&aiu AIU_ACODEC CTRL_OUT>; -+ -+ codec-0 { -+ sound-dai = <&acodec>; -+ }; -+ }; - }; - }; - -+&acodec { -+ AVDD-supply = <&vddio_ao18>; -+ status = "okay"; -+}; -+ - &aiu { - status = "okay"; - }; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0030-FROMLIST-v1-mmc-meson-gx-check-for-scatterlist-size-.patch b/projects/Amlogic/patches/linux/amlogic-0030-FROMLIST-v1-mmc-meson-gx-check-for-scatterlist-size-.patch new file mode 100644 index 00000000000..9978dec15f2 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0030-FROMLIST-v1-mmc-meson-gx-check-for-scatterlist-size-.patch @@ -0,0 +1,86 @@ +From eb85e9dd941793114aa1583a982999068ee93740 Mon Sep 17 00:00:00 2001 +From: Dmitry Lebed +Date: Fri, 18 Dec 2020 08:49:32 +0000 +Subject: [PATCH 30/79] FROMLIST(v1): mmc: meson-gx: check for scatterlist size + alignment in block mode + +Enable SGDMA support for SD_IO_RW_EXTENDED and add proper check +for scatterlist size alignment in block mode. + +According to documentation, in SDIO block mode meson-gx DMA could +only handle buffers with sizes that are multiples of SDIO block size. + +Some SDIO drivers like brcmfmac use scatterlist API, but do not enforce +proper scatterlist buffer size alignemnt, this looks like a root cause +of non-working CMD53. + +Some minor style fixes. + +Signed-off-by: Dmitry Lebed +--- + drivers/mmc/host/meson-gx-mmc.c | 37 ++++++++++++++++++++------------- + 1 file changed, 22 insertions(+), 15 deletions(-) + +diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c +index 13f6a2c0ed04..eb6c02bc4a02 100644 +--- a/drivers/mmc/host/meson-gx-mmc.c ++++ b/drivers/mmc/host/meson-gx-mmc.c +@@ -227,7 +227,6 @@ static void meson_mmc_get_transfer_mode(struct mmc_host *mmc, + struct mmc_data *data = mrq->data; + struct scatterlist *sg; + int i; +- bool use_desc_chain_mode = true; + + /* + * When Controller DMA cannot directly access DDR memory, disable +@@ -237,25 +236,33 @@ static void meson_mmc_get_transfer_mode(struct mmc_host *mmc, + if (host->dram_access_quirk) + return; + +- /* +- * Broken SDIO with AP6255-based WiFi on Khadas VIM Pro has been +- * reported. For some strange reason this occurs in descriptor +- * chain mode only. So let's fall back to bounce buffer mode +- * for command SD_IO_RW_EXTENDED. +- */ +- if (mrq->cmd->opcode == SD_IO_RW_EXTENDED) +- return; ++ if (data->blocks > 1) { ++ /* ++ * In block mode DMA descriptor format, "length" field indicates ++ * number of blocks and there is no way to pass DMA size that ++ * is not multiple of SDIO block size, making it impossible to ++ * tie more than one memory buffer with single SDIO block. ++ * Block mode sg buffer size should be aligned with SDIO block ++ * size, otherwise chain mode could not be used. ++ */ ++ for_each_sg(data->sg, sg, data->sg_len, i) { ++ if (sg->length % data->blksz) { ++ WARN_ONCE(1, "unaligned sg len %u blksize %u\n", ++ sg->length, data->blksz); ++ return; ++ } ++ } ++ } + +- for_each_sg(data->sg, sg, data->sg_len, i) ++ for_each_sg(data->sg, sg, data->sg_len, i) { + /* check for 8 byte alignment */ +- if (sg->offset & 7) { ++ if (sg->offset % 8) { + WARN_ONCE(1, "unaligned scatterlist buffer\n"); +- use_desc_chain_mode = false; +- break; ++ return; + } ++ } + +- if (use_desc_chain_mode) +- data->host_cookie |= SD_EMMC_DESC_CHAIN_MODE; ++ data->host_cookie |= SD_EMMC_DESC_CHAIN_MODE; + } + + static inline bool meson_mmc_desc_chain_mode(const struct mmc_data *data) +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0031-FROMGIT-arm64-dts-meson-g12-add-internal-DAC.patch b/projects/Amlogic/patches/linux/amlogic-0031-FROMGIT-arm64-dts-meson-g12-add-internal-DAC.patch deleted file mode 100644 index 8ee17c21fbd..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0031-FROMGIT-arm64-dts-meson-g12-add-internal-DAC.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 27b512b569ec9ed7a2912e079b241cc622b48401 Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Wed, 13 May 2020 07:22:26 +0000 -Subject: [PATCH 031/156] FROMGIT: arm64: dts: meson: g12: add internal DAC - -Add internal audio DAC support on the g12 and sm1 SoC family - -Signed-off-by: Jerome Brunet ---- - arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi -index 0a625ad14712..9eaa452ce07a 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi -@@ -250,6 +250,17 @@ - }; - }; - -+ acodec: audio-controller@32000 { -+ compatible = "amlogic,t9015"; -+ reg = <0x0 0x32000 0x0 0x14>; -+ #sound-dai-cells = <0>; -+ sound-name-prefix = "ACODEC"; -+ clocks = <&clkc CLKID_AUDIO_CODEC>; -+ clock-names = "pclk"; -+ resets = <&reset RESET_AUDIO_CODEC>; -+ status = "disabled"; -+ }; -+ - periphs: bus@34400 { - compatible = "simple-bus"; - reg = <0x0 0x34400 0x0 0x400>; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0031-FROMLIST-v1-phy-amlogic-phy-meson-gxl-usb2-fix-share.patch b/projects/Amlogic/patches/linux/amlogic-0031-FROMLIST-v1-phy-amlogic-phy-meson-gxl-usb2-fix-share.patch new file mode 100644 index 00000000000..6921f031cc4 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0031-FROMLIST-v1-phy-amlogic-phy-meson-gxl-usb2-fix-share.patch @@ -0,0 +1,48 @@ +From dafd61f40996680aa2a8d2a2f897390ef246b638 Mon Sep 17 00:00:00 2001 +From: Amjad Ouled-Ameur +Date: Fri, 13 Nov 2020 07:45:15 +0000 +Subject: [PATCH 31/79] FROMLIST(v1): phy: amlogic: phy-meson-gxl-usb2: fix + shared reset controller use + +Use reset_control_rearm() call if an error occurs in case +phy_meson_gxl_usb2_init() fails after reset() has been called ; or in case +phy_meson_gxl_usb2_exit() is called i.e the resource is no longer used +and the reset line may be triggered again by other devices. + +reset_control_rearm() keeps use of triggered_count sane in the reset +framework. Therefore, use of reset_control_reset() on shared reset line +should be balanced with reset_control_rearm(). + +Signed-off-by: Amjad Ouled-Ameur +Reported-by: Jerome Brunet +--- + drivers/phy/amlogic/phy-meson-gxl-usb2.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/phy/amlogic/phy-meson-gxl-usb2.c b/drivers/phy/amlogic/phy-meson-gxl-usb2.c +index 2b3c0d730f20..17826cd03142 100644 +--- a/drivers/phy/amlogic/phy-meson-gxl-usb2.c ++++ b/drivers/phy/amlogic/phy-meson-gxl-usb2.c +@@ -114,8 +114,10 @@ static int phy_meson_gxl_usb2_init(struct phy *phy) + return ret; + + ret = clk_prepare_enable(priv->clk); +- if (ret) ++ if (ret) { ++ reset_control_rearm(priv->reset); + return ret; ++ } + + return 0; + } +@@ -124,6 +126,7 @@ static int phy_meson_gxl_usb2_exit(struct phy *phy) + { + struct phy_meson_gxl_usb2_priv *priv = phy_get_drvdata(phy); + ++ reset_control_rearm(priv->reset); + clk_disable_unprepare(priv->clk); + + return 0; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0032-FROMGIT-arm64-dts-meson-g12-add-internal-DAC-glue.patch b/projects/Amlogic/patches/linux/amlogic-0032-FROMGIT-arm64-dts-meson-g12-add-internal-DAC-glue.patch deleted file mode 100644 index b0803560d4d..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0032-FROMGIT-arm64-dts-meson-g12-add-internal-DAC-glue.patch +++ /dev/null @@ -1,38 +0,0 @@ -From fd12e659a2fbebe5c6bd7c9ff64de7bbb59964b7 Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Wed, 13 May 2020 07:23:20 +0000 -Subject: [PATCH 032/156] FROMGIT: arm64: dts: meson: g12: add internal DAC - glue - -Add the internal DAC glue support on the g12 and sm1 family -This glue connects the different TDM interfaces of the SoC to -the internal audio DAC codec. - -Signed-off-by: Jerome Brunet ---- - arch/arm64/boot/dts/amlogic/meson-g12.dtsi | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12.dtsi -index f5a4bc819247..6a1f4dcf6488 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-g12.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-g12.dtsi -@@ -343,6 +343,15 @@ - status = "disabled"; - }; - -+ toacodec: audio-controller@740 { -+ compatible = "amlogic,g12a-toacodec"; -+ reg = <0x0 0x740 0x0 0x4>; -+ #sound-dai-cells = <1>; -+ sound-name-prefix = "TOACODEC"; -+ resets = <&clkc_audio AUD_RESET_TOACODEC>; -+ status = "disabled"; -+ }; -+ - tohdmitx: audio-controller@744 { - compatible = "amlogic,g12a-tohdmitx"; - reg = <0x0 0x744 0x0 0x4>; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0032-FROMLIST-v1-usb-dwc3-meson-g12a-fix-shared-reset-con.patch b/projects/Amlogic/patches/linux/amlogic-0032-FROMLIST-v1-usb-dwc3-meson-g12a-fix-shared-reset-con.patch new file mode 100644 index 00000000000..ca32088fb7b --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0032-FROMLIST-v1-usb-dwc3-meson-g12a-fix-shared-reset-con.patch @@ -0,0 +1,105 @@ +From 1cdf814d6c594292237fc777947db4249c4061a5 Mon Sep 17 00:00:00 2001 +From: Amjad Ouled-Ameur +Date: Fri, 13 Nov 2020 07:46:15 +0000 +Subject: [PATCH 32/79] FROMLIST(v1): usb: dwc3: meson-g12a: fix shared reset + control use + +reset_control_(de)assert() calls are called on a shared reset line when +reset_control_reset has been used. This is not allowed by the reset +framework. + +Use reset_control_rearm() call in suspend() and remove() as a way to state +that the resource is no longer used, hence the shared reset line +may be triggered again by other devices. Use reset_control_rearm() also in +case probe fails after reset() has been called. + +reset_control_rearm() keeps use of triggered_count sane in the reset +framework, use of reset_control_reset() on shared reset line should be +balanced with reset_control_rearm(). + +Signed-off-by: Amjad Ouled-Ameur +Reported-by: Jerome Brunet +--- + drivers/usb/dwc3/dwc3-meson-g12a.c | 19 +++++++++++++------ + 1 file changed, 13 insertions(+), 6 deletions(-) + +diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c +index bdf1f98dfad8..6570146cabc5 100644 +--- a/drivers/usb/dwc3/dwc3-meson-g12a.c ++++ b/drivers/usb/dwc3/dwc3-meson-g12a.c +@@ -750,7 +750,7 @@ static int dwc3_meson_g12a_probe(struct platform_device *pdev) + + ret = dwc3_meson_g12a_get_phys(priv); + if (ret) +- goto err_disable_clks; ++ goto err_rearm; + + ret = priv->drvdata->setup_regmaps(priv, base); + if (ret) +@@ -759,7 +759,7 @@ static int dwc3_meson_g12a_probe(struct platform_device *pdev) + if (priv->vbus) { + ret = regulator_enable(priv->vbus); + if (ret) +- goto err_disable_clks; ++ goto err_rearm; + } + + /* Get dr_mode */ +@@ -772,13 +772,13 @@ static int dwc3_meson_g12a_probe(struct platform_device *pdev) + + ret = priv->drvdata->usb_init(priv); + if (ret) +- goto err_disable_clks; ++ goto err_rearm; + + /* Init PHYs */ + for (i = 0 ; i < PHY_COUNT ; ++i) { + ret = phy_init(priv->phys[i]); + if (ret) +- goto err_disable_clks; ++ goto err_rearm; + } + + /* Set PHY Power */ +@@ -816,6 +816,9 @@ static int dwc3_meson_g12a_probe(struct platform_device *pdev) + for (i = 0 ; i < PHY_COUNT ; ++i) + phy_exit(priv->phys[i]); + ++err_rearm: ++ reset_control_rearm(priv->reset); ++ + err_disable_clks: + clk_bulk_disable_unprepare(priv->drvdata->num_clks, + priv->drvdata->clks); +@@ -843,6 +846,8 @@ static int dwc3_meson_g12a_remove(struct platform_device *pdev) + pm_runtime_put_noidle(dev); + pm_runtime_set_suspended(dev); + ++ reset_control_rearm(priv->reset); ++ + clk_bulk_disable_unprepare(priv->drvdata->num_clks, + priv->drvdata->clks); + +@@ -883,7 +888,7 @@ static int __maybe_unused dwc3_meson_g12a_suspend(struct device *dev) + phy_exit(priv->phys[i]); + } + +- reset_control_assert(priv->reset); ++ reset_control_rearm(priv->reset); + + return 0; + } +@@ -893,7 +898,9 @@ static int __maybe_unused dwc3_meson_g12a_resume(struct device *dev) + struct dwc3_meson_g12a *priv = dev_get_drvdata(dev); + int i, ret; + +- reset_control_deassert(priv->reset); ++ ret = reset_control_reset(priv->reset); ++ if (ret) ++ return ret; + + ret = priv->drvdata->usb_init(priv); + if (ret) +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0033-FROMGIT-dt-bindings-reset-meson-add-gxl-internal-dac.patch b/projects/Amlogic/patches/linux/amlogic-0033-FROMGIT-dt-bindings-reset-meson-add-gxl-internal-dac.patch deleted file mode 100644 index 5b4189aa3c7..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0033-FROMGIT-dt-bindings-reset-meson-add-gxl-internal-dac.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 9b4ac4cdf9f313e4d1000dc64ef9437d9fedc381 Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Wed, 13 May 2020 07:24:51 +0000 -Subject: [PATCH 033/156] FROMGIT: dt-bindings: reset: meson: add gxl internal - dac reset - -Add the reset line of the internal DAC found on the amlogic gxl SoC family - -Signed-off-by: Jerome Brunet ---- - include/dt-bindings/reset/amlogic,meson-gxbb-reset.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/dt-bindings/reset/amlogic,meson-gxbb-reset.h b/include/dt-bindings/reset/amlogic,meson-gxbb-reset.h -index ea5058618863..883bfd3bcbad 100644 ---- a/include/dt-bindings/reset/amlogic,meson-gxbb-reset.h -+++ b/include/dt-bindings/reset/amlogic,meson-gxbb-reset.h -@@ -69,7 +69,7 @@ - #define RESET_SYS_CPU_L2 58 - #define RESET_SYS_CPU_P 59 - #define RESET_SYS_CPU_MBIST 60 --/* 61 */ -+#define RESET_ACODEC 61 - /* 62 */ - /* 63 */ - /* RESET2 */ --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0033-FROMLIST-v1-ASoC-meson-Use-managed-DMA-buffer-alloca.patch b/projects/Amlogic/patches/linux/amlogic-0033-FROMLIST-v1-ASoC-meson-Use-managed-DMA-buffer-alloca.patch new file mode 100644 index 00000000000..f940c8bd663 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0033-FROMLIST-v1-ASoC-meson-Use-managed-DMA-buffer-alloca.patch @@ -0,0 +1,97 @@ +From b0f55b047ecb02796026c0038a3356f7c751eac8 Mon Sep 17 00:00:00 2001 +From: Lars-Peter Clausen +Date: Mon, 21 Dec 2020 14:19:57 +0000 +Subject: [PATCH 33/79] FROMLIST(v1): ASoC: meson: Use managed DMA buffer + allocation + +Using a managed buffer will pre-allocate the buffer using +snd_pcm_lib_preallocate_pages() and automatically free it when the PCM is +destroyed. + +In addition it will call snd_pcm_lib_malloc_pages() before the driver's +hw_params() callback and snd_pcm_lib_free_pages() after the driver's +hw_free() callback. + +This slightly reduces the boilerplate code of the driver. + +Signed-off-by: Lars-Peter Clausen +--- + sound/soc/meson/aiu-fifo-i2s.c | 1 - + sound/soc/meson/aiu-fifo-spdif.c | 1 - + sound/soc/meson/aiu-fifo.c | 18 ++---------------- + 3 files changed, 2 insertions(+), 18 deletions(-) + +diff --git a/sound/soc/meson/aiu-fifo-i2s.c b/sound/soc/meson/aiu-fifo-i2s.c +index d91b0d874342..2388a2d0b3a6 100644 +--- a/sound/soc/meson/aiu-fifo-i2s.c ++++ b/sound/soc/meson/aiu-fifo-i2s.c +@@ -124,7 +124,6 @@ const struct snd_soc_dai_ops aiu_fifo_i2s_dai_ops = { + .trigger = aiu_fifo_i2s_trigger, + .prepare = aiu_fifo_i2s_prepare, + .hw_params = aiu_fifo_i2s_hw_params, +- .hw_free = aiu_fifo_hw_free, + .startup = aiu_fifo_startup, + .shutdown = aiu_fifo_shutdown, + }; +diff --git a/sound/soc/meson/aiu-fifo-spdif.c b/sound/soc/meson/aiu-fifo-spdif.c +index 44eb6faacf44..2fb30f89bf7a 100644 +--- a/sound/soc/meson/aiu-fifo-spdif.c ++++ b/sound/soc/meson/aiu-fifo-spdif.c +@@ -158,7 +158,6 @@ const struct snd_soc_dai_ops aiu_fifo_spdif_dai_ops = { + .trigger = fifo_spdif_trigger, + .prepare = fifo_spdif_prepare, + .hw_params = fifo_spdif_hw_params, +- .hw_free = aiu_fifo_hw_free, + .startup = aiu_fifo_startup, + .shutdown = aiu_fifo_shutdown, + }; +diff --git a/sound/soc/meson/aiu-fifo.c b/sound/soc/meson/aiu-fifo.c +index aa88aae8e517..4ad23267cace 100644 +--- a/sound/soc/meson/aiu-fifo.c ++++ b/sound/soc/meson/aiu-fifo.c +@@ -99,11 +99,6 @@ int aiu_fifo_hw_params(struct snd_pcm_substream *substream, + struct snd_soc_component *component = dai->component; + struct aiu_fifo *fifo = dai->playback_dma_data; + dma_addr_t end; +- int ret; +- +- ret = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); +- if (ret < 0) +- return ret; + + /* Setup the fifo boundaries */ + end = runtime->dma_addr + runtime->dma_bytes - fifo->fifo_block; +@@ -124,12 +119,6 @@ int aiu_fifo_hw_params(struct snd_pcm_substream *substream, + return 0; + } + +-int aiu_fifo_hw_free(struct snd_pcm_substream *substream, +- struct snd_soc_dai *dai) +-{ +- return snd_pcm_lib_free_pages(substream); +-} +- + static irqreturn_t aiu_fifo_isr(int irq, void *dev_id) + { + struct snd_pcm_substream *playback = dev_id; +@@ -187,15 +176,12 @@ void aiu_fifo_shutdown(struct snd_pcm_substream *substream, + int aiu_fifo_pcm_new(struct snd_soc_pcm_runtime *rtd, + struct snd_soc_dai *dai) + { +- struct snd_pcm_substream *substream = +- rtd->pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; + struct snd_card *card = rtd->card->snd_card; + struct aiu_fifo *fifo = dai->playback_dma_data; + size_t size = fifo->pcm->buffer_bytes_max; + +- snd_pcm_lib_preallocate_pages(substream, +- SNDRV_DMA_TYPE_DEV, +- card->dev, size, size); ++ snd_pcm_set_managed_buffer_all(rtd->pcm, SNDRV_DMA_TYPE_DEV, ++ card->dev, size, size); + + return 0; + } +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0034-FROMGIT-dt-bindings-add-vendor-prefix-for-Smartlabs-.patch b/projects/Amlogic/patches/linux/amlogic-0034-FROMGIT-dt-bindings-add-vendor-prefix-for-Smartlabs-.patch deleted file mode 100644 index f87c971a397..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0034-FROMGIT-dt-bindings-add-vendor-prefix-for-Smartlabs-.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 7a909e686b3697106302dffaf6298ca4a35de447 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Fri, 28 Feb 2020 19:08:03 +0000 -Subject: [PATCH 034/156] FROMGIT: dt-bindings: add vendor prefix for Smartlabs - LLC - -Smartlabs LLC are a professional integrator of Interactive TV solutions -and IPTV/VOD devices [1]. - -[1] https://www.smartlabs.tv/en/about/ - -Signed-off-by: Christian Hewitt ---- - Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml -index d3891386d671..a0adda624fc4 100644 ---- a/Documentation/devicetree/bindings/vendor-prefixes.yaml -+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml -@@ -936,6 +936,8 @@ patternProperties: - description: Sitronix Technology Corporation - "^skyworks,.*": - description: Skyworks Solutions, Inc. -+ "^smartlabs,.*": -+ description: SmartLabs LLC - "^smsc,.*": - description: Standard Microsystems Corporation - "^snps,.*": --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0034-WIP-drm-panfrost-Make-sure-MMU-context-lifetime-is-n.patch b/projects/Amlogic/patches/linux/amlogic-0034-WIP-drm-panfrost-Make-sure-MMU-context-lifetime-is-n.patch new file mode 100644 index 00000000000..8dba7e92f32 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0034-WIP-drm-panfrost-Make-sure-MMU-context-lifetime-is-n.patch @@ -0,0 +1,459 @@ +From a7786b82737f2ea71c58287d5c7ab6faba12f602 Mon Sep 17 00:00:00 2001 +From: Boris Brezillon +Date: Tue, 4 Feb 2020 15:35:03 +0100 +Subject: [PATCH 34/79] WIP: drm/panfrost: Make sure MMU context lifetime is + not bound to panfrost_priv + +Jobs can be in-flight when the file descriptor is closed (either because +the process did not terminate properly, or because it didn't wait for +all GPU jobs to be finished), and apparently panfrost_job_close() does +not cancel already running jobs. Let's refcount the MMU context object +so it's lifetime is no longer bound to the FD lifetime and running jobs +can finish properly without generating spurious page faults. + +Reported-by: Icecream95 +Fixes: 7282f7645d06 ("drm/panfrost: Implement per FD address spaces") +Cc: +Signed-off-by: Boris Brezillon +--- + drivers/gpu/drm/panfrost/panfrost_device.h | 8 +- + drivers/gpu/drm/panfrost/panfrost_drv.c | 50 ++----- + drivers/gpu/drm/panfrost/panfrost_gem.c | 20 ++- + drivers/gpu/drm/panfrost/panfrost_job.c | 4 +- + drivers/gpu/drm/panfrost/panfrost_mmu.c | 160 ++++++++++++++------- + drivers/gpu/drm/panfrost/panfrost_mmu.h | 5 +- + 6 files changed, 136 insertions(+), 111 deletions(-) + +diff --git a/drivers/gpu/drm/panfrost/panfrost_device.h b/drivers/gpu/drm/panfrost/panfrost_device.h +index 597cf1459b0a..4c6bdea5537b 100644 +--- a/drivers/gpu/drm/panfrost/panfrost_device.h ++++ b/drivers/gpu/drm/panfrost/panfrost_device.h +@@ -120,8 +120,12 @@ struct panfrost_device { + }; + + struct panfrost_mmu { ++ struct panfrost_device *pfdev; ++ struct kref refcount; + struct io_pgtable_cfg pgtbl_cfg; + struct io_pgtable_ops *pgtbl_ops; ++ struct drm_mm mm; ++ spinlock_t mm_lock; + int as; + atomic_t as_count; + struct list_head list; +@@ -132,9 +136,7 @@ struct panfrost_file_priv { + + struct drm_sched_entity sched_entity[NUM_JOB_SLOTS]; + +- struct panfrost_mmu mmu; +- struct drm_mm mm; +- spinlock_t mm_lock; ++ struct panfrost_mmu *mmu; + }; + + static inline struct panfrost_device *to_panfrost_device(struct drm_device *ddev) +diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c +index 83a461bdeea8..b2aa8e050314 100644 +--- a/drivers/gpu/drm/panfrost/panfrost_drv.c ++++ b/drivers/gpu/drm/panfrost/panfrost_drv.c +@@ -417,7 +417,7 @@ static int panfrost_ioctl_madvise(struct drm_device *dev, void *data, + * anyway, so let's not bother. + */ + if (!list_is_singular(&bo->mappings.list) || +- WARN_ON_ONCE(first->mmu != &priv->mmu)) { ++ WARN_ON_ONCE(first->mmu != priv->mmu)) { + ret = -EINVAL; + goto out_unlock_mappings; + } +@@ -449,32 +449,6 @@ int panfrost_unstable_ioctl_check(void) + return 0; + } + +-#define PFN_4G (SZ_4G >> PAGE_SHIFT) +-#define PFN_4G_MASK (PFN_4G - 1) +-#define PFN_16M (SZ_16M >> PAGE_SHIFT) +- +-static void panfrost_drm_mm_color_adjust(const struct drm_mm_node *node, +- unsigned long color, +- u64 *start, u64 *end) +-{ +- /* Executable buffers can't start or end on a 4GB boundary */ +- if (!(color & PANFROST_BO_NOEXEC)) { +- u64 next_seg; +- +- if ((*start & PFN_4G_MASK) == 0) +- (*start)++; +- +- if ((*end & PFN_4G_MASK) == 0) +- (*end)--; +- +- next_seg = ALIGN(*start, PFN_4G); +- if (next_seg - *start <= PFN_16M) +- *start = next_seg + 1; +- +- *end = min(*end, ALIGN(*start, PFN_4G) - 1); +- } +-} +- + static int + panfrost_open(struct drm_device *dev, struct drm_file *file) + { +@@ -489,15 +463,11 @@ panfrost_open(struct drm_device *dev, struct drm_file *file) + panfrost_priv->pfdev = pfdev; + file->driver_priv = panfrost_priv; + +- spin_lock_init(&panfrost_priv->mm_lock); +- +- /* 4G enough for now. can be 48-bit */ +- drm_mm_init(&panfrost_priv->mm, SZ_32M >> PAGE_SHIFT, (SZ_4G - SZ_32M) >> PAGE_SHIFT); +- panfrost_priv->mm.color_adjust = panfrost_drm_mm_color_adjust; +- +- ret = panfrost_mmu_pgtable_alloc(panfrost_priv); +- if (ret) +- goto err_pgtable; ++ panfrost_priv->mmu = panfrost_mmu_ctx_create(pfdev); ++ if (IS_ERR(panfrost_priv->mmu)) { ++ ret = PTR_ERR(panfrost_priv->mmu); ++ goto err_free; ++ } + + ret = panfrost_job_open(panfrost_priv); + if (ret) +@@ -506,9 +476,8 @@ panfrost_open(struct drm_device *dev, struct drm_file *file) + return 0; + + err_job: +- panfrost_mmu_pgtable_free(panfrost_priv); +-err_pgtable: +- drm_mm_takedown(&panfrost_priv->mm); ++ panfrost_mmu_ctx_put(panfrost_priv->mmu); ++err_free: + kfree(panfrost_priv); + return ret; + } +@@ -521,8 +490,7 @@ panfrost_postclose(struct drm_device *dev, struct drm_file *file) + panfrost_perfcnt_close(file); + panfrost_job_close(panfrost_priv); + +- panfrost_mmu_pgtable_free(panfrost_priv); +- drm_mm_takedown(&panfrost_priv->mm); ++ panfrost_mmu_ctx_put(panfrost_priv->mmu); + kfree(panfrost_priv); + } + +diff --git a/drivers/gpu/drm/panfrost/panfrost_gem.c b/drivers/gpu/drm/panfrost/panfrost_gem.c +index 3e0723bc36bd..23377481f4e3 100644 +--- a/drivers/gpu/drm/panfrost/panfrost_gem.c ++++ b/drivers/gpu/drm/panfrost/panfrost_gem.c +@@ -60,7 +60,7 @@ panfrost_gem_mapping_get(struct panfrost_gem_object *bo, + + mutex_lock(&bo->mappings.lock); + list_for_each_entry(iter, &bo->mappings.list, node) { +- if (iter->mmu == &priv->mmu) { ++ if (iter->mmu == priv->mmu) { + kref_get(&iter->refcount); + mapping = iter; + break; +@@ -74,16 +74,13 @@ panfrost_gem_mapping_get(struct panfrost_gem_object *bo, + static void + panfrost_gem_teardown_mapping(struct panfrost_gem_mapping *mapping) + { +- struct panfrost_file_priv *priv; +- + if (mapping->active) + panfrost_mmu_unmap(mapping); + +- priv = container_of(mapping->mmu, struct panfrost_file_priv, mmu); +- spin_lock(&priv->mm_lock); ++ spin_lock(&mapping->mmu->mm_lock); + if (drm_mm_node_allocated(&mapping->mmnode)) + drm_mm_remove_node(&mapping->mmnode); +- spin_unlock(&priv->mm_lock); ++ spin_unlock(&mapping->mmu->mm_lock); + } + + static void panfrost_gem_mapping_release(struct kref *kref) +@@ -94,6 +91,7 @@ static void panfrost_gem_mapping_release(struct kref *kref) + + panfrost_gem_teardown_mapping(mapping); + drm_gem_object_put(&mapping->obj->base.base); ++ panfrost_mmu_ctx_put(mapping->mmu); + kfree(mapping); + } + +@@ -143,11 +141,11 @@ int panfrost_gem_open(struct drm_gem_object *obj, struct drm_file *file_priv) + else + align = size >= SZ_2M ? SZ_2M >> PAGE_SHIFT : 0; + +- mapping->mmu = &priv->mmu; +- spin_lock(&priv->mm_lock); +- ret = drm_mm_insert_node_generic(&priv->mm, &mapping->mmnode, ++ mapping->mmu = panfrost_mmu_ctx_get(priv->mmu); ++ spin_lock(&mapping->mmu->mm_lock); ++ ret = drm_mm_insert_node_generic(&mapping->mmu->mm, &mapping->mmnode, + size >> PAGE_SHIFT, align, color, 0); +- spin_unlock(&priv->mm_lock); ++ spin_unlock(&mapping->mmu->mm_lock); + if (ret) + goto err; + +@@ -176,7 +174,7 @@ void panfrost_gem_close(struct drm_gem_object *obj, struct drm_file *file_priv) + + mutex_lock(&bo->mappings.lock); + list_for_each_entry(iter, &bo->mappings.list, node) { +- if (iter->mmu == &priv->mmu) { ++ if (iter->mmu == priv->mmu) { + mapping = iter; + list_del(&iter->node); + break; +diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c +index d6d5c15184f9..b600618abb49 100644 +--- a/drivers/gpu/drm/panfrost/panfrost_job.c ++++ b/drivers/gpu/drm/panfrost/panfrost_job.c +@@ -165,7 +165,7 @@ static void panfrost_job_hw_submit(struct panfrost_job *job, int js) + return; + } + +- cfg = panfrost_mmu_as_get(pfdev, &job->file_priv->mmu); ++ cfg = panfrost_mmu_as_get(pfdev, job->file_priv->mmu); + + job_write(pfdev, JS_HEAD_NEXT_LO(js), jc_head & 0xFFFFFFFF); + job_write(pfdev, JS_HEAD_NEXT_HI(js), jc_head >> 32); +@@ -524,7 +524,7 @@ static irqreturn_t panfrost_job_irq_handler(int irq, void *data) + if (job) { + pfdev->jobs[j] = NULL; + +- panfrost_mmu_as_put(pfdev, &job->file_priv->mmu); ++ panfrost_mmu_as_put(pfdev, job->file_priv->mmu); + panfrost_devfreq_record_idle(&pfdev->pfdevfreq); + + dma_fence_signal_locked(job->done_fence); +diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c +index 7c1b3481b785..42da9c40fc4b 100644 +--- a/drivers/gpu/drm/panfrost/panfrost_mmu.c ++++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c +@@ -1,5 +1,8 @@ + // SPDX-License-Identifier: GPL-2.0 + /* Copyright 2019 Linaro, Ltd, Rob Herring */ ++ ++#include ++ + #include + #include + #include +@@ -337,7 +340,7 @@ static void mmu_tlb_inv_context_s1(void *cookie) + + static void mmu_tlb_sync_context(void *cookie) + { +- //struct panfrost_device *pfdev = cookie; ++ //struct panfrost_mmu *mmu = cookie; + // TODO: Wait 1000 GPU cycles for HW_ISSUE_6367/T60X + } + +@@ -352,57 +355,10 @@ static const struct iommu_flush_ops mmu_tlb_ops = { + .tlb_flush_walk = mmu_tlb_flush_walk, + }; + +-int panfrost_mmu_pgtable_alloc(struct panfrost_file_priv *priv) +-{ +- struct panfrost_mmu *mmu = &priv->mmu; +- struct panfrost_device *pfdev = priv->pfdev; +- +- INIT_LIST_HEAD(&mmu->list); +- mmu->as = -1; +- +- mmu->pgtbl_cfg = (struct io_pgtable_cfg) { +- .pgsize_bitmap = SZ_4K | SZ_2M, +- .ias = FIELD_GET(0xff, pfdev->features.mmu_features), +- .oas = FIELD_GET(0xff00, pfdev->features.mmu_features), +- .coherent_walk = pfdev->coherent, +- .tlb = &mmu_tlb_ops, +- .iommu_dev = pfdev->dev, +- }; +- +- mmu->pgtbl_ops = alloc_io_pgtable_ops(ARM_MALI_LPAE, &mmu->pgtbl_cfg, +- priv); +- if (!mmu->pgtbl_ops) +- return -EINVAL; +- +- return 0; +-} +- +-void panfrost_mmu_pgtable_free(struct panfrost_file_priv *priv) +-{ +- struct panfrost_device *pfdev = priv->pfdev; +- struct panfrost_mmu *mmu = &priv->mmu; +- +- spin_lock(&pfdev->as_lock); +- if (mmu->as >= 0) { +- pm_runtime_get_noresume(pfdev->dev); +- if (pm_runtime_active(pfdev->dev)) +- panfrost_mmu_disable(pfdev, mmu->as); +- pm_runtime_put_autosuspend(pfdev->dev); +- +- clear_bit(mmu->as, &pfdev->as_alloc_mask); +- clear_bit(mmu->as, &pfdev->as_in_use_mask); +- list_del(&mmu->list); +- } +- spin_unlock(&pfdev->as_lock); +- +- free_io_pgtable_ops(mmu->pgtbl_ops); +-} +- + static struct panfrost_gem_mapping * + addr_to_mapping(struct panfrost_device *pfdev, int as, u64 addr) + { + struct panfrost_gem_mapping *mapping = NULL; +- struct panfrost_file_priv *priv; + struct drm_mm_node *node; + u64 offset = addr >> PAGE_SHIFT; + struct panfrost_mmu *mmu; +@@ -415,11 +371,10 @@ addr_to_mapping(struct panfrost_device *pfdev, int as, u64 addr) + goto out; + + found_mmu: +- priv = container_of(mmu, struct panfrost_file_priv, mmu); + +- spin_lock(&priv->mm_lock); ++ spin_lock(&mmu->mm_lock); + +- drm_mm_for_each_node(node, &priv->mm) { ++ drm_mm_for_each_node(node, &mmu->mm) { + if (offset >= node->start && + offset < (node->start + node->size)) { + mapping = drm_mm_node_to_panfrost_mapping(node); +@@ -429,7 +384,7 @@ addr_to_mapping(struct panfrost_device *pfdev, int as, u64 addr) + } + } + +- spin_unlock(&priv->mm_lock); ++ spin_unlock(&mmu->mm_lock); + out: + spin_unlock(&pfdev->as_lock); + return mapping; +@@ -535,6 +490,107 @@ static int panfrost_mmu_map_fault_addr(struct panfrost_device *pfdev, int as, + return ret; + } + ++static void panfrost_mmu_release_ctx(struct kref *kref) ++{ ++ struct panfrost_mmu *mmu = container_of(kref, struct panfrost_mmu, ++ refcount); ++ struct panfrost_device *pfdev = mmu->pfdev; ++ ++ spin_lock(&pfdev->as_lock); ++ if (mmu->as >= 0) { ++ pm_runtime_get_noresume(pfdev->dev); ++ if (pm_runtime_active(pfdev->dev)) ++ panfrost_mmu_disable(pfdev, mmu->as); ++ pm_runtime_put_autosuspend(pfdev->dev); ++ ++ clear_bit(mmu->as, &pfdev->as_alloc_mask); ++ clear_bit(mmu->as, &pfdev->as_in_use_mask); ++ list_del(&mmu->list); ++ } ++ spin_unlock(&pfdev->as_lock); ++ ++ free_io_pgtable_ops(mmu->pgtbl_ops); ++ drm_mm_takedown(&mmu->mm); ++ kfree(mmu); ++} ++ ++void panfrost_mmu_ctx_put(struct panfrost_mmu *mmu) ++{ ++ kref_put(&mmu->refcount, panfrost_mmu_release_ctx); ++} ++ ++struct panfrost_mmu *panfrost_mmu_ctx_get(struct panfrost_mmu *mmu) ++{ ++ kref_get(&mmu->refcount); ++ ++ return mmu; ++} ++ ++#define PFN_4G (SZ_4G >> PAGE_SHIFT) ++#define PFN_4G_MASK (PFN_4G - 1) ++#define PFN_16M (SZ_16M >> PAGE_SHIFT) ++ ++static void panfrost_drm_mm_color_adjust(const struct drm_mm_node *node, ++ unsigned long color, ++ u64 *start, u64 *end) ++{ ++ /* Executable buffers can't start or end on a 4GB boundary */ ++ if (!(color & PANFROST_BO_NOEXEC)) { ++ u64 next_seg; ++ ++ if ((*start & PFN_4G_MASK) == 0) ++ (*start)++; ++ ++ if ((*end & PFN_4G_MASK) == 0) ++ (*end)--; ++ ++ next_seg = ALIGN(*start, PFN_4G); ++ if (next_seg - *start <= PFN_16M) ++ *start = next_seg + 1; ++ ++ *end = min(*end, ALIGN(*start, PFN_4G) - 1); ++ } ++} ++ ++struct panfrost_mmu *panfrost_mmu_ctx_create(struct panfrost_device *pfdev) ++{ ++ struct panfrost_mmu *mmu; ++ ++ mmu = kzalloc(sizeof(*mmu), GFP_KERNEL); ++ if (!mmu) ++ return ERR_PTR(-ENOMEM); ++ ++ mmu->pfdev = pfdev; ++ spin_lock_init(&mmu->mm_lock); ++ ++ /* 4G enough for now. can be 48-bit */ ++ drm_mm_init(&mmu->mm, SZ_32M >> PAGE_SHIFT, (SZ_4G - SZ_32M) >> PAGE_SHIFT); ++ mmu->mm.color_adjust = panfrost_drm_mm_color_adjust; ++ ++ INIT_LIST_HEAD(&mmu->list); ++ mmu->as = -1; ++ ++ mmu->pgtbl_cfg = (struct io_pgtable_cfg) { ++ .pgsize_bitmap = SZ_4K | SZ_2M, ++ .ias = FIELD_GET(0xff, pfdev->features.mmu_features), ++ .oas = FIELD_GET(0xff00, pfdev->features.mmu_features), ++ .coherent_walk = pfdev->coherent, ++ .tlb = &mmu_tlb_ops, ++ .iommu_dev = pfdev->dev, ++ }; ++ ++ mmu->pgtbl_ops = alloc_io_pgtable_ops(ARM_MALI_LPAE, &mmu->pgtbl_cfg, ++ mmu); ++ if (!mmu->pgtbl_ops) { ++ kfree(mmu); ++ return ERR_PTR(-EINVAL); ++ } ++ ++ kref_init(&mmu->refcount); ++ ++ return mmu; ++} ++ + static const char *access_type_name(struct panfrost_device *pfdev, + u32 fault_status) + { +diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.h b/drivers/gpu/drm/panfrost/panfrost_mmu.h +index 44fc2edf63ce..cc2a0d307feb 100644 +--- a/drivers/gpu/drm/panfrost/panfrost_mmu.h ++++ b/drivers/gpu/drm/panfrost/panfrost_mmu.h +@@ -18,7 +18,8 @@ void panfrost_mmu_reset(struct panfrost_device *pfdev); + u32 panfrost_mmu_as_get(struct panfrost_device *pfdev, struct panfrost_mmu *mmu); + void panfrost_mmu_as_put(struct panfrost_device *pfdev, struct panfrost_mmu *mmu); + +-int panfrost_mmu_pgtable_alloc(struct panfrost_file_priv *priv); +-void panfrost_mmu_pgtable_free(struct panfrost_file_priv *priv); ++struct panfrost_mmu *panfrost_mmu_ctx_get(struct panfrost_mmu *mmu); ++void panfrost_mmu_ctx_put(struct panfrost_mmu *mmu); ++struct panfrost_mmu *panfrost_mmu_ctx_create(struct panfrost_device *pfdev); + + #endif +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0035-FROMGIT-dt-bindings-arm-amlogic-add-support-for-the-.patch b/projects/Amlogic/patches/linux/amlogic-0035-FROMGIT-dt-bindings-arm-amlogic-add-support-for-the-.patch deleted file mode 100644 index 121927d6907..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0035-FROMGIT-dt-bindings-arm-amlogic-add-support-for-the-.patch +++ /dev/null @@ -1,43 +0,0 @@ -From a66c639c8a4503663b43f0275b67e79624ae9ddf Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Fri, 28 Feb 2020 19:10:01 +0000 -Subject: [PATCH 035/156] FROMGIT: dt-bindings: arm: amlogic: add support for - the Smartlabs SML-5442TW - -The SML-5442TW is an STB for O2 Czech IPTV/VOD and DVB-T/T2 based on the -Amlogic P231 reference design using the S905D chipset. Specs: - -2GB DDR3 RAM -8GB eMMC storage -10/100 Base-T Ethernet -802.11 a/b/g/n/ac + BT 4.1 HS sdio wireless module (QCA9377) -2x single colour and 1x dual colour LEDs on the front panel -1x reset button on the front panel -HDMI 2.0 (4k@60p) video -Composite video + 2-channel audio output on 3.5mm jack -S/PDIF audio output -Single DVB-T/T2 tuner (AVL6762/MxL608) -2x USB 2.0 ports -1x micro SD card slot -UART pins (internal) - -Signed-off-by: Christian Hewitt ---- - Documentation/devicetree/bindings/arm/amlogic.yaml | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml -index 11908b151e0a..47badda69ef5 100644 ---- a/Documentation/devicetree/bindings/arm/amlogic.yaml -+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml -@@ -107,6 +107,7 @@ properties: - - amlogic,p231 - - libretech,aml-s905d-pc - - phicomm,n1 -+ - smartlabs,sml5442tw - - const: amlogic,s905d - - const: amlogic,meson-gxl - --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0035-WIP-arm64-meson-add-Amlogic-Meson-GX-PM-Suspend.patch b/projects/Amlogic/patches/linux/amlogic-0035-WIP-arm64-meson-add-Amlogic-Meson-GX-PM-Suspend.patch new file mode 100644 index 00000000000..9a96da125fb --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0035-WIP-arm64-meson-add-Amlogic-Meson-GX-PM-Suspend.patch @@ -0,0 +1,135 @@ +From 85a687a98eddfb5a77579e2350211a9fcb15bf69 Mon Sep 17 00:00:00 2001 +From: Neil Armstrong +Date: Thu, 3 Nov 2016 15:29:23 +0100 +Subject: [PATCH 35/79] WIP: arm64: meson: add Amlogic Meson GX PM Suspend + +The Amlogic Meson GX SoCs uses a non-standard argument to the +PSCI CPU_SUSPEND call to enter system suspend. + +Implement such call within platform_suspend_ops. + +Signed-off-by: Neil Armstrong +--- + drivers/firmware/meson/Kconfig | 6 ++ + drivers/firmware/meson/Makefile | 1 + + drivers/firmware/meson/meson_gx_pm.c | 86 ++++++++++++++++++++++++++++ + 3 files changed, 93 insertions(+) + create mode 100644 drivers/firmware/meson/meson_gx_pm.c + +diff --git a/drivers/firmware/meson/Kconfig b/drivers/firmware/meson/Kconfig +index f2fdd3756648..d3ead92ac61b 100644 +--- a/drivers/firmware/meson/Kconfig ++++ b/drivers/firmware/meson/Kconfig +@@ -9,3 +9,9 @@ config MESON_SM + depends on ARM64_4K_PAGES + help + Say y here to enable the Amlogic secure monitor driver ++ ++config MESON_GX_PM ++ bool ++ default ARCH_MESON if ARM64 ++ help ++ Say y here to enable the Amlogic GX SoC Power Management +diff --git a/drivers/firmware/meson/Makefile b/drivers/firmware/meson/Makefile +index c6c09483b622..0193cdfee32f 100644 +--- a/drivers/firmware/meson/Makefile ++++ b/drivers/firmware/meson/Makefile +@@ -1,2 +1,3 @@ + # SPDX-License-Identifier: GPL-2.0-only + obj-$(CONFIG_MESON_SM) += meson_sm.o ++obj-$(CONFIG_MESON_GX_PM) += meson_gx_pm.o +diff --git a/drivers/firmware/meson/meson_gx_pm.c b/drivers/firmware/meson/meson_gx_pm.c +new file mode 100644 +index 000000000000..c104c2e4c77f +--- /dev/null ++++ b/drivers/firmware/meson/meson_gx_pm.c +@@ -0,0 +1,86 @@ ++/* ++ * Amlogic Meson GX Power Management ++ * ++ * Copyright (c) 2016 Baylibre, SAS. ++ * Author: Neil Armstrong ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of version 2 of the GNU General Public License as ++ * published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include ++ ++/* ++ * The Amlogic GX SoCs uses a special argument value to the ++ * PSCI CPU_SUSPEND method to enter SUSPEND_MEM. ++ */ ++ ++#define MESON_SUSPEND_PARAM 0x0010000 ++#define PSCI_FN_NATIVE(version, name) PSCI_##version##_FN64_##name ++ ++static int meson_gx_suspend_finish(unsigned long arg) ++{ ++ struct arm_smccc_res res; ++ ++ arm_smccc_smc(PSCI_FN_NATIVE(0_2, CPU_SUSPEND), arg, ++ virt_to_phys(cpu_resume), 0, 0, 0, 0, 0, &res); ++ ++ return res.a0; ++} ++ ++static int meson_gx_suspend_enter(suspend_state_t state) ++{ ++ switch (state) { ++ case PM_SUSPEND_MEM: ++ return cpu_suspend(MESON_SUSPEND_PARAM, ++ meson_gx_suspend_finish); ++ } ++ ++ return -EINVAL; ++} ++ ++static const struct platform_suspend_ops meson_gx_pm_ops = { ++ .enter = meson_gx_suspend_enter, ++ .valid = suspend_valid_only_mem, ++}; ++ ++static const struct of_device_id meson_gx_pm_match[] = { ++ { .compatible = "amlogic,meson-gx-pm", }, ++ { /* sentinel */ }, ++}; ++MODULE_DEVICE_TABLE(of, meson_gx_pm_match); ++ ++static int meson_gx_pm_probe(struct platform_device *pdev) ++{ ++ suspend_set_ops(&meson_gx_pm_ops); ++ ++ return 0; ++} ++ ++static struct platform_driver meson_gx_pm_driver = { ++ .probe = meson_gx_pm_probe, ++ .driver = { ++ .name = "meson-gx-pm", ++ .of_match_table = meson_gx_pm_match, ++ }, ++}; ++ ++module_platform_driver(meson_gx_pm_driver); ++ ++MODULE_AUTHOR("Neil Armstrong "); ++MODULE_DESCRIPTION("Amlogic Meson GX PM driver"); ++MODULE_LICENSE("GPL v2"); +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0036-FROMGIT-arm64-dts-meson-add-support-for-the-Smartlab.patch b/projects/Amlogic/patches/linux/amlogic-0036-FROMGIT-arm64-dts-meson-add-support-for-the-Smartlab.patch deleted file mode 100644 index a35b165b2c0..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0036-FROMGIT-arm64-dts-meson-add-support-for-the-Smartlab.patch +++ /dev/null @@ -1,122 +0,0 @@ -From 90ae363f4e28aa8ebb8eadd8edf21854080bd3f5 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Fri, 28 Feb 2020 19:16:35 +0000 -Subject: [PATCH 036/156] FROMGIT: arm64: dts: meson: add support for the - Smartlabs SML-5442TW - -The Smartlabs SML-5442TW is based on the Amlogic P231 reference design -but with the following differences: - -- The Yellow and Blue LEDs are available but disabled -- The Red and Green LEDs are used to signal off/on status -- uart_AO can be accessed after opening the case; soldered pins exist -- QCA9377 instead of the usual Ampak/Broadcom module - -Signed-off-by: Christian Hewitt ---- - arch/arm64/boot/dts/amlogic/Makefile | 1 + - .../dts/amlogic/meson-gxl-s905d-sml5442tw.dts | 80 +++++++++++++++++++ - 2 files changed, 81 insertions(+) - create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-sml5442tw.dts - -diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile -index 5daab72f5639..af883e0bfb9c 100644 ---- a/arch/arm64/boot/dts/amlogic/Makefile -+++ b/arch/arm64/boot/dts/amlogic/Makefile -@@ -27,6 +27,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-p212.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p230.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p231.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-phicomm-n1.dtb -+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-sml5442tw.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s805x-p241.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-p281.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-tx3-mini.dtb -diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-sml5442tw.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-sml5442tw.dts -new file mode 100644 -index 000000000000..8509f615a604 ---- /dev/null -+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-sml5442tw.dts -@@ -0,0 +1,80 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+/* -+ * Copyright (c) Christian Hewitt -+ */ -+ -+/dts-v1/; -+ -+#include "meson-gxl-s905d.dtsi" -+#include "meson-gx-p23x-q20x.dtsi" -+#include -+ -+/ { -+ compatible = "smartlabs,sml5442tw", "amlogic,s905d", "amlogic,meson-gxl"; -+ model = "SmartLabs SML-5442TW"; -+ -+ leds { -+ compatible = "gpio-leds"; -+ -+ yellow { -+ color = ; -+ function = LED_FUNCTION_STATUS; -+ gpios = <&gpio_ao GPIOAO_6 GPIO_ACTIVE_HIGH>; -+ default-state = "off"; -+ }; -+ -+ blue { -+ color = ; -+ function = LED_FUNCTION_STATUS; -+ gpios = <&gpio GPIODV_28 GPIO_ACTIVE_HIGH>; -+ default-state = "off"; -+ }; -+ -+ green { -+ color = ; -+ function = LED_FUNCTION_STATUS; -+ gpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ -+ red { -+ color = ; -+ function = LED_FUNCTION_STATUS; -+ gpios = <&gpio GPIODV_27 GPIO_ACTIVE_HIGH>; -+ default-state = "off"; -+ }; -+ }; -+}; -+ -+ðmac { -+ status = "okay"; -+ phy-mode = "rmii"; -+ phy-handle = <&internal_phy>; -+}; -+ -+&i2c_A { -+ status = "okay"; -+ pinctrl-0 = <&i2c_a_pins>; -+ pinctrl-names = "default"; -+}; -+ -+&internal_phy { -+ pinctrl-0 = <ð_link_led_pins>, <ð_act_led_pins>; -+ pinctrl-names = "default"; -+}; -+ -+/* This is connected to the Bluetooth module: */ -+&uart_A { -+ status = "okay"; -+ pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; -+ pinctrl-names = "default"; -+ uart-has-rtscts; -+ -+ bluetooth { -+ compatible = "qcom,qca9377-bt"; -+ enable-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; -+ max-speed = <2000000>; -+ clocks = <&wifi32k>; -+ clock-names = "lpo"; -+ }; -+}; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0036-WIP-arm64-dts-meson-add-support-for-GX-PM-and-Virtua.patch b/projects/Amlogic/patches/linux/amlogic-0036-WIP-arm64-dts-meson-add-support-for-GX-PM-and-Virtua.patch new file mode 100644 index 00000000000..88f125f9add --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0036-WIP-arm64-dts-meson-add-support-for-GX-PM-and-Virtua.patch @@ -0,0 +1,41 @@ +From 87131b3b370f73a57aba13f73e4071a51702c8fa Mon Sep 17 00:00:00 2001 +From: Neil Armstrong +Date: Thu, 3 Nov 2016 15:29:25 +0100 +Subject: [PATCH 36/79] WIP: arm64: dts: meson: add support for GX PM and + Virtual RTC + +Signed-off-by: Neil Armstrong +--- + arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi +index ac6e99a9c95f..3823c0f25e7a 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi ++++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi +@@ -216,6 +216,10 @@ + }; + }; + ++ system-suspend { ++ compatible = "amlogic,meson-gx-pm"; ++ }; ++ + efuse: efuse { + compatible = "amlogic,meson-gx-efuse", "amlogic,meson-gxbb-efuse"; + #address-cells = <1>; +@@ -453,6 +457,11 @@ + }; + }; + ++ vrtc: rtc@a8 { ++ compatible = "amlogic,meson-vrtc"; ++ reg = <0x0 0x000a8 0x0 0x4>; ++ }; ++ + cec_AO: cec@100 { + compatible = "amlogic,meson-gx-ao-cec"; + reg = <0x0 0x00100 0x0 0x14>; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0037-FROMGIT-arm64-dts-meson-add-ethernet-interrupt-to-we.patch b/projects/Amlogic/patches/linux/amlogic-0037-FROMGIT-arm64-dts-meson-add-ethernet-interrupt-to-we.patch deleted file mode 100644 index b88512f5557..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0037-FROMGIT-arm64-dts-meson-add-ethernet-interrupt-to-we.patch +++ /dev/null @@ -1,32 +0,0 @@ -From a09cbc00673c29b8f69573b012573ef0e45adcf0 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Tue, 7 Jan 2020 04:37:57 +0000 -Subject: [PATCH 037/156] FROMGIT: arm64: dts: meson: add ethernet interrupt to - wetek dtsi - -Add Ethernet interrupt details to the WeTek Hub/Play2 dtsi to resolve -an issue with Ethernet probing in mainline u-boot. - -Signed-off-by: Christian Hewitt ---- - arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi -index d6133af09d64..ad812854a107 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi -@@ -149,6 +149,10 @@ - reset-assert-us = <10000>; - reset-deassert-us = <30000>; - reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>; -+ -+ interrupt-parent = <&gpio_intc>; -+ /* MAC_INTR on GPIOZ_15 */ -+ interrupts = <29 IRQ_TYPE_LEVEL_LOW>; - }; - }; - }; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0134-WIP-arm64-dts-meson-add-audio-playback-to-nexbox-a1.patch b/projects/Amlogic/patches/linux/amlogic-0037-WIP-arm64-dts-meson-add-audio-playback-to-nexbox-a1.patch similarity index 93% rename from projects/Amlogic/patches/linux/amlogic-0134-WIP-arm64-dts-meson-add-audio-playback-to-nexbox-a1.patch rename to projects/Amlogic/patches/linux/amlogic-0037-WIP-arm64-dts-meson-add-audio-playback-to-nexbox-a1.patch index 08f659243dd..b5017e0d1c0 100644 --- a/projects/Amlogic/patches/linux/amlogic-0134-WIP-arm64-dts-meson-add-audio-playback-to-nexbox-a1.patch +++ b/projects/Amlogic/patches/linux/amlogic-0037-WIP-arm64-dts-meson-add-audio-playback-to-nexbox-a1.patch @@ -1,8 +1,7 @@ -From 0013b81146b4c086526052acb9cee8ba965bab4d Mon Sep 17 00:00:00 2001 +From 173afaa69d1d3b373d43195073a5159d5f69fb28 Mon Sep 17 00:00:00 2001 From: Christian Hewitt Date: Fri, 15 May 2020 07:23:05 +0000 -Subject: [PATCH 134/156] WIP: arm64: dts: meson: add audio playback to - nexbox-a1 +Subject: [PATCH 37/79] WIP: arm64: dts: meson: add audio playback to nexbox-a1 Add initial support is limited to HDMI i2s and SPDIF (LPCM). @@ -12,7 +11,7 @@ Signed-off-by: Christian Hewitt 1 file changed, 80 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts -index c2bd4dbbf38c..854212198f4a 100644 +index dfa7a37a1281..a5db3f67d33f 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts +++ b/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts @@ -10,6 +10,7 @@ diff --git a/projects/Amlogic/patches/linux/amlogic-0038-FROMGIT-arm64-dts-meson-convert-ugoos-am6-to-common-.patch b/projects/Amlogic/patches/linux/amlogic-0038-FROMGIT-arm64-dts-meson-convert-ugoos-am6-to-common-.patch deleted file mode 100644 index a1a91e923d5..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0038-FROMGIT-arm64-dts-meson-convert-ugoos-am6-to-common-.patch +++ /dev/null @@ -1,915 +0,0 @@ -From ce220c323922e69c562f82a727fd6a3d03a18258 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Fri, 17 Apr 2020 03:59:13 +0000 -Subject: [PATCH 038/156] FROMGIT: arm64: dts: meson: convert ugoos-am6 to - common w400 dtsi - -Convert the Ugoos AM6 dts into meson-g12b-w400.dtsi, and then create -a new AM6 dts that references it. This is in preparation for several -new G12B devices that will share the common w400 dtsi. - -Signed-off-by: Christian Hewitt ---- - .../boot/dts/amlogic/meson-g12b-ugoos-am6.dts | 410 +---------------- - .../boot/dts/amlogic/meson-g12b-w400.dtsi | 423 ++++++++++++++++++ - 2 files changed, 424 insertions(+), 409 deletions(-) - create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-w400.dtsi - -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts -index fdaacfd96b97..73637de80c21 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts -@@ -7,42 +7,13 @@ - - /dts-v1/; - --#include "meson-g12b.dtsi" --#include "meson-g12b-s922x.dtsi" --#include --#include -+#include "meson-g12b-w400.dtsi" - #include - - / { - compatible = "ugoos,am6", "amlogic,s922x", "amlogic,g12b"; - model = "Ugoos AM6"; - -- aliases { -- serial0 = &uart_AO; -- ethernet0 = ðmac; -- }; -- -- chosen { -- stdout-path = "serial0:115200n8"; -- }; -- -- memory@0 { -- device_type = "memory"; -- reg = <0x0 0x0 0x0 0x40000000>; -- }; -- -- emmc_pwrseq: emmc-pwrseq { -- compatible = "mmc-pwrseq-emmc"; -- reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>; -- }; -- -- sdio_pwrseq: sdio-pwrseq { -- compatible = "mmc-pwrseq-simple"; -- reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; -- clocks = <&wifi32k>; -- clock-names = "ext_clock"; -- }; -- - spdif_dit: audio-codec-1 { - #sound-dai-cells = <0>; - compatible = "linux,spdif-dit"; -@@ -50,154 +21,6 @@ - sound-name-prefix = "DIT"; - }; - -- flash_1v8: regulator-flash_1v8 { -- compatible = "regulator-fixed"; -- regulator-name = "FLASH_1V8"; -- regulator-min-microvolt = <1800000>; -- regulator-max-microvolt = <1800000>; -- vin-supply = <&vcc_3v3>; -- regulator-always-on; -- }; -- -- main_12v: regulator-main_12v { -- compatible = "regulator-fixed"; -- regulator-name = "12V"; -- regulator-min-microvolt = <12000000>; -- regulator-max-microvolt = <12000000>; -- regulator-always-on; -- }; -- -- vcc_5v: regulator-vcc_5v { -- compatible = "regulator-fixed"; -- regulator-name = "VCC_5V"; -- regulator-min-microvolt = <5000000>; -- regulator-max-microvolt = <5000000>; -- vin-supply = <&main_12v>; -- -- gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>; -- enable-active-high; -- }; -- -- vcc_1v8: regulator-vcc_1v8 { -- compatible = "regulator-fixed"; -- regulator-name = "VCC_1V8"; -- regulator-min-microvolt = <1800000>; -- regulator-max-microvolt = <1800000>; -- vin-supply = <&vcc_3v3>; -- regulator-always-on; -- }; -- -- vcc_3v3: regulator-vcc_3v3 { -- compatible = "regulator-fixed"; -- regulator-name = "VCC_3V3"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- vin-supply = <&vddao_3v3>; -- regulator-always-on; -- /* FIXME: actually controlled by VDDCPU_B_EN */ -- }; -- -- vddcpu_a: regulator-vddcpu-a { -- /* -- * MP1653 Regulator. -- */ -- compatible = "pwm-regulator"; -- -- regulator-name = "VDDCPU_A"; -- regulator-min-microvolt = <721000>; -- regulator-max-microvolt = <1022000>; -- -- vin-supply = <&main_12v>; -- -- pwms = <&pwm_ab 0 1250 0>; -- pwm-dutycycle-range = <100 0>; -- -- regulator-boot-on; -- regulator-always-on; -- }; -- -- vddcpu_b: regulator-vddcpu-b { -- /* -- * MP1652 Regulator. -- */ -- compatible = "pwm-regulator"; -- -- regulator-name = "VDDCPU_B"; -- regulator-min-microvolt = <721000>; -- regulator-max-microvolt = <1022000>; -- -- vin-supply = <&main_12v>; -- -- pwms = <&pwm_AO_cd 1 1250 0>; -- pwm-dutycycle-range = <100 0>; -- -- regulator-boot-on; -- regulator-always-on; -- }; -- -- usb1_pow: regulator-usb1-pow { -- compatible = "regulator-fixed"; -- regulator-name = "USB1_POW"; -- regulator-min-microvolt = <5000000>; -- regulator-max-microvolt = <5000000>; -- vin-supply = <&vcc_5v>; -- -- /* connected to SY6280A Power Switch */ -- gpio = <&gpio GPIOA_8 GPIO_ACTIVE_HIGH>; -- enable-active-high; -- }; -- -- usb_pwr_en: regulator-usb-pwr-en { -- compatible = "regulator-fixed"; -- regulator-name = "USB_PWR_EN"; -- regulator-min-microvolt = <5000000>; -- regulator-max-microvolt = <5000000>; -- vin-supply = <&vcc_5v>; -- -- /* Connected to USB3 Type-A Port power enable */ -- gpio = <&gpio GPIOAO_7 GPIO_ACTIVE_HIGH>; -- enable-active-high; -- }; -- -- vddao_1v8: regulator-vddao-1v8 { -- compatible = "regulator-fixed"; -- regulator-name = "VDDAO_1V8"; -- regulator-min-microvolt = <1800000>; -- regulator-max-microvolt = <1800000>; -- vin-supply = <&vddao_3v3>; -- regulator-always-on; -- }; -- -- vddao_3v3: regulator-vddao-3v3 { -- compatible = "regulator-fixed"; -- regulator-name = "VDDAO_3V3"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- vin-supply = <&main_12v>; -- regulator-always-on; -- }; -- -- cvbs-connector { -- compatible = "composite-video-connector"; -- -- port { -- cvbs_connector_in: endpoint { -- remote-endpoint = <&cvbs_vdac_out>; -- }; -- }; -- }; -- -- hdmi-connector { -- compatible = "hdmi-connector"; -- type = "a"; -- -- port { -- hdmi_connector_in: endpoint { -- remote-endpoint = <&hdmi_tx_tmds_out>; -- }; -- }; -- }; -- - sound { - compatible = "amlogic,axg-sound-card"; - model = "G12B-UGOOS-AM6"; -@@ -277,110 +100,16 @@ - }; - }; - }; -- -- wifi32k: wifi32k { -- compatible = "pwm-clock"; -- #clock-cells = <0>; -- clock-frequency = <32768>; -- pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */ -- }; - }; - - &arb { - status = "okay"; - }; - --&cec_AO { -- pinctrl-0 = <&cec_ao_a_h_pins>; -- pinctrl-names = "default"; -- status = "disabled"; -- hdmi-phandle = <&hdmi_tx>; --}; -- --&cecb_AO { -- pinctrl-0 = <&cec_ao_b_h_pins>; -- pinctrl-names = "default"; -- status = "okay"; -- hdmi-phandle = <&hdmi_tx>; --}; -- - &clkc_audio { - status = "okay"; - }; - --&cpu0 { -- cpu-supply = <&vddcpu_b>; -- operating-points-v2 = <&cpu_opp_table_0>; -- clocks = <&clkc CLKID_CPU_CLK>; -- clock-latency = <50000>; --}; -- --&cpu1 { -- cpu-supply = <&vddcpu_b>; -- operating-points-v2 = <&cpu_opp_table_0>; -- clocks = <&clkc CLKID_CPU_CLK>; -- clock-latency = <50000>; --}; -- --&cpu100 { -- cpu-supply = <&vddcpu_a>; -- operating-points-v2 = <&cpub_opp_table_1>; -- clocks = <&clkc CLKID_CPUB_CLK>; -- clock-latency = <50000>; --}; -- --&cpu101 { -- cpu-supply = <&vddcpu_a>; -- operating-points-v2 = <&cpub_opp_table_1>; -- clocks = <&clkc CLKID_CPUB_CLK>; -- clock-latency = <50000>; --}; -- --&cpu102 { -- cpu-supply = <&vddcpu_a>; -- operating-points-v2 = <&cpub_opp_table_1>; -- clocks = <&clkc CLKID_CPUB_CLK>; -- clock-latency = <50000>; --}; -- --&cpu103 { -- cpu-supply = <&vddcpu_a>; -- operating-points-v2 = <&cpub_opp_table_1>; -- clocks = <&clkc CLKID_CPUB_CLK>; -- clock-latency = <50000>; --}; -- --&cvbs_vdac_port { -- cvbs_vdac_out: endpoint { -- remote-endpoint = <&cvbs_connector_in>; -- }; --}; -- --&ext_mdio { -- external_phy: ethernet-phy@0 { -- /* Realtek RTL8211F (0x001cc916) */ -- reg = <0>; -- max-speed = <1000>; -- -- reset-assert-us = <10000>; -- reset-deassert-us = <30000>; -- reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; -- -- interrupt-parent = <&gpio_intc>; -- /* MAC_INTR on GPIOZ_14 */ -- interrupts = <26 IRQ_TYPE_LEVEL_LOW>; -- }; --}; -- --ðmac { -- pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; -- pinctrl-names = "default"; -- status = "okay"; -- phy-mode = "rgmii"; -- phy-handle = <&external_phy>; -- amlogic,tx-delay-ns = <2>; --}; -- - &frddr_a { - status = "okay"; - }; -@@ -393,112 +122,10 @@ - status = "okay"; - }; - --&hdmi_tx { -- status = "okay"; -- pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>; -- pinctrl-names = "default"; -- hdmi-supply = <&vcc_5v>; --}; -- --&hdmi_tx_tmds_port { -- hdmi_tx_tmds_out: endpoint { -- remote-endpoint = <&hdmi_connector_in>; -- }; --}; -- - &ir { -- status = "okay"; -- pinctrl-0 = <&remote_input_ao_pins>; -- pinctrl-names = "default"; - linux,rc-map-name = "rc-khadas"; - }; - --&pwm_ab { -- pinctrl-0 = <&pwm_a_e_pins>; -- pinctrl-names = "default"; -- clocks = <&xtal>; -- clock-names = "clkin0"; -- status = "okay"; --}; -- --&pwm_AO_cd { -- pinctrl-0 = <&pwm_ao_d_e_pins>; -- pinctrl-names = "default"; -- clocks = <&xtal>; -- clock-names = "clkin1"; -- status = "okay"; --}; -- --&pwm_ef { -- pinctrl-0 = <&pwm_e_pins>; -- pinctrl-names = "default"; -- clocks = <&xtal>; -- clock-names = "clkin0"; -- status = "okay"; --}; -- --/* SDIO */ --&sd_emmc_a { -- status = "okay"; -- pinctrl-0 = <&sdio_pins>; -- pinctrl-1 = <&sdio_clk_gate_pins>; -- pinctrl-names = "default", "clk-gate"; -- #address-cells = <1>; -- #size-cells = <0>; -- -- bus-width = <4>; -- cap-sd-highspeed; -- sd-uhs-sdr50; -- max-frequency = <100000000>; -- -- non-removable; -- disable-wp; -- -- mmc-pwrseq = <&sdio_pwrseq>; -- -- vmmc-supply = <&vddao_3v3>; -- vqmmc-supply = <&vddao_1v8>; -- -- brcmf: wifi@1 { -- reg = <1>; -- compatible = "brcm,bcm4329-fmac"; -- }; --}; -- --/* SD card */ --&sd_emmc_b { -- status = "okay"; -- pinctrl-0 = <&sdcard_c_pins>; -- pinctrl-1 = <&sdcard_clk_gate_c_pins>; -- pinctrl-names = "default", "clk-gate"; -- -- bus-width = <4>; -- cap-sd-highspeed; -- max-frequency = <50000000>; -- disable-wp; -- -- cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>; -- vmmc-supply = <&vddao_3v3>; -- vqmmc-supply = <&vddao_3v3>; --}; -- --/* eMMC */ --&sd_emmc_c { -- status = "okay"; -- pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>; -- pinctrl-1 = <&emmc_clk_gate_pins>; -- pinctrl-names = "default", "clk-gate"; -- -- bus-width = <8>; -- cap-mmc-highspeed; -- max-frequency = <100000000>; -- disable-wp; -- -- mmc-pwrseq = <&emmc_pwrseq>; -- vmmc-supply = <&vcc_3v3>; -- vqmmc-supply = <&flash_1v8>; --}; -- - &spdifout { - pinctrl-0 = <&spdif_out_h_pins>; - pinctrl-names = "default"; -@@ -520,38 +147,3 @@ - &tohdmitx { - status = "okay"; - }; -- --&uart_A { -- status = "okay"; -- pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; -- pinctrl-names = "default"; -- uart-has-rtscts; -- -- bluetooth { -- compatible = "brcm,bcm43438-bt"; -- shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; -- max-speed = <2000000>; -- clocks = <&wifi32k>; -- clock-names = "lpo"; -- }; --}; -- --&uart_AO { -- status = "okay"; -- pinctrl-0 = <&uart_ao_a_pins>; -- pinctrl-names = "default"; --}; -- --&usb { -- status = "okay"; -- dr_mode = "host"; -- vbus-supply = <&usb_pwr_en>; --}; -- --&usb2_phy0 { -- phy-supply = <&usb1_pow>; --}; -- --&usb2_phy1 { -- phy-supply = <&usb1_pow>; --}; -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-w400.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-w400.dtsi -new file mode 100644 -index 000000000000..98b70d216a6f ---- /dev/null -+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-w400.dtsi -@@ -0,0 +1,423 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+/* -+ * Copyright (c) 2019 BayLibre, SAS -+ * Author: Neil Armstrong -+ * Copyright (c) 2019 Christian Hewitt -+ */ -+ -+/dts-v1/; -+ -+#include "meson-g12b.dtsi" -+#include "meson-g12b-s922x.dtsi" -+#include -+#include -+ -+/ { -+ aliases { -+ serial0 = &uart_AO; -+ ethernet0 = ðmac; -+ }; -+ -+ chosen { -+ stdout-path = "serial0:115200n8"; -+ }; -+ -+ memory@0 { -+ device_type = "memory"; -+ reg = <0x0 0x0 0x0 0x40000000>; -+ }; -+ -+ emmc_pwrseq: emmc-pwrseq { -+ compatible = "mmc-pwrseq-emmc"; -+ reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>; -+ }; -+ -+ sdio_pwrseq: sdio-pwrseq { -+ compatible = "mmc-pwrseq-simple"; -+ reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; -+ clocks = <&wifi32k>; -+ clock-names = "ext_clock"; -+ }; -+ -+ flash_1v8: regulator-flash_1v8 { -+ compatible = "regulator-fixed"; -+ regulator-name = "FLASH_1V8"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ vin-supply = <&vcc_3v3>; -+ regulator-always-on; -+ }; -+ -+ main_12v: regulator-main_12v { -+ compatible = "regulator-fixed"; -+ regulator-name = "12V"; -+ regulator-min-microvolt = <12000000>; -+ regulator-max-microvolt = <12000000>; -+ regulator-always-on; -+ }; -+ -+ vcc_5v: regulator-vcc_5v { -+ compatible = "regulator-fixed"; -+ regulator-name = "VCC_5V"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ vin-supply = <&main_12v>; -+ -+ gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>; -+ enable-active-high; -+ }; -+ -+ vcc_1v8: regulator-vcc_1v8 { -+ compatible = "regulator-fixed"; -+ regulator-name = "VCC_1V8"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ vin-supply = <&vcc_3v3>; -+ regulator-always-on; -+ }; -+ -+ vcc_3v3: regulator-vcc_3v3 { -+ compatible = "regulator-fixed"; -+ regulator-name = "VCC_3V3"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ vin-supply = <&vddao_3v3>; -+ regulator-always-on; -+ /* FIXME: actually controlled by VDDCPU_B_EN */ -+ }; -+ -+ vddcpu_a: regulator-vddcpu-a { -+ /* -+ * MP1653 Regulator. -+ */ -+ compatible = "pwm-regulator"; -+ -+ regulator-name = "VDDCPU_A"; -+ regulator-min-microvolt = <721000>; -+ regulator-max-microvolt = <1022000>; -+ -+ vin-supply = <&main_12v>; -+ -+ pwms = <&pwm_ab 0 1250 0>; -+ pwm-dutycycle-range = <100 0>; -+ -+ regulator-boot-on; -+ regulator-always-on; -+ }; -+ -+ vddcpu_b: regulator-vddcpu-b { -+ /* -+ * MP1652 Regulator. -+ */ -+ compatible = "pwm-regulator"; -+ -+ regulator-name = "VDDCPU_B"; -+ regulator-min-microvolt = <721000>; -+ regulator-max-microvolt = <1022000>; -+ -+ vin-supply = <&main_12v>; -+ -+ pwms = <&pwm_AO_cd 1 1250 0>; -+ pwm-dutycycle-range = <100 0>; -+ -+ regulator-boot-on; -+ regulator-always-on; -+ }; -+ -+ usb1_pow: regulator-usb1-pow { -+ compatible = "regulator-fixed"; -+ regulator-name = "USB1_POW"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ vin-supply = <&vcc_5v>; -+ -+ /* connected to SY6280A Power Switch */ -+ gpio = <&gpio GPIOA_8 GPIO_ACTIVE_HIGH>; -+ enable-active-high; -+ }; -+ -+ usb_pwr_en: regulator-usb-pwr-en { -+ compatible = "regulator-fixed"; -+ regulator-name = "USB_PWR_EN"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ vin-supply = <&vcc_5v>; -+ -+ /* Connected to USB3 Type-A Port power enable */ -+ gpio = <&gpio GPIOAO_7 GPIO_ACTIVE_HIGH>; -+ enable-active-high; -+ }; -+ -+ vddao_1v8: regulator-vddao-1v8 { -+ compatible = "regulator-fixed"; -+ regulator-name = "VDDAO_1V8"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ vin-supply = <&vddao_3v3>; -+ regulator-always-on; -+ }; -+ -+ vddao_3v3: regulator-vddao-3v3 { -+ compatible = "regulator-fixed"; -+ regulator-name = "VDDAO_3V3"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ vin-supply = <&main_12v>; -+ regulator-always-on; -+ }; -+ -+ cvbs-connector { -+ compatible = "composite-video-connector"; -+ -+ port { -+ cvbs_connector_in: endpoint { -+ remote-endpoint = <&cvbs_vdac_out>; -+ }; -+ }; -+ }; -+ -+ hdmi-connector { -+ compatible = "hdmi-connector"; -+ type = "a"; -+ -+ port { -+ hdmi_connector_in: endpoint { -+ remote-endpoint = <&hdmi_tx_tmds_out>; -+ }; -+ }; -+ }; -+ -+ wifi32k: wifi32k { -+ compatible = "pwm-clock"; -+ #clock-cells = <0>; -+ clock-frequency = <32768>; -+ pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */ -+ }; -+}; -+ -+&cec_AO { -+ pinctrl-0 = <&cec_ao_a_h_pins>; -+ pinctrl-names = "default"; -+ status = "disabled"; -+ hdmi-phandle = <&hdmi_tx>; -+}; -+ -+&cecb_AO { -+ pinctrl-0 = <&cec_ao_b_h_pins>; -+ pinctrl-names = "default"; -+ status = "okay"; -+ hdmi-phandle = <&hdmi_tx>; -+}; -+ -+&cpu0 { -+ cpu-supply = <&vddcpu_b>; -+ operating-points-v2 = <&cpu_opp_table_0>; -+ clocks = <&clkc CLKID_CPU_CLK>; -+ clock-latency = <50000>; -+}; -+ -+&cpu1 { -+ cpu-supply = <&vddcpu_b>; -+ operating-points-v2 = <&cpu_opp_table_0>; -+ clocks = <&clkc CLKID_CPU_CLK>; -+ clock-latency = <50000>; -+}; -+ -+&cpu100 { -+ cpu-supply = <&vddcpu_a>; -+ operating-points-v2 = <&cpub_opp_table_1>; -+ clocks = <&clkc CLKID_CPUB_CLK>; -+ clock-latency = <50000>; -+}; -+ -+&cpu101 { -+ cpu-supply = <&vddcpu_a>; -+ operating-points-v2 = <&cpub_opp_table_1>; -+ clocks = <&clkc CLKID_CPUB_CLK>; -+ clock-latency = <50000>; -+}; -+ -+&cpu102 { -+ cpu-supply = <&vddcpu_a>; -+ operating-points-v2 = <&cpub_opp_table_1>; -+ clocks = <&clkc CLKID_CPUB_CLK>; -+ clock-latency = <50000>; -+}; -+ -+&cpu103 { -+ cpu-supply = <&vddcpu_a>; -+ operating-points-v2 = <&cpub_opp_table_1>; -+ clocks = <&clkc CLKID_CPUB_CLK>; -+ clock-latency = <50000>; -+}; -+ -+&cvbs_vdac_port { -+ cvbs_vdac_out: endpoint { -+ remote-endpoint = <&cvbs_connector_in>; -+ }; -+}; -+ -+&ext_mdio { -+ external_phy: ethernet-phy@0 { -+ /* Realtek RTL8211F (0x001cc916) */ -+ reg = <0>; -+ max-speed = <1000>; -+ -+ reset-assert-us = <10000>; -+ reset-deassert-us = <30000>; -+ reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; -+ -+ interrupt-parent = <&gpio_intc>; -+ /* MAC_INTR on GPIOZ_14 */ -+ interrupts = <26 IRQ_TYPE_LEVEL_LOW>; -+ }; -+}; -+ -+ðmac { -+ pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; -+ pinctrl-names = "default"; -+ status = "okay"; -+ phy-mode = "rgmii"; -+ phy-handle = <&external_phy>; -+ amlogic,tx-delay-ns = <2>; -+}; -+ -+&hdmi_tx { -+ status = "okay"; -+ pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>; -+ pinctrl-names = "default"; -+ hdmi-supply = <&vcc_5v>; -+}; -+ -+&hdmi_tx_tmds_port { -+ hdmi_tx_tmds_out: endpoint { -+ remote-endpoint = <&hdmi_connector_in>; -+ }; -+}; -+ -+&ir { -+ status = "okay"; -+ pinctrl-0 = <&remote_input_ao_pins>; -+ pinctrl-names = "default"; -+}; -+ -+&pwm_ab { -+ pinctrl-0 = <&pwm_a_e_pins>; -+ pinctrl-names = "default"; -+ clocks = <&xtal>; -+ clock-names = "clkin0"; -+ status = "okay"; -+}; -+ -+&pwm_AO_cd { -+ pinctrl-0 = <&pwm_ao_d_e_pins>; -+ pinctrl-names = "default"; -+ clocks = <&xtal>; -+ clock-names = "clkin1"; -+ status = "okay"; -+}; -+ -+&pwm_ef { -+ pinctrl-0 = <&pwm_e_pins>; -+ pinctrl-names = "default"; -+ clocks = <&xtal>; -+ clock-names = "clkin0"; -+ status = "okay"; -+}; -+ -+/* SDIO */ -+&sd_emmc_a { -+ status = "okay"; -+ pinctrl-0 = <&sdio_pins>; -+ pinctrl-1 = <&sdio_clk_gate_pins>; -+ pinctrl-names = "default", "clk-gate"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ bus-width = <4>; -+ cap-sd-highspeed; -+ sd-uhs-sdr50; -+ max-frequency = <100000000>; -+ -+ non-removable; -+ disable-wp; -+ -+ mmc-pwrseq = <&sdio_pwrseq>; -+ -+ vmmc-supply = <&vddao_3v3>; -+ vqmmc-supply = <&vddao_1v8>; -+ -+ brcmf: wifi@1 { -+ reg = <1>; -+ compatible = "brcm,bcm4329-fmac"; -+ }; -+}; -+ -+/* SD card */ -+&sd_emmc_b { -+ status = "okay"; -+ pinctrl-0 = <&sdcard_c_pins>; -+ pinctrl-1 = <&sdcard_clk_gate_c_pins>; -+ pinctrl-names = "default", "clk-gate"; -+ -+ bus-width = <4>; -+ cap-sd-highspeed; -+ max-frequency = <50000000>; -+ disable-wp; -+ -+ cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>; -+ vmmc-supply = <&vddao_3v3>; -+ vqmmc-supply = <&vddao_3v3>; -+}; -+ -+/* eMMC */ -+&sd_emmc_c { -+ status = "okay"; -+ pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>; -+ pinctrl-1 = <&emmc_clk_gate_pins>; -+ pinctrl-names = "default", "clk-gate"; -+ -+ bus-width = <8>; -+ cap-mmc-highspeed; -+ max-frequency = <100000000>; -+ disable-wp; -+ -+ mmc-pwrseq = <&emmc_pwrseq>; -+ vmmc-supply = <&vcc_3v3>; -+ vqmmc-supply = <&flash_1v8>; -+}; -+ -+&uart_A { -+ status = "okay"; -+ pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; -+ pinctrl-names = "default"; -+ uart-has-rtscts; -+ -+ bluetooth { -+ compatible = "brcm,bcm43438-bt"; -+ shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; -+ max-speed = <2000000>; -+ clocks = <&wifi32k>; -+ clock-names = "lpo"; -+ }; -+}; -+ -+&uart_AO { -+ status = "okay"; -+ pinctrl-0 = <&uart_ao_a_pins>; -+ pinctrl-names = "default"; -+}; -+ -+&usb { -+ status = "okay"; -+ dr_mode = "host"; -+ vbus-supply = <&usb_pwr_en>; -+}; -+ -+&usb2_phy0 { -+ phy-supply = <&usb1_pow>; -+}; -+ -+&usb2_phy1 { -+ phy-supply = <&usb1_pow>; -+}; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0137-WIP-arm64-dts-meson-add-audio-playback-to-p201.patch b/projects/Amlogic/patches/linux/amlogic-0038-WIP-arm64-dts-meson-add-audio-playback-to-p201.patch similarity index 91% rename from projects/Amlogic/patches/linux/amlogic-0137-WIP-arm64-dts-meson-add-audio-playback-to-p201.patch rename to projects/Amlogic/patches/linux/amlogic-0038-WIP-arm64-dts-meson-add-audio-playback-to-p201.patch index da88e13b2f3..e4bccd62a9b 100644 --- a/projects/Amlogic/patches/linux/amlogic-0137-WIP-arm64-dts-meson-add-audio-playback-to-p201.patch +++ b/projects/Amlogic/patches/linux/amlogic-0038-WIP-arm64-dts-meson-add-audio-playback-to-p201.patch @@ -1,7 +1,7 @@ -From 2e982715b779ed2d50347037c64d5733714cfb50 Mon Sep 17 00:00:00 2001 +From 3b686d39b8d1778b44f72f9f5d196b2055d3e145 Mon Sep 17 00:00:00 2001 From: Christian Hewitt Date: Fri, 15 May 2020 07:52:47 +0000 -Subject: [PATCH 137/156] WIP: arm64: dts: meson: add audio playback to p201 +Subject: [PATCH 38/79] WIP: arm64: dts: meson: add audio playback to p201 Add initial audio support limited to HDMI i2s. diff --git a/projects/Amlogic/patches/linux/amlogic-0039-FROMGIT-dt-bindings-arm-amlogic-add-support-for-the-.patch b/projects/Amlogic/patches/linux/amlogic-0039-FROMGIT-dt-bindings-arm-amlogic-add-support-for-the-.patch deleted file mode 100644 index 84526ecc2a4..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0039-FROMGIT-dt-bindings-arm-amlogic-add-support-for-the-.patch +++ /dev/null @@ -1,30 +0,0 @@ -From c3257c27d8ef835466a79695c46f9697b7d5800e Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Fri, 11 Oct 2019 09:01:54 +0000 -Subject: [PATCH 039/156] FROMGIT: dt-bindings: arm: amlogic: add support for - the Beelink GT-King - -The Shenzen AZW (Beelink) GT-King is based on the Amlogic W400 reference -board with an S922X chip. - -Acked-by: Rob Herring -Signed-off-by: Christian Hewitt ---- - Documentation/devicetree/bindings/arm/amlogic.yaml | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml -index 47badda69ef5..cd7a081a4f17 100644 ---- a/Documentation/devicetree/bindings/arm/amlogic.yaml -+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml -@@ -149,6 +149,7 @@ properties: - - description: Boards with the Amlogic Meson G12B S922X SoC - items: - - enum: -+ - azw,gtking - - hardkernel,odroid-n2 - - khadas,vim3 - - ugoos,am6 --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0138-WIP-arm64-dts-meson-add-audio-playback-to-p200.patch b/projects/Amlogic/patches/linux/amlogic-0039-WIP-arm64-dts-meson-add-audio-playback-to-p200.patch similarity index 94% rename from projects/Amlogic/patches/linux/amlogic-0138-WIP-arm64-dts-meson-add-audio-playback-to-p200.patch rename to projects/Amlogic/patches/linux/amlogic-0039-WIP-arm64-dts-meson-add-audio-playback-to-p200.patch index d8f83770e33..312be64e40d 100644 --- a/projects/Amlogic/patches/linux/amlogic-0138-WIP-arm64-dts-meson-add-audio-playback-to-p200.patch +++ b/projects/Amlogic/patches/linux/amlogic-0039-WIP-arm64-dts-meson-add-audio-playback-to-p200.patch @@ -1,7 +1,7 @@ -From 4fea728793a5576837bff09660f0dbbfa1460c9b Mon Sep 17 00:00:00 2001 +From 97eee44a18eae6703551cd69a40e0edb3e70067e Mon Sep 17 00:00:00 2001 From: Christian Hewitt Date: Fri, 15 May 2020 07:56:15 +0000 -Subject: [PATCH 138/156] WIP: arm64: dts: meson: add audio playback to p200 +Subject: [PATCH 39/79] WIP: arm64: dts: meson: add audio playback to p200 Add initial support limited to HDMI i2s and SPDIF (LPCM). diff --git a/projects/Amlogic/patches/linux/amlogic-0040-FROMGIT-arm64-dts-meson-g12b-gtking-add-initial-devi.patch b/projects/Amlogic/patches/linux/amlogic-0040-FROMGIT-arm64-dts-meson-g12b-gtking-add-initial-devi.patch deleted file mode 100644 index 1b912c39f1c..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0040-FROMGIT-arm64-dts-meson-g12b-gtking-add-initial-devi.patch +++ /dev/null @@ -1,194 +0,0 @@ -From 2be156eb10cb6f180d1dc3b5eb0fb46b0c9f5d58 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Fri, 11 Oct 2019 09:24:44 +0000 -Subject: [PATCH 040/156] FROMGIT: arm64: dts: meson-g12b-gtking: add initial - device-tree - -The Shenzen AZW (Beelink) GT-King is based on the Amlogic W400 reference -board with an S922X chip. - -- 4GB LPDDR4 RAM -- 64GB eMMC storage -- 10/100/1000 Base-T Ethernet -- AP6356S Wireless (802.11 a/b/g/n/ac, BT 4.1) -- HDMI 2.1 video -- S/PDIF optical output -- Analogue audio output -- 1x USB 2.0 port -- 2x USB 3.0 ports -- IR receiver -- 1x micro SD card slot - -Signed-off-by: Christian Hewitt ---- - arch/arm64/boot/dts/amlogic/Makefile | 1 + - .../boot/dts/amlogic/meson-g12b-gtking.dts | 145 ++++++++++++++++++ - 2 files changed, 146 insertions(+) - create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts - -diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile -index af883e0bfb9c..8c9e9dfa5da3 100644 ---- a/arch/arm64/boot/dts/amlogic/Makefile -+++ b/arch/arm64/boot/dts/amlogic/Makefile -@@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-axg-s400.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-g12a-sei510.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb -+dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts -new file mode 100644 -index 000000000000..eeb7bc5539ef ---- /dev/null -+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts -@@ -0,0 +1,145 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+/* -+ * Copyright (c) 2019 BayLibre, SAS -+ * Author: Neil Armstrong -+ * Copyright (c) 2019 Christian Hewitt -+ */ -+ -+/dts-v1/; -+ -+#include "meson-g12b-w400.dtsi" -+#include -+ -+/ { -+ compatible = "azw,gtking", "amlogic,g12b"; -+ model = "Beelink GT-King"; -+ -+ spdif_dit: audio-codec-1 { -+ #sound-dai-cells = <0>; -+ compatible = "linux,spdif-dit"; -+ status = "okay"; -+ sound-name-prefix = "DIT"; -+ }; -+ -+ sound { -+ compatible = "amlogic,axg-sound-card"; -+ model = "G12B-GTKING"; -+ audio-aux-devs = <&tdmout_b>; -+ audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", -+ "TDMOUT_B IN 1", "FRDDR_B OUT 1", -+ "TDMOUT_B IN 2", "FRDDR_C OUT 1", -+ "TDM_B Playback", "TDMOUT_B OUT", -+ "SPDIFOUT IN 0", "FRDDR_A OUT 3", -+ "SPDIFOUT IN 1", "FRDDR_B OUT 3", -+ "SPDIFOUT IN 2", "FRDDR_C OUT 3"; -+ -+ assigned-clocks = <&clkc CLKID_MPLL2>, -+ <&clkc CLKID_MPLL0>, -+ <&clkc CLKID_MPLL1>; -+ assigned-clock-parents = <0>, <0>, <0>; -+ assigned-clock-rates = <294912000>, -+ <270950400>, -+ <393216000>; -+ status = "okay"; -+ -+ dai-link-0 { -+ sound-dai = <&frddr_a>; -+ }; -+ -+ dai-link-1 { -+ sound-dai = <&frddr_b>; -+ }; -+ -+ dai-link-2 { -+ sound-dai = <&frddr_c>; -+ }; -+ -+ /* 8ch hdmi interface */ -+ dai-link-3 { -+ sound-dai = <&tdmif_b>; -+ dai-format = "i2s"; -+ dai-tdm-slot-tx-mask-0 = <1 1>; -+ dai-tdm-slot-tx-mask-1 = <1 1>; -+ dai-tdm-slot-tx-mask-2 = <1 1>; -+ dai-tdm-slot-tx-mask-3 = <1 1>; -+ mclk-fs = <256>; -+ -+ codec { -+ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; -+ }; -+ }; -+ -+ /* spdif hdmi or toslink interface */ -+ dai-link-4 { -+ sound-dai = <&spdifout>; -+ -+ codec-0 { -+ sound-dai = <&spdif_dit>; -+ }; -+ -+ codec-1 { -+ sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_A>; -+ }; -+ }; -+ -+ /* spdif hdmi interface */ -+ dai-link-5 { -+ sound-dai = <&spdifout_b>; -+ -+ codec { -+ sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_B>; -+ }; -+ }; -+ -+ /* hdmi glue */ -+ dai-link-6 { -+ sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; -+ -+ codec { -+ sound-dai = <&hdmi_tx>; -+ }; -+ }; -+ }; -+}; -+ -+&arb { -+ status = "okay"; -+}; -+ -+&clkc_audio { -+ status = "okay"; -+}; -+ -+&frddr_a { -+ status = "okay"; -+}; -+ -+&frddr_b { -+ status = "okay"; -+}; -+ -+&frddr_c { -+ status = "okay"; -+}; -+ -+&spdifout { -+ pinctrl-0 = <&spdif_out_h_pins>; -+ pinctrl-names = "default"; -+ status = "okay"; -+}; -+ -+&spdifout_b { -+ status = "okay"; -+}; -+ -+&tdmif_b { -+ status = "okay"; -+}; -+ -+&tdmout_b { -+ status = "okay"; -+}; -+ -+&tohdmitx { -+ status = "okay"; -+}; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0139-WIP-arm64-dts-meson-add-audio-playback-to-p212-s905x.patch b/projects/Amlogic/patches/linux/amlogic-0040-WIP-arm64-dts-meson-add-audio-playback-to-p212-s905x.patch similarity index 90% rename from projects/Amlogic/patches/linux/amlogic-0139-WIP-arm64-dts-meson-add-audio-playback-to-p212-s905x.patch rename to projects/Amlogic/patches/linux/amlogic-0040-WIP-arm64-dts-meson-add-audio-playback-to-p212-s905x.patch index de465553c06..33d206b18e8 100644 --- a/projects/Amlogic/patches/linux/amlogic-0139-WIP-arm64-dts-meson-add-audio-playback-to-p212-s905x.patch +++ b/projects/Amlogic/patches/linux/amlogic-0040-WIP-arm64-dts-meson-add-audio-playback-to-p212-s905x.patch @@ -1,7 +1,7 @@ -From 8b2e4f20dbd2360a4052c5399082c40cd8f33e0b Mon Sep 17 00:00:00 2001 +From c1b47b0868145e1a6266440212831ee0f3e66ad9 Mon Sep 17 00:00:00 2001 From: Christian Hewitt Date: Fri, 15 May 2020 08:02:54 +0000 -Subject: [PATCH 139/156] WIP: arm64: dts: meson: add audio playback to +Subject: [PATCH 40/79] WIP: arm64: dts: meson: add audio playback to p212-s905x dtsi Add initial audio support limited to HDMI i2s. @@ -12,7 +12,7 @@ Signed-off-by: Christian Hewitt 1 file changed, 40 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi -index 6ac678f88bd8..da8c2e5296f6 100644 +index 05cb2f5e5c36..40776d42bf8e 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi @@ -11,6 +11,7 @@ diff --git a/projects/Amlogic/patches/linux/amlogic-0041-FROMGIT-dt-bindings-arm-amlogic-add-support-for-the-.patch b/projects/Amlogic/patches/linux/amlogic-0041-FROMGIT-dt-bindings-arm-amlogic-add-support-for-the-.patch deleted file mode 100644 index 0b1bc898a17..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0041-FROMGIT-dt-bindings-arm-amlogic-add-support-for-the-.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 0ad9ee94642b54d1e4b0e35ff4f2749fd2dc056c Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Sun, 1 Mar 2020 05:33:19 +0000 -Subject: [PATCH 041/156] FROMGIT: dt-bindings: arm: amlogic: add support for - the Beelink GT-King Pro - -The Shenzen AZW (Beelink) GT-King Pro is based on the Amlogic W400 reference -board with an S922X chip. - -Acked-by: Rob Herring -Signed-off-by: Christian Hewitt ---- - Documentation/devicetree/bindings/arm/amlogic.yaml | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml -index cd7a081a4f17..db35e0d0134c 100644 ---- a/Documentation/devicetree/bindings/arm/amlogic.yaml -+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml -@@ -150,6 +150,7 @@ properties: - items: - - enum: - - azw,gtking -+ - azw,gtking-pro - - hardkernel,odroid-n2 - - khadas,vim3 - - ugoos,am6 --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0140-WIP-arm64-dts-meson-add-audio-playback-to-rbox-pro.patch b/projects/Amlogic/patches/linux/amlogic-0041-WIP-arm64-dts-meson-add-audio-playback-to-rbox-pro.patch similarity index 93% rename from projects/Amlogic/patches/linux/amlogic-0140-WIP-arm64-dts-meson-add-audio-playback-to-rbox-pro.patch rename to projects/Amlogic/patches/linux/amlogic-0041-WIP-arm64-dts-meson-add-audio-playback-to-rbox-pro.patch index 13d79296a17..c68c7386139 100644 --- a/projects/Amlogic/patches/linux/amlogic-0140-WIP-arm64-dts-meson-add-audio-playback-to-rbox-pro.patch +++ b/projects/Amlogic/patches/linux/amlogic-0041-WIP-arm64-dts-meson-add-audio-playback-to-rbox-pro.patch @@ -1,8 +1,7 @@ -From 5a047746565c8a51e32b0ec77403295ccb62ad4b Mon Sep 17 00:00:00 2001 +From 79e65aaf2909fb6ebd9191cb77631e7347e1e221 Mon Sep 17 00:00:00 2001 From: Christian Hewitt Date: Fri, 15 May 2020 08:13:00 +0000 -Subject: [PATCH 140/156] WIP: arm64: dts: meson: add audio playback to - rbox-pro +Subject: [PATCH 41/79] WIP: arm64: dts: meson: add audio playback to rbox-pro Add initial support limited to HDMI i2s and SPDIF (LPCM). @@ -12,7 +11,7 @@ Signed-off-by: Christian Hewitt 1 file changed, 80 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts -index c89c9f846fb1..7b23b3da27ff 100644 +index dde7cfe12cff..e6d1b3a3776f 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts +++ b/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts @@ -14,6 +14,7 @@ diff --git a/projects/Amlogic/patches/linux/amlogic-0141-WIP-arm64-dts-meson-add-audio-playback-to-u200.patch b/projects/Amlogic/patches/linux/amlogic-0042-WIP-arm64-dts-meson-add-audio-playback-to-u200.patch similarity index 96% rename from projects/Amlogic/patches/linux/amlogic-0141-WIP-arm64-dts-meson-add-audio-playback-to-u200.patch rename to projects/Amlogic/patches/linux/amlogic-0042-WIP-arm64-dts-meson-add-audio-playback-to-u200.patch index 7d9d884ff3e..95bb4f263b2 100644 --- a/projects/Amlogic/patches/linux/amlogic-0141-WIP-arm64-dts-meson-add-audio-playback-to-u200.patch +++ b/projects/Amlogic/patches/linux/amlogic-0042-WIP-arm64-dts-meson-add-audio-playback-to-u200.patch @@ -1,7 +1,7 @@ -From 77f7897d27e5f16069ea6d37a4e056b039764382 Mon Sep 17 00:00:00 2001 +From f4e3bb8586cc10951a97746019192b9830c1d848 Mon Sep 17 00:00:00 2001 From: Christian Hewitt Date: Sun, 17 May 2020 05:00:55 +0000 -Subject: [PATCH 141/156] WIP: arm64: dts: meson: add audio playback to u200 +Subject: [PATCH 42/79] WIP: arm64: dts: meson: add audio playback to u200 Add initial support limited to HDMI i2s and SPDIF (LPCM). diff --git a/projects/Amlogic/patches/linux/amlogic-0043-FROMGIT-MAINTAINERS-update-the-Amlogic-VDEC-driver-m.patch b/projects/Amlogic/patches/linux/amlogic-0043-FROMGIT-MAINTAINERS-update-the-Amlogic-VDEC-driver-m.patch deleted file mode 100644 index 89f9f8810e4..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0043-FROMGIT-MAINTAINERS-update-the-Amlogic-VDEC-driver-m.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 6dba3484b6a8c467ccc3982879d0a02484b52bbe Mon Sep 17 00:00:00 2001 -From: Neil Armstrong -Date: Sat, 2 May 2020 21:17:45 +0000 -Subject: [PATCH 043/156] FROMGIT: MAINTAINERS: update the Amlogic VDEC driver - maintainer entry - -Add myself as co-maintainer of the Amlogic VDEC driver, and add the -missing vdec DT yaml bindings. - -Signed-off-by: Neil Armstrong ---- - MAINTAINERS | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/MAINTAINERS b/MAINTAINERS -index 50659d76976b..091b74ff830a 100644 ---- a/MAINTAINERS -+++ b/MAINTAINERS -@@ -11016,10 +11016,12 @@ F: drivers/mtd/nand/raw/meson_* - - MESON VIDEO DECODER DRIVER FOR AMLOGIC SOCS - M: Maxime Jourdan -+M: Neil Armstrong - L: linux-media@vger.kernel.org - L: linux-amlogic@lists.infradead.org - S: Supported - T: git git://linuxtv.org/media_tree.git -+F: Documentation/devicetree/bindings/media/amlogic,gx-vdec.yaml - F: drivers/staging/media/meson/vdec/ - - METHODE UDPU SUPPORT --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0142-WIP-arm64-dts-meson-add-audio-playback-to-vega-s95-d.patch b/projects/Amlogic/patches/linux/amlogic-0043-WIP-arm64-dts-meson-add-audio-playback-to-vega-s95-d.patch similarity index 89% rename from projects/Amlogic/patches/linux/amlogic-0142-WIP-arm64-dts-meson-add-audio-playback-to-vega-s95-d.patch rename to projects/Amlogic/patches/linux/amlogic-0043-WIP-arm64-dts-meson-add-audio-playback-to-vega-s95-d.patch index 9f58cf7eee0..7f823176586 100644 --- a/projects/Amlogic/patches/linux/amlogic-0142-WIP-arm64-dts-meson-add-audio-playback-to-vega-s95-d.patch +++ b/projects/Amlogic/patches/linux/amlogic-0043-WIP-arm64-dts-meson-add-audio-playback-to-vega-s95-d.patch @@ -1,18 +1,19 @@ -From e485aa1d6f2033732e79f11618b65c0c8f6b393d Mon Sep 17 00:00:00 2001 +From 7c504771602f2b10e4c3aca200178101a05f380f Mon Sep 17 00:00:00 2001 From: Christian Hewitt Date: Sat, 16 May 2020 07:04:58 +0000 -Subject: [PATCH 142/156] WIP: arm64: dts: meson: add audio playback to - vega-s95 dtsi +Subject: [PATCH 43/79] WIP: arm64: dts: meson: add audio playback to vega-s95 + dtsi Add initial support limited to HDMI i2s and SPDIF (LPCM). +Tested-by: Oleg Ivanov <150balbes@yandex.ru> Signed-off-by: Christian Hewitt --- .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi -index 222ee8069cfa..1300585a1ec7 100644 +index 9b0b81f191f1..2976a9c42e11 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi @@ -4,6 +4,7 @@ diff --git a/projects/Amlogic/patches/linux/amlogic-0044-FROMGIT-media-meson-vdec-enable-mcrcc-for-VP9.patch b/projects/Amlogic/patches/linux/amlogic-0044-FROMGIT-media-meson-vdec-enable-mcrcc-for-VP9.patch deleted file mode 100644 index a1a474c78a3..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0044-FROMGIT-media-meson-vdec-enable-mcrcc-for-VP9.patch +++ /dev/null @@ -1,67 +0,0 @@ -From cd4532a161555ae66ec62cc274b988f9c356f496 Mon Sep 17 00:00:00 2001 -From: Maxime Jourdan -Date: Sat, 2 May 2020 21:15:13 +0000 -Subject: [PATCH 044/156] FROMGIT: media: meson: vdec: enable mcrcc for VP9 - -The motion compensation reference cache controller allows caching -parts of reference frames for faster decoding. - -Fixes: 00c43088aa68 ("media: meson: vdec: add VP9 decoder support") -Signed-off-by: Maxime Jourdan -Signed-off-by: Neil Armstrong ---- - drivers/staging/media/meson/vdec/codec_vp9.c | 31 ++++++++++++++++++++ - 1 file changed, 31 insertions(+) - -diff --git a/drivers/staging/media/meson/vdec/codec_vp9.c b/drivers/staging/media/meson/vdec/codec_vp9.c -index 60e4fc0052b3..897f5d7a6aad 100644 ---- a/drivers/staging/media/meson/vdec/codec_vp9.c -+++ b/drivers/staging/media/meson/vdec/codec_vp9.c -@@ -854,6 +854,36 @@ static int codec_vp9_stop(struct amvdec_session *sess) - return 0; - } - -+/* -+ * Program LAST & GOLDEN frames into the motion compensation reference cache -+ * controller -+ */ -+static void codec_vp9_set_mcrcc(struct amvdec_session *sess) -+{ -+ struct amvdec_core *core = sess->core; -+ struct codec_vp9 *vp9 = sess->priv; -+ u32 val; -+ -+ /* Reset mcrcc */ -+ amvdec_write_dos(core, HEVCD_MCRCC_CTL1, 0x2); -+ /* Disable on I-frame */ -+ if (vp9->cur_frame->type == KEY_FRAME || vp9->cur_frame->intra_only) { -+ amvdec_write_dos(core, HEVCD_MCRCC_CTL1, 0x0); -+ return; -+ } -+ -+ amvdec_write_dos(core, HEVCD_MPP_ANC_CANVAS_ACCCONFIG_ADDR, BIT(1)); -+ val = amvdec_read_dos(core, HEVCD_MPP_ANC_CANVAS_DATA_ADDR) & 0xffff; -+ val |= (val << 16); -+ amvdec_write_dos(core, HEVCD_MCRCC_CTL2, val); -+ val = amvdec_read_dos(core, HEVCD_MPP_ANC_CANVAS_DATA_ADDR) & 0xffff; -+ val |= (val << 16); -+ amvdec_write_dos(core, HEVCD_MCRCC_CTL3, val); -+ -+ /* Enable mcrcc progressive-mode */ -+ amvdec_write_dos(core, HEVCD_MCRCC_CTL1, 0xff0); -+} -+ - static void codec_vp9_set_sao(struct amvdec_session *sess, - struct vb2_buffer *vb) - { -@@ -1267,6 +1297,7 @@ static void codec_vp9_process_frame(struct amvdec_session *sess) - - amvdec_write_dos(core, HEVC_PARSER_PICTURE_SIZE, - (vp9->height << 16) | vp9->width); -+ codec_vp9_set_mcrcc(sess); - codec_vp9_set_sao(sess, &vp9->cur_frame->vbuf->vb2_buf); - - vp9_loop_filter_frame_init(core, &vp9->seg_4lf, --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0116-WIP-clk-meson-g12a-fix-gp0-and-hifi-ranges.patch b/projects/Amlogic/patches/linux/amlogic-0044-WIP-clk-meson-g12a-fix-gp0-and-hifi-ranges.patch similarity index 81% rename from projects/Amlogic/patches/linux/amlogic-0116-WIP-clk-meson-g12a-fix-gp0-and-hifi-ranges.patch rename to projects/Amlogic/patches/linux/amlogic-0044-WIP-clk-meson-g12a-fix-gp0-and-hifi-ranges.patch index 5fa4a44b0e9..b437d960654 100644 --- a/projects/Amlogic/patches/linux/amlogic-0116-WIP-clk-meson-g12a-fix-gp0-and-hifi-ranges.patch +++ b/projects/Amlogic/patches/linux/amlogic-0044-WIP-clk-meson-g12a-fix-gp0-and-hifi-ranges.patch @@ -1,7 +1,7 @@ -From a49b5ea299d4b5cc7259738f548fe5be167ee1b6 Mon Sep 17 00:00:00 2001 +From 88b8ee6b6c50088d1347808276a9fa37a15d5ae2 Mon Sep 17 00:00:00 2001 From: Jerome Brunet Date: Fri, 15 Feb 2019 14:21:27 +0100 -Subject: [PATCH 116/156] WIP: clk: meson: g12a: fix gp0 and hifi ranges +Subject: [PATCH 44/79] WIP: clk: meson: g12a: fix gp0 and hifi ranges While some SoC samples are able to lock with a PLL factor of 55, others samples can't. ATM, a minimum of 60 appears to work on all the samples @@ -21,10 +21,10 @@ Signed-off-by: Jerome Brunet 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c -index 5c2e5cedca96..7fe99b36a53b 100644 +index b080359b4645..a805bac93c11 100644 --- a/drivers/clk/meson/g12a.c +++ b/drivers/clk/meson/g12a.c -@@ -1591,7 +1591,7 @@ static struct clk_regmap g12b_cpub_clk_trace = { +@@ -1603,7 +1603,7 @@ static struct clk_regmap g12b_cpub_clk_trace = { }; static const struct pll_mult_range g12a_gp0_pll_mult_range = { diff --git a/projects/Amlogic/patches/linux/amlogic-0045-FROMGIT-dt-bindings-net-meson-dwmac-Add-the-amlogic-.patch b/projects/Amlogic/patches/linux/amlogic-0045-FROMGIT-dt-bindings-net-meson-dwmac-Add-the-amlogic-.patch deleted file mode 100644 index 7ea23439cdb..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0045-FROMGIT-dt-bindings-net-meson-dwmac-Add-the-amlogic-.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 83b54115d89c0668d97c30e843b93de001530d0c Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 1 Jun 2020 08:56:41 +0000 -Subject: [PATCH 045/156] FROMGIT: dt-bindings: net: meson-dwmac: Add the - amlogic, rx-delay-ns property - -The PRG_ETHERNET registers on Meson8b and newer SoCs can add an RX -delay. Add a property with the known supported values so it can be -configured according to the board layout. - -Reviewed-by: Andrew Lunn -Signed-off-by: Martin Blumenstingl ---- - .../bindings/net/amlogic,meson-dwmac.yaml | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff --git a/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml b/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml -index ae91aa9d8616..66074314e57a 100644 ---- a/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml -+++ b/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml -@@ -67,6 +67,19 @@ allOf: - PHY and MAC are adding a delay). - Any configuration is ignored when the phy-mode is set to "rmii". - -+ amlogic,rx-delay-ns: -+ enum: -+ - 0 -+ - 2 -+ default: 0 -+ description: -+ The internal RGMII RX clock delay (provided by this IP block) in -+ nanoseconds. When phy-mode is set to "rgmii" then the RX delay -+ should be explicitly configured. When the phy-mode is set to -+ either "rgmii-id" or "rgmii-rxid" the RX clock delay is already -+ provided by the PHY. Any configuration is ignored when the -+ phy-mode is set to "rmii". -+ - properties: - compatible: - additionalItems: true --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0117-WIP-clk-meson-g12a-fix-hifi-pll-lock.patch b/projects/Amlogic/patches/linux/amlogic-0045-WIP-clk-meson-g12a-fix-hifi-pll-lock.patch similarity index 74% rename from projects/Amlogic/patches/linux/amlogic-0117-WIP-clk-meson-g12a-fix-hifi-pll-lock.patch rename to projects/Amlogic/patches/linux/amlogic-0045-WIP-clk-meson-g12a-fix-hifi-pll-lock.patch index 466aeccdc85..1680c44e5b8 100644 --- a/projects/Amlogic/patches/linux/amlogic-0117-WIP-clk-meson-g12a-fix-hifi-pll-lock.patch +++ b/projects/Amlogic/patches/linux/amlogic-0045-WIP-clk-meson-g12a-fix-hifi-pll-lock.patch @@ -1,7 +1,7 @@ -From 99b732b7cd8b442ceec880d36586d24a5c2b1c23 Mon Sep 17 00:00:00 2001 +From a44a27bb6bda088ca9dcdf44f338b3694d69b6f4 Mon Sep 17 00:00:00 2001 From: Jerome Brunet -Date: Wed, 17 Jun 2020 16:30:53 +0000 -Subject: [PATCH 117/156] WIP: clk: meson: g12a: fix hifi pll lock +Date: Tue, 14 Apr 2020 10:45:08 +0200 +Subject: [PATCH 45/79] WIP: clk: meson: g12a: fix hifi pll lock The HIFI pll of the g12a sometimes takes a long time to report the lock in HIFI_PLL_CNTL0 bit 31. The would eventually be reported but the delay may @@ -16,10 +16,10 @@ Signed-off-by: Jerome Brunet 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c -index 7fe99b36a53b..e672e9f015f0 100644 +index a805bac93c11..c22611d3669a 100644 --- a/drivers/clk/meson/g12a.c +++ b/drivers/clk/meson/g12a.c -@@ -1771,7 +1771,7 @@ static struct clk_regmap g12a_hifi_pll_dco = { +@@ -1783,7 +1783,7 @@ static struct clk_regmap g12a_hifi_pll_dco = { }, .l = { .reg_off = HHI_HIFI_PLL_CNTL0, diff --git a/projects/Amlogic/patches/linux/amlogic-0046-FROMGIT-dt-bindings-net-dwmac-meson-Document-the-tim.patch b/projects/Amlogic/patches/linux/amlogic-0046-FROMGIT-dt-bindings-net-dwmac-meson-Document-the-tim.patch deleted file mode 100644 index 421e750742d..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0046-FROMGIT-dt-bindings-net-dwmac-meson-Document-the-tim.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 6aade93a6dccc6d345495cd1f3b9457c3bc8c0a4 Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 1 Jun 2020 08:57:48 +0000 -Subject: [PATCH 046/156] FROMGIT: dt-bindings: net: dwmac-meson: Document the - "timing-adjustment" clock - -The PRG_ETHERNET registers can add an RX delay in RGMII mode. This -requires an internal re-timing circuit whose input clock is called -"timing adjustment clock". Document this clock input so the clock can be -enabled as needed. - -Reviewed-by: Andrew Lunn -Signed-off-by: Martin Blumenstingl ---- - .../devicetree/bindings/net/amlogic,meson-dwmac.yaml | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml b/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml -index 66074314e57a..64c20c92c07d 100644 ---- a/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml -+++ b/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml -@@ -40,18 +40,22 @@ allOf: - then: - properties: - clocks: -+ minItems: 3 -+ maxItems: 4 - items: - - description: GMAC main clock - - description: First parent clock of the internal mux - - description: Second parent clock of the internal mux -+ - description: The clock which drives the timing adjustment logic - - clock-names: - minItems: 3 -- maxItems: 3 -+ maxItems: 4 - items: - - const: stmmaceth - - const: clkin0 - - const: clkin1 -+ - const: timing-adjustment - - amlogic,tx-delay-ns: - $ref: /schemas/types.yaml#definitions/uint32 -@@ -120,7 +124,7 @@ examples: - reg = <0xc9410000 0x10000>, <0xc8834540 0x8>; - interrupts = <8>; - interrupt-names = "macirq"; -- clocks = <&clk_eth>, <&clkc_fclk_div2>, <&clk_mpll2>; -- clock-names = "stmmaceth", "clkin0", "clkin1"; -+ clocks = <&clk_eth>, <&clk_fclk_div2>, <&clk_mpll2>, <&clk_fclk_div2>; -+ clock-names = "stmmaceth", "clkin0", "clkin1", "timing-adjustment"; - phy-mode = "rgmii"; - }; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0046-WIP-drm-bridge-dw-hdmi-i2s-HBR-audio-experiments.patch b/projects/Amlogic/patches/linux/amlogic-0046-WIP-drm-bridge-dw-hdmi-i2s-HBR-audio-experiments.patch new file mode 100644 index 00000000000..935fdad58d3 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0046-WIP-drm-bridge-dw-hdmi-i2s-HBR-audio-experiments.patch @@ -0,0 +1,197 @@ +From 66dcce54150521f90c493814c4e06fe02009a737 Mon Sep 17 00:00:00 2001 +From: chewitt +Date: Tue, 7 Jul 2020 15:24:33 +0000 +Subject: [PATCH 46/79] WIP: drm/bridge: dw-hdmi-i2s: HBR audio experiments + +--- + .../drm/bridge/synopsys/dw-hdmi-i2s-audio.c | 21 +++++++++++++++++-- + drivers/gpu/drm/bridge/synopsys/dw-hdmi.h | 5 +++++ + include/sound/hdmi-codec.h | 1 + + sound/soc/codecs/hdmi-codec.c | 4 +++- + sound/soc/meson/aiu-acodec-ctrl.c | 2 +- + sound/soc/meson/aiu-codec-ctrl.c | 2 +- + sound/soc/meson/aiu.h | 3 ++- + sound/soc/meson/axg-tdm.h | 3 ++- + sound/soc/meson/g12a-tohdmitx.c | 2 +- + 9 files changed, 35 insertions(+), 8 deletions(-) + +diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c +index feb04f127b55..54cadf32b974 100644 +--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c ++++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c +@@ -40,8 +40,11 @@ static int dw_hdmi_i2s_hw_params(struct device *dev, void *data, + { + struct dw_hdmi_i2s_audio_data *audio = data; + struct dw_hdmi *hdmi = audio->hdmi; ++ int sample_width = hparms->sample_width; ++ int ca = hparms->cea.channel_allocation; + u8 conf0 = 0; + u8 conf1 = 0; ++ u8 conf2 = 0; + u8 inputclkfs = 0; + + /* it cares I2S only */ +@@ -57,6 +60,17 @@ static int dw_hdmi_i2s_hw_params(struct device *dev, void *data, + inputclkfs = HDMI_AUD_INPUTCLKFS_64FS; + conf0 = (HDMI_AUD_CONF0_I2S_SELECT | HDMI_AUD_CONF0_I2S_EN0); + ++ if (hparms->format == SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE) { ++ conf2 |= HDMI_AUD_CONF2_NLPCM; ++ if (hparms->channels == 8) ++ conf2 |= HDMI_AUD_CONF2_HBR; ++ ++ sample_width = 21; ++ ca = 0; ++ } ++ ++ hdmi_write(audio, conf2, HDMI_AUD_CONF2); ++ + /* Enable the required i2s lanes */ + switch (hparms->channels) { + case 7 ... 8: +@@ -70,10 +84,13 @@ static int dw_hdmi_i2s_hw_params(struct device *dev, void *data, + /* Fall-thru */ + } + +- switch (hparms->sample_width) { ++ switch (sample_width) { + case 16: + conf1 = HDMI_AUD_CONF1_WIDTH_16; + break; ++ case 21: ++ conf1 = HDMI_AUD_CONF1_WIDTH_21; ++ break; + case 24: + case 32: + conf1 = HDMI_AUD_CONF1_WIDTH_24; +@@ -104,7 +121,7 @@ static int dw_hdmi_i2s_hw_params(struct device *dev, void *data, + dw_hdmi_set_sample_rate(hdmi, hparms->sample_rate); + dw_hdmi_set_channel_status(hdmi, hparms->iec.status); + dw_hdmi_set_channel_count(hdmi, hparms->channels); +- dw_hdmi_set_channel_allocation(hdmi, hparms->cea.channel_allocation); ++ dw_hdmi_set_channel_allocation(hdmi, ca); + + hdmi_write(audio, inputclkfs, HDMI_AUD_INPUTCLKFS); + hdmi_write(audio, conf0, HDMI_AUD_CONF0); +diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.h b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.h +index 1999db05bc3b..bff849a336f7 100644 +--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.h ++++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.h +@@ -917,8 +917,13 @@ enum { + HDMI_AUD_CONF1_MODE_BURST_1 = 0x60, + HDMI_AUD_CONF1_MODE_BURST_2 = 0x80, + HDMI_AUD_CONF1_WIDTH_16 = 0x10, ++ HDMI_AUD_CONF1_WIDTH_21 = 0x15, + HDMI_AUD_CONF1_WIDTH_24 = 0x18, + ++/* AUD_CONF1 field values */ ++ HDMI_AUD_CONF2_NLPCM = 0x02, ++ HDMI_AUD_CONF2_HBR = 0x01, ++ + /* AUD_CTS3 field values */ + HDMI_AUD_CTS3_N_SHIFT_OFFSET = 5, + HDMI_AUD_CTS3_N_SHIFT_MASK = 0xe0, +diff --git a/include/sound/hdmi-codec.h b/include/sound/hdmi-codec.h +index b55970859a13..c3bd757375e9 100644 +--- a/include/sound/hdmi-codec.h ++++ b/include/sound/hdmi-codec.h +@@ -45,6 +45,7 @@ struct hdmi_codec_params { + int sample_rate; + int sample_width; + int channels; ++ snd_pcm_format_t format; + }; + + typedef void (*hdmi_codec_plugged_cb)(struct device *dev, +diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c +index d5fcc4db8284..0f32c81b5ea3 100644 +--- a/sound/soc/codecs/hdmi-codec.c ++++ b/sound/soc/codecs/hdmi-codec.c +@@ -488,6 +488,7 @@ static int hdmi_codec_hw_params(struct snd_pcm_substream *substream, + hp.sample_width = params_width(params); + hp.sample_rate = params_rate(params); + hp.channels = params_channels(params); ++ hp.format = params_format(params); + + return hcp->hcd.ops->hw_params(dai->dev->parent, hcp->hcd.data, + cf, &hp); +@@ -617,7 +618,8 @@ static const struct snd_soc_dai_ops hdmi_codec_spdif_dai_ops = { + SNDRV_PCM_FMTBIT_S20_3LE | SNDRV_PCM_FMTBIT_S20_3BE |\ + SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S24_3BE |\ + SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S24_BE |\ +- SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_S32_BE) ++ SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_S32_BE |\ ++ SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE) + + static int hdmi_codec_pcm_new(struct snd_soc_pcm_runtime *rtd, + struct snd_soc_dai *dai) +diff --git a/sound/soc/meson/aiu-acodec-ctrl.c b/sound/soc/meson/aiu-acodec-ctrl.c +index 7078197e0cc5..7b1356b4c891 100644 +--- a/sound/soc/meson/aiu-acodec-ctrl.c ++++ b/sound/soc/meson/aiu-acodec-ctrl.c +@@ -114,7 +114,7 @@ static const struct snd_soc_dai_ops aiu_acodec_ctrl_output_ops = { + #define AIU_ACODEC_CTRL_FORMATS \ + (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ + SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S24_LE | \ +- SNDRV_PCM_FMTBIT_S32_LE) ++ SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE) + + #define AIU_ACODEC_STREAM(xname, xsuffix, xchmax) \ + { \ +diff --git a/sound/soc/meson/aiu-codec-ctrl.c b/sound/soc/meson/aiu-codec-ctrl.c +index 4b773d3e8b07..c41be9302afd 100644 +--- a/sound/soc/meson/aiu-codec-ctrl.c ++++ b/sound/soc/meson/aiu-codec-ctrl.c +@@ -86,7 +86,7 @@ static const struct snd_soc_dai_ops aiu_codec_ctrl_output_ops = { + #define AIU_CODEC_CTRL_FORMATS \ + (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ + SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S24_LE | \ +- SNDRV_PCM_FMTBIT_S32_LE) ++ SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE) + + #define AIU_CODEC_CTRL_STREAM(xname, xsuffix) \ + { \ +diff --git a/sound/soc/meson/aiu.h b/sound/soc/meson/aiu.h +index 87aa19ac4af3..a52169d4ae9d 100644 +--- a/sound/soc/meson/aiu.h ++++ b/sound/soc/meson/aiu.h +@@ -42,7 +42,8 @@ struct aiu { + + #define AIU_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ + SNDRV_PCM_FMTBIT_S20_LE | \ +- SNDRV_PCM_FMTBIT_S24_LE) ++ SNDRV_PCM_FMTBIT_S24_LE | \ ++ SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE) + + int aiu_of_xlate_dai_name(struct snd_soc_component *component, + struct of_phandle_args *args, +diff --git a/sound/soc/meson/axg-tdm.h b/sound/soc/meson/axg-tdm.h +index 5774ce0916d4..b2218203023b 100644 +--- a/sound/soc/meson/axg-tdm.h ++++ b/sound/soc/meson/axg-tdm.h +@@ -21,7 +21,8 @@ + SNDRV_PCM_FMTBIT_S16_LE | \ + SNDRV_PCM_FMTBIT_S20_LE | \ + SNDRV_PCM_FMTBIT_S24_LE | \ +- SNDRV_PCM_FMTBIT_S32_LE) ++ SNDRV_PCM_FMTBIT_S32_LE | \ ++ SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE) + + struct axg_tdm_iface { + struct clk *sclk; +diff --git a/sound/soc/meson/g12a-tohdmitx.c b/sound/soc/meson/g12a-tohdmitx.c +index 9b2b59536ced..ae07ca57623e 100644 +--- a/sound/soc/meson/g12a-tohdmitx.c ++++ b/sound/soc/meson/g12a-tohdmitx.c +@@ -155,7 +155,7 @@ static const struct snd_soc_dai_ops g12a_tohdmitx_output_ops = { + #define TOHDMITX_I2S_FORMATS \ + (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ + SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S24_LE | \ +- SNDRV_PCM_FMTBIT_S32_LE) ++ SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE) + + #define TOHDMITX_STREAM(xname, xsuffix, xfmt, xchmax) \ + { \ +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0047-FROMGIT-net-stmmac-dwmac-meson8b-use-FIELD_PREP-inst.patch b/projects/Amlogic/patches/linux/amlogic-0047-FROMGIT-net-stmmac-dwmac-meson8b-use-FIELD_PREP-inst.patch deleted file mode 100644 index d7e4818effd..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0047-FROMGIT-net-stmmac-dwmac-meson8b-use-FIELD_PREP-inst.patch +++ /dev/null @@ -1,49 +0,0 @@ -From a2278fbac0d217cb4d3ffa332d50d292f2b1c449 Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 1 Jun 2020 08:58:55 +0000 -Subject: [PATCH 047/156] FROMGIT: net: stmmac: dwmac-meson8b: use FIELD_PREP - instead of open-coding it - -Use FIELD_PREP() to shift a value to the correct offset based on a -bitmask instead of open-coding the logic. -No functional changes. - -Reviewed-by: Andrew Lunn -Signed-off-by: Martin Blumenstingl ---- - drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -index a3934ca6a043..c9ec0cb68082 100644 ---- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -@@ -5,6 +5,7 @@ - * Copyright (C) 2016 Martin Blumenstingl - */ - -+#include - #include - #include - #include -@@ -32,7 +33,6 @@ - #define PRG_ETH0_CLK_M250_SEL_SHIFT 4 - #define PRG_ETH0_CLK_M250_SEL_MASK GENMASK(4, 4) - --#define PRG_ETH0_TXDLY_SHIFT 5 - #define PRG_ETH0_TXDLY_MASK GENMASK(6, 5) - - /* divider for the result of m250_sel */ -@@ -262,7 +262,8 @@ static int meson8b_init_prg_eth(struct meson8b_dwmac *dwmac) - PRG_ETH0_INVERTED_RMII_CLK, 0); - - meson8b_dwmac_mask_bits(dwmac, PRG_ETH0, PRG_ETH0_TXDLY_MASK, -- tx_dly_val << PRG_ETH0_TXDLY_SHIFT); -+ FIELD_PREP(PRG_ETH0_TXDLY_MASK, -+ tx_dly_val)); - - /* Configure the 125MHz RGMII TX clock, the IP block changes - * the output automatically (= without us having to configure --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0047-WIP-ASoC-hdmi-codec-reorder-channel-allocation-list.patch b/projects/Amlogic/patches/linux/amlogic-0047-WIP-ASoC-hdmi-codec-reorder-channel-allocation-list.patch new file mode 100644 index 00000000000..3234fa9356e --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0047-WIP-ASoC-hdmi-codec-reorder-channel-allocation-list.patch @@ -0,0 +1,202 @@ +From 6e623ead537a5b94302b52a80063e1996f46a299 Mon Sep 17 00:00:00 2001 +From: Jonas Karlman +Date: Sun, 23 Dec 2018 02:24:38 +0100 +Subject: [PATCH 47/79] WIP: ASoC: hdmi-codec: reorder channel allocation list + +Wrong channel allocation is selected by hdmi_codec_get_ch_alloc_table_idx(). + +E.g when ELD reports FL|FR|LFE|FC|RL|RR or FL|FR|LFE|FC|RL|RR|RC|RLC|RRC + +ca_id 0x01 with speaker mask FL|FR|LFE gets selected instead of +ca_id 0x03 with speaker mask FL|FR|LFE|FC for 4 channels + +and + +ca_id 0x04 with speaker mask FL|FR|RC gets selected instead of +ca_id 0x0b with speaker mask FL|FR|LFE|FC|RL|RR for 6 channels + +Fix this by reorder the channel allocation list with +most specific speaker mask at the top. + +Signed-off-by: Jonas Karlman +--- + sound/soc/codecs/hdmi-codec.c | 140 +++++++++++++++++++--------------- + 1 file changed, 77 insertions(+), 63 deletions(-) + +diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c +index 0f32c81b5ea3..e7d9cc50a50b 100644 +--- a/sound/soc/codecs/hdmi-codec.c ++++ b/sound/soc/codecs/hdmi-codec.c +@@ -189,84 +189,97 @@ static const struct snd_pcm_chmap_elem hdmi_codec_8ch_chmaps[] = { + /* + * hdmi_codec_channel_alloc: speaker configuration available for CEA + * +- * This is an ordered list that must match with hdmi_codec_8ch_chmaps struct ++ * This is an ordered list where ca_id must exist in hdmi_codec_8ch_chmaps + * The preceding ones have better chances to be selected by + * hdmi_codec_get_ch_alloc_table_idx(). + */ + static const struct hdmi_codec_cea_spk_alloc hdmi_codec_channel_alloc[] = { + { .ca_id = 0x00, .n_ch = 2, +- .mask = FL | FR}, +- /* 2.1 */ +- { .ca_id = 0x01, .n_ch = 4, +- .mask = FL | FR | LFE}, +- /* Dolby Surround */ ++ .mask = FL | FR }, ++ { .ca_id = 0x03, .n_ch = 4, ++ .mask = FL | FR | LFE | FC }, + { .ca_id = 0x02, .n_ch = 4, + .mask = FL | FR | FC }, +- /* surround51 */ ++ { .ca_id = 0x01, .n_ch = 4, ++ .mask = FL | FR | LFE }, + { .ca_id = 0x0b, .n_ch = 6, +- .mask = FL | FR | LFE | FC | RL | RR}, +- /* surround40 */ +- { .ca_id = 0x08, .n_ch = 6, +- .mask = FL | FR | RL | RR }, +- /* surround41 */ +- { .ca_id = 0x09, .n_ch = 6, +- .mask = FL | FR | LFE | RL | RR }, +- /* surround50 */ ++ .mask = FL | FR | LFE | FC | RL | RR }, + { .ca_id = 0x0a, .n_ch = 6, + .mask = FL | FR | FC | RL | RR }, +- /* 6.1 */ +- { .ca_id = 0x0f, .n_ch = 8, +- .mask = FL | FR | LFE | FC | RL | RR | RC }, +- /* surround71 */ ++ { .ca_id = 0x09, .n_ch = 6, ++ .mask = FL | FR | LFE | RL | RR }, ++ { .ca_id = 0x08, .n_ch = 6, ++ .mask = FL | FR | RL | RR }, ++ { .ca_id = 0x07, .n_ch = 6, ++ .mask = FL | FR | LFE | FC | RC }, ++ { .ca_id = 0x06, .n_ch = 6, ++ .mask = FL | FR | FC | RC }, ++ { .ca_id = 0x05, .n_ch = 6, ++ .mask = FL | FR | LFE | RC }, ++ { .ca_id = 0x04, .n_ch = 6, ++ .mask = FL | FR | RC }, + { .ca_id = 0x13, .n_ch = 8, + .mask = FL | FR | LFE | FC | RL | RR | RLC | RRC }, +- /* others */ +- { .ca_id = 0x03, .n_ch = 8, +- .mask = FL | FR | LFE | FC }, +- { .ca_id = 0x04, .n_ch = 8, +- .mask = FL | FR | RC}, +- { .ca_id = 0x05, .n_ch = 8, +- .mask = FL | FR | LFE | RC }, +- { .ca_id = 0x06, .n_ch = 8, +- .mask = FL | FR | FC | RC }, +- { .ca_id = 0x07, .n_ch = 8, +- .mask = FL | FR | LFE | FC | RC }, +- { .ca_id = 0x0c, .n_ch = 8, +- .mask = FL | FR | RC | RL | RR }, +- { .ca_id = 0x0d, .n_ch = 8, +- .mask = FL | FR | LFE | RL | RR | RC }, +- { .ca_id = 0x0e, .n_ch = 8, +- .mask = FL | FR | FC | RL | RR | RC }, +- { .ca_id = 0x10, .n_ch = 8, +- .mask = FL | FR | RL | RR | RLC | RRC }, +- { .ca_id = 0x11, .n_ch = 8, +- .mask = FL | FR | LFE | RL | RR | RLC | RRC }, ++ { .ca_id = 0x1f, .n_ch = 8, ++ .mask = FL | FR | LFE | FC | RL | RR | FLC | FRC }, + { .ca_id = 0x12, .n_ch = 8, + .mask = FL | FR | FC | RL | RR | RLC | RRC }, +- { .ca_id = 0x14, .n_ch = 8, +- .mask = FL | FR | FLC | FRC }, +- { .ca_id = 0x15, .n_ch = 8, +- .mask = FL | FR | LFE | FLC | FRC }, +- { .ca_id = 0x16, .n_ch = 8, +- .mask = FL | FR | FC | FLC | FRC }, +- { .ca_id = 0x17, .n_ch = 8, +- .mask = FL | FR | LFE | FC | FLC | FRC }, +- { .ca_id = 0x18, .n_ch = 8, +- .mask = FL | FR | RC | FLC | FRC }, +- { .ca_id = 0x19, .n_ch = 8, +- .mask = FL | FR | LFE | RC | FLC | FRC }, +- { .ca_id = 0x1a, .n_ch = 8, +- .mask = FL | FR | RC | FC | FLC | FRC }, +- { .ca_id = 0x1b, .n_ch = 8, +- .mask = FL | FR | LFE | RC | FC | FLC | FRC }, +- { .ca_id = 0x1c, .n_ch = 8, +- .mask = FL | FR | RL | RR | FLC | FRC }, +- { .ca_id = 0x1d, .n_ch = 8, +- .mask = FL | FR | LFE | RL | RR | FLC | FRC }, + { .ca_id = 0x1e, .n_ch = 8, + .mask = FL | FR | FC | RL | RR | FLC | FRC }, +- { .ca_id = 0x1f, .n_ch = 8, +- .mask = FL | FR | LFE | FC | RL | RR | FLC | FRC }, ++ { .ca_id = 0x11, .n_ch = 8, ++ .mask = FL | FR | LFE | RL | RR | RLC | RRC }, ++ { .ca_id = 0x1d, .n_ch = 8, ++ .mask = FL | FR | LFE | RL | RR | FLC | FRC }, ++ { .ca_id = 0x10, .n_ch = 8, ++ .mask = FL | FR | RL | RR | RLC | RRC }, ++ { .ca_id = 0x1c, .n_ch = 8, ++ .mask = FL | FR | RL | RR | FLC | FRC }, ++ { .ca_id = 0x0f, .n_ch = 8, ++ .mask = FL | FR | LFE | FC | RL | RR | RC }, ++ { .ca_id = 0x1b, .n_ch = 8, ++ .mask = FL | FR | LFE | RC | FC | FLC | FRC }, ++ { .ca_id = 0x0e, .n_ch = 8, ++ .mask = FL | FR | FC | RL | RR | RC }, ++ { .ca_id = 0x1a, .n_ch = 8, ++ .mask = FL | FR | RC | FC | FLC | FRC }, ++ { .ca_id = 0x0d, .n_ch = 8, ++ .mask = FL | FR | LFE | RL | RR | RC }, ++ { .ca_id = 0x19, .n_ch = 8, ++ .mask = FL | FR | LFE | RC | FLC | FRC }, ++ { .ca_id = 0x0c, .n_ch = 8, ++ .mask = FL | FR | RC | RL | RR }, ++ { .ca_id = 0x18, .n_ch = 8, ++ .mask = FL | FR | RC | FLC | FRC }, ++ { .ca_id = 0x17, .n_ch = 8, ++ .mask = FL | FR | LFE | FC | FLC | FRC }, ++ { .ca_id = 0x16, .n_ch = 8, ++ .mask = FL | FR | FC | FLC | FRC }, ++ { .ca_id = 0x15, .n_ch = 8, ++ .mask = FL | FR | LFE | FLC | FRC }, ++ { .ca_id = 0x14, .n_ch = 8, ++ .mask = FL | FR | FLC | FRC }, ++ { .ca_id = 0x0b, .n_ch = 8, ++ .mask = FL | FR | LFE | FC | RL | RR }, ++ { .ca_id = 0x0a, .n_ch = 8, ++ .mask = FL | FR | FC | RL | RR }, ++ { .ca_id = 0x09, .n_ch = 8, ++ .mask = FL | FR | LFE | RL | RR }, ++ { .ca_id = 0x08, .n_ch = 8, ++ .mask = FL | FR | RL | RR }, ++ { .ca_id = 0x07, .n_ch = 8, ++ .mask = FL | FR | LFE | FC | RC }, ++ { .ca_id = 0x06, .n_ch = 8, ++ .mask = FL | FR | FC | RC }, ++ { .ca_id = 0x05, .n_ch = 8, ++ .mask = FL | FR | LFE | RC }, ++ { .ca_id = 0x04, .n_ch = 8, ++ .mask = FL | FR | RC }, ++ { .ca_id = 0x03, .n_ch = 8, ++ .mask = FL | FR | LFE | FC }, ++ { .ca_id = 0x02, .n_ch = 8, ++ .mask = FL | FR | FC }, ++ { .ca_id = 0x01, .n_ch = 8, ++ .mask = FL | FR | LFE }, + }; + + struct hdmi_codec_priv { +@@ -374,7 +387,8 @@ static int hdmi_codec_chmap_ctl_get(struct snd_kcontrol *kcontrol, + struct snd_pcm_chmap *info = snd_kcontrol_chip(kcontrol); + struct hdmi_codec_priv *hcp = info->private_data; + +- map = info->chmap[hcp->chmap_idx].map; ++ if (hcp->chmap_idx != HDMI_CODEC_CHMAP_IDX_UNKNOWN) ++ map = info->chmap[hcp->chmap_idx].map; + + for (i = 0; i < info->max_channels; i++) { + if (hcp->chmap_idx == HDMI_CODEC_CHMAP_IDX_UNKNOWN) +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0048-FROMGIT-net-stmmac-dwmac-meson8b-Move-the-documentat.patch b/projects/Amlogic/patches/linux/amlogic-0048-FROMGIT-net-stmmac-dwmac-meson8b-Move-the-documentat.patch deleted file mode 100644 index 7451d294244..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0048-FROMGIT-net-stmmac-dwmac-meson8b-Move-the-documentat.patch +++ /dev/null @@ -1,46 +0,0 @@ -From e3c7eb63ec72c9bf036cdcd32f976a4eaa0c173b Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 1 Jun 2020 08:59:38 +0000 -Subject: [PATCH 048/156] FROMGIT: net: stmmac: dwmac-meson8b: Move the - documentation for the TX delay - -Move the documentation for the TX delay above the PRG_ETH0_TXDLY_MASK -definition. Future commits will add more registers also with -documentation above their register bit definitions. Move the existing -comment so it will be consistent with the upcoming changes. - -Reviewed-by: Andrew Lunn -Signed-off-by: Martin Blumenstingl ---- - drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -index c9ec0cb68082..1d7526ee09dd 100644 ---- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -@@ -33,6 +33,10 @@ - #define PRG_ETH0_CLK_M250_SEL_SHIFT 4 - #define PRG_ETH0_CLK_M250_SEL_MASK GENMASK(4, 4) - -+/* TX clock delay in ns = "8ns / 4 * tx_dly_val" (where 8ns are exactly one -+ * cycle of the 125MHz RGMII TX clock): -+ * 0ns = 0x0, 2ns = 0x1, 4ns = 0x2, 6ns = 0x3 -+ */ - #define PRG_ETH0_TXDLY_MASK GENMASK(6, 5) - - /* divider for the result of m250_sel */ -@@ -248,10 +252,6 @@ static int meson8b_init_prg_eth(struct meson8b_dwmac *dwmac) - switch (dwmac->phy_mode) { - case PHY_INTERFACE_MODE_RGMII: - case PHY_INTERFACE_MODE_RGMII_RXID: -- /* TX clock delay in ns = "8ns / 4 * tx_dly_val" (where -- * 8ns are exactly one cycle of the 125MHz RGMII TX clock): -- * 0ns = 0x0, 2ns = 0x1, 4ns = 0x2, 6ns = 0x3 -- */ - tx_dly_val = dwmac->tx_delay_ns >> 1; - /* fall through */ - --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0048-WIP-ASoC-meson-aiu-encoder-spdif-implement-the-.mute.patch b/projects/Amlogic/patches/linux/amlogic-0048-WIP-ASoC-meson-aiu-encoder-spdif-implement-the-.mute.patch new file mode 100644 index 00000000000..7e09b7a0462 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0048-WIP-ASoC-meson-aiu-encoder-spdif-implement-the-.mute.patch @@ -0,0 +1,60 @@ +From 2bd2fe6712c01e580ba2db2ee33a479594dd5cf8 Mon Sep 17 00:00:00 2001 +From: Martin Blumenstingl +Date: Wed, 23 Dec 2020 02:45:27 +0100 +Subject: [PATCH 48/79] WIP: ASoC: meson: aiu: encoder-spdif: implement the + .mute_stream callback + +Implement the .mute_stream callback based on code from the vendor +driver. + +Signed-off-by: Martin Blumenstingl +--- + sound/soc/meson/aiu-encoder-spdif.c | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +diff --git a/sound/soc/meson/aiu-encoder-spdif.c b/sound/soc/meson/aiu-encoder-spdif.c +index de850913975f..5c42a784cee4 100644 +--- a/sound/soc/meson/aiu-encoder-spdif.c ++++ b/sound/soc/meson/aiu-encoder-spdif.c +@@ -19,6 +19,8 @@ + #define AIU_958_MISC_U_FROM_STREAM BIT(12) + #define AIU_958_MISC_FORCE_LR BIT(13) + #define AIU_958_CTRL_HOLD_EN BIT(0) ++#define AIU_958_CTRL_MUTE_RIGHT_SPEAKER BIT(3) ++#define AIU_958_CTRL_MUTE_LEFT_SPEAKER BIT(4) + #define AIU_CLK_CTRL_958_DIV_EN BIT(1) + #define AIU_CLK_CTRL_958_DIV GENMASK(5, 4) + #define AIU_CLK_CTRL_958_DIV_MORE BIT(12) +@@ -200,10 +202,29 @@ static void aiu_encoder_spdif_shutdown(struct snd_pcm_substream *substream, + clk_bulk_disable_unprepare(aiu->spdif.clk_num, aiu->spdif.clks); + } + ++static int aiu_encoder_spdif_mute_stream(struct snd_soc_dai *dai, int mute, ++ int stream) ++{ ++ struct snd_soc_component *component = dai->component; ++ u32 value = 0; ++ ++ if (mute) ++ value = AIU_958_CTRL_MUTE_RIGHT_SPEAKER | ++ AIU_958_CTRL_MUTE_LEFT_SPEAKER; ++ ++ snd_soc_component_update_bits(component, AIU_958_CTRL, ++ AIU_958_CTRL_MUTE_RIGHT_SPEAKER | ++ AIU_958_CTRL_MUTE_LEFT_SPEAKER, ++ value); ++ ++ return 0; ++} ++ + const struct snd_soc_dai_ops aiu_encoder_spdif_dai_ops = { + .trigger = aiu_encoder_spdif_trigger, + .hw_params = aiu_encoder_spdif_hw_params, + .hw_free = aiu_encoder_spdif_hw_free, + .startup = aiu_encoder_spdif_startup, + .shutdown = aiu_encoder_spdif_shutdown, ++ .mute_stream = aiu_encoder_spdif_mute_stream, + }; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0049-FROMGIT-net-stmmac-dwmac-meson8b-Add-the-PRG_ETH0_AD.patch b/projects/Amlogic/patches/linux/amlogic-0049-FROMGIT-net-stmmac-dwmac-meson8b-Add-the-PRG_ETH0_AD.patch deleted file mode 100644 index a3001fb380e..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0049-FROMGIT-net-stmmac-dwmac-meson8b-Add-the-PRG_ETH0_AD.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 6e6362ce945ff5e7b262caa9395be0b1a0351464 Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 1 Jun 2020 09:00:36 +0000 -Subject: [PATCH 049/156] FROMGIT: net: stmmac: dwmac-meson8b: Add the - PRG_ETH0_ADJ_* bits - -The PRG_ETH0_ADJ_* are used for applying the RGMII RX delay. The public -datasheets only have very limited description for these registers, but -Jianxin Pan provided more detailed documentation from an (unnamed) -Amlogic engineer. Add the PRG_ETH0_ADJ_* bits along with the improved -description. - -Suggested-by: Jianxin Pan -Reviewed-by: Andrew Lunn -Signed-off-by: Martin Blumenstingl ---- - .../ethernet/stmicro/stmmac/dwmac-meson8b.c | 21 +++++++++++++++++++ - 1 file changed, 21 insertions(+) - -diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -index 1d7526ee09dd..70075628c58e 100644 ---- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -@@ -48,6 +48,27 @@ - #define PRG_ETH0_INVERTED_RMII_CLK BIT(11) - #define PRG_ETH0_TX_AND_PHY_REF_CLK BIT(12) - -+/* Bypass (= 0, the signal from the GPIO input directly connects to the -+ * internal sampling) or enable (= 1) the internal logic for RXEN and RXD[3:0] -+ * timing tuning. -+ */ -+#define PRG_ETH0_ADJ_ENABLE BIT(13) -+/* Controls whether the RXEN and RXD[3:0] signals should be aligned with the -+ * input RX rising/falling edge and sent to the Ethernet internals. This sets -+ * the automatically delay and skew automatically (internally). -+ */ -+#define PRG_ETH0_ADJ_SETUP BIT(14) -+/* An internal counter based on the "timing-adjustment" clock. The counter is -+ * cleared on both, the falling and rising edge of the RX_CLK. This selects the -+ * delay (= the counter value) when to start sampling RXEN and RXD[3:0]. -+ */ -+#define PRG_ETH0_ADJ_DELAY GENMASK(19, 15) -+/* Adjusts the skew between each bit of RXEN and RXD[3:0]. If a signal has a -+ * large input delay, the bit for that signal (RXEN = bit 0, RXD[3] = bit 1, -+ * ...) can be configured to be 1 to compensate for a delay of about 1ns. -+ */ -+#define PRG_ETH0_ADJ_SKEW GENMASK(24, 20) -+ - #define MUX_CLK_NUM_PARENTS 2 - - struct meson8b_dwmac; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0049-WIP-ASoC-meson-aiu-encoder-i2s-implement-the-.mute_s.patch b/projects/Amlogic/patches/linux/amlogic-0049-WIP-ASoC-meson-aiu-encoder-i2s-implement-the-.mute_s.patch new file mode 100644 index 00000000000..94327240cbe --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0049-WIP-ASoC-meson-aiu-encoder-i2s-implement-the-.mute_s.patch @@ -0,0 +1,69 @@ +From 9d17f788c4cd42773dbcbd5bda46d78f761bb138 Mon Sep 17 00:00:00 2001 +From: Martin Blumenstingl +Date: Wed, 23 Dec 2020 02:46:54 +0100 +Subject: [PATCH 49/79] WIP: ASoC: meson: aiu: encoder-i2s: implement the + .mute_stream callback + +Implement the .mute_stream callback based on the code from the vendor +driver. + +Signed-off-by: Martin Blumenstingl +--- + sound/soc/meson/aiu-encoder-i2s.c | 15 +++++++++++++++ + sound/soc/meson/aiu.h | 1 + + 2 files changed, 16 insertions(+) + +diff --git a/sound/soc/meson/aiu-encoder-i2s.c b/sound/soc/meson/aiu-encoder-i2s.c +index 932224552146..d6aea7797641 100644 +--- a/sound/soc/meson/aiu-encoder-i2s.c ++++ b/sound/soc/meson/aiu-encoder-i2s.c +@@ -28,6 +28,8 @@ + #define AIU_CLK_CTRL_MORE_I2S_DIV GENMASK(5, 0) + #define AIU_CODEC_DAC_LRCLK_CTRL_DIV GENMASK(11, 0) + ++#define AIU_I2S_MUTE_SWAP_MUTE GENMASK(15, 8) ++ + static void aiu_encoder_i2s_divider_enable(struct snd_soc_component *component, + bool enable) + { +@@ -352,6 +354,18 @@ static void aiu_encoder_i2s_shutdown(struct snd_pcm_substream *substream, + clk_bulk_disable_unprepare(aiu->i2s.clk_num, aiu->i2s.clks); + } + ++static int aiu_encoder_i2s_mute_stream(struct snd_soc_dai *dai, int mute, ++ int stream) ++{ ++ struct snd_soc_component *component = dai->component; ++ ++ snd_soc_component_update_bits(component, AIU_I2S_MUTE_SWAP, ++ AIU_I2S_MUTE_SWAP_MUTE, ++ mute ? AIU_I2S_MUTE_SWAP_MUTE : 0); ++ ++ return 0; ++} ++ + const struct snd_soc_dai_ops aiu_encoder_i2s_dai_ops = { + .trigger = aiu_encoder_i2s_trigger, + .hw_params = aiu_encoder_i2s_hw_params, +@@ -360,5 +374,6 @@ const struct snd_soc_dai_ops aiu_encoder_i2s_dai_ops = { + .set_sysclk = aiu_encoder_i2s_set_sysclk, + .startup = aiu_encoder_i2s_startup, + .shutdown = aiu_encoder_i2s_shutdown, ++ .mute_stream = aiu_encoder_i2s_mute_stream, + }; + +diff --git a/sound/soc/meson/aiu.h b/sound/soc/meson/aiu.h +index a52169d4ae9d..fbf6f88a41be 100644 +--- a/sound/soc/meson/aiu.h ++++ b/sound/soc/meson/aiu.h +@@ -67,6 +67,7 @@ extern const struct snd_soc_dai_ops aiu_encoder_spdif_dai_ops; + #define AIU_958_CHSTAT_L0 0x020 + #define AIU_958_CHSTAT_L1 0x024 + #define AIU_958_CTRL 0x028 ++#define AIU_I2S_MUTE_SWAP 0x030 + #define AIU_I2S_SOURCE_DESC 0x034 + #define AIU_I2S_DAC_CFG 0x040 + #define AIU_I2S_SYNC 0x044 +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0050-FROMGIT-net-stmmac-dwmac-meson8b-Fetch-the-timing-ad.patch b/projects/Amlogic/patches/linux/amlogic-0050-FROMGIT-net-stmmac-dwmac-meson8b-Fetch-the-timing-ad.patch deleted file mode 100644 index 47e5dd0fc71..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0050-FROMGIT-net-stmmac-dwmac-meson8b-Fetch-the-timing-ad.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 34bcda9f7dec6e7c54e486479e50e1455fe6f7ac Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 1 Jun 2020 09:01:24 +0000 -Subject: [PATCH 050/156] FROMGIT: net: stmmac: dwmac-meson8b: Fetch the - "timing-adjustment" clock - -The PRG_ETHERNET registers have a built-in timing adjustment circuit -which can provide the RX delay in RGMII mode. This is driven by an -external (to this IP, but internal to the SoC) clock input. Fetch this -clock as optional (even though it's there on all supported SoCs) since -we just learned about it and existing .dtbs don't specify it. - -Reviewed-by: Andrew Lunn -Signed-off-by: Martin Blumenstingl ---- - drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -index 70075628c58e..41f3ef6bea66 100644 ---- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -@@ -85,6 +85,7 @@ struct meson8b_dwmac { - phy_interface_t phy_mode; - struct clk *rgmii_tx_clk; - u32 tx_delay_ns; -+ struct clk *timing_adj_clk; - }; - - struct meson8b_dwmac_clk_configs { -@@ -380,6 +381,13 @@ static int meson8b_dwmac_probe(struct platform_device *pdev) - &dwmac->tx_delay_ns)) - dwmac->tx_delay_ns = 2; - -+ dwmac->timing_adj_clk = devm_clk_get_optional(dwmac->dev, -+ "timing-adjustment"); -+ if (IS_ERR(dwmac->timing_adj_clk)) { -+ ret = PTR_ERR(dwmac->timing_adj_clk); -+ goto err_remove_config_dt; -+ } -+ - ret = meson8b_init_rgmii_tx_clk(dwmac); - if (ret) - goto err_remove_config_dt; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0122-WIP-arm64-dts-meson-add-common-SM1-ac2xx-dtsi.patch b/projects/Amlogic/patches/linux/amlogic-0050-arm64-dts-meson-add-common-SM1-ac2xx-dtsi.patch similarity index 78% rename from projects/Amlogic/patches/linux/amlogic-0122-WIP-arm64-dts-meson-add-common-SM1-ac2xx-dtsi.patch rename to projects/Amlogic/patches/linux/amlogic-0050-arm64-dts-meson-add-common-SM1-ac2xx-dtsi.patch index 3d89c8578d6..0ed0d7267e2 100644 --- a/projects/Amlogic/patches/linux/amlogic-0122-WIP-arm64-dts-meson-add-common-SM1-ac2xx-dtsi.patch +++ b/projects/Amlogic/patches/linux/amlogic-0050-arm64-dts-meson-add-common-SM1-ac2xx-dtsi.patch @@ -1,7 +1,7 @@ -From 4ffc710a4c5f6c9a5f16577daeb206015b8b69e5 Mon Sep 17 00:00:00 2001 +From 12638bcb1388efa54e3a32b13162f3986d4375b3 Mon Sep 17 00:00:00 2001 From: Christian Hewitt Date: Wed, 24 Jun 2020 12:41:46 +0000 -Subject: [PATCH 122/156] WIP: arm64: dts: meson: add common SM1 ac2xx dtsi +Subject: [PATCH 50/79] arm64: dts: meson: add common SM1 ac2xx dtsi Add a common dtsi for Android STB devices based on the Amlogic S905X3 (AC213/AC214) and S905D3 (AC201/AC202) reference designs. The dtsi is @@ -22,16 +22,16 @@ Ethernet PHY spec for their device, e.g. Signed-off-by: Christian Hewitt --- - .../boot/dts/amlogic/meson-sm1-ac2xx.dtsi | 374 ++++++++++++++++++ - 1 file changed, 374 insertions(+) + .../boot/dts/amlogic/meson-sm1-ac2xx.dtsi | 285 ++++++++++++++++++ + 1 file changed, 285 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-ac2xx.dtsi diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-ac2xx.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1-ac2xx.dtsi new file mode 100644 -index 000000000000..b37c37320bef +index 000000000000..4b0439007251 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-ac2xx.dtsi -@@ -0,0 +1,374 @@ +@@ -0,0 +1,285 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 BayLibre SAS. All rights reserved. @@ -46,7 +46,6 @@ index 000000000000..b37c37320bef +#include +#include +#include -+#include + +/ { + aliases { @@ -149,61 +148,6 @@ index 000000000000..b37c37320bef + clock-names = "ext_clock"; + }; + -+ sound { -+ compatible = "amlogic,axg-sound-card"; -+ model = "SM1-X96-AIR"; -+ audio-aux-devs = <&tdmout_b>; -+ audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", -+ "TDMOUT_B IN 1", "FRDDR_B OUT 1", -+ "TDMOUT_B IN 2", "FRDDR_C OUT 1", -+ "TDM_B Playback", "TDMOUT_B OUT"; -+ -+ assigned-clocks = <&clkc CLKID_MPLL2>, -+ <&clkc CLKID_MPLL0>, -+ <&clkc CLKID_MPLL1>; -+ assigned-clock-parents = <0>, <0>, <0>; -+ assigned-clock-rates = <294912000>, -+ <270950400>, -+ <393216000>; -+ status = "okay"; -+ -+ dai-link-0 { -+ sound-dai = <&frddr_a>; -+ }; -+ -+ dai-link-1 { -+ sound-dai = <&frddr_b>; -+ }; -+ -+ dai-link-2 { -+ sound-dai = <&frddr_c>; -+ }; -+ -+ /* 8ch hdmi interface */ -+ dai-link-3 { -+ sound-dai = <&tdmif_b>; -+ dai-format = "i2s"; -+ dai-tdm-slot-tx-mask-0 = <1 1>; -+ dai-tdm-slot-tx-mask-1 = <1 1>; -+ dai-tdm-slot-tx-mask-2 = <1 1>; -+ dai-tdm-slot-tx-mask-3 = <1 1>; -+ mclk-fs = <256>; -+ -+ codec { -+ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; -+ }; -+ }; -+ -+ /* hdmi glue */ -+ dai-link-4 { -+ sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; -+ -+ codec { -+ sound-dai = <&hdmi_tx>; -+ }; -+ }; -+ }; -+ + wifi32k: wifi32k { + compatible = "pwm-clock"; + #clock-cells = <0>; @@ -212,10 +156,6 @@ index 000000000000..b37c37320bef + }; +}; + -+&arb { -+ status = "okay"; -+}; -+ +&cec_AO { + pinctrl-0 = <&cec_ao_a_h_pins>; + pinctrl-names = "default"; @@ -230,10 +170,6 @@ index 000000000000..b37c37320bef + hdmi-phandle = <&hdmi_tx>; +}; + -+&clkc_audio { -+ status = "okay"; -+}; -+ +&cpu0 { + cpu-supply = <&vddcpu>; + operating-points-v2 = <&cpu_opp_table>; @@ -262,18 +198,6 @@ index 000000000000..b37c37320bef + clock-latency = <50000>; +}; + -+&frddr_a { -+ status = "okay"; -+}; -+ -+&frddr_b { -+ status = "okay"; -+}; -+ -+&frddr_c { -+ status = "okay"; -+}; -+ +&hdmi_tx { + status = "okay"; + pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>; @@ -290,7 +214,6 @@ index 000000000000..b37c37320bef + status = "okay"; + pinctrl-0 = <&remote_input_ao_pins>; + pinctrl-names = "default"; -+ linux,rc-map-name = "rc-x96max"; +}; + +&pwm_AO_ab { @@ -322,6 +245,7 @@ index 000000000000..b37c37320bef + vref-supply = <&vddio_ao1v8>; +}; + ++/* SDIO */ +&sd_emmc_a { + status = "okay"; + pinctrl-0 = <&sdio_pins>; @@ -332,7 +256,6 @@ index 000000000000..b37c37320bef + + bus-width = <4>; + cap-sd-highspeed; -+ sd-uhs-sdr50; + max-frequency = <100000000>; + + non-removable; @@ -384,18 +307,6 @@ index 000000000000..b37c37320bef + vqmmc-supply = <&emmc_1v8>; +}; + -+&tdmif_b { -+ status = "okay"; -+}; -+ -+&tdmout_b { -+ status = "okay"; -+}; -+ -+&tohdmitx { -+ status = "okay"; -+}; -+ +&uart_AO { + status = "okay"; + pinctrl-0 = <&uart_ao_a_pins>; diff --git a/projects/Amlogic/patches/linux/amlogic-0051-FROMGIT-net-stmmac-dwmac-meson8b-Make-the-clock-enab.patch b/projects/Amlogic/patches/linux/amlogic-0051-FROMGIT-net-stmmac-dwmac-meson8b-Make-the-clock-enab.patch deleted file mode 100644 index b3b5316ba47..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0051-FROMGIT-net-stmmac-dwmac-meson8b-Make-the-clock-enab.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 51838b40f55661f08fe154abb1e15d08bded2321 Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 1 Jun 2020 09:02:19 +0000 -Subject: [PATCH 051/156] FROMGIT: net: stmmac: dwmac-meson8b: Make the clock - enabling code re-usable - -The timing adjustment clock will need similar logic as the RGMII clock: -It has to be enabled in the driver conditionally and when the driver is -unloaded it should be disabled again. Extract the existing code for the -RGMII clock into a new function so it can be re-used. - -Reviewed-by: Andrew Lunn -Signed-off-by: Martin Blumenstingl ---- - .../ethernet/stmicro/stmmac/dwmac-meson8b.c | 23 +++++++++++++++---- - 1 file changed, 18 insertions(+), 5 deletions(-) - -diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -index 41f3ef6bea66..d31f79c455de 100644 ---- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -@@ -266,6 +266,22 @@ static int meson_axg_set_phy_mode(struct meson8b_dwmac *dwmac) - return 0; - } - -+static int meson8b_devm_clk_prepare_enable(struct meson8b_dwmac *dwmac, -+ struct clk *clk) -+{ -+ int ret; -+ -+ ret = clk_prepare_enable(clk); -+ if (ret) -+ return ret; -+ -+ devm_add_action_or_reset(dwmac->dev, -+ (void(*)(void *))clk_disable_unprepare, -+ dwmac->rgmii_tx_clk); -+ -+ return 0; -+} -+ - static int meson8b_init_prg_eth(struct meson8b_dwmac *dwmac) - { - int ret; -@@ -299,16 +315,13 @@ static int meson8b_init_prg_eth(struct meson8b_dwmac *dwmac) - return ret; - } - -- ret = clk_prepare_enable(dwmac->rgmii_tx_clk); -+ ret = meson8b_devm_clk_prepare_enable(dwmac, -+ dwmac->rgmii_tx_clk); - if (ret) { - dev_err(dwmac->dev, - "failed to enable the RGMII TX clock\n"); - return ret; - } -- -- devm_add_action_or_reset(dwmac->dev, -- (void(*)(void *))clk_disable_unprepare, -- dwmac->rgmii_tx_clk); - break; - - case PHY_INTERFACE_MODE_RMII: --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0123-WIP-dt-bindings-arm-amlogic-add-X96-AIR-bindings.patch b/projects/Amlogic/patches/linux/amlogic-0051-dt-bindings-arm-amlogic-add-X96-AIR-bindings.patch similarity index 84% rename from projects/Amlogic/patches/linux/amlogic-0123-WIP-dt-bindings-arm-amlogic-add-X96-AIR-bindings.patch rename to projects/Amlogic/patches/linux/amlogic-0051-dt-bindings-arm-amlogic-add-X96-AIR-bindings.patch index d465aed0145..cf57c744f3f 100644 --- a/projects/Amlogic/patches/linux/amlogic-0123-WIP-dt-bindings-arm-amlogic-add-X96-AIR-bindings.patch +++ b/projects/Amlogic/patches/linux/amlogic-0051-dt-bindings-arm-amlogic-add-X96-AIR-bindings.patch @@ -1,7 +1,7 @@ -From afd970bc383dec7122aad57bb493fe947fe3ee90 Mon Sep 17 00:00:00 2001 +From c8f3a392d540e454c57b8faf8ee69acab7b382e5 Mon Sep 17 00:00:00 2001 From: Christian Hewitt Date: Mon, 18 May 2020 23:23:40 +0000 -Subject: [PATCH 123/156] WIP: dt-bindings: arm: amlogic: add X96-AIR bindings +Subject: [PATCH 51/79] dt-bindings: arm: amlogic: add X96-AIR bindings Add the board bindings for the Amediatech X96-AIR STB which ships in two variants distinguished by RAM size which corresponds to internal @@ -13,10 +13,10 @@ Signed-off-by: Christian Hewitt 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml -index 46cb6359f530..d0bb581ee9ee 100644 +index 6bef60ddda64..52db715359ed 100644 --- a/Documentation/devicetree/bindings/arm/amlogic.yaml +++ b/Documentation/devicetree/bindings/arm/amlogic.yaml -@@ -162,9 +162,11 @@ properties: +@@ -164,9 +164,11 @@ properties: - description: Boards with the Amlogic Meson SM1 S905X3/D3/Y3 SoC items: - enum: diff --git a/projects/Amlogic/patches/linux/amlogic-0052-FROMGIT-net-stmmac-dwmac-meson8b-add-support-for-the.patch b/projects/Amlogic/patches/linux/amlogic-0052-FROMGIT-net-stmmac-dwmac-meson8b-add-support-for-the.patch deleted file mode 100644 index 3d1a706ae43..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0052-FROMGIT-net-stmmac-dwmac-meson8b-add-support-for-the.patch +++ /dev/null @@ -1,172 +0,0 @@ -From b47c43c29c9b052e541b94afcbf1925c87d1a3a6 Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 1 Jun 2020 09:03:26 +0000 -Subject: [PATCH 052/156] FROMGIT: net: stmmac: dwmac-meson8b: add support for - the RX delay configuration - -Configure the PRG_ETH0_ADJ_* bits to enable or disable the RX delay -based on the various RGMII PHY modes. For now the only supported RX -delay settings are: -- disabled, use for example for phy-mode "rgmii-id" -- 0ns - this is treated identical to "disabled", used for example on - boards where the PHY provides 2ns TX delay and the PCB trace length - already adds 2ns RX delay -- 2ns - for whenever the PHY cannot add the RX delay and the traces on - the PCB don't add any RX delay - -Disabling the RX delay (in case u-boot enables it, which is the case -for example on Meson8b Odroid-C1) simply means that PRG_ETH0_ADJ_ENABLE, -PRG_ETH0_ADJ_SETUP, PRG_ETH0_ADJ_DELAY and PRG_ETH0_ADJ_SKEW should be -disabled (just disabling PRG_ETH0_ADJ_ENABLE may be enough, since that -disables the whole re-timing logic - but I find it makes more sense to -clear the other bits as well since they depend on that setting). - -u-boot on Odroid-C1 uses the following steps to enable a 2ns RX delay: -- enabling enabling the timing adjustment clock -- enabling the timing adjustment logic by setting PRG_ETH0_ADJ_ENABLE -- setting the PRG_ETH0_ADJ_SETUP bit - -The documentation for the PRG_ETH0_ADJ_DELAY and PRG_ETH0_ADJ_SKEW -registers indicates that we can even set different RX delays. However, -I could not find out how this works exactly, so for now we only support -a 2ns RX delay using the exact same way that Odroid-C1's u-boot does. - -Signed-off-by: Martin Blumenstingl ---- - .../ethernet/stmicro/stmmac/dwmac-meson8b.c | 85 ++++++++++++++----- - 1 file changed, 62 insertions(+), 23 deletions(-) - -diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -index d31f79c455de..234e8b6816ce 100644 ---- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -@@ -85,6 +85,7 @@ struct meson8b_dwmac { - phy_interface_t phy_mode; - struct clk *rgmii_tx_clk; - u32 tx_delay_ns; -+ u32 rx_delay_ns; - struct clk *timing_adj_clk; - }; - -@@ -284,25 +285,64 @@ static int meson8b_devm_clk_prepare_enable(struct meson8b_dwmac *dwmac, - - static int meson8b_init_prg_eth(struct meson8b_dwmac *dwmac) - { -+ u32 tx_dly_config, rx_dly_config, delay_config; - int ret; -- u8 tx_dly_val = 0; -+ -+ tx_dly_config = FIELD_PREP(PRG_ETH0_TXDLY_MASK, -+ dwmac->tx_delay_ns >> 1); -+ -+ if (dwmac->rx_delay_ns == 2) -+ rx_dly_config = PRG_ETH0_ADJ_ENABLE | PRG_ETH0_ADJ_SETUP; -+ else -+ rx_dly_config = 0; - - switch (dwmac->phy_mode) { - case PHY_INTERFACE_MODE_RGMII: -+ delay_config = tx_dly_config | rx_dly_config; -+ break; - case PHY_INTERFACE_MODE_RGMII_RXID: -- tx_dly_val = dwmac->tx_delay_ns >> 1; -- /* fall through */ -- -- case PHY_INTERFACE_MODE_RGMII_ID: -+ delay_config = tx_dly_config; -+ break; - case PHY_INTERFACE_MODE_RGMII_TXID: -+ delay_config = rx_dly_config; -+ break; -+ case PHY_INTERFACE_MODE_RGMII_ID: -+ case PHY_INTERFACE_MODE_RMII: -+ delay_config = 0; -+ break; -+ default: -+ dev_err(dwmac->dev, "unsupported phy-mode %s\n", -+ phy_modes(dwmac->phy_mode)); -+ return -EINVAL; -+ }; -+ -+ if (rx_dly_config & PRG_ETH0_ADJ_ENABLE) { -+ if (!dwmac->timing_adj_clk) { -+ dev_err(dwmac->dev, -+ "The timing-adjustment clock is mandatory for the RX delay re-timing\n"); -+ return -EINVAL; -+ } -+ -+ /* The timing adjustment logic is driven by a separate clock */ -+ ret = meson8b_devm_clk_prepare_enable(dwmac, -+ dwmac->timing_adj_clk); -+ if (ret) { -+ dev_err(dwmac->dev, -+ "Failed to enable the timing-adjustment clock\n"); -+ return ret; -+ } -+ } -+ -+ meson8b_dwmac_mask_bits(dwmac, PRG_ETH0, PRG_ETH0_TXDLY_MASK | -+ PRG_ETH0_ADJ_ENABLE | PRG_ETH0_ADJ_SETUP | -+ PRG_ETH0_ADJ_DELAY | PRG_ETH0_ADJ_SKEW, -+ delay_config); -+ -+ if (phy_interface_mode_is_rgmii(dwmac->phy_mode)) { - /* only relevant for RMII mode -> disable in RGMII mode */ - meson8b_dwmac_mask_bits(dwmac, PRG_ETH0, - PRG_ETH0_INVERTED_RMII_CLK, 0); - -- meson8b_dwmac_mask_bits(dwmac, PRG_ETH0, PRG_ETH0_TXDLY_MASK, -- FIELD_PREP(PRG_ETH0_TXDLY_MASK, -- tx_dly_val)); -- - /* Configure the 125MHz RGMII TX clock, the IP block changes - * the output automatically (= without us having to configure - * a register) based on the line-speed (125MHz for Gbit speeds, -@@ -322,24 +362,11 @@ static int meson8b_init_prg_eth(struct meson8b_dwmac *dwmac) - "failed to enable the RGMII TX clock\n"); - return ret; - } -- break; -- -- case PHY_INTERFACE_MODE_RMII: -+ } else { - /* invert internal clk_rmii_i to generate 25/2.5 tx_rx_clk */ - meson8b_dwmac_mask_bits(dwmac, PRG_ETH0, - PRG_ETH0_INVERTED_RMII_CLK, - PRG_ETH0_INVERTED_RMII_CLK); -- -- /* TX clock delay cannot be configured in RMII mode */ -- meson8b_dwmac_mask_bits(dwmac, PRG_ETH0, PRG_ETH0_TXDLY_MASK, -- 0); -- -- break; -- -- default: -- dev_err(dwmac->dev, "unsupported phy-mode %s\n", -- phy_modes(dwmac->phy_mode)); -- return -EINVAL; - } - - /* enable TX_CLK and PHY_REF_CLK generator */ -@@ -394,6 +421,18 @@ static int meson8b_dwmac_probe(struct platform_device *pdev) - &dwmac->tx_delay_ns)) - dwmac->tx_delay_ns = 2; - -+ /* use 0ns as fallback since this is what most boards actually use */ -+ if (of_property_read_u32(pdev->dev.of_node, "amlogic,rx-delay-ns", -+ &dwmac->rx_delay_ns)) -+ dwmac->rx_delay_ns = 0; -+ -+ if (dwmac->rx_delay_ns != 0 && dwmac->rx_delay_ns != 2) { -+ dev_err(&pdev->dev, -+ "The only allowed RX delays values are: 0ns, 2ns"); -+ ret = -EINVAL; -+ goto err_remove_config_dt; -+ } -+ - dwmac->timing_adj_clk = devm_clk_get_optional(dwmac->dev, - "timing-adjustment"); - if (IS_ERR(dwmac->timing_adj_clk)) { --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0124-WIP-arm64-dts-meson-add-initial-device-trees-for-X96.patch b/projects/Amlogic/patches/linux/amlogic-0052-arm64-dts-meson-add-initial-device-trees-for-X96-AIR.patch similarity index 79% rename from projects/Amlogic/patches/linux/amlogic-0124-WIP-arm64-dts-meson-add-initial-device-trees-for-X96.patch rename to projects/Amlogic/patches/linux/amlogic-0052-arm64-dts-meson-add-initial-device-trees-for-X96-AIR.patch index 10134d2aa12..b59d515c023 100644 --- a/projects/Amlogic/patches/linux/amlogic-0124-WIP-arm64-dts-meson-add-initial-device-trees-for-X96.patch +++ b/projects/Amlogic/patches/linux/amlogic-0052-arm64-dts-meson-add-initial-device-trees-for-X96-AIR.patch @@ -1,8 +1,7 @@ -From 21e4c17a8cc4055608aa86dff1f706aa4ea68b49 Mon Sep 17 00:00:00 2001 +From 06e01fc50fe5f2795d0919f486ccdd2bad414cac Mon Sep 17 00:00:00 2001 From: Christian Hewitt Date: Wed, 24 Jun 2020 15:04:10 +0000 -Subject: [PATCH 124/156] WIP: arm64: dts: meson: add initial device-trees for - X96-AIR +Subject: [PATCH 52/79] arm64: dts: meson: add initial device-trees for X96-AIR Add device-trees for the 2GB/16GB and 4G(32/64GB) variants of the X96-AIR Android STB device using the Amlogic S905X3 chip. @@ -11,23 +10,22 @@ X96-AIR uses the Realtek RTL8822CS SDIO WiFi+BT module. Signed-off-by: Christian Hewitt --- - arch/arm64/boot/dts/amlogic/Makefile | 5 +- - .../boot/dts/amlogic/meson-sm1-x96-air-2g.dts | 95 +++++++++++++++ - .../boot/dts/amlogic/meson-sm1-x96-air-4g.dts | 114 ++++++++++++++++++ - 3 files changed, 213 insertions(+), 1 deletion(-) + arch/arm64/boot/dts/amlogic/Makefile | 4 +- + .../boot/dts/amlogic/meson-sm1-x96-air-2g.dts | 112 +++++++++++++ + .../boot/dts/amlogic/meson-sm1-x96-air-4g.dts | 155 ++++++++++++++++++ + 3 files changed, 270 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-2g.dts create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-4g.dts diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile -index e03ae9a2be38..6b0355f65c3a 100644 +index dce41cd3f347..5473e29f9c36 100644 --- a/arch/arm64/boot/dts/amlogic/Makefile +++ b/arch/arm64/boot/dts/amlogic/Makefile -@@ -43,7 +43,10 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-rbox-pro.dtb +@@ -45,7 +45,9 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-rbox-pro.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-libretech-pc.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-wetek-core2.dtb -dtb-$(CONFIG_ARCH_MESON) += meson-sm1-sei610.dtb -+dtb-$(CONFIG_ARCH_MESON) += meson-sm1-a95xf3-air.dtb dtb-$(CONFIG_ARCH_MESON) += meson-sm1-khadas-vim3l.dtb dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-c4.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-sm1-sei610.dtb @@ -36,10 +34,10 @@ index e03ae9a2be38..6b0355f65c3a 100644 dtb-$(CONFIG_ARCH_MESON) += meson-a1-ad401.dtb diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-2g.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-2g.dts new file mode 100644 -index 000000000000..521d0bbc9912 +index 000000000000..cb4a7220bab1 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-2g.dts -@@ -0,0 +1,95 @@ +@@ -0,0 +1,112 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 BayLibre SAS. All rights reserved. @@ -49,6 +47,7 @@ index 000000000000..521d0bbc9912 +/dts-v1/; + +#include "meson-sm1-ac2xx.dtsi" ++#include + +/ { + compatible = "amediatech,x96-air-2g", "amlogic,sm1"; @@ -110,37 +109,53 @@ index 000000000000..521d0bbc9912 + }; +}; + ++&arb { ++ status = "okay"; ++}; ++ ++&clkc_audio { ++ status = "okay"; ++}; ++ +ðmac { + status = "okay"; + phy-handle = <&internal_ephy>; + phy-mode = "rmii"; +}; + -+&uart_A { ++&frddr_a { + status = "okay"; -+ pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; -+ pinctrl-names = "default"; -+ uart-has-rtscts; ++}; + -+ bluetooth { -+ compatible = "realtek,rtl8822cs-bt"; -+ interrupt-parent = <&gpio_intc>; -+ interrupts = <95 IRQ_TYPE_LEVEL_HIGH>; -+ interrupt-names = "host-wakeup"; -+ shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; -+ max-speed = <2000000>; -+ clocks = <&wifi32k>; -+ clock-names = "lpo"; -+ vbat-supply = <&vddao_3v3>; -+ vddio-supply = <&vddio_ao1v8>; -+ }; ++&frddr_b { ++ status = "okay"; ++}; ++ ++&frddr_c { ++ status = "okay"; ++}; ++ ++&ir { ++ linux,rc-map-name = "rc-x96max"; ++}; ++ ++&tdmif_b { ++ status = "okay"; ++}; ++ ++&tdmout_b { ++ status = "okay"; ++}; ++ ++&tohdmitx { ++ status = "okay"; +}; diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-4g.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-4g.dts new file mode 100644 -index 000000000000..057bbceef497 +index 000000000000..7c222e53f3c5 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-4g.dts -@@ -0,0 +1,114 @@ +@@ -0,0 +1,155 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 BayLibre SAS. All rights reserved. @@ -150,6 +165,7 @@ index 000000000000..057bbceef497 +/dts-v1/; + +#include "meson-sm1-ac2xx.dtsi" ++#include + +/ { + compatible = "amediatech,x96-air-4g", "amlogic,sm1"; @@ -211,15 +227,23 @@ index 000000000000..057bbceef497 + }; +}; + ++&arb { ++ status = "okay"; ++}; ++ ++&clkc_audio { ++ status = "okay"; ++}; ++ +&ext_mdio { + external_phy: ethernet-phy@0 { + /* Realtek RTL8211F (0x001cc916) */ + reg = <0>; -+ max-speed = <100>; ++ max-speed = <1000>; + eee-broken-1000t; + + reset-assert-us = <10000>; -+ reset-deassert-us = <30000>; ++ reset-deassert-us = <80000>; + reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; + + interrupt-parent = <&gpio_intc>; @@ -229,15 +253,47 @@ index 000000000000..057bbceef497 +}; + +ðmac { ++ status = "okay"; ++ + pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; + pinctrl-names = "default"; -+ status = "okay"; -+ phy-mode = "rgmii-id"; ++ phy-mode = "rgmii-txid"; + phy-handle = <&external_phy>; ++ ++ rx-internal-delay-ps = <800>; ++}; ++ ++&frddr_a { ++ status = "okay"; ++}; ++ ++&frddr_b { ++ status = "okay"; ++}; ++ ++&frddr_c { ++ status = "okay"; ++}; ++ ++&ir { ++ linux,rc-map-name = "rc-x96max"; ++}; ++ ++&tdmif_b { ++ status = "okay"; ++}; ++ ++&tdmout_b { ++ status = "okay"; ++}; ++ ++&tohdmitx { ++ status = "okay"; +}; + +&uart_A { + status = "okay"; ++ + pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; + pinctrl-names = "default"; + uart-has-rtscts; diff --git a/projects/Amlogic/patches/linux/amlogic-0053-FROMGIT-dt-bindings-phy-meson8b-usb2-Convert-to-json.patch b/projects/Amlogic/patches/linux/amlogic-0053-FROMGIT-dt-bindings-phy-meson8b-usb2-Convert-to-json.patch deleted file mode 100644 index 8197f06cae1..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0053-FROMGIT-dt-bindings-phy-meson8b-usb2-Convert-to-json.patch +++ /dev/null @@ -1,129 +0,0 @@ -From 72fb59a5719f18b2268b4f9c1071817415079088 Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 1 Jun 2020 09:06:05 +0000 -Subject: [PATCH 053/156] FROMGIT: dt-bindings: phy: meson8b-usb2: Convert to - json-schema - -Now that we have the DT validation in place, let's convert the device -tree bindings for the Amlogic Meson8, Meson8b, Meson8m2 and GXBB USB2 -PHY over to a YAML schema. - -While here, also add the fallback compatible string -"amlogic,meson-gxbb-usb2-phy" which is already used in -arch/arm/boot/dts/meson{,8,8b}.dtsi. - -Tested-by: Thomas Graichen -Signed-off-by: Martin Blumenstingl ---- - .../phy/amlogic,meson8b-usb2-phy.yaml | 63 +++++++++++++++++++ - .../bindings/phy/meson8b-usb2-phy.txt | 28 --------- - 2 files changed, 63 insertions(+), 28 deletions(-) - create mode 100644 Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml - delete mode 100644 Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt - -diff --git a/Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml b/Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml -new file mode 100644 -index 000000000000..0bd4ce39525a ---- /dev/null -+++ b/Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml -@@ -0,0 +1,63 @@ -+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) -+%YAML 1.2 -+--- -+$id: "http://devicetree.org/schemas/phy/amlogic,meson8b-usb2-phy.yaml#" -+$schema: "http://devicetree.org/meta-schemas/core.yaml#" -+ -+title: Amlogic Meson8, Meson8b, Meson8m2 and GXBB USB2 PHY -+ -+maintainers: -+ - Martin Blumenstingl -+ -+properties: -+ compatible: -+ oneOf: -+ - items: -+ - enum: -+ - amlogic,meson8-usb2-phy -+ - amlogic,meson8b-usb2-phy -+ - const: amlogic,meson-mx-usb2-phy -+ - const: amlogic,meson-gxbb-usb2-phy -+ -+ reg: -+ maxItems: 1 -+ -+ clocks: -+ minItems: 2 -+ -+ clock-names: -+ items: -+ - const: usb_general -+ - const: usb -+ -+ resets: -+ minItems: 1 -+ -+ "#phy-cells": -+ const: 0 -+ -+ phy-supply: -+ description: -+ Phandle to a regulator that provides power to the PHY. This -+ regulator will be managed during the PHY power on/off sequence. -+ -+required: -+ - compatible -+ - reg -+ - clocks -+ - clock-names -+ - "#phy-cells" -+ -+additionalProperties: false -+ -+examples: -+ - | -+ usb-phy@c0000000 { -+ compatible = "amlogic,meson-gxbb-usb2-phy"; -+ reg = <0xc0000000 0x20>; -+ resets = <&reset_usb_phy>; -+ clocks = <&clk_usb_general>, <&reset_usb>; -+ clock-names = "usb_general", "usb"; -+ phy-supply = <&usb_vbus>; -+ #phy-cells = <0>; -+ }; -diff --git a/Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt b/Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt -deleted file mode 100644 -index d81d73aea608..000000000000 ---- a/Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt -+++ /dev/null -@@ -1,28 +0,0 @@ --* Amlogic Meson8, Meson8b and GXBB USB2 PHY -- --Required properties: --- compatible: Depending on the platform this should be one of: -- "amlogic,meson8-usb2-phy" -- "amlogic,meson8b-usb2-phy" -- "amlogic,meson-gxbb-usb2-phy" --- reg: The base address and length of the registers --- #phys-cells: should be 0 (see phy-bindings.txt in this directory) --- clocks: phandle and clock identifier for the phy clocks --- clock-names: "usb_general" and "usb" -- --Optional properties: --- resets: reference to the reset controller --- phy-supply: see phy-bindings.txt in this directory -- -- --Example: -- --usb0_phy: usb-phy@c0000000 { -- compatible = "amlogic,meson-gxbb-usb2-phy"; -- #phy-cells = <0>; -- reg = <0x0 0xc0000000 0x0 0x20>; -- resets = <&reset RESET_USB_OTG>; -- clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB0>; -- clock-names = "usb_general", "usb"; -- phy-supply = <&usb_vbus>; --}; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0125-WIP-dt-bindings-arm-amlogic-add-A95XF3-AIR-bindings.patch b/projects/Amlogic/patches/linux/amlogic-0053-dt-bindings-arm-amlogic-add-A95XF3-AIR-bindings.patch similarity index 65% rename from projects/Amlogic/patches/linux/amlogic-0125-WIP-dt-bindings-arm-amlogic-add-A95XF3-AIR-bindings.patch rename to projects/Amlogic/patches/linux/amlogic-0053-dt-bindings-arm-amlogic-add-A95XF3-AIR-bindings.patch index b3692a22330..22e29e8593d 100644 --- a/projects/Amlogic/patches/linux/amlogic-0125-WIP-dt-bindings-arm-amlogic-add-A95XF3-AIR-bindings.patch +++ b/projects/Amlogic/patches/linux/amlogic-0053-dt-bindings-arm-amlogic-add-A95XF3-AIR-bindings.patch @@ -1,25 +1,25 @@ -From 07c3c2afa93aec0a2896fa29ec964fbafa849d15 Mon Sep 17 00:00:00 2001 +From adf72caa726f67ee81acaee280f33cf213bd2232 Mon Sep 17 00:00:00 2001 From: Christian Hewitt Date: Mon, 29 Jun 2020 15:54:45 +0000 -Subject: [PATCH 125/156] WIP: dt-bindings: arm: amlogic: add A95XF3-AIR - bindings +Subject: [PATCH 53/79] dt-bindings: arm: amlogic: add A95XF3-AIR bindings Add the board bindings for the CYX A95XF3-AIR STB device. Signed-off-by: Christian Hewitt --- - Documentation/devicetree/bindings/arm/amlogic.yaml | 1 + - 1 file changed, 1 insertion(+) + Documentation/devicetree/bindings/arm/amlogic.yaml | 2 ++ + 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml -index d0bb581ee9ee..55605571e182 100644 +index 52db715359ed..01eb2889242a 100644 --- a/Documentation/devicetree/bindings/arm/amlogic.yaml +++ b/Documentation/devicetree/bindings/arm/amlogic.yaml -@@ -164,6 +164,7 @@ properties: +@@ -166,6 +166,8 @@ properties: - enum: - amediatech,x96-air-2g - amediatech,x96-air-4g -+ - cyx,a95xf3-air ++ - cyx,a95xf3-air-2g ++ - cyx,a95xf3-air-4g - hardkernel,odroid-c4 - khadas,vim3l - seirobotics,sei610 diff --git a/projects/Amlogic/patches/linux/amlogic-0054-FROMGIT-dt-bindings-phy-meson8b-usb2-Add-compatible-.patch b/projects/Amlogic/patches/linux/amlogic-0054-FROMGIT-dt-bindings-phy-meson8b-usb2-Add-compatible-.patch deleted file mode 100644 index 4bdacb2f828..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0054-FROMGIT-dt-bindings-phy-meson8b-usb2-Add-compatible-.patch +++ /dev/null @@ -1,34 +0,0 @@ -From dde5ce6f404c10465b3f91e9ad1ba8e341839df9 Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 1 Jun 2020 09:06:52 +0000 -Subject: [PATCH 054/156] FROMGIT: dt-bindings: phy: meson8b-usb2: Add - compatible string for Meson8m2 - -The USB2 PHY on Meson8m2 is identical to the one on Meson8b but -different to the one on Meson8. The only known difference is that Meson8 -does not set the ACA_ENABLE bit while Meson8b and Meson8m2 do. -Add an explicit compatible string for Meson8m2 so those differences can -be taken care of. - -Tested-by: Thomas Graichen -Acked-by: Rob Herring -Signed-off-by: Martin Blumenstingl ---- - .../devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml b/Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml -index 0bd4ce39525a..03c4809dbe8d 100644 ---- a/Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml -+++ b/Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml -@@ -16,6 +16,7 @@ properties: - - enum: - - amlogic,meson8-usb2-phy - - amlogic,meson8b-usb2-phy -+ - amlogic,meson8m2-usb2-phy - - const: amlogic,meson-mx-usb2-phy - - const: amlogic,meson-gxbb-usb2-phy - --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0054-arm64-dts-meson-sm1-add-initial-device-trees-for-A95.patch b/projects/Amlogic/patches/linux/amlogic-0054-arm64-dts-meson-sm1-add-initial-device-trees-for-A95.patch new file mode 100644 index 00000000000..61fe9014f31 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0054-arm64-dts-meson-sm1-add-initial-device-trees-for-A95.patch @@ -0,0 +1,314 @@ +From bfd2ad16e39346e7b331c731f453f2d3a0ab2097 Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Wed, 3 Jun 2020 18:03:22 +0000 +Subject: [PATCH 54/79] arm64: dts: meson-sm1: add initial device-trees for + A95XF3-AIR + +Add device-trees for the 2GB/16GB and 4G(32/64GB) variants of the +X95XF3-AIR Android STB device using the Amlogic S905X3 chip. + +X95XF3-AIR uses the MediaTek MT7668 SDIO WiFi+BT module. + +Signed-off-by: Christian Hewitt +--- + arch/arm64/boot/dts/amlogic/Makefile | 2 + + .../dts/amlogic/meson-sm1-a95xf3-air-2g.dts | 112 +++++++++++++ + .../dts/amlogic/meson-sm1-a95xf3-air-4g.dts | 154 ++++++++++++++++++ + 3 files changed, 268 insertions(+) + create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-2g.dts + create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-4g.dts + +diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile +index 5473e29f9c36..29ae4c854d05 100644 +--- a/arch/arm64/boot/dts/amlogic/Makefile ++++ b/arch/arm64/boot/dts/amlogic/Makefile +@@ -45,6 +45,8 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-rbox-pro.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-libretech-pc.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-gxm-wetek-core2.dtb ++dtb-$(CONFIG_ARCH_MESON) += meson-sm1-a95xf3-air-2g.dtb ++dtb-$(CONFIG_ARCH_MESON) += meson-sm1-a95xf3-air-4g.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-sm1-khadas-vim3l.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-c4.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-sm1-sei610.dtb +diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-2g.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-2g.dts +new file mode 100644 +index 000000000000..4f4c0fabd16d +--- /dev/null ++++ b/arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-2g.dts +@@ -0,0 +1,112 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright (c) 2019 BayLibre SAS. All rights reserved. ++ * Copyright (c) 2020 Christian Hewitt ++ */ ++ ++/dts-v1/; ++ ++#include "meson-sm1-ac2xx.dtsi" ++#include ++ ++/ { ++ compatible = "cyx,a95xf3-air-2g", "amlogic,sm1"; ++ model = "Shenzhen CYX Industrial Co., Ltd A95XF3-AIR"; ++ ++ sound { ++ compatible = "amlogic,axg-sound-card"; ++ model = "SM1-A95XF3-AIR"; ++ audio-aux-devs = <&tdmout_b>; ++ audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", ++ "TDMOUT_B IN 1", "FRDDR_B OUT 1", ++ "TDMOUT_B IN 2", "FRDDR_C OUT 1", ++ "TDM_B Playback", "TDMOUT_B OUT"; ++ ++ assigned-clocks = <&clkc CLKID_MPLL2>, ++ <&clkc CLKID_MPLL0>, ++ <&clkc CLKID_MPLL1>; ++ assigned-clock-parents = <0>, <0>, <0>; ++ assigned-clock-rates = <294912000>, ++ <270950400>, ++ <393216000>; ++ status = "okay"; ++ ++ dai-link-0 { ++ sound-dai = <&frddr_a>; ++ }; ++ ++ dai-link-1 { ++ sound-dai = <&frddr_b>; ++ }; ++ ++ dai-link-2 { ++ sound-dai = <&frddr_c>; ++ }; ++ ++ /* 8ch hdmi interface */ ++ dai-link-3 { ++ sound-dai = <&tdmif_b>; ++ dai-format = "i2s"; ++ dai-tdm-slot-tx-mask-0 = <1 1>; ++ dai-tdm-slot-tx-mask-1 = <1 1>; ++ dai-tdm-slot-tx-mask-2 = <1 1>; ++ dai-tdm-slot-tx-mask-3 = <1 1>; ++ mclk-fs = <256>; ++ ++ codec { ++ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; ++ }; ++ }; ++ ++ /* hdmi glue */ ++ dai-link-4 { ++ sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; ++ ++ codec { ++ sound-dai = <&hdmi_tx>; ++ }; ++ }; ++ }; ++}; ++ ++&arb { ++ status = "okay"; ++}; ++ ++&clkc_audio { ++ status = "okay"; ++}; ++ ++ðmac { ++ status = "okay"; ++ phy-handle = <&internal_ephy>; ++ phy-mode = "rmii"; ++}; ++ ++&frddr_a { ++ status = "okay"; ++}; ++ ++&frddr_b { ++ status = "okay"; ++}; ++ ++&frddr_c { ++ status = "okay"; ++}; ++ ++&ir { ++ linux,rc-map-name = "rc-x96max"; ++}; ++ ++&tdmif_b { ++ status = "okay"; ++}; ++ ++&tdmout_b { ++ status = "okay"; ++}; ++ ++&tohdmitx { ++ status = "okay"; ++}; +diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-4g.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-4g.dts +new file mode 100644 +index 000000000000..3315e22902dd +--- /dev/null ++++ b/arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-4g.dts +@@ -0,0 +1,154 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright (c) 2019 BayLibre SAS. All rights reserved. ++ * Copyright (c) 2020 Christian Hewitt ++ */ ++ ++/dts-v1/; ++ ++#include "meson-sm1-ac2xx.dtsi" ++#include ++ ++/ { ++ compatible = "cyx,a95xf3-air-4g", "amlogic,sm1"; ++ model = "Shenzhen CYX Industrial Co., Ltd A95XF3-AIR"; ++ ++ sound { ++ compatible = "amlogic,axg-sound-card"; ++ model = "SM1-A95XF3-AIR"; ++ audio-aux-devs = <&tdmout_b>; ++ audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", ++ "TDMOUT_B IN 1", "FRDDR_B OUT 1", ++ "TDMOUT_B IN 2", "FRDDR_C OUT 1", ++ "TDM_B Playback", "TDMOUT_B OUT"; ++ ++ assigned-clocks = <&clkc CLKID_MPLL2>, ++ <&clkc CLKID_MPLL0>, ++ <&clkc CLKID_MPLL1>; ++ assigned-clock-parents = <0>, <0>, <0>; ++ assigned-clock-rates = <294912000>, ++ <270950400>, ++ <393216000>; ++ status = "okay"; ++ ++ dai-link-0 { ++ sound-dai = <&frddr_a>; ++ }; ++ ++ dai-link-1 { ++ sound-dai = <&frddr_b>; ++ }; ++ ++ dai-link-2 { ++ sound-dai = <&frddr_c>; ++ }; ++ ++ /* 8ch hdmi interface */ ++ dai-link-3 { ++ sound-dai = <&tdmif_b>; ++ dai-format = "i2s"; ++ dai-tdm-slot-tx-mask-0 = <1 1>; ++ dai-tdm-slot-tx-mask-1 = <1 1>; ++ dai-tdm-slot-tx-mask-2 = <1 1>; ++ dai-tdm-slot-tx-mask-3 = <1 1>; ++ mclk-fs = <256>; ++ ++ codec { ++ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; ++ }; ++ }; ++ ++ /* hdmi glue */ ++ dai-link-4 { ++ sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; ++ ++ codec { ++ sound-dai = <&hdmi_tx>; ++ }; ++ }; ++ }; ++}; ++ ++&arb { ++ status = "okay"; ++}; ++ ++&clkc_audio { ++ status = "okay"; ++}; ++ ++&ext_mdio { ++ external_phy: ethernet-phy@0 { ++ /* Realtek RTL8211F (0x001cc916) */ ++ reg = <0>; ++ max-speed = <1000>; ++ eee-broken-1000t; ++ ++ reset-assert-us = <10000>; ++ reset-deassert-us = <80000>; ++ reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; ++ ++ interrupt-parent = <&gpio_intc>; ++ /* MAC_INTR on GPIOZ_14 */ ++ interrupts = <26 IRQ_TYPE_LEVEL_LOW>; ++ }; ++}; ++ ++ðmac { ++ status = "okay"; ++ ++ pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; ++ pinctrl-names = "default"; ++ phy-mode = "rgmii-txid"; ++ phy-handle = <&external_phy>; ++ ++ rx-internal-delay-ps = <800>; ++}; ++ ++&frddr_a { ++ status = "okay"; ++}; ++ ++&frddr_b { ++ status = "okay"; ++}; ++ ++&frddr_c { ++ status = "okay"; ++}; ++ ++&ir { ++ linux,rc-map-name = "rc-x96max"; ++}; ++ ++&tdmif_b { ++ status = "okay"; ++}; ++ ++&tdmout_b { ++ status = "okay"; ++}; ++ ++&tohdmitx { ++ status = "okay"; ++}; ++ ++&uart_A { ++ status = "okay"; ++ pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; ++ pinctrl-names = "default"; ++ uart-has-rtscts; ++ ++ bluetooth { ++ compatible = "mediatek,mt7668u-bluetooth"; ++ interrupt-parent = <&gpio_intc>; ++ interrupts = <95 IRQ_TYPE_LEVEL_HIGH>; ++ interrupt-names = "host-wakeup"; ++ shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; ++ max-speed = <2000000>; ++ clocks = <&wifi32k>; ++ clock-names = "lpo"; ++ vbat-supply = <&vddao_3v3>; ++ vddio-supply = <&vddio_ao1v8>; ++ }; ++}; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0055-FROMGIT-phy-amlogic-meson8b-usb2-Use-a-MMIO-regmap.patch b/projects/Amlogic/patches/linux/amlogic-0055-FROMGIT-phy-amlogic-meson8b-usb2-Use-a-MMIO-regmap.patch deleted file mode 100644 index e786b1c217c..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0055-FROMGIT-phy-amlogic-meson8b-usb2-Use-a-MMIO-regmap.patch +++ /dev/null @@ -1,166 +0,0 @@ -From d099c11d730117bad1feff51663c53c8449cf39e Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 1 Jun 2020 09:07:48 +0000 -Subject: [PATCH 055/156] FROMGIT: phy: amlogic: meson8b-usb2: Use a MMIO - regmap - -Using a MMIO regmap and switch to regmap_update_bits() to simplify the -code in the driver. Also switch to devm_platform_ioremap_resource() -instead of open-coding it. No functional changes intended. - -Tested-by: Thomas Graichen -Signed-off-by: Martin Blumenstingl ---- - drivers/phy/amlogic/Kconfig | 1 + - drivers/phy/amlogic/phy-meson8b-usb2.c | 73 ++++++++++++-------------- - 2 files changed, 35 insertions(+), 39 deletions(-) - -diff --git a/drivers/phy/amlogic/Kconfig b/drivers/phy/amlogic/Kconfig -index 71801e30d601..3495b23af797 100644 ---- a/drivers/phy/amlogic/Kconfig -+++ b/drivers/phy/amlogic/Kconfig -@@ -9,6 +9,7 @@ config PHY_MESON8B_USB2 - depends on USB_SUPPORT - select USB_COMMON - select GENERIC_PHY -+ select REGMAP_MMIO - help - Enable this to support the Meson USB2 PHYs found in Meson8, - Meson8b and GXBB SoCs. -diff --git a/drivers/phy/amlogic/phy-meson8b-usb2.c b/drivers/phy/amlogic/phy-meson8b-usb2.c -index bd66bd723e4a..86824cc21f11 100644 ---- a/drivers/phy/amlogic/phy-meson8b-usb2.c -+++ b/drivers/phy/amlogic/phy-meson8b-usb2.c -@@ -10,6 +10,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -105,34 +106,24 @@ - #define ACA_ENABLE_COMPLETE_TIME 50 - - struct phy_meson8b_usb2_priv { -- void __iomem *regs; -+ struct regmap *regmap; - enum usb_dr_mode dr_mode; - struct clk *clk_usb_general; - struct clk *clk_usb; - struct reset_control *reset; - }; - --static u32 phy_meson8b_usb2_read(struct phy_meson8b_usb2_priv *phy_priv, -- u32 reg) --{ -- return readl(phy_priv->regs + reg); --} -- --static void phy_meson8b_usb2_mask_bits(struct phy_meson8b_usb2_priv *phy_priv, -- u32 reg, u32 mask, u32 value) --{ -- u32 data; -- -- data = phy_meson8b_usb2_read(phy_priv, reg); -- data &= ~mask; -- data |= (value & mask); -- -- writel(data, phy_priv->regs + reg); --} -+static const struct regmap_config phy_meson8b_usb2_regmap_conf = { -+ .reg_bits = 8, -+ .val_bits = 32, -+ .reg_stride = 4, -+ .max_register = REG_TUNE, -+}; - - static int phy_meson8b_usb2_power_on(struct phy *phy) - { - struct phy_meson8b_usb2_priv *priv = phy_get_drvdata(phy); -+ u32 reg; - int ret; - - if (!IS_ERR_OR_NULL(priv->reset)) { -@@ -156,34 +147,34 @@ static int phy_meson8b_usb2_power_on(struct phy *phy) - return ret; - } - -- phy_meson8b_usb2_mask_bits(priv, REG_CONFIG, REG_CONFIG_CLK_32k_ALTSEL, -- REG_CONFIG_CLK_32k_ALTSEL); -+ regmap_update_bits(priv->regmap, REG_CONFIG, REG_CONFIG_CLK_32k_ALTSEL, -+ REG_CONFIG_CLK_32k_ALTSEL); - -- phy_meson8b_usb2_mask_bits(priv, REG_CTRL, REG_CTRL_REF_CLK_SEL_MASK, -- 0x2 << REG_CTRL_REF_CLK_SEL_SHIFT); -+ regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_REF_CLK_SEL_MASK, -+ 0x2 << REG_CTRL_REF_CLK_SEL_SHIFT); - -- phy_meson8b_usb2_mask_bits(priv, REG_CTRL, REG_CTRL_FSEL_MASK, -- 0x5 << REG_CTRL_FSEL_SHIFT); -+ regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_FSEL_MASK, -+ 0x5 << REG_CTRL_FSEL_SHIFT); - - /* reset the PHY */ -- phy_meson8b_usb2_mask_bits(priv, REG_CTRL, REG_CTRL_POWER_ON_RESET, -- REG_CTRL_POWER_ON_RESET); -+ regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_POWER_ON_RESET, -+ REG_CTRL_POWER_ON_RESET); - udelay(RESET_COMPLETE_TIME); -- phy_meson8b_usb2_mask_bits(priv, REG_CTRL, REG_CTRL_POWER_ON_RESET, 0); -+ regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_POWER_ON_RESET, 0); - udelay(RESET_COMPLETE_TIME); - -- phy_meson8b_usb2_mask_bits(priv, REG_CTRL, REG_CTRL_SOF_TOGGLE_OUT, -- REG_CTRL_SOF_TOGGLE_OUT); -+ regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_SOF_TOGGLE_OUT, -+ REG_CTRL_SOF_TOGGLE_OUT); - - if (priv->dr_mode == USB_DR_MODE_HOST) { -- phy_meson8b_usb2_mask_bits(priv, REG_ADP_BC, -- REG_ADP_BC_ACA_ENABLE, -- REG_ADP_BC_ACA_ENABLE); -+ regmap_update_bits(priv->regmap, REG_ADP_BC, -+ REG_ADP_BC_ACA_ENABLE, -+ REG_ADP_BC_ACA_ENABLE); - - udelay(ACA_ENABLE_COMPLETE_TIME); - -- if (phy_meson8b_usb2_read(priv, REG_ADP_BC) & -- REG_ADP_BC_ACA_PIN_FLOAT) { -+ regmap_read(priv->regmap, REG_ADP_BC, ®); -+ if (reg & REG_ADP_BC_ACA_PIN_FLOAT) { - dev_warn(&phy->dev, "USB ID detect failed!\n"); - clk_disable_unprepare(priv->clk_usb); - clk_disable_unprepare(priv->clk_usb_general); -@@ -213,18 +204,22 @@ static const struct phy_ops phy_meson8b_usb2_ops = { - static int phy_meson8b_usb2_probe(struct platform_device *pdev) - { - struct phy_meson8b_usb2_priv *priv; -- struct resource *res; - struct phy *phy; - struct phy_provider *phy_provider; -+ void __iomem *base; - - priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); - if (!priv) - return -ENOMEM; - -- res = platform_get_resource(pdev, IORESOURCE_MEM, 0); -- priv->regs = devm_ioremap_resource(&pdev->dev, res); -- if (IS_ERR(priv->regs)) -- return PTR_ERR(priv->regs); -+ base = devm_platform_ioremap_resource(pdev, 0); -+ if (IS_ERR(base)) -+ return PTR_ERR(base); -+ -+ priv->regmap = devm_regmap_init_mmio(&pdev->dev, base, -+ &phy_meson8b_usb2_regmap_conf); -+ if (IS_ERR(priv->regmap)) -+ return PTR_ERR(priv->regmap); - - priv->clk_usb_general = devm_clk_get(&pdev->dev, "usb_general"); - if (IS_ERR(priv->clk_usb_general)) --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0120-WIP-dt-bindings-arm-amlogic-add-support-for-the-Tani.patch b/projects/Amlogic/patches/linux/amlogic-0055-dt-bindings-arm-amlogic-add-support-for-the-Tanix-TX.patch similarity index 78% rename from projects/Amlogic/patches/linux/amlogic-0120-WIP-dt-bindings-arm-amlogic-add-support-for-the-Tani.patch rename to projects/Amlogic/patches/linux/amlogic-0055-dt-bindings-arm-amlogic-add-support-for-the-Tanix-TX.patch index cae109f5e7c..1577ae71ceb 100644 --- a/projects/Amlogic/patches/linux/amlogic-0120-WIP-dt-bindings-arm-amlogic-add-support-for-the-Tani.patch +++ b/projects/Amlogic/patches/linux/amlogic-0055-dt-bindings-arm-amlogic-add-support-for-the-Tanix-TX.patch @@ -1,8 +1,8 @@ -From c6941e0d1e23fafbe06c1bdc3a24e4b83cebba14 Mon Sep 17 00:00:00 2001 +From a0fb81f3acbb3324ff75117eabb80d34daf901cb Mon Sep 17 00:00:00 2001 From: Christian Hewitt Date: Sat, 29 Feb 2020 15:13:02 +0000 -Subject: [PATCH 120/156] WIP: dt-bindings: arm: amlogic: add support for the - Tanix TX5 Max +Subject: [PATCH 55/79] dt-bindings: arm: amlogic: add support for the Tanix + TX5 Max The Oranth (Tanix) TX5 Max is based on the Amlogic U200 reference board with an S905X2 chip. @@ -13,10 +13,10 @@ Signed-off-by: Christian Hewitt 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml -index d06c77233e4d..46cb6359f530 100644 +index 01eb2889242a..8561e1a17d6f 100644 --- a/Documentation/devicetree/bindings/arm/amlogic.yaml +++ b/Documentation/devicetree/bindings/arm/amlogic.yaml -@@ -138,6 +138,7 @@ properties: +@@ -139,6 +139,7 @@ properties: - amediatech,x96-max - amlogic,u200 - seirobotics,sei510 diff --git a/projects/Amlogic/patches/linux/amlogic-0056-FROMGIT-phy-amlogic-meson8b-usb2-Don-t-set-REG_ADP_B.patch b/projects/Amlogic/patches/linux/amlogic-0056-FROMGIT-phy-amlogic-meson8b-usb2-Don-t-set-REG_ADP_B.patch deleted file mode 100644 index 4a5327272d6..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0056-FROMGIT-phy-amlogic-meson8b-usb2-Don-t-set-REG_ADP_B.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 0396c7d56b4c590bf1d2dada6ff4828d504c0ccb Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 1 Jun 2020 09:08:57 +0000 -Subject: [PATCH 056/156] FROMGIT: phy: amlogic: meson8b-usb2: Don't set - REG_ADP_BC_ACA_ENABLE on Meson8 - -Skip setting REG_ADP_BC_ACA_ENABLE on Meson8 SoCs and polling for the -REG_ADP_BC_ACA_PIN_FLOAT bit. The vendor also skips this part on Meson8 -SoCs. -This fixes initialization of the host-only USB PHY on Meson8 which would -otherwise fail with "USB ID detect failed!". - -Fixes: 4a3449d1a0a10c ("phy: meson8b-usb2: add support for the USB PHY on Meson8 SoCs") -Reported-by: Thomas Graichen -Tested-by: Thomas Graichen -Signed-off-by: Martin Blumenstingl ---- - drivers/phy/amlogic/phy-meson8b-usb2.c | 48 ++++++++++++++++++++------ - 1 file changed, 38 insertions(+), 10 deletions(-) - -diff --git a/drivers/phy/amlogic/phy-meson8b-usb2.c b/drivers/phy/amlogic/phy-meson8b-usb2.c -index 86824cc21f11..7236b8885f07 100644 ---- a/drivers/phy/amlogic/phy-meson8b-usb2.c -+++ b/drivers/phy/amlogic/phy-meson8b-usb2.c -@@ -10,6 +10,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -105,12 +106,17 @@ - #define RESET_COMPLETE_TIME 500 - #define ACA_ENABLE_COMPLETE_TIME 50 - -+struct phy_meson8b_usb2_match_data { -+ bool host_enable_aca; -+}; -+ - struct phy_meson8b_usb2_priv { -- struct regmap *regmap; -- enum usb_dr_mode dr_mode; -- struct clk *clk_usb_general; -- struct clk *clk_usb; -- struct reset_control *reset; -+ struct regmap *regmap; -+ enum usb_dr_mode dr_mode; -+ struct clk *clk_usb_general; -+ struct clk *clk_usb; -+ struct reset_control *reset; -+ const struct phy_meson8b_usb2_match_data *match; - }; - - static const struct regmap_config phy_meson8b_usb2_regmap_conf = { -@@ -166,7 +172,8 @@ static int phy_meson8b_usb2_power_on(struct phy *phy) - regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_SOF_TOGGLE_OUT, - REG_CTRL_SOF_TOGGLE_OUT); - -- if (priv->dr_mode == USB_DR_MODE_HOST) { -+ if (priv->dr_mode == USB_DR_MODE_HOST && -+ priv->match->host_enable_aca) { - regmap_update_bits(priv->regmap, REG_ADP_BC, - REG_ADP_BC_ACA_ENABLE, - REG_ADP_BC_ACA_ENABLE); -@@ -216,6 +223,10 @@ static int phy_meson8b_usb2_probe(struct platform_device *pdev) - if (IS_ERR(base)) - return PTR_ERR(base); - -+ priv->match = device_get_match_data(&pdev->dev); -+ if (!priv->match) -+ return -ENODEV; -+ - priv->regmap = devm_regmap_init_mmio(&pdev->dev, base, - &phy_meson8b_usb2_regmap_conf); - if (IS_ERR(priv->regmap)) -@@ -254,11 +265,28 @@ static int phy_meson8b_usb2_probe(struct platform_device *pdev) - return PTR_ERR_OR_ZERO(phy_provider); - } - -+static const struct phy_meson8b_usb2_match_data phy_meson8_usb2_match_data = { -+ .host_enable_aca = false, -+}; -+ -+static const struct phy_meson8b_usb2_match_data phy_meson8b_usb2_match_data = { -+ .host_enable_aca = true, -+}; -+ - static const struct of_device_id phy_meson8b_usb2_of_match[] = { -- { .compatible = "amlogic,meson8-usb2-phy", }, -- { .compatible = "amlogic,meson8b-usb2-phy", }, -- { .compatible = "amlogic,meson-gxbb-usb2-phy", }, -- { }, -+ { -+ .compatible = "amlogic,meson8-usb2-phy", -+ .data = &phy_meson8_usb2_match_data -+ }, -+ { -+ .compatible = "amlogic,meson8b-usb2-phy", -+ .data = &phy_meson8b_usb2_match_data -+ }, -+ { -+ .compatible = "amlogic,meson-gxbb-usb2-phy", -+ .data = &phy_meson8b_usb2_match_data -+ }, -+ { /* sentinel */ } - }; - MODULE_DEVICE_TABLE(of, phy_meson8b_usb2_of_match); - --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0121-WIP-arm64-dts-meson-add-support-for-the-Tanix-TX5-Ma.patch b/projects/Amlogic/patches/linux/amlogic-0056-arm64-dts-meson-add-support-for-the-Tanix-TX5-Max.patch similarity index 97% rename from projects/Amlogic/patches/linux/amlogic-0121-WIP-arm64-dts-meson-add-support-for-the-Tanix-TX5-Ma.patch rename to projects/Amlogic/patches/linux/amlogic-0056-arm64-dts-meson-add-support-for-the-Tanix-TX5-Max.patch index ca5c99d1c62..4b17aa26b8c 100644 --- a/projects/Amlogic/patches/linux/amlogic-0121-WIP-arm64-dts-meson-add-support-for-the-Tanix-TX5-Ma.patch +++ b/projects/Amlogic/patches/linux/amlogic-0056-arm64-dts-meson-add-support-for-the-Tanix-TX5-Max.patch @@ -1,8 +1,7 @@ -From 36f7281201a6c413a084079d5cfd5f564e3d0635 Mon Sep 17 00:00:00 2001 +From f8d652b231de095d2b11cb6b201dc155a6e4b975 Mon Sep 17 00:00:00 2001 From: Christian Hewitt Date: Sun, 20 Oct 2019 04:06:59 +0000 -Subject: [PATCH 121/156] WIP: arm64: dts: meson: add support for the Tanix TX5 - Max +Subject: [PATCH 56/79] arm64: dts: meson: add support for the Tanix TX5 Max The Tanix TX5 Max is based on the Amlogic U200 reference design using the S905X2 chipset. Hardware specification: @@ -26,7 +25,7 @@ Signed-off-by: Christian Hewitt create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12a-tanix-tx5max.dts diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile -index 4e2239ffcaa5..e03ae9a2be38 100644 +index 29ae4c854d05..d423aafbdf07 100644 --- a/arch/arm64/boot/dts/amlogic/Makefile +++ b/arch/arm64/boot/dts/amlogic/Makefile @@ -1,6 +1,7 @@ @@ -36,10 +35,10 @@ index 4e2239ffcaa5..e03ae9a2be38 100644 +dtb-$(CONFIG_ARCH_MESON) += meson-g12a-tanix-tx5max.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gsking-x.dtb diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-tanix-tx5max.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-tanix-tx5max.dts new file mode 100644 -index 000000000000..48efd72930b0 +index 000000000000..5bf5392b8d85 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-tanix-tx5max.dts @@ -0,0 +1,481 @@ @@ -385,7 +384,7 @@ index 000000000000..48efd72930b0 + eee-broken-1000t; + + reset-assert-us = <10000>; -+ reset-deassert-us = <30000>; ++ reset-deassert-us = <80000>; + reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; + + interrupt-parent = <&gpio_intc>; diff --git a/projects/Amlogic/patches/linux/amlogic-0057-FROMGIT-phy-amlogic-meson8b-usb2-unset-the-IDDQ-bit-.patch b/projects/Amlogic/patches/linux/amlogic-0057-FROMGIT-phy-amlogic-meson8b-usb2-unset-the-IDDQ-bit-.patch deleted file mode 100644 index 0ff83f61257..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0057-FROMGIT-phy-amlogic-meson8b-usb2-unset-the-IDDQ-bit-.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 8fc4830bbf8c5038559b9e25ffab217dbee9d592 Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 1 Jun 2020 09:10:00 +0000 -Subject: [PATCH 057/156] FROMGIT: phy: amlogic: meson8b-usb2: unset the IDDQ - bit during PHY power-on - -The vendor driver unsets the set_iddig bit during power-on as well and -sets it when suspending the PHY. I did not notice this in the vendor -driver first, because it's part of the dwc_otg driver there (instead of -their PHY code). While here, also add all other REG_DBG_UART register -bit definitions. - -Tested-by: Thomas Graichen -Signed-off-by: Martin Blumenstingl ---- - drivers/phy/amlogic/phy-meson8b-usb2.c | 44 +++++++++++++++++++------- - 1 file changed, 32 insertions(+), 12 deletions(-) - -diff --git a/drivers/phy/amlogic/phy-meson8b-usb2.c b/drivers/phy/amlogic/phy-meson8b-usb2.c -index 7236b8885f07..436dfa1a8a04 100644 ---- a/drivers/phy/amlogic/phy-meson8b-usb2.c -+++ b/drivers/phy/amlogic/phy-meson8b-usb2.c -@@ -78,6 +78,17 @@ - #define REG_ADP_BC_ACA_PIN_FLOAT BIT(26) - - #define REG_DBG_UART 0x10 -+ #define REG_DBG_UART_BYPASS_SEL BIT(0) -+ #define REG_DBG_UART_BYPASS_DM_EN BIT(1) -+ #define REG_DBG_UART_BYPASS_DP_EN BIT(2) -+ #define REG_DBG_UART_BYPASS_DM_DATA BIT(3) -+ #define REG_DBG_UART_BYPASS_DP_DATA BIT(4) -+ #define REG_DBG_UART_FSV_MINUS BIT(5) -+ #define REG_DBG_UART_FSV_PLUS BIT(6) -+ #define REG_DBG_UART_FSV_BURN_IN_TEST BIT(7) -+ #define REG_DBG_UART_LOOPBACK_EN_B BIT(8) -+ #define REG_DBG_UART_SET_IDDQ BIT(9) -+ #define REG_DBG_UART_ATE_RESET BIT(10) - - #define REG_TEST 0x14 - #define REG_TEST_DATA_IN_MASK GENMASK(3, 0) -@@ -172,20 +183,24 @@ static int phy_meson8b_usb2_power_on(struct phy *phy) - regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_SOF_TOGGLE_OUT, - REG_CTRL_SOF_TOGGLE_OUT); - -- if (priv->dr_mode == USB_DR_MODE_HOST && -- priv->match->host_enable_aca) { -- regmap_update_bits(priv->regmap, REG_ADP_BC, -- REG_ADP_BC_ACA_ENABLE, -- REG_ADP_BC_ACA_ENABLE); -+ if (priv->dr_mode == USB_DR_MODE_HOST) { -+ regmap_update_bits(priv->regmap, REG_DBG_UART, -+ REG_DBG_UART_SET_IDDQ, 0); - -- udelay(ACA_ENABLE_COMPLETE_TIME); -+ if (priv->match->host_enable_aca) { -+ regmap_update_bits(priv->regmap, REG_ADP_BC, -+ REG_ADP_BC_ACA_ENABLE, -+ REG_ADP_BC_ACA_ENABLE); - -- regmap_read(priv->regmap, REG_ADP_BC, ®); -- if (reg & REG_ADP_BC_ACA_PIN_FLOAT) { -- dev_warn(&phy->dev, "USB ID detect failed!\n"); -- clk_disable_unprepare(priv->clk_usb); -- clk_disable_unprepare(priv->clk_usb_general); -- return -EINVAL; -+ udelay(ACA_ENABLE_COMPLETE_TIME); -+ -+ regmap_read(priv->regmap, REG_ADP_BC, ®); -+ if (reg & REG_ADP_BC_ACA_PIN_FLOAT) { -+ dev_warn(&phy->dev, "USB ID detect failed!\n"); -+ clk_disable_unprepare(priv->clk_usb); -+ clk_disable_unprepare(priv->clk_usb_general); -+ return -EINVAL; -+ } - } - } - -@@ -196,6 +211,11 @@ static int phy_meson8b_usb2_power_off(struct phy *phy) - { - struct phy_meson8b_usb2_priv *priv = phy_get_drvdata(phy); - -+ if (priv->dr_mode == USB_DR_MODE_HOST) -+ regmap_update_bits(priv->regmap, REG_DBG_UART, -+ REG_DBG_UART_SET_IDDQ, -+ REG_DBG_UART_SET_IDDQ); -+ - clk_disable_unprepare(priv->clk_usb); - clk_disable_unprepare(priv->clk_usb_general); - --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0129-WIP-arm64-dts-meson-add-multiple-MeCool-device-trees.patch b/projects/Amlogic/patches/linux/amlogic-0057-arm64-dts-meson-add-multiple-MeCool-device-trees.patch similarity index 79% rename from projects/Amlogic/patches/linux/amlogic-0129-WIP-arm64-dts-meson-add-multiple-MeCool-device-trees.patch rename to projects/Amlogic/patches/linux/amlogic-0057-arm64-dts-meson-add-multiple-MeCool-device-trees.patch index 46ecb0a3cdd..3811f74c06e 100644 --- a/projects/Amlogic/patches/linux/amlogic-0129-WIP-arm64-dts-meson-add-multiple-MeCool-device-trees.patch +++ b/projects/Amlogic/patches/linux/amlogic-0057-arm64-dts-meson-add-multiple-MeCool-device-trees.patch @@ -1,8 +1,7 @@ -From bac9b51cdc52875bf6e278d4b810269260d5066c Mon Sep 17 00:00:00 2001 +From abee17acade1c748cca7f0c01fdc27ba33cf5b4d Mon Sep 17 00:00:00 2001 From: Christian Hewitt Date: Mon, 21 Oct 2019 03:58:06 +0000 -Subject: [PATCH 129/156] WIP: arm64: dts: meson: add multiple MeCool device - trees +Subject: [PATCH 57/79] arm64: dts: meson: add multiple MeCool device trees This adds initial device trees for a range of MeCool devices based on various Amlogic GXBB, GXL and GXM reference designs. The current purpose is to allow @@ -18,8 +17,8 @@ Signed-off-by: Christian Hewitt .../amlogic/meson-gxl-s905d-mecool-ki-pro.dts | 16 +++++++++ .../meson-gxl-s905d-mecool-kii-pro.dts | 16 +++++++++ .../meson-gxl-s905d-mecool-m8s-plus.dts | 16 +++++++++ - .../dts/amlogic/meson-gxm-mecool-kiii-pro.dts | 22 ++++++++++++ - 8 files changed, 166 insertions(+) + .../dts/amlogic/meson-gxm-mecool-kiii-pro.dts | 21 ++++++++++++ + 8 files changed, 165 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxbb-mecool-ki-plus.dts create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxbb-mecool-kii-pro.dts create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-ki-plus.dts @@ -29,11 +28,11 @@ Signed-off-by: Christian Hewitt create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-mecool-kiii-pro.dts diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile -index 662cd22f7e8a..1a67aebea855 100644 +index d423aafbdf07..15e06e1ec51f 100644 --- a/arch/arm64/boot/dts/amlogic/Makefile +++ b/arch/arm64/boot/dts/amlogic/Makefile -@@ -12,6 +12,8 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb +@@ -13,6 +13,8 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2-plus.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-mecool-ki-plus.dtb @@ -41,8 +40,8 @@ index 662cd22f7e8a..1a67aebea855 100644 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb -@@ -28,6 +30,10 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-khadas-vim.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc.dtb +@@ -30,6 +32,10 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc-v2.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-nexbox-a95x.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-p212.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-mecool-ki-plus.dtb @@ -52,7 +51,7 @@ index 662cd22f7e8a..1a67aebea855 100644 dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p230.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p231.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-phicomm-n1.dtb -@@ -37,6 +43,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-p281.dtb +@@ -39,6 +45,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-p281.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-tx3-mini.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-libretech-pc.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-khadas-vim2.dtb @@ -62,7 +61,7 @@ index 662cd22f7e8a..1a67aebea855 100644 dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q201.dtb diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-mecool-ki-plus.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-mecool-ki-plus.dts new file mode 100644 -index 000000000000..f08e2a7178c5 +index 000000000000..0c27f7e67d5a --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-mecool-ki-plus.dts @@ -0,0 +1,34 @@ @@ -75,13 +74,13 @@ index 000000000000..f08e2a7178c5 +#include "meson-gxbb-p201.dts" + +/ { -+ compatible = "mecool,gxbb-ki-plus", "amlogic,meson-gxbb"; ++ compatible = "mecool,gxbb-ki-plus", "amlogic,meson-gxbb"; + model = "MeCool KI Plus"; + + clock: meson_clock { + compatible = "amlogic, gxbb-clock"; + reg = <0x0 0xc883c000 0x0 0x1000>, -+ <0x0 0xc8100000 0x0 0x1000>; ++ <0x0 0xc8100000 0x0 0x1000>; + #clock-cells = <1>; + #reset-cells = <1>; + sys_max = <1536000000>; @@ -94,7 +93,7 @@ index 000000000000..f08e2a7178c5 +}; + +&ir { -+ linux,rc-map-name = "rc-mecool-ki-plus"; ++ linux,rc-map-name = "rc-mecool-ki-plus"; +}; + +&usb_pwr { @@ -102,7 +101,7 @@ index 000000000000..f08e2a7178c5 +}; diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-mecool-kii-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-mecool-kii-pro.dts new file mode 100644 -index 000000000000..4f43aff680c3 +index 000000000000..83bd0204b153 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-mecool-kii-pro.dts @@ -0,0 +1,34 @@ @@ -115,13 +114,13 @@ index 000000000000..4f43aff680c3 +#include "meson-gxbb-p201.dts" + +/ { -+ compatible = "mecool,gxbb-kii-pro", "amlogic,meson-gxbb"; ++ compatible = "mecool,gxbb-kii-pro", "amlogic,meson-gxbb"; + model = "MeCool KII Pro"; + + clock: meson_clock { + compatible = "amlogic, gxbb-clock"; + reg = <0x0 0xc883c000 0x0 0x1000>, -+ <0x0 0xc8100000 0x0 0x1000>; ++ <0x0 0xc8100000 0x0 0x1000>; + #clock-cells = <1>; + #reset-cells = <1>; + sys_max = <1536000000>; @@ -134,7 +133,7 @@ index 000000000000..4f43aff680c3 +}; + +&ir { -+ linux,rc-map-name = "rc-mecool-kii-pro"; ++ linux,rc-map-name = "rc-mecool-kii-pro"; +}; + +&usb_pwr { @@ -142,7 +141,7 @@ index 000000000000..4f43aff680c3 +}; diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-ki-plus.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-ki-plus.dts new file mode 100644 -index 000000000000..c034225b9d9c +index 000000000000..7369c4111c43 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-ki-plus.dts @@ -0,0 +1,21 @@ @@ -155,7 +154,7 @@ index 000000000000..c034225b9d9c +#include "meson-gxl-s905d-p231.dts" + +/ { -+ compatible = "mecool,ki-plus", "amlogic,s905d", "amlogic,meson-gxl"; ++ compatible = "mecool,ki-plus", "amlogic,s905d", "amlogic,meson-gxl"; + model = "MeCool KI Plus"; + + memory@0 { @@ -165,11 +164,11 @@ index 000000000000..c034225b9d9c +}; + +&ir { -+ linux,rc-map-name = "rc-mecool-ki-plus"; ++ linux,rc-map-name = "rc-mecool-ki-plus"; +}; diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-ki-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-ki-pro.dts new file mode 100644 -index 000000000000..606c5dc2efb2 +index 000000000000..65e1a738a563 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-ki-pro.dts @@ -0,0 +1,16 @@ @@ -182,16 +181,16 @@ index 000000000000..606c5dc2efb2 +#include "meson-gxl-s905d-p230.dts" + +/ { -+ compatible = "mecool,ki-pro", "amlogic,s905d", "amlogic,meson-gxl"; ++ compatible = "mecool,ki-pro", "amlogic,s905d", "amlogic,meson-gxl"; + model = "MeCool KI Pro"; +}; + +&ir { -+ linux,rc-map-name = "rc-mecool-ki-pro"; ++ linux,rc-map-name = "rc-mecool-ki-pro"; +}; diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-kii-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-kii-pro.dts new file mode 100644 -index 000000000000..8db4d097f667 +index 000000000000..2605d6eb6ca5 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-kii-pro.dts @@ -0,0 +1,16 @@ @@ -204,16 +203,16 @@ index 000000000000..8db4d097f667 +#include "meson-gxl-s905d-p231.dts" + +/ { -+ compatible = "mecool,kii-pro", "amlogic,s905d", "amlogic,meson-gxl"; ++ compatible = "mecool,kii-pro", "amlogic,s905d", "amlogic,meson-gxl"; + model = "MeCool KII Pro"; +}; + +&ir { -+ linux,rc-map-name = "rc-mecool-kii-pro"; ++ linux,rc-map-name = "rc-mecool-kii-pro"; +}; diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-m8s-plus.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-m8s-plus.dts new file mode 100644 -index 000000000000..2da13c9f69b6 +index 000000000000..ac9f4ad205ac --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-m8s-plus.dts @@ -0,0 +1,16 @@ @@ -226,19 +225,19 @@ index 000000000000..2da13c9f69b6 +#include "meson-gxl-s905d-p231.dts" + +/ { -+ compatible = "mecool,kii-pro", "amlogic,s905d", "amlogic,meson-gxl"; ++ compatible = "mecool,kii-pro", "amlogic,s905d", "amlogic,meson-gxl"; + model = "MeCool M8S Plus"; +}; + +&ir { -+ linux,rc-map-name = "rc-mecool-m8s-plus"; ++ linux,rc-map-name = "rc-mecool-m8s-plus"; +}; diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-mecool-kiii-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-mecool-kiii-pro.dts new file mode 100644 -index 000000000000..453779ac1d14 +index 000000000000..ca0ac6bc52ad --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-gxm-mecool-kiii-pro.dts -@@ -0,0 +1,22 @@ +@@ -0,0 +1,21 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +/* @@ -248,8 +247,7 @@ index 000000000000..453779ac1d14 +#include "meson-gxm-q200.dts" + +/ { -+ compatible = "mecool,gxm-kiii-pro", "amlogic,s912", -+ "amlogic,meson-gxm"; ++ compatible = "mecool,gxm-kiii-pro", "amlogic,s912", "amlogic,meson-gxm"; + model = "MeCool KIII Pro"; + + memory@0 { @@ -259,7 +257,7 @@ index 000000000000..453779ac1d14 +}; + +&ir { -+ linux,rc-map-name = "rc-mecool-kiii-pro"; ++ linux,rc-map-name = "rc-mecool-kiii-pro"; +}; -- 2.17.1 diff --git a/projects/Amlogic/patches/linux/amlogic-0058-FROMGIT-phy-amlogic-meson8b-usb2-Add-a-compatible-st.patch b/projects/Amlogic/patches/linux/amlogic-0058-FROMGIT-phy-amlogic-meson8b-usb2-Add-a-compatible-st.patch deleted file mode 100644 index f8dae7dd4c9..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0058-FROMGIT-phy-amlogic-meson8b-usb2-Add-a-compatible-st.patch +++ /dev/null @@ -1,56 +0,0 @@ -From d3ffc291448009eb2790ceb68d3388ee6914f378 Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 1 Jun 2020 09:11:10 +0000 -Subject: [PATCH 058/156] FROMGIT: phy: amlogic: meson8b-usb2: Add a compatible - string for Meson8m2 - -The 3.10 vendor kernel sets the ACA_ENABLE bit on Meson8b, Meson8m2 and -GXBB, but not on Meson8. Add a compatible string for Meson8m2 which also -sets that bit. -While here, also update the Kconfig text and MODULE_DESCRIPTION. - -Tested-by: Thomas Graichen -Signed-off-by: Martin Blumenstingl ---- - drivers/phy/amlogic/Kconfig | 2 +- - drivers/phy/amlogic/phy-meson8b-usb2.c | 6 +++++- - 2 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/drivers/phy/amlogic/Kconfig b/drivers/phy/amlogic/Kconfig -index 3495b23af797..5ec53874d1ea 100644 ---- a/drivers/phy/amlogic/Kconfig -+++ b/drivers/phy/amlogic/Kconfig -@@ -3,7 +3,7 @@ - # Phy drivers for Amlogic platforms - # - config PHY_MESON8B_USB2 -- tristate "Meson8, Meson8b and GXBB USB2 PHY driver" -+ tristate "Meson8, Meson8b, Meson8m2 and GXBB USB2 PHY driver" - default ARCH_MESON - depends on OF && (ARCH_MESON || COMPILE_TEST) - depends on USB_SUPPORT -diff --git a/drivers/phy/amlogic/phy-meson8b-usb2.c b/drivers/phy/amlogic/phy-meson8b-usb2.c -index 436dfa1a8a04..03c061dd5f0d 100644 ---- a/drivers/phy/amlogic/phy-meson8b-usb2.c -+++ b/drivers/phy/amlogic/phy-meson8b-usb2.c -@@ -302,6 +302,10 @@ static const struct of_device_id phy_meson8b_usb2_of_match[] = { - .compatible = "amlogic,meson8b-usb2-phy", - .data = &phy_meson8b_usb2_match_data - }, -+ { -+ .compatible = "amlogic,meson8m2-usb2-phy", -+ .data = &phy_meson8b_usb2_match_data -+ }, - { - .compatible = "amlogic,meson-gxbb-usb2-phy", - .data = &phy_meson8b_usb2_match_data -@@ -320,5 +324,5 @@ static struct platform_driver phy_meson8b_usb2_driver = { - module_platform_driver(phy_meson8b_usb2_driver); - - MODULE_AUTHOR("Martin Blumenstingl "); --MODULE_DESCRIPTION("Meson8, Meson8b and GXBB USB2 PHY driver"); -+MODULE_DESCRIPTION("Meson8, Meson8b, Meson8m2 and GXBB USB2 PHY driver"); - MODULE_LICENSE("GPL"); --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0058-arm64-dts-meson-convert-meson-sm1-odroid-c4-to-dtsi.patch b/projects/Amlogic/patches/linux/amlogic-0058-arm64-dts-meson-convert-meson-sm1-odroid-c4-to-dtsi.patch new file mode 100644 index 00000000000..8590f7c03ad --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0058-arm64-dts-meson-convert-meson-sm1-odroid-c4-to-dtsi.patch @@ -0,0 +1,952 @@ +From f67fd1a6f673dbf4cf22656a887491566d314b6a Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Sun, 27 Dec 2020 14:54:44 +0000 +Subject: [PATCH 58/79] arm64: dts: meson: convert meson-sm1-odroid-c4 to dtsi + +Convert the ODRIOD-C4 dts to meson-sm1-odroid.dtsi and C4 board dts in +preparation for adding additional C4 family boards. + +Signed-off-by: Christian Hewitt +--- + .../boot/dts/amlogic/meson-sm1-odroid-c4.dts | 438 +---------------- + .../boot/dts/amlogic/meson-sm1-odroid.dtsi | 447 ++++++++++++++++++ + 2 files changed, 449 insertions(+), 436 deletions(-) + create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi + +diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts +index a712273c905a..b10f9df212a7 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts +@@ -5,38 +5,16 @@ + + /dts-v1/; + +-#include "meson-sm1.dtsi" +-#include +-#include +-#include ++#include "meson-sm1-odroid.dtsi" + + / { + compatible = "hardkernel,odroid-c4", "amlogic,sm1"; + model = "Hardkernel ODROID-C4"; + +- aliases { +- serial0 = &uart_AO; +- ethernet0 = ðmac; +- }; +- +- chosen { +- stdout-path = "serial0:115200n8"; +- }; +- +- memory@0 { +- device_type = "memory"; +- reg = <0x0 0x0 0x0 0x40000000>; +- }; +- +- emmc_pwrseq: emmc-pwrseq { +- compatible = "mmc-pwrseq-emmc"; +- reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>; +- }; +- + leds { + compatible = "gpio-leds"; + +- led-blue { ++ blue { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>; +@@ -45,96 +23,6 @@ + }; + }; + +- tflash_vdd: regulator-tflash_vdd { +- compatible = "regulator-fixed"; +- +- regulator-name = "TFLASH_VDD"; +- regulator-min-microvolt = <3300000>; +- regulator-max-microvolt = <3300000>; +- +- gpio = <&gpio_ao GPIOAO_3 GPIO_OPEN_DRAIN>; +- enable-active-high; +- regulator-always-on; +- }; +- +- tf_io: gpio-regulator-tf_io { +- compatible = "regulator-gpio"; +- +- regulator-name = "TF_IO"; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <3300000>; +- +- gpios = <&gpio_ao GPIOAO_6 GPIO_ACTIVE_HIGH>; +- gpios-states = <0>; +- +- states = <3300000 0>, +- <1800000 1>; +- }; +- +- flash_1v8: regulator-flash_1v8 { +- compatible = "regulator-fixed"; +- regulator-name = "FLASH_1V8"; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <1800000>; +- vin-supply = <&vcc_3v3>; +- regulator-always-on; +- }; +- +- main_12v: regulator-main_12v { +- compatible = "regulator-fixed"; +- regulator-name = "12V"; +- regulator-min-microvolt = <12000000>; +- regulator-max-microvolt = <12000000>; +- regulator-always-on; +- }; +- +- vcc_5v: regulator-vcc_5v { +- compatible = "regulator-fixed"; +- regulator-name = "5V"; +- regulator-min-microvolt = <5000000>; +- regulator-max-microvolt = <5000000>; +- regulator-always-on; +- vin-supply = <&main_12v>; +- }; +- +- vcc_1v8: regulator-vcc_1v8 { +- compatible = "regulator-fixed"; +- regulator-name = "VCC_1V8"; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <1800000>; +- vin-supply = <&vcc_3v3>; +- regulator-always-on; +- }; +- +- vcc_3v3: regulator-vcc_3v3 { +- compatible = "regulator-fixed"; +- regulator-name = "VCC_3V3"; +- regulator-min-microvolt = <3300000>; +- regulator-max-microvolt = <3300000>; +- vin-supply = <&vddao_3v3>; +- regulator-always-on; +- /* FIXME: actually controlled by VDDCPU_B_EN */ +- }; +- +- vddcpu: regulator-vddcpu { +- /* +- * MP8756GD Regulator. +- */ +- compatible = "pwm-regulator"; +- +- regulator-name = "VDDCPU"; +- regulator-min-microvolt = <721000>; +- regulator-max-microvolt = <1022000>; +- +- vin-supply = <&main_12v>; +- +- pwms = <&pwm_AO_cd 1 1250 0>; +- pwm-dutycycle-range = <100 0>; +- +- regulator-boot-on; +- regulator-always-on; +- }; +- + hub_5v: regulator-hub_5v { + compatible = "regulator-fixed"; + regulator-name = "HUB_5V"; +@@ -146,216 +34,9 @@ + gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; +- +- usb_pwr_en: regulator-usb_pwr_en { +- compatible = "regulator-fixed"; +- regulator-name = "USB_PWR_EN"; +- regulator-min-microvolt = <5000000>; +- regulator-max-microvolt = <5000000>; +- vin-supply = <&vcc_5v>; +- +- /* Connected to the microUSB port power enable */ +- gpio = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>; +- enable-active-high; +- }; +- +- vddao_1v8: regulator-vddao_1v8 { +- compatible = "regulator-fixed"; +- regulator-name = "VDDAO_1V8"; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <1800000>; +- vin-supply = <&vddao_3v3>; +- regulator-always-on; +- }; +- +- vddao_3v3: regulator-vddao_3v3 { +- compatible = "regulator-fixed"; +- regulator-name = "VDDAO_3V3"; +- regulator-min-microvolt = <3300000>; +- regulator-max-microvolt = <3300000>; +- vin-supply = <&main_12v>; +- regulator-always-on; +- }; +- +- hdmi-connector { +- compatible = "hdmi-connector"; +- type = "a"; +- +- port { +- hdmi_connector_in: endpoint { +- remote-endpoint = <&hdmi_tx_tmds_out>; +- }; +- }; +- }; +- +- sound { +- compatible = "amlogic,axg-sound-card"; +- model = "SM1-ODROID-C4"; +- audio-aux-devs = <&tdmout_b>; +- audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", +- "TDMOUT_B IN 1", "FRDDR_B OUT 1", +- "TDMOUT_B IN 2", "FRDDR_C OUT 1", +- "TDM_B Playback", "TDMOUT_B OUT"; +- +- assigned-clocks = <&clkc CLKID_MPLL2>, +- <&clkc CLKID_MPLL0>, +- <&clkc CLKID_MPLL1>; +- assigned-clock-parents = <0>, <0>, <0>; +- assigned-clock-rates = <294912000>, +- <270950400>, +- <393216000>; +- status = "okay"; +- +- dai-link-0 { +- sound-dai = <&frddr_a>; +- }; +- +- dai-link-1 { +- sound-dai = <&frddr_b>; +- }; +- +- dai-link-2 { +- sound-dai = <&frddr_c>; +- }; +- +- /* 8ch hdmi interface */ +- dai-link-3 { +- sound-dai = <&tdmif_b>; +- dai-format = "i2s"; +- dai-tdm-slot-tx-mask-0 = <1 1>; +- dai-tdm-slot-tx-mask-1 = <1 1>; +- dai-tdm-slot-tx-mask-2 = <1 1>; +- dai-tdm-slot-tx-mask-3 = <1 1>; +- mclk-fs = <256>; +- +- codec { +- sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; +- }; +- }; +- +- /* hdmi glue */ +- dai-link-4 { +- sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; +- +- codec { +- sound-dai = <&hdmi_tx>; +- }; +- }; +- }; +-}; +- +-&arb { +- status = "okay"; +-}; +- +-&clkc_audio { +- status = "okay"; +-}; +- +-&cpu0 { +- cpu-supply = <&vddcpu>; +- operating-points-v2 = <&cpu_opp_table>; +- clocks = <&clkc CLKID_CPU_CLK>; +- clock-latency = <50000>; +-}; +- +-&cpu1 { +- cpu-supply = <&vddcpu>; +- operating-points-v2 = <&cpu_opp_table>; +- clocks = <&clkc CLKID_CPU1_CLK>; +- clock-latency = <50000>; +-}; +- +-&cpu2 { +- cpu-supply = <&vddcpu>; +- operating-points-v2 = <&cpu_opp_table>; +- clocks = <&clkc CLKID_CPU2_CLK>; +- clock-latency = <50000>; +-}; +- +-&cpu3 { +- cpu-supply = <&vddcpu>; +- operating-points-v2 = <&cpu_opp_table>; +- clocks = <&clkc CLKID_CPU3_CLK>; +- clock-latency = <50000>; +-}; +- +-&ext_mdio { +- external_phy: ethernet-phy@0 { +- /* Realtek RTL8211F (0x001cc916) */ +- reg = <0>; +- max-speed = <1000>; +- +- interrupt-parent = <&gpio_intc>; +- /* MAC_INTR on GPIOZ_14 */ +- interrupts = <26 IRQ_TYPE_LEVEL_LOW>; +- }; +-}; +- +-ðmac { +- pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; +- pinctrl-names = "default"; +- status = "okay"; +- phy-mode = "rgmii"; +- phy-handle = <&external_phy>; +- amlogic,tx-delay-ns = <2>; +-}; +- +-&frddr_a { +- status = "okay"; +-}; +- +-&frddr_b { +- status = "okay"; +-}; +- +-&frddr_c { +- status = "okay"; + }; + + &gpio { +- gpio-line-names = +- /* GPIOZ */ +- "", "", "", "", "", "", "", "", +- "", "", "", "", "", "", "", "", +- /* GPIOH */ +- "", "", "", "", "", +- "PIN_36", /* GPIOH_5 */ +- "PIN_26", /* GPIOH_6 */ +- "PIN_32", /* GPIOH_7 */ +- "", +- /* BOOT */ +- "", "", "", "", "", "", "", "", +- "", "", "", "", "", "", "", "", +- /* GPIOC */ +- "", "", "", "", "", "", "", "", +- /* GPIOA */ +- "", "", "", "", "", "", "", "", +- "", "", "", "", "", "", +- "PIN_27", /* GPIOA_14 */ +- "PIN_28", /* GPIOA_15 */ +- /* GPIOX */ +- "PIN_16", /* GPIOX_0 */ +- "PIN_18", /* GPIOX_1 */ +- "PIN_22", /* GPIOX_2 */ +- "PIN_11", /* GPIOX_3 */ +- "PIN_13", /* GPIOX_4 */ +- "PIN_7", /* GPIOX_5 */ +- "PIN_33", /* GPIOX_6 */ +- "PIN_15", /* GPIOX_7 */ +- "PIN_19", /* GPIOX_8 */ +- "PIN_21", /* GPIOX_9 */ +- "PIN_24", /* GPIOX_10 */ +- "PIN_23", /* GPIOX_11 */ +- "PIN_8", /* GPIOX_12 */ +- "PIN_10", /* GPIOX_13 */ +- "PIN_29", /* GPIOX_14 */ +- "PIN_31", /* GPIOX_15 */ +- "PIN_12", /* GPIOX_16 */ +- "PIN_3", /* GPIOX_17 */ +- "PIN_5", /* GPIOX_18 */ +- "PIN_35"; /* GPIOX_19 */ +- + /* + * WARNING: The USB Hub on the Odroid-C4 needs a reset signal + * to be turned high in order to be detected by the USB Controller +@@ -370,121 +51,6 @@ + }; + }; + +-&gpio_ao { +- gpio-line-names = +- /* GPIOAO */ +- "", "", "", "", +- "PIN_47", /* GPIOAO_4 */ +- "", "", +- "PIN_45", /* GPIOAO_7 */ +- "PIN_46", /* GPIOAO_8 */ +- "PIN_44", /* GPIOAO_9 */ +- "PIN_42", /* GPIOAO_10 */ +- "", +- /* GPIOE */ +- "", "", ""; +-}; +- +-&hdmi_tx { +- status = "okay"; +- pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>; +- pinctrl-names = "default"; +- hdmi-supply = <&vcc_5v>; +-}; +- +-&hdmi_tx_tmds_port { +- hdmi_tx_tmds_out: endpoint { +- remote-endpoint = <&hdmi_connector_in>; +- }; +-}; +- + &ir { +- status = "okay"; +- pinctrl-0 = <&remote_input_ao_pins>; +- pinctrl-names = "default"; + linux,rc-map-name = "rc-odroid"; + }; +- +-&pwm_AO_cd { +- pinctrl-0 = <&pwm_ao_d_e_pins>; +- pinctrl-names = "default"; +- clocks = <&xtal>; +- clock-names = "clkin1"; +- status = "okay"; +-}; +- +-&saradc { +- status = "okay"; +-}; +- +-/* SD card */ +-&sd_emmc_b { +- status = "okay"; +- pinctrl-0 = <&sdcard_c_pins>; +- pinctrl-1 = <&sdcard_clk_gate_c_pins>; +- pinctrl-names = "default", "clk-gate"; +- +- bus-width = <4>; +- cap-sd-highspeed; +- max-frequency = <200000000>; +- sd-uhs-sdr12; +- sd-uhs-sdr25; +- sd-uhs-sdr50; +- sd-uhs-sdr104; +- disable-wp; +- +- cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>; +- vmmc-supply = <&tflash_vdd>; +- vqmmc-supply = <&tf_io>; +-}; +- +-/* eMMC */ +-&sd_emmc_c { +- status = "okay"; +- pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>; +- pinctrl-1 = <&emmc_clk_gate_pins>; +- pinctrl-names = "default", "clk-gate"; +- +- bus-width = <8>; +- cap-mmc-highspeed; +- mmc-ddr-1_8v; +- mmc-hs200-1_8v; +- max-frequency = <200000000>; +- disable-wp; +- +- mmc-pwrseq = <&emmc_pwrseq>; +- vmmc-supply = <&vcc_3v3>; +- vqmmc-supply = <&flash_1v8>; +-}; +- +-&tdmif_b { +- status = "okay"; +-}; +- +-&tdmout_b { +- status = "okay"; +-}; +- +-&tohdmitx { +- status = "okay"; +-}; +- +-&uart_AO { +- status = "okay"; +- pinctrl-0 = <&uart_ao_a_pins>; +- pinctrl-names = "default"; +-}; +- +-&usb { +- status = "okay"; +- vbus-supply = <&usb_pwr_en>; +-}; +- +-&usb2_phy0 { +- phy-supply = <&vcc_5v>; +-}; +- +-&usb2_phy1 { +- /* Enable the hub which is connected to this port */ +- phy-supply = <&hub_5v>; +-}; +diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi +new file mode 100644 +index 000000000000..49e1bb7a4294 +--- /dev/null ++++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi +@@ -0,0 +1,447 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright (c) 2020 Dongjin Kim ++ */ ++ ++#include "meson-sm1.dtsi" ++#include ++#include ++#include ++ ++/ { ++ aliases { ++ serial0 = &uart_AO; ++ ethernet0 = ðmac; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x0 0x0 0x0 0x40000000>; ++ }; ++ ++ emmc_pwrseq: emmc-pwrseq { ++ compatible = "mmc-pwrseq-emmc"; ++ reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>; ++ }; ++ ++ tflash_vdd: regulator-tflash_vdd { ++ compatible = "regulator-fixed"; ++ ++ regulator-name = "TFLASH_VDD"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ ++ gpio = <&gpio_ao GPIOAO_3 GPIO_OPEN_DRAIN>; ++ enable-active-high; ++ regulator-always-on; ++ }; ++ ++ tf_io: gpio-regulator-tf_io { ++ compatible = "regulator-gpio"; ++ ++ regulator-name = "TF_IO"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <3300000>; ++ ++ gpios = <&gpio_ao GPIOAO_6 GPIO_ACTIVE_HIGH>; ++ gpios-states = <0>; ++ ++ states = <3300000 0>, ++ <1800000 1>; ++ }; ++ ++ flash_1v8: regulator-flash_1v8 { ++ compatible = "regulator-fixed"; ++ regulator-name = "FLASH_1V8"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ vin-supply = <&vcc_3v3>; ++ regulator-always-on; ++ }; ++ ++ main_12v: regulator-main_12v { ++ compatible = "regulator-fixed"; ++ regulator-name = "12V"; ++ regulator-min-microvolt = <12000000>; ++ regulator-max-microvolt = <12000000>; ++ regulator-always-on; ++ }; ++ ++ vcc_5v: regulator-vcc_5v { ++ compatible = "regulator-fixed"; ++ regulator-name = "5V"; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ regulator-always-on; ++ vin-supply = <&main_12v>; ++ }; ++ ++ vcc_1v8: regulator-vcc_1v8 { ++ compatible = "regulator-fixed"; ++ regulator-name = "VCC_1V8"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ vin-supply = <&vcc_3v3>; ++ regulator-always-on; ++ }; ++ ++ vcc_3v3: regulator-vcc_3v3 { ++ compatible = "regulator-fixed"; ++ regulator-name = "VCC_3V3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ vin-supply = <&vddao_3v3>; ++ regulator-always-on; ++ /* FIXME: actually controlled by VDDCPU_B_EN */ ++ }; ++ ++ vddcpu: regulator-vddcpu { ++ /* ++ * MP8756GD Regulator. ++ */ ++ compatible = "pwm-regulator"; ++ ++ regulator-name = "VDDCPU"; ++ regulator-min-microvolt = <721000>; ++ regulator-max-microvolt = <1022000>; ++ ++ vin-supply = <&main_12v>; ++ ++ pwms = <&pwm_AO_cd 1 1250 0>; ++ pwm-dutycycle-range = <100 0>; ++ ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ usb_pwr_en: regulator-usb_pwr_en { ++ compatible = "regulator-fixed"; ++ regulator-name = "USB_PWR_EN"; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ vin-supply = <&vcc_5v>; ++ ++ /* Connected to the microUSB port power enable */ ++ gpio = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>; ++ enable-active-high; ++ }; ++ ++ vddao_1v8: regulator-vddao_1v8 { ++ compatible = "regulator-fixed"; ++ regulator-name = "VDDAO_1V8"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ vin-supply = <&vddao_3v3>; ++ regulator-always-on; ++ }; ++ ++ vddao_3v3: regulator-vddao_3v3 { ++ compatible = "regulator-fixed"; ++ regulator-name = "VDDAO_3V3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ vin-supply = <&main_12v>; ++ regulator-always-on; ++ }; ++ ++ hdmi-connector { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi_connector_in: endpoint { ++ remote-endpoint = <&hdmi_tx_tmds_out>; ++ }; ++ }; ++ }; ++ ++ sound { ++ compatible = "amlogic,axg-sound-card"; ++ model = "SM1-ODROID-C4"; ++ audio-aux-devs = <&tdmout_b>; ++ audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", ++ "TDMOUT_B IN 1", "FRDDR_B OUT 1", ++ "TDMOUT_B IN 2", "FRDDR_C OUT 1", ++ "TDM_B Playback", "TDMOUT_B OUT"; ++ ++ assigned-clocks = <&clkc CLKID_MPLL2>, ++ <&clkc CLKID_MPLL0>, ++ <&clkc CLKID_MPLL1>; ++ assigned-clock-parents = <0>, <0>, <0>; ++ assigned-clock-rates = <294912000>, ++ <270950400>, ++ <393216000>; ++ status = "okay"; ++ ++ dai-link-0 { ++ sound-dai = <&frddr_a>; ++ }; ++ ++ dai-link-1 { ++ sound-dai = <&frddr_b>; ++ }; ++ ++ dai-link-2 { ++ sound-dai = <&frddr_c>; ++ }; ++ ++ /* 8ch hdmi interface */ ++ dai-link-3 { ++ sound-dai = <&tdmif_b>; ++ dai-format = "i2s"; ++ dai-tdm-slot-tx-mask-0 = <1 1>; ++ dai-tdm-slot-tx-mask-1 = <1 1>; ++ dai-tdm-slot-tx-mask-2 = <1 1>; ++ dai-tdm-slot-tx-mask-3 = <1 1>; ++ mclk-fs = <256>; ++ ++ codec { ++ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; ++ }; ++ }; ++ ++ /* hdmi glue */ ++ dai-link-4 { ++ sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; ++ ++ codec { ++ sound-dai = <&hdmi_tx>; ++ }; ++ }; ++ }; ++}; ++ ++&arb { ++ status = "okay"; ++}; ++ ++&clkc_audio { ++ status = "okay"; ++}; ++ ++&cpu0 { ++ cpu-supply = <&vddcpu>; ++ operating-points-v2 = <&cpu_opp_table>; ++ clocks = <&clkc CLKID_CPU_CLK>; ++ clock-latency = <50000>; ++}; ++ ++&cpu1 { ++ cpu-supply = <&vddcpu>; ++ operating-points-v2 = <&cpu_opp_table>; ++ clocks = <&clkc CLKID_CPU1_CLK>; ++ clock-latency = <50000>; ++}; ++ ++&cpu2 { ++ cpu-supply = <&vddcpu>; ++ operating-points-v2 = <&cpu_opp_table>; ++ clocks = <&clkc CLKID_CPU2_CLK>; ++ clock-latency = <50000>; ++}; ++ ++&cpu3 { ++ cpu-supply = <&vddcpu>; ++ operating-points-v2 = <&cpu_opp_table>; ++ clocks = <&clkc CLKID_CPU3_CLK>; ++ clock-latency = <50000>; ++}; ++ ++&ext_mdio { ++ external_phy: ethernet-phy@0 { ++ /* Realtek RTL8211F (0x001cc916) */ ++ reg = <0>; ++ max-speed = <1000>; ++ ++ interrupt-parent = <&gpio_intc>; ++ /* MAC_INTR on GPIOZ_14 */ ++ interrupts = <26 IRQ_TYPE_LEVEL_LOW>; ++ }; ++}; ++ ++ðmac { ++ pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; ++ pinctrl-names = "default"; ++ status = "okay"; ++ phy-mode = "rgmii"; ++ phy-handle = <&external_phy>; ++ amlogic,tx-delay-ns = <2>; ++}; ++ ++&frddr_a { ++ status = "okay"; ++}; ++ ++&frddr_b { ++ status = "okay"; ++}; ++ ++&frddr_c { ++ status = "okay"; ++}; ++ ++&gpio { ++ gpio-line-names = ++ /* GPIOZ */ ++ "", "", "", "", "", "", "", "", ++ "", "", "", "", "", "", "", "", ++ /* GPIOH */ ++ "", "", "", "", "", ++ "PIN_36", /* GPIOH_5 */ ++ "PIN_26", /* GPIOH_6 */ ++ "PIN_32", /* GPIOH_7 */ ++ "", ++ /* BOOT */ ++ "", "", "", "", "", "", "", "", ++ "", "", "", "", "", "", "", "", ++ /* GPIOC */ ++ "", "", "", "", "", "", "", "", ++ /* GPIOA */ ++ "", "", "", "", "", "", "", "", ++ "", "", "", "", "", "", ++ "PIN_27", /* GPIOA_14 */ ++ "PIN_28", /* GPIOA_15 */ ++ /* GPIOX */ ++ "PIN_16", /* GPIOX_0 */ ++ "PIN_18", /* GPIOX_1 */ ++ "PIN_22", /* GPIOX_2 */ ++ "PIN_11", /* GPIOX_3 */ ++ "PIN_13", /* GPIOX_4 */ ++ "PIN_7", /* GPIOX_5 */ ++ "PIN_33", /* GPIOX_6 */ ++ "PIN_15", /* GPIOX_7 */ ++ "PIN_19", /* GPIOX_8 */ ++ "PIN_21", /* GPIOX_9 */ ++ "PIN_24", /* GPIOX_10 */ ++ "PIN_23", /* GPIOX_11 */ ++ "PIN_8", /* GPIOX_12 */ ++ "PIN_10", /* GPIOX_13 */ ++ "PIN_29", /* GPIOX_14 */ ++ "PIN_31", /* GPIOX_15 */ ++ "PIN_12", /* GPIOX_16 */ ++ "PIN_3", /* GPIOX_17 */ ++ "PIN_5", /* GPIOX_18 */ ++ "PIN_35"; /* GPIOX_19 */ ++}; ++ ++&gpio_ao { ++ gpio-line-names = ++ /* GPIOAO */ ++ "", "", "", "", ++ "PIN_47", /* GPIOAO_4 */ ++ "", "", ++ "PIN_45", /* GPIOAO_7 */ ++ "PIN_46", /* GPIOAO_8 */ ++ "PIN_44", /* GPIOAO_9 */ ++ "PIN_42", /* GPIOAO_10 */ ++ "", ++ /* GPIOE */ ++ "", "", ""; ++}; ++ ++&hdmi_tx { ++ status = "okay"; ++ pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>; ++ pinctrl-names = "default"; ++ hdmi-supply = <&vcc_5v>; ++}; ++ ++&hdmi_tx_tmds_port { ++ hdmi_tx_tmds_out: endpoint { ++ remote-endpoint = <&hdmi_connector_in>; ++ }; ++}; ++ ++&ir { ++ status = "okay"; ++ pinctrl-0 = <&remote_input_ao_pins>; ++ pinctrl-names = "default"; ++}; ++ ++&pwm_AO_cd { ++ pinctrl-0 = <&pwm_ao_d_e_pins>; ++ pinctrl-names = "default"; ++ clocks = <&xtal>; ++ clock-names = "clkin1"; ++ status = "okay"; ++}; ++ ++&saradc { ++ status = "okay"; ++}; ++ ++/* SD card */ ++&sd_emmc_b { ++ status = "okay"; ++ pinctrl-0 = <&sdcard_c_pins>; ++ pinctrl-1 = <&sdcard_clk_gate_c_pins>; ++ pinctrl-names = "default", "clk-gate"; ++ ++ bus-width = <4>; ++ cap-sd-highspeed; ++ max-frequency = <200000000>; ++ sd-uhs-sdr12; ++ sd-uhs-sdr25; ++ sd-uhs-sdr50; ++ sd-uhs-sdr104; ++ disable-wp; ++ ++ cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>; ++ vmmc-supply = <&tflash_vdd>; ++ vqmmc-supply = <&tf_io>; ++}; ++ ++/* eMMC */ ++&sd_emmc_c { ++ status = "okay"; ++ pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>; ++ pinctrl-1 = <&emmc_clk_gate_pins>; ++ pinctrl-names = "default", "clk-gate"; ++ ++ bus-width = <8>; ++ cap-mmc-highspeed; ++ mmc-ddr-1_8v; ++ mmc-hs200-1_8v; ++ max-frequency = <200000000>; ++ disable-wp; ++ ++ mmc-pwrseq = <&emmc_pwrseq>; ++ vmmc-supply = <&vcc_3v3>; ++ vqmmc-supply = <&flash_1v8>; ++}; ++ ++&tdmif_b { ++ status = "okay"; ++}; ++ ++&tdmout_b { ++ status = "okay"; ++}; ++ ++&tohdmitx { ++ status = "okay"; ++}; ++ ++&uart_AO { ++ status = "okay"; ++ pinctrl-0 = <&uart_ao_a_pins>; ++ pinctrl-names = "default"; ++}; ++ ++&usb { ++ status = "okay"; ++ vbus-supply = <&usb_pwr_en>; ++}; ++ ++&usb2_phy0 { ++ phy-supply = <&vcc_5v>; ++}; ++ ++&usb2_phy1 { ++ /* Enable the hub which is connected to this port */ ++ phy-supply = <&hub_5v>; ++}; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0059-FROMGIT-ARM-dts-meson-Add-the-Ethernet-timing-adjust.patch b/projects/Amlogic/patches/linux/amlogic-0059-FROMGIT-ARM-dts-meson-Add-the-Ethernet-timing-adjust.patch deleted file mode 100644 index bc6f6ac932e..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0059-FROMGIT-ARM-dts-meson-Add-the-Ethernet-timing-adjust.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 33fd227a0f99d3b068e18fb5338a2e748ca7600c Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 1 Jun 2020 09:17:35 +0000 -Subject: [PATCH 059/156] FROMGIT: ARM: dts: meson: Add the Ethernet - "timing-adjustment" clock - -Add the "timing-adjusment" clock now that we now that this is connected -to the PRG_ETHERNET registers. It is used internally to generate the -RGMII RX delay no the MAC side (if needed). - -Signed-off-by: Martin Blumenstingl ---- - arch/arm/boot/dts/meson8b.dtsi | 5 +++-- - arch/arm/boot/dts/meson8m2.dtsi | 5 +++-- - 2 files changed, 6 insertions(+), 4 deletions(-) - -diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi -index e34b039b9357..ba36168b9c1b 100644 ---- a/arch/arm/boot/dts/meson8b.dtsi -+++ b/arch/arm/boot/dts/meson8b.dtsi -@@ -425,8 +425,9 @@ - - clocks = <&clkc CLKID_ETH>, - <&clkc CLKID_MPLL2>, -- <&clkc CLKID_MPLL2>; -- clock-names = "stmmaceth", "clkin0", "clkin1"; -+ <&clkc CLKID_MPLL2>, -+ <&clkc CLKID_FCLK_DIV2>; -+ clock-names = "stmmaceth", "clkin0", "clkin1", "timing-adjustment"; - rx-fifo-depth = <4096>; - tx-fifo-depth = <2048>; - -diff --git a/arch/arm/boot/dts/meson8m2.dtsi b/arch/arm/boot/dts/meson8m2.dtsi -index 5bde7f502007..96b37d5e9afd 100644 ---- a/arch/arm/boot/dts/meson8m2.dtsi -+++ b/arch/arm/boot/dts/meson8m2.dtsi -@@ -30,8 +30,9 @@ - 0xc1108140 0x8>; - clocks = <&clkc CLKID_ETH>, - <&clkc CLKID_MPLL2>, -- <&clkc CLKID_MPLL2>; -- clock-names = "stmmaceth", "clkin0", "clkin1"; -+ <&clkc CLKID_MPLL2>, -+ <&clkc CLKID_FCLK_DIV2>; -+ clock-names = "stmmaceth", "clkin0", "clkin1", "timing-adjustment"; - resets = <&reset RESET_ETHERNET>; - reset-names = "stmmaceth"; - }; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0059-dt-bindings-arm-amlogic-add-ODROID-HC4-bindings.patch b/projects/Amlogic/patches/linux/amlogic-0059-dt-bindings-arm-amlogic-add-ODROID-HC4-bindings.patch new file mode 100644 index 00000000000..27f575af7fd --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0059-dt-bindings-arm-amlogic-add-ODROID-HC4-bindings.patch @@ -0,0 +1,27 @@ +From 0618c6b606c65954b587cfc624dbc77483e029fc Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Sat, 12 Dec 2020 05:44:14 +0000 +Subject: [PATCH 59/79] dt-bindings: arm: amlogic: add ODROID-HC4 bindings + +Add the board bindings for the ODROID-HC4 device. + +Signed-off-by: Christian Hewitt +--- + Documentation/devicetree/bindings/arm/amlogic.yaml | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml +index 8561e1a17d6f..415fc1d351e1 100644 +--- a/Documentation/devicetree/bindings/arm/amlogic.yaml ++++ b/Documentation/devicetree/bindings/arm/amlogic.yaml +@@ -170,6 +170,7 @@ properties: + - cyx,a95xf3-air-2g + - cyx,a95xf3-air-4g + - hardkernel,odroid-c4 ++ - hardkernel,odroid-hc4 + - khadas,vim3l + - seirobotics,sei610 + - const: amlogic,sm1 +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0060-FROMGIT-ARM-dts-meson-Switch-existing-boards-with-RG.patch b/projects/Amlogic/patches/linux/amlogic-0060-FROMGIT-ARM-dts-meson-Switch-existing-boards-with-RG.patch deleted file mode 100644 index 6bd11ec3cb3..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0060-FROMGIT-ARM-dts-meson-Switch-existing-boards-with-RG.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 378ae7eb141b427a108a288e04eb588ffd3b5d6e Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 1 Jun 2020 09:18:32 +0000 -Subject: [PATCH 060/156] FROMGIT: ARM: dts: meson: Switch existing boards with - RGMII PHY to "rgmii-id" - -Let the PHY generate the RX and TX delay on the Odroid-C1 and MXIII -Plus. - -Previously we did not know that these boards used an RX delay. We -assumed that setting the TX delay on the MAC side It turns out that -these boards also require an RX delay of 2ns (verified on Odroid-C1, -but the u-boot code uses the same setup on both boards). Ethernet only -worked because u-boot added this RX delay on the MAC side. - -The 4ns TX delay was also wrong and the result of using an unsupported -RGMII TX clock divider setting. This has been fixed in the driver with -commit bd6f48546b9cb7 ("net: stmmac: dwmac-meson8b: Fix the RGMII TX -delay on Meson8b/8m2 SoCs"). - -Switch to phy-mode "rgmii-id" to let the PHY side handle all the delays, -(as recommended by the Ethernet maintainers anyways) to correctly -describe the need for a 2ns RX as well as 2ns TX delay on these boards. -This fixes the Ethernet performance on Odroid-C1 where there was a huge -amount of packet loss when transmitting data due to the incorrect TX -delay. - -Signed-off-by: Martin Blumenstingl ---- - arch/arm/boot/dts/meson8b-odroidc1.dts | 3 +-- - arch/arm/boot/dts/meson8m2-mxiii-plus.dts | 4 +--- - 2 files changed, 2 insertions(+), 5 deletions(-) - -diff --git a/arch/arm/boot/dts/meson8b-odroidc1.dts b/arch/arm/boot/dts/meson8b-odroidc1.dts -index a2a47804fc4a..cb21ac9f517c 100644 ---- a/arch/arm/boot/dts/meson8b-odroidc1.dts -+++ b/arch/arm/boot/dts/meson8b-odroidc1.dts -@@ -202,9 +202,8 @@ - pinctrl-0 = <ð_rgmii_pins>; - pinctrl-names = "default"; - -- phy-mode = "rgmii"; - phy-handle = <ð_phy>; -- amlogic,tx-delay-ns = <4>; -+ phy-mode = "rgmii-id"; - - nvmem-cells = <ðernet_mac_address>; - nvmem-cell-names = "mac-address"; -diff --git a/arch/arm/boot/dts/meson8m2-mxiii-plus.dts b/arch/arm/boot/dts/meson8m2-mxiii-plus.dts -index d54477b1001c..cc498191ddd1 100644 ---- a/arch/arm/boot/dts/meson8m2-mxiii-plus.dts -+++ b/arch/arm/boot/dts/meson8m2-mxiii-plus.dts -@@ -69,9 +69,7 @@ - pinctrl-names = "default"; - - phy-handle = <ð_phy0>; -- phy-mode = "rgmii"; -- -- amlogic,tx-delay-ns = <4>; -+ phy-mode = "rgmii-id"; - - mdio { - compatible = "snps,dwmac-mdio"; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0060-arm64-dts-meson-add-initial-device-tree-for-ODROID-H.patch b/projects/Amlogic/patches/linux/amlogic-0060-arm64-dts-meson-add-initial-device-tree-for-ODROID-H.patch new file mode 100644 index 00000000000..bd7d68eaa06 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0060-arm64-dts-meson-add-initial-device-tree-for-ODROID-H.patch @@ -0,0 +1,123 @@ +From 1d5f22964f2c53708c43705c22c5049e41d0fbac Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Sat, 12 Dec 2020 05:48:47 +0000 +Subject: [PATCH 60/79] arm64: dts: meson: add initial device-tree for + ODROID-HC4 + +ODROID-HC4 is a derivative of the C4 with minor differences: + +- 128MB SPI flash +- 2x SATA ports via ASM1061 PCIe to SATA controller +- 7-pin header with SPI and I2C for optional 1-inch OLED display + RTC +- 1x USB 2.0 host port + +Signed-off-by: Christian Hewitt +--- + arch/arm64/boot/dts/amlogic/Makefile | 1 + + .../boot/dts/amlogic/meson-sm1-odroid-hc4.dts | 82 +++++++++++++++++++ + 2 files changed, 83 insertions(+) + create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts + +diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile +index 15e06e1ec51f..34420ffc5050 100644 +--- a/arch/arm64/boot/dts/amlogic/Makefile ++++ b/arch/arm64/boot/dts/amlogic/Makefile +@@ -57,6 +57,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-sm1-a95xf3-air-2g.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-sm1-a95xf3-air-4g.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-sm1-khadas-vim3l.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-c4.dtb ++dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-hc4.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-sm1-sei610.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-sm1-x96-air-2g.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-sm1-x96-air-4g.dtb +diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts +new file mode 100644 +index 000000000000..de534ae1406f +--- /dev/null ++++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts +@@ -0,0 +1,82 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright (c) 2020 Dongjin Kim ++ */ ++ ++/dts-v1/; ++ ++#include "meson-sm1-odroid.dtsi" ++ ++/ { ++ compatible = "hardkernel,odroid-hc4", "amlogic,sm1"; ++ model = "Hardkernel ODROID-HC4"; ++ ++ fan0: pwm-fan { ++ compatible = "pwm-fan"; ++ #cooling-cells = <2>; ++ cooling-min-state = <0>; ++ cooling-max-state = <3>; ++ cooling-levels = <0 120 170 220>; ++ pwms = <&pwm_cd 1 40000 0>; ++ fan-supply = <&vcc_5v>; ++ interrupt-parent = <&gpio_intc>; ++ interrupts = <84 IRQ_TYPE_EDGE_FALLING>; ++ pulses-per-revolutions = <2>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ blue { ++ color = ; ++ function = LED_FUNCTION_STATUS; ++ gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "heartbeat"; ++ panic-indicator; ++ }; ++ ++ red { ++ color = ; ++ function = LED_FUNCTION_POWER; ++ gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "default-on"; ++ }; ++ }; ++ ++ hub_5v: regulator-hub_5v { ++ compatible = "regulator-fixed"; ++ regulator-name = "HUB_5V"; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ vin-supply = <&vcc_5v>; ++ }; ++}; ++ ++&cpu_thermal { ++ cooling-maps { ++ map { ++ trip = <&cpu_passive>; ++ cooling-device = <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; ++ }; ++ }; ++}; ++ ++&ir { ++ linux,rc-map-name = "rc-odroid"; ++}; ++ ++&pcie { ++ reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>; ++ status = "okay"; ++}; ++ ++&pwm_cd { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pwm_d_x6_pins>; ++}; ++ ++&usb { ++ phys = <&usb2_phy0>, <&usb2_phy1>; ++ phy-names = "usb2-phy0", "usb2-phy1"; ++}; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0061-FROMGIT-mmc-meson-gx-limit-segments-to-1-when-dram-a.patch b/projects/Amlogic/patches/linux/amlogic-0061-FROMGIT-mmc-meson-gx-limit-segments-to-1-when-dram-a.patch deleted file mode 100644 index db7e3eea1f4..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0061-FROMGIT-mmc-meson-gx-limit-segments-to-1-when-dram-a.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 4a444578a62a65e4ac503903586e3dd2f96c277e Mon Sep 17 00:00:00 2001 -From: chewitt -Date: Tue, 24 Dec 2019 05:50:45 +0000 -Subject: [PATCH 061/156] FROMGIT: mmc: meson-gx: limit segments to 1 when - dram-access-quirk is needed - -The actual max_segs computation leads to failure while using the broadcom -sdio brcmfmac/bcmsdh driver, since the driver tries to make usage of scatter -gather. - -But with the dram-access-quirk we use a 1,5K SRAM bounce buffer, and the -max_segs current value of 3 leads to max transfers to 4,5k, which doesn't work. - -This patch sets max_segs to 1 to better describe the hardware limitation, -and fix the SDIO functionnality with the brcmfmac/bcmsdh driver on Amlogic -G12A/G12B SoCs on boards like SEI510 or Khadas VIM3. - -Reported-by: Art Nikpal -Reported-by: Christian Hewitt -Fixes: acdc8e71d9bb ("mmc: meson-gx: add dram-access-quirk") -Signed-off-by: Neil Armstrong ---- - drivers/mmc/host/meson-gx-mmc.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c -index 35400cf2a2e4..cfaf8e7e22ec 100644 ---- a/drivers/mmc/host/meson-gx-mmc.c -+++ b/drivers/mmc/host/meson-gx-mmc.c -@@ -1143,9 +1143,11 @@ static int meson_mmc_probe(struct platform_device *pdev) - - mmc->caps |= MMC_CAP_CMD23; - if (host->dram_access_quirk) { -+ /* Limit segments to 1 due to low available sram memory */ -+ mmc->max_segs = 1; - /* Limit to the available sram memory */ -- mmc->max_segs = SD_EMMC_SRAM_DATA_BUF_LEN / mmc->max_blk_size; -- mmc->max_blk_count = mmc->max_segs; -+ mmc->max_blk_count = SD_EMMC_SRAM_DATA_BUF_LEN / -+ mmc->max_blk_size; - } else { - mmc->max_blk_count = CMD_CFG_LENGTH_MASK; - mmc->max_segs = SD_EMMC_DESC_BUF_LEN / --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0022-FROMGIT-dt-bindings-arm-amlogic-add-odroid-c4-bindin.patch b/projects/Amlogic/patches/linux/amlogic-0061-dt-bindings-arm-amlogic-add-Bananapi-BPI-M5-bindings.patch similarity index 50% rename from projects/Amlogic/patches/linux/amlogic-0022-FROMGIT-dt-bindings-arm-amlogic-add-odroid-c4-bindin.patch rename to projects/Amlogic/patches/linux/amlogic-0061-dt-bindings-arm-amlogic-add-Bananapi-BPI-M5-bindings.patch index daa4a79305b..c124926f5e3 100644 --- a/projects/Amlogic/patches/linux/amlogic-0022-FROMGIT-dt-bindings-arm-amlogic-add-odroid-c4-bindin.patch +++ b/projects/Amlogic/patches/linux/amlogic-0061-dt-bindings-arm-amlogic-add-Bananapi-BPI-M5-bindings.patch @@ -1,25 +1,24 @@ -From e31983aff5f3e77ac4ef9c67df06b0327a941ff9 Mon Sep 17 00:00:00 2001 -From: Neil Armstrong -Date: Wed, 13 May 2020 04:02:47 +0000 -Subject: [PATCH 022/156] FROMGIT: dt-bindings: arm: amlogic: add odroid-c4 - bindings +From 9dc04abb2eaf903941d11bd8f02b21b3981cc56e Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Sun, 27 Dec 2020 15:27:44 +0000 +Subject: [PATCH 61/79] dt-bindings: arm: amlogic: add Bananapi BPI-M5 bindings -Add the board bindings for the Hardkernel Odroid-C4 single board computer. +Add the board bindings for the Sinovoip (Bananapi) BPI-M5 device. -Signed-off-by: Neil Armstrong +Signed-off-by: Christian Hewitt --- Documentation/devicetree/bindings/arm/amlogic.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml -index f74aba48cec1..11908b151e0a 100644 +index 415fc1d351e1..ec93a9d664bc 100644 --- a/Documentation/devicetree/bindings/arm/amlogic.yaml +++ b/Documentation/devicetree/bindings/arm/amlogic.yaml -@@ -159,6 +159,7 @@ properties: - - enum: - - seirobotics,sei610 +@@ -173,6 +173,7 @@ properties: + - hardkernel,odroid-hc4 - khadas,vim3l -+ - hardkernel,odroid-c4 + - seirobotics,sei610 ++ - sinovoip,bananapi-m5 - const: amlogic,sm1 - description: Boards with the Amlogic Meson A1 A113L SoC diff --git a/projects/Amlogic/patches/linux/amlogic-0062-FROMLIST-v1-media-meson-vdec-fix-another-case-of-VP9.patch b/projects/Amlogic/patches/linux/amlogic-0062-FROMLIST-v1-media-meson-vdec-fix-another-case-of-VP9.patch deleted file mode 100644 index 835661408e7..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0062-FROMLIST-v1-media-meson-vdec-fix-another-case-of-VP9.patch +++ /dev/null @@ -1,133 +0,0 @@ -From 72c952cf507307726829c28521cf3f477a473ebd Mon Sep 17 00:00:00 2001 -From: Maxime Jourdan -Date: Sat, 2 May 2020 21:16:37 +0000 -Subject: [PATCH 062/156] FROMLIST(v1): media: meson: vdec: fix another case of - VP9 buffer shortage - -- Redo the logic where VP9 gets fresh CAPTURE buffers. The previous code - could lead to a hardlock. -- Reserve 4 margin buffers instead of 3, as apparently there are corner - cases where 3 is not enough. - -Fixes: e9a3eb4819ca ("media: meson: vdec: add VP9 input support") -Fixes: 00c43088aa68 ("media: meson: vdec: add VP9 decoder support") -Signed-off-by: Maxime Jourdan -Signed-off-by: Neil Armstrong ---- - drivers/staging/media/meson/vdec/codec_vp9.c | 41 +++++++++++++------- - drivers/staging/media/meson/vdec/esparser.c | 24 ++++++------ - 2 files changed, 38 insertions(+), 27 deletions(-) - -diff --git a/drivers/staging/media/meson/vdec/codec_vp9.c b/drivers/staging/media/meson/vdec/codec_vp9.c -index 897f5d7a6aad..28a7e62e7371 100644 ---- a/drivers/staging/media/meson/vdec/codec_vp9.c -+++ b/drivers/staging/media/meson/vdec/codec_vp9.c -@@ -1185,6 +1185,29 @@ static void codec_vp9_set_mc(struct amvdec_session *sess, - amvdec_write_dos(core, VP9D_MPP_REF_SCALE_ENBL, scale); - } - -+/* -+ * Get a free VB2 buffer that isn't currently used. -+ * VP9 references are held sometimes for so long that it's not really an option -+ * to hold them until they're no longer referenced, as it would delay the -+ * CAPTURE queue too much -+ */ -+static struct vb2_v4l2_buffer *get_free_vbuf(struct amvdec_session *sess) -+{ -+ struct codec_vp9 *vp9 = sess->priv; -+ struct vb2_v4l2_buffer *vbuf = v4l2_m2m_dst_buf_remove(sess->m2m_ctx); -+ struct vb2_v4l2_buffer *vbuf2; -+ -+ if (!vbuf) -+ return NULL; -+ -+ if (!codec_vp9_get_frame_by_idx(vp9, vbuf->vb2_buf.index)) -+ return vbuf; -+ -+ vbuf2 = get_free_vbuf(sess); -+ v4l2_m2m_buf_queue(sess->m2m_ctx, vbuf); -+ return vbuf2; -+} -+ - static struct vp9_frame *codec_vp9_get_new_frame(struct amvdec_session *sess) - { - struct codec_vp9 *vp9 = sess->priv; -@@ -1196,25 +1219,13 @@ static struct vp9_frame *codec_vp9_get_new_frame(struct amvdec_session *sess) - if (!new_frame) - return NULL; - -- vbuf = v4l2_m2m_dst_buf_remove(sess->m2m_ctx); -+ vbuf = get_free_vbuf(sess); - if (!vbuf) { - dev_err(sess->core->dev, "No dst buffer available\n"); - kfree(new_frame); - return NULL; - } - -- while (codec_vp9_get_frame_by_idx(vp9, vbuf->vb2_buf.index)) { -- struct vb2_v4l2_buffer *old_vbuf = vbuf; -- -- vbuf = v4l2_m2m_dst_buf_remove(sess->m2m_ctx); -- v4l2_m2m_buf_queue(sess->m2m_ctx, old_vbuf); -- if (!vbuf) { -- dev_err(sess->core->dev, "No dst buffer available\n"); -- kfree(new_frame); -- return NULL; -- } -- } -- - new_frame->vbuf = vbuf; - new_frame->index = vbuf->vb2_buf.index; - new_frame->intra_only = param->p.intra_only; -@@ -1267,8 +1278,10 @@ static void codec_vp9_process_frame(struct amvdec_session *sess) - codec_vp9_rm_noshow_frame(sess); - - vp9->cur_frame = codec_vp9_get_new_frame(sess); -- if (!vp9->cur_frame) -+ if (!vp9->cur_frame) { -+ amvdec_abort(sess); - return; -+ } - - pr_debug("frame %d: type: %08X; show_exist: %u; show: %u, intra_only: %u\n", - vp9->cur_frame->index, -diff --git a/drivers/staging/media/meson/vdec/esparser.c b/drivers/staging/media/meson/vdec/esparser.c -index db7022707ff8..814bb0587e3b 100644 ---- a/drivers/staging/media/meson/vdec/esparser.c -+++ b/drivers/staging/media/meson/vdec/esparser.c -@@ -301,21 +301,19 @@ esparser_queue(struct amvdec_session *sess, struct vb2_v4l2_buffer *vbuf) - u32 offset; - u32 pad_size; - -- /* -- * When max ref frame is held by VP9, this should be -= 3 to prevent a -- * shortage of CAPTURE buffers on the decoder side. -- * For the future, a good enhancement of the way this is handled could -- * be to notify new capture buffers to the decoding modules, so that -- * they could pause when there is no capture buffer available and -- * resume on this notification. -- */ -- if (sess->fmt_out->pixfmt == V4L2_PIX_FMT_VP9) { -- if (codec_ops->num_pending_bufs) -- num_dst_bufs = codec_ops->num_pending_bufs(sess); -- -+ if (codec_ops->num_pending_bufs) { -+ num_dst_bufs = codec_ops->num_pending_bufs(sess); - num_dst_bufs += v4l2_m2m_num_dst_bufs_ready(sess->m2m_ctx); -+ /* -+ * When max ref frame is held by VP9, this should be -= 4 -+ * to prevent a shortage of CAPTURE buffers on the decoder side. -+ * For the future, a good enhancement of the way this is handled -+ * could be to notify new capture buffers to the decoding -+ * modules, so that they could pause when there is no capture -+ * buffer available and resume on this notification. -+ */ - if (sess->fmt_out->pixfmt == V4L2_PIX_FMT_VP9) -- num_dst_bufs -= 3; -+ num_dst_bufs -= 4; - - if (esparser_vififo_get_free_space(sess) < payload_size || - atomic_read(&sess->esparser_queued_bufs) >= num_dst_bufs) --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0062-arm64-dts-meson-add-initial-device-tree-for-Bananapi.patch b/projects/Amlogic/patches/linux/amlogic-0062-arm64-dts-meson-add-initial-device-tree-for-Bananapi.patch new file mode 100644 index 00000000000..57cc2828443 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0062-arm64-dts-meson-add-initial-device-tree-for-Bananapi.patch @@ -0,0 +1,108 @@ +From 916b650e3ed3b94f5fb45fed562c1f8a9d18ae49 Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Sun, 27 Dec 2020 15:11:59 +0000 +Subject: [PATCH 62/79] arm64: dts: meson: add initial device-tree for Bananapi + BPI-M5 + +The Bananapi Wiki links to Amlogic BSP kernel sources which show [0] +BPI-M5 to be aligned with the HardKernel ODROID-C4 device-tree with +relatively minor differences: + +- 1x Green LED +- 4x Switches labelled SW1/RST/SW3/SW4 +- 3.5mm A/V connector +- USB-C power connector (5V) + +[0] https://github.com/Dangku/amlogic-linux/commit/bddc95f88a07e7e66f73192d8307af5b547c5b32 + +Signed-off-by: Christian Hewitt +--- + arch/arm64/boot/dts/amlogic/Makefile | 1 + + .../dts/amlogic/meson-sm1-bananapi-m5.dts | 63 +++++++++++++++++++ + 2 files changed, 64 insertions(+) + create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts + +diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile +index 34420ffc5050..e56888e568cd 100644 +--- a/arch/arm64/boot/dts/amlogic/Makefile ++++ b/arch/arm64/boot/dts/amlogic/Makefile +@@ -55,6 +55,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-gxm-wetek-core2.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-sm1-a95xf3-air-2g.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-sm1-a95xf3-air-4g.dtb ++dtb-$(CONFIG_ARCH_MESON) += meson-sm1-bananapi-m5.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-sm1-khadas-vim3l.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-c4.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-hc4.dtb +diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts +new file mode 100644 +index 000000000000..a98301777622 +--- /dev/null ++++ b/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts +@@ -0,0 +1,63 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright (c) 2020 Christian Hewitt ++ */ ++ ++/dts-v1/; ++ ++#include "meson-sm1-odroid.dtsi" ++ ++/ { ++ compatible = "sinovoip,bananapi-m5", "amlogic,sm1"; ++ model = "Bananapi BPI-M5"; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ blue { ++ color = ; ++ function = LED_FUNCTION_STATUS; ++ gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "heartbeat"; ++ panic-indicator; ++ }; ++ ++ green { ++ color = ; ++ function = LED_FUNCTION_STATUS; ++ gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>; ++ default-state = "off"; ++ }; ++ }; ++ ++ hub_5v: regulator-hub_5v { ++ compatible = "regulator-fixed"; ++ regulator-name = "HUB_5V"; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ vin-supply = <&vcc_5v>; ++ ++ /* Connected to the Hub CHIPENABLE, LOW sets low power state */ ++ gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>; ++ enable-active-high; ++ }; ++}; ++ ++&gpio { ++ /* ++ * WARNING: The USB Hub on the Bananapi M5 needs a reset signal ++ * to be turned high in order to be detected by the USB Controller ++ * This signal should be handled by a USB specific power sequence ++ * in order to reset the Hub when USB bus is powered down. ++ */ ++ usb-hub { ++ gpio-hog; ++ gpios = ; ++ output-high; ++ line-name = "usb-hub-reset"; ++ }; ++}; ++ ++&ir { ++ linux,rc-map-name = "rc-odroid"; ++}; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0063-FROMLIST-v2-drm-bridge-dw-hdmi-do-not-force-none-sca.patch b/projects/Amlogic/patches/linux/amlogic-0063-FROMLIST-v2-drm-bridge-dw-hdmi-do-not-force-none-sca.patch deleted file mode 100644 index 7b384814286..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0063-FROMLIST-v2-drm-bridge-dw-hdmi-do-not-force-none-sca.patch +++ /dev/null @@ -1,38 +0,0 @@ -From ac95514d0458ea95693ab88361743ea7caf82269 Mon Sep 17 00:00:00 2001 -From: Jonas Karlman -Date: Wed, 13 May 2020 03:09:58 +0000 -Subject: [PATCH 063/156] FROMLIST(v2): drm/bridge: dw-hdmi: do not force - "none" scan mode - -Setting scan mode to "none" confuses some TVs like LG B8, which randomly -change overscan percentage over time. Digital outputs like HDMI and DVI, -handled by this controller, don't really need overscan, so we can always -set scan mode to underscan. Actually, this is exactly what -drm_hdmi_avi_infoframe_from_display_mode() already does, so we can just -remove offending line. - -Reviewed-by: Neil Armstrong -Acked-by: Laurent Pinchart -Signed-off-by: Jonas Karlman -[updated commit message] -Signed-off-by: Jernej Skrabec ---- - drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c -index 512398dbeb76..30681398cfb0 100644 ---- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c -+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c -@@ -1689,8 +1689,6 @@ static void hdmi_config_AVI(struct dw_hdmi *hdmi, struct drm_display_mode *mode) - HDMI_EXTENDED_COLORIMETRY_XV_YCC_601; - } - -- frame.scan_mode = HDMI_SCAN_MODE_NONE; -- - /* - * The Designware IP uses a different byte format from standard - * AVI info frames, though generally the bits are in the correct --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0063-dt-bindings-vendor-prefixes-add-haochuangyi-prefix.patch b/projects/Amlogic/patches/linux/amlogic-0063-dt-bindings-vendor-prefixes-add-haochuangyi-prefix.patch new file mode 100644 index 00000000000..a9057f14559 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0063-dt-bindings-vendor-prefixes-add-haochuangyi-prefix.patch @@ -0,0 +1,29 @@ +From d3dd413e71e82bac7aa5fb0ae300bc31fcae9f70 Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Tue, 12 Jan 2021 17:24:07 +0000 +Subject: [PATCH 63/79] dt-bindings: vendor-prefixes: add haochuangyi prefix + +Shenzhen Haochuangyi Technology Co.,Ltd are a manufcaturer of Android +Set-Top Box devices. + +Signed-off-by: Christian Hewitt +--- + Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml +index 041ae90b0d8f..bfceecbaf717 100644 +--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml ++++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml +@@ -449,6 +449,8 @@ patternProperties: + deprecated: true + "^hannstar,.*": + description: HannStar Display Corporation ++ "^haochuangyi,.*": ++ description: Shenzhen Haochuangyi Technology Co.,Ltd + "^haoyu,.*": + description: Haoyu Microelectronic Co. Ltd. + "^hardkernel,.*": +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0064-FROMLIST-v2-drm-meson-add-mode-selection-limits-agai.patch b/projects/Amlogic/patches/linux/amlogic-0064-FROMLIST-v2-drm-meson-add-mode-selection-limits-agai.patch deleted file mode 100644 index 2919f5dd128..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0064-FROMLIST-v2-drm-meson-add-mode-selection-limits-agai.patch +++ /dev/null @@ -1,182 +0,0 @@ -From 79a8f40793bc9369dab486a2a2456cf34da6cd2a Mon Sep 17 00:00:00 2001 -From: Neil Armstrong -Date: Sat, 2 May 2020 21:13:37 +0000 -Subject: [PATCH 064/156] FROMLIST(v2): drm/meson: add mode selection limits - against specific SoC revisions - -The Amlogic S805X/Y uses the same die as the S905X, but with more -limited graphics capabilities. - -This adds a soc version detection adding specific limitations on the HDMI -mode selections. - -Here, we limit to HDMI 1.2a max HDMI PHY clock frequency. - -Changes sinces v1: -- Moved frequency check in the vclk code, and also checks DMT modes - -Signed-off-by: Neil Armstrong ---- - drivers/gpu/drm/meson/meson_drv.c | 29 ++++++++++++++++++++++++++- - drivers/gpu/drm/meson/meson_drv.h | 6 ++++++ - drivers/gpu/drm/meson/meson_dw_hdmi.c | 2 +- - drivers/gpu/drm/meson/meson_vclk.c | 16 ++++++++++++++- - drivers/gpu/drm/meson/meson_vclk.h | 3 ++- - 5 files changed, 52 insertions(+), 4 deletions(-) - -diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c -index 8c2e1b47e81a..5326e4585f3b 100644 ---- a/drivers/gpu/drm/meson/meson_drv.c -+++ b/drivers/gpu/drm/meson/meson_drv.c -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - #include - #include - -@@ -183,6 +184,24 @@ static void meson_remove_framebuffers(void) - kfree(ap); - } - -+struct meson_drm_soc_attr { -+ struct meson_drm_soc_limits limits; -+ const struct soc_device_attribute *attrs; -+}; -+ -+static const struct meson_drm_soc_attr meson_drm_soc_attrs[] = { -+ /* S805X/S805Y HDMI PLL won't lock for HDMI PHY freq > 1,65GHz */ -+ { -+ .limits = { -+ .max_hdmi_phy_freq = 1650000, -+ }, -+ .attrs = (const struct soc_device_attribute []) { -+ { .soc_id = "GXL (S805*)", }, -+ { /* sentinel */ }, -+ } -+ }, -+}; -+ - static int meson_drv_bind_master(struct device *dev, bool has_components) - { - struct platform_device *pdev = to_platform_device(dev); -@@ -191,7 +210,7 @@ static int meson_drv_bind_master(struct device *dev, bool has_components) - struct drm_device *drm; - struct resource *res; - void __iomem *regs; -- int ret; -+ int ret, i; - - /* Checks if an output connector is available */ - if (!meson_vpu_has_available_connectors(dev)) { -@@ -281,6 +300,14 @@ static int meson_drv_bind_master(struct device *dev, bool has_components) - if (ret) - goto free_drm; - -+ /* Assign limits per soc revision/package */ -+ for (i = 0 ; i < ARRAY_SIZE(meson_drm_soc_attrs) ; ++i) { -+ if (soc_device_match(meson_drm_soc_attrs[i].attrs)) { -+ priv->limits = &meson_drm_soc_attrs[i].limits; -+ break; -+ } -+ } -+ - /* Remove early framebuffers (ie. simplefb) */ - meson_remove_framebuffers(); - -diff --git a/drivers/gpu/drm/meson/meson_drv.h b/drivers/gpu/drm/meson/meson_drv.h -index 04fdf3826643..5b23704a80d6 100644 ---- a/drivers/gpu/drm/meson/meson_drv.h -+++ b/drivers/gpu/drm/meson/meson_drv.h -@@ -30,6 +30,10 @@ struct meson_drm_match_data { - struct meson_afbcd_ops *afbcd_ops; - }; - -+struct meson_drm_soc_limits { -+ unsigned int max_hdmi_phy_freq; -+}; -+ - struct meson_drm { - struct device *dev; - enum vpu_compatible compat; -@@ -48,6 +52,8 @@ struct meson_drm { - struct drm_plane *primary_plane; - struct drm_plane *overlay_plane; - -+ const struct meson_drm_soc_limits *limits; -+ - /* Components Data */ - struct { - bool osd1_enabled; -diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c -index 64cb6ba4bc42..24a12c453095 100644 ---- a/drivers/gpu/drm/meson/meson_dw_hdmi.c -+++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c -@@ -695,7 +695,7 @@ dw_hdmi_mode_valid(struct drm_connector *connector, - dev_dbg(connector->dev->dev, "%s: vclk:%d phy=%d venc=%d hdmi=%d\n", - __func__, phy_freq, vclk_freq, venc_freq, hdmi_freq); - -- return meson_vclk_vic_supported_freq(phy_freq, vclk_freq); -+ return meson_vclk_vic_supported_freq(priv, phy_freq, vclk_freq); - } - - /* Encoder */ -diff --git a/drivers/gpu/drm/meson/meson_vclk.c b/drivers/gpu/drm/meson/meson_vclk.c -index fdf26dac9fa8..0eb86943a358 100644 ---- a/drivers/gpu/drm/meson/meson_vclk.c -+++ b/drivers/gpu/drm/meson/meson_vclk.c -@@ -725,6 +725,13 @@ meson_vclk_dmt_supported_freq(struct meson_drm *priv, unsigned int freq) - /* In DMT mode, path after PLL is always /10 */ - freq *= 10; - -+ /* Check against soc revision/package limits */ -+ if (priv->limits) { -+ if (priv->limits->max_hdmi_phy_freq && -+ freq > priv->limits->max_hdmi_phy_freq) -+ return MODE_CLOCK_HIGH; -+ } -+ - if (meson_hdmi_pll_find_params(priv, freq, &m, &frac, &od)) - return MODE_OK; - -@@ -762,7 +769,7 @@ static void meson_hdmi_pll_generic_set(struct meson_drm *priv, - } - - enum drm_mode_status --meson_vclk_vic_supported_freq(unsigned int phy_freq, -+meson_vclk_vic_supported_freq(struct meson_drm *priv, unsigned int phy_freq, - unsigned int vclk_freq) - { - int i; -@@ -770,6 +777,13 @@ meson_vclk_vic_supported_freq(unsigned int phy_freq, - DRM_DEBUG_DRIVER("phy_freq = %d vclk_freq = %d\n", - phy_freq, vclk_freq); - -+ /* Check against soc revision/package limits */ -+ if (priv->limits) { -+ if (priv->limits->max_hdmi_phy_freq && -+ phy_freq > priv->limits->max_hdmi_phy_freq) -+ return MODE_CLOCK_HIGH; -+ } -+ - for (i = 0 ; params[i].pixel_freq ; ++i) { - DRM_DEBUG_DRIVER("i = %d pixel_freq = %d alt = %d\n", - i, params[i].pixel_freq, -diff --git a/drivers/gpu/drm/meson/meson_vclk.h b/drivers/gpu/drm/meson/meson_vclk.h -index aed0ab2efa71..60617aaf18dd 100644 ---- a/drivers/gpu/drm/meson/meson_vclk.h -+++ b/drivers/gpu/drm/meson/meson_vclk.h -@@ -25,7 +25,8 @@ enum { - enum drm_mode_status - meson_vclk_dmt_supported_freq(struct meson_drm *priv, unsigned int freq); - enum drm_mode_status --meson_vclk_vic_supported_freq(unsigned int phy_freq, unsigned int vclk_freq); -+meson_vclk_vic_supported_freq(struct meson_drm *priv, unsigned int phy_freq, -+ unsigned int vclk_freq); - - void meson_vclk_setup(struct meson_drm *priv, unsigned int target, - unsigned int phy_freq, unsigned int vclk_freq, --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0064-dt-bindings-arm-amlogic-add-H96-Max-bindings.patch b/projects/Amlogic/patches/linux/amlogic-0064-dt-bindings-arm-amlogic-add-H96-Max-bindings.patch new file mode 100644 index 00000000000..1eee5e38f6a --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0064-dt-bindings-arm-amlogic-add-H96-Max-bindings.patch @@ -0,0 +1,27 @@ +From 2fc80a27662c0f9dd0eb0609035d35a5f995e807 Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Tue, 12 Jan 2021 17:25:33 +0000 +Subject: [PATCH 64/79] dt-bindings: arm: amlogic: add H96-Max bindings + +Add the board bindings for the Haochuangyi H96-Max STB device. + +Signed-off-by: Christian Hewitt +--- + Documentation/devicetree/bindings/arm/amlogic.yaml | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml +index ec93a9d664bc..7eb5a4fbcc0a 100644 +--- a/Documentation/devicetree/bindings/arm/amlogic.yaml ++++ b/Documentation/devicetree/bindings/arm/amlogic.yaml +@@ -171,6 +171,7 @@ properties: + - cyx,a95xf3-air-4g + - hardkernel,odroid-c4 + - hardkernel,odroid-hc4 ++ - haochuangyi,h96-max + - khadas,vim3l + - seirobotics,sei610 + - sinovoip,bananapi-m5 +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0065-FROMLIST-v6-drm-fourcc-Add-modifier-definitions-for-.patch b/projects/Amlogic/patches/linux/amlogic-0065-FROMLIST-v6-drm-fourcc-Add-modifier-definitions-for-.patch deleted file mode 100644 index d7e42e63101..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0065-FROMLIST-v6-drm-fourcc-Add-modifier-definitions-for-.patch +++ /dev/null @@ -1,129 +0,0 @@ -From 943052b9741ed51335759aa9fc4d3dd702937409 Mon Sep 17 00:00:00 2001 -From: Neil Armstrong -Date: Thu, 14 May 2020 05:24:17 +0000 -Subject: [PATCH 065/156] FROMLIST(v6): drm/fourcc: Add modifier definitions - for describing Amlogic Video Framebuffer Compression - -Amlogic uses a proprietary lossless image compression protocol and format -for their hardware video codec accelerators, either video decoders or -video input encoders. - -It considerably reduces memory bandwidth while writing and reading -frames in memory. - -The underlying storage is considered to be 3 components, 8bit or 10-bit -per component, YCbCr 420, single plane : -- DRM_FORMAT_YUV420_8BIT -- DRM_FORMAT_YUV420_10BIT - -This modifier will be notably added to DMA-BUF frames imported from the V4L2 -Amlogic VDEC decoder. - -This introduces the basic layout composed of: -- a body content organized in 64x32 superblocks with 4096 bytes per - superblock in default mode. -- a 32 bytes per 128x64 header block - -This layout is tranferrable between Amlogic SoCs supporting this modifier. - -Tested-by: Kevin Hilman -Signed-off-by: Neil Armstrong ---- - include/uapi/drm/drm_fourcc.h | 74 +++++++++++++++++++++++++++++++++++ - 1 file changed, 74 insertions(+) - -diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h -index 8bc0b31597d8..b7596ba2af30 100644 ---- a/include/uapi/drm/drm_fourcc.h -+++ b/include/uapi/drm/drm_fourcc.h -@@ -309,6 +309,7 @@ extern "C" { - #define DRM_FORMAT_MOD_VENDOR_BROADCOM 0x07 - #define DRM_FORMAT_MOD_VENDOR_ARM 0x08 - #define DRM_FORMAT_MOD_VENDOR_ALLWINNER 0x09 -+#define DRM_FORMAT_MOD_VENDOR_AMLOGIC 0x0a - - /* add more to the end as needed */ - -@@ -804,6 +805,79 @@ extern "C" { - */ - #define DRM_FORMAT_MOD_ALLWINNER_TILED fourcc_mod_code(ALLWINNER, 1) - -+/* -+ * Amlogic Video Framebuffer Compression modifiers -+ * -+ * Amlogic uses a proprietary lossless image compression protocol and format -+ * for their hardware video codec accelerators, either video decoders or -+ * video input encoders. -+ * -+ * It considerably reduces memory bandwidth while writing and reading -+ * frames in memory. -+ * -+ * The underlying storage is considered to be 3 components, 8bit or 10-bit -+ * per component YCbCr 420, single plane : -+ * - DRM_FORMAT_YUV420_8BIT -+ * - DRM_FORMAT_YUV420_10BIT -+ * -+ * The first 8 bits of the mode defines the layout, then the following 8 bits -+ * defines the options changing the layout. -+ * -+ * Not all combinations are valid, and different SoCs may support different -+ * combinations of layout and options. -+ */ -+#define __fourcc_mod_amlogic_layout_mask 0xf -+#define __fourcc_mod_amlogic_options_shift 8 -+#define __fourcc_mod_amlogic_options_mask 0xf -+ -+#define DRM_FORMAT_MOD_AMLOGIC_FBC(__layout, __options) \ -+ fourcc_mod_code(AMLOGIC, \ -+ ((__layout) & __fourcc_mod_amlogic_layout_mask) | \ -+ ((__options) & __fourcc_mod_amlogic_options_mask \ -+ << __fourcc_mod_amlogic_options_shift)) -+ -+/* Amlogic FBC Layouts */ -+ -+/* -+ * Amlogic FBC Basic Layout -+ * -+ * The basic layout is composed of: -+ * - a body content organized in 64x32 superblocks with 4096 bytes per -+ * superblock in default mode. -+ * - a 32 bytes per 128x64 header block -+ * -+ * This layout is transferrable between Amlogic SoCs supporting this modifier. -+ */ -+#define AMLOGIC_FBC_LAYOUT_BASIC (1ULL) -+ -+/* -+ * Amlogic FBC Scatter Memory layout -+ * -+ * Indicates the header contains IOMMU references to the compressed -+ * frames content to optimize memory access and layout. -+ * -+ * In this mode, only the header memory address is needed, thus the -+ * content memory organization is tied to the current producer -+ * execution and cannot be saved/dumped neither transferrable between -+ * Amlogic SoCs supporting this modifier. -+ */ -+#define AMLOGIC_FBC_LAYOUT_SCATTER (2ULL) -+ -+/* Amlogic FBC Layout Options Bit Mask */ -+ -+/* -+ * Amlogic FBC Memory Saving mode -+ * -+ * Indicates the storage is packed when pixel size is multiple of word -+ * boudaries, i.e. 8bit should be stored in this mode to save allocation -+ * memory. -+ * -+ * This mode reduces body layout to 3072 bytes per 64x32 superblock with -+ * the basic layout and 3200 bytes per 64x32 superblock combined with -+ * the scatter layout. -+ */ -+#define AMLOGIC_FBC_OPTION_MEM_SAVING (1ULL << 0) -+ - #if defined(__cplusplus) - } - #endif --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0126-WIP-arm64-dts-meson-sm1-add-support-for-CYX-A95XF3-A.patch b/projects/Amlogic/patches/linux/amlogic-0065-arm64-dts-meson-add-initial-device-tree-for-H96-Max.patch similarity index 52% rename from projects/Amlogic/patches/linux/amlogic-0126-WIP-arm64-dts-meson-sm1-add-support-for-CYX-A95XF3-A.patch rename to projects/Amlogic/patches/linux/amlogic-0065-arm64-dts-meson-add-initial-device-tree-for-H96-Max.patch index 61351b5fcc4..df1013efede 100644 --- a/projects/Amlogic/patches/linux/amlogic-0126-WIP-arm64-dts-meson-sm1-add-support-for-CYX-A95XF3-A.patch +++ b/projects/Amlogic/patches/linux/amlogic-0065-arm64-dts-meson-add-initial-device-tree-for-H96-Max.patch @@ -1,24 +1,36 @@ -From ebb48ca47911e8c9021853c1af4c4ee707f74779 Mon Sep 17 00:00:00 2001 +From 6582fe86133be61cfda70064797aac5af54fbd62 Mon Sep 17 00:00:00 2001 From: Christian Hewitt -Date: Wed, 3 Jun 2020 18:03:22 +0000 -Subject: [PATCH 126/156] WIP: arm64: dts: meson-sm1: add support for CYX - A95XF3-AIR +Date: Tue, 12 Jan 2021 17:26:42 +0000 +Subject: [PATCH 65/79] arm64: dts: meson: add initial device-tree for H96-Max -A95XF3-AIR is an Android STB based on the Amlogic S905X3 chipset. The -device-tree is loosely based on the SEI610 device. +H96-Max is an Amlogic SM1 device based on the U215 reference design. It +ships in 3x variants with 4GB RAM and 32/64/128GB eMMC. Signed-off-by: Christian Hewitt --- - .../boot/dts/amlogic/meson-sm1-a95xf3-air.dts | 114 ++++++++++++++++++ - 1 file changed, 114 insertions(+) - create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air.dts + arch/arm64/boot/dts/amlogic/Makefile | 1 + + .../boot/dts/amlogic/meson-sm1-h96-max.dts | 150 ++++++++++++++++++ + 2 files changed, 151 insertions(+) + create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-h96-max.dts -diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air.dts +diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile +index e56888e568cd..af8a23a8cd4a 100644 +--- a/arch/arm64/boot/dts/amlogic/Makefile ++++ b/arch/arm64/boot/dts/amlogic/Makefile +@@ -56,6 +56,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-wetek-core2.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-sm1-a95xf3-air-2g.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-sm1-a95xf3-air-4g.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-sm1-bananapi-m5.dtb ++dtb-$(CONFIG_ARCH_MESON) += meson-sm1-h96-max.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-sm1-khadas-vim3l.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-c4.dtb + dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-hc4.dtb +diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-h96-max.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-h96-max.dts new file mode 100644 -index 000000000000..e5736b5129fa +index 000000000000..b539674297a7 --- /dev/null -+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air.dts -@@ -0,0 +1,114 @@ ++++ b/arch/arm64/boot/dts/amlogic/meson-sm1-h96-max.dts +@@ -0,0 +1,150 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 BayLibre SAS. All rights reserved. @@ -28,14 +40,15 @@ index 000000000000..e5736b5129fa +/dts-v1/; + +#include "meson-sm1-ac2xx.dtsi" ++#include + +/ { -+ compatible = "cyx,a95xf3-air", "amlogic,sm1"; -+ model = "Shenzhen CYX Industrial Co., Ltd A95XF3-AIR"; ++ compatible = "haochuangyi,h96-max", "amlogic,sm1"; ++ model = "Shenzhen Haochuangyi Technology Co., Ltd H96 Max"; + + sound { + compatible = "amlogic,axg-sound-card"; -+ model = "SM1-A95XF3-AIR"; ++ model = "H96-MAX"; + audio-aux-devs = <&tdmout_b>; + audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", + "TDMOUT_B IN 1", "FRDDR_B OUT 1", @@ -89,15 +102,23 @@ index 000000000000..e5736b5129fa + }; +}; + ++&arb { ++ status = "okay"; ++}; ++ ++&clkc_audio { ++ status = "okay"; ++}; ++ +&ext_mdio { + external_phy: ethernet-phy@0 { + /* Realtek RTL8211F (0x001cc916) */ + reg = <0>; -+ max-speed = <100>; ++ max-speed = <1000>; + eee-broken-1000t; + + reset-assert-us = <10000>; -+ reset-deassert-us = <30000>; ++ reset-deassert-us = <80000>; + reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; + + interrupt-parent = <&gpio_intc>; @@ -107,30 +128,57 @@ index 000000000000..e5736b5129fa +}; + +ðmac { ++ status = "okay"; ++ + pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; + pinctrl-names = "default"; -+ status = "okay"; -+ phy-mode = "rgmii-id"; ++ phy-mode = "rgmii-txid"; + phy-handle = <&external_phy>; ++ ++ rx-internal-delay-ps = <800>; ++}; ++ ++&frddr_a { ++ status = "okay"; ++}; ++ ++&frddr_b { ++ status = "okay"; ++}; ++ ++&frddr_c { ++ status = "okay"; ++}; ++ ++&ir { ++ linux,rc-map-name = "rc-x96max"; ++}; ++ ++&tdmif_b { ++ status = "okay"; ++}; ++ ++&tdmout_b { ++ status = "okay"; ++}; ++ ++&tohdmitx { ++ status = "okay"; +}; + +&uart_A { + status = "okay"; ++ + pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; + pinctrl-names = "default"; + uart-has-rtscts; + + bluetooth { -+ compatible = "mediatek,mt7668u-bluetooth"; -+ interrupt-parent = <&gpio_intc>; -+ interrupts = <95 IRQ_TYPE_LEVEL_HIGH>; -+ interrupt-names = "host-wakeup"; ++ compatible = "brcm,bcm43438-bt"; + shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; + max-speed = <2000000>; + clocks = <&wifi32k>; + clock-names = "lpo"; -+ vbat-supply = <&vddao_3v3>; -+ vddio-supply = <&vddio_ao1v8>; + }; +}; -- diff --git a/projects/Amlogic/patches/linux/amlogic-0066-FROMLIST-v6-drm-meson-add-Amlogic-Video-FBC-register.patch b/projects/Amlogic/patches/linux/amlogic-0066-FROMLIST-v6-drm-meson-add-Amlogic-Video-FBC-register.patch deleted file mode 100644 index 62cafd06a06..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0066-FROMLIST-v6-drm-meson-add-Amlogic-Video-FBC-register.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 0d7e2b5f292fa9d610f350a34f14c118363e2eca Mon Sep 17 00:00:00 2001 -From: Neil Armstrong -Date: Thu, 14 May 2020 05:25:15 +0000 -Subject: [PATCH 066/156] FROMLIST(v6): drm/meson: add Amlogic Video FBC - registers - -Add the registers of the VPU VD1 Amlogic FBC decoder module, and routing -register. - -Tested-by: Kevin Hilman -Signed-off-by: Neil Armstrong ---- - drivers/gpu/drm/meson/meson_registers.h | 22 ++++++++++++++++++++++ - 1 file changed, 22 insertions(+) - -diff --git a/drivers/gpu/drm/meson/meson_registers.h b/drivers/gpu/drm/meson/meson_registers.h -index 8ea00546cd4e..08631fdfe4b9 100644 ---- a/drivers/gpu/drm/meson/meson_registers.h -+++ b/drivers/gpu/drm/meson/meson_registers.h -@@ -144,10 +144,15 @@ - #define VIU_SW_RESET_OSD1 BIT(0) - #define VIU_MISC_CTRL0 0x1a06 - #define VIU_CTRL0_VD1_AFBC_MASK 0x170000 -+#define VIU_CTRL0_AFBC_TO_VD1 BIT(20) - #define VIU_MISC_CTRL1 0x1a07 - #define MALI_AFBC_MISC GENMASK(15, 8) - #define D2D3_INTF_LENGTH 0x1a08 - #define D2D3_INTF_CTRL0 0x1a09 -+#define VD1_AFBCD0_MISC_CTRL 0x1a0a -+#define VD1_AXI_SEL_AFBC (1 << 12) -+#define AFBC_VD1_SEL (1 << 10) -+#define VD2_AFBCD1_MISC_CTRL 0x1a0b - #define VIU_OSD1_CTRL_STAT 0x1a10 - #define VIU_OSD1_OSD_BLK_ENABLE BIT(0) - #define VIU_OSD1_OSD_MEM_MODE_LINEAR BIT(2) -@@ -365,6 +370,23 @@ - #define VIU_OSD1_OETF_LUT_ADDR_PORT 0x1add - #define VIU_OSD1_OETF_LUT_DATA_PORT 0x1ade - #define AFBC_ENABLE 0x1ae0 -+#define AFBC_MODE 0x1ae1 -+#define AFBC_SIZE_IN 0x1ae2 -+#define AFBC_DEC_DEF_COLOR 0x1ae3 -+#define AFBC_CONV_CTRL 0x1ae4 -+#define AFBC_LBUF_DEPTH 0x1ae5 -+#define AFBC_HEAD_BADDR 0x1ae6 -+#define AFBC_BODY_BADDR 0x1ae7 -+#define AFBC_SIZE_OUT 0x1ae8 -+#define AFBC_OUT_YSCOPE 0x1ae9 -+#define AFBC_STAT 0x1aea -+#define AFBC_VD_CFMT_CTRL 0x1aeb -+#define AFBC_VD_CFMT_W 0x1aec -+#define AFBC_MIF_HOR_SCOPE 0x1aed -+#define AFBC_MIF_VER_SCOPE 0x1aee -+#define AFBC_PIXEL_HOR_SCOPE 0x1aef -+#define AFBC_PIXEL_VER_SCOPE 0x1af0 -+#define AFBC_VD_CFMT_H 0x1af1 - - /* vpp */ - #define VPP_DUMMY_DATA 0x1d00 --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0066-arm64-dts-meson-fixes-for-WeTek-common-dtsi.patch b/projects/Amlogic/patches/linux/amlogic-0066-arm64-dts-meson-fixes-for-WeTek-common-dtsi.patch new file mode 100644 index 00000000000..3726e4fa6b4 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0066-arm64-dts-meson-fixes-for-WeTek-common-dtsi.patch @@ -0,0 +1,36 @@ +From b62dd6b8798b110fa1b7d0df4fc4b9f30cea4e68 Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Tue, 29 Dec 2020 09:31:57 +0000 +Subject: [PATCH 66/79] arm64: dts: meson: fixes for WeTek common dtsi + +Add GPIO bindings (copied from Nanopi-K2/Odroid-C2) to resolve an issue +with Ethernet probing in mainline u-boot. Also add eee-broken. + +Signed-off-by: Christian Hewitt +--- + arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi +index a350fee1264d..9c2f3c43ee67 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi ++++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi +@@ -6,6 +6,7 @@ + */ + + #include "meson-gxbb.dtsi" ++#include + + / { + aliases { +@@ -145,6 +146,7 @@ + eth_phy0: ethernet-phy@0 { + /* Realtek RTL8211F (0x001cc916) */ + reg = <0>; ++ eee-broken-1000t; + + reset-assert-us = <10000>; + reset-deassert-us = <80000>; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0067-FROMLIST-v6-drm-meson-overlay-setup-overlay-for-Amlo.patch b/projects/Amlogic/patches/linux/amlogic-0067-FROMLIST-v6-drm-meson-overlay-setup-overlay-for-Amlo.patch deleted file mode 100644 index c17967190e5..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0067-FROMLIST-v6-drm-meson-overlay-setup-overlay-for-Amlo.patch +++ /dev/null @@ -1,418 +0,0 @@ -From 7c02cb1631ac73dc407980584f70e816bce2fad6 Mon Sep 17 00:00:00 2001 -From: Neil Armstrong -Date: Thu, 14 May 2020 05:26:04 +0000 -Subject: [PATCH 067/156] FROMLIST(v6): drm/meson: overlay: setup overlay for - Amlogic FBC - -Setup the Amlogic FBC decoder for the VD1 video overlay plane. - -The VD1 Amlogic FBC decoder is integrated in the pipeline like the -YUV pixel reading/formatter but used a direct memory address instead. - -This adds support for the basic layout, and needs to calculate the content -body size since the header is allocated after. - -Tested-by: Kevin Hilman -Signed-off-by: Neil Armstrong ---- - drivers/gpu/drm/meson/meson_drv.h | 16 ++ - drivers/gpu/drm/meson/meson_overlay.c | 252 +++++++++++++++++++++++++- - 2 files changed, 260 insertions(+), 8 deletions(-) - -diff --git a/drivers/gpu/drm/meson/meson_drv.h b/drivers/gpu/drm/meson/meson_drv.h -index 5b23704a80d6..177dac3ca3be 100644 ---- a/drivers/gpu/drm/meson/meson_drv.h -+++ b/drivers/gpu/drm/meson/meson_drv.h -@@ -86,6 +86,7 @@ struct meson_drm { - - bool vd1_enabled; - bool vd1_commit; -+ bool vd1_afbc; - unsigned int vd1_planes; - uint32_t vd1_if0_gen_reg; - uint32_t vd1_if0_luma_x0; -@@ -111,6 +112,21 @@ struct meson_drm { - uint32_t vd1_height0; - uint32_t vd1_height1; - uint32_t vd1_height2; -+ uint32_t vd1_afbc_mode; -+ uint32_t vd1_afbc_en; -+ uint32_t vd1_afbc_head_addr; -+ uint32_t vd1_afbc_body_addr; -+ uint32_t vd1_afbc_conv_ctrl; -+ uint32_t vd1_afbc_dec_def_color; -+ uint32_t vd1_afbc_vd_cfmt_ctrl; -+ uint32_t vd1_afbc_vd_cfmt_w; -+ uint32_t vd1_afbc_vd_cfmt_h; -+ uint32_t vd1_afbc_mif_hor_scope; -+ uint32_t vd1_afbc_mif_ver_scope; -+ uint32_t vd1_afbc_size_out; -+ uint32_t vd1_afbc_pixel_hor_scope; -+ uint32_t vd1_afbc_pixel_ver_scope; -+ uint32_t vd1_afbc_size_in; - uint32_t vpp_pic_in_height; - uint32_t vpp_postblend_vd1_h_start_end; - uint32_t vpp_postblend_vd1_v_start_end; -diff --git a/drivers/gpu/drm/meson/meson_overlay.c b/drivers/gpu/drm/meson/meson_overlay.c -index 2468b0212d52..2713d008cee8 100644 ---- a/drivers/gpu/drm/meson/meson_overlay.c -+++ b/drivers/gpu/drm/meson/meson_overlay.c -@@ -5,6 +5,7 @@ - * Copyright (C) 2015 Amlogic, Inc. All rights reserved. - */ - -+#define DEBUG - #include - - #include -@@ -76,6 +77,84 @@ - #define VD_REGION24_START(value) FIELD_PREP(GENMASK(11, 0), value) - #define VD_REGION13_END(value) FIELD_PREP(GENMASK(27, 16), value) - -+/* AFBC_ENABLE */ -+#define AFBC_DEC_ENABLE BIT(8) -+#define AFBC_FRM_START BIT(0) -+ -+/* AFBC_MODE */ -+#define AFBC_HORZ_SKIP_UV(value) FIELD_PREP(GENMASK(1, 0), value) -+#define AFBC_VERT_SKIP_UV(value) FIELD_PREP(GENMASK(3, 2), value) -+#define AFBC_HORZ_SKIP_Y(value) FIELD_PREP(GENMASK(5, 4), value) -+#define AFBC_VERT_SKIP_Y(value) FIELD_PREP(GENMASK(7, 6), value) -+#define AFBC_COMPBITS_YUV(value) FIELD_PREP(GENMASK(13, 8), value) -+#define AFBC_COMPBITS_8BIT 0 -+#define AFBC_COMPBITS_10BIT (2 | (2 << 2) | (2 << 4)) -+#define AFBC_BURST_LEN(value) FIELD_PREP(GENMASK(15, 14), value) -+#define AFBC_HOLD_LINE_NUM(value) FIELD_PREP(GENMASK(22, 16), value) -+#define AFBC_MIF_URGENT(value) FIELD_PREP(GENMASK(25, 24), value) -+#define AFBC_REV_MODE(value) FIELD_PREP(GENMASK(27, 26), value) -+#define AFBC_BLK_MEM_MODE BIT(28) -+#define AFBC_SCATTER_MODE BIT(29) -+#define AFBC_SOFT_RESET BIT(31) -+ -+/* AFBC_SIZE_IN */ -+#define AFBC_HSIZE_IN(value) FIELD_PREP(GENMASK(28, 16), value) -+#define AFBC_VSIZE_IN(value) FIELD_PREP(GENMASK(12, 0), value) -+ -+/* AFBC_DEC_DEF_COLOR */ -+#define AFBC_DEF_COLOR_Y(value) FIELD_PREP(GENMASK(29, 20), value) -+#define AFBC_DEF_COLOR_U(value) FIELD_PREP(GENMASK(19, 10), value) -+#define AFBC_DEF_COLOR_V(value) FIELD_PREP(GENMASK(9, 0), value) -+ -+/* AFBC_CONV_CTRL */ -+#define AFBC_CONV_LBUF_LEN(value) FIELD_PREP(GENMASK(11, 0), value) -+ -+/* AFBC_LBUF_DEPTH */ -+#define AFBC_DEC_LBUF_DEPTH(value) FIELD_PREP(GENMASK(27, 16), value) -+#define AFBC_MIF_LBUF_DEPTH(value) FIELD_PREP(GENMASK(11, 0), value) -+ -+/* AFBC_OUT_XSCOPE/AFBC_SIZE_OUT */ -+#define AFBC_HSIZE_OUT(value) FIELD_PREP(GENMASK(28, 16), value) -+#define AFBC_VSIZE_OUT(value) FIELD_PREP(GENMASK(12, 0), value) -+#define AFBC_OUT_HORZ_BGN(value) FIELD_PREP(GENMASK(28, 16), value) -+#define AFBC_OUT_HORZ_END(value) FIELD_PREP(GENMASK(12, 0), value) -+ -+/* AFBC_OUT_YSCOPE */ -+#define AFBC_OUT_VERT_BGN(value) FIELD_PREP(GENMASK(28, 16), value) -+#define AFBC_OUT_VERT_END(value) FIELD_PREP(GENMASK(12, 0), value) -+ -+/* AFBC_VD_CFMT_CTRL */ -+#define AFBC_HORZ_RPT_PIXEL0 BIT(23) -+#define AFBC_HORZ_Y_C_RATIO(value) FIELD_PREP(GENMASK(22, 21), value) -+#define AFBC_HORZ_FMT_EN BIT(20) -+#define AFBC_VERT_RPT_LINE0 BIT(16) -+#define AFBC_VERT_INITIAL_PHASE(value) FIELD_PREP(GENMASK(11, 8), value) -+#define AFBC_VERT_PHASE_STEP(value) FIELD_PREP(GENMASK(7, 1), value) -+#define AFBC_VERT_FMT_EN BIT(0) -+ -+/* AFBC_VD_CFMT_W */ -+#define AFBC_VD_V_WIDTH(value) FIELD_PREP(GENMASK(11, 0), value) -+#define AFBC_VD_H_WIDTH(value) FIELD_PREP(GENMASK(27, 16), value) -+ -+/* AFBC_MIF_HOR_SCOPE */ -+#define AFBC_MIF_BLK_BGN_H(value) FIELD_PREP(GENMASK(25, 16), value) -+#define AFBC_MIF_BLK_END_H(value) FIELD_PREP(GENMASK(9, 0), value) -+ -+/* AFBC_MIF_VER_SCOPE */ -+#define AFBC_MIF_BLK_BGN_V(value) FIELD_PREP(GENMASK(27, 16), value) -+#define AFBC_MIF_BLK_END_V(value) FIELD_PREP(GENMASK(11, 0), value) -+ -+/* AFBC_PIXEL_HOR_SCOPE */ -+#define AFBC_DEC_PIXEL_BGN_H(value) FIELD_PREP(GENMASK(28, 16), value) -+#define AFBC_DEC_PIXEL_END_H(value) FIELD_PREP(GENMASK(12, 0), value) -+ -+/* AFBC_PIXEL_VER_SCOPE */ -+#define AFBC_DEC_PIXEL_BGN_V(value) FIELD_PREP(GENMASK(28, 16), value) -+#define AFBC_DEC_PIXEL_END_V(value) FIELD_PREP(GENMASK(12, 0), value) -+ -+/* AFBC_VD_CFMT_H */ -+#define AFBC_VD_HEIGHT(value) FIELD_PREP(GENMASK(12, 0), value) -+ - struct meson_overlay { - struct drm_plane base; - struct meson_drm *priv; -@@ -157,6 +236,9 @@ static void meson_overlay_setup_scaler_params(struct meson_drm *priv, - unsigned int ratio_x, ratio_y; - int temp_height, temp_width; - unsigned int w_in, h_in; -+ int afbc_left, afbc_right; -+ int afbc_top_src, afbc_bottom_src; -+ int afbc_top, afbc_bottom; - int temp, start, end; - - if (!crtc_state) { -@@ -169,7 +251,7 @@ static void meson_overlay_setup_scaler_params(struct meson_drm *priv, - - w_in = fixed16_to_int(state->src_w); - h_in = fixed16_to_int(state->src_h); -- crop_top = fixed16_to_int(state->src_x); -+ crop_top = fixed16_to_int(state->src_y); - crop_left = fixed16_to_int(state->src_x); - - video_top = state->crtc_y; -@@ -243,6 +325,14 @@ static void meson_overlay_setup_scaler_params(struct meson_drm *priv, - DRM_DEBUG("vsc startp %d endp %d start_lines %d end_lines %d\n", - vsc_startp, vsc_endp, vd_start_lines, vd_end_lines); - -+ afbc_top = round_down(vd_start_lines, 4); -+ afbc_bottom = round_up(vd_end_lines + 1, 4); -+ afbc_top_src = 0; -+ afbc_bottom_src = round_up(h_in + 1, 4); -+ -+ DRM_DEBUG("afbc top %d (src %d) bottom %d (src %d)\n", -+ afbc_top, afbc_top_src, afbc_bottom, afbc_bottom_src); -+ - /* Horizontal */ - - start = video_left + video_width / 2 - ((w_in << 17) / ratio_x); -@@ -278,6 +368,16 @@ static void meson_overlay_setup_scaler_params(struct meson_drm *priv, - DRM_DEBUG("hsc startp %d endp %d start_lines %d end_lines %d\n", - hsc_startp, hsc_endp, hd_start_lines, hd_end_lines); - -+ if (hd_start_lines > 0 || (hd_end_lines < w_in)) { -+ afbc_left = 0; -+ afbc_right = round_up(w_in, 32); -+ } else { -+ afbc_left = round_down(hd_start_lines, 32); -+ afbc_right = round_up(hd_end_lines + 1, 32); -+ } -+ -+ DRM_DEBUG("afbc left %d right %d\n", afbc_left, afbc_right); -+ - priv->viu.vpp_vsc_start_phase_step = ratio_y << 6; - - priv->viu.vpp_vsc_ini_phase = vphase << 8; -@@ -293,6 +393,35 @@ static void meson_overlay_setup_scaler_params(struct meson_drm *priv, - VD_H_WIDTH(hd_end_lines - hd_start_lines + 1) | - VD_V_WIDTH(hd_end_lines/2 - hd_start_lines/2 + 1); - -+ priv->viu.vd1_afbc_vd_cfmt_w = -+ AFBC_VD_H_WIDTH(afbc_right - afbc_left) | -+ AFBC_VD_V_WIDTH(afbc_right / 2 - afbc_left / 2); -+ -+ priv->viu.vd1_afbc_vd_cfmt_h = -+ AFBC_VD_HEIGHT((afbc_bottom - afbc_top) / 2); -+ -+ priv->viu.vd1_afbc_mif_hor_scope = AFBC_MIF_BLK_BGN_H(afbc_left / 32) | -+ AFBC_MIF_BLK_END_H((afbc_right / 32) - 1); -+ -+ priv->viu.vd1_afbc_mif_ver_scope = AFBC_MIF_BLK_BGN_V(afbc_top / 4) | -+ AFBC_MIF_BLK_END_H((afbc_bottom / 4) - 1); -+ -+ priv->viu.vd1_afbc_size_out = -+ AFBC_HSIZE_OUT(afbc_right - afbc_left) | -+ AFBC_VSIZE_OUT(afbc_bottom - afbc_top); -+ -+ priv->viu.vd1_afbc_pixel_hor_scope = -+ AFBC_DEC_PIXEL_BGN_H(hd_start_lines - afbc_left) | -+ AFBC_DEC_PIXEL_END_H(hd_end_lines - afbc_left); -+ -+ priv->viu.vd1_afbc_pixel_ver_scope = -+ AFBC_DEC_PIXEL_BGN_V(vd_start_lines - afbc_top) | -+ AFBC_DEC_PIXEL_END_V(vd_end_lines - afbc_top); -+ -+ priv->viu.vd1_afbc_size_in = -+ AFBC_HSIZE_IN(afbc_right - afbc_left) | -+ AFBC_VSIZE_IN(afbc_bottom_src - afbc_top_src); -+ - priv->viu.vd1_if0_luma_y0 = VD_Y_START(vd_start_lines) | - VD_Y_END(vd_end_lines); - -@@ -350,11 +479,57 @@ static void meson_overlay_atomic_update(struct drm_plane *plane, - - spin_lock_irqsave(&priv->drm->event_lock, flags); - -- priv->viu.vd1_if0_gen_reg = VD_URGENT_CHROMA | -- VD_URGENT_LUMA | -- VD_HOLD_LINES(9) | -- VD_CHRO_RPT_LASTL_CTRL | -- VD_ENABLE; -+ if ((fb->modifier & DRM_FORMAT_MOD_AMLOGIC_FBC(0, 0)) == -+ DRM_FORMAT_MOD_AMLOGIC_FBC(0, 0)) { -+ priv->viu.vd1_afbc = true; -+ -+ priv->viu.vd1_afbc_mode = AFBC_MIF_URGENT(3) | -+ AFBC_HOLD_LINE_NUM(8) | -+ AFBC_BURST_LEN(2); -+ -+ priv->viu.vd1_afbc_en = 0x1600 | AFBC_DEC_ENABLE; -+ -+ priv->viu.vd1_afbc_conv_ctrl = AFBC_CONV_LBUF_LEN(256); -+ -+ priv->viu.vd1_afbc_dec_def_color = AFBC_DEF_COLOR_Y(1023); -+ -+ /* 420: horizontal / 2, vertical / 4 */ -+ priv->viu.vd1_afbc_vd_cfmt_ctrl = AFBC_HORZ_RPT_PIXEL0 | -+ AFBC_HORZ_Y_C_RATIO(1) | -+ AFBC_HORZ_FMT_EN | -+ AFBC_VERT_RPT_LINE0 | -+ AFBC_VERT_INITIAL_PHASE(12) | -+ AFBC_VERT_PHASE_STEP(8) | -+ AFBC_VERT_FMT_EN; -+ -+ switch (fb->format->format) { -+ /* AFBC Only formats */ -+ case DRM_FORMAT_YUV420_10BIT: -+ priv->viu.vd1_afbc_mode |= -+ AFBC_COMPBITS_YUV(AFBC_COMPBITS_10BIT); -+ priv->viu.vd1_afbc_dec_def_color |= -+ AFBC_DEF_COLOR_U(512) | -+ AFBC_DEF_COLOR_V(512); -+ break; -+ case DRM_FORMAT_YUV420_8BIT: -+ priv->viu.vd1_afbc_dec_def_color |= -+ AFBC_DEF_COLOR_U(128) | -+ AFBC_DEF_COLOR_V(128); -+ break; -+ } -+ -+ priv->viu.vd1_if0_gen_reg = 0; -+ priv->viu.vd1_if0_canvas0 = 0; -+ priv->viu.viu_vd1_fmt_ctrl = 0; -+ } else { -+ priv->viu.vd1_afbc = false; -+ -+ priv->viu.vd1_if0_gen_reg = VD_URGENT_CHROMA | -+ VD_URGENT_LUMA | -+ VD_HOLD_LINES(9) | -+ VD_CHRO_RPT_LASTL_CTRL | -+ VD_ENABLE; -+ } - - /* Setup scaler params */ - meson_overlay_setup_scaler_params(priv, plane, interlace_mode); -@@ -370,6 +545,7 @@ static void meson_overlay_atomic_update(struct drm_plane *plane, - priv->viu.vd1_if0_gen_reg2 = 0; - priv->viu.viu_vd1_fmt_ctrl = 0; - -+ /* None will match for AFBC Only formats */ - switch (fb->format->format) { - /* TOFIX DRM_FORMAT_RGB888 should be supported */ - case DRM_FORMAT_YUYV: -@@ -488,13 +664,28 @@ static void meson_overlay_atomic_update(struct drm_plane *plane, - priv->viu.vd1_stride0 = fb->pitches[0]; - priv->viu.vd1_height0 = - drm_format_info_plane_height(fb->format, -- fb->height, 0); -+ fb->height, 0); - DRM_DEBUG("plane 0 addr 0x%x stride %d height %d\n", - priv->viu.vd1_addr0, - priv->viu.vd1_stride0, - priv->viu.vd1_height0); - } - -+ if (priv->viu.vd1_afbc) { -+ unsigned long body_size; -+ -+ /* Default mode is 4k per superblock */ -+ body_size = (ALIGN(priv->viu.vd1_stride0, 64) / 64) * -+ (ALIGN(priv->viu.vd1_height0, 32) / 32) * -+ 4096; -+ -+ priv->viu.vd1_afbc_body_addr = priv->viu.vd1_addr0 >> 4; -+ -+ /* Header is after body content */ -+ priv->viu.vd1_afbc_head_addr = (priv->viu.vd1_addr0 + -+ body_size) >> 4; -+ } -+ - priv->viu.vd1_enabled = true; - - spin_unlock_irqrestore(&priv->drm->event_lock, flags); -@@ -531,6 +722,42 @@ static const struct drm_plane_helper_funcs meson_overlay_helper_funcs = { - .prepare_fb = drm_gem_fb_prepare_fb, - }; - -+static bool meson_overlay_format_mod_supported(struct drm_plane *plane, -+ u32 format, u64 modifier) -+{ -+ if (modifier == DRM_FORMAT_MOD_LINEAR && -+ format != DRM_FORMAT_YUV420_8BIT && -+ format != DRM_FORMAT_YUV420_10BIT) -+ return true; -+ -+ if ((modifier & DRM_FORMAT_MOD_AMLOGIC_FBC(0, 0)) == -+ DRM_FORMAT_MOD_AMLOGIC_FBC(0, 0)) { -+ unsigned int layout = modifier & -+ DRM_FORMAT_MOD_AMLOGIC_FBC( -+ __fourcc_mod_amlogic_layout_mask, 0); -+ -+ if (format != DRM_FORMAT_YUV420_8BIT && -+ format != DRM_FORMAT_YUV420_10BIT) { -+ DRM_DEBUG_KMS("%llx invalid format 0x%08x\n", -+ modifier, format); -+ return false; -+ } -+ -+ if (layout != AMLOGIC_FBC_LAYOUT_BASIC) { -+ DRM_DEBUG_KMS("%llx invalid layout %x\n", -+ modifier, layout); -+ return false; -+ } -+ -+ return true; -+ } -+ -+ DRM_DEBUG_KMS("invalid modifier %llx for format 0x%08x\n", -+ modifier, format); -+ -+ return false; -+} -+ - static const struct drm_plane_funcs meson_overlay_funcs = { - .update_plane = drm_atomic_helper_update_plane, - .disable_plane = drm_atomic_helper_disable_plane, -@@ -538,6 +765,7 @@ static const struct drm_plane_funcs meson_overlay_funcs = { - .reset = drm_atomic_helper_plane_reset, - .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, - .atomic_destroy_state = drm_atomic_helper_plane_destroy_state, -+ .format_mod_supported = meson_overlay_format_mod_supported, - }; - - static const uint32_t supported_drm_formats[] = { -@@ -549,6 +777,14 @@ static const uint32_t supported_drm_formats[] = { - DRM_FORMAT_YUV420, - DRM_FORMAT_YUV411, - DRM_FORMAT_YUV410, -+ DRM_FORMAT_YUV420_8BIT, /* Amlogic FBC Only */ -+ DRM_FORMAT_YUV420_10BIT, /* Amlogic FBC Only */ -+}; -+ -+static const uint64_t format_modifiers[] = { -+ DRM_FORMAT_MOD_AMLOGIC_FBC(AMLOGIC_FBC_LAYOUT_BASIC, 0), -+ DRM_FORMAT_MOD_LINEAR, -+ DRM_FORMAT_MOD_INVALID, - }; - - int meson_overlay_create(struct meson_drm *priv) -@@ -570,7 +806,7 @@ int meson_overlay_create(struct meson_drm *priv) - &meson_overlay_funcs, - supported_drm_formats, - ARRAY_SIZE(supported_drm_formats), -- NULL, -+ format_modifiers, - DRM_PLANE_TYPE_OVERLAY, "meson_overlay_plane"); - - drm_plane_helper_add(plane, &meson_overlay_helper_funcs); --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0067-arm64-dts-meson-shorten-audio-card-names-upstream-ca.patch b/projects/Amlogic/patches/linux/amlogic-0067-arm64-dts-meson-shorten-audio-card-names-upstream-ca.patch new file mode 100644 index 00000000000..610ef74c95d --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0067-arm64-dts-meson-shorten-audio-card-names-upstream-ca.patch @@ -0,0 +1,316 @@ +From 4ea272f3089b07552c45a150b5623dba62d1c176 Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Thu, 31 Dec 2020 15:54:34 +0000 +Subject: [PATCH 67/79] arm64: dts: meson: shorten audio card names (upstream + cards) + +This patch shortens all audio card model names by dropping the SoC +prefix (for conformity) and rewording those that are still longer +than the 15x character card name limit in alsa. + +Many current names are over the limit so alsa truncates the name +causing a not-obvious mismatch between names in device-tree and +the string to be used in an alsa card conf. + +e.g. "G12B-KHADAS-VIM3" is truncated to "G12B-KHADAS-VIM" + +VIM3:~ # cat /proc/asound/cards + 0 [G12BKHADASVIM3 ]: G12B-KHADAS-VIM - G12B-KHADAS-VIM3 + G12B-KHADAS-VIM3 + +While users copy the device-tree name to confs: + + +G12B-KHADAS-VIM3.pcm.surround51.0 { + @args [ CARD ] + @args.CARD { type string } + type route + slave.pcm { + +Signed-off-by: Christian Hewitt +--- + arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 2 +- + arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 2 +- + arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts | 2 +- + arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts | 2 +- + arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 2 +- + arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts | 2 +- + arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi | 2 +- + arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi | 2 +- + arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 2 +- + arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 2 +- + arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 2 +- + arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-hub.dts | 2 +- + arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts | 2 +- + arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dts | 2 +- + arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 2 +- + arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts | 2 +- + arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 2 +- + arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 2 +- + arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 2 +- + arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts | 2 +- + 20 files changed, 20 insertions(+), 20 deletions(-) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts +index b00d0468c753..81269ccc2496 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts +@@ -181,7 +181,7 @@ + + sound { + compatible = "amlogic,axg-sound-card"; +- model = "G12A-SEI510"; ++ model = "SEI510"; + audio-aux-devs = <&tdmout_a>, <&tdmout_b>, + <&tdmin_a>, <&tdmin_b>; + audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0", +diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts +index 463a72d6bb7c..579f3d02d613 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts +@@ -150,7 +150,7 @@ + + sound { + compatible = "amlogic,axg-sound-card"; +- model = "G12A-X96-MAX"; ++ model = "X96-MAX"; + audio-aux-devs = <&tdmout_b>; + audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", + "TDMOUT_B IN 1", "FRDDR_B OUT 1", +diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts +index 0e5c500fb78f..0e331aa5a2d7 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts +@@ -44,7 +44,7 @@ + + sound { + compatible = "amlogic,axg-sound-card"; +- model = "G12B-GTKING-PRO"; ++ model = "GTKING-PRO"; + audio-aux-devs = <&tdmout_b>; + audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", + "TDMOUT_B IN 1", "FRDDR_B OUT 1", +diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts +index 10b87eb97b14..a7db84a500bb 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts +@@ -28,7 +28,7 @@ + + sound { + compatible = "amlogic,axg-sound-card"; +- model = "G12B-GTKING"; ++ model = "GTKING"; + audio-aux-devs = <&tdmout_b>; + audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", + "TDMOUT_B IN 1", "FRDDR_B OUT 1", +diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi +index b78be3e6974d..58ce569b2ace 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi ++++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi +@@ -213,7 +213,7 @@ + + sound { + compatible = "amlogic,axg-sound-card"; +- model = "G12B-ODROID-N2"; ++ model = "ODROID-N2"; + audio-widgets = "Line", "Lineout"; + audio-aux-devs = <&tdmout_b>, <&tdmout_c>, <&tdmin_a>, + <&tdmin_b>, <&tdmin_c>, <&tdmin_lb>, +diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts +index b57bb0befc69..0c7892600d56 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts +@@ -23,7 +23,7 @@ + + sound { + compatible = "amlogic,axg-sound-card"; +- model = "G12B-UGOOS-AM6"; ++ model = "UGOOS-AM6"; + audio-aux-devs = <&tdmout_b>; + audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", + "TDMOUT_B IN 1", "FRDDR_B OUT 1", +diff --git a/arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi +index c2480bab8d33..2d7032f41e4b 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi ++++ b/arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi +@@ -186,7 +186,7 @@ + + sound { + compatible = "amlogic,gx-sound-card"; +- model = "GXL-LIBRETECH-S9XX-PC"; ++ model = "LIBRETECH-PC"; + audio-aux-devs = <&dio2133>; + audio-widgets = "Speaker", "7J4-14 LEFT", + "Speaker", "7J4-11 RIGHT"; +diff --git a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi +index 6b57e15aade3..dafc841f7c16 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi ++++ b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi +@@ -121,7 +121,7 @@ + + sound { + compatible = "amlogic,gx-sound-card"; +- model = "GX-P230-Q200"; ++ model = "P230-Q200"; + audio-aux-devs = <&dio2133>; + audio-widgets = "Line", "Lineout"; + audio-routing = "AU2 INL", "ACODEC LOLP", +diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts +index 089e0636ba8a..7273eed5292c 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts +@@ -134,7 +134,7 @@ + + sound { + compatible = "amlogic,gx-sound-card"; +- model = "GXBB-NANOPI-K2"; ++ model = "NANOPI-K2"; + assigned-clocks = <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>; +diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts +index b5b11cb9f393..f887bfb445fd 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts +@@ -143,7 +143,7 @@ + + sound { + compatible = "amlogic,gx-sound-card"; +- model = "GXBB-NEXBOX-A95X"; ++ model = "NEXBOX-A95X"; + assigned-clocks = <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>; +diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +index c04ef57f7b3b..bfaf7f41a2d6 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +@@ -176,7 +176,7 @@ + + sound { + compatible = "amlogic,gx-sound-card"; +- model = "GXBB-ODROID-C2"; ++ model = "ODROID-C2"; + assigned-clocks = <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>; +diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-hub.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-hub.dts +index 0c1570153842..58733017eda8 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-hub.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-hub.dts +@@ -15,7 +15,7 @@ + + sound { + compatible = "amlogic,gx-sound-card"; +- model = "GXBB-WETEK-HUB"; ++ model = "WETEK-HUB"; + assigned-clocks = <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>; +diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts +index f2562c7de67c..6eae692792ec 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts +@@ -50,7 +50,7 @@ + + sound { + compatible = "amlogic,gx-sound-card"; +- model = "GXBB-WETEK-PLAY2"; ++ model = "WETEK-PLAY2"; + assigned-clocks = <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>; +diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dts +index 9e43f4dca90d..2d769203f671 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dts +@@ -118,7 +118,7 @@ + + sound { + compatible = "amlogic,gx-sound-card"; +- model = "GXL-LIBRETECH-S805X-AC"; ++ model = "LIBRETECH-AC"; + audio-widgets = "Speaker", "9J5-3 LEFT", + "Speaker", "9J5-2 RIGHT"; + audio-routing = "9J5-3 LEFT", "ACODEC LOLN", +diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts +index 45adae480a3d..60feac0179c0 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts +@@ -66,7 +66,7 @@ + + sound { + compatible = "amlogic,gx-sound-card"; +- model = "GXL-KHADAS-VIM1"; ++ model = "KHADAS-VIM"; + assigned-clocks = <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>; +diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts +index 9a3c08e6e6cc..93d8f8aff70d 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts +@@ -159,7 +159,7 @@ + + sound { + compatible = "amlogic,gx-sound-card"; +- model = "GXL-LIBRETECH-S905X-CC-V2"; ++ model = "LIBRETECH-CC-V2"; + assigned-clocks = <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>; +diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts +index 5ae7bb6209cb..82bfabfbd39c 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts +@@ -135,7 +135,7 @@ + + sound { + compatible = "amlogic,gx-sound-card"; +- model = "GXL-LIBRETECH-S905X-CC"; ++ model = "LIBRETECH-CC"; + audio-aux-devs = <&dio2133>; + audio-widgets = "Line", "Lineout"; + audio-routing = "AU2 INL", "ACODEC LOLN", +diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +index 25857e0c0831..18a4b7a6c5df 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +@@ -148,7 +148,7 @@ + + sound { + compatible = "amlogic,gx-sound-card"; +- model = "GXM-KHADAS-VIM2"; ++ model = "KHADAS-VIM2"; + assigned-clocks = <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>; +diff --git a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi +index 4e4c2f924486..f1706873d7a8 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi ++++ b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi +@@ -170,7 +170,7 @@ + + sound { + compatible = "amlogic,axg-sound-card"; +- model = "G12B-KHADAS-VIM3"; ++ model = "KHADAS-VIM3"; + audio-aux-devs = <&tdmin_a>, <&tdmout_a>; + audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0", + "TDMOUT_A IN 1", "FRDDR_B OUT 0", +diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts +index 039a8d0d1e9b..2194a778973f 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts +@@ -220,7 +220,7 @@ + + sound { + compatible = "amlogic,axg-sound-card"; +- model = "SM1-SEI610"; ++ model = "SEI610"; + audio-aux-devs = <&tdmout_a>, <&tdmout_b>, + <&tdmin_a>, <&tdmin_b>; + audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0", +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0068-FROMLIST-v6-drm-meson-overlay-setup-overlay-for-Amlo.patch b/projects/Amlogic/patches/linux/amlogic-0068-FROMLIST-v6-drm-meson-overlay-setup-overlay-for-Amlo.patch deleted file mode 100644 index 4ab0b50dfa9..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0068-FROMLIST-v6-drm-meson-overlay-setup-overlay-for-Amlo.patch +++ /dev/null @@ -1,86 +0,0 @@ -From e12f5acc80287163a23a72ee07859bb9ce9938e4 Mon Sep 17 00:00:00 2001 -From: Neil Armstrong -Date: Thu, 14 May 2020 05:27:47 +0000 -Subject: [PATCH 068/156] FROMLIST(v6): drm/meson: overlay: setup overlay for - Amlogic FBC Memory Saving mode - -Setup the Amlogic FBC decoder for the VD1 video overlay plane to use -a different superblock size for the Memory Saving mode. - -Tested-by: Kevin Hilman -Signed-off-by: Neil Armstrong ---- - drivers/gpu/drm/meson/meson_overlay.c | 25 +++++++++++++++++++++++-- - 1 file changed, 23 insertions(+), 2 deletions(-) - -diff --git a/drivers/gpu/drm/meson/meson_overlay.c b/drivers/gpu/drm/meson/meson_overlay.c -index 2713d008cee8..b5c502876428 100644 ---- a/drivers/gpu/drm/meson/meson_overlay.c -+++ b/drivers/gpu/drm/meson/meson_overlay.c -@@ -487,6 +487,10 @@ static void meson_overlay_atomic_update(struct drm_plane *plane, - AFBC_HOLD_LINE_NUM(8) | - AFBC_BURST_LEN(2); - -+ if (fb->modifier & DRM_FORMAT_MOD_AMLOGIC_FBC(0, -+ AMLOGIC_FBC_OPTION_MEM_SAVING)) -+ priv->viu.vd1_afbc_mode |= AFBC_BLK_MEM_MODE; -+ - priv->viu.vd1_afbc_en = 0x1600 | AFBC_DEC_ENABLE; - - priv->viu.vd1_afbc_conv_ctrl = AFBC_CONV_LBUF_LEN(256); -@@ -672,12 +676,17 @@ static void meson_overlay_atomic_update(struct drm_plane *plane, - } - - if (priv->viu.vd1_afbc) { -+ /* Default mode is 4k per superblock */ -+ unsigned long block_size = 4096; - unsigned long body_size; - -- /* Default mode is 4k per superblock */ -+ /* 8bit mem saving mode is 3072bytes per superblock */ -+ if (priv->viu.vd1_afbc_mode & AFBC_BLK_MEM_MODE) -+ block_size = 3072; -+ - body_size = (ALIGN(priv->viu.vd1_stride0, 64) / 64) * - (ALIGN(priv->viu.vd1_height0, 32) / 32) * -- 4096; -+ block_size; - - priv->viu.vd1_afbc_body_addr = priv->viu.vd1_addr0 >> 4; - -@@ -735,6 +744,9 @@ static bool meson_overlay_format_mod_supported(struct drm_plane *plane, - unsigned int layout = modifier & - DRM_FORMAT_MOD_AMLOGIC_FBC( - __fourcc_mod_amlogic_layout_mask, 0); -+ unsigned int options = -+ (modifier >> __fourcc_mod_amlogic_options_shift) & -+ __fourcc_mod_amlogic_options_mask; - - if (format != DRM_FORMAT_YUV420_8BIT && - format != DRM_FORMAT_YUV420_10BIT) { -@@ -749,6 +761,13 @@ static bool meson_overlay_format_mod_supported(struct drm_plane *plane, - return false; - } - -+ if (options && -+ options != AMLOGIC_FBC_OPTION_MEM_SAVING) { -+ DRM_DEBUG_KMS("%llx invalid layout %x\n", -+ modifier, layout); -+ return false; -+ } -+ - return true; - } - -@@ -782,6 +801,8 @@ static const uint32_t supported_drm_formats[] = { - }; - - static const uint64_t format_modifiers[] = { -+ DRM_FORMAT_MOD_AMLOGIC_FBC(AMLOGIC_FBC_LAYOUT_BASIC, -+ AMLOGIC_FBC_OPTION_MEM_SAVING), - DRM_FORMAT_MOD_AMLOGIC_FBC(AMLOGIC_FBC_LAYOUT_BASIC, 0), - DRM_FORMAT_MOD_LINEAR, - DRM_FORMAT_MOD_INVALID, --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0068-arm64-dts-meson-shorten-audio-card-name-for-sm1-odro.patch b/projects/Amlogic/patches/linux/amlogic-0068-arm64-dts-meson-shorten-audio-card-name-for-sm1-odro.patch new file mode 100644 index 00000000000..19ac10ef0fc --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0068-arm64-dts-meson-shorten-audio-card-name-for-sm1-odro.patch @@ -0,0 +1,26 @@ +From fc90aa1caec20cb75081e2055493fc87405d8183 Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Thu, 31 Dec 2020 16:38:08 +0000 +Subject: [PATCH 68/79] arm64: dts: meson: shorten audio card name for + sm1-odroid dtsi + +--- + arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi +index 49e1bb7a4294..dcf0c298a9bc 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi ++++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi +@@ -161,7 +161,7 @@ + + sound { + compatible = "amlogic,axg-sound-card"; +- model = "SM1-ODROID-C4"; ++ model = "ODROID-C4"; + audio-aux-devs = <&tdmout_b>; + audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", + "TDMOUT_B IN 1", "FRDDR_B OUT 1", +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0069-FROMLIST-v6-drm-meson-overlay-setup-overlay-for-Amlo.patch b/projects/Amlogic/patches/linux/amlogic-0069-FROMLIST-v6-drm-meson-overlay-setup-overlay-for-Amlo.patch deleted file mode 100644 index 7b73e215a83..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0069-FROMLIST-v6-drm-meson-overlay-setup-overlay-for-Amlo.patch +++ /dev/null @@ -1,105 +0,0 @@ -From c8ef474b0c20ba98054f57203144bb91929354bf Mon Sep 17 00:00:00 2001 -From: Neil Armstrong -Date: Thu, 14 May 2020 05:28:39 +0000 -Subject: [PATCH 069/156] FROMLIST(v6): drm/meson: overlay: setup overlay for - Amlogic FBC Scatter Memory layout - -Setup the Amlogic FBC decoder for the VD1 video overlay plane to use -read the FBC header as Scatter Memory layout reference. - -Tested-by: Kevin Hilman -Signed-off-by: Neil Armstrong ---- - drivers/gpu/drm/meson/meson_overlay.c | 53 ++++++++++++++++++--------- - 1 file changed, 35 insertions(+), 18 deletions(-) - -diff --git a/drivers/gpu/drm/meson/meson_overlay.c b/drivers/gpu/drm/meson/meson_overlay.c -index b5c502876428..6aef28767fc1 100644 ---- a/drivers/gpu/drm/meson/meson_overlay.c -+++ b/drivers/gpu/drm/meson/meson_overlay.c -@@ -491,6 +491,10 @@ static void meson_overlay_atomic_update(struct drm_plane *plane, - AMLOGIC_FBC_OPTION_MEM_SAVING)) - priv->viu.vd1_afbc_mode |= AFBC_BLK_MEM_MODE; - -+ if ((fb->modifier & __fourcc_mod_amlogic_layout_mask) == -+ AMLOGIC_FBC_LAYOUT_SCATTER) -+ priv->viu.vd1_afbc_mode |= AFBC_SCATTER_MODE; -+ - priv->viu.vd1_afbc_en = 0x1600 | AFBC_DEC_ENABLE; - - priv->viu.vd1_afbc_conv_ctrl = AFBC_CONV_LBUF_LEN(256); -@@ -676,23 +680,32 @@ static void meson_overlay_atomic_update(struct drm_plane *plane, - } - - if (priv->viu.vd1_afbc) { -- /* Default mode is 4k per superblock */ -- unsigned long block_size = 4096; -- unsigned long body_size; -- -- /* 8bit mem saving mode is 3072bytes per superblock */ -- if (priv->viu.vd1_afbc_mode & AFBC_BLK_MEM_MODE) -- block_size = 3072; -- -- body_size = (ALIGN(priv->viu.vd1_stride0, 64) / 64) * -- (ALIGN(priv->viu.vd1_height0, 32) / 32) * -- block_size; -- -- priv->viu.vd1_afbc_body_addr = priv->viu.vd1_addr0 >> 4; -- -- /* Header is after body content */ -- priv->viu.vd1_afbc_head_addr = (priv->viu.vd1_addr0 + -- body_size) >> 4; -+ if (priv->viu.vd1_afbc_mode & AFBC_SCATTER_MODE) { -+ /* -+ * In Scatter mode, the header contains the physical -+ * body content layout, thus the body content -+ * size isn't needed. -+ */ -+ priv->viu.vd1_afbc_head_addr = priv->viu.vd1_addr0 >> 4; -+ priv->viu.vd1_afbc_body_addr = 0; -+ } else { -+ /* Default mode is 4k per superblock */ -+ unsigned long block_size = 4096; -+ unsigned long body_size; -+ -+ /* 8bit mem saving mode is 3072bytes per superblock */ -+ if (priv->viu.vd1_afbc_mode & AFBC_BLK_MEM_MODE) -+ block_size = 3072; -+ -+ body_size = (ALIGN(priv->viu.vd1_stride0, 64) / 64) * -+ (ALIGN(priv->viu.vd1_height0, 32) / 32) * -+ block_size; -+ -+ priv->viu.vd1_afbc_body_addr = priv->viu.vd1_addr0 >> 4; -+ /* Header is after body content */ -+ priv->viu.vd1_afbc_head_addr = (priv->viu.vd1_addr0 + -+ body_size) >> 4; -+ } - } - - priv->viu.vd1_enabled = true; -@@ -755,7 +768,8 @@ static bool meson_overlay_format_mod_supported(struct drm_plane *plane, - return false; - } - -- if (layout != AMLOGIC_FBC_LAYOUT_BASIC) { -+ if (layout != AMLOGIC_FBC_LAYOUT_BASIC && -+ layout != AMLOGIC_FBC_LAYOUT_SCATTER) { - DRM_DEBUG_KMS("%llx invalid layout %x\n", - modifier, layout); - return false; -@@ -801,8 +815,11 @@ static const uint32_t supported_drm_formats[] = { - }; - - static const uint64_t format_modifiers[] = { -+ DRM_FORMAT_MOD_AMLOGIC_FBC(AMLOGIC_FBC_LAYOUT_SCATTER, -+ AMLOGIC_FBC_OPTION_MEM_SAVING), - DRM_FORMAT_MOD_AMLOGIC_FBC(AMLOGIC_FBC_LAYOUT_BASIC, - AMLOGIC_FBC_OPTION_MEM_SAVING), -+ DRM_FORMAT_MOD_AMLOGIC_FBC(AMLOGIC_FBC_LAYOUT_SCATTER, 0), - DRM_FORMAT_MOD_AMLOGIC_FBC(AMLOGIC_FBC_LAYOUT_BASIC, 0), - DRM_FORMAT_MOD_LINEAR, - DRM_FORMAT_MOD_INVALID, --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0069-arm64-dts-meson-shorten-audio-card-name-for-a95xf3.patch b/projects/Amlogic/patches/linux/amlogic-0069-arm64-dts-meson-shorten-audio-card-name-for-a95xf3.patch new file mode 100644 index 00000000000..f1bcf2210e7 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0069-arm64-dts-meson-shorten-audio-card-name-for-a95xf3.patch @@ -0,0 +1,39 @@ +From 86789a3dcc1c64acf41c8043cc338437cb2f8029 Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Fri, 1 Jan 2021 08:09:05 +0000 +Subject: [PATCH 69/79] arm64: dts: meson: shorten audio card name for a95xf3 + +--- + arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-2g.dts | 2 +- + arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-4g.dts | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-2g.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-2g.dts +index 4f4c0fabd16d..ae4c08c26c8a 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-2g.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-2g.dts +@@ -15,7 +15,7 @@ + + sound { + compatible = "amlogic,axg-sound-card"; +- model = "SM1-A95XF3-AIR"; ++ model = "A95XF3-AIR"; + audio-aux-devs = <&tdmout_b>; + audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", + "TDMOUT_B IN 1", "FRDDR_B OUT 1", +diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-4g.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-4g.dts +index 3315e22902dd..1a8a3871c12a 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-4g.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-4g.dts +@@ -15,7 +15,7 @@ + + sound { + compatible = "amlogic,axg-sound-card"; +- model = "SM1-A95XF3-AIR"; ++ model = "A95XF3-AIR"; + audio-aux-devs = <&tdmout_b>; + audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", + "TDMOUT_B IN 1", "FRDDR_B OUT 1", +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0070-FROMLIST-v6-drm-meson-crtc-handle-commit-of-Amlogic-.patch b/projects/Amlogic/patches/linux/amlogic-0070-FROMLIST-v6-drm-meson-crtc-handle-commit-of-Amlogic-.patch deleted file mode 100644 index 674055fdf55..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0070-FROMLIST-v6-drm-meson-crtc-handle-commit-of-Amlogic-.patch +++ /dev/null @@ -1,161 +0,0 @@ -From 6fde0633ecbb79675898bcb518b5150b61f10d72 Mon Sep 17 00:00:00 2001 -From: Neil Armstrong -Date: Thu, 14 May 2020 05:29:36 +0000 -Subject: [PATCH 070/156] FROMLIST(v6): drm/meson: crtc: handle commit of - Amlogic FBC frames - -Since the VD1 Amlogic FBC decoder is now configured by the overlay driver, -commit the right registers to decode the Amlogic FBC frame. - -Tested-by: Kevin Hilman -Signed-off-by: Neil Armstrong ---- - drivers/gpu/drm/meson/meson_crtc.c | 118 +++++++++++++++++++++-------- - 1 file changed, 88 insertions(+), 30 deletions(-) - -diff --git a/drivers/gpu/drm/meson/meson_crtc.c b/drivers/gpu/drm/meson/meson_crtc.c -index e66b6271ff58..2854272dc2d9 100644 ---- a/drivers/gpu/drm/meson/meson_crtc.c -+++ b/drivers/gpu/drm/meson/meson_crtc.c -@@ -291,6 +291,10 @@ static void meson_crtc_enable_vd1(struct meson_drm *priv) - VPP_VD1_PREBLEND | VPP_VD1_POSTBLEND | - VPP_COLOR_MNG_ENABLE, - priv->io_base + _REG(VPP_MISC)); -+ -+ writel_bits_relaxed(VIU_CTRL0_AFBC_TO_VD1, -+ priv->viu.vd1_afbc ? VIU_CTRL0_AFBC_TO_VD1 : 0, -+ priv->io_base + _REG(VIU_MISC_CTRL0)); - } - - static void meson_g12a_crtc_enable_vd1(struct meson_drm *priv) -@@ -300,6 +304,10 @@ static void meson_g12a_crtc_enable_vd1(struct meson_drm *priv) - VD_BLEND_POSTBLD_SRC_VD1 | - VD_BLEND_POSTBLD_PREMULT_EN, - priv->io_base + _REG(VD1_BLEND_SRC_CTRL)); -+ -+ writel_relaxed(priv->viu.vd1_afbc ? -+ (VD1_AXI_SEL_AFBC | AFBC_VD1_SEL) : 0, -+ priv->io_base + _REG(VD1_AFBCD0_MISC_CTRL)); - } - - void meson_crtc_irq(struct meson_drm *priv) -@@ -383,36 +391,86 @@ void meson_crtc_irq(struct meson_drm *priv) - /* Update the VD1 registers */ - if (priv->viu.vd1_enabled && priv->viu.vd1_commit) { - -- switch (priv->viu.vd1_planes) { -- case 3: -- meson_canvas_config(priv->canvas, -- priv->canvas_id_vd1_2, -- priv->viu.vd1_addr2, -- priv->viu.vd1_stride2, -- priv->viu.vd1_height2, -- MESON_CANVAS_WRAP_NONE, -- MESON_CANVAS_BLKMODE_LINEAR, -- MESON_CANVAS_ENDIAN_SWAP64); -- /* fallthrough */ -- case 2: -- meson_canvas_config(priv->canvas, -- priv->canvas_id_vd1_1, -- priv->viu.vd1_addr1, -- priv->viu.vd1_stride1, -- priv->viu.vd1_height1, -- MESON_CANVAS_WRAP_NONE, -- MESON_CANVAS_BLKMODE_LINEAR, -- MESON_CANVAS_ENDIAN_SWAP64); -- /* fallthrough */ -- case 1: -- meson_canvas_config(priv->canvas, -- priv->canvas_id_vd1_0, -- priv->viu.vd1_addr0, -- priv->viu.vd1_stride0, -- priv->viu.vd1_height0, -- MESON_CANVAS_WRAP_NONE, -- MESON_CANVAS_BLKMODE_LINEAR, -- MESON_CANVAS_ENDIAN_SWAP64); -+ if (priv->viu.vd1_afbc) { -+ writel_relaxed(priv->viu.vd1_afbc_head_addr, -+ priv->io_base + -+ _REG(AFBC_HEAD_BADDR)); -+ writel_relaxed(priv->viu.vd1_afbc_body_addr, -+ priv->io_base + -+ _REG(AFBC_BODY_BADDR)); -+ writel_relaxed(priv->viu.vd1_afbc_en, -+ priv->io_base + -+ _REG(AFBC_ENABLE)); -+ writel_relaxed(priv->viu.vd1_afbc_mode, -+ priv->io_base + -+ _REG(AFBC_MODE)); -+ writel_relaxed(priv->viu.vd1_afbc_size_in, -+ priv->io_base + -+ _REG(AFBC_SIZE_IN)); -+ writel_relaxed(priv->viu.vd1_afbc_dec_def_color, -+ priv->io_base + -+ _REG(AFBC_DEC_DEF_COLOR)); -+ writel_relaxed(priv->viu.vd1_afbc_conv_ctrl, -+ priv->io_base + -+ _REG(AFBC_CONV_CTRL)); -+ writel_relaxed(priv->viu.vd1_afbc_size_out, -+ priv->io_base + -+ _REG(AFBC_SIZE_OUT)); -+ writel_relaxed(priv->viu.vd1_afbc_vd_cfmt_ctrl, -+ priv->io_base + -+ _REG(AFBC_VD_CFMT_CTRL)); -+ writel_relaxed(priv->viu.vd1_afbc_vd_cfmt_w, -+ priv->io_base + -+ _REG(AFBC_VD_CFMT_W)); -+ writel_relaxed(priv->viu.vd1_afbc_mif_hor_scope, -+ priv->io_base + -+ _REG(AFBC_MIF_HOR_SCOPE)); -+ writel_relaxed(priv->viu.vd1_afbc_mif_ver_scope, -+ priv->io_base + -+ _REG(AFBC_MIF_VER_SCOPE)); -+ writel_relaxed(priv->viu.vd1_afbc_pixel_hor_scope, -+ priv->io_base+ -+ _REG(AFBC_PIXEL_HOR_SCOPE)); -+ writel_relaxed(priv->viu.vd1_afbc_pixel_ver_scope, -+ priv->io_base + -+ _REG(AFBC_PIXEL_VER_SCOPE)); -+ writel_relaxed(priv->viu.vd1_afbc_vd_cfmt_h, -+ priv->io_base + -+ _REG(AFBC_VD_CFMT_H)); -+ } else { -+ switch (priv->viu.vd1_planes) { -+ case 3: -+ meson_canvas_config(priv->canvas, -+ priv->canvas_id_vd1_2, -+ priv->viu.vd1_addr2, -+ priv->viu.vd1_stride2, -+ priv->viu.vd1_height2, -+ MESON_CANVAS_WRAP_NONE, -+ MESON_CANVAS_BLKMODE_LINEAR, -+ MESON_CANVAS_ENDIAN_SWAP64); -+ fallthrough; -+ case 2: -+ meson_canvas_config(priv->canvas, -+ priv->canvas_id_vd1_1, -+ priv->viu.vd1_addr1, -+ priv->viu.vd1_stride1, -+ priv->viu.vd1_height1, -+ MESON_CANVAS_WRAP_NONE, -+ MESON_CANVAS_BLKMODE_LINEAR, -+ MESON_CANVAS_ENDIAN_SWAP64); -+ fallthrough; -+ case 1: -+ meson_canvas_config(priv->canvas, -+ priv->canvas_id_vd1_0, -+ priv->viu.vd1_addr0, -+ priv->viu.vd1_stride0, -+ priv->viu.vd1_height0, -+ MESON_CANVAS_WRAP_NONE, -+ MESON_CANVAS_BLKMODE_LINEAR, -+ MESON_CANVAS_ENDIAN_SWAP64); -+ } -+ -+ writel_relaxed(0, priv->io_base + _REG(AFBC_ENABLE)); - } - - writel_relaxed(priv->viu.vd1_if0_gen_reg, --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0070-arm64-dts-meson-shorten-audio-card-name-for-gs-king-.patch b/projects/Amlogic/patches/linux/amlogic-0070-arm64-dts-meson-shorten-audio-card-name-for-gs-king-.patch new file mode 100644 index 00000000000..78ec3fada0c --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0070-arm64-dts-meson-shorten-audio-card-name-for-gs-king-.patch @@ -0,0 +1,26 @@ +From 4325a6e823d49522d6e81f2a544fe2addd95ab36 Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Thu, 31 Dec 2020 16:35:53 +0000 +Subject: [PATCH 70/79] arm64: dts: meson: shorten audio card name for + gs-king-x + +--- + arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts +index c9d9dcb0cd65..211191f66344 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts +@@ -35,7 +35,7 @@ + + sound { + compatible = "amlogic,axg-sound-card"; +- model = "G12B-GSKING-X"; ++ model = "GSKING-X"; + audio-aux-devs = <&tdmout_a>; + audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 1", + "TDMOUT_A IN 1", "FRDDR_B OUT 1", +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0071-FROMLIST-v1-thermal-devfreq_cooling-Use-PM-QoS-to-se.patch b/projects/Amlogic/patches/linux/amlogic-0071-FROMLIST-v1-thermal-devfreq_cooling-Use-PM-QoS-to-se.patch deleted file mode 100644 index 9febdab6e28..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0071-FROMLIST-v1-thermal-devfreq_cooling-Use-PM-QoS-to-se.patch +++ /dev/null @@ -1,165 +0,0 @@ -From 9b363f58982cad5066cf071bda8b8b169595e9ce Mon Sep 17 00:00:00 2001 -From: Matthias Kaehlcke -Date: Wed, 18 Mar 2020 11:45:46 +0000 -Subject: [PATCH 071/156] FROMLIST(v1): thermal: devfreq_cooling: Use PM QoS to - set frequency limits - -Now that devfreq supports limiting the frequency range of a device -through PM QoS make use of it instead of disabling OPPs that should -not be used. - -The switch from disabling OPPs to PM QoS introduces a subtle behavioral -change in case of conflicting requests (min > max): PM QoS gives -precedence to the MIN_FREQUENCY request, while higher OPPs disabled -with dev_pm_opp_disable() would override MIN_FREQUENCY. - -Signed-off-by: Matthias Kaehlcke -Reviewed-by: Lukasz Luba -Reviewed-by: Chanwoo Choi -Signed-off-by: Daniel Lezcano -Link: https://lore.kernel.org/r/20200318114548.19916-4-lukasz.luba@arm.com ---- - drivers/thermal/devfreq_cooling.c | 70 ++++++++++--------------------- - 1 file changed, 23 insertions(+), 47 deletions(-) - -diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal/devfreq_cooling.c -index a87d4fa031c8..f7f32e98331b 100644 ---- a/drivers/thermal/devfreq_cooling.c -+++ b/drivers/thermal/devfreq_cooling.c -@@ -24,11 +24,13 @@ - #include - #include - #include -+#include - #include - - #include - --#define SCALE_ERROR_MITIGATION 100 -+#define HZ_PER_KHZ 1000 -+#define SCALE_ERROR_MITIGATION 100 - - static DEFINE_IDA(devfreq_ida); - -@@ -54,6 +56,8 @@ static DEFINE_IDA(devfreq_ida); - * The 'res_util' range is from 100 to (power_table[state] * 100) - * for the corresponding 'state'. - * @capped_state: index to cooling state with in dynamic power budget -+ * @req_max_freq: PM QoS request for limiting the maximum frequency -+ * of the devfreq device. - */ - struct devfreq_cooling_device { - int id; -@@ -66,49 +70,9 @@ struct devfreq_cooling_device { - struct devfreq_cooling_power *power_ops; - u32 res_util; - int capped_state; -+ struct dev_pm_qos_request req_max_freq; - }; - --/** -- * partition_enable_opps() - disable all opps above a given state -- * @dfc: Pointer to devfreq we are operating on -- * @cdev_state: cooling device state we're setting -- * -- * Go through the OPPs of the device, enabling all OPPs until -- * @cdev_state and disabling those frequencies above it. -- */ --static int partition_enable_opps(struct devfreq_cooling_device *dfc, -- unsigned long cdev_state) --{ -- int i; -- struct device *dev = dfc->devfreq->dev.parent; -- -- for (i = 0; i < dfc->freq_table_size; i++) { -- struct dev_pm_opp *opp; -- int ret = 0; -- unsigned int freq = dfc->freq_table[i]; -- bool want_enable = i >= cdev_state ? true : false; -- -- opp = dev_pm_opp_find_freq_exact(dev, freq, !want_enable); -- -- if (PTR_ERR(opp) == -ERANGE) -- continue; -- else if (IS_ERR(opp)) -- return PTR_ERR(opp); -- -- dev_pm_opp_put(opp); -- -- if (want_enable) -- ret = dev_pm_opp_enable(dev, freq); -- else -- ret = dev_pm_opp_disable(dev, freq); -- -- if (ret) -- return ret; -- } -- -- return 0; --} -- - static int devfreq_cooling_get_max_state(struct thermal_cooling_device *cdev, - unsigned long *state) - { -@@ -135,7 +99,7 @@ static int devfreq_cooling_set_cur_state(struct thermal_cooling_device *cdev, - struct devfreq_cooling_device *dfc = cdev->devdata; - struct devfreq *df = dfc->devfreq; - struct device *dev = df->dev.parent; -- int ret; -+ unsigned long freq; - - if (state == dfc->cooling_state) - return 0; -@@ -145,9 +109,10 @@ static int devfreq_cooling_set_cur_state(struct thermal_cooling_device *cdev, - if (state >= dfc->freq_table_size) - return -EINVAL; - -- ret = partition_enable_opps(dfc, state); -- if (ret) -- return ret; -+ freq = dfc->freq_table[state]; -+ -+ dev_pm_qos_update_request(&dfc->req_max_freq, -+ DIV_ROUND_UP(freq, HZ_PER_KHZ)); - - dfc->cooling_state = state; - -@@ -530,9 +495,15 @@ of_devfreq_cooling_register_power(struct device_node *np, struct devfreq *df, - if (err) - goto free_dfc; - -- err = ida_simple_get(&devfreq_ida, 0, 0, GFP_KERNEL); -+ err = dev_pm_qos_add_request(df->dev.parent, &dfc->req_max_freq, -+ DEV_PM_QOS_MAX_FREQUENCY, -+ PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE); - if (err < 0) - goto free_tables; -+ -+ err = ida_simple_get(&devfreq_ida, 0, 0, GFP_KERNEL); -+ if (err < 0) -+ goto remove_qos_req; - dfc->id = err; - - snprintf(dev_name, sizeof(dev_name), "thermal-devfreq-%d", dfc->id); -@@ -553,6 +524,10 @@ of_devfreq_cooling_register_power(struct device_node *np, struct devfreq *df, - - release_ida: - ida_simple_remove(&devfreq_ida, dfc->id); -+ -+remove_qos_req: -+ dev_pm_qos_remove_request(&dfc->req_max_freq); -+ - free_tables: - kfree(dfc->power_table); - kfree(dfc->freq_table); -@@ -601,6 +576,7 @@ void devfreq_cooling_unregister(struct thermal_cooling_device *cdev) - - thermal_cooling_device_unregister(dfc->cdev); - ida_simple_remove(&devfreq_ida, dfc->id); -+ dev_pm_qos_remove_request(&dfc->req_max_freq); - kfree(dfc->power_table); - kfree(dfc->freq_table); - --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0071-arm64-dts-meson-shorten-audio-card-name-for-nexbox-a.patch b/projects/Amlogic/patches/linux/amlogic-0071-arm64-dts-meson-shorten-audio-card-name-for-nexbox-a.patch new file mode 100644 index 00000000000..eab774d1328 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0071-arm64-dts-meson-shorten-audio-card-name-for-nexbox-a.patch @@ -0,0 +1,26 @@ +From bd65a80ada819a6a07b070c11ffc4d8fd54d41c4 Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Thu, 31 Dec 2020 16:37:31 +0000 +Subject: [PATCH 71/79] arm64: dts: meson: shorten audio card name for + nexbox-a1 + +--- + arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts +index a5db3f67d33f..a8c9ffbd97a4 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts +@@ -105,7 +105,7 @@ + + sound { + compatible = "amlogic,gx-sound-card"; +- model = "GXM-NEXBOX-A1"; ++ model = "NEXBOX-A1"; + assigned-clocks = <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0072-FROMLIST-v1-drm-meson-Remove-unneeded-semicolon.patch b/projects/Amlogic/patches/linux/amlogic-0072-FROMLIST-v1-drm-meson-Remove-unneeded-semicolon.patch deleted file mode 100644 index 262df707866..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0072-FROMLIST-v1-drm-meson-Remove-unneeded-semicolon.patch +++ /dev/null @@ -1,31 +0,0 @@ -From a572fc90cded0c91f821d521ff73df226e001089 Mon Sep 17 00:00:00 2001 -From: Zheng Bin -Date: Sat, 25 Apr 2020 03:27:24 +0000 -Subject: [PATCH 072/156] FROMLIST(v1): drm/meson: Remove unneeded semicolon - -Fixes coccicheck warning: - -drivers/gpu/drm/meson/meson_plane.c:226:3-4: Unneeded semicolon - -Reported-by: Hulk Robot -Signed-off-by: Zheng Bin ---- - drivers/gpu/drm/meson/meson_plane.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/gpu/drm/meson/meson_plane.c b/drivers/gpu/drm/meson/meson_plane.c -index d5cbc47835bf..35338ed18209 100644 ---- a/drivers/gpu/drm/meson/meson_plane.c -+++ b/drivers/gpu/drm/meson/meson_plane.c -@@ -223,7 +223,7 @@ static void meson_plane_atomic_update(struct drm_plane *plane, - priv->viu.osd1_blk0_cfg[0] |= OSD_BLK_MODE_16 | - OSD_COLOR_MATRIX_16_RGB565; - break; -- }; -+ } - } - - switch (fb->format->format) { --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0072-arm64-dts-meson-shorten-audio-card-name-for-p200.patch b/projects/Amlogic/patches/linux/amlogic-0072-arm64-dts-meson-shorten-audio-card-name-for-p200.patch new file mode 100644 index 00000000000..6c2f69ca8b7 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0072-arm64-dts-meson-shorten-audio-card-name-for-p200.patch @@ -0,0 +1,25 @@ +From ecd16c14aa7c563d429c24a50fed4fc2c243124b Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Thu, 31 Dec 2020 16:36:27 +0000 +Subject: [PATCH 72/79] arm64: dts: meson: shorten audio card name for p200 + +--- + arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts +index a16dac72600d..27b3ab20f070 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts +@@ -68,7 +68,7 @@ + + sound { + compatible = "amlogic,gx-sound-card"; +- model = "GXBB-P200"; ++ model = "P200"; + assigned-clocks = <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0073-FROMLIST-v1-drm-meson-viu-fix-setting-the-OSD-burst-.patch b/projects/Amlogic/patches/linux/amlogic-0073-FROMLIST-v1-drm-meson-viu-fix-setting-the-OSD-burst-.patch deleted file mode 100644 index a94d6f6c9e4..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0073-FROMLIST-v1-drm-meson-viu-fix-setting-the-OSD-burst-.patch +++ /dev/null @@ -1,81 +0,0 @@ -From a635aca8df52f601c4ea1cb3facaafb697ca98d9 Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Sun, 26 Apr 2020 02:39:25 +0000 -Subject: [PATCH 073/156] FROMLIST(v1): drm/meson: viu: fix setting the OSD - burst length in VIU_OSD1_FIFO_CTRL_STAT - -The burst length is configured in VIU_OSD1_FIFO_CTRL_STAT[31] and -VIU_OSD1_FIFO_CTRL_STAT[11:10]. The public S905D3 datasheet describes -this as: -- 0x0 = up to 24 per burst -- 0x1 = up to 32 per burst -- 0x2 = up to 48 per burst -- 0x3 = up to 64 per burst -- 0x4 = up to 96 per burst -- 0x5 = up to 128 per burst - -The lower two bits map to VIU_OSD1_FIFO_CTRL_STAT[11:10] while the upper -bit maps to VIU_OSD1_FIFO_CTRL_STAT[31]. - -Replace meson_viu_osd_burst_length_reg() with pre-defined macros which -set these values. meson_viu_osd_burst_length_reg() always returned 0 -(for the two used values: 32 and 64 at least) and thus incorrectly set -the burst size to 24. - -Fixes: 147ae1cbaa1842 ("drm: meson: viu: use proper macros instead of magic constants") -Signed-off-by: Martin Blumenstingl ---- - drivers/gpu/drm/meson/meson_registers.h | 6 ++++++ - drivers/gpu/drm/meson/meson_viu.c | 11 ++--------- - 2 files changed, 8 insertions(+), 9 deletions(-) - -diff --git a/drivers/gpu/drm/meson/meson_registers.h b/drivers/gpu/drm/meson/meson_registers.h -index 08631fdfe4b9..446e7961da48 100644 ---- a/drivers/gpu/drm/meson/meson_registers.h -+++ b/drivers/gpu/drm/meson/meson_registers.h -@@ -266,6 +266,12 @@ - #define VIU_OSD_FIFO_DEPTH_VAL(val) ((val & 0x7f) << 12) - #define VIU_OSD_WORDS_PER_BURST(words) (((words & 0x4) >> 1) << 22) - #define VIU_OSD_FIFO_LIMITS(size) ((size & 0xf) << 24) -+#define VIU_OSD_BURST_LENGTH_24 (0x0 << 31 | 0x0 << 10) -+#define VIU_OSD_BURST_LENGTH_32 (0x0 << 31 | 0x1 << 10) -+#define VIU_OSD_BURST_LENGTH_48 (0x0 << 31 | 0x2 << 10) -+#define VIU_OSD_BURST_LENGTH_64 (0x0 << 31 | 0x3 << 10) -+#define VIU_OSD_BURST_LENGTH_96 (0x1 << 31 | 0x0 << 10) -+#define VIU_OSD_BURST_LENGTH_128 (0x1 << 31 | 0x1 << 10) - - #define VD1_IF0_GEN_REG 0x1a50 - #define VD1_IF0_CANVAS0 0x1a51 -diff --git a/drivers/gpu/drm/meson/meson_viu.c b/drivers/gpu/drm/meson/meson_viu.c -index 304f8ff1339c..aede0c67a57f 100644 ---- a/drivers/gpu/drm/meson/meson_viu.c -+++ b/drivers/gpu/drm/meson/meson_viu.c -@@ -411,13 +411,6 @@ void meson_viu_gxm_disable_osd1_afbc(struct meson_drm *priv) - priv->io_base + _REG(VIU_MISC_CTRL1)); - } - --static inline uint32_t meson_viu_osd_burst_length_reg(uint32_t length) --{ -- uint32_t val = (((length & 0x80) % 24) / 12); -- -- return (((val & 0x3) << 10) | (((val & 0x4) >> 2) << 31)); --} -- - void meson_viu_init(struct meson_drm *priv) - { - uint32_t reg; -@@ -444,9 +437,9 @@ void meson_viu_init(struct meson_drm *priv) - VIU_OSD_FIFO_LIMITS(2); /* fifo_lim: 2*16=32 */ - - if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_G12A)) -- reg |= meson_viu_osd_burst_length_reg(32); -+ reg |= VIU_OSD_BURST_LENGTH_32; - else -- reg |= meson_viu_osd_burst_length_reg(64); -+ reg |= VIU_OSD_BURST_LENGTH_64; - - writel_relaxed(reg, priv->io_base + _REG(VIU_OSD1_FIFO_CTRL_STAT)); - writel_relaxed(reg, priv->io_base + _REG(VIU_OSD2_FIFO_CTRL_STAT)); --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0073-arm64-dts-meson-shorten-audio-card-name-for-p201.patch b/projects/Amlogic/patches/linux/amlogic-0073-arm64-dts-meson-shorten-audio-card-name-for-p201.patch new file mode 100644 index 00000000000..bccfd921b87 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0073-arm64-dts-meson-shorten-audio-card-name-for-p201.patch @@ -0,0 +1,25 @@ +From 43cbba1ca9e27d4f413cd3d72753f8950373db7e Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Thu, 31 Dec 2020 16:36:40 +0000 +Subject: [PATCH 73/79] arm64: dts: meson: shorten audio card name for p201 + +--- + arch/arm64/boot/dts/amlogic/meson-gxbb-p201.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p201.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-p201.dts +index 2e2bccbcfd43..22bd0070146b 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p201.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p201.dts +@@ -16,7 +16,7 @@ + + sound { + compatible = "amlogic,gx-sound-card"; +- model = "GXBB-P201"; ++ model = "P201"; + assigned-clocks = <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0074-FROMLIST-v2-dt-bindings-mfd-add-Khadas-Microcontroll.patch b/projects/Amlogic/patches/linux/amlogic-0074-FROMLIST-v2-dt-bindings-mfd-add-Khadas-Microcontroll.patch deleted file mode 100644 index a0b269d2bdc..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0074-FROMLIST-v2-dt-bindings-mfd-add-Khadas-Microcontroll.patch +++ /dev/null @@ -1,72 +0,0 @@ -From d26d256820295d3be624ef05b407dad787794a85 Mon Sep 17 00:00:00 2001 -From: Neil Armstrong -Date: Wed, 13 May 2020 12:52:30 +0000 -Subject: [PATCH 074/156] FROMLIST(v2): dt-bindings: mfd: add Khadas - Microcontroller bindings - -This Microcontroller is present on the Khadas VIM1, VIM2, VIM3 and Edge -boards. - -It has multiple boot control features like password check, power-on -options, power-off control and system FAN control on recent boards. - -Signed-off-by: Neil Armstrong -Reviewed-by: Rob Herring ---- - .../devicetree/bindings/mfd/khadas,mcu.yaml | 44 +++++++++++++++++++ - 1 file changed, 44 insertions(+) - create mode 100644 Documentation/devicetree/bindings/mfd/khadas,mcu.yaml - -diff --git a/Documentation/devicetree/bindings/mfd/khadas,mcu.yaml b/Documentation/devicetree/bindings/mfd/khadas,mcu.yaml -new file mode 100644 -index 000000000000..a3b976f101e8 ---- /dev/null -+++ b/Documentation/devicetree/bindings/mfd/khadas,mcu.yaml -@@ -0,0 +1,44 @@ -+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) -+%YAML 1.2 -+--- -+$id: http://devicetree.org/schemas/mfd/khadas,mcu.yaml# -+$schema: http://devicetree.org/meta-schemas/core.yaml# -+ -+title: Khadas on-board Microcontroller Device Tree Bindings -+ -+maintainers: -+ - Neil Armstrong -+ -+description: | -+ Khadas embeds a microcontroller on their VIM and Edge boards adding some -+ system feature as PWM Fan control (for VIM2 rev14 or VIM3), User memory -+ storage, IR/Key resume control, system power LED control and more. -+ -+properties: -+ compatible: -+ enum: -+ - khadas,mcu # MCU revision is discoverable -+ -+ "#cooling-cells": # Only needed for boards having FAN control feature -+ const: 2 -+ -+ reg: -+ maxItems: 1 -+ -+required: -+ - compatible -+ - reg -+ -+additionalProperties: false -+ -+examples: -+ - | -+ i2c { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ khadas_mcu: system-controller@18 { -+ compatible = "khadas,mcu"; -+ reg = <0x18>; -+ #cooling-cells = <2>; -+ }; -+ }; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0074-arm64-dts-meson-shorten-audio-card-name-for-p212.patch b/projects/Amlogic/patches/linux/amlogic-0074-arm64-dts-meson-shorten-audio-card-name-for-p212.patch new file mode 100644 index 00000000000..e0310fa6786 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0074-arm64-dts-meson-shorten-audio-card-name-for-p212.patch @@ -0,0 +1,25 @@ +From 1372c9944c5d691a1bc86287fd98df0b1fc3d918 Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Thu, 31 Dec 2020 16:37:16 +0000 +Subject: [PATCH 74/79] arm64: dts: meson: shorten audio card name for p212 + +--- + arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi +index 40776d42bf8e..5d41d93bd008 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi ++++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi +@@ -89,7 +89,7 @@ + + sound { + compatible = "amlogic,gx-sound-card"; +- model = "GXL-S905X-P212"; ++ model = "S905X-P212"; + assigned-clocks = <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0075-FROMLIST-v2-mfd-add-support-for-the-Khadas-System-co.patch b/projects/Amlogic/patches/linux/amlogic-0075-FROMLIST-v2-mfd-add-support-for-the-Khadas-System-co.patch deleted file mode 100644 index ac3e7d11944..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0075-FROMLIST-v2-mfd-add-support-for-the-Khadas-System-co.patch +++ /dev/null @@ -1,310 +0,0 @@ -From e96c9fe545682054b949641d4451853baa83f8f2 Mon Sep 17 00:00:00 2001 -From: Neil Armstrong -Date: Wed, 13 May 2020 12:53:44 +0000 -Subject: [PATCH 075/156] FROMLIST(v2): mfd: add support for the Khadas System - control Microcontroller - -This Microcontroller is present on the Khadas VIM1, VIM2, VIM3 and Edge -boards. - -It has multiple boot control features like password check, power-on -options, power-off control and system FAN control on recent boards. - -This implements a very basic MFD driver with the fan control and User -NVMEM cells. - -Signed-off-by: Neil Armstrong ---- - drivers/mfd/Kconfig | 14 ++++ - drivers/mfd/Makefile | 1 + - drivers/mfd/khadas-mcu.c | 143 +++++++++++++++++++++++++++++++++ - include/linux/mfd/khadas-mcu.h | 91 +++++++++++++++++++++ - 4 files changed, 249 insertions(+) - create mode 100644 drivers/mfd/khadas-mcu.c - create mode 100644 include/linux/mfd/khadas-mcu.h - -diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig -index 0a59249198d3..b95091397052 100644 ---- a/drivers/mfd/Kconfig -+++ b/drivers/mfd/Kconfig -@@ -2003,6 +2003,20 @@ config MFD_WCD934X - This driver provides common support WCD934x audio codec and its - associated Pin Controller, Soundwire Controller and Audio codec. - -+config MFD_KHADAS_MCU -+ tristate "Support for Khadas System control Microcontroller" -+ depends on I2C -+ depends on OF || COMPILE_TEST -+ select MFD_CORE -+ select REGMAP_I2C -+ help -+ Support for the Khadas System control Microcontroller interface present -+ on their VIM and Edge boards. -+ -+ This driver provides common support for accessing the device, -+ additional drivers must be enabled in order to use the functionality -+ of the device. -+ - menu "Multimedia Capabilities Port drivers" - depends on ARCH_SA1100 - -diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile -index f935d10cbf0f..0f1633b096bb 100644 ---- a/drivers/mfd/Makefile -+++ b/drivers/mfd/Makefile -@@ -257,5 +257,6 @@ obj-$(CONFIG_MFD_ROHM_BD70528) += rohm-bd70528.o - obj-$(CONFIG_MFD_ROHM_BD71828) += rohm-bd71828.o - obj-$(CONFIG_MFD_ROHM_BD718XX) += rohm-bd718x7.o - obj-$(CONFIG_MFD_STMFX) += stmfx.o -+obj-$(CONFIG_MFD_KHADAS_MCU) += khadas-mcu.o - - obj-$(CONFIG_SGI_MFD_IOC3) += ioc3.o -diff --git a/drivers/mfd/khadas-mcu.c b/drivers/mfd/khadas-mcu.c -new file mode 100644 -index 000000000000..6d08fa2e373a ---- /dev/null -+++ b/drivers/mfd/khadas-mcu.c -@@ -0,0 +1,143 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Driver for Khadas System control Microcontroller -+ * -+ * Copyright (C) 2020 BayLibre SAS -+ * Author(s): Neil Armstrong -+ */ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+static bool khadas_mcu_reg_volatile(struct device *dev, unsigned int reg) -+{ -+ if (reg >= KHADAS_MCU_USER_DATA_0_REG && -+ reg < KHADAS_MCU_PWR_OFF_CMD_REG) -+ return true; -+ -+ switch (reg) { -+ case KHADAS_MCU_PWR_OFF_CMD_REG: -+ case KHADAS_MCU_PASSWD_START_REG: -+ case KHADAS_MCU_CHECK_VEN_PASSWD_REG: -+ case KHADAS_MCU_CHECK_USER_PASSWD_REG: -+ case KHADAS_MCU_WOL_INIT_START_REG: -+ case KHADAS_MCU_CMD_FAN_STATUS_CTRL_REG: -+ return true; -+ default: -+ return false; -+ } -+} -+ -+static bool khadas_mcu_reg_writeable(struct device *dev, unsigned int reg) -+{ -+ switch (reg) { -+ case KHADAS_MCU_PASSWD_VEN_0_REG: -+ case KHADAS_MCU_PASSWD_VEN_1_REG: -+ case KHADAS_MCU_PASSWD_VEN_2_REG: -+ case KHADAS_MCU_PASSWD_VEN_3_REG: -+ case KHADAS_MCU_PASSWD_VEN_4_REG: -+ case KHADAS_MCU_PASSWD_VEN_5_REG: -+ case KHADAS_MCU_MAC_0_REG: -+ case KHADAS_MCU_MAC_1_REG: -+ case KHADAS_MCU_MAC_2_REG: -+ case KHADAS_MCU_MAC_3_REG: -+ case KHADAS_MCU_MAC_4_REG: -+ case KHADAS_MCU_MAC_5_REG: -+ case KHADAS_MCU_USID_0_REG: -+ case KHADAS_MCU_USID_1_REG: -+ case KHADAS_MCU_USID_2_REG: -+ case KHADAS_MCU_USID_3_REG: -+ case KHADAS_MCU_USID_4_REG: -+ case KHADAS_MCU_USID_5_REG: -+ case KHADAS_MCU_VERSION_0_REG: -+ case KHADAS_MCU_VERSION_1_REG: -+ case KHADAS_MCU_DEVICE_NO_0_REG: -+ case KHADAS_MCU_DEVICE_NO_1_REG: -+ case KHADAS_MCU_FACTORY_TEST_REG: -+ case KHADAS_MCU_SHUTDOWN_NORMAL_STATUS_REG: -+ return false; -+ default: -+ return true; -+ } -+} -+ -+static const struct regmap_config khadas_mcu_regmap_config = { -+ .reg_bits = 8, -+ .reg_stride = 1, -+ .val_bits = 8, -+ .max_register = KHADAS_MCU_CMD_FAN_STATUS_CTRL_REG, -+ .volatile_reg = khadas_mcu_reg_volatile, -+ .writeable_reg = khadas_mcu_reg_writeable, -+ .cache_type = REGCACHE_RBTREE, -+}; -+ -+static struct mfd_cell khadas_mcu_fan_cells[] = { -+ /* Feature supported only on VIM1/2 Rev13+ and VIM3 */ -+ { .name = "khadas-mcu-fan-ctrl", }, -+}; -+ -+static struct mfd_cell khadas_mcu_cells[] = { -+ /* Features supported on all board revisions */ -+ { .name = "khadas-mcu-user-mem", }, -+}; -+ -+static int khadas_mcu_probe(struct i2c_client *client, -+ const struct i2c_device_id *id) -+{ -+ struct device *dev = &client->dev; -+ struct khadas_mcu *khadas_mcu; -+ int ret; -+ -+ khadas_mcu = devm_kzalloc(dev, sizeof(*khadas_mcu), GFP_KERNEL); -+ if (!khadas_mcu) -+ return -ENOMEM; -+ -+ i2c_set_clientdata(client, khadas_mcu); -+ -+ khadas_mcu->dev = dev; -+ -+ khadas_mcu->map = devm_regmap_init_i2c(client, -+ &khadas_mcu_regmap_config); -+ if (IS_ERR(khadas_mcu->map)) { -+ ret = PTR_ERR(khadas_mcu->map); -+ dev_err(dev, "Failed to allocate register map: %d\n", ret); -+ return ret; -+ } -+ -+ ret = devm_mfd_add_devices(dev, PLATFORM_DEVID_NONE, -+ khadas_mcu_cells, -+ ARRAY_SIZE(khadas_mcu_cells), -+ NULL, 0, NULL); -+ if (ret) -+ return ret; -+ -+ if (of_find_property(dev->of_node, "#cooling-cells", NULL)) -+ return devm_mfd_add_devices(dev, PLATFORM_DEVID_NONE, -+ khadas_mcu_fan_cells, -+ ARRAY_SIZE(khadas_mcu_fan_cells), -+ NULL, 0, NULL); -+ -+ return 0; -+} -+ -+static const struct of_device_id khadas_mcu_of_match[] = { -+ { .compatible = "khadas,mcu", }, -+ {}, -+}; -+MODULE_DEVICE_TABLE(of, khadas_mcu_of_match); -+ -+static struct i2c_driver khadas_mcu_driver = { -+ .driver = { -+ .name = "khadas-mcu-core", -+ .of_match_table = of_match_ptr(khadas_mcu_of_match), -+ }, -+ .probe = khadas_mcu_probe, -+}; -+module_i2c_driver(khadas_mcu_driver); -+ -+MODULE_DESCRIPTION("Khadas MCU core driver"); -+MODULE_AUTHOR("Neil Armstrong "); -+MODULE_LICENSE("GPL v2"); -diff --git a/include/linux/mfd/khadas-mcu.h b/include/linux/mfd/khadas-mcu.h -new file mode 100644 -index 000000000000..2e68af21735c ---- /dev/null -+++ b/include/linux/mfd/khadas-mcu.h -@@ -0,0 +1,91 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * Khadas System control Microcontroller Register map -+ * -+ * Copyright (C) 2020 BayLibre SAS -+ * Author(s): Neil Armstrong -+ */ -+ -+#ifndef MFD_KHADAS_MCU_H -+#define MFD_KHADAS_MCU_H -+ -+#define KHADAS_MCU_PASSWD_VEN_0_REG 0x0 /* RO */ -+#define KHADAS_MCU_PASSWD_VEN_1_REG 0x1 /* RO */ -+#define KHADAS_MCU_PASSWD_VEN_2_REG 0x2 /* RO */ -+#define KHADAS_MCU_PASSWD_VEN_3_REG 0x3 /* RO */ -+#define KHADAS_MCU_PASSWD_VEN_4_REG 0x4 /* RO */ -+#define KHADAS_MCU_PASSWD_VEN_5_REG 0x5 /* RO */ -+#define KHADAS_MCU_MAC_0_REG 0x6 /* RO */ -+#define KHADAS_MCU_MAC_1_REG 0x7 /* RO */ -+#define KHADAS_MCU_MAC_2_REG 0x8 /* RO */ -+#define KHADAS_MCU_MAC_3_REG 0x9 /* RO */ -+#define KHADAS_MCU_MAC_4_REG 0xa /* RO */ -+#define KHADAS_MCU_MAC_5_REG 0xb /* RO */ -+#define KHADAS_MCU_USID_0_REG 0xc /* RO */ -+#define KHADAS_MCU_USID_1_REG 0xd /* RO */ -+#define KHADAS_MCU_USID_2_REG 0xe /* RO */ -+#define KHADAS_MCU_USID_3_REG 0xf /* RO */ -+#define KHADAS_MCU_USID_4_REG 0x10 /* RO */ -+#define KHADAS_MCU_USID_5_REG 0x11 /* RO */ -+#define KHADAS_MCU_VERSION_0_REG 0x12 /* RO */ -+#define KHADAS_MCU_VERSION_1_REG 0x13 /* RO */ -+#define KHADAS_MCU_DEVICE_NO_0_REG 0x14 /* RO */ -+#define KHADAS_MCU_DEVICE_NO_1_REG 0x15 /* RO */ -+#define KHADAS_MCU_FACTORY_TEST_REG 0x16 /* R */ -+#define KHADAS_MCU_BOOT_MODE_REG 0x20 /* RW */ -+#define KHADAS_MCU_BOOT_EN_WOL_REG 0x21 /* RW */ -+#define KHADAS_MCU_BOOT_EN_RTC_REG 0x22 /* RW */ -+#define KHADAS_MCU_BOOT_EN_EXP_REG 0x23 /* RW */ -+#define KHADAS_MCU_BOOT_EN_IR_REG 0x24 /* RW */ -+#define KHADAS_MCU_BOOT_EN_DCIN_REG 0x25 /* RW */ -+#define KHADAS_MCU_BOOT_EN_KEY_REG 0x26 /* RW */ -+#define KHADAS_MCU_KEY_MODE_REG 0x27 /* RW */ -+#define KHADAS_MCU_LED_MODE_ON_REG 0x28 /* RW */ -+#define KHADAS_MCU_LED_MODE_OFF_REG 0x29 /* RW */ -+#define KHADAS_MCU_SHUTDOWN_NORMAL_REG 0x2c /* RW */ -+#define KHADAS_MCU_MAC_SWITCH_REG 0x2d /* RW */ -+#define KHADAS_MCU_MCU_SLEEP_MODE_REG 0x2e /* RW */ -+#define KHADAS_MCU_IR_CODE1_0_REG 0x2f /* RW */ -+#define KHADAS_MCU_IR_CODE1_1_REG 0x30 /* RW */ -+#define KHADAS_MCU_IR_CODE1_2_REG 0x31 /* RW */ -+#define KHADAS_MCU_IR_CODE1_3_REG 0x32 /* RW */ -+#define KHADAS_MCU_USB_PCIE_SWITCH_REG 0x33 /* RW */ -+#define KHADAS_MCU_IR_CODE2_0_REG 0x34 /* RW */ -+#define KHADAS_MCU_IR_CODE2_1_REG 0x35 /* RW */ -+#define KHADAS_MCU_IR_CODE2_2_REG 0x36 /* RW */ -+#define KHADAS_MCU_IR_CODE2_3_REG 0x37 /* RW */ -+#define KHADAS_MCU_PASSWD_USER_0_REG 0x40 /* RW */ -+#define KHADAS_MCU_PASSWD_USER_1_REG 0x41 /* RW */ -+#define KHADAS_MCU_PASSWD_USER_2_REG 0x42 /* RW */ -+#define KHADAS_MCU_PASSWD_USER_3_REG 0x43 /* RW */ -+#define KHADAS_MCU_PASSWD_USER_4_REG 0x44 /* RW */ -+#define KHADAS_MCU_PASSWD_USER_5_REG 0x45 /* RW */ -+#define KHADAS_MCU_USER_DATA_0_REG 0x46 /* RW 56 bytes */ -+#define KHADAS_MCU_PWR_OFF_CMD_REG 0x80 /* WO */ -+#define KHADAS_MCU_PASSWD_START_REG 0x81 /* WO */ -+#define KHADAS_MCU_CHECK_VEN_PASSWD_REG 0x82 /* WO */ -+#define KHADAS_MCU_CHECK_USER_PASSWD_REG 0x83 /* WO */ -+#define KHADAS_MCU_SHUTDOWN_NORMAL_STATUS_REG 0x86 /* RO */ -+#define KHADAS_MCU_WOL_INIT_START_REG 0x87 /* WO */ -+#define KHADAS_MCU_CMD_FAN_STATUS_CTRL_REG 0x88 /* WO */ -+ -+/* Boards */ -+enum { -+ KHADAS_BOARD_VIM1 = 0x1, -+ KHADAS_BOARD_VIM2, -+ KHADAS_BOARD_VIM3, -+ KHADAS_BOARD_EDGE = 0x11, -+ KHADAS_BOARD_EDGE_V, -+}; -+ -+/** -+ * struct khadas_mcu_data - Khadas MCU MFD structure -+ * @device: device reference used for logs -+ * @map: register map -+ */ -+struct khadas_mcu { -+ struct device *dev; -+ struct regmap *map; -+}; -+ -+#endif /* MFD_KHADAS_MCU_H */ --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0075-arm64-dts-meson-shorten-audio-card-name-for-rbox-pro.patch b/projects/Amlogic/patches/linux/amlogic-0075-arm64-dts-meson-shorten-audio-card-name-for-rbox-pro.patch new file mode 100644 index 00000000000..eed59a48aee --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0075-arm64-dts-meson-shorten-audio-card-name-for-rbox-pro.patch @@ -0,0 +1,25 @@ +From 2e1691564492dff385a201e62c22471a09d9088a Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Thu, 31 Dec 2020 16:37:47 +0000 +Subject: [PATCH 75/79] arm64: dts: meson: shorten audio card name for rbox-pro + +--- + arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts +index e6d1b3a3776f..0208c95e92cf 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts +@@ -120,7 +120,7 @@ + + sound { + compatible = "amlogic,gx-sound-card"; +- model = "GXM-RBOX-PRO"; ++ model = "RBOX-PRO"; + assigned-clocks = <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0076-FROMLIST-v2-thermal-add-support-for-the-MCU-controll.patch b/projects/Amlogic/patches/linux/amlogic-0076-FROMLIST-v2-thermal-add-support-for-the-MCU-controll.patch deleted file mode 100644 index c503b3c4d42..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0076-FROMLIST-v2-thermal-add-support-for-the-MCU-controll.patch +++ /dev/null @@ -1,231 +0,0 @@ -From 1e9ea85d0249f0cc7cd8fd17f59c6cc75a99a84a Mon Sep 17 00:00:00 2001 -From: Neil Armstrong -Date: Wed, 13 May 2020 12:54:59 +0000 -Subject: [PATCH 076/156] FROMLIST(v2): thermal: add support for the MCU - controlled FAN on Khadas boards - -The new Khadas VIM2 and VIM3 boards controls the cooling fan via the -on-board microcontroller. - -This implements the FAN control as thermal devices and as cell of the Khadas -MCU MFD driver. - -Signed-off-by: Neil Armstrong ---- - drivers/thermal/Kconfig | 10 ++ - drivers/thermal/Makefile | 1 + - drivers/thermal/khadas_mcu_fan.c | 174 +++++++++++++++++++++++++++++++ - 3 files changed, 185 insertions(+) - create mode 100644 drivers/thermal/khadas_mcu_fan.c - -diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig -index 91af271e9bb0..72b3960cc5ac 100644 ---- a/drivers/thermal/Kconfig -+++ b/drivers/thermal/Kconfig -@@ -490,4 +490,14 @@ config SPRD_THERMAL - help - Support for the Spreadtrum thermal sensor driver in the Linux thermal - framework. -+ -+config KHADAS_MCU_FAN_THERMAL -+ tristate "Khadas MCU controller FAN cooling support" -+ depends on OF || COMPILE_TEST -+ select MFD_CORE -+ select REGMAP -+ help -+ If you say yes here you get support for the FAN controlled -+ by the Microcontroller found on the Khadas VIM boards. -+ - endif -diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile -index 8c8ed7b79915..460428c2122c 100644 ---- a/drivers/thermal/Makefile -+++ b/drivers/thermal/Makefile -@@ -60,3 +60,4 @@ obj-$(CONFIG_ZX2967_THERMAL) += zx2967_thermal.o - obj-$(CONFIG_UNIPHIER_THERMAL) += uniphier_thermal.o - obj-$(CONFIG_AMLOGIC_THERMAL) += amlogic_thermal.o - obj-$(CONFIG_SPRD_THERMAL) += sprd_thermal.o -+obj-$(CONFIG_KHADAS_MCU_FAN_THERMAL) += khadas_mcu_fan.o -diff --git a/drivers/thermal/khadas_mcu_fan.c b/drivers/thermal/khadas_mcu_fan.c -new file mode 100644 -index 000000000000..044d4aba8be2 ---- /dev/null -+++ b/drivers/thermal/khadas_mcu_fan.c -@@ -0,0 +1,174 @@ -+// SPDX-License-Identifier: GPL-2.0-or-later -+/* -+ * Khadas MCU Controlled FAN driver -+ * -+ * Copyright (C) 2020 BayLibre SAS -+ * Author(s): Neil Armstrong -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define MAX_LEVEL 3 -+ -+struct khadas_mcu_fan_ctx { -+ struct khadas_mcu *mcu; -+ unsigned int level; -+ struct thermal_cooling_device *cdev; -+}; -+ -+static int khadas_mcu_fan_set_level(struct khadas_mcu_fan_ctx *ctx, -+ unsigned int level) -+{ -+ int ret; -+ -+ ret = regmap_write(ctx->mcu->map, KHADAS_MCU_CMD_FAN_STATUS_CTRL_REG, -+ level); -+ if (ret) -+ return ret; -+ -+ ctx->level = level; -+ -+ return 0; -+} -+ -+static int khadas_mcu_fan_get_max_state(struct thermal_cooling_device *cdev, -+ unsigned long *state) -+{ -+ struct khadas_mcu_fan_ctx *ctx = cdev->devdata; -+ -+ if (!ctx) -+ return -EINVAL; -+ -+ *state = MAX_LEVEL; -+ -+ return 0; -+} -+ -+static int khadas_mcu_fan_get_cur_state(struct thermal_cooling_device *cdev, -+ unsigned long *state) -+{ -+ struct khadas_mcu_fan_ctx *ctx = cdev->devdata; -+ -+ if (!ctx) -+ return -EINVAL; -+ -+ *state = ctx->level; -+ -+ return 0; -+} -+ -+static int -+khadas_mcu_fan_set_cur_state(struct thermal_cooling_device *cdev, -+ unsigned long state) -+{ -+ struct khadas_mcu_fan_ctx *ctx = cdev->devdata; -+ -+ if (!ctx || (state > MAX_LEVEL)) -+ return -EINVAL; -+ -+ if (state == ctx->level) -+ return 0; -+ -+ return khadas_mcu_fan_set_level(ctx, state); -+} -+ -+static const struct thermal_cooling_device_ops khadas_mcu_fan_cooling_ops = { -+ .get_max_state = khadas_mcu_fan_get_max_state, -+ .get_cur_state = khadas_mcu_fan_get_cur_state, -+ .set_cur_state = khadas_mcu_fan_set_cur_state, -+}; -+ -+static int khadas_mcu_fan_probe(struct platform_device *pdev) -+{ -+ struct khadas_mcu *mcu = dev_get_drvdata(pdev->dev.parent); -+ struct thermal_cooling_device *cdev; -+ struct device *dev = &pdev->dev; -+ struct khadas_mcu_fan_ctx *ctx; -+ int ret; -+ -+ ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); -+ if (!ctx) -+ return -ENOMEM; -+ ctx->mcu = mcu; -+ platform_set_drvdata(pdev, ctx); -+ -+ cdev = devm_thermal_of_cooling_device_register(dev->parent, -+ dev->parent->of_node, "khadas-mcu-fan", ctx, -+ &khadas_mcu_fan_cooling_ops); -+ if (IS_ERR(cdev)) { -+ ret = PTR_ERR(cdev); -+ dev_err(dev, -+ "Failed to register khadas-mcu-fan as cooling device: %d\n", -+ ret); -+ return ret; -+ } -+ ctx->cdev = cdev; -+ thermal_cdev_update(cdev); -+ -+ return 0; -+} -+ -+static int khadas_mcu_fan_disable(struct device *dev) -+{ -+ struct khadas_mcu_fan_ctx *ctx = dev_get_drvdata(dev); -+ unsigned int level_save = ctx->level; -+ int ret; -+ -+ ret = khadas_mcu_fan_set_level(ctx, 0); -+ if (ret) -+ return ret; -+ -+ ctx->level = level_save; -+ -+ return 0; -+} -+ -+static void khadas_mcu_fan_shutdown(struct platform_device *pdev) -+{ -+ khadas_mcu_fan_disable(&pdev->dev); -+} -+ -+#ifdef CONFIG_PM_SLEEP -+static int khadas_mcu_fan_suspend(struct device *dev) -+{ -+ return khadas_mcu_fan_disable(dev); -+} -+ -+static int khadas_mcu_fan_resume(struct device *dev) -+{ -+ struct khadas_mcu_fan_ctx *ctx = dev_get_drvdata(dev); -+ -+ return khadas_mcu_fan_set_level(ctx, ctx->level); -+} -+#endif -+ -+static SIMPLE_DEV_PM_OPS(khadas_mcu_fan_pm, khadas_mcu_fan_suspend, -+ khadas_mcu_fan_resume); -+ -+static const struct platform_device_id khadas_mcu_fan_id_table[] = { -+ { .name = "khadas-mcu-fan-ctrl", }, -+ {}, -+}; -+MODULE_DEVICE_TABLE(platform, khadas_mcu_fan_id_table); -+ -+static struct platform_driver khadas_mcu_fan_driver = { -+ .probe = khadas_mcu_fan_probe, -+ .shutdown = khadas_mcu_fan_shutdown, -+ .driver = { -+ .name = "khadas-mcu-fan-ctrl", -+ .pm = &khadas_mcu_fan_pm, -+ }, -+ .id_table = khadas_mcu_fan_id_table, -+}; -+ -+module_platform_driver(khadas_mcu_fan_driver); -+ -+MODULE_AUTHOR("Neil Armstrong "); -+MODULE_DESCRIPTION("Khadas MCU FAN driver"); -+MODULE_LICENSE("GPL"); --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0076-arm64-dts-meson-shorten-audio-card-name-for-tanix-tx.patch b/projects/Amlogic/patches/linux/amlogic-0076-arm64-dts-meson-shorten-audio-card-name-for-tanix-tx.patch new file mode 100644 index 00000000000..6ae7bbfdea2 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0076-arm64-dts-meson-shorten-audio-card-name-for-tanix-tx.patch @@ -0,0 +1,26 @@ +From 03f626c86f3205937de9684f5aa2aba813460bea Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Thu, 31 Dec 2020 16:35:22 +0000 +Subject: [PATCH 76/79] arm64: dts: meson: shorten audio card name for + tanix-tx5 + +--- + arch/arm64/boot/dts/amlogic/meson-g12a-tanix-tx5max.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-tanix-tx5max.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-tanix-tx5max.dts +index 5bf5392b8d85..0e55427ca398 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-g12a-tanix-tx5max.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-g12a-tanix-tx5max.dts +@@ -157,7 +157,7 @@ + + sound { + compatible = "amlogic,axg-sound-card"; +- model = "G12A-TANIX-TX5MAX"; ++ model = "TANIX-TX5MAX"; + audio-aux-devs = <&tdmout_b>; + audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", + "TDMOUT_B IN 1", "FRDDR_B OUT 1", +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0077-FROMLIST-v2-nvmem-add-support-for-the-Khadas-MCU-Pro.patch b/projects/Amlogic/patches/linux/amlogic-0077-FROMLIST-v2-nvmem-add-support-for-the-Khadas-MCU-Pro.patch deleted file mode 100644 index a0487d26714..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0077-FROMLIST-v2-nvmem-add-support-for-the-Khadas-MCU-Pro.patch +++ /dev/null @@ -1,193 +0,0 @@ -From 9aed6ef7e55f85da21b46def6be06020029f93e9 Mon Sep 17 00:00:00 2001 -From: Neil Armstrong -Date: Wed, 13 May 2020 12:56:57 +0000 -Subject: [PATCH 077/156] FROMLIST(v2): nvmem: add support for the Khadas MCU - Programmable User Memory - -The new Khadas VIM2, VIM3 and Edge boards embeds an on-board microcontroller -offering a 56bytes User Programmable NVMEM array. - -This array needs a password to be writable, thus a password sysfs file -has been added on the device node to unlock the NVMEM. - -The default 6bytes password id: "Khadas" - -This implements the user NVMEM devices as cell of the Khadas MCU MFD driver. - -Signed-off-by: Neil Armstrong ---- - drivers/nvmem/Kconfig | 8 ++ - drivers/nvmem/Makefile | 2 + - drivers/nvmem/khadas-mcu-user-mem.c | 128 ++++++++++++++++++++++++++++ - 3 files changed, 138 insertions(+) - create mode 100644 drivers/nvmem/khadas-mcu-user-mem.c - -diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig -index d7b7f6d688e7..92cd4f6aa931 100644 ---- a/drivers/nvmem/Kconfig -+++ b/drivers/nvmem/Kconfig -@@ -67,6 +67,14 @@ config JZ4780_EFUSE - To compile this driver as a module, choose M here: the module - will be called nvmem_jz4780_efuse. - -+config NVMEM_KHADAS_MCU_USER_MEM -+ tristate "Khadas MCU User programmable memory support" -+ depends on MFD_KHADAS_MCU -+ depends on REGMAP -+ help -+ This is a driver for the MCU User programmable memory -+ available on the Khadas VIM and Edge boards. -+ - config NVMEM_LPC18XX_EEPROM - tristate "NXP LPC18XX EEPROM Memory Support" - depends on ARCH_LPC18XX || COMPILE_TEST -diff --git a/drivers/nvmem/Makefile b/drivers/nvmem/Makefile -index a7c377218341..0516a309542d 100644 ---- a/drivers/nvmem/Makefile -+++ b/drivers/nvmem/Makefile -@@ -17,6 +17,8 @@ obj-$(CONFIG_NVMEM_IMX_OCOTP_SCU) += nvmem-imx-ocotp-scu.o - nvmem-imx-ocotp-scu-y := imx-ocotp-scu.o - obj-$(CONFIG_JZ4780_EFUSE) += nvmem_jz4780_efuse.o - nvmem_jz4780_efuse-y := jz4780-efuse.o -+obj-$(CONFIG_NVMEM_KHADAS_MCU_USER_MEM) += nvmem-khadas-mcu-user-mem.o -+nvmem-khadas-mcu-user-mem-y := khadas-mcu-user-mem.o - obj-$(CONFIG_NVMEM_LPC18XX_EEPROM) += nvmem_lpc18xx_eeprom.o - nvmem_lpc18xx_eeprom-y := lpc18xx_eeprom.o - obj-$(CONFIG_NVMEM_LPC18XX_OTP) += nvmem_lpc18xx_otp.o -diff --git a/drivers/nvmem/khadas-mcu-user-mem.c b/drivers/nvmem/khadas-mcu-user-mem.c -new file mode 100644 -index 000000000000..a1d5ae9a030c ---- /dev/null -+++ b/drivers/nvmem/khadas-mcu-user-mem.c -@@ -0,0 +1,128 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Driver for Khadas MCU User programmable Memory -+ * -+ * Copyright (C) 2020 BayLibre SAS -+ * Author(s): Neil Armstrong -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+static int khadas_mcu_user_mem_read(void *context, unsigned int offset, -+ void *val, size_t bytes) -+{ -+ struct khadas_mcu *khadas_mcu = context; -+ -+ return regmap_bulk_read(khadas_mcu->map, -+ KHADAS_MCU_USER_DATA_0_REG + offset, -+ val, bytes); -+} -+ -+static int khadas_mcu_user_mem_write(void *context, unsigned int offset, -+ void *val, size_t bytes) -+{ -+ struct khadas_mcu *khadas_mcu = context; -+ -+ return regmap_bulk_write(khadas_mcu->map, -+ KHADAS_MCU_USER_DATA_0_REG + offset, -+ val, bytes); -+} -+ -+static ssize_t password_store(struct device *dev, struct device_attribute *attr, -+ const char *buf, size_t count) -+{ -+ struct khadas_mcu *khadas_mcu = dev_get_drvdata(dev); -+ int i, ret; -+ -+ if (count < 6) -+ return -EINVAL; -+ -+ ret = regmap_write(khadas_mcu->map, KHADAS_MCU_PASSWD_START_REG, 1); -+ if (ret) -+ return ret; -+ -+ for (i = 0 ; i < 6 ; ++i) { -+ ret = regmap_write(khadas_mcu->map, -+ KHADAS_MCU_CHECK_USER_PASSWD_REG, -+ buf[i]); -+ if (ret) -+ goto out; -+ } -+ -+ ret = regmap_write(khadas_mcu->map, KHADAS_MCU_PASSWD_START_REG, 0); -+ if (ret) -+ return ret; -+ -+ return count; -+out: -+ regmap_write(khadas_mcu->map, KHADAS_MCU_PASSWD_START_REG, 0); -+ -+ return ret; -+} -+ -+static DEVICE_ATTR_WO(password); -+ -+static struct attribute *khadas_mcu_user_mem_sysfs_attributes[] = { -+ &dev_attr_password.attr, -+ NULL, -+}; -+ -+static const struct attribute_group khadas_mcu_user_mem_sysfs_attr_group = { -+ .attrs = khadas_mcu_user_mem_sysfs_attributes, -+}; -+ -+static int khadas_mcu_user_mem_probe(struct platform_device *pdev) -+{ -+ struct khadas_mcu *khadas_mcu = dev_get_drvdata(pdev->dev.parent); -+ struct device *dev = &pdev->dev; -+ struct nvmem_device *nvmem; -+ struct nvmem_config *econfig; -+ -+ econfig = devm_kzalloc(dev, sizeof(*econfig), GFP_KERNEL); -+ if (!econfig) -+ return -ENOMEM; -+ -+ econfig->dev = pdev->dev.parent; -+ econfig->name = dev_name(pdev->dev.parent); -+ econfig->stride = 1; -+ econfig->word_size = 1; -+ econfig->reg_read = khadas_mcu_user_mem_read; -+ econfig->reg_write = khadas_mcu_user_mem_write; -+ econfig->size = 56; -+ econfig->priv = khadas_mcu; -+ -+ platform_set_drvdata(pdev, khadas_mcu); -+ -+ nvmem = devm_nvmem_register(&pdev->dev, econfig); -+ if (IS_ERR(nvmem)) -+ return PTR_ERR(nvmem); -+ -+ return sysfs_create_group(&pdev->dev.kobj, -+ &khadas_mcu_user_mem_sysfs_attr_group); -+} -+ -+static const struct platform_device_id khadas_mcu_user_mem_id_table[] = { -+ { .name = "khadas-mcu-user-mem", }, -+ {}, -+}; -+MODULE_DEVICE_TABLE(platform, khadas_mcu_user_mem_id_table); -+ -+static struct platform_driver khadas_mcu_user_mem_driver = { -+ .probe = khadas_mcu_user_mem_probe, -+ .driver = { -+ .name = "khadas-mcu-user-mem", -+ }, -+ .id_table = khadas_mcu_user_mem_id_table, -+}; -+ -+module_platform_driver(khadas_mcu_user_mem_driver); -+ -+MODULE_AUTHOR("Neil Armstrong "); -+MODULE_DESCRIPTION("Khadas MCU User MEM driver"); -+MODULE_LICENSE("GPL v2"); --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0077-arm64-dts-meson-shorten-audio-card-name-for-u200.patch b/projects/Amlogic/patches/linux/amlogic-0077-arm64-dts-meson-shorten-audio-card-name-for-u200.patch new file mode 100644 index 00000000000..3756cdfe148 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0077-arm64-dts-meson-shorten-audio-card-name-for-u200.patch @@ -0,0 +1,25 @@ +From 3f664968e1ef6d3a80b0eff4dbc122dea82159af Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Thu, 31 Dec 2020 16:35:37 +0000 +Subject: [PATCH 77/79] arm64: dts: meson: shorten audio card name for u200 + +--- + arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts +index dde7e258a184..280f8159ebb1 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts +@@ -159,7 +159,7 @@ + + sound { + compatible = "amlogic,axg-sound-card"; +- model = "G12A-U200"; ++ model = "U200"; + audio-aux-devs = <&tdmout_b>; + audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", + "TDMOUT_B IN 1", "FRDDR_B OUT 1", +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0078-FROMLIST-v2-MAINTAINERS-add-myself-as-maintainer-for.patch b/projects/Amlogic/patches/linux/amlogic-0078-FROMLIST-v2-MAINTAINERS-add-myself-as-maintainer-for.patch deleted file mode 100644 index b4b2d38b1eb..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0078-FROMLIST-v2-MAINTAINERS-add-myself-as-maintainer-for.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 7b6a71a47fd078c9f6f14da8b08bf27e3bb8deb9 Mon Sep 17 00:00:00 2001 -From: Neil Armstrong -Date: Wed, 13 May 2020 12:58:31 +0000 -Subject: [PATCH 078/156] FROMLIST(v2): MAINTAINERS: add myself as maintainer - for Khadas MCU drivers - -Add the HWMON and NVMEM drivers along the MFD drivers and header -as Maintained by myself. - -Signed-off-by: Neil Armstrong ---- - MAINTAINERS | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/MAINTAINERS b/MAINTAINERS -index 091b74ff830a..a389496f2723 100644 ---- a/MAINTAINERS -+++ b/MAINTAINERS -@@ -9436,6 +9436,16 @@ F: include/linux/kdb.h - F: include/linux/kgdb.h - F: kernel/debug/ - -+KHADAS MCU MFD DRIVER -+M: Neil Armstrong -+L: linux-amlogic@lists.infradead.org -+S: Maintained -+F: Documentation/devicetree/bindings/mfd/khadas,mcu.yaml -+F: drivers/mfd/khadas-mcu.c -+F: include/linux/mfd/khadas-mcu.h -+F: drivers/hwmon/khadas-mcu-fan.c -+F: drivers/nvmem/khadas-mcu-user-mem.c -+ - KMEMLEAK - M: Catalin Marinas - S: Maintained --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0078-arm64-dts-meson-shorten-audio-card-name-for-vega-s95.patch b/projects/Amlogic/patches/linux/amlogic-0078-arm64-dts-meson-shorten-audio-card-name-for-vega-s95.patch new file mode 100644 index 00000000000..5fd2f0d86ba --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0078-arm64-dts-meson-shorten-audio-card-name-for-vega-s95.patch @@ -0,0 +1,25 @@ +From 02440351a2d1d8cc1e20bd6b4c44c8f9ff6e9ceb Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Thu, 31 Dec 2020 16:36:57 +0000 +Subject: [PATCH 78/79] arm64: dts: meson: shorten audio card name for vega-s95 + +--- + arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +index 2976a9c42e11..66daf3af34c3 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi ++++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +@@ -108,7 +108,7 @@ + + sound { + compatible = "amlogic,gx-sound-card"; +- model = "GXBB-VEGA-S95"; ++ model = "VEGA-S95"; + assigned-clocks = <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>; +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0079-FROMLIST-v2-arm64-dts-meson-khadas-vim3-add-Khadas-M.patch b/projects/Amlogic/patches/linux/amlogic-0079-FROMLIST-v2-arm64-dts-meson-khadas-vim3-add-Khadas-M.patch deleted file mode 100644 index e45b8a7cb94..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0079-FROMLIST-v2-arm64-dts-meson-khadas-vim3-add-Khadas-M.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 984625d91bcbfefb3fb7d6532d8bc2114f9be1ae Mon Sep 17 00:00:00 2001 -From: Neil Armstrong -Date: Wed, 13 May 2020 12:59:20 +0000 -Subject: [PATCH 079/156] FROMLIST(v2): arm64: dts: meson-khadas-vim3: add - Khadas MCU nodes - -Add the Khadas MCU node with active FAN thermal nodes for all the -Khadas VIM3 variants. - -Signed-off-by: Neil Armstrong ---- - .../boot/dts/amlogic/meson-khadas-vim3.dtsi | 23 +++++++++++++++++++ - 1 file changed, 23 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi -index 1ef1e3672b96..27408c10a811 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi -@@ -183,6 +183,23 @@ - hdmi-phandle = <&hdmi_tx>; - }; - -+&cpu_thermal { -+ trips { -+ cpu_active: cpu-active { -+ temperature = <80000>; /* millicelsius */ -+ hysteresis = <2000>; /* millicelsius */ -+ type = "active"; -+ }; -+ }; -+ -+ cooling-maps { -+ map { -+ trip = <&cpu_active>; -+ cooling-device = <&khadas_mcu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; -+ }; -+ }; -+}; -+ - &ext_mdio { - external_phy: ethernet-phy@0 { - /* Realtek RTL8211F (0x001cc916) */ -@@ -222,6 +239,12 @@ - pinctrl-0 = <&i2c_ao_sck_pins>, <&i2c_ao_sda_pins>; - pinctrl-names = "default"; - -+ khadas_mcu: system-controller@18 { -+ compatible = "khadas,mcu"; -+ reg = <0x18>; -+ #cooling-cells = <2>; -+ }; -+ - gpio_expander: gpio-controller@20 { - compatible = "ti,tca6408"; - reg = <0x20>; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0079-arm64-dts-meson-shorten-audio-card-name-for-x96-air.patch b/projects/Amlogic/patches/linux/amlogic-0079-arm64-dts-meson-shorten-audio-card-name-for-x96-air.patch new file mode 100644 index 00000000000..56406b33ca0 --- /dev/null +++ b/projects/Amlogic/patches/linux/amlogic-0079-arm64-dts-meson-shorten-audio-card-name-for-x96-air.patch @@ -0,0 +1,39 @@ +From ddf584208c6e5d46f8b4c40f9c65c172d4e93eee Mon Sep 17 00:00:00 2001 +From: Christian Hewitt +Date: Fri, 1 Jan 2021 08:09:32 +0000 +Subject: [PATCH 79/79] arm64: dts: meson: shorten audio card name for x96-air + +--- + arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-2g.dts | 2 +- + arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-4g.dts | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-2g.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-2g.dts +index cb4a7220bab1..600c3d20c4b9 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-2g.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-2g.dts +@@ -15,7 +15,7 @@ + + sound { + compatible = "amlogic,axg-sound-card"; +- model = "SM1-X96-AIR"; ++ model = "X96-AIR"; + audio-aux-devs = <&tdmout_b>; + audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", + "TDMOUT_B IN 1", "FRDDR_B OUT 1", +diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-4g.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-4g.dts +index 7c222e53f3c5..97aee4286951 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-4g.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-4g.dts +@@ -15,7 +15,7 @@ + + sound { + compatible = "amlogic,axg-sound-card"; +- model = "SM1-X96-AIR"; ++ model = "X96-AIR"; + audio-aux-devs = <&tdmout_b>; + audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", + "TDMOUT_B IN 1", "FRDDR_B OUT 1", +-- +2.17.1 + diff --git a/projects/Amlogic/patches/linux/amlogic-0080-FROMLIST-v1-ASoC-meson-gx-card-fix-sound-dai-dt-sche.patch b/projects/Amlogic/patches/linux/amlogic-0080-FROMLIST-v1-ASoC-meson-gx-card-fix-sound-dai-dt-sche.patch deleted file mode 100644 index 96177e566f5..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0080-FROMLIST-v1-ASoC-meson-gx-card-fix-sound-dai-dt-sche.patch +++ /dev/null @@ -1,48 +0,0 @@ -From f6370d91aab5db6289f2f878686619f063fdbcc2 Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Mon, 24 Feb 2020 14:35:17 +0100 -Subject: [PATCH 080/156] FROMLIST(v1): ASoC: meson: gx-card: fix sound-dai dt - schema - -There is a fair amount of warnings when running 'make dtbs_check' with -amlogic,gx-sound-card.yaml. - -Ex: -arch/arm64/boot/dts/amlogic/meson-gxm-q200.dt.yaml: sound: dai-link-0:sound-dai:0:1: missing phandle tag in 0 -arch/arm64/boot/dts/amlogic/meson-gxm-q200.dt.yaml: sound: dai-link-0:sound-dai:0:2: missing phandle tag in 0 -arch/arm64/boot/dts/amlogic/meson-gxm-q200.dt.yaml: sound: dai-link-0:sound-dai:0: [66, 0, 0] is too long - -The reason is that the sound-dai phandle provided has cells, and in such -case the schema should use 'phandle-array' instead of 'phandle'. - -Fixes: fd00366b8e41 ("ASoC: meson: gx: add sound card dt-binding documentation") -Signed-off-by: Jerome Brunet ---- - .../devicetree/bindings/sound/amlogic,gx-sound-card.yaml | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml -index fb374c659be1..a48222e8cd08 100644 ---- a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml -+++ b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml -@@ -57,7 +57,7 @@ patternProperties: - rate - - sound-dai: -- $ref: /schemas/types.yaml#/definitions/phandle -+ $ref: /schemas/types.yaml#/definitions/phandle-array - description: phandle of the CPU DAI - - patternProperties: -@@ -71,7 +71,7 @@ patternProperties: - - properties: - sound-dai: -- $ref: /schemas/types.yaml#/definitions/phandle -+ $ref: /schemas/types.yaml#/definitions/phandle-array - description: phandle of the codec DAI - - required: --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0081-FROMLIST-v1-ASoC-meson-convert-axg-tdm-interface-to-.patch b/projects/Amlogic/patches/linux/amlogic-0081-FROMLIST-v1-ASoC-meson-convert-axg-tdm-interface-to-.patch deleted file mode 100644 index a855b0ab433..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0081-FROMLIST-v1-ASoC-meson-convert-axg-tdm-interface-to-.patch +++ /dev/null @@ -1,111 +0,0 @@ -From ed1ffd86f27e04cb6a89d5949d97d0f86f9cda68 Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Fri, 24 Jan 2020 11:08:09 +0100 -Subject: [PATCH 081/156] FROMLIST(v1): ASoC: meson: convert axg tdm interface - to schema - -Convert the DT binding documentation for the Amlogic tdm interface to -schema. - -Signed-off-by: Jerome Brunet ---- - .../bindings/sound/amlogic,axg-tdm-iface.txt | 22 ------- - .../bindings/sound/amlogic,axg-tdm-iface.yaml | 57 +++++++++++++++++++ - 2 files changed, 57 insertions(+), 22 deletions(-) - delete mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.txt - create mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.yaml - -diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.txt -deleted file mode 100644 -index cabfb26a5f22..000000000000 ---- a/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.txt -+++ /dev/null -@@ -1,22 +0,0 @@ --* Amlogic Audio TDM Interfaces -- --Required properties: --- compatible: 'amlogic,axg-tdm-iface' --- clocks: list of clock phandle, one for each entry clock-names. --- clock-names: should contain the following: -- * "sclk" : bit clock. -- * "lrclk": sample clock -- * "mclk" : master clock -- -> optional if the interface is in clock slave mode. --- #sound-dai-cells: must be 0. -- --Example of TDM_A on the A113 SoC: -- --tdmif_a: audio-controller@0 { -- compatible = "amlogic,axg-tdm-iface"; -- #sound-dai-cells = <0>; -- clocks = <&clkc_audio AUD_CLKID_MST_A_MCLK>, -- <&clkc_audio AUD_CLKID_MST_A_SCLK>, -- <&clkc_audio AUD_CLKID_MST_A_LRCLK>; -- clock-names = "mclk", "sclk", "lrclk"; --}; -diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.yaml -new file mode 100644 -index 000000000000..5f04f9cf30a0 ---- /dev/null -+++ b/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.yaml -@@ -0,0 +1,57 @@ -+# SPDX-License-Identifier: GPL-2.0 -+%YAML 1.2 -+--- -+$id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml# -+$schema: http://devicetree.org/meta-schemas/core.yaml# -+ -+title: Amlogic Audio TDM Interfaces -+ -+maintainers: -+ - Jerome Brunet -+ -+properties: -+ $nodename: -+ pattern: "^audio-controller-.*" -+ -+ "#sound-dai-cells": -+ const: 0 -+ -+ compatible: -+ items: -+ - const: 'amlogic,axg-tdm-iface' -+ -+ clocks: -+ minItems: 2 -+ maxItems: 3 -+ items: -+ - description: Bit clock -+ - description: Sample clock -+ - description: Master clock #optional -+ -+ clock-names: -+ minItems: 2 -+ maxItems: 3 -+ items: -+ - const: sclk -+ - const: lrclk -+ - const: mclk -+ -+required: -+ - "#sound-dai-cells" -+ - compatible -+ - clocks -+ - clock-names -+ -+examples: -+ - | -+ #include -+ -+ tdmif_a: audio-controller-0 { -+ compatible = "amlogic,axg-tdm-iface"; -+ #sound-dai-cells = <0>; -+ clocks = <&clkc_audio AUD_CLKID_MST_A_SCLK>, -+ <&clkc_audio AUD_CLKID_MST_A_LRCLK>, -+ <&clkc_audio AUD_CLKID_MST_A_MCLK>; -+ clock-names = "sclk", "lrclk", "mclk"; -+ }; -+ --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0082-FROMLIST-v1-ASoC-meson-convert-axg-tdm-formatters-to.patch b/projects/Amlogic/patches/linux/amlogic-0082-FROMLIST-v1-ASoC-meson-convert-axg-tdm-formatters-to.patch deleted file mode 100644 index a2013db57d4..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0082-FROMLIST-v1-ASoC-meson-convert-axg-tdm-formatters-to.patch +++ /dev/null @@ -1,160 +0,0 @@ -From 001bb8ce0e299728623715eb823b972a6307a2b4 Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Fri, 24 Jan 2020 12:00:01 +0100 -Subject: [PATCH 082/156] FROMLIST(v1): ASoC: meson: convert axg tdm formatters - to schema - -Convert the DT binding documentation for the Amlogic tdm formatters to -schema. - -Signed-off-by: Jerome Brunet ---- - .../sound/amlogic,axg-tdm-formatters.txt | 36 -------- - .../sound/amlogic,axg-tdm-formatters.yaml | 92 +++++++++++++++++++ - 2 files changed, 92 insertions(+), 36 deletions(-) - delete mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.txt - create mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.yaml - -diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.txt -deleted file mode 100644 -index 5996c0cd89c2..000000000000 ---- a/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.txt -+++ /dev/null -@@ -1,36 +0,0 @@ --* Amlogic Audio TDM formatters -- --Required properties: --- compatible: 'amlogic,axg-tdmin' or -- 'amlogic,axg-tdmout' or -- 'amlogic,g12a-tdmin' or -- 'amlogic,g12a-tdmout' or -- 'amlogic,sm1-tdmin' or -- 'amlogic,sm1-tdmout --- reg: physical base address of the controller and length of memory -- mapped region. --- clocks: list of clock phandle, one for each entry clock-names. --- clock-names: should contain the following: -- * "pclk" : peripheral clock. -- * "sclk" : bit clock. -- * "sclk_sel" : bit clock input multiplexer. -- * "lrclk" : sample clock -- * "lrclk_sel": sample clock input multiplexer -- --Optional property: --- resets: phandle to the dedicated reset line of the tdm formatter. -- --Example of TDMOUT_A on the S905X2 SoC: -- --tdmout_a: audio-controller@500 { -- compatible = "amlogic,axg-tdmout"; -- reg = <0x0 0x500 0x0 0x40>; -- resets = <&clkc_audio AUD_RESET_TDMOUT_A>; -- clocks = <&clkc_audio AUD_CLKID_TDMOUT_A>, -- <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK>, -- <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK_SEL>, -- <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>, -- <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>; -- clock-names = "pclk", "sclk", "sclk_sel", -- "lrclk", "lrclk_sel"; --}; -diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.yaml -new file mode 100644 -index 000000000000..f6f3bfb546f5 ---- /dev/null -+++ b/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.yaml -@@ -0,0 +1,92 @@ -+# SPDX-License-Identifier: GPL-2.0 -+%YAML 1.2 -+--- -+$id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-formatters.yaml# -+$schema: http://devicetree.org/meta-schemas/core.yaml# -+ -+title: Amlogic Audio AXG TDM formatters -+ -+maintainers: -+ - Jerome Brunet -+ -+properties: -+ $nodename: -+ pattern: "^audio-controller@.*" -+ -+ compatible: -+ oneOf: -+ - items: -+ - enum: -+ - amlogic,g12a-tdmout -+ - amlogic,sm1-tdmout -+ - amlogic,axg-tdmout -+ - items: -+ - enum: -+ - amlogic,g12a-tdmin -+ - amlogic,sm1-tdmin -+ - const: -+ amlogic,axg-tdmin -+ - items: -+ - const: -+ amlogic,axg-tdmin -+ -+ clocks: -+ items: -+ - description: Peripheral clock -+ - description: Bit clock -+ - description: Bit clock input multiplexer -+ - description: Sample clock -+ - description: Sample clock input multiplexer -+ -+ clock-names: -+ items: -+ - const: pclk -+ - const: sclk -+ - const: sclk_sel -+ - const: lrclk -+ - const: lrclk_sel -+ -+ reg: -+ maxItems: 1 -+ -+ resets: -+ maxItems: 1 -+ -+required: -+ - compatible -+ - reg -+ - clocks -+ - clock-names -+ -+if: -+ properties: -+ compatible: -+ contains: -+ enum: -+ - amlogic,g12a-tdmin -+ - amlogic,sm1-tdmin -+ - amlogic,g12a-tdmout -+ - amlogic,sm1-tdmout -+then: -+ required: -+ - resets -+ -+examples: -+ - | -+ #include -+ #include -+ -+ tdmout_a: audio-controller@500 { -+ compatible = "amlogic,g12a-tdmout", -+ "amlogic,axg-tdmout"; -+ reg = <0x0 0x500 0x0 0x40>; -+ resets = <&clkc_audio AUD_RESET_TDMOUT_A>; -+ clocks = <&clkc_audio AUD_CLKID_TDMOUT_A>, -+ <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK>, -+ <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK_SEL>, -+ <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>, -+ <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>; -+ clock-names = "pclk", "sclk", "sclk_sel", -+ "lrclk", "lrclk_sel"; -+ }; -+ --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0083-FROMLIST-v1-ASoC-meson-convert-axg-pdm-to-schema.patch b/projects/Amlogic/patches/linux/amlogic-0083-FROMLIST-v1-ASoC-meson-convert-axg-pdm-to-schema.patch deleted file mode 100644 index 88ba3a1e303..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0083-FROMLIST-v1-ASoC-meson-convert-axg-pdm-to-schema.patch +++ /dev/null @@ -1,139 +0,0 @@ -From 988af9a7e3d3d5c5db9bc9bf8c7a1d840d8e7cad Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Fri, 24 Jan 2020 12:13:40 +0100 -Subject: [PATCH 083/156] FROMLIST(v1): ASoC: meson: convert axg pdm to schema - -Convert the DT binding documentation for the Amlogic axg PDM device to -schema. - -Signed-off-by: Jerome Brunet ---- - .../bindings/sound/amlogic,axg-pdm.txt | 29 ------- - .../bindings/sound/amlogic,axg-pdm.yaml | 79 +++++++++++++++++++ - 2 files changed, 79 insertions(+), 29 deletions(-) - delete mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-pdm.txt - create mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-pdm.yaml - -diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.txt -deleted file mode 100644 -index 716878107a24..000000000000 ---- a/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.txt -+++ /dev/null -@@ -1,29 +0,0 @@ --* Amlogic Audio PDM input -- --Required properties: --- compatible: 'amlogic,axg-pdm' or -- 'amlogic,g12a-pdm' or -- 'amlogic,sm1-pdm' --- reg: physical base address of the controller and length of memory -- mapped region. --- clocks: list of clock phandle, one for each entry clock-names. --- clock-names: should contain the following: -- * "pclk" : peripheral clock. -- * "dclk" : pdm digital clock -- * "sysclk" : dsp system clock --- #sound-dai-cells: must be 0. -- --Optional property: --- resets: phandle to the dedicated reset line of the pdm input. -- --Example of PDM on the A113 SoC: -- --pdm: audio-controller@ff632000 { -- compatible = "amlogic,axg-pdm"; -- reg = <0x0 0xff632000 0x0 0x34>; -- #sound-dai-cells = <0>; -- clocks = <&clkc_audio AUD_CLKID_PDM>, -- <&clkc_audio AUD_CLKID_PDM_DCLK>, -- <&clkc_audio AUD_CLKID_PDM_SYSCLK>; -- clock-names = "pclk", "dclk", "sysclk"; --}; -diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.yaml -new file mode 100644 -index 000000000000..aa90b77e593d ---- /dev/null -+++ b/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.yaml -@@ -0,0 +1,79 @@ -+# SPDX-License-Identifier: GPL-2.0 -+%YAML 1.2 -+--- -+$id: http://devicetree.org/schemas/sound/amlogic,axg-pdm.yaml# -+$schema: http://devicetree.org/meta-schemas/core.yaml# -+ -+title: Amlogic Audio AXG PDM input -+ -+maintainers: -+ - Jerome Brunet -+ -+properties: -+ $nodename: -+ pattern: "^audio-controller@.*" -+ -+ "#sound-dai-cells": -+ const: 0 -+ -+ compatible: -+ oneOf: -+ - items: -+ - enum: -+ - amlogic,g12a-pdm -+ - amlogic,sm1-pdm -+ - const: -+ amlogic,axg-pdm -+ - items: -+ - const: -+ amlogic,axg-pdm -+ -+ clocks: -+ items: -+ - description: Peripheral clock -+ - description: PDM digital clock -+ - description: DSP system clock -+ -+ clock-names: -+ items: -+ - const: pclk -+ - const: dclk -+ - const: sysclk -+ -+ reg: -+ maxItems: 1 -+ -+ resets: -+ maxItems: 1 -+ -+required: -+ - "#sound-dai-cells" -+ - compatible -+ - reg -+ - clocks -+ - clock-names -+ -+if: -+ properties: -+ compatible: -+ contains: -+ enum: -+ - amlogic,g12a-pdm -+ - amlogic,sm1-pdm -+then: -+ required: -+ - resets -+ -+examples: -+ - | -+ #include -+ -+ pdm: audio-controller@ff632000 { -+ compatible = "amlogic,axg-pdm"; -+ reg = <0x0 0xff632000 0x0 0x34>; -+ #sound-dai-cells = <0>; -+ clocks = <&clkc_audio AUD_CLKID_PDM>, -+ <&clkc_audio AUD_CLKID_PDM_DCLK>, -+ <&clkc_audio AUD_CLKID_PDM_SYSCLK>; -+ clock-names = "pclk", "dclk", "sysclk"; -+ }; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0084-FROMLIST-v1-ASoC-meson-convert-axg-fifo-to-schema.patch b/projects/Amlogic/patches/linux/amlogic-0084-FROMLIST-v1-ASoC-meson-convert-axg-fifo-to-schema.patch deleted file mode 100644 index 74ab543a728..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0084-FROMLIST-v1-ASoC-meson-convert-axg-fifo-to-schema.patch +++ /dev/null @@ -1,176 +0,0 @@ -From 32e581e1e20c6bbfc75c99d9a08cda0e32c349d4 Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Fri, 24 Jan 2020 15:40:25 +0100 -Subject: [PATCH 084/156] FROMLIST(v1): ASoC: meson: convert axg fifo to schema - -Convert the DT binding documentation for the Amlogic axg audio FIFOs to -schema. - -Signed-off-by: Jerome Brunet ---- - .../bindings/sound/amlogic,axg-fifo.txt | 34 ------ - .../bindings/sound/amlogic,axg-fifo.yaml | 111 ++++++++++++++++++ - 2 files changed, 111 insertions(+), 34 deletions(-) - delete mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-fifo.txt - create mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-fifo.yaml - -diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.txt -deleted file mode 100644 -index fa4545ed81ca..000000000000 ---- a/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.txt -+++ /dev/null -@@ -1,34 +0,0 @@ --* Amlogic Audio FIFO controllers -- --Required properties: --- compatible: 'amlogic,axg-toddr' or -- 'amlogic,axg-toddr' or -- 'amlogic,g12a-frddr' or -- 'amlogic,g12a-toddr' or -- 'amlogic,sm1-frddr' or -- 'amlogic,sm1-toddr' --- reg: physical base address of the controller and length of memory -- mapped region. --- interrupts: interrupt specifier for the fifo. --- clocks: phandle to the fifo peripheral clock provided by the audio -- clock controller. --- resets: list of reset phandle, one for each entry reset-names. --- reset-names: should contain the following: -- * "arb" : memory ARB line (required) -- * "rst" : dedicated device reset line (optional) --- #sound-dai-cells: must be 0. --- amlogic,fifo-depth: The size of the controller's fifo in bytes. This -- is useful for determining certain configuration such -- as the flush threshold of the fifo -- --Example of FRDDR A on the A113 SoC: -- --frddr_a: audio-controller@1c0 { -- compatible = "amlogic,axg-frddr"; -- reg = <0x0 0x1c0 0x0 0x1c>; -- #sound-dai-cells = <0>; -- interrupts = ; -- clocks = <&clkc_audio AUD_CLKID_FRDDR_A>; -- resets = <&arb AXG_ARB_FRDDR_A>; -- fifo-depth = <512>; --}; -diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.yaml -new file mode 100644 -index 000000000000..d9fe4f624784 ---- /dev/null -+++ b/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.yaml -@@ -0,0 +1,111 @@ -+# SPDX-License-Identifier: GPL-2.0 -+%YAML 1.2 -+--- -+$id: http://devicetree.org/schemas/sound/amlogic,axg-fifo.yaml# -+$schema: http://devicetree.org/meta-schemas/core.yaml# -+ -+title: Amlogic AXG Audio FIFO controllers -+ -+maintainers: -+ - Jerome Brunet -+ -+properties: -+ $nodename: -+ pattern: "^audio-controller@.*" -+ -+ "#sound-dai-cells": -+ const: 0 -+ -+ compatible: -+ oneOf: -+ - items: -+ - const: -+ amlogic,axg-toddr -+ - items: -+ - const: -+ amlogic,axg-frddr -+ - items: -+ - enum: -+ - amlogic,g12a-toddr -+ - amlogic,sm1-toddr -+ - const: -+ amlogic,axg-toddr -+ - items: -+ - enum: -+ - amlogic,g12a-frddr -+ - amlogic,sm1-frddr -+ - const: -+ amlogic,axg-frddr -+ -+ clocks: -+ items: -+ - description: Peripheral clock -+ -+ interrupts: -+ maxItems: 1 -+ -+ reg: -+ maxItems: 1 -+ -+ resets: -+ minItems: 1 -+ items: -+ - description: Memory ARB line -+ - description: Dedicated device reset line -+ -+ reset-names: -+ minItems: 1 -+ items: -+ - const: arb -+ - const: rst -+ -+ amlogic,fifo-depth: -+ $ref: /schemas/types.yaml#/definitions/uint32 -+ description: Size of the controller's fifo in bytes -+ -+required: -+ - "#sound-dai-cells" -+ - compatible -+ - interrupts -+ - reg -+ - clocks -+ - resets -+ - amlogic,fifo-depth -+ -+if: -+ properties: -+ compatible: -+ contains: -+ enum: -+ - amlogic,g12a-toddr -+ - amlogic,sm1-toddr -+ - amlogic,g12a-frddr -+ - amlogic,sm1-frddr -+then: -+ properties: -+ resets: -+ minItems: 2 -+ reset-names: -+ minItems: 2 -+ required: -+ - reset-names -+ -+examples: -+ - | -+ #include -+ #include -+ #include -+ #include -+ #include -+ -+ frddr_a: audio-controller@1c0 { -+ compatible = "amlogic,g12a-frddr", "amlogic,axg-frddr"; -+ reg = <0x0 0x1c0 0x0 0x1c>; -+ #sound-dai-cells = <0>; -+ interrupts = ; -+ clocks = <&clkc_audio AUD_CLKID_FRDDR_A>; -+ resets = <&arb AXG_ARB_FRDDR_A>, <&clkc_audio AUD_RESET_FRDDR_A>; -+ reset-names = "arb", "rst"; -+ amlogic,fifo-depth = <512>; -+ }; -+ --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0085-FROMLIST-v1-ASoC-meson-convert-axg-spdif-input-to-sc.patch b/projects/Amlogic/patches/linux/amlogic-0085-FROMLIST-v1-ASoC-meson-convert-axg-spdif-input-to-sc.patch deleted file mode 100644 index 70a9d93b9b8..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0085-FROMLIST-v1-ASoC-meson-convert-axg-spdif-input-to-sc.patch +++ /dev/null @@ -1,143 +0,0 @@ -From 9374ac6c4840e80551199a47d0ce7934a927244f Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Fri, 24 Jan 2020 15:52:03 +0100 -Subject: [PATCH 085/156] FROMLIST(v1): ASoC: meson: convert axg spdif input to - schema - -Convert the DT binding documentation for the Amlogic axg spdif input to -schema. - -Signed-off-by: Jerome Brunet ---- - .../bindings/sound/amlogic,axg-spdifin.txt | 27 ------ - .../bindings/sound/amlogic,axg-spdifin.yaml | 84 +++++++++++++++++++ - 2 files changed, 84 insertions(+), 27 deletions(-) - delete mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt - create mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.yaml - -diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt -deleted file mode 100644 -index df92a4ecf288..000000000000 ---- a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt -+++ /dev/null -@@ -1,27 +0,0 @@ --* Amlogic Audio SPDIF Input -- --Required properties: --- compatible: 'amlogic,axg-spdifin' or -- 'amlogic,g12a-spdifin' or -- 'amlogic,sm1-spdifin' --- interrupts: interrupt specifier for the spdif input. --- clocks: list of clock phandle, one for each entry clock-names. --- clock-names: should contain the following: -- * "pclk" : peripheral clock. -- * "refclk" : spdif input reference clock --- #sound-dai-cells: must be 0. -- --Optional property: --- resets: phandle to the dedicated reset line of the spdif input. -- --Example on the A113 SoC: -- --spdifin: audio-controller@400 { -- compatible = "amlogic,axg-spdifin"; -- reg = <0x0 0x400 0x0 0x30>; -- #sound-dai-cells = <0>; -- interrupts = ; -- clocks = <&clkc_audio AUD_CLKID_SPDIFIN>, -- <&clkc_audio AUD_CLKID_SPDIFIN_CLK>; -- clock-names = "pclk", "refclk"; --}; -diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.yaml -new file mode 100644 -index 000000000000..b9b0863c5723 ---- /dev/null -+++ b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.yaml -@@ -0,0 +1,84 @@ -+# SPDX-License-Identifier: GPL-2.0 -+%YAML 1.2 -+--- -+$id: http://devicetree.org/schemas/sound/amlogic,axg-spdifin.yaml# -+$schema: http://devicetree.org/meta-schemas/core.yaml# -+ -+title: Amlogic Audio AXG SPDIF Input -+ -+maintainers: -+ - Jerome Brunet -+ -+properties: -+ $nodename: -+ pattern: "^audio-controller@.*" -+ -+ "#sound-dai-cells": -+ const: 0 -+ -+ compatible: -+ oneOf: -+ - items: -+ - const: -+ amlogic,axg-spdifin -+ - items: -+ - enum: -+ - amlogic,g12a-spdifin -+ - amlogic,sm1-spdifin -+ - const: -+ amlogic,axg-spdifin -+ -+ clocks: -+ items: -+ - description: Peripheral clock -+ - description: SPDIF input reference clock -+ -+ clock-names: -+ items: -+ - const: pclk -+ - const: refclk -+ -+ interrupts: -+ maxItems: 1 -+ -+ reg: -+ maxItems: 1 -+ -+ resets: -+ maxItems: 1 -+ -+required: -+ - "#sound-dai-cells" -+ - compatible -+ - reg -+ - interrupts -+ - clocks -+ - clock-names -+ -+if: -+ properties: -+ compatible: -+ contains: -+ enum: -+ - amlogic,g12a-spdifin -+ - amlogic,sm1-spdifin -+then: -+ required: -+ - resets -+ -+examples: -+ - | -+ #include -+ #include -+ #include -+ -+ spdifin: audio-controller@400 { -+ compatible = "amlogic,axg-spdifin"; -+ reg = <0x0 0x400 0x0 0x30>; -+ #sound-dai-cells = <0>; -+ interrupts = ; -+ clocks = <&clkc_audio AUD_CLKID_SPDIFIN>, -+ <&clkc_audio AUD_CLKID_SPDIFIN_CLK>; -+ clock-names = "pclk", "refclk"; -+ }; -+ --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0086-FROMLIST-v1-ASoC-meson-convert-axg-spdif-output-to-s.patch b/projects/Amlogic/patches/linux/amlogic-0086-FROMLIST-v1-ASoC-meson-convert-axg-spdif-output-to-s.patch deleted file mode 100644 index 653e3bb9e54..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0086-FROMLIST-v1-ASoC-meson-convert-axg-spdif-output-to-s.patch +++ /dev/null @@ -1,134 +0,0 @@ -From 7b1c07638f9f75bd8955682c3cb5dd497277314d Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Fri, 24 Jan 2020 15:58:18 +0100 -Subject: [PATCH 086/156] FROMLIST(v1): ASoC: meson: convert axg spdif output - to schema - -Convert the DT binding documentation for the Amlogic axg spdif output to -schema. - -Signed-off-by: Jerome Brunet ---- - .../bindings/sound/amlogic,axg-spdifout.txt | 25 ------ - .../bindings/sound/amlogic,axg-spdifout.yaml | 77 +++++++++++++++++++ - 2 files changed, 77 insertions(+), 25 deletions(-) - delete mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.txt - create mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.yaml - -diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.txt -deleted file mode 100644 -index 28381dd1f633..000000000000 ---- a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.txt -+++ /dev/null -@@ -1,25 +0,0 @@ --* Amlogic Audio SPDIF Output -- --Required properties: --- compatible: 'amlogic,axg-spdifout' or -- 'amlogic,g12a-spdifout' or -- 'amlogic,sm1-spdifout' --- clocks: list of clock phandle, one for each entry clock-names. --- clock-names: should contain the following: -- * "pclk" : peripheral clock. -- * "mclk" : master clock --- #sound-dai-cells: must be 0. -- --Optional property: --- resets: phandle to the dedicated reset line of the spdif output. -- --Example on the A113 SoC: -- --spdifout: audio-controller@480 { -- compatible = "amlogic,axg-spdifout"; -- reg = <0x0 0x480 0x0 0x50>; -- #sound-dai-cells = <0>; -- clocks = <&clkc_audio AUD_CLKID_SPDIFOUT>, -- <&clkc_audio AUD_CLKID_SPDIFOUT_CLK>; -- clock-names = "pclk", "mclk"; --}; -diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.yaml -new file mode 100644 -index 000000000000..9ac52916f88b ---- /dev/null -+++ b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.yaml -@@ -0,0 +1,77 @@ -+# SPDX-License-Identifier: GPL-2.0 -+%YAML 1.2 -+--- -+$id: http://devicetree.org/schemas/sound/amlogic,axg-spdifout.yaml# -+$schema: http://devicetree.org/meta-schemas/core.yaml# -+ -+title: Amlogic Audio AXG SPDIF Output -+ -+maintainers: -+ - Jerome Brunet -+ -+properties: -+ $nodename: -+ pattern: "^audio-controller@.*" -+ -+ "#sound-dai-cells": -+ const: 0 -+ -+ compatible: -+ oneOf: -+ - items: -+ - const: -+ amlogic,axg-spdifout -+ - items: -+ - enum: -+ - amlogic,g12a-spdifout -+ - amlogic,sm1-spdifout -+ - const: -+ amlogic,axg-spdifout -+ -+ clocks: -+ items: -+ - description: Peripheral clock -+ - description: SPDIF output master clock -+ -+ clock-names: -+ items: -+ - const: pclk -+ - const: mclk -+ -+ reg: -+ maxItems: 1 -+ -+ resets: -+ items: -+ - description: dedicated device reset line -+ -+required: -+ - "#sound-dai-cells" -+ - compatible -+ - reg -+ - clocks -+ - clock-names -+ -+if: -+ properties: -+ compatible: -+ contains: -+ enum: -+ - amlogic,g12a-spdifout -+ - amlogic,sm1-spdifout -+then: -+ required: -+ - resets -+ -+examples: -+ - | -+ #include -+ -+ spdifout: audio-controller@480 { -+ compatible = "amlogic,axg-spdifout"; -+ reg = <0x0 0x480 0x0 0x50>; -+ #sound-dai-cells = <0>; -+ clocks = <&clkc_audio AUD_CLKID_SPDIFOUT>, -+ <&clkc_audio AUD_CLKID_SPDIFOUT_CLK>; -+ clock-names = "pclk", "mclk"; -+ }; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0087-FROMLIST-v1-ASoC-meson-convert-g12a-tohdmitx-control.patch b/projects/Amlogic/patches/linux/amlogic-0087-FROMLIST-v1-ASoC-meson-convert-g12a-tohdmitx-control.patch deleted file mode 100644 index 8da971f4ea0..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0087-FROMLIST-v1-ASoC-meson-convert-g12a-tohdmitx-control.patch +++ /dev/null @@ -1,143 +0,0 @@ -From 0ca49b0e3fa2647edc53f0849170e7085f6c755b Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Fri, 24 Jan 2020 16:02:43 +0100 -Subject: [PATCH 087/156] FROMLIST(v1): ASoC: meson: convert g12a tohdmitx - control to schema - -Convert the DT binding documentation for the Amlogic g12a tohdmitx codec -glue to schema. - -Signed-off-by: Jerome Brunet ---- - .../bindings/sound/amlogic,g12a-tohdmitx.txt | 58 ------------------- - .../bindings/sound/amlogic,g12a-tohdmitx.yaml | 53 +++++++++++++++++ - 2 files changed, 53 insertions(+), 58 deletions(-) - delete mode 100644 Documentation/devicetree/bindings/sound/amlogic,g12a-tohdmitx.txt - create mode 100644 Documentation/devicetree/bindings/sound/amlogic,g12a-tohdmitx.yaml - -diff --git a/Documentation/devicetree/bindings/sound/amlogic,g12a-tohdmitx.txt b/Documentation/devicetree/bindings/sound/amlogic,g12a-tohdmitx.txt -deleted file mode 100644 -index 4e8cd7eb7cec..000000000000 ---- a/Documentation/devicetree/bindings/sound/amlogic,g12a-tohdmitx.txt -+++ /dev/null -@@ -1,58 +0,0 @@ --* Amlogic HDMI Tx control glue -- --Required properties: --- compatible: "amlogic,g12a-tohdmitx" or -- "amlogic,sm1-tohdmitx" --- reg: physical base address of the controller and length of memory -- mapped region. --- #sound-dai-cells: should be 1. --- resets: phandle to the dedicated reset line of the hdmitx glue. -- --Example on the S905X2 SoC: -- --tohdmitx: audio-controller@744 { -- compatible = "amlogic,g12a-tohdmitx"; -- reg = <0x0 0x744 0x0 0x4>; -- #sound-dai-cells = <1>; -- resets = <&clkc_audio AUD_RESET_TOHDMITX>; --}; -- --Example of an 'amlogic,axg-sound-card': -- --sound { -- compatible = "amlogic,axg-sound-card"; -- --[...] -- -- dai-link-x { -- sound-dai = <&tdmif_a>; -- dai-format = "i2s"; -- dai-tdm-slot-tx-mask-0 = <1 1>; -- -- codec-0 { -- sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>; -- }; -- -- codec-1 { -- sound-dai = <&external_dac>; -- }; -- }; -- -- dai-link-y { -- sound-dai = <&tdmif_c>; -- dai-format = "i2s"; -- dai-tdm-slot-tx-mask-0 = <1 1>; -- -- codec { -- sound-dai = <&tohdmitx TOHDMITX_I2S_IN_C>; -- }; -- }; -- -- dai-link-z { -- sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; -- -- codec { -- sound-dai = <&hdmi_tx>; -- }; -- }; --}; -diff --git a/Documentation/devicetree/bindings/sound/amlogic,g12a-tohdmitx.yaml b/Documentation/devicetree/bindings/sound/amlogic,g12a-tohdmitx.yaml -new file mode 100644 -index 000000000000..fdd64d103f33 ---- /dev/null -+++ b/Documentation/devicetree/bindings/sound/amlogic,g12a-tohdmitx.yaml -@@ -0,0 +1,53 @@ -+# SPDX-License-Identifier: GPL-2.0 -+%YAML 1.2 -+--- -+$id: http://devicetree.org/schemas/sound/amlogic,g12a-tohdmitx.yaml# -+$schema: http://devicetree.org/meta-schemas/core.yaml# -+ -+title: Amlogic G12a HDMI Tx Control Glue -+ -+maintainers: -+ - Jerome Brunet -+ -+properties: -+ $nodename: -+ pattern: "^audio-controller@.*" -+ -+ "#sound-dai-cells": -+ const: 1 -+ -+ compatible: -+ oneOf: -+ - items: -+ - const: -+ amlogic,g12a-tohdmitx -+ - items: -+ - enum: -+ - amlogic,sm1-tohdmitx -+ - const: -+ amlogic,g12a-tohdmitx -+ -+ reg: -+ maxItems: 1 -+ -+ resets: -+ maxItems: 1 -+ -+required: -+ - "#sound-dai-cells" -+ - compatible -+ - reg -+ - resets -+ -+examples: -+ - | -+ #include -+ -+ tohdmitx: audio-controller@744 { -+ compatible = "amlogic,g12a-tohdmitx"; -+ reg = <0x0 0x744 0x0 0x4>; -+ #sound-dai-cells = <1>; -+ resets = <&clkc_audio AUD_RESET_TOHDMITX>; -+ }; -+ -+ --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0088-FROMLIST-v1-ASoC-meson-convert-axg-sound-card-contro.patch b/projects/Amlogic/patches/linux/amlogic-0088-FROMLIST-v1-ASoC-meson-convert-axg-sound-card-contro.patch deleted file mode 100644 index d5223168890..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0088-FROMLIST-v1-ASoC-meson-convert-axg-sound-card-contro.patch +++ /dev/null @@ -1,337 +0,0 @@ -From 943ae631e86f1fc56fddb022ce95a29ccce9c3da Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Fri, 24 Jan 2020 18:23:36 +0100 -Subject: [PATCH 088/156] FROMLIST(v1): ASoC: meson: convert axg sound card - control to schema - -Convert the DT binding documentation for the Amlogic axg sound card to -schema. - -Signed-off-by: Jerome Brunet ---- - .../bindings/sound/amlogic,axg-sound-card.txt | 124 ------------ - .../sound/amlogic,axg-sound-card.yaml | 181 ++++++++++++++++++ - 2 files changed, 181 insertions(+), 124 deletions(-) - delete mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.txt - create mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.yaml - -diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.txt -deleted file mode 100644 -index 80b411296480..000000000000 ---- a/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.txt -+++ /dev/null -@@ -1,124 +0,0 @@ --Amlogic AXG sound card: -- --Required properties: -- --- compatible: "amlogic,axg-sound-card" --- model : User specified audio sound card name, one string -- --Optional properties: -- --- audio-aux-devs : List of phandles pointing to auxiliary devices --- audio-widgets : Please refer to widgets.txt. --- audio-routing : A list of the connections between audio components. -- --Subnodes: -- --- dai-link: Container for dai-link level properties and the CODEC -- sub-nodes. There should be at least one (and probably more) -- subnode of this type. -- --Required dai-link properties: -- --- sound-dai: phandle and port of the CPU DAI. -- --Required TDM Backend dai-link properties: --- dai-format : CPU/CODEC common audio format -- --Optional TDM Backend dai-link properties: --- dai-tdm-slot-rx-mask-{0,1,2,3}: Receive direction slot masks --- dai-tdm-slot-tx-mask-{0,1,2,3}: Transmit direction slot masks -- When omitted, mask is assumed to have to no -- slots. A valid must have at one slot, so at -- least one these mask should be provided with -- an enabled slot. --- dai-tdm-slot-num : Please refer to tdm-slot.txt. -- If omitted, slot number is set to accommodate the largest -- mask provided. --- dai-tdm-slot-width : Please refer to tdm-slot.txt. default to 32 if omitted. --- mclk-fs : Multiplication factor between stream rate and mclk -- --Backend dai-link subnodes: -- --- codec: dai-link representing backend links should have at least one subnode. -- One subnode for each codec of the dai-link. -- dai-link representing frontend links have no codec, therefore have no -- subnodes -- --Required codec subnodes properties: -- --- sound-dai: phandle and port of the CODEC DAI. -- --Optional codec subnodes properties: -- --- dai-tdm-slot-tx-mask : Please refer to tdm-slot.txt. --- dai-tdm-slot-rx-mask : Please refer to tdm-slot.txt. -- --Example: -- --sound { -- compatible = "amlogic,axg-sound-card"; -- model = "AXG-S420"; -- audio-aux-devs = <&tdmin_a>, <&tdmout_c>; -- audio-widgets = "Line", "Lineout", -- "Line", "Linein", -- "Speaker", "Speaker1 Left", -- "Speaker", "Speaker1 Right"; -- "Speaker", "Speaker2 Left", -- "Speaker", "Speaker2 Right"; -- audio-routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2", -- "SPDIFOUT IN 0", "FRDDR_A OUT 3", -- "TDM_C Playback", "TDMOUT_C OUT", -- "TDMIN_A IN 2", "TDM_C Capture", -- "TDMIN_A IN 5", "TDM_C Loopback", -- "TODDR_A IN 0", "TDMIN_A OUT", -- "Lineout", "Lineout AOUTL", -- "Lineout", "Lineout AOUTR", -- "Speaker1 Left", "SPK1 OUT_A", -- "Speaker2 Left", "SPK2 OUT_A", -- "Speaker1 Right", "SPK1 OUT_B", -- "Speaker2 Right", "SPK2 OUT_B", -- "Linein AINL", "Linein", -- "Linein AINR", "Linein"; -- -- dai-link@0 { -- sound-dai = <&frddr_a>; -- }; -- -- dai-link@1 { -- sound-dai = <&toddr_a>; -- }; -- -- dai-link@2 { -- sound-dai = <&tdmif_c>; -- dai-format = "i2s"; -- dai-tdm-slot-tx-mask-2 = <1 1>; -- dai-tdm-slot-tx-mask-3 = <1 1>; -- dai-tdm-slot-rx-mask-1 = <1 1>; -- mclk-fs = <256>; -- -- codec@0 { -- sound-dai = <&lineout>; -- }; -- -- codec@1 { -- sound-dai = <&speaker_amp1>; -- }; -- -- codec@2 { -- sound-dai = <&speaker_amp2>; -- }; -- -- codec@3 { -- sound-dai = <&linein>; -- }; -- -- }; -- -- dai-link@3 { -- sound-dai = <&spdifout>; -- -- codec { -- sound-dai = <&spdif_dit>; -- }; -- }; --}; -diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.yaml -new file mode 100644 -index 000000000000..bb90ac7766ae ---- /dev/null -+++ b/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.yaml -@@ -0,0 +1,181 @@ -+# SPDX-License-Identifier: GPL-2.0 -+%YAML 1.2 -+--- -+$id: http://devicetree.org/schemas/sound/amlogic,axg-sound-card.yaml# -+$schema: http://devicetree.org/meta-schemas/core.yaml# -+ -+title: Amlogic AXG sound card -+ -+maintainers: -+ - Jerome Brunet -+ -+properties: -+ compatible: -+ items: -+ - const: amlogic,axg-sound-card -+ -+ audio-aux-devs: -+ $ref: /schemas/types.yaml#/definitions/phandle-array -+ description: list of auxiliary devices -+ -+ audio-routing: -+ $ref: /schemas/types.yaml#/definitions/non-unique-string-array -+ minItems: 2 -+ description: |- -+ A list of the connections between audio components. Each entry is a -+ pair of strings, the first being the connection's sink, the second -+ being the connection's source. -+ -+ audio-widgets: -+ $ref: /schemas/types.yaml#/definitions/non-unique-string-array -+ minItems: 2 -+ description: |- -+ A list off component DAPM widget. Each entry is a pair of strings, -+ the first being the widget type, the second being the widget name -+ -+ model: -+ $ref: /schemas/types.yaml#/definitions/string -+ description: User specified audio sound card name -+ -+patternProperties: -+ "^dai-link-[0-9]+$": -+ type: object -+ description: |- -+ dai-link child nodes: -+ Container for dai-link level properties and the CODEC sub-nodes. -+ There should be at least one (and probably more) subnode of this type -+ -+ properties: -+ dai-format: -+ $ref: /schemas/types.yaml#/definitions/string -+ enum: [ i2s, left-j, dsp_a ] -+ -+ dai-tdm-slot-num: -+ $ref: /schemas/types.yaml#/definitions/uint32 -+ description: | -+ Number of slots in use. If omitted, slot number is set to -+ accommodate the largest mask provided. -+ maximum: 32 -+ -+ dai-tdm-slot-width: -+ $ref: /schemas/types.yaml#/definitions/uint32 -+ description: Width in bits for each slot -+ enum: [ 8, 16, 20, 24, 32 ] -+ default: 32 -+ -+ mclk-fs: -+ $ref: /schemas/types.yaml#/definitions/uint32 -+ description: |- -+ Multiplication factor between the frame rate and master clock -+ rate -+ -+ sound-dai: -+ $ref: /schemas/types.yaml#/definitions/phandle-array -+ description: phandle of the CPU DAI -+ -+ patternProperties: -+ "^dai-tdm-slot-(t|r)x-mask-[0-3]$": -+ $ref: /schemas/types.yaml#/definitions/uint32-array -+ description: |- -+ Transmit and receive cpu slot masks of each TDM lane -+ When omitted, mask is assumed to have to no slots. A valid must have -+ at one slot, so at least one these mask should be provided with -+ an enabled slot. -+ -+ "^codec(-[0-9]+)?$": -+ type: object -+ description: |- -+ Codecs: -+ dai-link representing backend links should have at least one subnode. -+ One subnode for each codec of the dai-link. dai-link representing -+ frontend links have no codec, therefore have no subnodes -+ -+ properties: -+ sound-dai: -+ $ref: /schemas/types.yaml#/definitions/phandle-array -+ description: phandle of the codec DAI -+ -+ patternProperties: -+ "^dai-tdm-slot-(t|r)x-mask$": -+ $ref: /schemas/types.yaml#/definitions/uint32-array -+ description: Transmit and receive codec slot masks -+ -+ required: -+ - sound-dai -+ -+ required: -+ - sound-dai -+ -+required: -+ - model -+ - dai-link-0 -+ -+examples: -+ - | -+ sound { -+ compatible = "amlogic,axg-sound-card"; -+ model = "AXG-S420"; -+ audio-aux-devs = <&tdmin_a>, <&tdmout_c>; -+ audio-widgets = "Line", "Lineout", -+ "Line", "Linein", -+ "Speaker", "Speaker1 Left", -+ "Speaker", "Speaker1 Right", -+ "Speaker", "Speaker2 Left", -+ "Speaker", "Speaker2 Right"; -+ audio-routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2", -+ "SPDIFOUT IN 0", "FRDDR_A OUT 3", -+ "TDM_C Playback", "TDMOUT_C OUT", -+ "TDMIN_A IN 2", "TDM_C Capture", -+ "TDMIN_A IN 5", "TDM_C Loopback", -+ "TODDR_A IN 0", "TDMIN_A OUT", -+ "Lineout", "Lineout AOUTL", -+ "Lineout", "Lineout AOUTR", -+ "Speaker1 Left", "SPK1 OUT_A", -+ "Speaker2 Left", "SPK2 OUT_A", -+ "Speaker1 Right", "SPK1 OUT_B", -+ "Speaker2 Right", "SPK2 OUT_B", -+ "Linein AINL", "Linein", -+ "Linein AINR", "Linein"; -+ -+ dai-link-0 { -+ sound-dai = <&frddr_a>; -+ }; -+ -+ dai-link-1 { -+ sound-dai = <&toddr_a>; -+ }; -+ -+ dai-link-2 { -+ sound-dai = <&tdmif_c>; -+ dai-format = "i2s"; -+ dai-tdm-slot-tx-mask-2 = <1 1>; -+ dai-tdm-slot-tx-mask-3 = <1 1>; -+ dai-tdm-slot-rx-mask-1 = <1 1>; -+ mclk-fs = <256>; -+ -+ codec-0 { -+ sound-dai = <&lineout>; -+ }; -+ -+ codec-1 { -+ sound-dai = <&speaker_amp1>; -+ }; -+ -+ codec-2 { -+ sound-dai = <&speaker_amp2>; -+ }; -+ -+ codec-3 { -+ sound-dai = <&linein>; -+ }; -+ }; -+ -+ dai-link-3 { -+ sound-dai = <&spdifout>; -+ -+ codec { -+ sound-dai = <&spdif_dit>; -+ }; -+ }; -+ }; -+ --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0089-FROMLIST-v1-media-videodev2-add-Compressed-Framebuff.patch b/projects/Amlogic/patches/linux/amlogic-0089-FROMLIST-v1-media-videodev2-add-Compressed-Framebuff.patch deleted file mode 100644 index 1aaa1c2318e..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0089-FROMLIST-v1-media-videodev2-add-Compressed-Framebuff.patch +++ /dev/null @@ -1,60 +0,0 @@ -From f607cda7c843afaaeb607a9be6bcd8028b58728c Mon Sep 17 00:00:00 2001 -From: Maxime Jourdan -Date: Fri, 5 Jun 2020 07:20:34 +0000 -Subject: [PATCH 089/156] FROMLIST(v1): media: videodev2: add Compressed - Framebuffer pixel formats - -Add two generic Compressed Framebuffer pixel formats to be used -with a modifier when imported back in another subsystem like DRM/KMS. - -These pixel formats represents generic 8bits and 10bits compressed buffers -with a vendor specific layout. - -These are aligned with the DRM_FORMAT_YUV420_8BIT and DRM_FORMAT_YUV420_10BIT -used to describe the underlying compressed buffers used for ARM Framebuffer -Compression. In the Amlogic case, the compression is different but the -underlying buffer components is the same. - -Signed-off-by: Maxime Jourdan -Signed-off-by: Neil Armstrong ---- - drivers/media/v4l2-core/v4l2-ioctl.c | 2 ++ - include/uapi/linux/videodev2.h | 9 +++++++++ - 2 files changed, 11 insertions(+) - -diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c -index b2ef8e60ea7d..c5378f82a305 100644 ---- a/drivers/media/v4l2-core/v4l2-ioctl.c -+++ b/drivers/media/v4l2-core/v4l2-ioctl.c -@@ -1395,6 +1395,8 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt) - case V4L2_PIX_FMT_S5C_UYVY_JPG: descr = "S5C73MX interleaved UYVY/JPEG"; break; - case V4L2_PIX_FMT_MT21C: descr = "Mediatek Compressed Format"; break; - case V4L2_PIX_FMT_SUNXI_TILED_NV12: descr = "Sunxi Tiled NV12 Format"; break; -+ case V4L2_PIX_FMT_YUV420_8BIT: descr = "Compressed YUV 4:2:0 8-bit Format"; break; -+ case V4L2_PIX_FMT_YUV420_10BIT: descr = "Compressed YUV 4:2:0 10-bit Format"; break; - default: - if (fmt->description[0]) - return; -diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h -index 9817b7e2c968..47c8e6de5fb2 100644 ---- a/include/uapi/linux/videodev2.h -+++ b/include/uapi/linux/videodev2.h -@@ -703,6 +703,15 @@ struct v4l2_pix_format { - #define V4L2_PIX_FMT_FWHT v4l2_fourcc('F', 'W', 'H', 'T') /* Fast Walsh Hadamard Transform (vicodec) */ - #define V4L2_PIX_FMT_FWHT_STATELESS v4l2_fourcc('S', 'F', 'W', 'H') /* Stateless FWHT (vicodec) */ - -+/* -+ * Compressed Luminance+Chrominance meta-formats -+ * In these formats, the component ordering is specified (Y, followed by U -+ * then V), but the exact Linear layout is undefined. -+ * These formats can only be used with a non-Linear modifier. -+ */ -+#define V4L2_PIX_FMT_YUV420_8BIT v4l2_fourcc('Y', 'U', '0', '8') /* 1-plane YUV 4:2:0 8-bit */ -+#define V4L2_PIX_FMT_YUV420_10BIT v4l2_fourcc('Y', 'U', '1', '0') /* 1-plane YUV 4:2:0 10-bit */ -+ - /* Vendor-specific formats */ - #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */ - #define V4L2_PIX_FMT_WNVA v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */ --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0090-FROMLIST-v1-media-meson-vdec-handle-bitdepth-on-sour.patch b/projects/Amlogic/patches/linux/amlogic-0090-FROMLIST-v1-media-meson-vdec-handle-bitdepth-on-sour.patch deleted file mode 100644 index c72abfc483f..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0090-FROMLIST-v1-media-meson-vdec-handle-bitdepth-on-sour.patch +++ /dev/null @@ -1,117 +0,0 @@ -From 30c345683a949068c7769c67d656f0f8246984c9 Mon Sep 17 00:00:00 2001 -From: Maxime Jourdan -Date: Fri, 5 Jun 2020 07:21:43 +0000 -Subject: [PATCH 090/156] FROMLIST(v1): media: meson: vdec: handle bitdepth on - source change - -In order to handle Compressed Framebuffer support, we need to handle -the switch between 8bit and 10bit frame output. - -This handles the bitdepth in the codec amvdec_src_change() call to handle -a source change/decode resume when the stream bitdepth changes. - -Signed-off-by: Maxime Jourdan -Signed-off-by: Neil Armstrong ---- - drivers/staging/media/meson/vdec/codec_h264.c | 3 ++- - drivers/staging/media/meson/vdec/codec_vp9.c | 3 ++- - drivers/staging/media/meson/vdec/vdec.h | 1 + - drivers/staging/media/meson/vdec/vdec_helpers.c | 10 ++++++---- - drivers/staging/media/meson/vdec/vdec_helpers.h | 3 ++- - 5 files changed, 13 insertions(+), 7 deletions(-) - -diff --git a/drivers/staging/media/meson/vdec/codec_h264.c b/drivers/staging/media/meson/vdec/codec_h264.c -index c61128fc4bb9..d53c9a464bde 100644 ---- a/drivers/staging/media/meson/vdec/codec_h264.c -+++ b/drivers/staging/media/meson/vdec/codec_h264.c -@@ -353,7 +353,8 @@ static void codec_h264_src_change(struct amvdec_session *sess) - frame_width, frame_height, crop_right, crop_bottom); - - codec_h264_set_par(sess); -- amvdec_src_change(sess, frame_width, frame_height, h264->max_refs + 5); -+ amvdec_src_change(sess, frame_width, frame_height, -+ h264->max_refs + 5, 8); - } - - /* -diff --git a/drivers/staging/media/meson/vdec/codec_vp9.c b/drivers/staging/media/meson/vdec/codec_vp9.c -index 28a7e62e7371..3fdce799364e 100644 ---- a/drivers/staging/media/meson/vdec/codec_vp9.c -+++ b/drivers/staging/media/meson/vdec/codec_vp9.c -@@ -2145,7 +2145,8 @@ static irqreturn_t codec_vp9_threaded_isr(struct amvdec_session *sess) - - codec_vp9_fetch_rpm(sess); - if (codec_vp9_process_rpm(vp9)) { -- amvdec_src_change(sess, vp9->width, vp9->height, 16); -+ amvdec_src_change(sess, vp9->width, vp9->height, 16, -+ vp9->is_10bit ? 10 : 8); - - /* No frame is actually processed */ - vp9->cur_frame = NULL; -diff --git a/drivers/staging/media/meson/vdec/vdec.h b/drivers/staging/media/meson/vdec/vdec.h -index f95445ac0658..e3e4af73447a 100644 ---- a/drivers/staging/media/meson/vdec/vdec.h -+++ b/drivers/staging/media/meson/vdec/vdec.h -@@ -234,6 +234,7 @@ struct amvdec_session { - u32 width; - u32 height; - u32 colorspace; -+ u32 bitdepth; - u8 ycbcr_enc; - u8 quantization; - u8 xfer_func; -diff --git a/drivers/staging/media/meson/vdec/vdec_helpers.c b/drivers/staging/media/meson/vdec/vdec_helpers.c -index 7f07a9175815..eed7a929c5d0 100644 ---- a/drivers/staging/media/meson/vdec/vdec_helpers.c -+++ b/drivers/staging/media/meson/vdec/vdec_helpers.c -@@ -436,7 +436,7 @@ void amvdec_set_par_from_dar(struct amvdec_session *sess, - EXPORT_SYMBOL_GPL(amvdec_set_par_from_dar); - - void amvdec_src_change(struct amvdec_session *sess, u32 width, -- u32 height, u32 dpb_size) -+ u32 height, u32 dpb_size, u32 bitdepth) - { - static const struct v4l2_event ev = { - .type = V4L2_EVENT_SOURCE_CHANGE, -@@ -451,7 +451,8 @@ void amvdec_src_change(struct amvdec_session *sess, u32 width, - if (sess->streamon_cap && - sess->width == width && - sess->height == height && -- dpb_size <= sess->num_dst_bufs) { -+ dpb_size <= sess->num_dst_bufs && -+ sess->bitdepth == bitdepth) { - sess->fmt_out->codec_ops->resume(sess); - return; - } -@@ -460,9 +461,10 @@ void amvdec_src_change(struct amvdec_session *sess, u32 width, - sess->width = width; - sess->height = height; - sess->status = STATUS_NEEDS_RESUME; -+ sess->bitdepth = bitdepth; - -- dev_dbg(sess->core->dev, "Res. changed (%ux%u), DPB size %u\n", -- width, height, dpb_size); -+ dev_dbg(sess->core->dev, "Res. changed (%ux%u), DPB %u, bitdepth %u\n", -+ width, height, dpb_size, bitdepth); - v4l2_event_queue_fh(&sess->fh, &ev); - } - EXPORT_SYMBOL_GPL(amvdec_src_change); -diff --git a/drivers/staging/media/meson/vdec/vdec_helpers.h b/drivers/staging/media/meson/vdec/vdec_helpers.h -index cfaed52ab526..f059cf195cca 100644 ---- a/drivers/staging/media/meson/vdec/vdec_helpers.h -+++ b/drivers/staging/media/meson/vdec/vdec_helpers.h -@@ -76,9 +76,10 @@ void amvdec_set_par_from_dar(struct amvdec_session *sess, - * @width: picture width detected by the hardware - * @height: picture height detected by the hardware - * @dpb_size: Decoded Picture Buffer size (= amount of buffers for decoding) -+ * @bitdepth: Bit depth (usually 10 or 8) of the coded content - */ - void amvdec_src_change(struct amvdec_session *sess, u32 width, -- u32 height, u32 dpb_size); -+ u32 height, u32 dpb_size, u32 bitdepth); - - /** - * amvdec_abort() - Abort the current decoding session --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0091-FROMLIST-v1-media-meson-vdec-update-compressed-buffe.patch b/projects/Amlogic/patches/linux/amlogic-0091-FROMLIST-v1-media-meson-vdec-update-compressed-buffe.patch deleted file mode 100644 index 360d4eae0d4..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0091-FROMLIST-v1-media-meson-vdec-update-compressed-buffe.patch +++ /dev/null @@ -1,190 +0,0 @@ -From eb8d1460ad66d62792039c4fe257c57d08ebef7f Mon Sep 17 00:00:00 2001 -From: Maxime Jourdan -Date: Fri, 5 Jun 2020 07:22:46 +0000 -Subject: [PATCH 091/156] FROMLIST(v1): media: meson: vdec: update compressed - buffer helpers - -The actual compressed buffer helpers were very basic and only used -to enabled downsampling when decoding a 10bit stream. - -Update and rename these helpers to handle the complete compressed buffer -output buffer size and alignment for 8bit and 10bit streams. - -Signed-off-by: Maxime Jourdan -Signed-off-by: Neil Armstrong ---- - .../media/meson/vdec/codec_hevc_common.c | 28 ++++++++++++--- - drivers/staging/media/meson/vdec/codec_vp9.c | 7 ++-- - .../staging/media/meson/vdec/vdec_helpers.c | 35 +++++++++++++------ - .../staging/media/meson/vdec/vdec_helpers.h | 8 +++-- - 4 files changed, 58 insertions(+), 20 deletions(-) - -diff --git a/drivers/staging/media/meson/vdec/codec_hevc_common.c b/drivers/staging/media/meson/vdec/codec_hevc_common.c -index 0315cc0911cd..c9bf67aa2668 100644 ---- a/drivers/staging/media/meson/vdec/codec_hevc_common.c -+++ b/drivers/staging/media/meson/vdec/codec_hevc_common.c -@@ -30,8 +30,11 @@ const u16 vdec_hevc_parser_cmd[] = { - void codec_hevc_setup_decode_head(struct amvdec_session *sess, int is_10bit) - { - struct amvdec_core *core = sess->core; -- u32 body_size = amvdec_am21c_body_size(sess->width, sess->height); -- u32 head_size = amvdec_am21c_head_size(sess->width, sess->height); -+ u32 use_mmu = codec_hevc_use_mmu(core->platform->revision, -+ sess->pixfmt_cap, is_10bit); -+ u32 body_size = amvdec_amfbc_body_size(sess->width, sess->height, -+ is_10bit, use_mmu); -+ u32 head_size = amvdec_amfbc_head_size(sess->width, sess->height); - - if (!codec_hevc_use_fbc(sess->pixfmt_cap, is_10bit)) { - /* Enable 2-plane reference read mode */ -@@ -154,7 +157,12 @@ void codec_hevc_free_fbc_buffers(struct amvdec_session *sess, - struct codec_hevc_common *comm) - { - struct device *dev = sess->core->dev; -- u32 am21_size = amvdec_am21c_size(sess->width, sess->height); -+ u32 use_mmu = codec_hevc_use_mmu(sess->core->platform->revision, -+ sess->pixfmt_cap, -+ sess->bitdepth == 10 ? 1 : 0); -+ u32 am21_size = amvdec_amfbc_size(sess->width, sess->height, -+ sess->bitdepth == 10 ? 1 : 0, -+ use_mmu); - int i; - - for (i = 0; i < MAX_REF_PIC_NUM; ++i) { -@@ -173,7 +181,12 @@ static int codec_hevc_alloc_fbc_buffers(struct amvdec_session *sess, - { - struct device *dev = sess->core->dev; - struct v4l2_m2m_buffer *buf; -- u32 am21_size = amvdec_am21c_size(sess->width, sess->height); -+ u32 use_mmu = codec_hevc_use_mmu(sess->core->platform->revision, -+ sess->pixfmt_cap, -+ sess->bitdepth == 10 ? 1 : 0); -+ u32 am21_size = amvdec_amfbc_size(sess->width, sess->height, -+ sess->bitdepth == 10 ? 1 : 0, -+ use_mmu); - - v4l2_m2m_for_each_dst_buf(sess->m2m_ctx, buf) { - u32 idx = buf->vb.vb2_buf.index; -@@ -280,7 +293,12 @@ void codec_hevc_fill_mmu_map(struct amvdec_session *sess, - struct codec_hevc_common *comm, - struct vb2_buffer *vb) - { -- u32 size = amvdec_am21c_size(sess->width, sess->height); -+ u32 use_mmu = codec_hevc_use_mmu(sess->core->platform->revision, -+ sess->pixfmt_cap, -+ sess->bitdepth == 10 ? 1 : 0); -+ u32 size = amvdec_amfbc_size(sess->width, sess->height, -+ sess->bitdepth == 10 ? 1 : 0, -+ use_mmu); - u32 nb_pages = size / PAGE_SIZE; - u32 *mmu_map = comm->mmu_map_vaddr; - u32 first_page; -diff --git a/drivers/staging/media/meson/vdec/codec_vp9.c b/drivers/staging/media/meson/vdec/codec_vp9.c -index 3fdce799364e..66a1168aa167 100644 ---- a/drivers/staging/media/meson/vdec/codec_vp9.c -+++ b/drivers/staging/media/meson/vdec/codec_vp9.c -@@ -1147,6 +1147,8 @@ static void codec_vp9_set_mc(struct amvdec_session *sess, - struct codec_vp9 *vp9) - { - struct amvdec_core *core = sess->core; -+ u32 use_mmu = codec_hevc_use_mmu(core->platform->revision, -+ sess->pixfmt_cap, vp9->is_10bit); - u32 scale = 0; - u32 sz; - int i; -@@ -1166,8 +1168,9 @@ static void codec_vp9_set_mc(struct amvdec_session *sess, - vp9->frame_refs[i]->height != vp9->height) - scale = 1; - -- sz = amvdec_am21c_body_size(vp9->frame_refs[i]->width, -- vp9->frame_refs[i]->height); -+ sz = amvdec_amfbc_body_size(vp9->frame_refs[i]->width, -+ vp9->frame_refs[i]->height, -+ vp9->is_10bit, use_mmu); - - amvdec_write_dos(core, VP9D_MPP_REFINFO_DATA, - vp9->frame_refs[i]->width); -diff --git a/drivers/staging/media/meson/vdec/vdec_helpers.c b/drivers/staging/media/meson/vdec/vdec_helpers.c -index eed7a929c5d0..320cac1ed03e 100644 ---- a/drivers/staging/media/meson/vdec/vdec_helpers.c -+++ b/drivers/staging/media/meson/vdec/vdec_helpers.c -@@ -50,32 +50,47 @@ void amvdec_write_parser(struct amvdec_core *core, u32 reg, u32 val) - } - EXPORT_SYMBOL_GPL(amvdec_write_parser); - --/* 4 KiB per 64x32 block */ --u32 amvdec_am21c_body_size(u32 width, u32 height) -+/* AMFBC body is made out of 64x32 blocks with varying block size */ -+u32 amvdec_amfbc_body_size(u32 width, u32 height, u32 is_10bit, u32 use_mmu) - { - u32 width_64 = ALIGN(width, 64) / 64; - u32 height_32 = ALIGN(height, 32) / 32; -+ u32 blk_size = 4096; - -- return SZ_4K * width_64 * height_32; -+ if (!is_10bit) { -+ if (use_mmu) -+ blk_size = 3200; -+ else -+ blk_size = 3072; -+ } -+ -+ return blk_size * width_64 * height_32; - } --EXPORT_SYMBOL_GPL(amvdec_am21c_body_size); -+EXPORT_SYMBOL_GPL(amvdec_amfbc_body_size); - - /* 32 bytes per 128x64 block */ --u32 amvdec_am21c_head_size(u32 width, u32 height) -+u32 amvdec_amfbc_head_size(u32 width, u32 height) - { - u32 width_128 = ALIGN(width, 128) / 128; - u32 height_64 = ALIGN(height, 64) / 64; - - return 32 * width_128 * height_64; - } --EXPORT_SYMBOL_GPL(amvdec_am21c_head_size); -+EXPORT_SYMBOL_GPL(amvdec_amfbc_head_size); -+ -+u32 amvdec_amfbc_size(u32 width, u32 height, u32 is_10bit, u32 use_mmu) -+{ -+ return ALIGN(amvdec_amfbc_body_size(width, height, is_10bit, use_mmu) + -+ amvdec_amfbc_head_size(width, height), SZ_64K); -+} -+EXPORT_SYMBOL_GPL(amvdec_amfbc_size); - --u32 amvdec_am21c_size(u32 width, u32 height) -+u32 amvdec_is_dst_fbc(struct amvdec_session *sess) - { -- return ALIGN(amvdec_am21c_body_size(width, height) + -- amvdec_am21c_head_size(width, height), SZ_64K); -+ return sess->pixfmt_cap == V4L2_PIX_FMT_YUV420_8BIT || -+ sess->pixfmt_cap == V4L2_PIX_FMT_YUV420_10BIT; - } --EXPORT_SYMBOL_GPL(amvdec_am21c_size); -+EXPORT_SYMBOL_GPL(amvdec_is_dst_fbc); - - static int canvas_alloc(struct amvdec_session *sess, u8 *canvas_id) - { -diff --git a/drivers/staging/media/meson/vdec/vdec_helpers.h b/drivers/staging/media/meson/vdec/vdec_helpers.h -index f059cf195cca..c1666125fe4c 100644 ---- a/drivers/staging/media/meson/vdec/vdec_helpers.h -+++ b/drivers/staging/media/meson/vdec/vdec_helpers.h -@@ -27,9 +27,11 @@ void amvdec_clear_dos_bits(struct amvdec_core *core, u32 reg, u32 val); - u32 amvdec_read_parser(struct amvdec_core *core, u32 reg); - void amvdec_write_parser(struct amvdec_core *core, u32 reg, u32 val); - --u32 amvdec_am21c_body_size(u32 width, u32 height); --u32 amvdec_am21c_head_size(u32 width, u32 height); --u32 amvdec_am21c_size(u32 width, u32 height); -+/* Helpers for the Amlogic compressed framebuffer format */ -+u32 amvdec_amfbc_body_size(u32 width, u32 height, u32 is_10bit, u32 use_mmu); -+u32 amvdec_amfbc_head_size(u32 width, u32 height); -+u32 amvdec_amfbc_size(u32 width, u32 height, u32 is_10bit, u32 use_mmu); -+u32 amvdec_is_dst_fbc(struct amvdec_session *sess); - - /** - * amvdec_dst_buf_done_idx() - Signal that a buffer is done decoding --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0092-FROMLIST-v1-media-meson-vdec-add-support-for-compres.patch b/projects/Amlogic/patches/linux/amlogic-0092-FROMLIST-v1-media-meson-vdec-add-support-for-compres.patch deleted file mode 100644 index 8f391a92355..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0092-FROMLIST-v1-media-meson-vdec-add-support-for-compres.patch +++ /dev/null @@ -1,322 +0,0 @@ -From 723f6b236a512866e90dc29875b3052b5bd81095 Mon Sep 17 00:00:00 2001 -From: Maxime Jourdan -Date: Fri, 5 Jun 2020 07:24:01 +0000 -Subject: [PATCH 092/156] FROMLIST(v1): media: meson: vdec: add support for - compressed output for VP9 decoder - -Add the necessary changes to decode VP9 8bit and 10bit streams into -compressed buffers to be imported back into DRM/KMS using a modifier. - -On GXL/GXM platforms, the VP9 decoder will output a basic Framebuffer -Compressed layout, with a memory saving option when decoding 8bit to -better align the compressed macroblocks. This layout includes the buffer -content and an header desscribing the compressed buffer. - -On G12A and later, the VP9 decoder will output "Scatter" layout, meaning -the header buffer will contain references to the internal memory decoder -workspace and frame memory to construct a compressed framebuffer. - -The compressed layout has been described in the DRM Modifier patchset -at [1]. - -[1] https://patchwork.freedesktop.org/series/73722/#rev7 - -Signed-off-by: Maxime Jourdan -Signed-off-by: Neil Armstrong ---- - .../media/meson/vdec/codec_hevc_common.c | 112 ++++++------------ - .../media/meson/vdec/codec_hevc_common.h | 13 +- - drivers/staging/media/meson/vdec/codec_vp9.c | 19 +-- - 3 files changed, 47 insertions(+), 97 deletions(-) - -diff --git a/drivers/staging/media/meson/vdec/codec_hevc_common.c b/drivers/staging/media/meson/vdec/codec_hevc_common.c -index c9bf67aa2668..73dae40b3319 100644 ---- a/drivers/staging/media/meson/vdec/codec_hevc_common.c -+++ b/drivers/staging/media/meson/vdec/codec_hevc_common.c -@@ -42,9 +42,17 @@ void codec_hevc_setup_decode_head(struct amvdec_session *sess, int is_10bit) - return; - } - -+ /* enable mem saving mode for 8-bit */ -+ if (!is_10bit) -+ amvdec_write_dos_bits(core, HEVC_SAO_CTRL5, BIT(9)); -+ else -+ amvdec_clear_dos_bits(core, HEVC_SAO_CTRL5, BIT(9)); -+ - if (codec_hevc_use_mmu(core->platform->revision, - sess->pixfmt_cap, is_10bit)) - amvdec_write_dos(core, HEVCD_MPP_DECOMP_CTL1, BIT(4)); -+ else if (!is_10bit) -+ amvdec_write_dos(core, HEVCD_MPP_DECOMP_CTL1, BIT(3)); - else - amvdec_write_dos(core, HEVCD_MPP_DECOMP_CTL1, 0); - -@@ -76,7 +84,7 @@ static void codec_hevc_setup_buffers_gxbb(struct amvdec_session *sess, - - idx = vb->index; - -- if (codec_hevc_use_downsample(sess->pixfmt_cap, is_10bit)) -+ if (codec_hevc_use_fbc(sess->pixfmt_cap, is_10bit)) - buf_y_paddr = comm->fbc_buffer_paddr[idx]; - else - buf_y_paddr = vb2_dma_contig_plane_dma_addr(vb, 0); -@@ -117,7 +125,6 @@ static void codec_hevc_setup_buffers_gxl(struct amvdec_session *sess, - { - struct amvdec_core *core = sess->core; - struct v4l2_m2m_buffer *buf; -- u32 revision = core->platform->revision; - u32 pixfmt_cap = sess->pixfmt_cap; - int i; - -@@ -130,9 +137,7 @@ static void codec_hevc_setup_buffers_gxl(struct amvdec_session *sess, - dma_addr_t buf_uv_paddr = 0; - u32 idx = vb->index; - -- if (codec_hevc_use_mmu(revision, pixfmt_cap, is_10bit)) -- buf_y_paddr = comm->mmu_header_paddr[idx]; -- else if (codec_hevc_use_downsample(pixfmt_cap, is_10bit)) -+ if (codec_hevc_use_downsample(pixfmt_cap, is_10bit)) - buf_y_paddr = comm->fbc_buffer_paddr[idx]; - else - buf_y_paddr = vb2_dma_contig_plane_dma_addr(vb, 0); -@@ -173,6 +178,14 @@ void codec_hevc_free_fbc_buffers(struct amvdec_session *sess, - comm->fbc_buffer_vaddr[i] = NULL; - } - } -+ -+ if (comm->mmu_map_vaddr) { -+ dma_free_coherent(dev, MMU_MAP_SIZE, -+ comm->mmu_map_vaddr, -+ comm->mmu_map_paddr); -+ comm->mmu_map_vaddr = NULL; -+ } -+ - } - EXPORT_SYMBOL_GPL(codec_hevc_free_fbc_buffers); - -@@ -205,79 +218,29 @@ static int codec_hevc_alloc_fbc_buffers(struct amvdec_session *sess, - return 0; - } - --void codec_hevc_free_mmu_headers(struct amvdec_session *sess, -- struct codec_hevc_common *comm) --{ -- struct device *dev = sess->core->dev; -- int i; -- -- for (i = 0; i < MAX_REF_PIC_NUM; ++i) { -- if (comm->mmu_header_vaddr[i]) { -- dma_free_coherent(dev, MMU_COMPRESS_HEADER_SIZE, -- comm->mmu_header_vaddr[i], -- comm->mmu_header_paddr[i]); -- comm->mmu_header_vaddr[i] = NULL; -- } -- } -- -- if (comm->mmu_map_vaddr) { -- dma_free_coherent(dev, MMU_MAP_SIZE, -- comm->mmu_map_vaddr, -- comm->mmu_map_paddr); -- comm->mmu_map_vaddr = NULL; -- } --} --EXPORT_SYMBOL_GPL(codec_hevc_free_mmu_headers); -- --static int codec_hevc_alloc_mmu_headers(struct amvdec_session *sess, -- struct codec_hevc_common *comm) --{ -- struct device *dev = sess->core->dev; -- struct v4l2_m2m_buffer *buf; -- -- comm->mmu_map_vaddr = dma_alloc_coherent(dev, MMU_MAP_SIZE, -- &comm->mmu_map_paddr, -- GFP_KERNEL); -- if (!comm->mmu_map_vaddr) -- return -ENOMEM; -- -- v4l2_m2m_for_each_dst_buf(sess->m2m_ctx, buf) { -- u32 idx = buf->vb.vb2_buf.index; -- dma_addr_t paddr; -- void *vaddr = dma_alloc_coherent(dev, MMU_COMPRESS_HEADER_SIZE, -- &paddr, GFP_KERNEL); -- if (!vaddr) { -- codec_hevc_free_mmu_headers(sess, comm); -- return -ENOMEM; -- } -- -- comm->mmu_header_vaddr[idx] = vaddr; -- comm->mmu_header_paddr[idx] = paddr; -- } -- -- return 0; --} -- - int codec_hevc_setup_buffers(struct amvdec_session *sess, - struct codec_hevc_common *comm, - int is_10bit) - { - struct amvdec_core *core = sess->core; -+ struct device *dev = core->dev; - int ret; - -- if (codec_hevc_use_downsample(sess->pixfmt_cap, is_10bit)) { -- ret = codec_hevc_alloc_fbc_buffers(sess, comm); -- if (ret) -- return ret; -+ if (codec_hevc_use_mmu(core->platform->revision, -+ sess->pixfmt_cap, is_10bit)) { -+ comm->mmu_map_vaddr = dma_alloc_coherent(dev, MMU_MAP_SIZE, -+ &comm->mmu_map_paddr, -+ GFP_KERNEL); -+ if (!comm->mmu_map_vaddr) -+ return -ENOMEM; - } - - if (codec_hevc_use_mmu(core->platform->revision, -- sess->pixfmt_cap, is_10bit)) { -- ret = codec_hevc_alloc_mmu_headers(sess, comm); -- if (ret) { -- codec_hevc_free_fbc_buffers(sess, comm); -+ sess->pixfmt_cap, is_10bit) || -+ codec_hevc_use_downsample(sess->pixfmt_cap, is_10bit)) { -+ ret = codec_hevc_alloc_fbc_buffers(sess, comm); -+ if (ret) - return ret; -- } - } - - if (core->platform->revision == VDEC_REVISION_GXBB) -@@ -291,24 +254,19 @@ EXPORT_SYMBOL_GPL(codec_hevc_setup_buffers); - - void codec_hevc_fill_mmu_map(struct amvdec_session *sess, - struct codec_hevc_common *comm, -- struct vb2_buffer *vb) -+ struct vb2_buffer *vb, -+ u32 is_10bit) - { - u32 use_mmu = codec_hevc_use_mmu(sess->core->platform->revision, -- sess->pixfmt_cap, -- sess->bitdepth == 10 ? 1 : 0); -- u32 size = amvdec_amfbc_size(sess->width, sess->height, -- sess->bitdepth == 10 ? 1 : 0, -+ sess->pixfmt_cap, is_10bit); -+ u32 size = amvdec_amfbc_size(sess->width, sess->height, is_10bit, - use_mmu); - u32 nb_pages = size / PAGE_SIZE; - u32 *mmu_map = comm->mmu_map_vaddr; - u32 first_page; - u32 i; - -- if (sess->pixfmt_cap == V4L2_PIX_FMT_NV12M) -- first_page = comm->fbc_buffer_paddr[vb->index] >> PAGE_SHIFT; -- else -- first_page = vb2_dma_contig_plane_dma_addr(vb, 0) >> PAGE_SHIFT; -- -+ first_page = comm->fbc_buffer_paddr[vb->index] >> PAGE_SHIFT; - for (i = 0; i < nb_pages; ++i) - mmu_map[i] = first_page + i; - } -diff --git a/drivers/staging/media/meson/vdec/codec_hevc_common.h b/drivers/staging/media/meson/vdec/codec_hevc_common.h -index 88e4379ba1ee..5a3c6520940f 100644 ---- a/drivers/staging/media/meson/vdec/codec_hevc_common.h -+++ b/drivers/staging/media/meson/vdec/codec_hevc_common.h -@@ -22,9 +22,6 @@ struct codec_hevc_common { - void *fbc_buffer_vaddr[MAX_REF_PIC_NUM]; - dma_addr_t fbc_buffer_paddr[MAX_REF_PIC_NUM]; - -- void *mmu_header_vaddr[MAX_REF_PIC_NUM]; -- dma_addr_t mmu_header_paddr[MAX_REF_PIC_NUM]; -- - void *mmu_map_vaddr; - dma_addr_t mmu_map_paddr; - }; -@@ -32,14 +29,15 @@ struct codec_hevc_common { - /* Returns 1 if we must use framebuffer compression */ - static inline int codec_hevc_use_fbc(u32 pixfmt, int is_10bit) - { -- /* TOFIX: Handle Amlogic Compressed buffer for 8bit also */ -- return is_10bit; -+ return pixfmt == V4L2_PIX_FMT_YUV420_8BIT || -+ pixfmt == V4L2_PIX_FMT_YUV420_10BIT || -+ is_10bit; - } - - /* Returns 1 if we are decoding 10-bit but outputting 8-bit NV12 */ - static inline int codec_hevc_use_downsample(u32 pixfmt, int is_10bit) - { -- return is_10bit; -+ return pixfmt == V4L2_PIX_FMT_NV12M && is_10bit; - } - - /* Returns 1 if we are decoding using the IOMMU */ -@@ -66,6 +64,7 @@ int codec_hevc_setup_buffers(struct amvdec_session *sess, - - void codec_hevc_fill_mmu_map(struct amvdec_session *sess, - struct codec_hevc_common *comm, -- struct vb2_buffer *vb); -+ struct vb2_buffer *vb, -+ u32 is_10bit); - - #endif -diff --git a/drivers/staging/media/meson/vdec/codec_vp9.c b/drivers/staging/media/meson/vdec/codec_vp9.c -index 66a1168aa167..933fdc47ebf7 100644 ---- a/drivers/staging/media/meson/vdec/codec_vp9.c -+++ b/drivers/staging/media/meson/vdec/codec_vp9.c -@@ -458,12 +458,6 @@ struct codec_vp9 { - struct list_head ref_frames_list; - u32 frames_num; - -- /* In case of downsampling (decoding with FBC but outputting in NV12M), -- * we need to allocate additional buffers for FBC. -- */ -- void *fbc_buffer_vaddr[MAX_REF_PIC_NUM]; -- dma_addr_t fbc_buffer_paddr[MAX_REF_PIC_NUM]; -- - int ref_frame_map[REF_FRAMES]; - int next_ref_frame_map[REF_FRAMES]; - struct vp9_frame *frame_refs[REFS_PER_FRAME]; -@@ -901,11 +895,8 @@ static void codec_vp9_set_sao(struct amvdec_session *sess, - buf_y_paddr = - vb2_dma_contig_plane_dma_addr(vb, 0); - -- if (codec_hevc_use_fbc(sess->pixfmt_cap, vp9->is_10bit)) { -- val = amvdec_read_dos(core, HEVC_SAO_CTRL5) & ~0xff0200; -- amvdec_write_dos(core, HEVC_SAO_CTRL5, val); -+ if (codec_hevc_use_fbc(sess->pixfmt_cap, vp9->is_10bit)) - amvdec_write_dos(core, HEVC_CM_BODY_START_ADDR, buf_y_paddr); -- } - - if (sess->pixfmt_cap == V4L2_PIX_FMT_NV12M) { - buf_y_paddr = -@@ -921,7 +912,7 @@ static void codec_vp9_set_sao(struct amvdec_session *sess, - if (codec_hevc_use_mmu(core->platform->revision, sess->pixfmt_cap, - vp9->is_10bit)) { - amvdec_write_dos(core, HEVC_CM_HEADER_START_ADDR, -- vp9->common.mmu_header_paddr[vb->index]); -+ vb2_dma_contig_plane_dma_addr(vb, 0)); - /* use HEVC_CM_HEADER_START_ADDR */ - amvdec_write_dos_bits(core, HEVC_SAO_CTRL5, BIT(10)); - } -@@ -956,7 +947,8 @@ static void codec_vp9_set_sao(struct amvdec_session *sess, - val &= ~0x3; - if (!codec_hevc_use_fbc(sess->pixfmt_cap, vp9->is_10bit)) - val |= BIT(0); /* disable cm compression */ -- /* TOFIX: Handle Amlogic Framebuffer compression */ -+ else if (amvdec_is_dst_fbc(sess)) -+ val |= BIT(1); /* Disable double write */ - } - - amvdec_write_dos(core, HEVC_SAO_CTRL1, val); -@@ -1299,7 +1291,8 @@ static void codec_vp9_process_frame(struct amvdec_session *sess) - if (codec_hevc_use_mmu(core->platform->revision, sess->pixfmt_cap, - vp9->is_10bit)) - codec_hevc_fill_mmu_map(sess, &vp9->common, -- &vp9->cur_frame->vbuf->vb2_buf); -+ &vp9->cur_frame->vbuf->vb2_buf, -+ vp9->is_10bit); - - intra_only = param->p.show_frame ? 0 : param->p.intra_only; - --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0093-FROMLIST-v1-media-meson-vdec-handle-compressed-outpu.patch b/projects/Amlogic/patches/linux/amlogic-0093-FROMLIST-v1-media-meson-vdec-handle-compressed-outpu.patch deleted file mode 100644 index 88ac5f21b09..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0093-FROMLIST-v1-media-meson-vdec-handle-compressed-outpu.patch +++ /dev/null @@ -1,213 +0,0 @@ -From 0655dc777e609120507d26c0821e9009b31accaa Mon Sep 17 00:00:00 2001 -From: Maxime Jourdan -Date: Fri, 5 Jun 2020 07:25:37 +0000 -Subject: [PATCH 093/156] FROMLIST(v1): media: meson: vdec: handle compressed - output pixel format negociation with consumer - -Add the necessary to add support for negociating the compressed buffer -pixel format with the V4L2 M2M consumer, and allocating the right -buffers in this case. - -Until a proper mechanism exists to pass a modifier along the pixel format, -only the generic V4L2_PIX_FMT_YUV420_8BIT and V4L2_PIX_FMT_YUV420_10BIT -format are passed in v4l2_pix_format_mplane struct for consumer. - -Signed-off-by: Maxime Jourdan -Signed-off-by: Neil Armstrong ---- - .../media/meson/vdec/codec_hevc_common.c | 1 - - drivers/staging/media/meson/vdec/vdec.c | 46 +++++++++++++++++++ - drivers/staging/media/meson/vdec/vdec.h | 3 ++ - .../staging/media/meson/vdec/vdec_helpers.c | 23 ++++++++++ - .../staging/media/meson/vdec/vdec_platform.c | 9 ++-- - 5 files changed, 78 insertions(+), 4 deletions(-) - -diff --git a/drivers/staging/media/meson/vdec/codec_hevc_common.c b/drivers/staging/media/meson/vdec/codec_hevc_common.c -index 73dae40b3319..78fada7b8fa9 100644 ---- a/drivers/staging/media/meson/vdec/codec_hevc_common.c -+++ b/drivers/staging/media/meson/vdec/codec_hevc_common.c -@@ -10,7 +10,6 @@ - #include "vdec_helpers.h" - #include "hevc_regs.h" - --#define MMU_COMPRESS_HEADER_SIZE 0x48000 - #define MMU_MAP_SIZE 0x4800 - - const u16 vdec_hevc_parser_cmd[] = { -diff --git a/drivers/staging/media/meson/vdec/vdec.c b/drivers/staging/media/meson/vdec/vdec.c -index 3040136ceb77..9fb075f69cb9 100644 ---- a/drivers/staging/media/meson/vdec/vdec.c -+++ b/drivers/staging/media/meson/vdec/vdec.c -@@ -192,6 +192,7 @@ static int vdec_queue_setup(struct vb2_queue *q, unsigned int *num_buffers, - { - struct amvdec_session *sess = vb2_get_drv_priv(q); - u32 output_size = amvdec_get_output_size(sess); -+ u32 revision = sess->core->platform->revision; - - if (*num_planes) { - switch (q->type) { -@@ -215,6 +216,12 @@ static int vdec_queue_setup(struct vb2_queue *q, unsigned int *num_buffers, - sizes[2] < output_size / 4) - return -EINVAL; - break; -+ case V4L2_PIX_FMT_YUV420_8BIT: -+ case V4L2_PIX_FMT_YUV420_10BIT: -+ if (*num_planes != 1 || -+ sizes[0] < MMU_COMPRESS_HEADER_SIZE) -+ return -EINVAL; -+ break; - default: - return -EINVAL; - } -@@ -244,6 +251,24 @@ static int vdec_queue_setup(struct vb2_queue *q, unsigned int *num_buffers, - sizes[2] = output_size / 4; - *num_planes = 3; - break; -+ case V4L2_PIX_FMT_YUV420_8BIT: -+ if (revision >= VDEC_REVISION_G12A) -+ sizes[0] = MMU_COMPRESS_HEADER_SIZE; -+ else -+ sizes[0] = amvdec_amfbc_size(sess->width, -+ sess->height, -+ 0, 0); -+ *num_planes = 1; -+ break; -+ case V4L2_PIX_FMT_YUV420_10BIT: -+ if (revision >= VDEC_REVISION_G12A) -+ sizes[0] = MMU_COMPRESS_HEADER_SIZE; -+ else -+ sizes[0] = amvdec_amfbc_size(sess->width, -+ sess->height, -+ 1, 0); -+ *num_planes = 1; -+ break; - default: - return -EINVAL; - } -@@ -496,6 +521,7 @@ vdec_try_fmt_common(struct amvdec_session *sess, u32 size, - struct v4l2_plane_pix_format *pfmt = pixmp->plane_fmt; - const struct amvdec_format *fmts = sess->core->platform->formats; - const struct amvdec_format *fmt_out = NULL; -+ u32 revision = sess->core->platform->revision; - u32 output_size = 0; - - memset(pfmt[0].reserved, 0, sizeof(pfmt[0].reserved)); -@@ -548,6 +574,26 @@ vdec_try_fmt_common(struct amvdec_session *sess, u32 size, - pfmt[2].sizeimage = output_size / 2; - pfmt[2].bytesperline = ALIGN(pixmp->width, 32) / 2; - pixmp->num_planes = 3; -+ } else if (pixmp->pixelformat == V4L2_PIX_FMT_YUV420_8BIT) { -+ if (revision >= VDEC_REVISION_G12A) { -+ pfmt[0].sizeimage = MMU_COMPRESS_HEADER_SIZE; -+ } else { -+ pfmt[0].sizeimage = -+ amvdec_amfbc_size(pixmp->width, -+ pixmp->height, 0, 0); -+ pfmt[0].bytesperline = pixmp->width; -+ } -+ pixmp->num_planes = 1; -+ } else if (pixmp->pixelformat == V4L2_PIX_FMT_YUV420_10BIT) { -+ if (revision >= VDEC_REVISION_G12A) { -+ pfmt[0].sizeimage = MMU_COMPRESS_HEADER_SIZE; -+ } else { -+ pfmt[0].sizeimage = -+ amvdec_amfbc_size(pixmp->width, -+ pixmp->height, 1, 0); -+ pfmt[0].bytesperline = pixmp->width; -+ } -+ pixmp->num_planes = 1; - } - } - -diff --git a/drivers/staging/media/meson/vdec/vdec.h b/drivers/staging/media/meson/vdec/vdec.h -index e3e4af73447a..1412054a70c4 100644 ---- a/drivers/staging/media/meson/vdec/vdec.h -+++ b/drivers/staging/media/meson/vdec/vdec.h -@@ -17,6 +17,9 @@ - - #include "vdec_platform.h" - -+/* MMU header size for codecs using the IOMMU + FBC */ -+#define MMU_COMPRESS_HEADER_SIZE 0x48000 -+ - /* 32 buffers in 3-plane YUV420 */ - #define MAX_CANVAS (32 * 3) - -diff --git a/drivers/staging/media/meson/vdec/vdec_helpers.c b/drivers/staging/media/meson/vdec/vdec_helpers.c -index 320cac1ed03e..7166605b89ae 100644 ---- a/drivers/staging/media/meson/vdec/vdec_helpers.c -+++ b/drivers/staging/media/meson/vdec/vdec_helpers.c -@@ -299,6 +299,22 @@ static void dst_buf_done(struct amvdec_session *sess, - vbuf->vb2_buf.planes[1].bytesused = output_size / 4; - vbuf->vb2_buf.planes[2].bytesused = output_size / 4; - break; -+ case V4L2_PIX_FMT_YUV420_8BIT: -+ if (sess->core->platform->revision >= VDEC_REVISION_G12A) -+ vbuf->vb2_buf.planes[0].bytesused = -+ MMU_COMPRESS_HEADER_SIZE; -+ else -+ vbuf->vb2_buf.planes[0].bytesused = -+ amvdec_amfbc_size(sess->width, sess->height, 0, 0); -+ break; -+ case V4L2_PIX_FMT_YUV420_10BIT: -+ if (sess->core->platform->revision >= VDEC_REVISION_G12A) -+ vbuf->vb2_buf.planes[0].bytesused = -+ MMU_COMPRESS_HEADER_SIZE; -+ else -+ vbuf->vb2_buf.planes[0].bytesused = -+ amvdec_amfbc_size(sess->width, sess->height, 1, 0); -+ break; - } - - vbuf->vb2_buf.timestamp = timestamp; -@@ -478,6 +494,13 @@ void amvdec_src_change(struct amvdec_session *sess, u32 width, - sess->status = STATUS_NEEDS_RESUME; - sess->bitdepth = bitdepth; - -+ if (sess->pixfmt_cap == V4L2_PIX_FMT_YUV420_8BIT && -+ bitdepth == 10) -+ sess->pixfmt_cap = V4L2_PIX_FMT_YUV420_10BIT; -+ else if (sess->pixfmt_cap == V4L2_PIX_FMT_YUV420_10BIT && -+ bitdepth == 8) -+ sess->pixfmt_cap = V4L2_PIX_FMT_YUV420_8BIT; -+ - dev_dbg(sess->core->dev, "Res. changed (%ux%u), DPB %u, bitdepth %u\n", - width, height, dpb_size, bitdepth); - v4l2_event_queue_fh(&sess->fh, &ev); -diff --git a/drivers/staging/media/meson/vdec/vdec_platform.c b/drivers/staging/media/meson/vdec/vdec_platform.c -index eabbebab2da2..efc090d2a3bb 100644 ---- a/drivers/staging/media/meson/vdec/vdec_platform.c -+++ b/drivers/staging/media/meson/vdec/vdec_platform.c -@@ -61,7 +61,8 @@ static const struct amvdec_format vdec_formats_gxl[] = { - .vdec_ops = &vdec_hevc_ops, - .codec_ops = &codec_vp9_ops, - .firmware_path = "meson/vdec/gxl_vp9.bin", -- .pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 }, -+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420_8BIT, -+ V4L2_PIX_FMT_YUV420_10BIT, 0 }, - .flags = V4L2_FMT_FLAG_COMPRESSED | - V4L2_FMT_FLAG_DYN_RESOLUTION, - }, { -@@ -149,7 +150,8 @@ static const struct amvdec_format vdec_formats_g12a[] = { - .vdec_ops = &vdec_hevc_ops, - .codec_ops = &codec_vp9_ops, - .firmware_path = "meson/vdec/g12a_vp9.bin", -- .pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 }, -+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420_8BIT, -+ V4L2_PIX_FMT_YUV420_10BIT, 0 }, - .flags = V4L2_FMT_FLAG_COMPRESSED | - V4L2_FMT_FLAG_DYN_RESOLUTION, - }, { -@@ -199,7 +201,8 @@ static const struct amvdec_format vdec_formats_sm1[] = { - .vdec_ops = &vdec_hevc_ops, - .codec_ops = &codec_vp9_ops, - .firmware_path = "meson/vdec/sm1_vp9_mmu.bin", -- .pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 }, -+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420_8BIT, -+ V4L2_PIX_FMT_YUV420_10BIT, 0 }, - .flags = V4L2_FMT_FLAG_COMPRESSED | - V4L2_FMT_FLAG_DYN_RESOLUTION, - }, { --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0094-FROMLIST-v2-soc-amlogic-meson-gx-socinfo-Fix-S905X3-.patch b/projects/Amlogic/patches/linux/amlogic-0094-FROMLIST-v2-soc-amlogic-meson-gx-socinfo-Fix-S905X3-.patch deleted file mode 100644 index bac144123d5..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0094-FROMLIST-v2-soc-amlogic-meson-gx-socinfo-Fix-S905X3-.patch +++ /dev/null @@ -1,45 +0,0 @@ -From ea81daeb5a1ce9b81d35d9dc617e162de680d07f Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Wed, 3 Jun 2020 08:24:11 +0000 -Subject: [PATCH 094/156] FROMLIST(v2): soc: amlogic: meson-gx-socinfo: Fix - S905X3 and S905D3 ID's - -Correct the SoC revision and package bits/mask values for S905D3/X3 to detect -a wider range of observed SoC IDs, and tweak sort order for A311D/S922X. - -S905X3 05 0000 0101 (SEI610 initial devices) -S905X3 10 0001 0000 (ODROID-C4 and recent Android boxes) -S905X3 50 0101 0000 (SEI610 later revisions) -S905D3 04 0000 0100 (VIM3L devices in kernelci) -S905D3 b0 1011 0000 (VIM3L initial production) - -Fixes commit c9cc9bec36d0 ("soc: amlogic: meson-gx-socinfo: Add SM1 and S905X3 IDs") -Suggested-by: Neil Armstrong -Signed-off-by: Christian Hewitt ---- - drivers/soc/amlogic/meson-gx-socinfo.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/drivers/soc/amlogic/meson-gx-socinfo.c b/drivers/soc/amlogic/meson-gx-socinfo.c -index 01fc0d20a70d..6f54bd832c8b 100644 ---- a/drivers/soc/amlogic/meson-gx-socinfo.c -+++ b/drivers/soc/amlogic/meson-gx-socinfo.c -@@ -66,10 +66,12 @@ static const struct meson_gx_package_id { - { "A113D", 0x25, 0x22, 0xff }, - { "S905D2", 0x28, 0x10, 0xf0 }, - { "S905X2", 0x28, 0x40, 0xf0 }, -- { "S922X", 0x29, 0x40, 0xf0 }, - { "A311D", 0x29, 0x10, 0xf0 }, -- { "S905X3", 0x2b, 0x5, 0xf }, -- { "S905D3", 0x2b, 0xb0, 0xf0 }, -+ { "S922X", 0x29, 0x40, 0xf0 }, -+ { "S905D3", 0x2b, 0x4, 0xf5 }, -+ { "S905X3", 0x2b, 0x5, 0xf5 }, -+ { "S905X3", 0x2b, 0x10, 0x3f }, -+ { "S905D3", 0x2b, 0x30, 0x3f }, - { "A113L", 0x2c, 0x0, 0xf8 }, - }; - --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0095-FROMLIST-v1-spi-dt-bindings-amlogic-meson-gx-spicc-F.patch b/projects/Amlogic/patches/linux/amlogic-0095-FROMLIST-v1-spi-dt-bindings-amlogic-meson-gx-spicc-F.patch deleted file mode 100644 index eb3e9b0d947..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0095-FROMLIST-v1-spi-dt-bindings-amlogic-meson-gx-spicc-F.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 67d20391c1642ff88deb07493f25b920610e7698 Mon Sep 17 00:00:00 2001 -From: Alexander Stein -Date: Wed, 10 Jun 2020 10:43:03 +0000 -Subject: [PATCH 095/156] FROMLIST(v1): spi: dt-bindings: amlogic, - meson-gx-spicc: Fix schema for meson-g12a - -This fixes the following warning during dtbs_check: - -spi@13000: clock-names: Additional items are not allowed ('pclk' was unexpected) -spi@13000: clock-names: ['core', 'pclk'] is too long -spi@13000: clocks: [[2, 23], [2, 258]] is too long -spi@15000: clock-names: Additional items are not allowed ('pclk' was unexpected) -spi@15000: clock-names: ['core', 'pclk'] is too long -spi@15000: clocks: [[2, 29], [2, 261]] is too long - -Conditional schema properties don't overwrite others. Instead of -restrictions have to be validated. So general clock amount is 1-2 and -depending on the actual device type limit the mount to 1 or 2. - -Signed-off-by: Alexander Stein ---- - .../bindings/spi/amlogic,meson-gx-spicc.yaml | 26 ++++++++++++------- - 1 file changed, 17 insertions(+), 9 deletions(-) - -diff --git a/Documentation/devicetree/bindings/spi/amlogic,meson-gx-spicc.yaml b/Documentation/devicetree/bindings/spi/amlogic,meson-gx-spicc.yaml -index 9147df29022a..38efb50081e3 100644 ---- a/Documentation/devicetree/bindings/spi/amlogic,meson-gx-spicc.yaml -+++ b/Documentation/devicetree/bindings/spi/amlogic,meson-gx-spicc.yaml -@@ -34,12 +34,15 @@ properties: - maxItems: 1 - - clocks: -- maxItems: 1 -+ minItems: 1 -+ maxItems: 2 -+ items: -+ - description: controller register bus clock -+ - description: baud rate generator and delay control clock - - clock-names: -- description: input clock for the baud rate generator -- items: -- - const: core -+ minItems: 1 -+ maxItems: 2 - - if: - properties: -@@ -51,17 +54,22 @@ if: - then: - properties: - clocks: -- contains: -- items: -- - description: controller register bus clock -- - description: baud rate generator and delay control clock -+ minItems: 2 - - clock-names: -- minItems: 2 - items: - - const: core - - const: pclk - -+else: -+ properties: -+ clocks: -+ maxItems: 1 -+ -+ clock-names: -+ items: -+ - const: core -+ - required: - - compatible - - reg --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0096-FROMLIST-v1-pinctrl-meson-fix-drive-strength-registe.patch b/projects/Amlogic/patches/linux/amlogic-0096-FROMLIST-v1-pinctrl-meson-fix-drive-strength-registe.patch deleted file mode 100644 index be8362f2a43..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0096-FROMLIST-v1-pinctrl-meson-fix-drive-strength-registe.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 4c48fcf5e06f9b09a9813473542c1e596b7b5b09 Mon Sep 17 00:00:00 2001 -From: Hyeonki Hong -Date: Wed, 10 Jun 2020 10:44:22 +0000 -Subject: [PATCH 096/156] FROMLIST(v1): pinctrl: meson: fix drive strength - register and bit calculation - -If a GPIO bank has greater than 16 pins, PAD_DS_REG is split into two -registers. However, when register and bit were calculated, the first -register defined in the bank was used, and the bit was calculated based -on the first pin. This causes problems in setting the driving strength. - -Solved the problem by changing the bit using a mask and selecting the -next register when the bit exceeds 15. - -Signed-off-by: Hyeonki Hong ---- - drivers/pinctrl/meson/pinctrl-meson.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c -index bbc919bef2bf..ef66239b7df5 100644 ---- a/drivers/pinctrl/meson/pinctrl-meson.c -+++ b/drivers/pinctrl/meson/pinctrl-meson.c -@@ -98,6 +98,13 @@ static void meson_calc_reg_and_bit(struct meson_bank *bank, unsigned int pin, - - *reg = desc->reg * 4; - *bit = desc->bit + pin - bank->first; -+ -+ if (reg_type == REG_DS) { -+ if (*bit > 15) { -+ *bit &= 0xf; -+ *reg += 4; -+ } -+ } - } - - static int meson_get_groups_count(struct pinctrl_dev *pcdev) --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0097-FROMLIST-v1-dt-bindings-clk-g12a-clkc-Add-NNA-CLK-So.patch b/projects/Amlogic/patches/linux/amlogic-0097-FROMLIST-v1-dt-bindings-clk-g12a-clkc-Add-NNA-CLK-So.patch deleted file mode 100644 index 912e20f1679..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0097-FROMLIST-v1-dt-bindings-clk-g12a-clkc-Add-NNA-CLK-So.patch +++ /dev/null @@ -1,29 +0,0 @@ -From bbafff079c99e3c2a6a76865aa669ffd47b34bbe Mon Sep 17 00:00:00 2001 -From: Dmitry Shmidt -Date: Wed, 10 Jun 2020 10:45:33 +0000 -Subject: [PATCH 097/156] FROMLIST(v1): dt-bindings: clk: g12a-clkc: Add NNA - CLK Source clock IDs - -This adds the Neural Network Accelerator IP source clocks. - -Signed-off-by: Dmitry Shmidt -Signed-off-by: Neil Armstrong ---- - include/dt-bindings/clock/g12a-clkc.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/include/dt-bindings/clock/g12a-clkc.h b/include/dt-bindings/clock/g12a-clkc.h -index b0d65d73db96..40d49940d8a8 100644 ---- a/include/dt-bindings/clock/g12a-clkc.h -+++ b/include/dt-bindings/clock/g12a-clkc.h -@@ -145,5 +145,7 @@ - #define CLKID_CPU3_CLK 255 - #define CLKID_SPICC0_SCLK 258 - #define CLKID_SPICC1_SCLK 261 -+#define CLKID_NNA_AXI_CLK 264 -+#define CLKID_NNA_CORE_CLK 267 - - #endif /* __G12A_CLKC_H */ --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0098-FROMLIST-v1-clk-meson-g12a-Add-support-for-NNA-CLK-s.patch b/projects/Amlogic/patches/linux/amlogic-0098-FROMLIST-v1-clk-meson-g12a-Add-support-for-NNA-CLK-s.patch deleted file mode 100644 index b03732da7a7..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0098-FROMLIST-v1-clk-meson-g12a-Add-support-for-NNA-CLK-s.patch +++ /dev/null @@ -1,192 +0,0 @@ -From c2cc8facc6ce7341053855b004d21ea51ea311e6 Mon Sep 17 00:00:00 2001 -From: Dmitry Shmidt -Date: Wed, 10 Jun 2020 10:46:33 +0000 -Subject: [PATCH 098/156] FROMLIST(v1): clk: meson: g12a: Add support for NNA - CLK source clocks - -This adds the Neural Network Accelerator source clocks hierarchy, it's -2 simple composite clocks to feed the AXI interface and the Core of -the Neural Network Accelerator IP. - -This IP is only present on the Amlogic SM1 SoCs family. - -Signed-off-by: Dmitry Shmidt -Signed-off-by: Neil Armstrong ---- - drivers/clk/meson/g12a.c | 119 +++++++++++++++++++++++++++++++++++++++ - drivers/clk/meson/g12a.h | 7 ++- - 2 files changed, 125 insertions(+), 1 deletion(-) - -diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c -index fad616cac01e..5c2e5cedca96 100644 ---- a/drivers/clk/meson/g12a.c -+++ b/drivers/clk/meson/g12a.c -@@ -3967,6 +3967,113 @@ static struct clk_regmap g12a_spicc1_sclk = { - }, - }; - -+/* Neural Network Accelerator source clock */ -+ -+static const struct clk_parent_data nna_clk_parent_data[] = { -+ { .fw_name = "xtal", }, -+ { .hw = &g12a_gp0_pll.hw, }, -+ { .hw = &g12a_hifi_pll.hw, }, -+ { .hw = &g12a_fclk_div2p5.hw, }, -+ { .hw = &g12a_fclk_div3.hw, }, -+ { .hw = &g12a_fclk_div4.hw, }, -+ { .hw = &g12a_fclk_div5.hw, }, -+ { .hw = &g12a_fclk_div7.hw }, -+}; -+ -+static struct clk_regmap sm1_nna_axi_clk_sel = { -+ .data = &(struct clk_regmap_mux_data){ -+ .offset = HHI_NNA_CLK_CNTL, -+ .mask = 7, -+ .shift = 9, -+ }, -+ .hw.init = &(struct clk_init_data){ -+ .name = "nna_axi_clk_sel", -+ .ops = &clk_regmap_mux_ops, -+ .parent_data = nna_clk_parent_data, -+ .num_parents = ARRAY_SIZE(nna_clk_parent_data), -+ }, -+}; -+ -+static struct clk_regmap sm1_nna_axi_clk_div = { -+ .data = &(struct clk_regmap_div_data){ -+ .offset = HHI_NNA_CLK_CNTL, -+ .shift = 0, -+ .width = 7, -+ }, -+ .hw.init = &(struct clk_init_data){ -+ .name = "nna_axi_clk_div", -+ .ops = &clk_regmap_divider_ops, -+ .parent_hws = (const struct clk_hw *[]) { -+ &sm1_nna_axi_clk_sel.hw -+ }, -+ .num_parents = 1, -+ .flags = CLK_SET_RATE_PARENT, -+ }, -+}; -+ -+static struct clk_regmap sm1_nna_axi_clk = { -+ .data = &(struct clk_regmap_gate_data){ -+ .offset = HHI_NNA_CLK_CNTL, -+ .bit_idx = 8, -+ }, -+ .hw.init = &(struct clk_init_data){ -+ .name = "nna_axi_clk", -+ .ops = &clk_regmap_gate_ops, -+ .parent_hws = (const struct clk_hw *[]) { -+ &sm1_nna_axi_clk_div.hw -+ }, -+ .num_parents = 1, -+ .flags = CLK_SET_RATE_PARENT, -+ }, -+}; -+ -+static struct clk_regmap sm1_nna_core_clk_sel = { -+ .data = &(struct clk_regmap_mux_data){ -+ .offset = HHI_NNA_CLK_CNTL, -+ .mask = 7, -+ .shift = 25, -+ }, -+ .hw.init = &(struct clk_init_data){ -+ .name = "nna_core_clk_sel", -+ .ops = &clk_regmap_mux_ops, -+ .parent_data = nna_clk_parent_data, -+ .num_parents = ARRAY_SIZE(nna_clk_parent_data), -+ }, -+}; -+ -+static struct clk_regmap sm1_nna_core_clk_div = { -+ .data = &(struct clk_regmap_div_data){ -+ .offset = HHI_NNA_CLK_CNTL, -+ .shift = 16, -+ .width = 7, -+ }, -+ .hw.init = &(struct clk_init_data){ -+ .name = "nna_core_clk_div", -+ .ops = &clk_regmap_divider_ops, -+ .parent_hws = (const struct clk_hw *[]) { -+ &sm1_nna_core_clk_sel.hw -+ }, -+ .num_parents = 1, -+ .flags = CLK_SET_RATE_PARENT, -+ }, -+}; -+ -+static struct clk_regmap sm1_nna_core_clk = { -+ .data = &(struct clk_regmap_gate_data){ -+ .offset = HHI_NNA_CLK_CNTL, -+ .bit_idx = 24, -+ }, -+ .hw.init = &(struct clk_init_data){ -+ .name = "nna_core_clk", -+ .ops = &clk_regmap_gate_ops, -+ .parent_hws = (const struct clk_hw *[]) { -+ &sm1_nna_core_clk_div.hw -+ }, -+ .num_parents = 1, -+ .flags = CLK_SET_RATE_PARENT, -+ }, -+}; -+ - #define MESON_GATE(_name, _reg, _bit) \ - MESON_PCLK(_name, _reg, _bit, &g12a_clk81.hw) - -@@ -4765,6 +4872,12 @@ static struct clk_hw_onecell_data sm1_hw_onecell_data = { - [CLKID_SPICC1_SCLK_SEL] = &g12a_spicc1_sclk_sel.hw, - [CLKID_SPICC1_SCLK_DIV] = &g12a_spicc1_sclk_div.hw, - [CLKID_SPICC1_SCLK] = &g12a_spicc1_sclk.hw, -+ [CLKID_NNA_AXI_CLK_SEL] = &sm1_nna_axi_clk_sel.hw, -+ [CLKID_NNA_AXI_CLK_DIV] = &sm1_nna_axi_clk_div.hw, -+ [CLKID_NNA_AXI_CLK] = &sm1_nna_axi_clk.hw, -+ [CLKID_NNA_CORE_CLK_SEL] = &sm1_nna_core_clk_sel.hw, -+ [CLKID_NNA_CORE_CLK_DIV] = &sm1_nna_core_clk_div.hw, -+ [CLKID_NNA_CORE_CLK] = &sm1_nna_core_clk.hw, - [NR_CLKS] = NULL, - }, - .num = NR_CLKS, -@@ -5006,6 +5119,12 @@ static struct clk_regmap *const g12a_clk_regmaps[] = { - &g12a_spicc1_sclk_sel, - &g12a_spicc1_sclk_div, - &g12a_spicc1_sclk, -+ &sm1_nna_axi_clk_sel, -+ &sm1_nna_axi_clk_div, -+ &sm1_nna_axi_clk, -+ &sm1_nna_core_clk_sel, -+ &sm1_nna_core_clk_div, -+ &sm1_nna_core_clk, - }; - - static const struct reg_sequence g12a_init_regs[] = { -diff --git a/drivers/clk/meson/g12a.h b/drivers/clk/meson/g12a.h -index a8852556836e..69b6a69549c7 100644 ---- a/drivers/clk/meson/g12a.h -+++ b/drivers/clk/meson/g12a.h -@@ -70,6 +70,7 @@ - #define HHI_MALI_CLK_CNTL 0x1b0 - #define HHI_VPU_CLKC_CNTL 0x1b4 - #define HHI_VPU_CLK_CNTL 0x1bC -+#define HHI_NNA_CLK_CNTL 0x1C8 - #define HHI_HDMI_CLK_CNTL 0x1CC - #define HHI_VDEC_CLK_CNTL 0x1E0 - #define HHI_VDEC2_CLK_CNTL 0x1E4 -@@ -259,8 +260,12 @@ - #define CLKID_SPICC0_SCLK_DIV 257 - #define CLKID_SPICC1_SCLK_SEL 259 - #define CLKID_SPICC1_SCLK_DIV 260 -+#define CLKID_NNA_AXI_CLK_SEL 262 -+#define CLKID_NNA_AXI_CLK_DIV 263 -+#define CLKID_NNA_CORE_CLK_SEL 265 -+#define CLKID_NNA_CORE_CLK_DIV 266 - --#define NR_CLKS 262 -+#define NR_CLKS 268 - - /* include the CLKIDs that have been made part of the DT binding */ - #include --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0099-FROMLIST-v1-drm-panfrost-Fix-inbalance-of-devfreq-re.patch b/projects/Amlogic/patches/linux/amlogic-0099-FROMLIST-v1-drm-panfrost-Fix-inbalance-of-devfreq-re.patch deleted file mode 100644 index 1b4ca38fc49..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0099-FROMLIST-v1-drm-panfrost-Fix-inbalance-of-devfreq-re.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 9c77da7eb1a3c460bf26072c5e2d97c12e39719d Mon Sep 17 00:00:00 2001 -From: Steven Price -Date: Sat, 13 Jun 2020 14:33:31 +0000 -Subject: [PATCH 099/156] FROMLIST(v1): drm/panfrost: Fix inbalance of devfreq - record_busy/idle() - -The calls to panfrost_devfreq_record_busy() and -panfrost_devfreq_record_idle() must be balanced to ensure that the -devfreq utilisation is correctly reported. But there are two cases where -this doesn't work correctly. - -In panfrost_job_hw_submit() if pm_runtime_get_sync() fails or the -WARN_ON() fires then no call to panfrost_devfreq_record_busy() is made, -but when the job times out the corresponding _record_idle() call is -still made in panfrost_job_timedout(). Move the call up to ensure that -it always happens. - -Secondly panfrost_job_timedout() only makes a single call to -panfrost_devfreq_record_idle() even if it is cleaning up multiple jobs. -Move the call inside the loop to ensure that the number of -_record_idle() calls matches the number of _record_busy() calls. - -Fixes: 9e62b885f715 ("drm/panfrost: Simplify devfreq utilisation tracking") -Signed-off-by: Steven Price ---- - drivers/gpu/drm/panfrost/panfrost_job.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c -index 7914b1570841..f9519afca29d 100644 ---- a/drivers/gpu/drm/panfrost/panfrost_job.c -+++ b/drivers/gpu/drm/panfrost/panfrost_job.c -@@ -145,6 +145,8 @@ static void panfrost_job_hw_submit(struct panfrost_job *job, int js) - u64 jc_head = job->jc; - int ret; - -+ panfrost_devfreq_record_busy(pfdev); -+ - ret = pm_runtime_get_sync(pfdev->dev); - if (ret < 0) - return; -@@ -155,7 +157,6 @@ static void panfrost_job_hw_submit(struct panfrost_job *job, int js) - } - - cfg = panfrost_mmu_as_get(pfdev, &job->file_priv->mmu); -- panfrost_devfreq_record_busy(pfdev); - - job_write(pfdev, JS_HEAD_NEXT_LO(js), jc_head & 0xFFFFFFFF); - job_write(pfdev, JS_HEAD_NEXT_HI(js), jc_head >> 32); -@@ -410,12 +411,12 @@ static void panfrost_job_timedout(struct drm_sched_job *sched_job) - for (i = 0; i < NUM_JOB_SLOTS; i++) { - if (pfdev->jobs[i]) { - pm_runtime_put_noidle(pfdev->dev); -+ panfrost_devfreq_record_idle(pfdev); - pfdev->jobs[i] = NULL; - } - } - spin_unlock_irqrestore(&pfdev->js->job_lock, flags); - -- panfrost_devfreq_record_idle(pfdev); - panfrost_device_reset(pfdev); - - for (i = 0; i < NUM_JOB_SLOTS; i++) --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0100-FROMLIST-v2-drm-panfrost-Fix-runtime-PM-imbalance-on.patch b/projects/Amlogic/patches/linux/amlogic-0100-FROMLIST-v2-drm-panfrost-Fix-runtime-PM-imbalance-on.patch deleted file mode 100644 index 2bf36fda9e9..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0100-FROMLIST-v2-drm-panfrost-Fix-runtime-PM-imbalance-on.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 547852a05722df1440c08405cf0bf39d607708cd Mon Sep 17 00:00:00 2001 -From: Dinghao Liu -Date: Sat, 13 Jun 2020 14:37:29 +0000 -Subject: [PATCH 100/156] FROMLIST(v2): drm/panfrost: Fix runtime PM imbalance - on error - -The caller expects panfrost_job_hw_submit() to increase -runtime PM usage counter. The refcount decrement on the -error branch of WARN_ON() will break the counter balance -and needs to be removed. - -Signed-off-by: Dinghao Liu ---- - drivers/gpu/drm/panfrost/panfrost_job.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c -index f9519afca29d..c6242fe34840 100644 ---- a/drivers/gpu/drm/panfrost/panfrost_job.c -+++ b/drivers/gpu/drm/panfrost/panfrost_job.c -@@ -152,7 +152,6 @@ static void panfrost_job_hw_submit(struct panfrost_job *job, int js) - return; - - if (WARN_ON(job_read(pfdev, JS_COMMAND_NEXT(js)))) { -- pm_runtime_put_sync_autosuspend(pfdev->dev); - return; - } - --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0101-FROMLIST-v1-drm-panfrost-Fix-runtime-PM-imbalance-in.patch b/projects/Amlogic/patches/linux/amlogic-0101-FROMLIST-v1-drm-panfrost-Fix-runtime-PM-imbalance-in.patch deleted file mode 100644 index 14e95cb2aa5..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0101-FROMLIST-v1-drm-panfrost-Fix-runtime-PM-imbalance-in.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 0563987b75b9240d569b033740a51ee5a7d5b84c Mon Sep 17 00:00:00 2001 -From: Dinghao Liu -Date: Sat, 13 Jun 2020 14:38:16 +0000 -Subject: [PATCH 101/156] FROMLIST(v1): drm/panfrost: Fix runtime PM imbalance - in panfrost_perfcnt_enable_locked - -pm_runtime_get_sync() increments the runtime PM usage counter even -when it returns an error code. Thus a pairing decrement is needed on -the error handling path to keep the counter balanced. For all error -paths after pm_runtime_get_sync(), things are the same. - -Signed-off-by: Dinghao Liu ---- - drivers/gpu/drm/panfrost/panfrost_perfcnt.c | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/drivers/gpu/drm/panfrost/panfrost_perfcnt.c b/drivers/gpu/drm/panfrost/panfrost_perfcnt.c -index 6913578d5aa7..d99bd2f0503a 100644 ---- a/drivers/gpu/drm/panfrost/panfrost_perfcnt.c -+++ b/drivers/gpu/drm/panfrost/panfrost_perfcnt.c -@@ -83,11 +83,13 @@ static int panfrost_perfcnt_enable_locked(struct panfrost_device *pfdev, - - ret = pm_runtime_get_sync(pfdev->dev); - if (ret < 0) -- return ret; -+ goto err_pm_get; - - bo = drm_gem_shmem_create(pfdev->ddev, perfcnt->bosize); -- if (IS_ERR(bo)) -- return PTR_ERR(bo); -+ if (IS_ERR(bo)) { -+ ret = PTR_ERR(bo); -+ goto err_pm_get; -+ } - - /* Map the perfcnt buf in the address space attached to file_priv. */ - ret = panfrost_gem_open(&bo->base, file_priv); -@@ -168,6 +170,8 @@ static int panfrost_perfcnt_enable_locked(struct panfrost_device *pfdev, - panfrost_gem_close(&bo->base, file_priv); - err_put_bo: - drm_gem_object_put_unlocked(&bo->base); -+err_pm_get: -+ pm_runtime_put_noidle(pfdev->dev); - return ret; - } - --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0102-FROMLIST-v3-drm-panfrost-Reduce-the-amount-of-logs-o.patch b/projects/Amlogic/patches/linux/amlogic-0102-FROMLIST-v3-drm-panfrost-Reduce-the-amount-of-logs-o.patch deleted file mode 100644 index 09b39144d9a..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0102-FROMLIST-v3-drm-panfrost-Reduce-the-amount-of-logs-o.patch +++ /dev/null @@ -1,48 +0,0 @@ -From b12fd7ac6e20cf68cb6a023ffb2ab14c1c904f52 Mon Sep 17 00:00:00 2001 -From: Krzysztof Kozlowski -Date: Sat, 13 Jun 2020 14:39:51 +0000 -Subject: [PATCH 102/156] FROMLIST(v3): drm/panfrost: Reduce the amount of logs - on deferred probe - -There is no point to print deferred probe (and its failures to get -resources) as an error. Also there is no need to print regulator errors -twice. - -In case of multiple probe tries this would pollute the dmesg. - -Reviewed-by: Steven Price -Signed-off-by: Krzysztof Kozlowski ---- - drivers/gpu/drm/panfrost/panfrost_device.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c -index 8136babd3ba9..b172087eee6a 100644 ---- a/drivers/gpu/drm/panfrost/panfrost_device.c -+++ b/drivers/gpu/drm/panfrost/panfrost_device.c -@@ -101,7 +101,9 @@ static int panfrost_regulator_init(struct panfrost_device *pfdev) - pfdev->comp->num_supplies, - pfdev->regulators); - if (ret < 0) { -- dev_err(pfdev->dev, "failed to get regulators: %d\n", ret); -+ if (ret != -EPROBE_DEFER) -+ dev_err(pfdev->dev, "failed to get regulators: %d\n", -+ ret); - return ret; - } - -@@ -213,10 +215,8 @@ int panfrost_device_init(struct panfrost_device *pfdev) - } - - err = panfrost_regulator_init(pfdev); -- if (err) { -- dev_err(pfdev->dev, "regulator init failed %d\n", err); -+ if (err) - goto err_out0; -- } - - err = panfrost_reset_init(pfdev); - if (err) { --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0103-FROMLIST-v2-drm-panfrost-Use-kvfree-to-free-bo-sgts.patch b/projects/Amlogic/patches/linux/amlogic-0103-FROMLIST-v2-drm-panfrost-Use-kvfree-to-free-bo-sgts.patch deleted file mode 100644 index 4e81e1c276d..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0103-FROMLIST-v2-drm-panfrost-Use-kvfree-to-free-bo-sgts.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 24b0524ce9d0aaf78aab68d6e18089579983e13a Mon Sep 17 00:00:00 2001 -From: Denis Efremov -Date: Sat, 13 Jun 2020 14:18:32 +0000 -Subject: [PATCH 103/156] FROMLIST(v2): drm/panfrost: Use kvfree() to free - bo->sgts - -Use kvfree() to free bo->sgts, because the memory is allocated with -kvmalloc_array() in panfrost_mmu_map_fault_addr(). - -Fixes: 187d2929206e ("drm/panfrost: Add support for GPU heap allocations") -Cc: stable@vger.kernel.org -Signed-off-by: Denis Efremov ---- - drivers/gpu/drm/panfrost/panfrost_gem.c | 2 +- - drivers/gpu/drm/panfrost/panfrost_mmu.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/drivers/gpu/drm/panfrost/panfrost_gem.c b/drivers/gpu/drm/panfrost/panfrost_gem.c -index 17b654e1eb94..556181ea4a07 100644 ---- a/drivers/gpu/drm/panfrost/panfrost_gem.c -+++ b/drivers/gpu/drm/panfrost/panfrost_gem.c -@@ -46,7 +46,7 @@ static void panfrost_gem_free_object(struct drm_gem_object *obj) - sg_free_table(&bo->sgts[i]); - } - } -- kfree(bo->sgts); -+ kvfree(bo->sgts); - } - - drm_gem_shmem_free_object(obj); -diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c -index ed28aeba6d59..3c8ae7411c80 100644 ---- a/drivers/gpu/drm/panfrost/panfrost_mmu.c -+++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c -@@ -486,7 +486,7 @@ static int panfrost_mmu_map_fault_addr(struct panfrost_device *pfdev, int as, - pages = kvmalloc_array(bo->base.base.size >> PAGE_SHIFT, - sizeof(struct page *), GFP_KERNEL | __GFP_ZERO); - if (!pages) { -- kfree(bo->sgts); -+ kvfree(bo->sgts); - bo->sgts = NULL; - mutex_unlock(&bo->base.pages_lock); - ret = -ENOMEM; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0104-FROMLIST-v1-panfrost-Add-compatible-string-for-bifro.patch b/projects/Amlogic/patches/linux/amlogic-0104-FROMLIST-v1-panfrost-Add-compatible-string-for-bifro.patch deleted file mode 100644 index 4db2f41e81b..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0104-FROMLIST-v1-panfrost-Add-compatible-string-for-bifro.patch +++ /dev/null @@ -1,28 +0,0 @@ -From e53ab2f38542e37c4173e0956e5234bf5a519c0b Mon Sep 17 00:00:00 2001 -From: Tomeu Vizoso -Date: Thu, 12 Mar 2020 15:50:13 +0000 -Subject: [PATCH 104/156] FROMLIST(v1): panfrost: Add compatible string for - bifrost - -Mesa now supports some Bifrost devices, so enable it. - -Signed-off-by: Tomeu Vizoso ---- - drivers/gpu/drm/panfrost/panfrost_drv.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c -index 882fecc33fdb..8ff8e140f91e 100644 ---- a/drivers/gpu/drm/panfrost/panfrost_drv.c -+++ b/drivers/gpu/drm/panfrost/panfrost_drv.c -@@ -677,6 +677,7 @@ static const struct of_device_id dt_match[] = { - { .compatible = "arm,mali-t830", .data = &default_data, }, - { .compatible = "arm,mali-t860", .data = &default_data, }, - { .compatible = "arm,mali-t880", .data = &default_data, }, -+ { .compatible = "arm,mali-bifrost", .data = &default_data, }, - {} - }; - MODULE_DEVICE_TABLE(of, dt_match); --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0105-FROMLIST-v1-panfrost-Make-sure-GPU-is-powered-on-whe.patch b/projects/Amlogic/patches/linux/amlogic-0105-FROMLIST-v1-panfrost-Make-sure-GPU-is-powered-on-whe.patch deleted file mode 100644 index 2457f426369..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0105-FROMLIST-v1-panfrost-Make-sure-GPU-is-powered-on-whe.patch +++ /dev/null @@ -1,51 +0,0 @@ -From d913c32904ab41dd93e4e36c58a197c976e2d2a1 Mon Sep 17 00:00:00 2001 -From: Tomeu Vizoso -Date: Wed, 10 Jun 2020 09:46:00 +0200 -Subject: [PATCH 105/156] FROMLIST(v1): panfrost: Make sure GPU is powered on - when reading GPU_LATEST_FLUSH_ID - -Bifrost devices do support the flush reduction feature, so on first job -submit we were trying to read the register while still powered off. - -If the GPU is powered off, the feature doesn't bring any benefit, so -don't try to read. - -Signed-off-by: Tomeu Vizoso ---- - drivers/gpu/drm/panfrost/panfrost_gpu.c | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) - -diff --git a/drivers/gpu/drm/panfrost/panfrost_gpu.c b/drivers/gpu/drm/panfrost/panfrost_gpu.c -index f2c1ddc41a9b..e0f190e43813 100644 ---- a/drivers/gpu/drm/panfrost/panfrost_gpu.c -+++ b/drivers/gpu/drm/panfrost/panfrost_gpu.c -@@ -10,6 +10,7 @@ - #include - #include - #include -+#include - - #include "panfrost_device.h" - #include "panfrost_features.h" -@@ -368,7 +369,16 @@ void panfrost_gpu_fini(struct panfrost_device *pfdev) - - u32 panfrost_gpu_get_latest_flush_id(struct panfrost_device *pfdev) - { -- if (panfrost_has_hw_feature(pfdev, HW_FEATURE_FLUSH_REDUCTION)) -- return gpu_read(pfdev, GPU_LATEST_FLUSH_ID); -+ u32 flush_id; -+ -+ if (panfrost_has_hw_feature(pfdev, HW_FEATURE_FLUSH_REDUCTION)) { -+ /* Flush reduction only makes sense when the GPU is kept powered on between jobs */ -+ if (pm_runtime_get_if_in_use(pfdev->dev)) { -+ flush_id = gpu_read(pfdev, GPU_LATEST_FLUSH_ID); -+ pm_runtime_put(pfdev->dev); -+ return flush_id; -+ } -+ } -+ - return 0; - } --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0106-FROMLIST-v1-arm64-dts-meson-add-missing-gxl-rng-cloc.patch b/projects/Amlogic/patches/linux/amlogic-0106-FROMLIST-v1-arm64-dts-meson-add-missing-gxl-rng-cloc.patch deleted file mode 100644 index 8d76b85e263..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0106-FROMLIST-v1-arm64-dts-meson-add-missing-gxl-rng-cloc.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 486f528652a716c18a7459f8d164de5f50fef26b Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Wed, 17 Jun 2020 14:33:26 +0000 -Subject: [PATCH 106/156] FROMLIST(v1): arm64: dts: meson: add missing gxl rng - clock - -The peripheral clock of the RNG is missing for gxl while it is present -for gxbb. - -Fixes: 1b3f6d148692 ("ARM64: dts: meson-gx: add clock CLKID_RNG0 to hwrng node") -Signed-off-by: Jerome Brunet ---- - arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi -index 4e0d8ef97f99..1f7db598025d 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi -@@ -332,6 +332,11 @@ - }; - }; - -+&hwrng { -+ clocks = <&clkc CLKID_RNG0>; -+ clock-names = "core"; -+}; -+ - &i2c_A { - clocks = <&clkc CLKID_I2C>; - }; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0107-FROMLIST-v1-ASoC-meson-imply-acodec-glue-on-axg-soun.patch b/projects/Amlogic/patches/linux/amlogic-0107-FROMLIST-v1-ASoC-meson-imply-acodec-glue-on-axg-soun.patch deleted file mode 100644 index 840c0476124..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0107-FROMLIST-v1-ASoC-meson-imply-acodec-glue-on-axg-soun.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 1af0e4f3f5ca5b0651e1f3879d461c952faa797e Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Mon, 30 Mar 2020 17:39:04 +0200 -Subject: [PATCH 107/156] FROMLIST(v1): ASoC: meson: imply acodec glue on axg - sound card - -Signed-off-by: Jerome Brunet ---- - sound/soc/meson/Kconfig | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/sound/soc/meson/Kconfig b/sound/soc/meson/Kconfig -index 8b6295283989..363dc3b1bbe4 100644 ---- a/sound/soc/meson/Kconfig -+++ b/sound/soc/meson/Kconfig -@@ -68,6 +68,7 @@ config SND_MESON_AXG_SOUND_CARD - imply SND_MESON_AXG_SPDIFOUT - imply SND_MESON_AXG_SPDIFIN - imply SND_MESON_AXG_PDM -+ imply SND_MESON_G12A_TOACODEC - imply SND_MESON_G12A_TOHDMITX if DRM_MESON_DW_HDMI - help - Select Y or M to add support for the AXG SoC sound card --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0108-FROMLIST-v1-dt-bindings-net-dwmac-meson-Add-a-compat.patch b/projects/Amlogic/patches/linux/amlogic-0108-FROMLIST-v1-dt-bindings-net-dwmac-meson-Add-a-compat.patch deleted file mode 100644 index e186a3df757..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0108-FROMLIST-v1-dt-bindings-net-dwmac-meson-Add-a-compat.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 1621acb09a49c3ad804a0f555021cee1f82016f1 Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 29 Jun 2020 15:36:46 +0000 -Subject: [PATCH 108/156] FROMLIST(v1): dt-bindings: net: dwmac-meson: Add a - compatible string for G12A onwards - -Amlogic Meson G12A, G12B and SM1 have the same (at least as far as we -know at the time of writing) PRG_ETHERNET glue register implementation. -This implementation however is slightly different from AXG as it now has -an undocument "auto cali idx val" register in PRG_ETH1[17:16] which -seems to be related to RGMII Ethernet. - -Add a compatible string for G12A and newer so the new registers can be -used. - -Signed-off-by: Martin Blumenstingl ---- - Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml b/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml -index 64c20c92c07d..85fefe3a0444 100644 ---- a/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml -+++ b/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml -@@ -22,6 +22,7 @@ select: - - amlogic,meson8m2-dwmac - - amlogic,meson-gxbb-dwmac - - amlogic,meson-axg-dwmac -+ - amlogic,meson-g12a-dwmac - required: - - compatible - -@@ -36,6 +37,7 @@ allOf: - - amlogic,meson8m2-dwmac - - amlogic,meson-gxbb-dwmac - - amlogic,meson-axg-dwmac -+ - amlogic,meson-g12a-dwmac - - then: - properties: -@@ -95,6 +97,7 @@ properties: - - amlogic,meson8m2-dwmac - - amlogic,meson-gxbb-dwmac - - amlogic,meson-axg-dwmac -+ - amlogic,meson-g12a-dwmac - contains: - enum: - - snps,dwmac-3.70a --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0109-FROMLIST-v1-net-stmmac-dwmac-meson8b-add-a-compatibl.patch b/projects/Amlogic/patches/linux/amlogic-0109-FROMLIST-v1-net-stmmac-dwmac-meson8b-add-a-compatibl.patch deleted file mode 100644 index 337dee27c9b..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0109-FROMLIST-v1-net-stmmac-dwmac-meson8b-add-a-compatibl.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 76b9a338e5d1c0be6d21dc51b309fcbdb95b245c Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 29 Jun 2020 15:37:37 +0000 -Subject: [PATCH 109/156] FROMLIST(v1): net: stmmac: dwmac-meson8b: add a - compatible string for G12A SoCs - -Amlogic Meson G12A, G12B and SM1 have the same (at least as far as we -know at the time of writing) PRG_ETHERNET glue register implementation. -This implementation however is slightly different from AXG as it now has -an undocument "auto cali idx val" register in PRG_ETH1[17:16] which -seems to be related to RGMII Ethernet. - -Add a new compatible string for G12A SoCs so the logic for this new -register can be implemented in the future. - -Signed-off-by: Martin Blumenstingl ---- - drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -index 234e8b6816ce..544bc621146c 100644 ---- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -@@ -491,6 +491,10 @@ static const struct of_device_id meson8b_dwmac_match[] = { - .compatible = "amlogic,meson-axg-dwmac", - .data = &meson_axg_dwmac_data, - }, -+ { -+ .compatible = "amlogic,meson-g12a-dwmac", -+ .data = &meson_axg_dwmac_data, -+ }, - { } - }; - MODULE_DEVICE_TABLE(of, meson8b_dwmac_match); --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0110-FROMLIST-v1-net-stmmac-dwmac-meson8b-use-clk_parent_.patch b/projects/Amlogic/patches/linux/amlogic-0110-FROMLIST-v1-net-stmmac-dwmac-meson8b-use-clk_parent_.patch deleted file mode 100644 index 3b0b174e301..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0110-FROMLIST-v1-net-stmmac-dwmac-meson8b-use-clk_parent_.patch +++ /dev/null @@ -1,143 +0,0 @@ -From f2a2a00a158fdf93010b6890d590a100871fc9d3 Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Tue, 30 Jun 2020 00:17:01 +0000 -Subject: [PATCH 110/156] FROMLIST(v1): net: stmmac: dwmac-meson8b: use - clk_parent_data for clock registration - -Simplify meson8b_init_rgmii_tx_clk() by using struct clk_parent_data to -initialize the clock parents. No functional changes intended. - -Signed-off-by: Martin Blumenstingl ---- - .../ethernet/stmicro/stmmac/dwmac-meson8b.c | 49 +++++++------------ - 1 file changed, 17 insertions(+), 32 deletions(-) - -diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -index 544bc621146c..5afcf05bbf9c 100644 ---- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -@@ -69,8 +69,6 @@ - */ - #define PRG_ETH0_ADJ_SKEW GENMASK(24, 20) - --#define MUX_CLK_NUM_PARENTS 2 -- - struct meson8b_dwmac; - - struct meson8b_dwmac_data { -@@ -110,12 +108,12 @@ static void meson8b_dwmac_mask_bits(struct meson8b_dwmac *dwmac, u32 reg, - - static struct clk *meson8b_dwmac_register_clk(struct meson8b_dwmac *dwmac, - const char *name_suffix, -- const char **parent_names, -+ const struct clk_parent_data *parents, - int num_parents, - const struct clk_ops *ops, - struct clk_hw *hw) - { -- struct clk_init_data init; -+ struct clk_init_data init = { }; - char clk_name[32]; - - snprintf(clk_name, sizeof(clk_name), "%s#%s", dev_name(dwmac->dev), -@@ -124,7 +122,7 @@ static struct clk *meson8b_dwmac_register_clk(struct meson8b_dwmac *dwmac, - init.name = clk_name; - init.ops = ops; - init.flags = CLK_SET_RATE_PARENT; -- init.parent_names = parent_names; -+ init.parent_data = parents; - init.num_parents = num_parents; - - hw->init = &init; -@@ -134,11 +132,12 @@ static struct clk *meson8b_dwmac_register_clk(struct meson8b_dwmac *dwmac, - - static int meson8b_init_rgmii_tx_clk(struct meson8b_dwmac *dwmac) - { -- int i, ret; - struct clk *clk; - struct device *dev = dwmac->dev; -- const char *parent_name, *mux_parent_names[MUX_CLK_NUM_PARENTS]; -- struct meson8b_dwmac_clk_configs *clk_configs; -+ static const struct clk_parent_data mux_parents[] = { -+ { .fw_name = "clkin0", }, -+ { .fw_name = "clkin1", }, -+ }; - static const struct clk_div_table div_table[] = { - { .div = 2, .val = 2, }, - { .div = 3, .val = 3, }, -@@ -148,62 +147,48 @@ static int meson8b_init_rgmii_tx_clk(struct meson8b_dwmac *dwmac) - { .div = 7, .val = 7, }, - { /* end of array */ } - }; -+ struct meson8b_dwmac_clk_configs *clk_configs; -+ struct clk_parent_data parent_data = { }; - - clk_configs = devm_kzalloc(dev, sizeof(*clk_configs), GFP_KERNEL); - if (!clk_configs) - return -ENOMEM; - -- /* get the mux parents from DT */ -- for (i = 0; i < MUX_CLK_NUM_PARENTS; i++) { -- char name[16]; -- -- snprintf(name, sizeof(name), "clkin%d", i); -- clk = devm_clk_get(dev, name); -- if (IS_ERR(clk)) { -- ret = PTR_ERR(clk); -- if (ret != -EPROBE_DEFER) -- dev_err(dev, "Missing clock %s\n", name); -- return ret; -- } -- -- mux_parent_names[i] = __clk_get_name(clk); -- } -- - clk_configs->m250_mux.reg = dwmac->regs + PRG_ETH0; - clk_configs->m250_mux.shift = PRG_ETH0_CLK_M250_SEL_SHIFT; - clk_configs->m250_mux.mask = PRG_ETH0_CLK_M250_SEL_MASK; -- clk = meson8b_dwmac_register_clk(dwmac, "m250_sel", mux_parent_names, -- MUX_CLK_NUM_PARENTS, &clk_mux_ops, -+ clk = meson8b_dwmac_register_clk(dwmac, "m250_sel", mux_parents, -+ ARRAY_SIZE(mux_parents), &clk_mux_ops, - &clk_configs->m250_mux.hw); - if (WARN_ON(IS_ERR(clk))) - return PTR_ERR(clk); - -- parent_name = __clk_get_name(clk); -+ parent_data.hw = &clk_configs->m250_mux.hw; - clk_configs->m250_div.reg = dwmac->regs + PRG_ETH0; - clk_configs->m250_div.shift = PRG_ETH0_CLK_M250_DIV_SHIFT; - clk_configs->m250_div.width = PRG_ETH0_CLK_M250_DIV_WIDTH; - clk_configs->m250_div.table = div_table; - clk_configs->m250_div.flags = CLK_DIVIDER_ALLOW_ZERO | - CLK_DIVIDER_ROUND_CLOSEST; -- clk = meson8b_dwmac_register_clk(dwmac, "m250_div", &parent_name, 1, -+ clk = meson8b_dwmac_register_clk(dwmac, "m250_div", &parent_data, 1, - &clk_divider_ops, - &clk_configs->m250_div.hw); - if (WARN_ON(IS_ERR(clk))) - return PTR_ERR(clk); - -- parent_name = __clk_get_name(clk); -+ parent_data.hw = &clk_configs->m250_div.hw; - clk_configs->fixed_div2.mult = 1; - clk_configs->fixed_div2.div = 2; -- clk = meson8b_dwmac_register_clk(dwmac, "fixed_div2", &parent_name, 1, -+ clk = meson8b_dwmac_register_clk(dwmac, "fixed_div2", &parent_data, 1, - &clk_fixed_factor_ops, - &clk_configs->fixed_div2.hw); - if (WARN_ON(IS_ERR(clk))) - return PTR_ERR(clk); - -- parent_name = __clk_get_name(clk); -+ parent_data.hw = &clk_configs->fixed_div2.hw; - clk_configs->rgmii_tx_en.reg = dwmac->regs + PRG_ETH0; - clk_configs->rgmii_tx_en.bit_idx = PRG_ETH0_RGMII_TX_CLK_EN; -- clk = meson8b_dwmac_register_clk(dwmac, "rgmii_tx_en", &parent_name, 1, -+ clk = meson8b_dwmac_register_clk(dwmac, "rgmii_tx_en", &parent_data, 1, - &clk_gate_ops, - &clk_configs->rgmii_tx_en.hw); - if (WARN_ON(IS_ERR(clk))) --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0111-FROMLIST-v1-arm64-dts-meson-odroid-n2-enable-audio-l.patch b/projects/Amlogic/patches/linux/amlogic-0111-FROMLIST-v1-arm64-dts-meson-odroid-n2-enable-audio-l.patch deleted file mode 100644 index e12774436e1..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0111-FROMLIST-v1-arm64-dts-meson-odroid-n2-enable-audio-l.patch +++ /dev/null @@ -1,124 +0,0 @@ -From bc2508a27c990f670eb0a5bb7be37f0edefc21cd Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Thu, 2 Jul 2020 13:32:19 +0000 -Subject: [PATCH 111/156] FROMLIST(v1): arm64: dts: meson: odroid-n2: enable - audio loopback - -Add capture pcm interfaces and loopback routes to the odroid-n2 - -Signed-off-by: Jerome Brunet ---- - .../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 65 +++++++++++++++++-- - 1 file changed, 61 insertions(+), 4 deletions(-) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts -index 169ea283d4ee..d4421ad164bd 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts -@@ -209,11 +209,28 @@ - sound { - compatible = "amlogic,axg-sound-card"; - model = "G12B-ODROID-N2"; -- audio-aux-devs = <&tdmout_b>; -+ audio-aux-devs = <&tdmout_b>, <&tdmin_a>, <&tdmin_b>, -+ <&tdmin_c>, <&tdmin_lb>; - audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", - "TDMOUT_B IN 1", "FRDDR_B OUT 1", - "TDMOUT_B IN 2", "FRDDR_C OUT 1", -- "TDM_B Playback", "TDMOUT_B OUT"; -+ "TDM_B Playback", "TDMOUT_B OUT", -+ "TDMIN_A IN 4", "TDM_B Loopback", -+ "TDMIN_B IN 4", "TDM_B Loopback", -+ "TDMIN_C IN 4", "TDM_B Loopback", -+ "TDMIN_LB IN 1", "TDM_B Loopback", -+ "TODDR_A IN 0", "TDMIN_A OUT", -+ "TODDR_B IN 0", "TDMIN_A OUT", -+ "TODDR_C IN 0", "TDMIN_A OUT", -+ "TODDR_A IN 1", "TDMIN_B OUT", -+ "TODDR_B IN 1", "TDMIN_B OUT", -+ "TODDR_C IN 1", "TDMIN_B OUT", -+ "TODDR_A IN 2", "TDMIN_C OUT", -+ "TODDR_B IN 2", "TDMIN_C OUT", -+ "TODDR_C IN 2", "TDMIN_C OUT", -+ "TODDR_A IN 6", "TDMIN_LB OUT", -+ "TODDR_B IN 6", "TDMIN_LB OUT", -+ "TODDR_C IN 6", "TDMIN_LB OUT"; - - assigned-clocks = <&clkc CLKID_MPLL2>, - <&clkc CLKID_MPLL0>, -@@ -236,8 +253,20 @@ - sound-dai = <&frddr_c>; - }; - -- /* 8ch hdmi interface */ - dai-link-3 { -+ sound-dai = <&toddr_a>; -+ }; -+ -+ dai-link-4 { -+ sound-dai = <&toddr_b>; -+ }; -+ -+ dai-link-5 { -+ sound-dai = <&toddr_c>; -+ }; -+ -+ /* 8ch hdmi interface */ -+ dai-link-6 { - sound-dai = <&tdmif_b>; - dai-format = "i2s"; - dai-tdm-slot-tx-mask-0 = <1 1>; -@@ -252,7 +281,7 @@ - }; - - /* hdmi glue */ -- dai-link-4 { -+ dai-link-7 { - sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; - - codec { -@@ -476,6 +505,22 @@ - status = "okay"; - }; - -+&tdmin_a { -+ status = "okay"; -+}; -+ -+&tdmin_b { -+ status = "okay"; -+}; -+ -+&tdmin_c { -+ status = "okay"; -+}; -+ -+&tdmin_lb { -+ status = "okay"; -+}; -+ - &tdmout_b { - status = "okay"; - }; -@@ -484,6 +529,18 @@ - status = "okay"; - }; - -+&toddr_a { -+ status = "okay"; -+}; -+ -+&toddr_b { -+ status = "okay"; -+}; -+ -+&toddr_c { -+ status = "okay"; -+}; -+ - &uart_AO { - status = "okay"; - pinctrl-0 = <&uart_ao_a_pins>; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0112-FROMLIST-v1-arm64-dts-meson-odroid-n2-add-jack-audio.patch b/projects/Amlogic/patches/linux/amlogic-0112-FROMLIST-v1-arm64-dts-meson-odroid-n2-add-jack-audio.patch deleted file mode 100644 index 374f75df7b9..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0112-FROMLIST-v1-arm64-dts-meson-odroid-n2-add-jack-audio.patch +++ /dev/null @@ -1,170 +0,0 @@ -From 049d25c4b0274849dafe2a7a30dda3dc8f09a70f Mon Sep 17 00:00:00 2001 -From: Jerome Brunet -Date: Thu, 2 Jul 2020 13:40:26 +0000 -Subject: [PATCH 112/156] FROMLIST(v1): arm64: dts: meson: odroid-n2: add jack - audio output support - -Add support for audio on jack socket of the odroid-n2 - -Signed-off-by: Jerome Brunet ---- - .../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 79 +++++++++++++++++-- - 1 file changed, 74 insertions(+), 5 deletions(-) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts -index d4421ad164bd..34fffa6d859d 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts -@@ -9,6 +9,7 @@ - #include "meson-g12b-s922x.dtsi" - #include - #include -+#include - #include - - / { -@@ -20,6 +21,14 @@ - ethernet0 = ðmac; - }; - -+ dioo2133: audio-amplifier-0 { -+ compatible = "simple-audio-amplifier"; -+ enable-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>; -+ VCC-supply = <&vcc_5v>; -+ sound-name-prefix = "U19"; -+ status = "okay"; -+ }; -+ - chosen { - stdout-path = "serial0:115200n8"; - }; -@@ -209,16 +218,26 @@ - sound { - compatible = "amlogic,axg-sound-card"; - model = "G12B-ODROID-N2"; -- audio-aux-devs = <&tdmout_b>, <&tdmin_a>, <&tdmin_b>, -- <&tdmin_c>, <&tdmin_lb>; -+ audio-widgets = "Line", "Lineout"; -+ audio-aux-devs = <&tdmout_b>, <&tdmout_c>, <&tdmin_a>, -+ <&tdmin_b>, <&tdmin_c>, <&tdmin_lb>, -+ <&dioo2133>; - audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", - "TDMOUT_B IN 1", "FRDDR_B OUT 1", - "TDMOUT_B IN 2", "FRDDR_C OUT 1", - "TDM_B Playback", "TDMOUT_B OUT", -+ "TDMOUT_C IN 0", "FRDDR_A OUT 2", -+ "TDMOUT_C IN 1", "FRDDR_B OUT 2", -+ "TDMOUT_C IN 2", "FRDDR_C OUT 2", -+ "TDM_C Playback", "TDMOUT_C OUT", - "TDMIN_A IN 4", "TDM_B Loopback", - "TDMIN_B IN 4", "TDM_B Loopback", - "TDMIN_C IN 4", "TDM_B Loopback", - "TDMIN_LB IN 1", "TDM_B Loopback", -+ "TDMIN_A IN 5", "TDM_C Loopback", -+ "TDMIN_B IN 5", "TDM_C Loopback", -+ "TDMIN_C IN 5", "TDM_C Loopback", -+ "TDMIN_LB IN 2", "TDM_C Loopback", - "TODDR_A IN 0", "TDMIN_A OUT", - "TODDR_B IN 0", "TDMIN_A OUT", - "TODDR_C IN 0", "TDMIN_A OUT", -@@ -230,7 +249,11 @@ - "TODDR_C IN 2", "TDMIN_C OUT", - "TODDR_A IN 6", "TDMIN_LB OUT", - "TODDR_B IN 6", "TDMIN_LB OUT", -- "TODDR_C IN 6", "TDMIN_LB OUT"; -+ "TODDR_C IN 6", "TDMIN_LB OUT", -+ "U19 INL", "ACODEC LOLP", -+ "U19 INR", "ACODEC LORP", -+ "Lineout", "U19 OUTL", -+ "Lineout", "U19 OUTR"; - - assigned-clocks = <&clkc CLKID_MPLL2>, - <&clkc CLKID_MPLL0>, -@@ -275,22 +298,56 @@ - dai-tdm-slot-tx-mask-3 = <1 1>; - mclk-fs = <256>; - -- codec { -+ codec-0 { - sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; - }; -+ -+ codec-1 { -+ sound-dai = <&toacodec TOACODEC_IN_B>; -+ }; - }; - -- /* hdmi glue */ -+ /* i2s jack output interface */ - dai-link-7 { -+ sound-dai = <&tdmif_c>; -+ dai-format = "i2s"; -+ dai-tdm-slot-tx-mask-0 = <1 1>; -+ mclk-fs = <256>; -+ -+ codec-0 { -+ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_C>; -+ }; -+ -+ codec-1 { -+ sound-dai = <&toacodec TOACODEC_IN_C>; -+ }; -+ }; -+ -+ /* hdmi glue */ -+ dai-link-8 { - sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; - - codec { - sound-dai = <&hdmi_tx>; - }; - }; -+ -+ /* acodec glue */ -+ dai-link-9 { -+ sound-dai = <&toacodec TOACODEC_OUT>; -+ -+ codec { -+ sound-dai = <&acodec>; -+ }; -+ }; - }; - }; - -+&acodec { -+ AVDD-supply = <&vddao_1v8>; -+ status = "okay"; -+}; -+ - &arb { - status = "okay"; - }; -@@ -505,6 +562,10 @@ - status = "okay"; - }; - -+&tdmif_c { -+ status = "okay"; -+}; -+ - &tdmin_a { - status = "okay"; - }; -@@ -525,6 +586,14 @@ - status = "okay"; - }; - -+&tdmout_c { -+ status = "okay"; -+}; -+ -+&toacodec { -+ status = "okay"; -+}; -+ - &tohdmitx { - status = "okay"; - }; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0113-FROMLIST-v1-tty-serial-meson_uart-Init-port-lock-ear.patch b/projects/Amlogic/patches/linux/amlogic-0113-FROMLIST-v1-tty-serial-meson_uart-Init-port-lock-ear.patch deleted file mode 100644 index 9e5f350abde..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0113-FROMLIST-v1-tty-serial-meson_uart-Init-port-lock-ear.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 08202a28756ad3c1d085c9d5f0078e8e044b4fe4 Mon Sep 17 00:00:00 2001 -From: Marc Zyngier -Date: Sun, 5 Jul 2020 09:52:32 +0000 -Subject: [PATCH 113/156] FROMLIST(v1): tty: serial: meson_uart: Init port lock - early - -The meson UART driver triggers a lockdep splat at boot time, due -to the new expectation that the driver has to initialize the -per-port spinlock itself. - -It remains unclear why a double initialization of the port -spinlock is a desirable outcome, but in the meantime let's -fix the splat. - -Fixes: a3cb39d258ef ("serial: core: Allow detach and attach serial device for console") -Cc: Andy Shevchenko -Cc: Greg Kroah-Hartman -Signed-off-by: Marc Zyngier ---- - drivers/tty/serial/meson_uart.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c -index d2c08b760f83..386e39c90628 100644 ---- a/drivers/tty/serial/meson_uart.c -+++ b/drivers/tty/serial/meson_uart.c -@@ -759,6 +759,9 @@ static int meson_uart_probe(struct platform_device *pdev) - if (ret) - return ret; - -+ /* Init the spinlock early in case this is the console */ -+ spin_lock_init(&port->lock); -+ - port->iotype = UPIO_MEM; - port->mapbase = res_mem->start; - port->mapsize = resource_size(res_mem); --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0114-REVERT-ASoC-soc-pcm-dpcm-fix-playback-capture-checks.patch b/projects/Amlogic/patches/linux/amlogic-0114-REVERT-ASoC-soc-pcm-dpcm-fix-playback-capture-checks.patch deleted file mode 100644 index 63efbc4d499..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0114-REVERT-ASoC-soc-pcm-dpcm-fix-playback-capture-checks.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 981a429881b2101ee54a523755492b941abecba6 Mon Sep 17 00:00:00 2001 -From: chewitt -Date: Mon, 29 Jun 2020 15:34:00 +0000 -Subject: [PATCH 114/156] REVERT: ASoC: soc-pcm: dpcm: fix playback/capture - checks - -This reverts commit 1bb707fbfd5c246028d76b8f11a19dfd118d6306 which -breaks G12A audio due to wrong merge of a 5.8 change. ---- - sound/soc/soc-pcm.c | 44 ++++++++++---------------------------------- - 1 file changed, 10 insertions(+), 34 deletions(-) - -diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c -index 39ce61c5b874..1f302de44052 100644 ---- a/sound/soc/soc-pcm.c -+++ b/sound/soc/soc-pcm.c -@@ -2908,44 +2908,20 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num) - struct snd_pcm *pcm; - char new_name[64]; - int ret = 0, playback = 0, capture = 0; -- int stream; - int i; - -- if (rtd->dai_link->dynamic && rtd->num_cpus > 1) { -- dev_err(rtd->dev, -- "DPCM doesn't support Multi CPU for Front-Ends yet\n"); -- return -EINVAL; -- } -- - if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) { -- if (rtd->dai_link->dpcm_playback) { -- stream = SNDRV_PCM_STREAM_PLAYBACK; -- -- for_each_rtd_cpu_dais(rtd, i, cpu_dai) -- if (!snd_soc_dai_stream_valid(cpu_dai, -- stream)) { -- dev_err(rtd->card->dev, -- "CPU DAI %s for rtd %s does not support playback\n", -- cpu_dai->name, -- rtd->dai_link->stream_name); -- return -EINVAL; -- } -- playback = 1; -- } -- if (rtd->dai_link->dpcm_capture) { -- stream = SNDRV_PCM_STREAM_CAPTURE; -- -- for_each_rtd_cpu_dais(rtd, i, cpu_dai) -- if (!snd_soc_dai_stream_valid(cpu_dai, -- stream)) { -- dev_err(rtd->card->dev, -- "CPU DAI %s for rtd %s does not support capture\n", -- cpu_dai->name, -- rtd->dai_link->stream_name); -- return -EINVAL; -- } -- capture = 1; -+ cpu_dai = asoc_rtd_to_cpu(rtd, 0); -+ if (rtd->num_cpus > 1) { -+ dev_err(rtd->dev, -+ "DPCM doesn't support Multi CPU yet\n"); -+ return -EINVAL; - } -+ -+ playback = rtd->dai_link->dpcm_playback && -+ snd_soc_dai_stream_valid(cpu_dai, SNDRV_PCM_STREAM_PLAYBACK); -+ capture = rtd->dai_link->dpcm_capture && -+ snd_soc_dai_stream_valid(cpu_dai, SNDRV_PCM_STREAM_CAPTURE); - } else { - /* Adapt stream for codec2codec links */ - int cpu_capture = rtd->dai_link->params ? --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0115-WIP-drm-panfrost-add-support-for-custom-soft-reset-o.patch b/projects/Amlogic/patches/linux/amlogic-0115-WIP-drm-panfrost-add-support-for-custom-soft-reset-o.patch deleted file mode 100644 index fef2de5776d..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0115-WIP-drm-panfrost-add-support-for-custom-soft-reset-o.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 35341275c39d2c98dc8da80621c81084697ae5b7 Mon Sep 17 00:00:00 2001 -From: Neil Armstrong -Date: Fri, 13 Mar 2020 09:44:50 +0000 -Subject: [PATCH 115/156] WIP: drm/panfrost: add support for custom soft-reset - on Amlogic G12 - -Signed-off-by: Neil Armstrong ---- - drivers/gpu/drm/panfrost/panfrost_gpu.c | 13 ++++++++++++- - drivers/gpu/drm/panfrost/panfrost_regs.h | 4 ++++ - 2 files changed, 16 insertions(+), 1 deletion(-) - -diff --git a/drivers/gpu/drm/panfrost/panfrost_gpu.c b/drivers/gpu/drm/panfrost/panfrost_gpu.c -index e0f190e43813..40cd9728ccbd 100644 ---- a/drivers/gpu/drm/panfrost/panfrost_gpu.c -+++ b/drivers/gpu/drm/panfrost/panfrost_gpu.c -@@ -9,8 +9,10 @@ - #include - #include - #include -+#include - #include - #include -+#include - - #include "panfrost_device.h" - #include "panfrost_features.h" -@@ -60,7 +62,16 @@ int panfrost_gpu_soft_reset(struct panfrost_device *pfdev) - - gpu_write(pfdev, GPU_INT_MASK, 0); - gpu_write(pfdev, GPU_INT_CLEAR, GPU_IRQ_RESET_COMPLETED); -- gpu_write(pfdev, GPU_CMD, GPU_CMD_SOFT_RESET); -+ -+ if (of_device_is_compatible(pfdev->dev->of_node, "amlogic,meson-g12a-mali")) { -+ reset_control_assert(pfdev->rstc); -+ udelay(10); -+ reset_control_deassert(pfdev->rstc); -+ -+ gpu_write(pfdev, GPU_PWR_KEY, 0x2968A819); -+ gpu_write(pfdev, GPU_PWR_OVERRIDE1, 0xfff | (0x20 << 16)); -+ } else -+ gpu_write(pfdev, GPU_CMD, GPU_CMD_SOFT_RESET); - - ret = readl_relaxed_poll_timeout(pfdev->iomem + GPU_INT_RAWSTAT, - val, val & GPU_IRQ_RESET_COMPLETED, 100, 10000); -diff --git a/drivers/gpu/drm/panfrost/panfrost_regs.h b/drivers/gpu/drm/panfrost/panfrost_regs.h -index ea38ac60581c..4f4ed17d0262 100644 ---- a/drivers/gpu/drm/panfrost/panfrost_regs.h -+++ b/drivers/gpu/drm/panfrost/panfrost_regs.h -@@ -51,6 +51,10 @@ - #define GPU_STATUS 0x34 - #define GPU_STATUS_PRFCNT_ACTIVE BIT(2) - #define GPU_LATEST_FLUSH_ID 0x38 -+#define GPU_PWR_KEY 0x050 /* (WO) Power manager key register */ -+#define GPU_PWR_OVERRIDE0 0x054 /* (RW) Power manager override settings */ -+#define GPU_PWR_OVERRIDE1 0x058 /* (RW) Power manager override settings */ -+ - #define GPU_FAULT_STATUS 0x3C - #define GPU_FAULT_ADDRESS_LO 0x40 - #define GPU_FAULT_ADDRESS_HI 0x44 --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0118-WIP-dt-bindings-arm-amlogic-add-support-for-the-WeTe.patch b/projects/Amlogic/patches/linux/amlogic-0118-WIP-dt-bindings-arm-amlogic-add-support-for-the-WeTe.patch deleted file mode 100644 index 0a42bc4bdad..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0118-WIP-dt-bindings-arm-amlogic-add-support-for-the-WeTe.patch +++ /dev/null @@ -1,45 +0,0 @@ -From c3ce4d9a0b6e5c0230ddc6a9294eb25387ad338d Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Thu, 14 May 2020 04:05:10 +0000 -Subject: [PATCH 118/156] WIP: dt-bindings: arm: amlogic: add support for the - WeTek Core 2 - -The WeTek Core 2 is a commercial Android device based on the Amlogic Q200 -reference design using the S912-H chipset. Specs: - -3GB DDR3 RAM -32GB eMMC storage -10/100 Ethernet using Realtex RTL8152 -802.11 a/b/g/n/ac + BT 4.1 HS sdio wireless module (AP6356S) -2x single colour LEDs to indicate power -1x power button -1x reset button on the underside of the box -HDMI 2.0 (4k@60p) video -Composite video + 2-channel audio output on 3.5mm jack -S/PDIF audio output -2x USB 2.0 ports -1x USB OTG port (internal) -1x micro SD card slot -UART pins (internal) -IR Sensor - -Signed-off-by: Christian Hewitt ---- - Documentation/devicetree/bindings/arm/amlogic.yaml | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml -index db35e0d0134c..d06c77233e4d 100644 ---- a/Documentation/devicetree/bindings/arm/amlogic.yaml -+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml -@@ -121,6 +121,7 @@ properties: - - libretech,aml-s912-pc - - nexbox,a1 - - tronsmart,vega-s96 -+ - wetek,core2 - - const: amlogic,s912 - - const: amlogic,meson-gxm - --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0119-WIP-arm64-dts-meson-add-support-for-the-WeTek-Core-2.patch b/projects/Amlogic/patches/linux/amlogic-0119-WIP-arm64-dts-meson-add-support-for-the-WeTek-Core-2.patch deleted file mode 100644 index de0e3b580b9..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0119-WIP-arm64-dts-meson-add-support-for-the-WeTek-Core-2.patch +++ /dev/null @@ -1,132 +0,0 @@ -From d925973e7033a5f0a75927d3ebe3ad1c17afa965 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Thu, 14 May 2020 03:57:23 +0000 -Subject: [PATCH 119/156] WIP: arm64: dts: meson: add support for the WeTek - Core 2 - -The WeTek Core2 is a commercial device based on the Amlogic Q200 reference -design but with the following differences: - -- 3GB RAM, 32GB eMMC -- Blue and Red LEDs used to signal on/off status -- uart_AO can be accessed after opening the case; soldering required -- USB OTG is not accessible (inside the case) - -Signed-off-by: Christian Hewitt ---- - arch/arm64/boot/dts/amlogic/Makefile | 1 + - .../dts/amlogic/meson-gxm-wetek-core2.dts | 90 +++++++++++++++++++ - 2 files changed, 91 insertions(+) - create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-wetek-core2.dts - -diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile -index 5cac4d1d487d..4e2239ffcaa5 100644 ---- a/arch/arm64/boot/dts/amlogic/Makefile -+++ b/arch/arm64/boot/dts/amlogic/Makefile -@@ -41,6 +41,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q201.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-gxm-rbox-pro.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-libretech-pc.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb -+dtb-$(CONFIG_ARCH_MESON) += meson-gxm-wetek-core2.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-sm1-sei610.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-sm1-khadas-vim3l.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-c4.dtb -diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-wetek-core2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-wetek-core2.dts -new file mode 100644 -index 000000000000..4b973dc1e559 ---- /dev/null -+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-wetek-core2.dts -@@ -0,0 +1,90 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+/* -+ * Copyright (c) 2020 Christian Hewitt -+ */ -+ -+/dts-v1/; -+ -+#include "meson-gxm.dtsi" -+#include "meson-gx-p23x-q20x.dtsi" -+#include -+#include -+ -+/ { -+ compatible = "wetek,core2", "amlogic,s912", "amlogic,meson-gxm"; -+ model = "WeTek Core 2"; -+ -+ memory@0 { -+ device_type = "memory"; -+ reg = <0x0 0x0 0x0 0x80000000>; /* 2 GiB or 3 GiB */ -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ -+ blue { -+ color = ; -+ function = LED_FUNCTION_STATUS; -+ gpios = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ }; -+ -+ adc-keys { -+ compatible = "adc-keys"; -+ io-channels = <&saradc 0>; -+ io-channel-names = "buttons"; -+ keyup-threshold-microvolt = <1710000>; -+ -+ button-update { -+ label = "update"; -+ linux,code = ; -+ press-threshold-microvolt = <10000>; -+ }; -+ }; -+ -+ gpio-keys-polled { -+ compatible = "gpio-keys-polled"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ poll-interval = <100>; -+ -+ button-power { -+ label = "power"; -+ linux,code = ; -+ gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>; -+ }; -+ }; -+}; -+ -+/* This is disabled as Realtek RTL8152 USB provides Ethernet */ -+ðmac { -+ status = "disabled"; -+ phy-mode = "rmii"; -+ phy-handle = <&internal_phy>; -+}; -+ -+&internal_phy { -+ pinctrl-0 = <ð_link_led_pins>, <ð_act_led_pins>; -+ pinctrl-names = "default"; -+}; -+ -+&ir { -+ linux,rc-map-name = "rc-wetek-play2"; -+}; -+ -+/* This is connected to the Bluetooth module: */ -+&uart_A { -+ status = "okay"; -+ pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; -+ pinctrl-names = "default"; -+ uart-has-rtscts; -+ -+ bluetooth { -+ compatible = "brcm,bcm43438-bt"; -+ enable-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; -+ max-speed = <2000000>; -+ clocks = <&wifi32k>; -+ clock-names = "lpo"; -+ }; -+}; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0128-WIP-arm64-dts-meson-add-initial-Beelink-GS-King-X-de.patch b/projects/Amlogic/patches/linux/amlogic-0128-WIP-arm64-dts-meson-add-initial-Beelink-GS-King-X-de.patch deleted file mode 100644 index 2e2c0554d18..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0128-WIP-arm64-dts-meson-add-initial-Beelink-GS-King-X-de.patch +++ /dev/null @@ -1,276 +0,0 @@ -From 5d8a52c19327b52e8c1e705ba7df6e5c2db6505d Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Fri, 12 Jun 2020 08:05:20 +0000 -Subject: [PATCH 128/156] WIP: arm64: dts: meson: add initial Beelink GS-King-X - device-tree - -The Shenzen AZW (Beelink) GS-King-X is based on the Amlogic W400 reference -board with an S922X-H chip. - -- 4GB LPDDR4 RAM -- 64GB eMMC storage -- 10/100/1000 Base-T Ethernet -- AP6356S Wireless (802.11 a/b/g/n/ac, BT 4.1) -- HDMI 2.1 video -- S/PDIF optical output -- 2x ESS9018 audio DACs -- 4x Ricor RT6862 audio amps -- Analogue headphone output -- 1x USB 2.0 OTG port -- 3x USB 3.0 ports -- IR receiver -- 1x micro SD card slot (internal) -- USB SATA contoller with 2x 3.5" drive bays -- 1x Power on/off button - -Signed-off-by: Christian Hewitt ---- - arch/arm64/boot/dts/amlogic/Makefile | 1 + - .../boot/dts/amlogic/meson-g12b-gsking-x.dts | 223 ++++++++++++++++++ - 2 files changed, 224 insertions(+) - create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts - -diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile -index 6b0355f65c3a..662cd22f7e8a 100644 ---- a/arch/arm64/boot/dts/amlogic/Makefile -+++ b/arch/arm64/boot/dts/amlogic/Makefile -@@ -4,6 +4,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12a-sei510.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-g12a-tanix-tx5max.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb -+dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gsking-x.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb - dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts -new file mode 100644 -index 000000000000..ef54b5353c05 ---- /dev/null -+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts -@@ -0,0 +1,223 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+/* -+ * Copyright (c) 2019 BayLibre, SAS -+ * Author: Neil Armstrong -+ * Copyright (c) 2019 Christian Hewitt -+ */ -+ -+/dts-v1/; -+ -+#include "meson-g12b-w400.dtsi" -+#include -+#include -+ -+/ { -+ compatible = "azw,gsking-x", "amlogic,g12b"; -+ model = "Beelink GS-King X"; -+ -+ gpio-keys-polled { -+ compatible = "gpio-keys-polled"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ poll-interval = <100>; -+ -+ power-button { -+ label = "power"; -+ linux,code = ; -+ gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; -+ }; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ -+ blue { -+ color = ; -+ function = LED_FUNCTION_STATUS; -+ gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ }; -+ -+ lineout: audio-codec-0 { -+ #sound-dai-cells = <0>; -+ compatible = "everest,es7134"; -+ VDD-supply = <&vcc_3v3>; -+ PVDD-supply = <&vcc_5v>; -+ status = "okay"; -+ sound-name-prefix = "Lineout"; -+ }; -+ -+ spdif_dit: audio-codec-1 { -+ #sound-dai-cells = <0>; -+ compatible = "linux,spdif-dit"; -+ status = "okay"; -+ sound-name-prefix = "DIT"; -+ }; -+ -+ sound { -+ compatible = "amlogic,axg-sound-card"; -+ model = "G12B-GSKING-X"; -+ audio-aux-devs = <&tdmout_a>, <&tdmout_b>; -+ audio-widgets = "Line", "Lineout"; -+ -+ audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0", -+ "TDMOUT_A IN 1", "FRDDR_B OUT 0", -+ "TDMOUT_A IN 2", "FRDDR_C OUT 0", -+ "TDMOUT_B IN 0", "FRDDR_A OUT 1", -+ "TDMOUT_B IN 1", "FRDDR_B OUT 1", -+ "TDMOUT_B IN 2", "FRDDR_C OUT 1", -+ "TDM_A Playback", "TDMOUT_A OUT", -+ "TDM_B Playback", "TDMOUT_B OUT", -+ "SPDIFOUT IN 0", "FRDDR_A OUT 3", -+ "SPDIFOUT IN 1", "FRDDR_B OUT 3", -+ "SPDIFOUT IN 2", "FRDDR_C OUT 3", -+ "Lineout", "Lineout AOUTL", -+ "Lineout", "Lineout AOUTR"; -+ -+ assigned-clocks = <&clkc CLKID_MPLL2>, -+ <&clkc CLKID_MPLL0>, -+ <&clkc CLKID_MPLL1>; -+ assigned-clock-parents = <0>, <0>, <0>; -+ assigned-clock-rates = <294912000>, -+ <270950400>, -+ <393216000>; -+ status = "okay"; -+ -+ dai-link-0 { -+ sound-dai = <&frddr_a>; -+ }; -+ -+ dai-link-1 { -+ sound-dai = <&frddr_b>; -+ }; -+ -+ dai-link-2 { -+ sound-dai = <&frddr_c>; -+ }; -+ -+ /* 8ch hdmi interface */ -+ dai-link-3 { -+ sound-dai = <&tdmif_a>; -+ dai-format = "i2s"; -+ dai-tdm-slot-tx-mask-0 = <1 1>; -+ dai-tdm-slot-tx-mask-1 = <1 1>; -+ dai-tdm-slot-tx-mask-2 = <1 1>; -+ dai-tdm-slot-tx-mask-3 = <1 1>; -+ mclk-fs = <256>; -+ -+ codec { -+ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>; -+ }; -+ }; -+ -+ /* external DACs */ -+ dai-link-4 { -+ sound-dai = <&tdmif_b>; -+ dai-format = "i2s"; -+ dai-tdm-slot-tx-mask-0 = <1 1>; -+ mclk-fs = <256>; -+ -+ codec-0 { -+ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; -+ }; -+ -+ codec-1 { -+ sound-dai = <&lineout>; -+ }; -+ }; -+ -+ /* spdif hdmi or toslink interface */ -+ dai-link-5 { -+ sound-dai = <&spdifout>; -+ -+ codec-0 { -+ sound-dai = <&spdif_dit>; -+ }; -+ -+ codec-1 { -+ sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_A>; -+ }; -+ }; -+ -+ /* spdif hdmi interface */ -+ dai-link-6 { -+ sound-dai = <&spdifout_b>; -+ -+ codec { -+ sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_B>; -+ }; -+ }; -+ -+ /* hdmi glue */ -+ dai-link-7 { -+ sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; -+ -+ codec { -+ sound-dai = <&hdmi_tx>; -+ }; -+ }; -+ }; -+}; -+ -+&arb { -+ status = "okay"; -+}; -+ -+&clkc_audio { -+ status = "okay"; -+}; -+ -+&frddr_a { -+ status = "okay"; -+}; -+ -+&frddr_b { -+ status = "okay"; -+}; -+ -+&frddr_c { -+ status = "okay"; -+}; -+ -+&spdifout { -+ pinctrl-0 = <&spdif_out_h_pins>; -+ pinctrl-names = "default"; -+ status = "okay"; -+}; -+ -+&spdifout_b { -+ status = "okay"; -+}; -+ -+&tdmif_a { -+ status = "okay"; -+}; -+ -+&tdmif_b { -+ pinctrl-0 = <&tdm_b_sclk_pins>, <&tdm_b_fs_pins>, -+ <&tdm_b_dout0_pins>, <&mclk0_a_pins>; -+ pinctrl-names = "default"; -+ -+ assigned-clocks = <&clkc_audio AUD_CLKID_TDM_SCLK_PAD1>, -+ <&clkc_audio AUD_CLKID_TDM_LRCLK_PAD1>, -+ <&clkc_audio AUD_CLKID_TDM_MCLK_PAD0>; -+ assigned-clock-parents = <&clkc_audio AUD_CLKID_MST_B_SCLK>, -+ <&clkc_audio AUD_CLKID_MST_B_LRCLK>, -+ <&clkc_audio AUD_CLKID_MST_B_MCLK>; -+ assigned-clock-rates = <0>, <0>, <0>; -+ -+ status = "okay"; -+}; -+ -+&tdmout_a { -+ status = "okay"; -+}; -+ -+&tdmout_b { -+ status = "okay"; -+}; -+ -+&tohdmitx { -+ status = "okay"; -+}; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0130-WIP-arm64-dts-meson-add-audio-playback-to-a95x.patch b/projects/Amlogic/patches/linux/amlogic-0130-WIP-arm64-dts-meson-add-audio-playback-to-a95x.patch deleted file mode 100644 index 2682b226936..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0130-WIP-arm64-dts-meson-add-audio-playback-to-a95x.patch +++ /dev/null @@ -1,73 +0,0 @@ -From f4fa1c5cb11622d5695ab05ee206546d2cac0b62 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Fri, 15 May 2020 07:11:26 +0000 -Subject: [PATCH 130/156] WIP: arm64: dts: meson: add audio playback to a95x - -Add initial audio support limited to HDMI i2s. - -Signed-off-by: Christian Hewittt ---- - .../dts/amlogic/meson-gxbb-nexbox-a95x.dts | 40 +++++++++++++++++++ - 1 file changed, 40 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts -index 67d901ed2fa3..b5b11cb9f393 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts -@@ -10,6 +10,7 @@ - #include "meson-gxbb.dtsi" - #include - #include -+#include - - / { - compatible = "nexbox,a95x", "amlogic,meson-gxbb"; -@@ -139,6 +140,45 @@ - }; - }; - }; -+ -+ sound { -+ compatible = "amlogic,gx-sound-card"; -+ model = "GXBB-NEXBOX-A95X"; -+ assigned-clocks = <&clkc CLKID_MPLL0>, -+ <&clkc CLKID_MPLL1>, -+ <&clkc CLKID_MPLL2>; -+ assigned-clock-parents = <0>, <0>, <0>; -+ assigned-clock-rates = <294912000>, -+ <270950400>, -+ <393216000>; -+ status = "okay"; -+ -+ dai-link-0 { -+ sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; -+ }; -+ -+ dai-link-1 { -+ sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; -+ dai-format = "i2s"; -+ mclk-fs = <256>; -+ -+ codec-0 { -+ sound-dai = <&aiu AIU_HDMI CTRL_I2S>; -+ }; -+ }; -+ -+ dai-link-2 { -+ sound-dai = <&aiu AIU_HDMI CTRL_OUT>; -+ -+ codec-0 { -+ sound-dai = <&hdmi_tx>; -+ }; -+ }; -+ }; -+}; -+ -+&aiu { -+ status = "okay"; - }; - - &cvbs_vdac_port { --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0131-WIP-arm64-dts-meson-add-audio-playback-to-khadas-vim.patch b/projects/Amlogic/patches/linux/amlogic-0131-WIP-arm64-dts-meson-add-audio-playback-to-khadas-vim.patch deleted file mode 100644 index 2a9d6e1c960..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0131-WIP-arm64-dts-meson-add-audio-playback-to-khadas-vim.patch +++ /dev/null @@ -1,86 +0,0 @@ -From b53bc6d34b76dc6e21dc0b9446eed321a8a7fc9f Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Fri, 15 May 2020 06:53:49 +0000 -Subject: [PATCH 131/156] WIP: arm64: dts: meson: add audio playback to - khadas-vim2 - -Add initial audio support limited to HDMI i2s. - -Signed-off-by: Christian Hewitt ---- - .../dts/amlogic/meson-gxm-khadas-vim2.dts | 44 +++++++++++++++++-- - 1 file changed, 41 insertions(+), 3 deletions(-) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts -index 27eeab71ec77..a884417515b4 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts -@@ -7,9 +7,9 @@ - - /dts-v1/; - --#include -- - #include "meson-gxm.dtsi" -+#include -+#include - - / { - compatible = "khadas,vim2", "amlogic,s912", "amlogic,meson-gxm"; -@@ -145,6 +145,45 @@ - clock-frequency = <32768>; - pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */ - }; -+ -+ sound { -+ compatible = "amlogic,gx-sound-card"; -+ model = "GXM-KHADAS-VIM2"; -+ assigned-clocks = <&clkc CLKID_MPLL0>, -+ <&clkc CLKID_MPLL1>, -+ <&clkc CLKID_MPLL2>; -+ assigned-clock-parents = <0>, <0>, <0>; -+ assigned-clock-rates = <294912000>, -+ <270950400>, -+ <393216000>; -+ status = "okay"; -+ -+ dai-link-0 { -+ sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; -+ }; -+ -+ dai-link-1 { -+ sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; -+ dai-format = "i2s"; -+ mclk-fs = <256>; -+ -+ codec-0 { -+ sound-dai = <&aiu AIU_HDMI CTRL_I2S>; -+ }; -+ }; -+ -+ dai-link-2 { -+ sound-dai = <&aiu AIU_HDMI CTRL_OUT>; -+ -+ codec-0 { -+ sound-dai = <&hdmi_tx>; -+ }; -+ }; -+ }; -+}; -+ -+&aiu { -+ status = "okay"; - }; - - &cec_AO { -@@ -154,7 +193,6 @@ - hdmi-phandle = <&hdmi_tx>; - }; - -- - &cpu_cooling_maps { - map0 { - cooling-device = <&gpio_fan THERMAL_NO_LIMIT 1>; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0132-WIP-arm64-dts-meson-add-audio-playback-to-khadas-vim.patch b/projects/Amlogic/patches/linux/amlogic-0132-WIP-arm64-dts-meson-add-audio-playback-to-khadas-vim.patch deleted file mode 100644 index 3614bea3486..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0132-WIP-arm64-dts-meson-add-audio-playback-to-khadas-vim.patch +++ /dev/null @@ -1,133 +0,0 @@ -From 78859bff8afa1a19e8ce3ed1ab6521bad2be410f Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Fri, 15 May 2020 07:47:01 +0000 -Subject: [PATCH 132/156] WIP: arm64: dts: meson: add audio playback to - khadas-vim3l - -Add initial audio support limited to HDMI i2s. - -Signed-off-by: Christian Hewitt ---- - .../dts/amlogic/meson-sm1-khadas-vim3l.dts | 88 +++++++++++++++++++ - 1 file changed, 88 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts -index dbbf29a0dbf6..b900a433ef7a 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts -@@ -8,6 +8,7 @@ - - #include "meson-sm1.dtsi" - #include "meson-khadas-vim3.dtsi" -+#include - - / { - compatible = "khadas,vim3l", "amlogic,sm1"; -@@ -31,6 +32,69 @@ - regulator-boot-on; - regulator-always-on; - }; -+ -+ sound { -+ compatible = "amlogic,axg-sound-card"; -+ model = "SM1-KHADAS-VIM3L"; -+ audio-aux-devs = <&tdmout_b>; -+ audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", -+ "TDMOUT_B IN 1", "FRDDR_B OUT 1", -+ "TDMOUT_B IN 2", "FRDDR_C OUT 1", -+ "TDM_B Playback", "TDMOUT_B OUT"; -+ -+ assigned-clocks = <&clkc CLKID_MPLL2>, -+ <&clkc CLKID_MPLL0>, -+ <&clkc CLKID_MPLL1>; -+ assigned-clock-parents = <0>, <0>, <0>; -+ assigned-clock-rates = <294912000>, -+ <270950400>, -+ <393216000>; -+ status = "okay"; -+ -+ dai-link-0 { -+ sound-dai = <&frddr_a>; -+ }; -+ -+ dai-link-1 { -+ sound-dai = <&frddr_b>; -+ }; -+ -+ dai-link-2 { -+ sound-dai = <&frddr_c>; -+ }; -+ -+ /* 8ch hdmi interface */ -+ dai-link-3 { -+ sound-dai = <&tdmif_b>; -+ dai-format = "i2s"; -+ dai-tdm-slot-tx-mask-0 = <1 1>; -+ dai-tdm-slot-tx-mask-1 = <1 1>; -+ dai-tdm-slot-tx-mask-2 = <1 1>; -+ dai-tdm-slot-tx-mask-3 = <1 1>; -+ mclk-fs = <256>; -+ -+ codec { -+ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; -+ }; -+ }; -+ -+ /* hdmi glue */ -+ dai-link-4 { -+ sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; -+ -+ codec { -+ sound-dai = <&hdmi_tx>; -+ }; -+ }; -+ }; -+}; -+ -+&arb { -+ status = "okay"; -+}; -+ -+&clkc_audio { -+ status = "okay"; - }; - - &cpu0 { -@@ -61,6 +125,18 @@ - clock-latency = <50000>; - }; - -+&frddr_a { -+ status = "okay"; -+}; -+ -+&frddr_b { -+ status = "okay"; -+}; -+ -+&frddr_c { -+ status = "okay"; -+}; -+ - &pwm_AO_cd { - pinctrl-0 = <&pwm_ao_d_e_pins>; - pinctrl-names = "default"; -@@ -93,3 +169,15 @@ - phy-names = "usb2-phy0", "usb2-phy1"; - }; - */ -+ -+&tdmif_b { -+ status = "okay"; -+}; -+ -+&tdmout_b { -+ status = "okay"; -+}; -+ -+&tohdmitx { -+ status = "okay"; -+}; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0133-WIP-arm64-dts-meson-add-audio-playback-to-nanopi-k2.patch b/projects/Amlogic/patches/linux/amlogic-0133-WIP-arm64-dts-meson-add-audio-playback-to-nanopi-k2.patch deleted file mode 100644 index 0b5cd0a96d5..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0133-WIP-arm64-dts-meson-add-audio-playback-to-nanopi-k2.patch +++ /dev/null @@ -1,74 +0,0 @@ -From b071abd1b41d2cc991494f6c90a2dbe56dd60e1a Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Fri, 15 May 2020 07:14:50 +0000 -Subject: [PATCH 133/156] WIP: arm64: dts: meson: add audio playback to - nanopi-k2 - -Add initial audio support limited to HDMI i2s. - -Signed-off-by: Christian Hewitt ---- - .../boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 40 +++++++++++++++++++ - 1 file changed, 40 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts -index 7be3e354093b..8e5df00b06a2 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts -@@ -7,6 +7,7 @@ - - #include "meson-gxbb.dtsi" - #include -+#include - - / { - compatible = "friendlyarm,nanopi-k2", "amlogic,meson-gxbb"; -@@ -130,6 +131,45 @@ - }; - }; - }; -+ -+ sound { -+ compatible = "amlogic,gx-sound-card"; -+ model = "GXBB-NANOPI-K2"; -+ assigned-clocks = <&clkc CLKID_MPLL0>, -+ <&clkc CLKID_MPLL1>, -+ <&clkc CLKID_MPLL2>; -+ assigned-clock-parents = <0>, <0>, <0>; -+ assigned-clock-rates = <294912000>, -+ <270950400>, -+ <393216000>; -+ status = "okay"; -+ -+ dai-link-0 { -+ sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; -+ }; -+ -+ dai-link-1 { -+ sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; -+ dai-format = "i2s"; -+ mclk-fs = <256>; -+ -+ codec-0 { -+ sound-dai = <&aiu AIU_HDMI CTRL_I2S>; -+ }; -+ }; -+ -+ dai-link-2 { -+ sound-dai = <&aiu AIU_HDMI CTRL_OUT>; -+ -+ codec-0 { -+ sound-dai = <&hdmi_tx>; -+ }; -+ }; -+ }; -+}; -+ -+&aiu { -+ status = "okay"; - }; - - &cec_AO { --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0135-WIP-arm64-dts-meson-add-audio-playback-to-odroid-c2.patch b/projects/Amlogic/patches/linux/amlogic-0135-WIP-arm64-dts-meson-add-audio-playback-to-odroid-c2.patch deleted file mode 100644 index b5470b10e86..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0135-WIP-arm64-dts-meson-add-audio-playback-to-odroid-c2.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 46943f2ca03704a60a2efffb8923ed40e24a2172 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Fri, 15 May 2020 07:27:22 +0000 -Subject: [PATCH 135/156] WIP: arm64: dts: meson: add audio playback to - odroid-c2 - -Add initial audio support limited to HDMI i2s. - -Signed-off-by: Christian Hewitt ---- - .../boot/dts/amlogic/meson-gxbb-odroidc2.dts | 40 +++++++++++++++++++ - 1 file changed, 40 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts -index 70fcfb7b0683..9d8c919c6e19 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts -@@ -9,6 +9,7 @@ - - #include "meson-gxbb.dtsi" - #include -+#include - - / { - compatible = "hardkernel,odroid-c2", "amlogic,meson-gxbb"; -@@ -172,6 +173,45 @@ - }; - }; - }; -+ -+ sound { -+ compatible = "amlogic,gx-sound-card"; -+ model = "GXBB-ODROID-C2"; -+ assigned-clocks = <&clkc CLKID_MPLL0>, -+ <&clkc CLKID_MPLL1>, -+ <&clkc CLKID_MPLL2>; -+ assigned-clock-parents = <0>, <0>, <0>; -+ assigned-clock-rates = <294912000>, -+ <270950400>, -+ <393216000>; -+ status = "okay"; -+ -+ dai-link-0 { -+ sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; -+ }; -+ -+ dai-link-1 { -+ sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; -+ dai-format = "i2s"; -+ mclk-fs = <256>; -+ -+ codec-0 { -+ sound-dai = <&aiu AIU_HDMI CTRL_I2S>; -+ }; -+ }; -+ -+ dai-link-2 { -+ sound-dai = <&aiu AIU_HDMI CTRL_OUT>; -+ -+ codec-0 { -+ sound-dai = <&hdmi_tx>; -+ }; -+ }; -+ }; -+}; -+ -+&aiu { -+ status = "okay"; - }; - - &cec_AO { --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0136-WIP-arm64-dts-meson-add-audio-playback-to-odroid-c4.patch b/projects/Amlogic/patches/linux/amlogic-0136-WIP-arm64-dts-meson-add-audio-playback-to-odroid-c4.patch deleted file mode 100644 index 931b660714b..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0136-WIP-arm64-dts-meson-add-audio-playback-to-odroid-c4.patch +++ /dev/null @@ -1,136 +0,0 @@ -From 2ac8b2124860ab7c4a95d30fe87488c8ff9d9188 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Fri, 15 May 2020 07:42:07 +0000 -Subject: [PATCH 136/156] WIP: arm64: dts: meson: add audio playback to - odroid-c4 - -Add initial audio support limited to HDMI i2s. - -Signed-off-by: Christian Hewitt ---- - .../boot/dts/amlogic/meson-sm1-odroid-c4.dts | 88 +++++++++++++++++++ - 1 file changed, 88 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts -index 00d90b30f8b4..cf5a98f0e47c 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts -@@ -8,6 +8,7 @@ - #include "meson-sm1.dtsi" - #include - #include -+#include - - / { - compatible = "hardkernel,odroid-c4", "amlogic,sm1"; -@@ -186,6 +187,69 @@ - }; - }; - }; -+ -+ sound { -+ compatible = "amlogic,axg-sound-card"; -+ model = "SM1-ODROID-C4"; -+ audio-aux-devs = <&tdmout_b>; -+ audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", -+ "TDMOUT_B IN 1", "FRDDR_B OUT 1", -+ "TDMOUT_B IN 2", "FRDDR_C OUT 1", -+ "TDM_B Playback", "TDMOUT_B OUT"; -+ -+ assigned-clocks = <&clkc CLKID_MPLL2>, -+ <&clkc CLKID_MPLL0>, -+ <&clkc CLKID_MPLL1>; -+ assigned-clock-parents = <0>, <0>, <0>; -+ assigned-clock-rates = <294912000>, -+ <270950400>, -+ <393216000>; -+ status = "okay"; -+ -+ dai-link-0 { -+ sound-dai = <&frddr_a>; -+ }; -+ -+ dai-link-1 { -+ sound-dai = <&frddr_b>; -+ }; -+ -+ dai-link-2 { -+ sound-dai = <&frddr_c>; -+ }; -+ -+ /* 8ch hdmi interface */ -+ dai-link-3 { -+ sound-dai = <&tdmif_b>; -+ dai-format = "i2s"; -+ dai-tdm-slot-tx-mask-0 = <1 1>; -+ dai-tdm-slot-tx-mask-1 = <1 1>; -+ dai-tdm-slot-tx-mask-2 = <1 1>; -+ dai-tdm-slot-tx-mask-3 = <1 1>; -+ mclk-fs = <256>; -+ -+ codec { -+ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; -+ }; -+ }; -+ -+ /* hdmi glue */ -+ dai-link-4 { -+ sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; -+ -+ codec { -+ sound-dai = <&hdmi_tx>; -+ }; -+ }; -+ }; -+}; -+ -+&arb { -+ status = "okay"; -+}; -+ -+&clkc_audio { -+ status = "okay"; - }; - - &cpu0 { -@@ -237,6 +301,18 @@ - amlogic,tx-delay-ns = <2>; - }; - -+&frddr_a { -+ status = "okay"; -+}; -+ -+&frddr_b { -+ status = "okay"; -+}; -+ -+&frddr_c { -+ status = "okay"; -+}; -+ - &gpio { - gpio-line-names = - /* GPIOZ */ -@@ -381,6 +457,18 @@ - vqmmc-supply = <&flash_1v8>; - }; - -+&tdmif_b { -+ status = "okay"; -+}; -+ -+&tdmout_b { -+ status = "okay"; -+}; -+ -+&tohdmitx { -+ status = "okay"; -+}; -+ - &uart_AO { - status = "okay"; - pinctrl-0 = <&uart_ao_a_pins>; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0143-WIP-arm64-dts-meson-add-audio-playback-to-wetek-hub.patch b/projects/Amlogic/patches/linux/amlogic-0143-WIP-arm64-dts-meson-add-audio-playback-to-wetek-hub.patch deleted file mode 100644 index 3adbc8c743b..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0143-WIP-arm64-dts-meson-add-audio-playback-to-wetek-hub.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 1909c77b7f02cc7ec4a4149b9a83ae2cb738b0d5 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Sat, 16 May 2020 07:10:31 +0000 -Subject: [PATCH 143/156] WIP: arm64: dts: meson: add audio playback to - wetek-hub - -Add initial audio support limited to HDMI i2s. - -Signed-off-by: Christian Hewitt ---- - .../boot/dts/amlogic/meson-gxbb-wetek-hub.dts | 40 +++++++++++++++++++ - 1 file changed, 40 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-hub.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-hub.dts -index 83b985bb015e..0c1570153842 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-hub.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-hub.dts -@@ -7,10 +7,50 @@ - /dts-v1/; - - #include "meson-gxbb-wetek.dtsi" -+#include - - / { - compatible = "wetek,hub", "amlogic,meson-gxbb"; - model = "WeTek Hub"; -+ -+ sound { -+ compatible = "amlogic,gx-sound-card"; -+ model = "GXBB-WETEK-HUB"; -+ assigned-clocks = <&clkc CLKID_MPLL0>, -+ <&clkc CLKID_MPLL1>, -+ <&clkc CLKID_MPLL2>; -+ assigned-clock-parents = <0>, <0>, <0>; -+ assigned-clock-rates = <294912000>, -+ <270950400>, -+ <393216000>; -+ status = "okay"; -+ -+ dai-link-0 { -+ sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; -+ }; -+ -+ dai-link-1 { -+ sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; -+ dai-format = "i2s"; -+ mclk-fs = <256>; -+ -+ codec-0 { -+ sound-dai = <&aiu AIU_HDMI CTRL_I2S>; -+ }; -+ }; -+ -+ dai-link-2 { -+ sound-dai = <&aiu AIU_HDMI CTRL_OUT>; -+ -+ codec-0 { -+ sound-dai = <&hdmi_tx>; -+ }; -+ }; -+ }; -+}; -+ -+&aiu { -+ status = "okay"; - }; - - &ir { --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0144-WIP-arm64-dts-meson-add-audio-playback-to-wetek-play.patch b/projects/Amlogic/patches/linux/amlogic-0144-WIP-arm64-dts-meson-add-audio-playback-to-wetek-play.patch deleted file mode 100644 index a7dcb7a5fab..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0144-WIP-arm64-dts-meson-add-audio-playback-to-wetek-play.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 12cf49055c12a0861a427e91cc147e766f3ae4f8 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Sat, 16 May 2020 07:15:54 +0000 -Subject: [PATCH 144/156] WIP: arm64: dts: meson: add audio playback to - wetek-play2 - -Add initial support limited to HDMI i2s and SPDIF (LPCM). - -Signed-off-by: Christian Hewitt ---- - .../dts/amlogic/meson-gxbb-wetek-play2.dts | 61 +++++++++++++++++++ - 1 file changed, 61 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts -index 2ab8a3d10079..f2562c7de67c 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts -@@ -8,11 +8,19 @@ - - #include "meson-gxbb-wetek.dtsi" - #include -+#include - - / { - compatible = "wetek,play2", "amlogic,meson-gxbb"; - model = "WeTek Play 2"; - -+ spdif_dit: audio-codec-0 { -+ #sound-dai-cells = <0>; -+ compatible = "linux,spdif-dit"; -+ status = "okay"; -+ sound-name-prefix = "DIT"; -+ }; -+ - leds { - led-wifi { - label = "wetek-play:wifi-status"; -@@ -39,6 +47,59 @@ - gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>; - }; - }; -+ -+ sound { -+ compatible = "amlogic,gx-sound-card"; -+ model = "GXBB-WETEK-PLAY2"; -+ assigned-clocks = <&clkc CLKID_MPLL0>, -+ <&clkc CLKID_MPLL1>, -+ <&clkc CLKID_MPLL2>; -+ assigned-clock-parents = <0>, <0>, <0>; -+ assigned-clock-rates = <294912000>, -+ <270950400>, -+ <393216000>; -+ status = "okay"; -+ -+ dai-link-0 { -+ sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; -+ }; -+ -+ dai-link-1 { -+ sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>; -+ }; -+ -+ dai-link-2 { -+ sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; -+ dai-format = "i2s"; -+ mclk-fs = <256>; -+ -+ codec-0 { -+ sound-dai = <&aiu AIU_HDMI CTRL_I2S>; -+ }; -+ }; -+ -+ dai-link-3 { -+ sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>; -+ -+ codec-0 { -+ sound-dai = <&spdif_dit>; -+ }; -+ }; -+ -+ dai-link-4 { -+ sound-dai = <&aiu AIU_HDMI CTRL_OUT>; -+ -+ codec-0 { -+ sound-dai = <&hdmi_tx>; -+ }; -+ }; -+ }; -+}; -+ -+&aiu { -+ status = "okay"; -+ pinctrl-0 = <&spdif_out_y_pins>; -+ pinctrl-names = "default"; - }; - - &i2c_A { --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0145-DEBUG-s-dev_dbg-dev_err-g-drivers-net-phy-realtek.c.patch b/projects/Amlogic/patches/linux/amlogic-0145-DEBUG-s-dev_dbg-dev_err-g-drivers-net-phy-realtek.c.patch deleted file mode 100644 index 62783533b2b..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0145-DEBUG-s-dev_dbg-dev_err-g-drivers-net-phy-realtek.c.patch +++ /dev/null @@ -1,44 +0,0 @@ -From f484fe55c0205fb3cd23eaceb1fd1480ef7cb99a Mon Sep 17 00:00:00 2001 -From: chewitt -Date: Mon, 1 Jun 2020 08:16:58 +0000 -Subject: [PATCH 145/156] DEBUG: s/dev_dbg/dev_err/g drivers/net/phy/realtek.c - ---- - drivers/net/phy/realtek.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c -index 2d99e9de6ee1..9864d31f41b8 100644 ---- a/drivers/net/phy/realtek.c -+++ b/drivers/net/phy/realtek.c -@@ -210,11 +210,11 @@ static int rtl8211f_config_init(struct phy_device *phydev) - dev_err(dev, "Failed to update the TX delay register\n"); - return ret; - } else if (ret) { -- dev_dbg(dev, -+ dev_err(dev, - "%s 2ns TX delay (and changing the value from pin-strapping RXD1 or the bootloader)\n", - val_txdly ? "Enabling" : "Disabling"); - } else { -- dev_dbg(dev, -+ dev_err(dev, - "2ns TX delay was already %s (by pin-strapping RXD1 or bootloader configuration)\n", - val_txdly ? "enabled" : "disabled"); - } -@@ -225,11 +225,11 @@ static int rtl8211f_config_init(struct phy_device *phydev) - dev_err(dev, "Failed to update the RX delay register\n"); - return ret; - } else if (ret) { -- dev_dbg(dev, -+ dev_err(dev, - "%s 2ns RX delay (and changing the value from pin-strapping RXD0 or the bootloader)\n", - val_rxdly ? "Enabling" : "Disabling"); - } else { -- dev_dbg(dev, -+ dev_err(dev, - "2ns RX delay was already %s (by pin-strapping RXD0 or bootloader configuration)\n", - val_rxdly ? "enabled" : "disabled"); - } --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0146-DEBUG-print-PRG_ETH0-PRG_ETH1-values-at-init.patch b/projects/Amlogic/patches/linux/amlogic-0146-DEBUG-print-PRG_ETH0-PRG_ETH1-values-at-init.patch deleted file mode 100644 index a6f70ff10d3..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0146-DEBUG-print-PRG_ETH0-PRG_ETH1-values-at-init.patch +++ /dev/null @@ -1,26 +0,0 @@ -From ea8567c29924d05355035e7adecccbb34c64829f Mon Sep 17 00:00:00 2001 -From: chewitt -Date: Tue, 2 Jun 2020 19:20:27 +0000 -Subject: [PATCH 146/156] DEBUG: print PRG_ETH0/PRG_ETH1 values at init - ---- - drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -index 5afcf05bbf9c..cf3df1d8dd97 100644 ---- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c -@@ -425,6 +425,9 @@ static int meson8b_dwmac_probe(struct platform_device *pdev) - goto err_remove_config_dt; - } - -+ dev_err(&pdev->dev, "PRG_ETH0 value at init = 0x%08x\n", readl(dwmac->regs + PRG_ETH0)); -+ dev_err(&pdev->dev, "PRG_ETH1 value at init = 0x%08x\n", readl(dwmac->regs + 0x04)); -+ - ret = meson8b_init_rgmii_tx_clk(dwmac); - if (ret) - goto err_remove_config_dt; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0147-WIP-arm64-dts-meson-misc-fixups-for-w400-dtsi.patch b/projects/Amlogic/patches/linux/amlogic-0147-WIP-arm64-dts-meson-misc-fixups-for-w400-dtsi.patch deleted file mode 100644 index b6ae2ca5694..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0147-WIP-arm64-dts-meson-misc-fixups-for-w400-dtsi.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 0f26624455f71f7bf2b25d46f7b3e18ee43662bb Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Thu, 18 Jun 2020 08:34:03 +0000 -Subject: [PATCH 147/156] WIP: arm64: dts: meson: misc fixups for w400 dtsi - -Current devices using the W400 dtsi show mmc tuning errors: - -[12483.917391] mmc0: tuning execution failed: -5 -[30535.551221] mmc0: tuning execution failed: -5 -[35359.953671] mmc0: tuning execution failed: -5 -[35561.875332] mmc0: tuning execution failed: -5 -[61733.348709] mmc0: tuning execution failed: -5 - -Removing "sd-uhs-sdr50" from the SDIO node prevents this. We also add -faster speeds to the SD card node, and fix an indentation. - -Signed-off-by: Christian Hewitt ---- - arch/arm64/boot/dts/amlogic/meson-g12b-w400.dtsi | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-w400.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-w400.dtsi -index 98b70d216a6f..3af3a4db8685 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-g12b-w400.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-w400.dtsi -@@ -277,7 +277,7 @@ - pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; - pinctrl-names = "default"; - status = "okay"; -- phy-mode = "rgmii"; -+ phy-mode = "rgmii-id"; - phy-handle = <&external_phy>; - amlogic,tx-delay-ns = <2>; - }; -@@ -336,9 +336,11 @@ - - bus-width = <4>; - cap-sd-highspeed; -- sd-uhs-sdr50; - max-frequency = <100000000>; - -+ /* WiFi firmware requires power to be kept while in suspend */ -+ keep-power-in-suspend; -+ - non-removable; - disable-wp; - -@@ -379,7 +381,9 @@ - - bus-width = <8>; - cap-mmc-highspeed; -- max-frequency = <100000000>; -+ mmc-ddr-1_8v; -+ mmc-hs200-1_8v; -+ max-frequency = <200000000>; - disable-wp; - - mmc-pwrseq = <&emmc_pwrseq>; -@@ -398,7 +402,7 @@ - shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; - max-speed = <2000000>; - clocks = <&wifi32k>; -- clock-names = "lpo"; -+ clock-names = "lpo"; - }; - }; - --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0148-WIP-arm64-dts-meson-add-i2c3-rtc-nodes-and-vrtc-alia.patch b/projects/Amlogic/patches/linux/amlogic-0148-WIP-arm64-dts-meson-add-i2c3-rtc-nodes-and-vrtc-alia.patch deleted file mode 100644 index 406cdd7d719..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0148-WIP-arm64-dts-meson-add-i2c3-rtc-nodes-and-vrtc-alia.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 4d394c132e9429014b06301b4a9de7c419bc55e2 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Fri, 19 Jun 2020 10:56:46 +0000 -Subject: [PATCH 148/156] WIP: arm64: dts: meson: add i2c3/rtc nodes and vrtc - alias to W400 dtsi - -The schematics for all devices currently based on the W400 dtsi show -the same haoyu,hym8563 rtc chip, so add the required i2c3/rtc nodes -and an alias to ensure the meson-vrtc timer which probes earlier is -not assigned the /dev/rtc0 device. - -Signed-off-by: Christian Hewitt ---- - arch/arm64/boot/dts/amlogic/meson-g12b-w400.dtsi | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-w400.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-w400.dtsi -index 3af3a4db8685..a1c0bf3e8f62 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-g12b-w400.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-w400.dtsi -@@ -16,6 +16,7 @@ - aliases { - serial0 = &uart_AO; - ethernet0 = ðmac; -+ rtc1 = &vrtc; - }; - - chosen { -@@ -301,6 +302,18 @@ - pinctrl-names = "default"; - }; - -+&i2c3 { -+ status = "okay"; -+ pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>; -+ pinctrl-names = "default"; -+ -+ rtc@51 { -+ compatible = "haoyu,hym8563"; -+ reg = <0x51>; -+ #clock-cells = <0>; -+ }; -+}; -+ - &pwm_ab { - pinctrl-0 = <&pwm_a_e_pins>; - pinctrl-names = "default"; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0149-WIP-arm64-dts-meson-add-i2c3-rtc-nodes-and-vrtc-alia.patch b/projects/Amlogic/patches/linux/amlogic-0149-WIP-arm64-dts-meson-add-i2c3-rtc-nodes-and-vrtc-alia.patch deleted file mode 100644 index d42a6c80748..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0149-WIP-arm64-dts-meson-add-i2c3-rtc-nodes-and-vrtc-alia.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 58c3872d9946512795d5d260bed3ee9ea5c3b006 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Fri, 19 Jun 2020 11:30:55 +0000 -Subject: [PATCH 149/156] WIP: arm64: dts: meson: add i2c3/rtc nodes and vrtc - alias to ODROID-N2 - -Add the i2c3 and rtc nodes to the ODROID-N2 device-tree. Also assign -an alias to the meson-vrtc timer device to prevent it being assigned -to /dev/rtc0 which disto userspace tools assume is a clock device. - -Signed-off-by: Christian Hewitt ---- - .../arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts -index 34fffa6d859d..326424231944 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts -@@ -19,6 +19,7 @@ - aliases { - serial0 = &uart_AO; - ethernet0 = ðmac; -+ rtc1 = &vrtc; - }; - - dioo2133: audio-amplifier-0 { -@@ -484,6 +485,18 @@ - linux,rc-map-name = "rc-odroid"; - }; - -+&i2c3 { -+ status = "okay"; -+ pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>; -+ pinctrl-names = "default"; -+ -+ rtc@51 { -+ compatible = "nxp,pcf8563"; -+ reg = <0x51>; -+ #clock-cells = <0>; -+ }; -+}; -+ - &pwm_ab { - pinctrl-0 = <&pwm_a_e_pins>; - pinctrl-names = "default"; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0150-WIP-arm64-dts-meson-add-i2c3-rtc-nodes-and-vrtc-alia.patch b/projects/Amlogic/patches/linux/amlogic-0150-WIP-arm64-dts-meson-add-i2c3-rtc-nodes-and-vrtc-alia.patch deleted file mode 100644 index dd7ff52b7bf..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0150-WIP-arm64-dts-meson-add-i2c3-rtc-nodes-and-vrtc-alia.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 9f08ae70bc041ef1ff15f57aa6409dd95328430b Mon Sep 17 00:00:00 2001 -From: chewitt -Date: Thu, 2 Jul 2020 11:48:57 +0000 -Subject: [PATCH 150/156] WIP: arm64: dts: meson: add i2c3/rtc nodes and vrtc - alias to ODROID-C4 - ---- - arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts -index cf5a98f0e47c..909ea19e48fd 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts -@@ -17,6 +17,7 @@ - aliases { - serial0 = &uart_AO; - ethernet0 = ðmac; -+ rtc1 = &vrtc; - }; - - chosen { -@@ -405,6 +406,18 @@ - linux,rc-map-name = "rc-odroid"; - }; - -+&i2c3 { -+ status = "okay"; -+ pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>; -+ pinctrl-names = "default"; -+ -+ rtc@51 { -+ compatible = "nxp,pcf8563"; -+ reg = <0x51>; -+ #clock-cells = <0>; -+ }; -+}; -+ - &pwm_AO_cd { - pinctrl-0 = <&pwm_ao_d_e_pins>; - pinctrl-names = "default"; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0151-WIP-arm64-dts-meson-enable-rtc-node-on-Khadas-VIM1-V.patch b/projects/Amlogic/patches/linux/amlogic-0151-WIP-arm64-dts-meson-enable-rtc-node-on-Khadas-VIM1-V.patch deleted file mode 100644 index 20a1d4969b1..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0151-WIP-arm64-dts-meson-enable-rtc-node-on-Khadas-VIM1-V.patch +++ /dev/null @@ -1,48 +0,0 @@ -From d578685b42889c1f6685208613602d71c55179a0 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Fri, 12 Jun 2020 10:14:36 +0000 -Subject: [PATCH 151/156] WIP: arm64: dts: meson: enable rtc node on Khadas - VIM1/VIM2 boards - -Enable the rtc node on VIM1/VIM2 boards (as with VIM3/VIM3L) so users can -attach a power cell and use it without recompiling the device-tree. If no -cell is attached the kernel reports a harmless error. - -Suggested-by: Nick Xie -Signed-off-by: Christian Hewitt ---- - arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 3 +-- - arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 3 +-- - 2 files changed, 2 insertions(+), 4 deletions(-) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts -index 440bc23c7342..e398e3e65ceb 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts -@@ -97,8 +97,7 @@ - pinctrl-names = "default"; - - rtc: rtc@51 { -- /* has to be enabled manually when a battery is connected: */ -- status = "disabled"; -+ status = "okay"; - compatible = "haoyu,hym8563"; - reg = <0x51>; - #clock-cells = <0>; -diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts -index a884417515b4..ffbe02807b04 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts -@@ -266,8 +266,7 @@ - pinctrl-names = "default"; - - rtc: rtc@51 { -- /* has to be enabled manually when a battery is connected: */ -- status = "disabled"; -+ status = "okay"; - compatible = "haoyu,hym8563"; - reg = <0x51>; - #clock-cells = <0>; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0152-WIP-arm64-dts-meson-fix-spifc-node-on-Khadas-VIM3-VI.patch b/projects/Amlogic/patches/linux/amlogic-0152-WIP-arm64-dts-meson-fix-spifc-node-on-Khadas-VIM3-VI.patch deleted file mode 100644 index d1ef470c987..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0152-WIP-arm64-dts-meson-fix-spifc-node-on-Khadas-VIM3-VI.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 0de0b041dfdc9e5bda39380cd81f8b95fa89abd3 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Fri, 12 Jun 2020 11:09:43 +0000 -Subject: [PATCH 152/156] WIP: arm64: dts: meson: fix spifc node on Khadas - VIM3/VIM3L - -The VIM3/VIM3L Boards use w25q128 not w25q32. - -Fixes: 0e1610e726d3 ("arm64: dts: khadas-vim3: add SPIFC controller node") -Suggested-by: Art Nikpal -Signed-off-by: Christian Hewitt ---- - arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi -index 27408c10a811..6b75157265e1 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi -@@ -360,7 +360,7 @@ - pinctrl-0 = <&nor_pins>; - pinctrl-names = "default"; - -- w25q32: spi-flash@0 { -+ w25q128: spi-flash@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "winbond,w25q128fw", "jedec,spi-nor"; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0153-WIP-arm64-dts-meson-fix-mmc0-tuning-error-on-Khadas-.patch b/projects/Amlogic/patches/linux/amlogic-0153-WIP-arm64-dts-meson-fix-mmc0-tuning-error-on-Khadas-.patch deleted file mode 100644 index bca3c78cc32..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0153-WIP-arm64-dts-meson-fix-mmc0-tuning-error-on-Khadas-.patch +++ /dev/null @@ -1,54 +0,0 @@ -From b18ca293bbf9615b0d263284120a9906f747b6c1 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Sat, 13 Jun 2020 05:05:36 +0000 -Subject: [PATCH 153/156] WIP: arm64: dts: meson: fix mmc0 tuning error on - Khadas VIM3 - -I see reports of mmc0 tuning errors on VIM3 after a few hours uptime: - -[12483.917391] mmc0: tuning execution failed: -5 -[30535.551221] mmc0: tuning execution failed: -5 -[35359.953671] mmc0: tuning execution failed: -5 -[35561.875332] mmc0: tuning execution failed: -5 -[61733.348709] mmc0: tuning execution failed: -5 - -I do not see the same on VIM3L, so remove sd-uhs-sdr50 from the common dtsi -to silence the error, then (re)add it to the VIM3L dts. - -Suggested-by: Art Nikpal -Signed-off-by: Chrisitan Hewitt ---- - arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 1 - - arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts | 4 ++++ - 2 files changed, 4 insertions(+), 1 deletion(-) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi -index 6b75157265e1..94f75b446504 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi -@@ -293,7 +293,6 @@ - - bus-width = <4>; - cap-sd-highspeed; -- sd-uhs-sdr50; - max-frequency = <100000000>; - - non-removable; -diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts -index b900a433ef7a..61e4dbf08d78 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts -@@ -164,6 +164,10 @@ - status = "okay"; - }; - -+&sd_emmc_a { -+ sd-uhs-sdr50; -+}; -+ - &usb { - phys = <&usb2_phy0>, <&usb2_phy1>; - phy-names = "usb2-phy0", "usb2-phy1"; --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0154-WIP-arm64-dts-meson-switch-VIM3-VIM3L-to-rgmii-id.patch b/projects/Amlogic/patches/linux/amlogic-0154-WIP-arm64-dts-meson-switch-VIM3-VIM3L-to-rgmii-id.patch deleted file mode 100644 index 55f9030d005..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0154-WIP-arm64-dts-meson-switch-VIM3-VIM3L-to-rgmii-id.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 0ea432e72c1cc590976549860cecd5f4add332d5 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Sat, 13 Jun 2020 05:34:20 +0000 -Subject: [PATCH 154/156] WIP: arm64: dts: meson: switch VIM3/VIM3L to rgmii-id - -Signed-off-by: Christian Hewitt ---- - arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi -index 94f75b446504..b65beccd4e66 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi -@@ -216,9 +216,8 @@ - pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; - pinctrl-names = "default"; - status = "okay"; -- phy-mode = "rgmii"; -+ phy-mode = "rgmii-id"; - phy-handle = <&external_phy>; -- amlogic,tx-delay-ns = <2>; - }; - - &hdmi_tx { --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0155-WIP-arm64-dts-meson-switch-ODROID-N2-to-rgmii-id.patch b/projects/Amlogic/patches/linux/amlogic-0155-WIP-arm64-dts-meson-switch-ODROID-N2-to-rgmii-id.patch deleted file mode 100644 index 8d7f74c473f..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0155-WIP-arm64-dts-meson-switch-ODROID-N2-to-rgmii-id.patch +++ /dev/null @@ -1,27 +0,0 @@ -From bd5a684056d6f58cdf709a6d04b8de7dd65b0a82 Mon Sep 17 00:00:00 2001 -From: chewitt -Date: Wed, 24 Jun 2020 10:33:59 +0000 -Subject: [PATCH 155/156] WIP: arm64: dts: meson: switch ODROID-N2 to rgmii-id - ---- - arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts -index 326424231944..dbadb585d1f6 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts -@@ -433,9 +433,8 @@ - pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; - pinctrl-names = "default"; - status = "okay"; -- phy-mode = "rgmii"; -+ phy-mode = "rgmii-id"; - phy-handle = <&external_phy>; -- amlogic,tx-delay-ns = <2>; - }; - - &frddr_a { --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/amlogic-0156-WIP-arm64-dts-meson-switch-ODROID-C4-to-rgmii-id.patch b/projects/Amlogic/patches/linux/amlogic-0156-WIP-arm64-dts-meson-switch-ODROID-C4-to-rgmii-id.patch deleted file mode 100644 index d7b8ade2336..00000000000 --- a/projects/Amlogic/patches/linux/amlogic-0156-WIP-arm64-dts-meson-switch-ODROID-C4-to-rgmii-id.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 6fde1ebcfb3d5a1f2f859443ec039468198e5447 Mon Sep 17 00:00:00 2001 -From: chewitt -Date: Wed, 24 Jun 2020 11:21:22 +0000 -Subject: [PATCH 156/156] WIP: arm64: dts: meson: switch ODROID-C4 to rgmii-id - ---- - arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts -index 909ea19e48fd..e652203a4a8d 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts -@@ -297,9 +297,8 @@ - pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; - pinctrl-names = "default"; - status = "okay"; -- phy-mode = "rgmii"; -+ phy-mode = "rgmii-id"; - phy-handle = <&external_phy>; -- amlogic,tx-delay-ns = <2>; - }; - - &frddr_a { --- -2.17.1 - diff --git a/projects/Amlogic/patches/linux/linux-0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch b/projects/Amlogic/patches/linux/linux-0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch deleted file mode 100644 index 5c3d2df2da7..00000000000 --- a/projects/Amlogic/patches/linux/linux-0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 168200b6d6ea0cb5765943ec5da5b8149701f36a Mon Sep 17 00:00:00 2001 -From: Leo Yan -Date: Tue, 5 May 2020 21:36:42 +0800 -Subject: [PATCH] perf cs-etm: Move definition of 'traceid_list' global - variable from header file - -The variable 'traceid_list' is defined in the header file cs-etm.h, -if multiple C files include cs-etm.h the compiler might complaint for -multiple definition of 'traceid_list'. - -To fix multiple definition error, move the definition of 'traceid_list' -into cs-etm.c. - -Fixes: cd8bfd8c973e ("perf tools: Add processing of coresight metadata") -Reported-by: Thomas Backlund -Signed-off-by: Leo Yan -Reviewed-by: Mathieu Poirier -Reviewed-by: Mike Leach -Tested-by: Mike Leach -Tested-by: Thomas Backlund -Cc: Alexander Shishkin -Cc: Jiri Olsa -Cc: Mark Rutland -Cc: Namhyung Kim -Cc: Peter Zijlstra -Cc: Suzuki Poulouse -Cc: Tor Jeremiassen -Cc: linux-arm-kernel@lists.infradead.org -Link: http://lore.kernel.org/lkml/20200505133642.4756-1-leo.yan@linaro.org -Signed-off-by: Arnaldo Carvalho de Melo ---- - tools/perf/util/cs-etm.c | 3 +++ - tools/perf/util/cs-etm.h | 3 --- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c -index 3c802fde4954..c283223fb31f 100644 ---- a/tools/perf/util/cs-etm.c -+++ b/tools/perf/util/cs-etm.c -@@ -94,6 +94,9 @@ struct cs_etm_queue { - struct cs_etm_traceid_queue **traceid_queues; - }; - -+/* RB tree for quick conversion between traceID and metadata pointers */ -+static struct intlist *traceid_list; -+ - static int cs_etm__update_queues(struct cs_etm_auxtrace *etm); - static int cs_etm__process_queues(struct cs_etm_auxtrace *etm); - static int cs_etm__process_timeless_queues(struct cs_etm_auxtrace *etm, -diff --git a/tools/perf/util/cs-etm.h b/tools/perf/util/cs-etm.h -index 650ecc2a6349..4ad925d6d799 100644 ---- a/tools/perf/util/cs-etm.h -+++ b/tools/perf/util/cs-etm.h -@@ -114,9 +114,6 @@ enum cs_etm_isa { - CS_ETM_ISA_T32, - }; - --/* RB tree for quick conversion between traceID and metadata pointers */ --struct intlist *traceid_list; -- - struct cs_etm_queue; - - struct cs_etm_packet { --- -2.27.0 -