Merge tag 'tegra-for-5.17-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorArnd Bergmann <arnd@arndb.de>
Mon, 20 Dec 2021 16:14:05 +0000 (17:14 +0100)
committerArnd Bergmann <arnd@arndb.de>
Mon, 20 Dec 2021 16:14:06 +0000 (17:14 +0100)
ARM: tegra: Changes for v5.17-rc1

A large part of this is cleanups to existing device trees in order to
improve validation of the device trees using the dt-schema tooling.

This also contains a set of new device trees for various boards that
have been contributed by community members as well as fixes to existing
devices.

* tag 'tegra-for-5.17-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: (55 commits)
  ARM: tegra: Add host1x hotflush reset on Tegra124
  ARM: tegra: Add memory client hotflush resets on Tegra114
  ARM: tegra: Add back gpio-ranges properties
  ARM: tegra: paz00: Enable S/PDIF and HDMI audio
  ARM: tegra: acer-a500: Enable S/PDIF and HDMI audio
  ARM: tegra: Add HDMI audio graph to Tegra20 device-tree
  ARM: tegra: Add S/PDIF node to Tegra20 device-tree
  ARM: tegra20/30: Disable unused host1x hardware
  ARM: tegra: Add Memory Client resets to Tegra30 GR2D, GR3D and Host1x
  ARM: tegra: Add Memory Client resets to Tegra20 GR2D, GR3D and Host1x
  ARM: tegra: Add OPP tables and power domains to Tegra30 device-trees
  ARM: tegra: Add OPP tables and power domains to Tegra20 device-trees
  ARM: tegra: Add 500 MHz entry to Tegra30 memory OPP table
  ARM: tegra: Enable video decoder on Tegra114
  ARM: tegra: nexus7: Use common LVDS display device-tree
  ARM: tegra: Add CPU thermal zones to Nyan device-tree
  ARM: tegra: Enable CPU DFLL on Nyan
  ARM: tegra: Enable HDMI CEC on Nyan
  ARM: tegra: Add usb-role-switch property to USB OTG ports
  ARM: tegra: Add device-tree for 1080p version of Nyan Big
  ...

Link: https://lore.kernel.org/r/20211217162253.1801077-5-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
740 files changed:
.mailmap
Documentation/admin-guide/laptops/thinkpad-acpi.rst
Documentation/admin-guide/sysctl/kernel.rst
Documentation/arm/marvell.rst
Documentation/bpf/index.rst
Documentation/devicetree/bindings/arm/apple.yaml
Documentation/devicetree/bindings/arm/apple/apple,pmgr.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/arm/fsl.yaml
Documentation/devicetree/bindings/arm/mediatek.yaml
Documentation/devicetree/bindings/arm/renesas.yaml
Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml
Documentation/devicetree/bindings/arm/stm32/stm32.yaml
Documentation/devicetree/bindings/arm/sunxi.yaml
Documentation/devicetree/bindings/arm/sunxi/allwinner,sun4i-a10-mbus.yaml
Documentation/devicetree/bindings/arm/tegra.yaml
Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.txt [deleted file]
Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/arm/ti/k3.yaml
Documentation/devicetree/bindings/bus/fsl,spba-bus.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/bus/imx-weim.txt
Documentation/devicetree/bindings/clock/nvidia,tegra20-car.yaml
Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt
Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt [deleted file]
Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/fuse/nvidia,tegra20-fuse.txt [deleted file]
Documentation/devicetree/bindings/fuse/nvidia,tegra20-fuse.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/gpu/host1x/nvidia,tegra210-nvenc.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/gpu/host1x/nvidia,tegra210-nvjpg.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/i2c/apple,i2c.yaml
Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml
Documentation/devicetree/bindings/iommu/apple,dart.yaml
Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml
Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.txt [deleted file]
Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/media/nvidia,tegra-vde.txt [deleted file]
Documentation/devicetree/bindings/media/nvidia,tegra-vde.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/memory-controllers/nvidia,tegra186-mc.yaml
Documentation/devicetree/bindings/misc/nvidia,tegra186-misc.txt [deleted file]
Documentation/devicetree/bindings/misc/nvidia,tegra186-misc.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.txt [deleted file]
Documentation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt [deleted file]
Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
Documentation/devicetree/bindings/pci/apple,pcie.yaml
Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
Documentation/devicetree/bindings/power/apple,pmgr-pwrstate.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/power/renesas,rcar-sysc.yaml
Documentation/devicetree/bindings/reset/renesas,rst.yaml
Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.txt [deleted file]
Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/serial/8250.yaml
Documentation/devicetree/bindings/serial/nvidia,tegra194-tcu.txt [deleted file]
Documentation/devicetree/bindings/serial/nvidia,tegra194-tcu.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/sram/sram.yaml
Documentation/devicetree/bindings/thermal/nvidia,tegra186-bpmp-thermal.txt [deleted file]
Documentation/devicetree/bindings/thermal/nvidia,tegra186-bpmp-thermal.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml
Documentation/devicetree/bindings/vendor-prefixes.yaml
Documentation/devicetree/bindings/watchdog/apple,wdt.yaml [new file with mode: 0644]
Documentation/doc-guide/sphinx.rst
Documentation/filesystems/autofs.rst
Documentation/power/energy-model.rst
Documentation/process/changes.rst
Documentation/process/submitting-patches.rst
Documentation/trace/ftrace.rst
Documentation/translations/it_IT/doc-guide/sphinx.rst
Documentation/translations/it_IT/process/changes.rst
Documentation/translations/zh_CN/doc-guide/sphinx.rst
Documentation/translations/zh_CN/process/management-style.rst
MAINTAINERS
Makefile
arch/arm/Kconfig
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/am335x-bone-common.dtsi
arch/arm/boot/dts/am335x-boneblack-common.dtsi
arch/arm/boot/dts/am335x-boneblue.dts
arch/arm/boot/dts/am335x-icev2.dts
arch/arm/boot/dts/am335x-osd3358-sm-red.dts
arch/arm/boot/dts/am437x-cm-t43.dts
arch/arm/boot/dts/am437x-gp-evm.dts
arch/arm/boot/dts/am437x-l4.dtsi
arch/arm/boot/dts/am43xx-clocks.dtsi
arch/arm/boot/dts/armada-38x.dtsi
arch/arm/boot/dts/at91-q5xr5.dts
arch/arm/boot/dts/at91-sama5d2_xplained.dts
arch/arm/boot/dts/at91-sama5d3_ksz9477_evb.dts [new file with mode: 0644]
arch/arm/boot/dts/at91-sama7g5ek.dts
arch/arm/boot/dts/at91-wb50n.dts
arch/arm/boot/dts/elpida_ecb240abacn.dtsi
arch/arm/boot/dts/exynos4210-i9100.dts
arch/arm/boot/dts/exynos5260.dtsi
arch/arm/boot/dts/gemini-nas4220b.dts
arch/arm/boot/dts/imx1-pinfunc.h
arch/arm/boot/dts/imx1.dtsi
arch/arm/boot/dts/imx25.dtsi
arch/arm/boot/dts/imx27-pinfunc.h
arch/arm/boot/dts/imx28-tx28.dts
arch/arm/boot/dts/imx31.dtsi
arch/arm/boot/dts/imx50.dtsi
arch/arm/boot/dts/imx51.dtsi
arch/arm/boot/dts/imx53-tx53.dtsi
arch/arm/boot/dts/imx53.dtsi
arch/arm/boot/dts/imx6dl-mba6.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx6dl-mba6a.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6dl-mba6b.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6dl-phytec-mira-rdk-nand.dts
arch/arm/boot/dts/imx6q-mba6.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx6q-mba6a.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6q-mba6b.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6q-phytec-mira-rdk-emmc.dts
arch/arm/boot/dts/imx6q-phytec-mira-rdk-nand.dts
arch/arm/boot/dts/imx6q-yapp4-crux.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6qdl-dhcom-drc02.dtsi
arch/arm/boot/dts/imx6qdl-dhcom-pdk2.dtsi
arch/arm/boot/dts/imx6qdl-dhcom-som.dtsi
arch/arm/boot/dts/imx6qdl-mba6.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx6qdl-mba6a.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx6qdl-mba6b.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx6qdl-phytec-mira-peb-av-02.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx6qdl-phytec-mira-peb-eval-01.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx6qdl-phytec-mira-peb-wlbt-05.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx6qdl-tqma6a.dtsi
arch/arm/boot/dts/imx6qdl-tx6.dtsi
arch/arm/boot/dts/imx6qdl.dtsi
arch/arm/boot/dts/imx6qp-mba6b.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6qp-phytec-mira-rdk-nand.dts
arch/arm/boot/dts/imx6qp-yapp4-crux-plus.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6ul-imx6ull-opos6uldev.dtsi
arch/arm/boot/dts/imx6ul-phytec-segin-ff-rdk-nand.dts
arch/arm/boot/dts/imx6ul-phytec-segin-peb-wlbt-05.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx6ul-prti6g.dts
arch/arm/boot/dts/imx6ul-tx6ul.dtsi
arch/arm/boot/dts/imx6ull-jozacp.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6ull-phytec-segin-ff-rdk-nand.dts
arch/arm/boot/dts/imx6ull-phytec-segin-lc-rdk-nand.dts
arch/arm/boot/dts/imx6ull-phytec-segin-peb-wlbt-05.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx6ulz-bsh-smm-m2.dts [new file with mode: 0644]
arch/arm/boot/dts/imx7d-remarkable2.dts
arch/arm/boot/dts/imx7s-warp.dts
arch/arm/boot/dts/imx7s.dtsi
arch/arm/boot/dts/intel-ixp42x-freecom-fsg-3.dts
arch/arm/boot/dts/intel-ixp42x-gateway-7001.dts [new file with mode: 0644]
arch/arm/boot/dts/intel-ixp42x-goramo-multilink.dts [new file with mode: 0644]
arch/arm/boot/dts/intel-ixp4xx.dtsi
arch/arm/boot/dts/milbeaut-m10v.dtsi
arch/arm/boot/dts/motorola-mapphone-common.dtsi
arch/arm/boot/dts/mt6589-fairphone-fp1.dts [new file with mode: 0644]
arch/arm/boot/dts/mt6589.dtsi
arch/arm/boot/dts/omap3-tao3530.dtsi
arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dts
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi
arch/arm/boot/dts/sama5d2.dtsi
arch/arm/boot/dts/sama7g5-pinfunc.h
arch/arm/boot/dts/sama7g5.dtsi
arch/arm/boot/dts/spear1310-evb.dts
arch/arm/boot/dts/spear1340-evb.dts
arch/arm/boot/dts/spear310.dtsi
arch/arm/boot/dts/spear320.dtsi
arch/arm/boot/dts/spear320s.dtsi [new file with mode: 0644]
arch/arm/boot/dts/ste-dbx5x0.dtsi
arch/arm/boot/dts/ste-ux500-samsung-gavini.dts
arch/arm/boot/dts/stm32f429-disco.dts
arch/arm/boot/dts/stm32mp15-pinctrl.dtsi
arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-ctouch2-of10.dts [new file with mode: 0644]
arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-edimm2.2.dts
arch/arm/boot/dts/stm32mp157c-ev1.dts
arch/arm/boot/dts/stm32mp15xx-dkx.dtsi
arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
arch/arm/boot/dts/sun8i-h3-nanopi.dtsi
arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
arch/arm/boot/dts/sun8i-h3.dtsi
arch/arm/boot/dts/sun8i-r40.dtsi
arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi
arch/arm/boot/dts/sunxi-h3-h5.dtsi
arch/arm/boot/dts/sunxi-libretech-all-h3-cc.dtsi
arch/arm/boot/dts/vf610-zii-dev-rev-b.dts
arch/arm64/boot/dts/allwinner/Makefile
arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6-mini.dts [new file with mode: 0644]
arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
arch/arm64/boot/dts/altera/socfpga_stratix10_socdk_nand.dts
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts
arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
arch/arm64/boot/dts/apple/Makefile
arch/arm64/boot/dts/apple/t8103-j274.dts
arch/arm64/boot/dts/apple/t8103-j293.dts [new file with mode: 0644]
arch/arm64/boot/dts/apple/t8103-j313.dts [new file with mode: 0644]
arch/arm64/boot/dts/apple/t8103-j456.dts [new file with mode: 0644]
arch/arm64/boot/dts/apple/t8103-j457.dts [new file with mode: 0644]
arch/arm64/boot/dts/apple/t8103-jxxx.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/apple/t8103-pmgr.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/apple/t8103.dtsi
arch/arm64/boot/dts/exynos/exynos5433.dtsi
arch/arm64/boot/dts/exynos/exynos7.dtsi
arch/arm64/boot/dts/exynos/exynosautov9-sadk.dts
arch/arm64/boot/dts/exynos/exynosautov9.dtsi
arch/arm64/boot/dts/freescale/Makefile
arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-13bb.dts [new file with mode: 0644]
arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-65bb.dts [new file with mode: 0644]
arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-7777.dts [new file with mode: 0644]
arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-85bb.dts [new file with mode: 0644]
arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-899b.dts [new file with mode: 0644]
arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-9999.dts [new file with mode: 0644]
arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts
arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi
arch/arm64/boot/dts/freescale/fsl-lx2160a-qds.dts
arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts
arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
arch/arm64/boot/dts/freescale/fsl-lx2162a-qds.dts
arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi
arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi
arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi
arch/arm64/boot/dts/freescale/imx8mm-icore-mx8mm-ctouch2.dts
arch/arm64/boot/dts/freescale/imx8mm-icore-mx8mm-edimm2.2.dts
arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml-mba8mx.dts [new file with mode: 0644]
arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/freescale/imx8mm.dtsi
arch/arm64/boot/dts/freescale/imx8mn-beacon-baseboard.dtsi
arch/arm64/boot/dts/freescale/imx8mn-beacon-som.dtsi
arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2.dts [new file with mode: 0644]
arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2pro.dts [new file with mode: 0644]
arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi
arch/arm64/boot/dts/freescale/imx8mn-tqma8mqnl-mba8mx.dts [new file with mode: 0644]
arch/arm64/boot/dts/freescale/imx8mn-tqma8mqnl.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/freescale/imx8mn.dtsi
arch/arm64/boot/dts/freescale/imx8mp-evk.dts
arch/arm64/boot/dts/freescale/imx8mp.dtsi
arch/arm64/boot/dts/freescale/imx8mq-evk.dts
arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dts
arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/freescale/imx8mq-librem5-r4.dts
arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2.dts
arch/arm64/boot/dts/freescale/imx8mq-nitrogen-som.dtsi
arch/arm64/boot/dts/freescale/imx8mq-tqma8mq-mba8mx.dts [new file with mode: 0644]
arch/arm64/boot/dts/freescale/imx8mq-tqma8mq.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/freescale/imx8mq.dtsi
arch/arm64/boot/dts/freescale/imx8qm.dtsi
arch/arm64/boot/dts/freescale/imx8qxp.dtsi
arch/arm64/boot/dts/freescale/imx8ulp-evk.dts [new file with mode: 0644]
arch/arm64/boot/dts/freescale/imx8ulp-pinfunc.h [new file with mode: 0755]
arch/arm64/boot/dts/freescale/imx8ulp.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/freescale/mba8mx.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/intel/socfpga_agilex_socdk_nand.dts
arch/arm64/boot/dts/intel/socfpga_n5x_socdk.dts
arch/arm64/boot/dts/marvell/armada-37xx.dtsi
arch/arm64/boot/dts/marvell/cn9130-crb.dtsi
arch/arm64/boot/dts/marvell/cn9130.dtsi
arch/arm64/boot/dts/mediatek/Makefile
arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts [new file with mode: 0644]
arch/arm64/boot/dts/mediatek/mt7986a.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts [new file with mode: 0644]
arch/arm64/boot/dts/mediatek/mt7986b.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi
arch/arm64/boot/dts/mediatek/mt8173.dtsi
arch/arm64/boot/dts/mediatek/mt8183-evb.dts
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-cozmo.dts [new file with mode: 0644]
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku1.dts
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku6.dts
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku7.dts [new file with mode: 0644]
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel.dtsi
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel14-sku2.dts [new file with mode: 0644]
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel14.dts
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi.dtsi
arch/arm64/boot/dts/mediatek/mt8183-kukui-kakadu-sku22.dts [new file with mode: 0644]
arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
arch/arm64/boot/dts/mediatek/mt8183.dtsi
arch/arm64/boot/dts/mediatek/mt8192.dtsi
arch/arm64/boot/dts/mediatek/mt8516.dtsi
arch/arm64/boot/dts/nvidia/Makefile
arch/arm64/boot/dts/nvidia/tegra132-norrin.dts
arch/arm64/boot/dts/nvidia/tegra132-peripherals-opp.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/nvidia/tegra132.dtsi
arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts
arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi
arch/arm64/boot/dts/nvidia/tegra186-p3509-0000+p3636-0001.dts
arch/arm64/boot/dts/nvidia/tegra186.dtsi
arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi
arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts
arch/arm64/boot/dts/nvidia/tegra194-p3509-0000.dtsi
arch/arm64/boot/dts/nvidia/tegra194-p3668-0000.dtsi
arch/arm64/boot/dts/nvidia/tegra194-p3668.dtsi
arch/arm64/boot/dts/nvidia/tegra194.dtsi
arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi
arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts
arch/arm64/boot/dts/nvidia/tegra210-p2530.dtsi
arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi
arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts
arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
arch/arm64/boot/dts/nvidia/tegra210.dtsi
arch/arm64/boot/dts/nvidia/tegra234-p3701-0000.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts [new file with mode: 0644]
arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/nvidia/tegra234-sim-vdk.dts
arch/arm64/boot/dts/nvidia/tegra234.dtsi
arch/arm64/boot/dts/renesas/Makefile
arch/arm64/boot/dts/renesas/cat875.dtsi
arch/arm64/boot/dts/renesas/r8a774a1.dtsi
arch/arm64/boot/dts/renesas/r8a774b1.dtsi
arch/arm64/boot/dts/renesas/r8a774c0.dtsi
arch/arm64/boot/dts/renesas/r8a774e1.dtsi
arch/arm64/boot/dts/renesas/r8a77951.dtsi
arch/arm64/boot/dts/renesas/r8a77960.dtsi
arch/arm64/boot/dts/renesas/r8a77961.dtsi
arch/arm64/boot/dts/renesas/r8a77965.dtsi
arch/arm64/boot/dts/renesas/r8a77980.dtsi
arch/arm64/boot/dts/renesas/r8a77990.dtsi
arch/arm64/boot/dts/renesas/r8a77995.dtsi
arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi
arch/arm64/boot/dts/renesas/r8a779a0.dtsi
arch/arm64/boot/dts/renesas/r8a779f0-spider-cpu.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/renesas/r8a779f0-spider.dts [new file with mode: 0644]
arch/arm64/boot/dts/renesas/r8a779f0.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/renesas/r9a07g044.dtsi
arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi
arch/arm64/boot/dts/renesas/rzg2l-smarc.dtsi
arch/arm64/boot/dts/renesas/salvator-common.dtsi
arch/arm64/boot/dts/renesas/ulcb.dtsi
arch/arm64/boot/dts/rockchip/px30.dtsi
arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts
arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi
arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4a-plus.dts
arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b-plus.dts
arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b.dts
arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4c.dts
arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts
arch/arm64/boot/dts/rockchip/rk356x.dtsi
arch/arm64/boot/dts/ti/Makefile
arch/arm64/boot/dts/ti/k3-am64-main.dtsi
arch/arm64/boot/dts/ti/k3-am642-evm.dts
arch/arm64/boot/dts/ti/k3-am642-sk.dts
arch/arm64/boot/dts/ti/k3-am642.dtsi
arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
arch/arm64/boot/dts/ti/k3-am654-base-board.dts
arch/arm64/boot/dts/ti/k3-j7200-main.dtsi
arch/arm64/boot/dts/ti/k3-j7200.dtsi
arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts
arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi
arch/arm64/boot/dts/ti/k3-j721e.dtsi
arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts [new file with mode: 0644]
arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/ti/k3-j721s2.dtsi [new file with mode: 0644]
arch/arm64/kvm/arm.c
arch/hexagon/include/asm/timer-regs.h [deleted file]
arch/hexagon/include/asm/timex.h
arch/hexagon/kernel/.gitignore [new file with mode: 0644]
arch/hexagon/kernel/time.c
arch/hexagon/lib/io.c
arch/m68k/kernel/traps.c
arch/mips/bcm63xx/clk.c
arch/mips/generic/yamon-dt.c
arch/mips/kernel/syscalls/syscall_n32.tbl
arch/mips/kernel/syscalls/syscall_n64.tbl
arch/mips/kernel/syscalls/syscall_o32.tbl
arch/mips/kvm/mips.c
arch/mips/lantiq/clk.c
arch/parisc/configs/generic-32bit_defconfig
arch/parisc/include/asm/assembly.h
arch/parisc/include/asm/jump_label.h
arch/parisc/include/asm/rt_sigframe.h
arch/parisc/kernel/signal.c
arch/parisc/kernel/signal32.h
arch/parisc/kernel/syscalls/syscall.tbl
arch/powerpc/kernel/Makefile
arch/powerpc/kernel/head_8xx.S
arch/powerpc/kernel/signal.h
arch/powerpc/kernel/signal_32.c
arch/powerpc/kernel/signal_64.c
arch/powerpc/kernel/watchdog.c
arch/powerpc/kvm/book3s_hv_rmhandlers.S
arch/powerpc/kvm/powerpc.c
arch/powerpc/mm/nohash/kaslr_booke.c
arch/powerpc/mm/nohash/tlb.c
arch/powerpc/mm/numa.c
arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
arch/powerpc/platforms/pseries/iommu.c
arch/powerpc/sysdev/xive/Kconfig
arch/powerpc/sysdev/xive/common.c
arch/riscv/Makefile
arch/riscv/configs/defconfig
arch/riscv/configs/rv32_defconfig
arch/riscv/kvm/vcpu.c
arch/riscv/kvm/vcpu_sbi.c
arch/riscv/kvm/vm.c
arch/s390/Kconfig
arch/s390/Makefile
arch/s390/boot/startup.c
arch/s390/include/asm/kexec.h
arch/s390/kernel/crash_dump.c
arch/s390/kernel/ipl.c
arch/s390/kernel/machine_kexec_file.c
arch/s390/kernel/setup.c
arch/s390/kernel/syscalls/syscall.tbl
arch/s390/kernel/traps.c
arch/s390/kernel/vdso32/Makefile
arch/s390/kernel/vdso64/Makefile
arch/s390/kvm/kvm-s390.c
arch/sparc/kernel/signal_32.c
arch/sparc/kernel/windows.c
arch/x86/Kconfig
arch/x86/entry/vsyscall/vsyscall_64.c
arch/x86/events/intel/core.c
arch/x86/events/intel/uncore_snbep.c
arch/x86/hyperv/hv_init.c
arch/x86/include/asm/kvm_host.h
arch/x86/kernel/cpu/mshyperv.c
arch/x86/kernel/cpu/sgx/main.c
arch/x86/kernel/process.c
arch/x86/kernel/setup.c
arch/x86/kernel/vm86_32.c
arch/x86/kvm/cpuid.c
arch/x86/kvm/hyperv.c
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/svm/sev.c
arch/x86/kvm/svm/svm.h
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/vmx/vmx.h
arch/x86/kvm/x86.c
arch/x86/kvm/x86.h
arch/x86/kvm/xen.c
block/blk-cgroup.c
block/blk-core.c
block/blk-flush.c
block/blk-mq.c
block/blk-mq.h
block/blk-sysfs.c
block/blk.h
block/elevator.c
block/genhd.c
block/ioprio.c
drivers/acpi/glue.c
drivers/acpi/internal.h
drivers/acpi/scan.c
drivers/ata/ahci.c
drivers/ata/libahci.c
drivers/ata/libata-core.c
drivers/ata/libata-sata.c
drivers/clk/sunxi-ng/ccu-sun50i-a64.h
drivers/clk/sunxi-ng/ccu-sun8i-h3.h
drivers/gpio/Kconfig
drivers/gpio/gpio-virtio.c
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/include/amd_shared.h
drivers/gpu/drm/amd/pm/amdgpu_dpm.c
drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h
drivers/gpu/drm/amd/pm/swsmu/smu11/cyan_skillfish_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.h
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
drivers/gpu/drm/drm_gem_cma_helper.c
drivers/gpu/drm/i915/display/icl_dsi.c
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmigv100.c
drivers/gpu/drm/scheduler/sched_main.c
drivers/gpu/drm/sun4i/Kconfig
drivers/hv/hv_balloon.c
drivers/infiniband/core/nldev.c
drivers/infiniband/core/verbs.c
drivers/infiniband/hw/hfi1/verbs.c
drivers/infiniband/hw/mlx4/main.c
drivers/net/amt.c
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c
drivers/net/ethernet/asix/ax88796c_main.h
drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h
drivers/net/ethernet/broadcom/bnxt/bnxt.h
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
drivers/net/ethernet/dec/tulip/de4x5.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c
drivers/net/ethernet/intel/e100.c
drivers/net/ethernet/intel/i40e/i40e.h
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
drivers/net/ethernet/intel/iavf/iavf.h
drivers/net/ethernet/intel/iavf/iavf_ethtool.c
drivers/net/ethernet/intel/iavf/iavf_main.c
drivers/net/ethernet/lantiq_etop.c
drivers/net/ethernet/marvell/mvmdio.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
drivers/net/ethernet/mellanox/mlx5/core/cmd.c
drivers/net/ethernet/mellanox/mlx5/core/cq.c
drivers/net/ethernet/mellanox/mlx5/core/debugfs.c
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.h
drivers/net/ethernet/mellanox/mlx5/core/en/tc_priv.h
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c
drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h
drivers/net/ethernet/sis/sis900.c
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
drivers/net/hamradio/6pack.c
drivers/net/ipa/ipa_endpoint.c
drivers/net/ipa/ipa_resource.c
drivers/net/tun.c
drivers/net/usb/r8152.c
drivers/pinctrl/pinctrl-amd.c
drivers/pinctrl/pinctrl-apple-gpio.c
drivers/pinctrl/qcom/Kconfig
drivers/pinctrl/qcom/pinctrl-sdm845.c
drivers/pinctrl/qcom/pinctrl-sm8350.c
drivers/pinctrl/ralink/pinctrl-mt7620.c
drivers/pinctrl/tegra/pinctrl-tegra.c
drivers/pinctrl/tegra/pinctrl-tegra194.c
drivers/platform/mellanox/mlxreg-lc.c
drivers/platform/x86/Kconfig
drivers/platform/x86/dell/Kconfig
drivers/platform/x86/hp_accel.c
drivers/platform/x86/samsung-laptop.c
drivers/platform/x86/think-lmi.c
drivers/platform/x86/think-lmi.h
drivers/platform/x86/thinkpad_acpi.c
drivers/powercap/dtpm_cpu.c
drivers/ptp/ptp_clockmatrix.c
drivers/ptp/ptp_ocp.c
drivers/s390/block/dasd_devmap.c
drivers/s390/char/raw3270.c
drivers/s390/cio/chp.c
drivers/scsi/qla2xxx/qla_mbx.c
drivers/scsi/scsi_sysfs.c
drivers/scsi/scsi_transport_iscsi.c
drivers/scsi/ufs/ufshcd.c
drivers/spi/spi-cadence-quadspi.c
drivers/spi/spi-fsl-lpspi.c
drivers/spi/spi-geni-qcom.c
drivers/spi/spi.c
drivers/thermal/intel/int340x_thermal/Kconfig
drivers/thermal/thermal_core.c
drivers/video/console/sticon.c
drivers/video/fbdev/efifb.c
drivers/video/fbdev/simplefb.c
fs/attr.c
fs/btrfs/async-thread.c
fs/btrfs/disk-io.c
fs/btrfs/ioctl.c
fs/btrfs/lzo.c
fs/btrfs/scrub.c
fs/btrfs/volumes.c
fs/cifs/cifs_swn.c
fs/cifs/cifsproto.h
fs/cifs/connect.c
fs/cifs/dfs_cache.c
fs/cifs/sess.c
fs/gfs2/bmap.c
fs/gfs2/file.c
fs/gfs2/glock.c
fs/gfs2/super.c
fs/nfsd/nfs4xdr.c
fs/proc/vmcore.c
fs/pstore/Kconfig
fs/pstore/blk.c
fs/udf/dir.c
fs/udf/namei.c
fs/udf/super.c
include/dt-bindings/clock/r8a779f0-cpg-mssr.h [new file with mode: 0644]
include/dt-bindings/clock/sun50i-a64-ccu.h
include/dt-bindings/clock/sun8i-h3-ccu.h
include/dt-bindings/clock/tegra234-clock.h
include/dt-bindings/memory/tegra234-mc.h [new file with mode: 0644]
include/dt-bindings/pinctrl/k3.h
include/dt-bindings/pinctrl/samsung.h
include/dt-bindings/power/imx8ulp-power.h [new file with mode: 0644]
include/dt-bindings/power/r8a779f0-sysc.h [new file with mode: 0644]
include/dt-bindings/reset/tegra234-reset.h
include/dt-bindings/soc/samsung,exynos-usi.h [new file with mode: 0644]
include/linux/acpi.h
include/linux/bpf.h
include/linux/hugetlb_cgroup.h
include/linux/ipc_namespace.h
include/linux/kvm_host.h
include/linux/kvm_types.h
include/linux/mlx5/eswitch.h
include/linux/mm_types.h
include/linux/percpu.h
include/linux/printk.h
include/linux/sched/signal.h
include/linux/sched/task.h
include/linux/sdb.h [deleted file]
include/linux/skbuff.h
include/linux/trace_events.h
include/linux/virtio_net.h
include/net/nfc/nci_core.h
include/net/page_pool.h
include/rdma/rdma_netlink.h
init/Kconfig
ipc/shm.c
ipc/util.c
kernel/bpf/cgroup.c
kernel/bpf/helpers.c
kernel/bpf/syscall.c
kernel/bpf/verifier.c
kernel/entry/syscall_user_dispatch.c
kernel/printk/printk.c
kernel/signal.c
kernel/trace/bpf_trace.c
kernel/trace/trace.c
kernel/trace/trace_events_hist.c
lib/nmi_backtrace.c
lib/test_kasan.c
lib/zstd/Makefile
lib/zstd/common/compiler.h
lib/zstd/compress/zstd_compress_superblock.c
lib/zstd/compress/zstd_opt.c
mm/Kconfig
mm/damon/dbgfs.c
mm/highmem.c
mm/hugetlb.c
mm/slab.c
mm/slab.h
mm/slob.c
mm/slub.c
mm/swap.c
net/core/devlink.c
net/core/filter.c
net/core/page_pool.c
net/core/sock.c
net/ipv4/bpf_tcp_ca.c
net/ipv4/devinet.c
net/ipv4/tcp.c
net/ipv4/udp.c
net/ipv6/esp6.c
net/mac80211/cfg.c
net/mac80211/iface.c
net/mac80211/led.h
net/mac80211/rx.c
net/mac80211/tx.c
net/mac80211/util.c
net/mac80211/wme.c
net/nfc/core.c
net/nfc/nci/core.c
net/sched/act_mirred.c
net/smc/af_smc.c
net/smc/smc_core.c
net/tipc/crypto.c
net/tipc/link.c
net/wireless/nl80211.c
net/wireless/nl80211.h
net/wireless/util.c
net/xdp/xsk_buff_pool.c
samples/Kconfig
samples/Makefile
samples/bpf/hbm_kern.h
samples/bpf/xdp_redirect_cpu_user.c
samples/bpf/xdp_sample_user.c
samples/ftrace/Makefile
samples/ftrace/ftrace-direct-multi.c
tools/arch/x86/include/asm/cpufeatures.h
tools/arch/x86/include/uapi/asm/kvm.h
tools/bpf/runqslower/Makefile
tools/build/feature/test-all.c
tools/include/uapi/linux/kvm.h
tools/lib/bpf/bpf_gen_internal.h
tools/lib/bpf/gen_loader.c
tools/lib/bpf/libbpf.c
tools/perf/Makefile.config
tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl
tools/perf/bench/sched-messaging.c
tools/perf/builtin-report.c
tools/perf/tests/event_update.c
tools/perf/tests/sample-parsing.c
tools/perf/tests/wp.c
tools/perf/ui/hist.c
tools/perf/util/arm-spe.c
tools/perf/util/evsel.c
tools/perf/util/header.c
tools/perf/util/hist.c
tools/perf/util/hist.h
tools/perf/util/parse-events.c
tools/perf/util/sort.c
tools/perf/util/sort.h
tools/perf/util/util.c
tools/perf/util/util.h
tools/testing/selftests/bpf/Makefile
tools/testing/selftests/bpf/prog_tests/helper_restricted.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/test_helper_restricted.c [new file with mode: 0644]
tools/testing/selftests/bpf/test_verifier.c
tools/testing/selftests/bpf/verifier/helper_restricted.c [new file with mode: 0644]
tools/testing/selftests/bpf/verifier/map_in_map.c
tools/testing/selftests/gpio/Makefile
tools/testing/selftests/gpio/gpio-mockup-cdev.c
tools/testing/selftests/kvm/.gitignore
tools/testing/selftests/kvm/access_tracking_perf_test.c
tools/testing/selftests/kvm/demand_paging_test.c
tools/testing/selftests/kvm/dirty_log_perf_test.c
tools/testing/selftests/kvm/dirty_log_test.c
tools/testing/selftests/kvm/include/perf_test_util.h
tools/testing/selftests/kvm/include/test_util.h
tools/testing/selftests/kvm/kvm_page_table_test.c
tools/testing/selftests/kvm/lib/elf.c
tools/testing/selftests/kvm/lib/kvm_util.c
tools/testing/selftests/kvm/lib/perf_test_util.c
tools/testing/selftests/kvm/lib/test_util.c
tools/testing/selftests/kvm/memslot_modification_stress_test.c
tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c
tools/testing/selftests/net/forwarding/config
tools/testing/selftests/net/forwarding/tc_actions.sh
tools/testing/selftests/net/gre_gso.sh
virt/kvm/kvm_main.c

index 14314e3..6277bb2 100644 (file)
--- a/.mailmap
+++ b/.mailmap
@@ -71,6 +71,9 @@ Chao Yu <chao@kernel.org> <chao2.yu@samsung.com>
 Chao Yu <chao@kernel.org> <yuchao0@huawei.com>
 Chris Chiu <chris.chiu@canonical.com> <chiu@endlessm.com>
 Chris Chiu <chris.chiu@canonical.com> <chiu@endlessos.org>
+Christian Borntraeger <borntraeger@linux.ibm.com> <borntraeger@de.ibm.com>
+Christian Borntraeger <borntraeger@linux.ibm.com> <cborntra@de.ibm.com>
+Christian Borntraeger <borntraeger@linux.ibm.com> <borntrae@de.ibm.com>
 Christophe Ricard <christophe.ricard@gmail.com>
 Christoph Hellwig <hch@lst.de>
 Colin Ian King <colin.king@intel.com> <colin.king@canonical.com>
index 6721a80..475eb0e 100644 (file)
@@ -1520,15 +1520,15 @@ This sysfs attribute controls the keyboard "face" that will be shown on the
 Lenovo X1 Carbon 2nd gen (2014)'s adaptive keyboard. The value can be read
 and set.
 
-- 1 = Home mode
-- 2 = Web-browser mode
-- 3 = Web-conference mode
-- 4 = Function mode
-- 5 = Layflat mode
+- 0 = Home mode
+- 1 = Web-browser mode
+- 2 = Web-conference mode
+- 3 = Function mode
+- 4 = Layflat mode
 
 For more details about which buttons will appear depending on the mode, please
 review the laptop's user guide:
-http://www.lenovo.com/shop/americas/content/user_guides/x1carbon_2_ug_en.pdf
+https://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles_pdf/x1carbon_2_ug_en.pdf
 
 Battery charge control
 ----------------------
index 4261620..0e486f4 100644 (file)
@@ -1099,7 +1099,7 @@ task_delayacct
 ===============
 
 Enables/disables task delay accounting (see
-:doc:`accounting/delay-accounting.rst`). Enabling this feature incurs
+Documentation/accounting/delay-accounting.rst. Enabling this feature incurs
 a small amount of overhead in the scheduler but is useful for debugging
 and performance tuning. It is required by some tools such as iotop.
 
index 8323c79..9485a5a 100644 (file)
@@ -104,6 +104,8 @@ Discovery family
 
                 Not supported by the Linux kernel.
 
+  Homepage:
+        https://web.archive.org/web/20110924171043/http://www.marvell.com/embedded-processors/discovery-innovation/
   Core:
        Feroceon 88fr571-vd ARMv5 compatible
 
@@ -120,6 +122,7 @@ EBU Armada family
         - 88F6707
         - 88F6W11
 
+    - Product infos:   https://web.archive.org/web/20141002083258/http://www.marvell.com/embedded-processors/armada-370/
     - Product Brief:   https://web.archive.org/web/20121115063038/http://www.marvell.com/embedded-processors/armada-300/assets/Marvell_ARMADA_370_SoC.pdf
     - Hardware Spec:   https://web.archive.org/web/20140617183747/http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA370-datasheet.pdf
     - Functional Spec: https://web.archive.org/web/20140617183701/http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA370-FunctionalSpec-datasheet.pdf
@@ -127,9 +130,29 @@ EBU Armada family
   Core:
        Sheeva ARMv7 compatible PJ4B
 
+  Armada XP Flavors:
+        - MV78230
+        - MV78260
+        - MV78460
+
+    NOTE:
+       not to be confused with the non-SMP 78xx0 SoCs
+
+    - Product infos:   https://web.archive.org/web/20150101215721/http://www.marvell.com/embedded-processors/armada-xp/
+    - Product Brief:   https://web.archive.org/web/20121021173528/http://www.marvell.com/embedded-processors/armada-xp/assets/Marvell-ArmadaXP-SoC-product%20brief.pdf
+    - Functional Spec: https://web.archive.org/web/20180829171131/http://www.marvell.com/embedded-processors/armada-xp/assets/ARMADA-XP-Functional-SpecDatasheet.pdf
+    - Hardware Specs:
+        - https://web.archive.org/web/20141127013651/http://www.marvell.com/embedded-processors/armada-xp/assets/HW_MV78230_OS.PDF
+        - https://web.archive.org/web/20141222000224/http://www.marvell.com/embedded-processors/armada-xp/assets/HW_MV78260_OS.PDF
+        - https://web.archive.org/web/20141222000230/http://www.marvell.com/embedded-processors/armada-xp/assets/HW_MV78460_OS.PDF
+
+  Core:
+       Sheeva ARMv7 compatible Dual-core or Quad-core PJ4B-MP
+
   Armada 375 Flavors:
        - 88F6720
 
+    - Product infos: https://web.archive.org/web/20140108032402/http://www.marvell.com/embedded-processors/armada-375/
     - Product Brief: https://web.archive.org/web/20131216023516/http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA_375_SoC-01_product_brief.pdf
 
   Core:
@@ -162,29 +185,6 @@ EBU Armada family
   Core:
        ARM Cortex-A9
 
-  Armada XP Flavors:
-        - MV78230
-        - MV78260
-        - MV78460
-
-    NOTE:
-       not to be confused with the non-SMP 78xx0 SoCs
-
-    Product Brief:
-       https://web.archive.org/web/20121021173528/http://www.marvell.com/embedded-processors/armada-xp/assets/Marvell-ArmadaXP-SoC-product%20brief.pdf
-
-    Functional Spec:
-       https://web.archive.org/web/20180829171131/http://www.marvell.com/embedded-processors/armada-xp/assets/ARMADA-XP-Functional-SpecDatasheet.pdf
-
-    - Hardware Specs:
-
-        - https://web.archive.org/web/20141127013651/http://www.marvell.com/embedded-processors/armada-xp/assets/HW_MV78230_OS.PDF
-        - https://web.archive.org/web/20141222000224/http://www.marvell.com/embedded-processors/armada-xp/assets/HW_MV78260_OS.PDF
-        - https://web.archive.org/web/20141222000230/http://www.marvell.com/embedded-processors/armada-xp/assets/HW_MV78460_OS.PDF
-
-  Core:
-       Sheeva ARMv7 compatible Dual-core or Quad-core PJ4B-MP
-
   Linux kernel mach directory:
        arch/arm/mach-mvebu
   Linux kernel plat directory:
@@ -436,7 +436,7 @@ Berlin family (Multimedia Solutions)
   - Flavors:
        - 88DE3010, Armada 1000 (no Linux support)
                - Core:         Marvell PJ1 (ARMv5TE), Dual-core
-               - Product Brief:        http://www.marvell.com.cn/digital-entertainment/assets/armada_1000_pb.pdf
+               - Product Brief:        https://web.archive.org/web/20131103162620/http://www.marvell.com/digital-entertainment/assets/armada_1000_pb.pdf
        - 88DE3005, Armada 1500 Mini
                - Design name:  BG2CD
                - Core:         ARM Cortex-A9, PL310 L2CC
index 37f273a..610450f 100644 (file)
@@ -15,7 +15,7 @@ that goes into great technical depth about the BPF Architecture.
 libbpf
 ======
 
-Documentation/bpf/libbpf/libbpf.rst is a userspace library for loading and interacting with bpf programs.
+Documentation/bpf/libbpf/index.rst is a userspace library for loading and interacting with bpf programs.
 
 BPF Type Format (BTF)
 =====================
index 1e772c8..8d93e8a 100644 (file)
@@ -12,12 +12,19 @@ maintainers:
 description: |
   ARM platforms using SoCs designed by Apple Inc., branded "Apple Silicon".
 
-  This currently includes devices based on the "M1" SoC, starting with the
-  three Mac models released in late 2020:
+  This currently includes devices based on the "M1" SoC:
 
   - Mac mini (M1, 2020)
   - MacBook Pro (13-inch, M1, 2020)
   - MacBook Air (M1, 2020)
+  - iMac (24-inch, M1, 2021)
+
+  And devices based on the "M1 Pro" and "M1 Max" SoCs:
+
+  - MacBook Pro (14-inch, M1 Pro, 2021)
+  - MacBook Pro (14-inch, M1 Max, 2021)
+  - MacBook Pro (16-inch, M1 Pro, 2021)
+  - MacBook Pro (16-inch, M1 Max, 2021)
 
   The compatible property should follow this format:
 
@@ -56,8 +63,24 @@ properties:
               - apple,j274 # Mac mini (M1, 2020)
               - apple,j293 # MacBook Pro (13-inch, M1, 2020)
               - apple,j313 # MacBook Air (M1, 2020)
+              - apple,j456 # iMac (24-inch, 4x USB-C, M1, 2021)
+              - apple,j457 # iMac (24-inch, 2x USB-C, M1, 2021)
           - const: apple,t8103
           - const: apple,arm-platform
+      - description: Apple M1 Pro SoC based platforms
+        items:
+          - enum:
+              - apple,j314s # MacBook Pro (14-inch, M1 Pro, 2021)
+              - apple,j316s # MacBook Pro (16-inch, M1 Pro, 2021)
+          - const: apple,t6000
+          - const: apple,arm-platform
+      - description: Apple M1 Max SoC based platforms
+        items:
+          - enum:
+              - apple,j314c # MacBook Pro (14-inch, M1 Max, 2021)
+              - apple,j316c # MacBook Pro (16-inch, M1 Max, 2021)
+          - const: apple,t6001
+          - const: apple,arm-platform
 
 additionalProperties: true
 
diff --git a/Documentation/devicetree/bindings/arm/apple/apple,pmgr.yaml b/Documentation/devicetree/bindings/arm/apple/apple,pmgr.yaml
new file mode 100644 (file)
index 0000000..b6b5d3a
--- /dev/null
@@ -0,0 +1,134 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/apple/apple,pmgr.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Apple SoC Power Manager (PMGR)
+
+maintainers:
+  - Hector Martin <marcan@marcan.st>
+
+description: |
+  Apple SoCs include PMGR blocks responsible for power management,
+  which can control various clocks, resets, power states, and
+  performance features. This node represents the PMGR as a syscon,
+  with sub-nodes representing individual features.
+
+properties:
+  $nodename:
+    pattern: "^power-management@[0-9a-f]+$"
+
+  compatible:
+    items:
+      - enum:
+          - apple,t8103-pmgr
+          - apple,t6000-pmgr
+      - const: apple,pmgr
+      - const: syscon
+      - const: simple-mfd
+
+  reg:
+    maxItems: 1
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 1
+
+patternProperties:
+  "power-controller@[0-9a-f]+$":
+    description:
+      The individual power management domains within this controller
+    type: object
+    $ref: /power/apple,pmgr-pwrstate.yaml#
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    soc {
+        #address-cells = <2>;
+        #size-cells = <2>;
+
+        power-management@23b700000 {
+            compatible = "apple,t8103-pmgr", "apple,pmgr", "syscon", "simple-mfd";
+            #address-cells = <1>;
+            #size-cells = <1>;
+            reg = <0x2 0x3b700000 0x0 0x14000>;
+
+            ps_sio: power-controller@1c0 {
+                compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+                reg = <0x1c0 8>;
+                #power-domain-cells = <0>;
+                #reset-cells = <0>;
+                label = "sio";
+                apple,always-on;
+            };
+
+            ps_uart_p: power-controller@220 {
+                compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+                reg = <0x220 8>;
+                #power-domain-cells = <0>;
+                #reset-cells = <0>;
+                label = "uart_p";
+                power-domains = <&ps_sio>;
+            };
+
+            ps_uart0: power-controller@270 {
+                compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+                reg = <0x270 8>;
+                #power-domain-cells = <0>;
+                #reset-cells = <0>;
+                label = "uart0";
+                power-domains = <&ps_uart_p>;
+            };
+        };
+
+        power-management@23d280000 {
+            compatible = "apple,t8103-pmgr", "apple,pmgr", "syscon", "simple-mfd";
+            #address-cells = <1>;
+            #size-cells = <1>;
+            reg = <0x2 0x3d280000 0x0 0xc000>;
+
+            ps_aop_filter: power-controller@4000 {
+                compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+                reg = <0x4000 8>;
+                #power-domain-cells = <0>;
+                #reset-cells = <0>;
+                label = "aop_filter";
+            };
+
+            ps_aop_base: power-controller@4010 {
+                compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+                reg = <0x4010 8>;
+                #power-domain-cells = <0>;
+                #reset-cells = <0>;
+                label = "aop_base";
+                power-domains = <&ps_aop_filter>;
+            };
+
+            ps_aop_shim: power-controller@4038 {
+                compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+                reg = <0x4038 8>;
+                #power-domain-cells = <0>;
+                #reset-cells = <0>;
+                label = "aop_shim";
+                power-domains = <&ps_aop_base>;
+            };
+
+            ps_aop_uart0: power-controller@4048 {
+                compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+                reg = <0x4048 8>;
+                #power-domain-cells = <0>;
+                #reset-cells = <0>;
+                label = "aop_uart0";
+                power-domains = <&ps_aop_shim>;
+            };
+        };
+    };
index 0b595b2..97f6eeb 100644 (file)
@@ -240,6 +240,7 @@ properties:
               - uniwest,imx6q-evi         # Uniwest Evi
               - variscite,dt6customboard
               - wand,imx6q-wandboard      # Wandboard i.MX6 Quad Board
+              - ysoft,imx6q-yapp4-crux    # i.MX6 Quad Y Soft IOTA Crux board
               - zealz,imx6q-gk802         # Zealz GK802
               - zii,imx6q-zii-rdu2        # ZII RDU2 Board
           - const: fsl,imx6q
@@ -323,6 +324,20 @@ properties:
           - const: toradex,apalis_imx6q
           - const: fsl,imx6q
 
+      - description: TQ-Systems TQMa6Q SoM (variant A) on MBa6x
+        items:
+          - const: tq,imx6q-mba6x-a
+          - const: tq,mba6a               # Expected by bootloader, to be removed in the future
+          - const: tq,imx6q-tqma6q-a
+          - const: fsl,imx6q
+
+      - description: TQ-Systems TQMa6Q SoM (variant B) on MBa6x
+        items:
+          - const: tq,imx6q-mba6x-b
+          - const: tq,mba6b               # Expected by bootloader, to be removed in the future
+          - const: tq,imx6q-tqma6q-b
+          - const: fsl,imx6q
+
       - description: i.MX6QP based Boards
         items:
           - enum:
@@ -334,6 +349,7 @@ properties:
               - kvg,vicutp                # Kverneland UT1P board
               - prt,prtwd3                # Protonic WD3 board
               - wand,imx6qp-wandboard     # Wandboard i.MX6 QuadPlus Board
+              - ysoft,imx6qp-yapp4-crux-plus  # i.MX6 Quad Plus Y Soft IOTA Crux+ board
               - zii,imx6qp-zii-rdu2       # ZII RDU2+ Board
           - const: fsl,imx6qp
 
@@ -344,6 +360,13 @@ properties:
           - const: phytec,imx6qdl-pcm058  # PHYTEC phyCORE-i.MX6
           - const: fsl,imx6qp
 
+      - description: TQ-Systems TQMa6QP SoM on MBa6x
+        items:
+          - const: tq,imx6qp-mba6x-b
+          - const: tq,mba6b               # Expected by bootloader, to be removed in the future
+          - const: tq,imx6qp-tqma6qp-b
+          - const: fsl,imx6qp
+
       - description: i.MX6DL based Boards
         items:
           - enum:
@@ -482,6 +505,20 @@ properties:
           - const: dh,imx6s-dhcom-som
           - const: fsl,imx6dl
 
+      - description: TQ-Systems TQMa6DL SoM (variant A) on MBa6x
+        items:
+          - const: tq,imx6dl-mba6x-a
+          - const: tq,mba6a               # Expected by bootloader, to be removed in the future
+          - const: tq,imx6dl-tqma6dl-a
+          - const: fsl,imx6dl
+
+      - description: TQ-Systems TQMa6DL SoM (variant B) on MBa6x
+        items:
+          - const: tq,imx6dl-mba6x-b
+          - const: tq,mba6b               # Expected by bootloader, to be removed in the future
+          - const: tq,imx6dl-tqma6dl-b
+          - const: fsl,imx6dl
+
       - description: i.MX6SL based Boards
         items:
           - enum:
@@ -580,6 +617,7 @@ properties:
         items:
           - enum:
               - fsl,imx6ull-14x14-evk     # i.MX6 UltraLiteLite 14x14 EVK Board
+              - joz,jozacp                # JOZ Access Point
               - kontron,imx6ull-n6411-som # Kontron N6411 SOM
               - myir,imx6ull-mys-6ulx-eval # MYiR Tech iMX6ULL Evaluation Board
               - toradex,colibri-imx6ull      # Colibri iMX6ULL Modules
@@ -632,6 +670,7 @@ properties:
       - description: i.MX6ULZ based Boards
         items:
           - enum:
+              - bsh,imx6ulz-bsh-smm-m2    # i.MX6 ULZ BSH SystemMaster
               - fsl,imx6ulz-14x14-evk     # i.MX6 ULZ 14x14 EVK Board
           - const: fsl,imx6ull # This seems odd. Should be last?
           - const: fsl,imx6ulz
@@ -754,10 +793,23 @@ properties:
           - const: variscite,var-som-mx8mm
           - const: fsl,imx8mm
 
+      - description:
+          TQMa8MxML is a series of SOM featuring NXP i.MX8MM system-on-chip
+          variants. It is designed to be soldered on different carrier boards.
+          All variants (TQMa8M[Q,D,S][L]ML) use the same device tree, hence only
+          one compatible is needed.
+        items:
+          - enum:
+              - tq,imx8mm-tqma8mqml-mba8mx # TQ-Systems GmbH i.MX8MM TQMa8MQML SOM on MBa8Mx
+          - const: tq,imx8mm-tqma8mqml     # TQ-Systems GmbH i.MX8MM TQMa8MQML SOM
+          - const: fsl,imx8mm
+
       - description: i.MX8MN based Boards
         items:
           - enum:
               - beacon,imx8mn-beacon-kit  # i.MX8MN Beacon Development Kit
+              - bsh,imx8mn-bsh-smm-s2     # i.MX8MN BSH SystemMaster S2
+              - bsh,imx8mn-bsh-smm-s2pro  # i.MX8MN BSH SystemMaster S2 PRO
               - fsl,imx8mn-ddr4-evk       # i.MX8MN DDR4 EVK Board
               - fsl,imx8mn-evk            # i.MX8MN LPDDR4 EVK Board
               - gw,imx8mn-gw7902          # i.MX8MM Gateworks Board
@@ -769,6 +821,17 @@ properties:
           - const: variscite,var-som-mx8mn
           - const: fsl,imx8mn
 
+      - description:
+          TQMa8MxNL is a series of SOM featuring NXP i.MX8MN system-on-chip
+          variants. It is designed to be soldered on different carrier boards.
+          All variants (TQMa8M[Q,D,S][L]NL) use the same device tree, hence only
+          one compatible is needed.
+        items:
+          - enum:
+              - tq,imx8mn-tqma8mqnl-mba8mx # TQ-Systems GmbH i.MX8MN TQMa8MQNL SOM on MBa8Mx
+          - const: tq,imx8mn-tqma8mqnl     # TQ-Systems GmbH i.MX8MN TQMa8MQNL SOM
+          - const: fsl,imx8mn
+
       - description: i.MX8MP based Boards
         items:
           - enum:
@@ -805,6 +868,15 @@ properties:
           - const: purism,librem5
           - const: fsl,imx8mq
 
+      - description:
+          TQMa8Mx is a series of SOM featuring NXP i.MX8MQ system-on-chip
+          variants. It is designed to be clicked on different carrier boards.
+        items:
+          - enum:
+              - tq,imx8mq-tqma8mq-mba8mx # TQ-Systems GmbH i.MX8MQ TQMa8Mx SOM on MBa8Mx
+          - const: tq,imx8mq-tqma8mq     # TQ-Systems GmbH i.MX8MQ TQMa8Mx SOM
+          - const: fsl,imx8mq
+
       - description: Zodiac Inflight Innovations Ultra Boards
         items:
           - enum:
@@ -834,6 +906,12 @@ properties:
           - const: toradex,colibri-imx8x
           - const: fsl,imx8qxp
 
+      - description: i.MX8ULP based Boards
+        items:
+          - enum:
+              - fsl,imx8ulp-evk           # i.MX8ULP EVK Board
+          - const: fsl,imx8ulp
+
       - description:
           Freescale Vybrid Platform Device Tree Bindings
 
index 0fa5549..0ffe1ac 100644 (file)
@@ -77,6 +77,14 @@ properties:
           - enum:
               - mediatek,mt7629-rfb
           - const: mediatek,mt7629
+      - items:
+          - enum:
+              - mediatek,mt7986a-rfb
+          - const: mediatek,mt7986a
+      - items:
+          - enum:
+              - mediatek,mt7986b-rfb
+          - const: mediatek,mt7986b
       - items:
           - enum:
               - mediatek,mt8127-moose
@@ -134,6 +142,10 @@ properties:
               - google,krane-sku176
           - const: google,krane
           - const: mediatek,mt8183
+      - description: Google Cozmo (Acer Chromebook 314)
+        items:
+          - const: google,cozmo
+          - const: mediatek,mt8183
       - description: Google Damu (ASUS Chromebook Flip CM3)
         items:
           - const: google,damu
@@ -143,7 +155,9 @@ properties:
           - enum:
               - google,fennel-sku0
               - google,fennel-sku1
+              - google,fennel-sku2
               - google,fennel-sku6
+              - google,fennel-sku7
           - const: google,fennel
           - const: mediatek,mt8183
       - description: Google Juniper (Acer Chromebook Spin 311) / Kenzo (Acer Chromebook 311)
@@ -159,6 +173,12 @@ properties:
           - const: google,kakadu-rev2
           - const: google,kakadu
           - const: mediatek,mt8183
+      - description: Google Kakadu (ASUS Chromebook Detachable CM3)
+        items:
+          - const: google,kakadu-rev3-sku22
+          - const: google,kakadu-rev2-sku22
+          - const: google,kakadu
+          - const: mediatek,mt8183
       - description: Google Kappa (HP Chromebook 11a)
         items:
           - const: google,kappa
index 5172065..6a9350e 100644 (file)
@@ -315,6 +315,18 @@ properties:
           - const: renesas,falcon-cpu
           - const: renesas,r8a779a0
 
+      - description: R-Car S4-8 (R8A779F0)
+        items:
+          - enum:
+              - renesas,spider-cpu # Spider CPU board (RTP8A779F0ASKB0SC2S)
+          - const: renesas,r8a779f0
+
+      - items:
+          - enum:
+              - renesas,spider-breakout # Spider BreakOut board (RTP8A779F0ASKB0SB0S)
+          - const: renesas,spider-cpu
+          - const: renesas,r8a779f0
+
       - description: R-Car H3e (R8A779M0)
         items:
           - enum:
index ef6dc14..052cd94 100644 (file)
@@ -199,6 +199,18 @@ properties:
               - samsung,exynos7-espresso        # Samsung Exynos7 Espresso
           - const: samsung,exynos7
 
+      - description: Exynos7885 based boards
+        items:
+          - enum:
+              - samsung,jackpotlte              # Samsung Galaxy A8 (2018)
+          - const: samsung,exynos7885
+
+      - description: Exynos850 based boards
+        items:
+          - enum:
+              - winlink,e850-96                 # WinLink E850-96
+          - const: samsung,exynos850
+
       - description: Exynos Auto v9 based boards
         items:
           - enum:
index bcaf7be..b07720e 100644 (file)
@@ -77,6 +77,7 @@ properties:
         items:
           - enum:
               - engicam,icore-stm32mp1-ctouch2       # STM32MP1 Engicam i.Core STM32MP1 C.TOUCH 2.0
+              - engicam,icore-stm32mp1-ctouch2-of10  # STM32MP1 Engicam i.Core STM32MP1 C.TOUCH 2.0 10.1" OF
               - engicam,icore-stm32mp1-edimm2.2      # STM32MP1 Engicam i.Core STM32MP1 EDIMM2.2 Starter Kit
           - const: engicam,icore-stm32mp1            # STM32MP1 Engicam i.Core STM32MP1 SoM
           - const: st,stm32mp157
index 889128a..c8a3102 100644 (file)
@@ -808,6 +808,11 @@ properties:
           - const: oranth,tanix-tx6
           - const: allwinner,sun50i-h6
 
+      - description: Tanix TX6 mini
+        items:
+          - const: oranth,tanix-tx6-mini
+          - const: allwinner,sun50i-h6
+
       - description: TBS A711 Tablet
         items:
           - const: tbs-biometrics,a711
index 29c9961..8eee312 100644 (file)
@@ -32,12 +32,38 @@ properties:
       - allwinner,sun8i-h3-mbus
       - allwinner,sun8i-r40-mbus
       - allwinner,sun50i-a64-mbus
+      - allwinner,sun50i-h5-mbus
 
   reg:
-    maxItems: 1
+    minItems: 1
+    items:
+      - description: MBUS interconnect/bandwidth limit/PMU registers
+      - description: DRAM controller/PHY registers
+
+  reg-names:
+    minItems: 1
+    items:
+      - const: mbus
+      - const: dram
 
   clocks:
+    minItems: 1
+    items:
+      - description: MBUS interconnect module clock
+      - description: DRAM controller/PHY module clock
+      - description: Register bus clock, shared by MBUS and DRAM
+
+  clock-names:
+    minItems: 1
+    items:
+      - const: mbus
+      - const: dram
+      - const: bus
+
+  interrupts:
     maxItems: 1
+    description:
+      MBUS PMU activity interrupt.
 
   dma-ranges:
     description:
@@ -54,13 +80,55 @@ required:
   - clocks
   - dma-ranges
 
+if:
+  properties:
+    compatible:
+      contains:
+        enum:
+          - allwinner,sun8i-h3-mbus
+          - allwinner,sun50i-a64-mbus
+          - allwinner,sun50i-h5-mbus
+
+then:
+  properties:
+    reg:
+      minItems: 2
+
+    reg-names:
+      minItems: 2
+
+    clocks:
+      minItems: 3
+
+    clock-names:
+      minItems: 3
+
+  required:
+    - reg-names
+    - clock-names
+
+else:
+  properties:
+    reg:
+      maxItems: 1
+
+    reg-names:
+      maxItems: 1
+
+    clocks:
+      maxItems: 1
+
+    clock-names:
+      maxItems: 1
+
 additionalProperties: false
 
 examples:
   - |
-    #include <dt-bindings/clock/sun5i-ccu.h>
+    #include <dt-bindings/clock/sun50i-a64-ccu.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
 
-    mbus: dram-controller@1c01000 {
+    dram-controller@1c01000 {
         compatible = "allwinner,sun5i-a13-mbus";
         reg = <0x01c01000 0x1000>;
         clocks = <&ccu CLK_MBUS>;
@@ -70,4 +138,21 @@ examples:
         #interconnect-cells = <1>;
     };
 
+  - |
+    dram-controller@1c62000 {
+        compatible = "allwinner,sun50i-a64-mbus";
+        reg = <0x01c62000 0x1000>,
+              <0x01c63000 0x1000>;
+        reg-names = "mbus", "dram";
+        clocks = <&ccu CLK_MBUS>,
+                 <&ccu CLK_DRAM>,
+                 <&ccu CLK_BUS_DRAM>;
+        clock-names = "mbus", "dram", "bus";
+        interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        dma-ranges = <0x00000000 0x40000000 0xc0000000>;
+        #interconnect-cells = <1>;
+    };
+
 ...
index d79d36a..49841ca 100644 (file)
@@ -36,6 +36,9 @@ properties:
               - toradex,colibri_t20-iris
           - const: toradex,colibri_t20
           - const: nvidia,tegra20
+      - items:
+          - const: asus,tf101
+          - const: nvidia,tegra20
       - items:
           - const: acer,picasso
           - const: nvidia,tegra20
@@ -49,6 +52,18 @@ properties:
               - nvidia,cardhu-a04
           - const: nvidia,cardhu
           - const: nvidia,tegra30
+      - items:
+          - const: asus,tf201
+          - const: nvidia,tegra30
+      - items:
+          - const: asus,tf300t
+          - const: nvidia,tegra30
+      - items:
+          - const: asus,tf300tg
+          - const: nvidia,tegra30
+      - items:
+          - const: asus,tf700t
+          - const: nvidia,tegra30
       - items:
           - const: toradex,apalis_t30-eval
           - const: toradex,apalis_t30
@@ -74,8 +89,12 @@ properties:
       - items:
           - const: ouya,ouya
           - const: nvidia,tegra30
+      - items:
+          - const: pegatron,chagall
+          - const: nvidia,tegra30
       - items:
           - enum:
+              - asus,tf701t
               - nvidia,dalmore
               - nvidia,roth
               - nvidia,tn7
@@ -108,14 +127,17 @@ properties:
               - nvidia,p2571
               - nvidia,p2894-0050-a08
           - const: nvidia,tegra210
-      - items:
-          - enum:
-              - nvidia,p2771-0000
-              - nvidia,p3509-0000+p3636-0001
+      - description: Jetson TX2 Developer Kit
+        items:
+          - const: nvidia,p2771-0000
           - const: nvidia,tegra186
-      - items:
-          - enum:
-              - nvidia,p2972-0000
+      - description: Jetson TX2 NX Developer Kit
+        items:
+          - const: nvidia,p3509-0000+p3636-0001
+          - const: nvidia,tegra186
+      - description: Jetson AGX Xavier Developer Kit
+        items:
+          - const: nvidia,p2972-0000
           - const: nvidia,tegra194
       - description: Jetson Xavier NX
         items:
@@ -134,8 +156,16 @@ properties:
           - const: nvidia,p3509-0000+p3668-0001
           - const: nvidia,tegra194
       - items:
-          - enum:
-              - nvidia,tegra234-vdk
+          - const: nvidia,tegra234-vdk
+          - const: nvidia,tegra234
+      - description: Jetson AGX Orin
+        items:
+          - const: nvidia,p3701-0000
+          - const: nvidia,tegra234
+      - description: Jetson AGX Orin Developer Kit
+        items:
+          - const: nvidia,p3737-0000+p3701-0000
+          - const: nvidia,p3701-0000
           - const: nvidia,tegra234
 
 additionalProperties: true
diff --git a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.txt b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.txt
deleted file mode 100644 (file)
index 576462f..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-NVIDIA Tegra Power Management Controller (PMC)
-
-Required properties:
-- compatible: Should contain one of the following:
-  - "nvidia,tegra186-pmc": for Tegra186
-  - "nvidia,tegra194-pmc": for Tegra194
-  - "nvidia,tegra234-pmc": for Tegra234
-- reg: Must contain an (offset, length) pair of the register set for each
-  entry in reg-names.
-- reg-names: Must include the following entries:
-  - "pmc"
-  - "wake"
-  - "aotag"
-  - "scratch"
-  - "misc" (Only for Tegra194 and later)
-
-Optional properties:
-- nvidia,invert-interrupt: If present, inverts the PMU interrupt signal.
-- interrupt-controller: Identifies the node as an interrupt controller.
-- #interrupt-cells: Specifies the number of cells needed to encode an
-  interrupt source. The value must be 2.
-
-Example:
-
-SoC DTSI:
-
-       pmc@c3600000 {
-               compatible = "nvidia,tegra186-pmc";
-               reg = <0 0x0c360000 0 0x10000>,
-                     <0 0x0c370000 0 0x10000>,
-                     <0 0x0c380000 0 0x10000>,
-                     <0 0x0c390000 0 0x10000>;
-               reg-names = "pmc", "wake", "aotag", "scratch";
-       };
-
-Board DTS:
-
-       pmc@c360000 {
-               nvidia,invert-interrupt;
-       };
-
-== Pad Control ==
-
-On Tegra SoCs a pad is a set of pins which are configured as a group.
-The pin grouping is a fixed attribute of the hardware. The PMC can be
-used to set pad power state and signaling voltage. A pad can be either
-in active or power down mode. The support for power state and signaling
-voltage configuration varies depending on the pad in question. 3.3 V and
-1.8 V signaling voltages are supported on pins where software
-controllable signaling voltage switching is available.
-
-Pad configurations are described with pin configuration nodes which
-are placed under the pmc node and they are referred to by the pinctrl
-client properties. For more information see
-Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt.
-
-The following pads are present on Tegra186:
-csia           csib            dsi             mipi-bias
-pex-clk-bias   pex-clk3        pex-clk2        pex-clk1
-usb0           usb1            usb2            usb-bias
-uart           audio           hsic            dbg
-hdmi-dp0       hdmi-dp1        pex-cntrl       sdmmc2-hv
-sdmmc4         cam             dsib            dsic
-dsid           csic            csid            csie
-dsif           spi             ufs             dmic-hv
-edp            sdmmc1-hv       sdmmc3-hv       conn
-audio-hv       ao-hv
-
-Required pin configuration properties:
-  - pins: A list of strings, each of which contains the name of a pad
-         to be configured.
-
-Optional pin configuration properties:
-  - low-power-enable: Configure the pad into power down mode
-  - low-power-disable: Configure the pad into active mode
-  - power-source: Must contain either TEGRA_IO_PAD_VOLTAGE_1V8 or
-    TEGRA_IO_PAD_VOLTAGE_3V3 to select between signaling voltages.
-    The values are defined in
-    include/dt-bindings/pinctrl/pinctrl-tegra-io-pad.h.
-
-Note: The power state can be configured on all of the above pads except
-      for ao-hv. Following pads have software configurable signaling
-      voltages: sdmmc2-hv, dmic-hv, sdmmc1-hv, sdmmc3-hv, audio-hv,
-      ao-hv.
-
-Pad configuration state example:
-       pmc: pmc@7000e400 {
-               compatible = "nvidia,tegra186-pmc";
-               reg = <0 0x0c360000 0 0x10000>,
-                     <0 0x0c370000 0 0x10000>,
-                     <0 0x0c380000 0 0x10000>,
-                     <0 0x0c390000 0 0x10000>;
-               reg-names = "pmc", "wake", "aotag", "scratch";
-
-               ...
-
-               sdmmc1_3v3: sdmmc1-3v3 {
-                       pins = "sdmmc1-hv";
-                       power-source = <TEGRA_IO_PAD_VOLTAGE_3V3>;
-               };
-
-               sdmmc1_1v8: sdmmc1-1v8 {
-                       pins = "sdmmc1-hv";
-                       power-source = <TEGRA_IO_PAD_VOLTAGE_1V8>;
-               };
-
-               hdmi_off: hdmi-off {
-                       pins = "hdmi";
-                       low-power-enable;
-               }
-
-               hdmi_on: hdmi-on {
-                       pins = "hdmi";
-                       low-power-disable;
-               }
-       };
-
-Pinctrl client example:
-       sdmmc1: sdhci@3400000 {
-               ...
-               pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
-               pinctrl-0 = <&sdmmc1_3v3>;
-               pinctrl-1 = <&sdmmc1_1v8>;
-       };
-
-       ...
-
-       sor0: sor@15540000 {
-               ...
-               pinctrl-0 = <&hdmi_off>;
-               pinctrl-1 = <&hdmi_on>;
-               pinctrl-names = "hdmi-on", "hdmi-off";
-       };
diff --git a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.yaml b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.yaml
new file mode 100644 (file)
index 0000000..0faa403
--- /dev/null
@@ -0,0 +1,198 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/tegra/nvidia,tegra186-pmc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra Power Management Controller (PMC)
+
+maintainers:
+  - Thierry Reding <thierry.reding@gmail.com>
+  - Jon Hunter <jonathanh@nvidia.com>
+
+properties:
+  compatible:
+    enum:
+      - nvidia,tegra186-pmc
+      - nvidia,tegra194-pmc
+      - nvidia,tegra234-pmc
+
+  reg:
+    minItems: 4
+    maxItems: 5
+
+  reg-names:
+    minItems: 4
+    items:
+      - const: pmc
+      - const: wake
+      - const: aotag
+      - const: scratch
+      - const: misc
+
+  interrupt-controller: true
+
+  "#interrupt-cells":
+    description: Specifies the number of cells needed to encode an
+      interrupt source. The value must be 2.
+    const: 2
+
+  nvidia,invert-interrupt:
+    description: If present, inverts the PMU interrupt signal.
+    $ref: /schemas/types.yaml#/definitions/flag
+
+if:
+  properties:
+    compatible:
+      contains:
+        const: nvidia,tegra186-pmc
+then:
+  properties:
+    reg:
+      maxItems: 4
+
+    reg-names:
+      maxItems: 4
+else:
+  properties:
+    reg:
+      minItems: 5
+
+    reg-names:
+      minItems: 5
+
+patternProperties:
+  "^[a-z0-9]+-[a-z0-9]+$":
+    if:
+      type: object
+    then:
+      description: |
+        These are pad configuration nodes. On Tegra SoCs a pad is a set of
+        pins which are configured as a group. The pin grouping is a fixed
+        attribute of the hardware. The PMC can be used to set pad power
+        state and signaling voltage. A pad can be either in active or
+        power down mode. The support for power state and signaling voltage
+        configuration varies depending on the pad in question. 3.3 V and
+        1.8 V signaling voltages are supported on pins where software
+        controllable signaling voltage switching is available.
+
+        Pad configurations are described with pin configuration nodes
+        which are placed under the pmc node and they are referred to by
+        the pinctrl client properties. For more information see
+
+          Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
+
+        The following pads are present on Tegra186:
+
+          csia, csib, dsi, mipi-bias, pex-clk-bias, pex-clk3, pex-clk2,
+          pex-clk1, usb0, usb1, usb2, usb-bias, uart, audio, hsic, dbg,
+          hdmi-dp0, hdmi-dp1, pex-cntrl, sdmmc2-hv, sdmmc4, cam, dsib,
+          dsic, dsid, csic, csid, csie, dsif, spi, ufs, dmic-hv, edp,
+          sdmmc1-hv, sdmmc3-hv, conn, audio-hv, ao-hv
+
+        The following pads are present on Tegra194:
+
+          csia, csib, mipi-bias, pex-clk-bias, pex-clk3, pex-clk2,
+          pex-clk1, eqos, pex-clk-2-bias, pex-clk-2, dap3, dap5, uart,
+          pwr-ctl, soc-gpio53, audio, gp-pwm2, gp-pwm3, soc-gpio12,
+          soc-gpio13, soc-gpio10, uart4, uart5, dbg, hdmi-dp3, hdmi-dp2,
+          hdmi-dp0, hdmi-dp1, pex-cntrl, pex-ctl2, pex-l0-rst,
+          pex-l1-rst, sdmmc4, pex-l5-rst, cam, csic, csid, csie, csif,
+          spi, ufs, csig, csih, edp, sdmmc1-hv, sdmmc3-hv, conn,
+          audio-hv, ao-hv
+
+      properties:
+        pins:
+          $ref: /schemas/types.yaml#/definitions/string
+          description: Must contain the name of the pad(s) to be
+            configured.
+
+        low-power-enable:
+          description: Configure the pad into power down mode.
+          $ref: /schemas/types.yaml#/definitions/flag
+
+        low-power-disable:
+          description: Configure the pad into active mode.
+          $ref: /schemas/types.yaml#/definitions/flag
+
+        power-source:
+          $ref: /schemas/types.yaml#/definitions/uint32
+          description: |
+            Must contain either TEGRA_IO_PAD_VOLTAGE_1V8 or
+            TEGRA_IO_PAD_VOLTAGE_3V3 to select between signalling
+            voltages.
+
+            The values are defined in
+
+              include/dt-bindings/pinctrl/pinctrl-tegra-io-pad.h
+
+            The power state can be configured on all of the above pads
+            except for ao-hv. Following pads have software configurable
+            signaling voltages: sdmmc2-hv, dmic-hv, sdmmc1-hv, sdmmc3-hv,
+            audio-hv, ao-hv.
+
+        phandle: true
+
+      required:
+        - pins
+
+      additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - reg-names
+
+additionalProperties: false
+
+dependencies:
+  interrupt-controller: ['#interrupt-cells']
+  "#interrupt-cells":
+    required:
+      - interrupt-controller
+
+examples:
+  - |
+    #include <dt-bindings/clock/tegra186-clock.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/pinctrl/pinctrl-tegra-io-pad.h>
+    #include <dt-bindings/memory/tegra186-mc.h>
+    #include <dt-bindings/reset/tegra186-reset.h>
+
+    pmc@c3600000 {
+        compatible = "nvidia,tegra186-pmc";
+        reg = <0x0c360000 0x10000>,
+              <0x0c370000 0x10000>,
+              <0x0c380000 0x10000>,
+              <0x0c390000 0x10000>;
+        reg-names = "pmc", "wake", "aotag", "scratch";
+        nvidia,invert-interrupt;
+
+        sdmmc1_3v3: sdmmc1-3v3 {
+            pins = "sdmmc1-hv";
+            power-source = <TEGRA_IO_PAD_VOLTAGE_3V3>;
+        };
+
+        sdmmc1_1v8: sdmmc1-1v8 {
+            pins = "sdmmc1-hv";
+            power-source = <TEGRA_IO_PAD_VOLTAGE_1V8>;
+        };
+    };
+
+    sdmmc1: mmc@3400000 {
+        compatible = "nvidia,tegra186-sdhci";
+        reg = <0x03400000 0x10000>;
+        interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&bpmp TEGRA186_CLK_SDMMC1>,
+                 <&bpmp TEGRA186_CLK_SDMMC_LEGACY_TM>;
+        clock-names = "sdhci", "tmclk";
+        resets = <&bpmp TEGRA186_RESET_SDMMC1>;
+        reset-names = "sdhci";
+        interconnects = <&mc TEGRA186_MEMORY_CLIENT_SDMMCRA &emc>,
+                        <&mc TEGRA186_MEMORY_CLIENT_SDMMCWA &emc>;
+        interconnect-names = "dma-mem", "write";
+        iommus = <&smmu TEGRA186_SID_SDMMC1>;
+        pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
+        pinctrl-0 = <&sdmmc1_3v3>;
+        pinctrl-1 = <&sdmmc1_1v8>;
+    };
index cf32723..b03c10f 100644 (file)
@@ -53,6 +53,12 @@ properties:
               - ti,am642-sk
           - const: ti,am642
 
+      - description: K3 J721s2 SoC
+        items:
+          - enum:
+              - ti,j721s2-evm
+          - const: ti,j721s2
+
 additionalProperties: true
 
 ...
diff --git a/Documentation/devicetree/bindings/bus/fsl,spba-bus.yaml b/Documentation/devicetree/bindings/bus/fsl,spba-bus.yaml
new file mode 100644 (file)
index 0000000..d42dbb0
--- /dev/null
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bus/fsl,spba-bus.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Shared Peripherals Bus Interface
+
+maintainers:
+  - Shawn Guo <shawnguo@kernel.org>
+
+description: |
+  A simple bus enabling access to shared peripherals.
+
+  The "spba-bus" follows the "simple-bus" set of properties, as
+  specified in the Devicetree Specification.  It is an extension of
+  "simple-bus" because the SDMA controller uses this compatible flag to
+  determine which peripherals are available to it and the range over which
+  the SDMA can access.  There are no special clocks for the bus, because
+  the SDMA controller itself has its interrupt and clock assignments.
+
+select:
+  properties:
+    compatible:
+      contains:
+        const: fsl,spba-bus
+  required:
+    - compatible
+
+properties:
+  $nodename:
+    pattern: "^spba-bus(@[0-9a-f]+)?$"
+
+  compatible:
+    items:
+      - const: fsl,spba-bus
+      - const: simple-bus
+
+  '#address-cells':
+    enum: [ 1, 2 ]
+
+  '#size-cells':
+    enum: [ 1, 2 ]
+
+  reg:
+    maxItems: 1
+
+  ranges: true
+
+required:
+  - compatible
+  - '#address-cells'
+  - '#size-cells'
+  - reg
+  - ranges
+
+additionalProperties:
+  type: object
+
+examples:
+  - |
+    spba-bus@30000000 {
+        compatible = "fsl,spba-bus", "simple-bus";
+        #address-cells = <1>;
+        #size-cells = <1>;
+        reg = <0x30000000 0x100000>;
+        ranges;
+    };
index 1b1d1c5..e7f5020 100644 (file)
@@ -48,6 +48,11 @@ Optional properties:
                        devices, the presence of this property indicates that
                        the weim bus should operate in Burst Clock Mode.
 
+ - fsl,continuous-burst-clk    Make Burst Clock to output continuous clock.
+                       Without this option Burst Clock will output clock
+                       only when necessary. This takes effect only if
+                       "fsl,burst-clk-enable" is set.
+
 Timing property for child nodes. It is mandatory, not optional.
 
  - fsl,weim-cs-timing: The timing array, contains timing values for the
index 459d2a5..f832abb 100644 (file)
@@ -42,6 +42,36 @@ properties:
   "#reset-cells":
     const: 1
 
+patternProperties:
+  "^(sclk)|(pll-[cem])$":
+    type: object
+    properties:
+      compatible:
+        enum:
+          - nvidia,tegra20-sclk
+          - nvidia,tegra30-sclk
+          - nvidia,tegra30-pllc
+          - nvidia,tegra30-plle
+          - nvidia,tegra30-pllm
+
+      operating-points-v2: true
+
+      clocks:
+        items:
+          - description: node's clock
+
+      power-domains:
+        maxItems: 1
+        description: phandle to the core SoC power domain
+
+    required:
+      - compatible
+      - operating-points-v2
+      - clocks
+      - power-domains
+
+    additionalProperties: false
+
 required:
   - compatible
   - reg
@@ -59,6 +89,13 @@ examples:
         reg = <0x60006000 0x1000>;
         #clock-cells = <1>;
         #reset-cells = <1>;
+
+        sclk {
+            compatible = "nvidia,tegra20-sclk";
+            operating-points-v2 = <&opp_table>;
+            clocks = <&tegra_car TEGRA20_CLK_SCLK>;
+            power-domains = <&domain>;
+        };
     };
 
     usb-controller@c5004000 {
index 0429fb7..dedc99e 100644 (file)
@@ -44,6 +44,16 @@ properties:
       - const: ahb
       - const: mod
 
+  dmas:
+    items:
+      - description: RX DMA Channel
+      - description: TX DMA Channel
+
+  dma-names:
+    items:
+      - const: rx
+      - const: tx
+
   resets:
     maxItems: 1
 
index 8a6d3e1..e61999c 100644 (file)
@@ -19,6 +19,19 @@ Required properties:
   See ../reset/reset.txt for details.
 - reset-names: Must include the following entries:
   - host1x
+  - mc
+
+Optional properties:
+- operating-points-v2: See ../bindings/opp/opp.txt for details.
+  - power-domains: Phandle to HEG or core power domain.
+
+For each opp entry in 'operating-points-v2' table of host1x and its modules:
+- opp-supported-hw: One bitfield indicating:
+       On Tegra20: SoC process ID mask
+       On Tegra30+: SoC speedo ID mask
+
+       A bitwise AND is performed against the value and if any bit
+       matches, the OPP gets enabled.
 
 Each host1x client module having to perform DMA through the Memory Controller
 should have the interconnect endpoints set to the Memory Client and External
@@ -45,6 +58,8 @@ of the following host1x client modules:
   - interconnect-names: Must include name of the interconnect path for each
     interconnect entry. Consult TRM documentation for information about
     available memory clients, see MEMORY CONTROLLER section.
+  - operating-points-v2: See ../bindings/opp/opp.txt for details.
+  - power-domains: Phandle to MPE power domain.
 
 - vi: video input
 
@@ -128,6 +143,8 @@ of the following host1x client modules:
   - interconnect-names: Must include name of the interconnect path for each
     interconnect entry. Consult TRM documentation for information about
     available memory clients, see MEMORY CONTROLLER section.
+  - operating-points-v2: See ../bindings/opp/opp.txt for details.
+  - power-domains: Phandle to VENC power domain.
 
 - epp: encoder pre-processor
 
@@ -147,6 +164,8 @@ of the following host1x client modules:
   - interconnect-names: Must include name of the interconnect path for each
     interconnect entry. Consult TRM documentation for information about
     available memory clients, see MEMORY CONTROLLER section.
+  - operating-points-v2: See ../bindings/opp/opp.txt for details.
+  - power-domains: Phandle to HEG or core power domain.
 
 - isp: image signal processor
 
@@ -166,6 +185,7 @@ of the following host1x client modules:
   - interconnect-names: Must include name of the interconnect path for each
     interconnect entry. Consult TRM documentation for information about
     available memory clients, see MEMORY CONTROLLER section.
+  - power-domains: Phandle to VENC or core power domain.
 
 - gr2d: 2D graphics engine
 
@@ -179,12 +199,15 @@ of the following host1x client modules:
     See ../reset/reset.txt for details.
   - reset-names: Must include the following entries:
     - 2d
+    - mc
 
   Optional properties:
   - interconnects: Must contain entry for the GR2D memory clients.
   - interconnect-names: Must include name of the interconnect path for each
     interconnect entry. Consult TRM documentation for information about
     available memory clients, see MEMORY CONTROLLER section.
+  - operating-points-v2: See ../bindings/opp/opp.txt for details.
+  - power-domains: Phandle to HEG or core power domain.
 
 - gr3d: 3D graphics engine
 
@@ -203,12 +226,16 @@ of the following host1x client modules:
   - reset-names: Must include the following entries:
     - 3d
     - 3d2 (Only required on SoCs with two 3D clocks)
+    - mc
+    - mc2 (Only required on SoCs with two 3D clocks)
 
   Optional properties:
   - interconnects: Must contain entry for the GR3D memory clients.
   - interconnect-names: Must include name of the interconnect path for each
     interconnect entry. Consult TRM documentation for information about
     available memory clients, see MEMORY CONTROLLER section.
+  - operating-points-v2: See ../bindings/opp/opp.txt for details.
+  - power-domains: Phandles to 3D or core power domain.
 
 - dc: display controller
 
@@ -241,6 +268,8 @@ of the following host1x client modules:
   - interconnect-names: Must include name of the interconnect path for each
     interconnect entry. Consult TRM documentation for information about
     available memory clients, see MEMORY CONTROLLER section.
+  - operating-points-v2: See ../bindings/opp/opp.txt for details.
+  - power-domains: Phandle to core power domain.
 
 - hdmi: High Definition Multimedia Interface
 
@@ -267,6 +296,7 @@ of the following host1x client modules:
   - nvidia,hpd-gpio: specifies a GPIO used for hotplug detection
   - nvidia,edid: supplies a binary EDID blob
   - nvidia,panel: phandle of a display panel
+  - operating-points-v2: See ../bindings/opp/opp.txt for details.
 
 - tvo: TV encoder output
 
@@ -277,6 +307,10 @@ of the following host1x client modules:
   - clocks: Must contain one entry, for the module clock.
     See ../clocks/clock-bindings.txt for details.
 
+  Optional properties:
+  - operating-points-v2: See ../bindings/opp/opp.txt for details.
+  - power-domains: Phandle to core power domain.
+
 - dsi: display serial interface
 
   Required properties:
@@ -305,6 +339,7 @@ of the following host1x client modules:
   - nvidia,panel: phandle of a display panel
   - nvidia,ganged-mode: contains a phandle to a second DSI controller to gang
     up with in order to support up to 8 data lanes
+  - operating-points-v2: See ../bindings/opp/opp.txt for details.
 
 - sor: serial output resource
 
@@ -408,6 +443,8 @@ Example:
                clocks = <&tegra_car TEGRA20_CLK_HOST1X>;
                resets = <&tegra_car 28>;
                reset-names = "host1x";
+               operating-points-v2 = <&dvfs_opp_table>;
+               power-domains = <&domain>;
 
                #address-cells = <1>;
                #size-cells = <1>;
@@ -421,6 +458,8 @@ Example:
                        clocks = <&tegra_car TEGRA20_CLK_MPE>;
                        resets = <&tegra_car 60>;
                        reset-names = "mpe";
+                       operating-points-v2 = <&dvfs_opp_table>;
+                       power-domains = <&domain>;
                };
 
                vi@54080000 {
@@ -429,6 +468,7 @@ Example:
                        interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
                        assigned-clocks = <&tegra_car TEGRA210_CLK_VI>;
                        assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_C4_OUT0>;
+                       operating-points-v2 = <&dvfs_opp_table>;
 
                        clocks = <&tegra_car TEGRA210_CLK_VI>;
                        power-domains = <&pd_venc>;
@@ -510,6 +550,8 @@ Example:
                        clocks = <&tegra_car TEGRA20_CLK_EPP>;
                        resets = <&tegra_car 19>;
                        reset-names = "epp";
+                       operating-points-v2 = <&dvfs_opp_table>;
+                       power-domains = <&domain>;
                };
 
                isp {
@@ -528,6 +570,8 @@ Example:
                        clocks = <&tegra_car TEGRA20_CLK_GR2D>;
                        resets = <&tegra_car 21>;
                        reset-names = "2d";
+                       operating-points-v2 = <&dvfs_opp_table>;
+                       power-domains = <&domain>;
                };
 
                gr3d {
@@ -536,6 +580,8 @@ Example:
                        clocks = <&tegra_car TEGRA20_CLK_GR3D>;
                        resets = <&tegra_car 24>;
                        reset-names = "3d";
+                       operating-points-v2 = <&dvfs_opp_table>;
+                       power-domains = <&domain>;
                };
 
                dc@54200000 {
@@ -547,6 +593,8 @@ Example:
                        clock-names = "dc", "parent";
                        resets = <&tegra_car 27>;
                        reset-names = "dc";
+                       operating-points-v2 = <&dvfs_opp_table>;
+                       power-domains = <&domain>;
 
                        interconnects = <&mc TEGRA20_MC_DISPLAY0A &emc>,
                                        <&mc TEGRA20_MC_DISPLAY0B &emc>,
@@ -571,6 +619,8 @@ Example:
                        clock-names = "dc", "parent";
                        resets = <&tegra_car 26>;
                        reset-names = "dc";
+                       operating-points-v2 = <&dvfs_opp_table>;
+                       power-domains = <&domain>;
 
                        interconnects = <&mc TEGRA20_MC_DISPLAY0AB &emc>,
                                        <&mc TEGRA20_MC_DISPLAY0BB &emc>,
@@ -596,6 +646,7 @@ Example:
                        resets = <&tegra_car 51>;
                        reset-names = "hdmi";
                        status = "disabled";
+                       operating-points-v2 = <&dvfs_opp_table>;
                };
 
                tvo {
@@ -604,6 +655,7 @@ Example:
                        interrupts = <0 76 0x04>;
                        clocks = <&tegra_car TEGRA20_CLK_TVO>;
                        status = "disabled";
+                       operating-points-v2 = <&dvfs_opp_table>;
                };
 
                dsi {
@@ -615,6 +667,7 @@ Example:
                        resets = <&tegra_car 48>;
                        reset-names = "dsi";
                        status = "disabled";
+                       operating-points-v2 = <&dvfs_opp_table>;
                };
        };
 
diff --git a/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt b/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt
deleted file mode 100644 (file)
index e44a13b..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-NVIDIA Tegra Boot and Power Management Processor (BPMP)
-
-The BPMP is a specific processor in Tegra chip, which is designed for
-booting process handling and offloading the power management, clock
-management, and reset control tasks from the CPU. The binding document
-defines the resources that would be used by the BPMP firmware driver,
-which can create the interprocessor communication (IPC) between the CPU
-and BPMP.
-
-Required properties:
-- compatible
-    Array of strings
-    One of:
-    - "nvidia,tegra186-bpmp"
-- mboxes : The phandle of mailbox controller and the mailbox specifier.
-- shmem : List of the phandle of the TX and RX shared memory area that
-         the IPC between CPU and BPMP is based on.
-- #clock-cells : Should be 1.
-- #power-domain-cells : Should be 1.
-- #reset-cells : Should be 1.
-
-This node is a mailbox consumer. See the following files for details of
-the mailbox subsystem, and the specifiers implemented by the relevant
-provider(s):
-
-- .../mailbox/mailbox.txt
-- .../mailbox/nvidia,tegra186-hsp.txt
-
-This node is a clock, power domain, and reset provider. See the following
-files for general documentation of those features, and the specifiers
-implemented by this node:
-
-- .../clock/clock-bindings.txt
-- <dt-bindings/clock/tegra186-clock.h>
-- ../power/power-domain.yaml
-- <dt-bindings/power/tegra186-powergate.h>
-- .../reset/reset.txt
-- <dt-bindings/reset/tegra186-reset.h>
-
-The BPMP implements some services which must be represented by separate nodes.
-For example, it can provide access to certain I2C controllers, and the I2C
-bindings represent each I2C controller as a device tree node. Such nodes should
-be nested directly inside the main BPMP node.
-
-Software can determine whether a child node of the BPMP node represents a device
-by checking for a compatible property. Any node with a compatible property
-represents a device that can be instantiated. Nodes without a compatible
-property may be used to provide configuration information regarding the BPMP
-itself, although no such configuration nodes are currently defined by this
-binding.
-
-The BPMP firmware defines no single global name-/numbering-space for such
-services. Put another way, the numbering scheme for I2C buses is distinct from
-the numbering scheme for any other service the BPMP may provide (e.g. a future
-hypothetical SPI bus service). As such, child device nodes will have no reg
-property, and the BPMP node will have no #address-cells or #size-cells property.
-
-The shared memory bindings for BPMP
------------------------------------
-
-The shared memory area for the IPC TX and RX between CPU and BPMP are
-predefined and work on top of sysram, which is an SRAM inside the chip.
-
-See ".../sram/sram.txt" for the bindings.
-
-Example:
-
-hsp_top0: hsp@3c00000 {
-       ...
-       #mbox-cells = <2>;
-};
-
-sysram@30000000 {
-       compatible = "nvidia,tegra186-sysram", "mmio-sram";
-       reg = <0x0 0x30000000 0x0 0x50000>;
-       #address-cells = <2>;
-       #size-cells = <2>;
-       ranges = <0 0x0 0x0 0x30000000 0x0 0x50000>;
-
-       cpu_bpmp_tx: shmem@4e000 {
-               compatible = "nvidia,tegra186-bpmp-shmem";
-               reg = <0x0 0x4e000 0x0 0x1000>;
-               label = "cpu-bpmp-tx";
-               pool;
-       };
-
-       cpu_bpmp_rx: shmem@4f000 {
-               compatible = "nvidia,tegra186-bpmp-shmem";
-               reg = <0x0 0x4f000 0x0 0x1000>;
-               label = "cpu-bpmp-rx";
-               pool;
-       };
-};
-
-bpmp {
-       compatible = "nvidia,tegra186-bpmp";
-       mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_DB TEGRA_HSP_DB_MASTER_BPMP>;
-       shmem = <&cpu_bpmp_tx &cpu_bpmp_rx>;
-       #clock-cells = <1>;
-       #power-domain-cells = <1>;
-       #reset-cells = <1>;
-
-       i2c {
-               compatible = "...";
-               ...
-       };
-};
diff --git a/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.yaml b/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.yaml
new file mode 100644 (file)
index 0000000..833c07f
--- /dev/null
@@ -0,0 +1,186 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/firmware/nvidia,tegra186-bpmp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra Boot and Power Management Processor (BPMP)
+
+maintainers:
+  - Thierry Reding <thierry.reding@gmail.com>
+  - Jon Hunter <jonathanh@nvidia.com>
+
+description: |
+  The BPMP is a specific processor in Tegra chip, which is designed for
+  booting process handling and offloading the power management, clock
+  management, and reset control tasks from the CPU. The binding document
+  defines the resources that would be used by the BPMP firmware driver,
+  which can create the interprocessor communication (IPC) between the
+  CPU and BPMP.
+
+  This node is a mailbox consumer. See the following files for details
+  of the mailbox subsystem, and the specifiers implemented by the
+  relevant provider(s):
+
+    - .../mailbox/mailbox.txt
+    - .../mailbox/nvidia,tegra186-hsp.yaml
+
+  This node is a clock, power domain, and reset provider. See the
+  following files for general documentation of those features, and the
+  specifiers implemented by this node:
+
+    - .../clock/clock-bindings.txt
+    - <dt-bindings/clock/tegra186-clock.h>
+    - ../power/power-domain.yaml
+    - <dt-bindings/power/tegra186-powergate.h>
+    - .../reset/reset.txt
+    - <dt-bindings/reset/tegra186-reset.h>
+
+  The BPMP implements some services which must be represented by
+  separate nodes. For example, it can provide access to certain I2C
+  controllers, and the I2C bindings represent each I2C controller as a
+  device tree node. Such nodes should be nested directly inside the main
+  BPMP node.
+
+  Software can determine whether a child node of the BPMP node
+  represents a device by checking for a compatible property. Any node
+  with a compatible property represents a device that can be
+  instantiated. Nodes without a compatible property may be used to
+  provide configuration information regarding the BPMP itself, although
+  no such configuration nodes are currently defined by this binding.
+
+  The BPMP firmware defines no single global name-/numbering-space for
+  such services. Put another way, the numbering scheme for I2C buses is
+  distinct from the numbering scheme for any other service the BPMP may
+  provide (e.g. a future hypothetical SPI bus service). As such, child
+  device nodes will have no reg property, and the BPMP node will have no
+  "#address-cells" or "#size-cells" property.
+
+  The shared memory area for the IPC TX and RX between CPU and BPMP are
+  predefined and work on top of sysram, which is an SRAM inside the
+  chip. See ".../sram/sram.yaml" for the bindings.
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - nvidia,tegra194-bpmp
+              - nvidia,tegra234-bpmp
+          - const: nvidia,tegra186-bpmp
+      - const: nvidia,tegra186-bpmp
+
+  mboxes:
+    description: A phandle and channel specifier for the mailbox used to
+      communicate with the BPMP.
+    maxItems: 1
+
+  shmem:
+    description: List of the phandle to the TX and RX shared memory area
+      that the IPC between CPU and BPMP is based on.
+    minItems: 2
+    maxItems: 2
+
+  "#clock-cells":
+    const: 1
+
+  "#power-domain-cells":
+    const: 1
+
+  "#reset-cells":
+    const: 1
+
+  interconnects:
+    items:
+      - description: memory read client
+      - description: memory write client
+      - description: DMA read client
+      - description: DMA write client
+
+  interconnect-names:
+    items:
+      - const: read
+      - const: write
+      - const: dma-mem # dma-read
+      - const: dma-write
+
+  iommus:
+    maxItems: 1
+
+  i2c:
+    type: object
+
+  thermal:
+    type: object
+
+additionalProperties: false
+
+required:
+  - compatible
+  - mboxes
+  - shmem
+  - "#clock-cells"
+  - "#power-domain-cells"
+  - "#reset-cells"
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/mailbox/tegra186-hsp.h>
+    #include <dt-bindings/memory/tegra186-mc.h>
+
+    hsp_top0: hsp@3c00000 {
+        compatible = "nvidia,tegra186-hsp";
+        reg = <0x03c00000 0xa0000>;
+        interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
+        interrupt-names = "doorbell";
+        #mbox-cells = <2>;
+    };
+
+    sram@30000000 {
+        compatible = "nvidia,tegra186-sysram", "mmio-sram";
+        reg = <0x30000000 0x50000>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x0 0x30000000 0x50000>;
+
+        cpu_bpmp_tx: sram@4e000 {
+            reg = <0x4e000 0x1000>;
+            label = "cpu-bpmp-tx";
+            pool;
+        };
+
+        cpu_bpmp_rx: sram@4f000 {
+            reg = <0x4f000 0x1000>;
+            label = "cpu-bpmp-rx";
+            pool;
+        };
+    };
+
+    bpmp {
+        compatible = "nvidia,tegra186-bpmp";
+        interconnects = <&mc TEGRA186_MEMORY_CLIENT_BPMPR &emc>,
+                        <&mc TEGRA186_MEMORY_CLIENT_BPMPW &emc>,
+                        <&mc TEGRA186_MEMORY_CLIENT_BPMPDMAR &emc>,
+                        <&mc TEGRA186_MEMORY_CLIENT_BPMPDMAW &emc>;
+        interconnect-names = "read", "write", "dma-mem", "dma-write";
+        iommus = <&smmu TEGRA186_SID_BPMP>;
+        mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_DB
+                            TEGRA_HSP_DB_MASTER_BPMP>;
+        shmem = <&cpu_bpmp_tx>, <&cpu_bpmp_rx>;
+        #clock-cells = <1>;
+        #power-domain-cells = <1>;
+        #reset-cells = <1>;
+
+        i2c {
+            compatible = "nvidia,tegra186-bpmp-i2c";
+            nvidia,bpmp-bus-id = <5>;
+            #address-cells = <1>;
+            #size-cells = <0>;
+        };
+
+        thermal {
+            compatible = "nvidia,tegra186-bpmp-thermal";
+            #thermal-sensor-cells = <1>;
+        };
+    };
diff --git a/Documentation/devicetree/bindings/fuse/nvidia,tegra20-fuse.txt b/Documentation/devicetree/bindings/fuse/nvidia,tegra20-fuse.txt
deleted file mode 100644 (file)
index b109911..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-NVIDIA Tegra20/Tegra30/Tegr114/Tegra124 fuse block.
-
-Required properties:
-- compatible : For Tegra20, must contain "nvidia,tegra20-efuse".  For Tegra30,
-  must contain "nvidia,tegra30-efuse".  For Tegra114, must contain
-  "nvidia,tegra114-efuse".  For Tegra124, must contain "nvidia,tegra124-efuse".
-  For Tegra132 must contain "nvidia,tegra132-efuse", "nvidia,tegra124-efuse".
-  For Tegra210 must contain "nvidia,tegra210-efuse". For Tegra186 must contain
-  "nvidia,tegra186-efuse". For Tegra194 must contain "nvidia,tegra194-efuse".
-  For Tegra234 must contain "nvidia,tegra234-efuse".
-  Details:
-  nvidia,tegra20-efuse: Tegra20 requires using APB DMA to read the fuse data
-       due to a hardware bug. Tegra20 also lacks certain information which is
-       available in later generations such as fab code, lot code, wafer id,..
-  nvidia,tegra30-efuse, nvidia,tegra114-efuse and nvidia,tegra124-efuse:
-       The differences between these SoCs are the size of the efuse array,
-       the location of the spare (OEM programmable) bits and the location of
-       the speedo data.
-- reg: Should contain 1 entry: the entry gives the physical address and length
-       of the fuse registers.
-- clocks: Must contain an entry for each entry in clock-names.
-  See ../clocks/clock-bindings.txt for details.
-- clock-names: Must include the following entries:
-  - fuse
-- resets: Must contain an entry for each entry in reset-names.
-  See ../reset/reset.txt for details.
-- reset-names: Must include the following entries:
- - fuse
-
-Example:
-
-       fuse@7000f800 {
-               compatible = "nvidia,tegra20-efuse";
-               reg = <0x7000f800 0x400>,
-                     <0x70000000 0x400>;
-               clocks = <&tegra_car TEGRA20_CLK_FUSE>;
-               clock-names = "fuse";
-               resets = <&tegra_car 39>;
-               reset-names = "fuse";
-       };
-
-
diff --git a/Documentation/devicetree/bindings/fuse/nvidia,tegra20-fuse.yaml b/Documentation/devicetree/bindings/fuse/nvidia,tegra20-fuse.yaml
new file mode 100644 (file)
index 0000000..4819012
--- /dev/null
@@ -0,0 +1,89 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/fuse/nvidia,tegra20-fuse.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra FUSE block
+
+maintainers:
+  - Thierry Reding <thierry.reding@gmail.com>
+  - Jon Hunter <jonathanh@nvidia.com>
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - nvidia,tegra20-efuse
+          - nvidia,tegra30-efuse
+          - nvidia,tegra114-efuse
+          - nvidia,tegra124-efuse
+          - nvidia,tegra210-efuse
+          - nvidia,tegra186-efuse
+          - nvidia,tegra194-efuse
+          - nvidia,tegra234-efuse
+
+      - items:
+          - const: nvidia,tegra132-efuse
+          - const: nvidia,tegra124-efuse
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    items:
+      - const: fuse
+
+  resets:
+    maxItems: 1
+
+  reset-names:
+    items:
+      - const: fuse
+
+  operating-points-v2:
+    $ref: "/schemas/types.yaml#/definitions/phandle"
+
+  power-domains:
+    items:
+      - description: phandle to the core power domain
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+
+if:
+  properties:
+    compatible:
+      contains:
+        enum:
+          - nvidia,tegra20-efuse
+          - nvidia,tegra30-efuse
+          - nvidia,tegra114-efuse
+          - nvidia,tegra124-efuse
+          - nvidia,tegra132-efuse
+          - nvidia,tegra210-efuse
+then:
+  required:
+    - resets
+    - reset-names
+
+examples:
+  - |
+    #include <dt-bindings/clock/tegra20-car.h>
+
+    fuse@7000f800 {
+        compatible = "nvidia,tegra20-efuse";
+        reg = <0x7000f800 0x400>;
+        clocks = <&tegra_car TEGRA20_CLK_FUSE>;
+        clock-names = "fuse";
+        resets = <&tegra_car 39>;
+        reset-names = "fuse";
+    };
diff --git a/Documentation/devicetree/bindings/gpu/host1x/nvidia,tegra210-nvenc.yaml b/Documentation/devicetree/bindings/gpu/host1x/nvidia,tegra210-nvenc.yaml
new file mode 100644 (file)
index 0000000..e63ae1a
--- /dev/null
@@ -0,0 +1,135 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/gpu/host1x/nvidia,tegra210-nvenc.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Device tree binding for NVIDIA Tegra NVENC
+
+description: |
+  NVENC is the hardware video encoder present on NVIDIA Tegra210
+  and newer chips. It is located on the Host1x bus and typically
+  programmed through Host1x channels.
+
+maintainers:
+  - Thierry Reding <treding@gmail.com>
+  - Mikko Perttunen <mperttunen@nvidia.com>
+
+properties:
+  $nodename:
+    pattern: "^nvenc@[0-9a-f]*$"
+
+  compatible:
+    enum:
+      - nvidia,tegra210-nvenc
+      - nvidia,tegra186-nvenc
+      - nvidia,tegra194-nvenc
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    items:
+      - const: nvenc
+
+  resets:
+    maxItems: 1
+
+  reset-names:
+    items:
+      - const: nvenc
+
+  power-domains:
+    maxItems: 1
+
+  iommus:
+    maxItems: 1
+
+  dma-coherent: true
+
+  interconnects:
+    minItems: 2
+    maxItems: 3
+
+  interconnect-names:
+    minItems: 2
+    maxItems: 3
+
+  nvidia,host1x-class:
+    description: |
+      Host1x class of the engine, used to specify the targeted engine
+      when programming the engine through Host1x channels or when
+      configuring engine-specific behavior in Host1x.
+    default: 0x21
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - resets
+  - reset-names
+  - power-domains
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          enum:
+            - nvidia,tegra210-nvenc
+            - nvidia,tegra186-nvenc
+    then:
+      properties:
+        interconnects:
+          items:
+            - description: DMA read memory client
+            - description: DMA write memory client
+        interconnect-names:
+          items:
+            - const: dma-mem
+            - const: write
+  - if:
+      properties:
+        compatible:
+          enum:
+            - nvidia,tegra194-nvenc
+    then:
+      properties:
+        interconnects:
+          items:
+            - description: DMA read memory client
+            - description: DMA read 2 memory client
+            - description: DMA write memory client
+        interconnect-names:
+          items:
+            - const: dma-mem
+            - const: read-1
+            - const: write
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/tegra186-clock.h>
+    #include <dt-bindings/memory/tegra186-mc.h>
+    #include <dt-bindings/power/tegra186-powergate.h>
+    #include <dt-bindings/reset/tegra186-reset.h>
+
+    nvenc@154c0000 {
+            compatible = "nvidia,tegra186-nvenc";
+            reg = <0x154c0000 0x40000>;
+            clocks = <&bpmp TEGRA186_CLK_NVENC>;
+            clock-names = "nvenc";
+            resets = <&bpmp TEGRA186_RESET_NVENC>;
+            reset-names = "nvenc";
+
+            power-domains = <&bpmp TEGRA186_POWER_DOMAIN_MPE>;
+            interconnects = <&mc TEGRA186_MEMORY_CLIENT_NVENCSRD &emc>,
+                            <&mc TEGRA186_MEMORY_CLIENT_NVENCSWR &emc>;
+            interconnect-names = "dma-mem", "write";
+            iommus = <&smmu TEGRA186_SID_NVENC>;
+    };
diff --git a/Documentation/devicetree/bindings/gpu/host1x/nvidia,tegra210-nvjpg.yaml b/Documentation/devicetree/bindings/gpu/host1x/nvidia,tegra210-nvjpg.yaml
new file mode 100644 (file)
index 0000000..8647404
--- /dev/null
@@ -0,0 +1,94 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/gpu/host1x/nvidia,tegra210-nvjpg.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Device tree binding for NVIDIA Tegra NVJPG
+
+description: |
+  NVJPG is the hardware JPEG decoder and encoder present on NVIDIA Tegra210
+  and newer chips. It is located on the Host1x bus and typically programmed
+  through Host1x channels.
+
+maintainers:
+  - Thierry Reding <treding@gmail.com>
+  - Mikko Perttunen <mperttunen@nvidia.com>
+
+properties:
+  $nodename:
+    pattern: "^nvjpg@[0-9a-f]*$"
+
+  compatible:
+    enum:
+      - nvidia,tegra210-nvjpg
+      - nvidia,tegra186-nvjpg
+      - nvidia,tegra194-nvjpg
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    items:
+      - const: nvjpg
+
+  resets:
+    maxItems: 1
+
+  reset-names:
+    items:
+      - const: nvjpg
+
+  power-domains:
+    maxItems: 1
+
+  iommus:
+    maxItems: 1
+
+  dma-coherent: true
+
+  interconnects:
+    items:
+      - description: DMA read memory client
+      - description: DMA write memory client
+
+  interconnect-names:
+    items:
+      - const: dma-mem
+      - const: write
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - resets
+  - reset-names
+  - power-domains
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/tegra186-clock.h>
+    #include <dt-bindings/memory/tegra186-mc.h>
+    #include <dt-bindings/power/tegra186-powergate.h>
+    #include <dt-bindings/reset/tegra186-reset.h>
+
+    nvjpg@15380000 {
+            compatible = "nvidia,tegra186-nvjpg";
+            reg = <0x15380000 0x40000>;
+            clocks = <&bpmp TEGRA186_CLK_NVJPG>;
+            clock-names = "nvjpg";
+            resets = <&bpmp TEGRA186_RESET_NVJPG>;
+            reset-names = "nvjpg";
+
+            power-domains = <&bpmp TEGRA186_POWER_DOMAIN_NVJPG>;
+            interconnects = <&mc TEGRA186_MEMORY_CLIENT_NVJPGSRD &emc>,
+                            <&mc TEGRA186_MEMORY_CLIENT_NVJPGSWR &emc>;
+            interconnect-names = "dma-mem", "write";
+            iommus = <&smmu TEGRA186_SID_NVJPG>;
+    };
index 22fc848..4ac61fe 100644 (file)
@@ -20,9 +20,11 @@ allOf:
 
 properties:
   compatible:
-    enum:
-      - apple,t8103-i2c
-      - apple,i2c
+    items:
+      - enum:
+          - apple,t8103-i2c
+          - apple,t6000-i2c
+      - const: apple,i2c
 
   reg:
     maxItems: 1
@@ -40,6 +42,9 @@ properties:
       used. This frequency is generated by dividing the reference clock.
       Allowed values are between ref_clk/(16*4) and ref_clk/(16*255).
 
+  power-domains:
+    maxItems: 1
+
 required:
   - compatible
   - reg
@@ -51,7 +56,7 @@ unevaluatedProperties: false
 examples:
   - |
     i2c@35010000 {
-      compatible = "apple,t8103-i2c";
+      compatible = "apple,t8103-i2c", "apple,i2c";
       reg = <0x35010000 0x4000>;
       interrupt-parent = <&aic>;
       interrupts = <0 627 4>;
index cf6c091..9735902 100644 (file)
@@ -65,6 +65,9 @@ properties:
       Specifies base physical address and size of the AIC registers.
     maxItems: 1
 
+  power-domains:
+    maxItems: 1
+
 required:
   - compatible
   - '#interrupt-cells'
index 94aa9e9..82ad669 100644 (file)
@@ -41,6 +41,9 @@ properties:
       Has to be one. The single cell describes the stream id emitted by
       a master to the IOMMU.
 
+  power-domains:
+    maxItems: 1
+
 required:
   - compatible
   - reg
index 2c1704b..c4255f4 100644 (file)
@@ -56,6 +56,9 @@ properties:
   "#mbox-cells":
     const: 0
 
+  power-domains:
+    maxItems: 1
+
 required:
   - compatible
   - reg
diff --git a/Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.txt b/Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.txt
deleted file mode 100644 (file)
index ff3eafc..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-NVIDIA Tegra Hardware Synchronization Primitives (HSP)
-
-The HSP modules are used for the processors to share resources and communicate
-together. It provides a set of hardware synchronization primitives for
-interprocessor communication. So the interprocessor communication (IPC)
-protocols can use hardware synchronization primitives, when operating between
-two processors not in an SMP relationship.
-
-The features that HSP supported are shared mailboxes, shared semaphores,
-arbitrated semaphores and doorbells.
-
-Required properties:
-- name : Should be hsp
-- compatible
-    Array of strings.
-    one of:
-    - "nvidia,tegra186-hsp"
-    - "nvidia,tegra194-hsp", "nvidia,tegra186-hsp"
-- reg : Offset and length of the register set for the device.
-- interrupt-names
-    Array of strings.
-    Contains a list of names for the interrupts described by the interrupt
-    property. May contain the following entries, in any order:
-    - "doorbell"
-    - "sharedN", where 'N' is a number from zero up to the number of
-      external interrupts supported by the HSP instance minus one.
-    Users of this binding MUST look up entries in the interrupt property
-    by name, using this interrupt-names property to do so.
-- interrupts
-    Array of interrupt specifiers.
-    Must contain one entry per entry in the interrupt-names property,
-    in a matching order.
-- #mbox-cells : Should be 2.
-
-The mbox specifier of the "mboxes" property in the client node should contain
-two cells. The first cell determines the HSP type and the second cell is used
-to identify the mailbox that the client is going to use.
-
-For doorbells, the second cell specifies the index of the doorbell to use.
-
-For shared mailboxes, the second cell is composed of two fields:
-- bits 31..24:
-    A bit mask of flags that further specify how the shared mailbox will be
-    used. Valid flags are:
-    - bit 31:
-        Defines the direction of the mailbox. If set, the mailbox will be used
-        as a producer (i.e. used to send data). If cleared, the mailbox is the
-        consumer of data sent by a producer.
-
-- bits 23.. 0:
-    The index of the shared mailbox to use. The number of available mailboxes
-    may vary by instance of the HSP block and SoC generation.
-
-The following file contains definitions that can be used to construct mailbox
-specifiers:
-
-    <dt-bindings/mailbox/tegra186-hsp.h>
-
-Example:
-
-hsp_top0: hsp@3c00000 {
-       compatible = "nvidia,tegra186-hsp";
-       reg = <0x0 0x03c00000 0x0 0xa0000>;
-       interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
-       interrupt-names = "doorbell";
-       #mbox-cells = <2>;
-};
-
-client {
-       ...
-       mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_DB TEGRA_HSP_DB_MASTER_XXX>;
-};
diff --git a/Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.yaml b/Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.yaml
new file mode 100644 (file)
index 0000000..9f7a729
--- /dev/null
@@ -0,0 +1,114 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mailbox/nvidia,tegra186-hsp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra Hardware Synchronization Primitives (HSP)
+
+maintainers:
+  - Thierry Reding <thierry.reding@gmail.com>
+  - Jon Hunter <jonathanh@nvidia.com>
+
+description: |
+  The HSP modules are used for the processors to share resources and
+  communicate together. It provides a set of hardware synchronization
+  primitives for interprocessor communication. So the interprocessor
+  communication (IPC) protocols can use hardware synchronization
+  primitives, when operating between two processors not in an SMP
+  relationship.
+
+  The features that HSP supported are shared mailboxes, shared
+  semaphores, arbitrated semaphores and doorbells.
+
+  The mbox specifier of the "mboxes" property in the client node should
+  contain two cells. The first cell determines the HSP type and the
+  second cell is used to identify the mailbox that the client is going
+  to use.
+
+  For doorbells, the second cell specifies the index of the doorbell to
+  use.
+
+  For shared mailboxes, the second cell is composed of two fields:
+    - bits 31..24:
+        A bit mask of flags that further specify how the shared mailbox
+        will be used. Valid flags are:
+          - bit 31:
+              Defines the direction of the mailbox. If set, the mailbox
+              will be used as a producer (i.e. used to send data). If
+              cleared, the mailbox is the consumer of data sent by a
+              producer.
+
+    - bits 23..0:
+        The index of the shared mailbox to use. The number of available
+        mailboxes may vary by instance of the HSP block and SoC
+        generation.
+
+    The following file contains definitions that can be used to
+    construct mailbox specifiers:
+
+        <dt-bindings/mailbox/tegra186-hsp.h>
+
+properties:
+  $nodename:
+    pattern: "^hsp@[0-9a-f]+$"
+
+  compatible:
+    oneOf:
+      - const: nvidia,tegra186-hsp
+      - const: nvidia,tegra194-hsp
+      - items:
+          - const: nvidia,tegra234-hsp
+          - const: nvidia,tegra194-hsp
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    minItems: 1
+    maxItems: 9
+
+  interrupt-names:
+    oneOf:
+      # shared interrupts are optional
+      - items:
+          - const: doorbell
+
+      - items:
+          - const: doorbell
+          - pattern: "^shared[0-7]$"
+          - pattern: "^shared[0-7]$"
+          - pattern: "^shared[0-7]$"
+          - pattern: "^shared[0-7]$"
+          - pattern: "^shared[0-7]$"
+          - pattern: "^shared[0-7]$"
+          - pattern: "^shared[0-7]$"
+          - pattern: "^shared[0-7]$"
+
+      - items:
+          - pattern: "^shared[0-7]$"
+          - pattern: "^shared[0-7]$"
+          - pattern: "^shared[0-7]$"
+          - pattern: "^shared[0-7]$"
+
+  "#mbox-cells":
+    const: 2
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/mailbox/tegra186-hsp.h>
+
+    hsp_top0: hsp@3c00000 {
+        compatible = "nvidia,tegra186-hsp";
+        reg = <0x03c00000 0xa0000>;
+        interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
+        interrupt-names = "doorbell";
+        #mbox-cells = <2>;
+    };
+
+    client {
+        mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_DB TEGRA_HSP_DB_MASTER_CCPLEX>;
+    };
diff --git a/Documentation/devicetree/bindings/media/nvidia,tegra-vde.txt b/Documentation/devicetree/bindings/media/nvidia,tegra-vde.txt
deleted file mode 100644 (file)
index 602169b..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-NVIDIA Tegra Video Decoder Engine
-
-Required properties:
-- compatible : Must contain one of the following values:
-   - "nvidia,tegra20-vde"
-   - "nvidia,tegra30-vde"
-   - "nvidia,tegra114-vde"
-   - "nvidia,tegra124-vde"
-   - "nvidia,tegra132-vde"
-- reg : Must contain an entry for each entry in reg-names.
-- reg-names : Must include the following entries:
-  - sxe
-  - bsev
-  - mbe
-  - ppe
-  - mce
-  - tfe
-  - ppb
-  - vdma
-  - frameid
-- iram : Must contain phandle to the mmio-sram device node that represents
-         IRAM region used by VDE.
-- interrupts : Must contain an entry for each entry in interrupt-names.
-- interrupt-names : Must include the following entries:
-  - sync-token
-  - bsev
-  - sxe
-- clocks : Must include the following entries:
-  - vde
-- resets : Must contain an entry for each entry in reset-names.
-- reset-names : Should include the following entries:
-  - vde
-
-Optional properties:
-- resets : Must contain an entry for each entry in reset-names.
-- reset-names : Must include the following entries:
-  - mc
-- iommus: Must contain phandle to the IOMMU device node.
-
-Example:
-
-video-codec@6001a000 {
-       compatible = "nvidia,tegra20-vde";
-       reg = <0x6001a000 0x1000 /* Syntax Engine */
-              0x6001b000 0x1000 /* Video Bitstream Engine */
-              0x6001c000  0x100 /* Macroblock Engine */
-              0x6001c200  0x100 /* Post-processing Engine */
-              0x6001c400  0x100 /* Motion Compensation Engine */
-              0x6001c600  0x100 /* Transform Engine */
-              0x6001c800  0x100 /* Pixel prediction block */
-              0x6001ca00  0x100 /* Video DMA */
-              0x6001d800  0x300 /* Video frame controls */>;
-       reg-names = "sxe", "bsev", "mbe", "ppe", "mce",
-                   "tfe", "ppb", "vdma", "frameid";
-       iram = <&vde_pool>; /* IRAM region */
-       interrupts = <GIC_SPI  9 IRQ_TYPE_LEVEL_HIGH>, /* Sync token interrupt */
-                    <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>, /* BSE-V interrupt */
-                    <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>; /* SXE interrupt */
-       interrupt-names = "sync-token", "bsev", "sxe";
-       clocks = <&tegra_car TEGRA20_CLK_VDE>;
-       reset-names = "vde", "mc";
-       resets = <&tegra_car 61>, <&mc TEGRA20_MC_RESET_VDE>;
-       iommus = <&mc TEGRA_SWGROUP_VDE>;
-};
diff --git a/Documentation/devicetree/bindings/media/nvidia,tegra-vde.yaml b/Documentation/devicetree/bindings/media/nvidia,tegra-vde.yaml
new file mode 100644 (file)
index 0000000..4ecdee1
--- /dev/null
@@ -0,0 +1,119 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/nvidia,tegra-vde.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra Video Decoder Engine
+
+maintainers:
+  - Dmitry Osipenko <digetx@gmail.com>
+  - Jon Hunter <jonathanh@nvidia.com>
+  - Thierry Reding <thierry.reding@gmail.com>
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - nvidia,tegra132-vde
+              - nvidia,tegra124-vde
+              - nvidia,tegra114-vde
+      - items:
+          - const: nvidia,tegra30-vde
+          - const: nvidia,tegra20-vde
+      - items:
+          - const: nvidia,tegra20-vde
+
+  reg:
+    maxItems: 9
+
+  reg-names:
+    items:
+      - const: sxe
+      - const: bsev
+      - const: mbe
+      - const: ppe
+      - const: mce
+      - const: tfe
+      - const: ppb
+      - const: vdma
+      - const: frameid
+
+  clocks:
+    maxItems: 1
+
+  resets:
+    maxItems: 2
+
+  reset-names:
+    items:
+      - const: vde
+      - const: mc
+
+  interrupts:
+    maxItems: 3
+
+  interrupt-names:
+    items:
+      - const: sync-token
+      - const: bsev
+      - const: sxe
+
+  iommus:
+    maxItems: 1
+
+  iram:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      Phandle of the SRAM MMIO node.
+
+  operating-points-v2:
+    description:
+      Should contain freqs and voltages and opp-supported-hw property,
+      which is a bitfield indicating SoC speedo or process ID mask.
+
+  power-domains:
+    maxItems: 1
+    description:
+      Phandle to the SoC core power domain.
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - clocks
+  - resets
+  - reset-names
+  - interrupts
+  - interrupt-names
+
+additionalProperties: false
+
+examples:
+  - |
+    video-codec@6001a000 {
+      compatible = "nvidia,tegra20-vde";
+      reg = <0x6001a000 0x1000>, /* Syntax Engine */
+            <0x6001b000 0x1000>, /* Video Bitstream Engine */
+            <0x6001c000  0x100>, /* Macroblock Engine */
+            <0x6001c200  0x100>, /* Post-processing Engine */
+            <0x6001c400  0x100>, /* Motion Compensation Engine */
+            <0x6001c600  0x100>, /* Transform Engine */
+            <0x6001c800  0x100>, /* Pixel prediction block */
+            <0x6001ca00  0x100>, /* Video DMA */
+            <0x6001d800  0x300>; /* Video frame controls */
+      reg-names = "sxe", "bsev", "mbe", "ppe", "mce",
+                  "tfe", "ppb", "vdma", "frameid";
+      iram = <&iram>; /* IRAM MMIO region */
+      interrupts = <0  9 4>, /* Sync token */
+                   <0 10 4>, /* BSE-V */
+                   <0 12 4>; /* SXE */
+      interrupt-names = "sync-token", "bsev", "sxe";
+      clocks = <&clk 61>;
+      reset-names = "vde", "mc";
+      resets = <&rst 61>, <&mem 13>;
+      iommus = <&mem 15>;
+      operating-points-v2 = <&dvfs_opp_table>;
+      power-domains = <&domain>;
+    };
index 611bda3..13c4c82 100644 (file)
@@ -31,12 +31,15 @@ properties:
       - enum:
           - nvidia,tegra186-mc
           - nvidia,tegra194-mc
+          - nvidia,tegra234-mc
 
   reg:
-    maxItems: 1
+    minItems: 1
+    maxItems: 3
 
   interrupts:
-    maxItems: 1
+    items:
+      - description: MC general interrupt
 
   "#address-cells":
     const: 2
@@ -48,6 +51,9 @@ properties:
 
   dma-ranges: true
 
+  "#interconnect-cells":
+    const: 1
+
 patternProperties:
   "^external-memory-controller@[0-9a-f]+$":
     description:
@@ -63,12 +69,15 @@ patternProperties:
           - enum:
               - nvidia,tegra186-emc
               - nvidia,tegra194-emc
+              - nvidia,tegra234-emc
 
       reg:
-        maxItems: 1
+        minItems: 1
+        maxItems: 2
 
       interrupts:
-        maxItems: 1
+        items:
+          - description: EMC general interrupt
 
       clocks:
         items:
@@ -78,11 +87,83 @@ patternProperties:
         items:
           - const: emc
 
+      "#interconnect-cells":
+        const: 0
+
       nvidia,bpmp:
         $ref: /schemas/types.yaml#/definitions/phandle
         description:
           phandle of the node representing the BPMP
 
+    allOf:
+      - if:
+          properties:
+            compatible:
+              const: nvidia,tegra186-emc
+        then:
+          properties:
+            reg:
+              maxItems: 1
+
+      - if:
+          properties:
+            compatible:
+              const: nvidia,tegra194-emc
+        then:
+          properties:
+            reg:
+              minItems: 2
+
+      - if:
+          properties:
+            compatible:
+              const: nvidia,tegra234-emc
+        then:
+          properties:
+            reg:
+              minItems: 2
+
+    additionalProperties: false
+
+    required:
+      - compatible
+      - reg
+      - interrupts
+      - clocks
+      - clock-names
+      - "#interconnect-cells"
+      - nvidia,bpmp
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          const: nvidia,tegra186-mc
+    then:
+      properties:
+        reg:
+          maxItems: 1
+
+  - if:
+      properties:
+        compatible:
+          const: nvidia,tegra194-mc
+    then:
+      properties:
+        reg:
+          minItems: 3
+
+  - if:
+      properties:
+        compatible:
+          const: nvidia,tegra234-mc
+    then:
+      properties:
+        reg:
+          minItems: 3
+
+additionalProperties: false
+
 required:
   - compatible
   - reg
@@ -90,8 +171,6 @@ required:
   - "#address-cells"
   - "#size-cells"
 
-additionalProperties: false
-
 examples:
   - |
     #include <dt-bindings/clock/tegra186-clock.h>
@@ -124,12 +203,9 @@ examples:
                 clocks = <&bpmp TEGRA186_CLK_EMC>;
                 clock-names = "emc";
 
+                #interconnect-cells = <0>;
+
                 nvidia,bpmp = <&bpmp>;
             };
         };
     };
-
-    bpmp: bpmp {
-        compatible = "nvidia,tegra186-bpmp";
-        #clock-cells = <1>;
-    };
diff --git a/Documentation/devicetree/bindings/misc/nvidia,tegra186-misc.txt b/Documentation/devicetree/bindings/misc/nvidia,tegra186-misc.txt
deleted file mode 100644 (file)
index 43d777e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-NVIDIA Tegra186 (and later) MISC register block
-
-The MISC register block found on Tegra186 and later SoCs contains registers
-that can be used to identify a given chip and various strapping options.
-
-Required properties:
-- compatible: Must be:
-  - Tegra186: "nvidia,tegra186-misc"
-  - Tegra194: "nvidia,tegra194-misc"
-  - Tegra234: "nvidia,tegra234-misc"
-- reg: Should contain 2 entries: The first entry gives the physical address
-       and length of the register region which contains revision and debug
-       features. The second entry specifies the physical address and length
-       of the register region indicating the strapping options.
diff --git a/Documentation/devicetree/bindings/misc/nvidia,tegra186-misc.yaml b/Documentation/devicetree/bindings/misc/nvidia,tegra186-misc.yaml
new file mode 100644 (file)
index 0000000..cacb845
--- /dev/null
@@ -0,0 +1,43 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/misc/nvidia,tegra186-misc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra186 (and later) MISC register block
+
+maintainers:
+  - Thierry Reding <thierry.reding@gmail.com>
+  - Jon Hunter <jonathanh@nvidia.com>
+
+description: The MISC register block found on Tegra186 and later SoCs contains
+  registers that can be used to identify a given chip and various strapping
+  options.
+
+properties:
+  compatible:
+    enum:
+      - nvidia,tegra186-misc
+      - nvidia,tegra194-misc
+      - nvidia,tegra234-misc
+
+  reg:
+    items:
+      - description: physical address and length of the registers which
+          contain revision and debug features
+      - description: physical address and length of the registers which
+          indicate strapping options
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    misc@100000 {
+        compatible = "nvidia,tegra186-misc";
+        reg = <0x00100000 0xf000>,
+              <0x0010f000 0x1000>;
+    };
diff --git a/Documentation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.txt b/Documentation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.txt
deleted file mode 100644 (file)
index 83f6a25..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-NVIDIA Tegra APBMISC block
-
-Required properties:
-- compatible: Must be:
-  - Tegra20: "nvidia,tegra20-apbmisc"
-  - Tegra30: "nvidia,tegra30-apbmisc", "nvidia,tegra20-apbmisc"
-  - Tegra114: "nvidia,tegra114-apbmisc", "nvidia,tegra20-apbmisc"
-  - Tegra124: "nvidia,tegra124-apbmisc", "nvidia,tegra20-apbmisc"
-  - Tegra132: "nvidia,tegra124-apbmisc", "nvidia,tegra20-apbmisc"
-  - Tegra210: "nvidia,tegra210-apbmisc", "nvidia,tegra20-apbmisc"
-- reg: Should contain 2 entries: the first entry gives the physical address
-       and length of the registers which contain revision and debug features.
-       The second entry gives the physical address and length of the
-       registers indicating the strapping options.
-
-Optional properties:
-- nvidia,long-ram-code: If present, the RAM code is long (4 bit). If not, short (2 bit).
diff --git a/Documentation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.yaml b/Documentation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.yaml
new file mode 100644 (file)
index 0000000..6f504fa
--- /dev/null
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/misc/nvidia,tegra20-apbmisc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra APBMISC block
+
+maintainers:
+  - Thierry Reding <thierry.reding@gmail.com>
+  - Jon Hunter <jonathanh@nvidia.com>
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - nvidia,tegra210-apbmisc
+              - nvidia,tegra124-apbmisc
+              - nvidia,tegra114-apbmisc
+              - nvidia,tegra30-apbmisc
+          - const: nvidia,tegra20-apbmisc
+
+      - items:
+          - const: nvidia,tegra20-apbmisc
+
+  reg:
+    items:
+      - description: physical address and length of the registers which
+          contain revision and debug features
+      - description: physical address and length of the registers which
+          indicate strapping options
+
+  nvidia,long-ram-code:
+    description: If present, the RAM code is long (4 bit). If not, short
+      (2 bit).
+    type: boolean
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    apbmisc@70000800 {
+        compatible = "nvidia,tegra20-apbmisc";
+        reg = <0x70000800 0x64>, /* Chip revision */
+              <0x70000008 0x04>; /* Strapping options */
+    };
diff --git a/Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt b/Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt
deleted file mode 100644 (file)
index 96c0b14..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-* NVIDIA Tegra Secure Digital Host Controller
-
-This controller on Tegra family SoCs provides an interface for MMC, SD,
-and SDIO types of memory cards.
-
-This file documents differences between the core properties described
-by mmc.txt and the properties used by the sdhci-tegra driver.
-
-Required properties:
-- compatible : should be one of:
-  - "nvidia,tegra20-sdhci": for Tegra20
-  - "nvidia,tegra30-sdhci": for Tegra30
-  - "nvidia,tegra114-sdhci": for Tegra114
-  - "nvidia,tegra124-sdhci": for Tegra124 and Tegra132
-  - "nvidia,tegra210-sdhci": for Tegra210
-  - "nvidia,tegra186-sdhci": for Tegra186
-  - "nvidia,tegra194-sdhci": for Tegra194
-- clocks: For Tegra210, Tegra186 and Tegra194 must contain two entries.
-         One for the module clock and one for the timeout clock.
-         For all other Tegra devices, must contain a single entry for
-         the module clock. See ../clocks/clock-bindings.txt for details.
-- clock-names: For Tegra210, Tegra186 and Tegra194 must contain the
-              strings 'sdhci' and 'tmclk' to represent the module and
-              the timeout clocks, respectively.
-              For all other Tegra devices must contain the string 'sdhci'
-              to represent the module clock.
-- resets : Must contain an entry for each entry in reset-names.
-  See ../reset/reset.txt for details.
-- reset-names : Must include the following entries:
-  - sdhci
-
-Optional properties:
-- power-gpios : Specify GPIOs for power control
-
-Example:
-
-sdhci@c8000200 {
-       compatible = "nvidia,tegra20-sdhci";
-       reg = <0xc8000200 0x200>;
-       interrupts = <47>;
-       clocks = <&tegra_car 14>;
-       resets = <&tegra_car 14>;
-       reset-names = "sdhci";
-       cd-gpios = <&gpio 69 0>; /* gpio PI5 */
-       wp-gpios = <&gpio 57 0>; /* gpio PH1 */
-       power-gpios = <&gpio 155 0>; /* gpio PT3 */
-       bus-width = <8>;
-};
-
-Optional properties for Tegra210, Tegra186 and Tegra194:
-- pinctrl-names, pinctrl-0, pinctrl-1 : Specify pad voltage
-  configurations. Valid pinctrl-names are "sdmmc-3v3" and "sdmmc-1v8"
-  for controllers supporting multiple voltage levels. The order of names
-  should correspond to the pin configuration states in pinctrl-0 and
-  pinctrl-1.
-- pinctrl-names : "sdmmc-3v3-drv" and "sdmmc-1v8-drv" are applicable for
-  Tegra210 where pad config registers are in the pinmux register domain
-  for pull-up-strength and pull-down-strength values configuration when
-  using pads at 3V3 and 1V8 levels.
-- nvidia,only-1-8-v : The presence of this property indicates that the
-  controller operates at a 1.8 V fixed I/O voltage.
-- nvidia,pad-autocal-pull-up-offset-3v3,
-  nvidia,pad-autocal-pull-down-offset-3v3 : Specify drive strength
-  calibration offsets for 3.3 V signaling modes.
-- nvidia,pad-autocal-pull-up-offset-1v8,
-  nvidia,pad-autocal-pull-down-offset-1v8 : Specify drive strength
-  calibration offsets for 1.8 V signaling modes.
-- nvidia,pad-autocal-pull-up-offset-3v3-timeout,
-  nvidia,pad-autocal-pull-down-offset-3v3-timeout : Specify drive
-  strength used as a fallback in case the automatic calibration times
-  out on a 3.3 V signaling mode.
-- nvidia,pad-autocal-pull-up-offset-1v8-timeout,
-  nvidia,pad-autocal-pull-down-offset-1v8-timeout : Specify drive
-  strength used as a fallback in case the automatic calibration times
-  out on a 1.8 V signaling mode.
-- nvidia,pad-autocal-pull-up-offset-sdr104,
-  nvidia,pad-autocal-pull-down-offset-sdr104 : Specify drive strength
-  calibration offsets for SDR104 mode.
-- nvidia,pad-autocal-pull-up-offset-hs400,
-  nvidia,pad-autocal-pull-down-offset-hs400 : Specify drive strength
-  calibration offsets for HS400 mode.
-- nvidia,default-tap : Specify the default inbound sampling clock
-  trimmer value for non-tunable modes.
-- nvidia,default-trim : Specify the default outbound clock trimmer
-  value.
-- nvidia,dqs-trim : Specify DQS trim value for HS400 timing
-
-  Notes on the pad calibration pull up and pulldown offset values:
-    - The property values are drive codes which are programmed into the
-      PD_OFFSET and PU_OFFSET sections of the
-      SDHCI_TEGRA_AUTO_CAL_CONFIG register.
-    - A higher value corresponds to higher drive strength. Please refer
-      to the reference manual of the SoC for correct values.
-    - The SDR104 and HS400 timing specific values are used in
-      corresponding modes if specified.
-
-  Notes on tap and trim values:
-    - The values are used for compensating trace length differences
-      by adjusting the sampling point.
-    - The values are programmed to the Vendor Clock Control Register.
-      Please refer to the reference manual of the SoC for correct
-      values.
-    - The DQS trim values are only used on controllers which support
-      HS400 timing. Only SDMMC4 on Tegra210 and Tegra 186 supports
-      HS400.
-
-Example:
-sdhci@700b0000 {
-       compatible = "nvidia,tegra124-sdhci";
-       reg = <0x0 0x700b0000 0x0 0x200>;
-       interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
-       clocks = <&tegra_car TEGRA210_CLK_SDMMC1>;
-       clock-names = "sdhci";
-       resets = <&tegra_car 14>;
-       reset-names = "sdhci";
-       pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
-       pinctrl-0 = <&sdmmc1_3v3>;
-       pinctrl-1 = <&sdmmc1_1v8>;
-       nvidia,pad-autocal-pull-up-offset-3v3 = <0x00>;
-       nvidia,pad-autocal-pull-down-offset-3v3 = <0x7d>;
-       nvidia,pad-autocal-pull-up-offset-1v8 = <0x7b>;
-       nvidia,pad-autocal-pull-down-offset-1v8 = <0x7b>;
-       status = "disabled";
-};
-
-sdhci@700b0000 {
-       compatible = "nvidia,tegra210-sdhci";
-       reg = <0x0 0x700b0000 0x0 0x200>;
-       interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
-       clocks = <&tegra_car TEGRA210_CLK_SDMMC1>,
-                <&tegra_car TEGRA210_CLK_SDMMC_LEGACY>;
-       clock-names = "sdhci", "tmclk";
-       resets = <&tegra_car 14>;
-       reset-names = "sdhci";
-       pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
-       pinctrl-0 = <&sdmmc1_3v3>;
-       pinctrl-1 = <&sdmmc1_1v8>;
-       nvidia,pad-autocal-pull-up-offset-3v3 = <0x00>;
-       nvidia,pad-autocal-pull-down-offset-3v3 = <0x7d>;
-       nvidia,pad-autocal-pull-up-offset-1v8 = <0x7b>;
-       nvidia,pad-autocal-pull-down-offset-1v8 = <0x7b>;
-       status = "disabled";
-};
diff --git a/Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.yaml b/Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.yaml
new file mode 100644 (file)
index 0000000..ce64b34
--- /dev/null
@@ -0,0 +1,317 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mmc/nvidia,tegra20-sdhci.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra Secure Digital Host Controller
+
+maintainers:
+  - Thierry Reding <thierry.reding@gmail.com>
+  - Jon Hunter <jonathanh@nvidia.com>
+
+description: |
+  This controller on Tegra family SoCs provides an interface for MMC, SD, and
+  SDIO types of memory cards.
+
+  This file documents differences between the core properties described by
+  mmc-controller.yaml and the properties for the Tegra SDHCI controller.
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - nvidia,tegra20-sdhci
+          - nvidia,tegra30-sdhci
+          - nvidia,tegra114-sdhci
+          - nvidia,tegra124-sdhci
+          - nvidia,tegra210-sdhci
+          - nvidia,tegra186-sdhci
+          - nvidia,tegra194-sdhci
+
+      - items:
+          - const: nvidia,tegra132-sdhci
+          - const: nvidia,tegra124-sdhci
+
+      - items:
+          - enum:
+              - nvidia,tegra194-sdhci
+              - nvidia,tegra234-sdhci
+          - const: nvidia,tegra186-sdhci
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  assigned-clocks: true
+  assigned-clock-parents: true
+  assigned-clock-rates: true
+
+  clocks:
+    minItems: 1
+    maxItems: 2
+
+  clock-names:
+    minItems: 1
+    maxItems: 2
+
+  resets:
+    items:
+      - description: module reset
+
+  reset-names:
+    items:
+      - const: sdhci
+
+  power-gpios:
+    description: specify GPIOs for power control
+    maxItems: 1
+
+  interconnects:
+    items:
+      - description: memory read client
+      - description: memory write client
+
+  interconnect-names:
+    items:
+      - const: dma-mem # read
+      - const: write
+
+  iommus:
+    maxItems: 1
+
+  operating-points-v2:
+    $ref: "/schemas/types.yaml#/definitions/phandle"
+
+  power-domains:
+    items:
+      - description: phandle to the core power domain
+
+  nvidia,default-tap:
+    description: Specify the default inbound sampling clock trimmer value for
+      non-tunable modes.
+
+      The values are used for compensating trace length differences by
+      adjusting the sampling point. The values are programmed to the Vendor
+      Clock Control Register. Please refer to the reference manual of the SoC
+      for correct values.
+
+      The DQS trim values are only used on controllers which support HS400
+      timing. Only SDMMC4 on Tegra210 and Tegra186 supports HS400.
+    $ref: "/schemas/types.yaml#/definitions/uint32"
+
+  nvidia,default-trim:
+    description: Specify the default outbound clock trimmer value.
+    $ref: "/schemas/types.yaml#/definitions/uint32"
+
+  nvidia,dqs-trim:
+    description: Specify DQS trim value for HS400 timing.
+    $ref: "/schemas/types.yaml#/definitions/uint32"
+
+  nvidia,pad-autocal-pull-down-offset-1v8:
+    description: Specify drive strength calibration offsets for 1.8 V
+      signaling modes.
+    $ref: "/schemas/types.yaml#/definitions/uint32"
+
+  nvidia,pad-autocal-pull-down-offset-1v8-timeout:
+    description: Specify drive strength used as a fallback in case the
+      automatic calibration times out on a 1.8 V signaling mode.
+    $ref: "/schemas/types.yaml#/definitions/uint32"
+
+  nvidia,pad-autocal-pull-down-offset-3v3:
+    description: Specify drive strength calibration offsets for 3.3 V
+      signaling modes.
+    $ref: "/schemas/types.yaml#/definitions/uint32"
+
+  nvidia,pad-autocal-pull-down-offset-3v3-timeout:
+    description: Specify drive strength used as a fallback in case the
+      automatic calibration times out on a 3.3 V signaling mode.
+    $ref: "/schemas/types.yaml#/definitions/uint32"
+
+  nvidia,pad-autocal-pull-down-offset-sdr104:
+    description: Specify drive strength calibration offsets for SDR104 mode.
+    $ref: "/schemas/types.yaml#/definitions/uint32"
+
+  nvidia,pad-autocal-pull-down-offset-hs400:
+    description: Specify drive strength calibration offsets for HS400 mode.
+    $ref: "/schemas/types.yaml#/definitions/uint32"
+
+  nvidia,pad-autocal-pull-up-offset-1v8:
+    description: Specify drive strength calibration offsets for 1.8 V
+      signaling modes.
+    $ref: "/schemas/types.yaml#/definitions/uint32"
+
+  nvidia,pad-autocal-pull-up-offset-1v8-timeout:
+    description: Specify drive strength used as a fallback in case the
+      automatic calibration times out on a 1.8 V signaling mode.
+    $ref: "/schemas/types.yaml#/definitions/uint32"
+
+  nvidia,pad-autocal-pull-up-offset-3v3:
+    description: Specify drive strength calibration offsets for 3.3 V
+      signaling modes.
+
+      The property values are drive codes which are programmed into the
+      PD_OFFSET and PU_OFFSET sections of the SDHCI_TEGRA_AUTO_CAL_CONFIG
+      register. A higher value corresponds to higher drive strength. Please
+      refer to the reference manual of the SoC for correct values. The SDR104
+      and HS400 timing specific values are used in corresponding modes if
+      specified.
+    $ref: "/schemas/types.yaml#/definitions/uint32"
+
+  nvidia,pad-autocal-pull-up-offset-3v3-timeout:
+    description: Specify drive strength used as a fallback in case the
+      automatic calibration times out on a 3.3 V signaling mode.
+    $ref: "/schemas/types.yaml#/definitions/uint32"
+
+  nvidia,pad-autocal-pull-up-offset-sdr104:
+    description: Specify drive strength calibration offsets for SDR104 mode.
+    $ref: "/schemas/types.yaml#/definitions/uint32"
+
+  nvidia,pad-autocal-pull-up-offset-hs400:
+    description: Specify drive strength calibration offsets for HS400 mode.
+    $ref: "/schemas/types.yaml#/definitions/uint32"
+
+  nvidia,only-1-8v:
+    description: The presence of this property indicates that the controller
+      operates at a 1.8 V fixed I/O voltage.
+    $ref: "/schemas/types.yaml#/definitions/flag"
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - resets
+  - reset-names
+
+allOf:
+  - $ref: "mmc-controller.yaml"
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - nvidia,tegra20-sdhci
+              - nvidia,tegra30-sdhci
+              - nvidia,tegra114-sdhci
+              - nvidia,tegra124-sdhci
+        clocks:
+          items:
+            - description: module clock
+          minItems: 1
+          maxItems: 1
+    else:
+      properties:
+        clocks:
+          items:
+            - description: module clock
+            - description: timeout clock
+          minItems: 2
+          maxItems: 2
+        clock-names:
+          items:
+            - const: sdhci
+            - const: tmclk
+          minItems: 2
+          maxItems: 2
+      required:
+        - clock-names
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: nvidia,tegra210-sdhci
+    then:
+      properties:
+        pinctrl-names:
+          oneOf:
+            - items:
+                - const: sdmmc-3v3
+                  description: pad configuration for 3.3 V
+                - const: sdmmc-1v8
+                  description: pad configuration for 1.8 V
+                - const: sdmmc-3v3-drv
+                  description: pull-up/down configuration for 3.3 V
+                - const: sdmmc-1v8-drv
+                  description: pull-up/down configuration for 1.8 V
+            - items:
+                - const: sdmmc-3v3-drv
+                  description: pull-up/down configuration for 3.3 V
+                - const: sdmmc-1v8-drv
+                  description: pull-up/down configuration for 1.8 V
+            - items:
+                - const: sdmmc-1v8-drv
+                  description: pull-up/down configuration for 1.8 V
+      required:
+        - clock-names
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - nvidia,tegra186-sdhci
+              - nvidia,tegra194-sdhci
+    then:
+      properties:
+        pinctrl-names:
+          items:
+            - const: sdmmc-3v3
+              description: pad configuration for 3.3 V
+            - const: sdmmc-1v8
+              description: pad configuration for 1.8 V
+      required:
+        - clock-names
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    mmc@c8000200 {
+        compatible = "nvidia,tegra20-sdhci";
+        reg = <0xc8000200 0x200>;
+        interrupts = <47>;
+        clocks = <&tegra_car 14>;
+        resets = <&tegra_car 14>;
+        reset-names = "sdhci";
+        cd-gpios = <&gpio 69 0>; /* gpio PI5 */
+        wp-gpios = <&gpio 57 0>; /* gpio PH1 */
+        power-gpios = <&gpio 155 0>; /* gpio PT3 */
+        bus-width = <8>;
+    };
+
+  - |
+    #include <dt-bindings/clock/tegra210-car.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    mmc@700b0000 {
+        compatible = "nvidia,tegra210-sdhci";
+        reg = <0x700b0000 0x200>;
+        interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&tegra_car TEGRA210_CLK_SDMMC1>,
+                 <&tegra_car TEGRA210_CLK_SDMMC_LEGACY>;
+        clock-names = "sdhci", "tmclk";
+        resets = <&tegra_car 14>;
+        reset-names = "sdhci";
+        pinctrl-names = "sdmmc-3v3", "sdmmc-1v8",
+                        "sdmmc-3v3-drv", "sdmmc-1v8-drv";
+        pinctrl-0 = <&sdmmc1_3v3>;
+        pinctrl-1 = <&sdmmc1_1v8>;
+        pinctrl-2 = <&sdmmc1_3v3_drv>;
+        pinctrl-3 = <&sdmmc1_1v8_drv>;
+        nvidia,pad-autocal-pull-up-offset-3v3 = <0x00>;
+        nvidia,pad-autocal-pull-down-offset-3v3 = <0x7d>;
+        nvidia,pad-autocal-pull-up-offset-1v8 = <0x7b>;
+        nvidia,pad-autocal-pull-down-offset-1v8 = <0x7b>;
+        nvidia,default-tap = <0x2>;
+        nvidia,default-trim = <0x4>;
+        assigned-clocks = <&tegra_car TEGRA210_CLK_SDMMC4>,
+                          <&tegra_car TEGRA210_CLK_PLL_C4_OUT0>,
+                          <&tegra_car TEGRA210_CLK_PLL_C4>;
+        assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_C4_OUT0>;
+        assigned-clock-rates = <200000000>, <1000000000>, <1000000000>;
+    };
index 9f1e709..9ce6e06 100644 (file)
@@ -113,31 +113,51 @@ allOf:
         clocks:
           items:
             - description: IMCLK, SDHI channel main clock1.
+            - description: CLK_HS, SDHI channel High speed clock which operates
+                           4 times that of SDHI channel main clock1.
             - description: IMCLK2, SDHI channel main clock2. When this clock is
                            turned off, external SD card detection cannot be
                            detected.
-            - description: CLK_HS, SDHI channel High speed clock which operates
-                           4 times that of SDHI channel main clock1.
             - description: ACLK, SDHI channel bus clock.
         clock-names:
           items:
-            - const: imclk
-            - const: imclk2
-            - const: clk_hs
+            - const: core
+            - const: clkh
+            - const: cd
             - const: aclk
       required:
         - clock-names
         - resets
     else:
-      properties:
-        clocks:
-          minItems: 1
-          maxItems: 2
-        clock-names:
-          minItems: 1
-          items:
-            - const: core
-            - const: cd
+      if:
+        properties:
+          compatible:
+            contains:
+              enum:
+                - renesas,rcar-gen2-sdhi
+                - renesas,rcar-gen3-sdhi
+      then:
+        properties:
+          clocks:
+            minItems: 1
+            maxItems: 3
+          clock-names:
+            minItems: 1
+            uniqueItems: true
+            items:
+              - const: core
+              - enum: [ clkh, cd ]
+              - const: cd
+      else:
+        properties:
+          clocks:
+            minItems: 1
+            maxItems: 2
+          clock-names:
+            minItems: 1
+            items:
+              - const: core
+              - const: cd
 
   - if:
       properties:
index ef1d424..7f01e15 100644 (file)
@@ -28,19 +28,17 @@ description: |
   distributed over the root ports as the OS sees fit by programming
   the PCIe controller's port registers.
 
-allOf:
-  - $ref: /schemas/pci/pci-bus.yaml#
-  - $ref: /schemas/interrupt-controller/msi-controller.yaml#
-
 properties:
   compatible:
     items:
-      - const: apple,t8103-pcie
+      - enum:
+          - apple,t8103-pcie
+          - apple,t6000-pcie
       - const: apple,pcie
 
   reg:
     minItems: 3
-    maxItems: 5
+    maxItems: 6
 
   reg-names:
     minItems: 3
@@ -50,6 +48,7 @@ properties:
       - const: port0
       - const: port1
       - const: port2
+      - const: port3
 
   ranges:
     minItems: 2
@@ -59,7 +58,7 @@ properties:
     description:
       Interrupt specifiers, one for each root port.
     minItems: 1
-    maxItems: 3
+    maxItems: 4
 
   msi-parent: true
 
@@ -81,6 +80,21 @@ required:
 
 unevaluatedProperties: false
 
+allOf:
+  - $ref: /schemas/pci/pci-bus.yaml#
+  - $ref: /schemas/interrupt-controller/msi-controller.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: apple,t8103-pcie
+    then:
+      properties:
+        reg:
+          maxItems: 5
+        interrupts:
+          maxItems: 3
+
 examples:
   - |
     #include <dt-bindings/interrupt-controller/apple-aic.h>
index 07b00de..572923d 100644 (file)
@@ -17,7 +17,9 @@ description: |
 properties:
   compatible:
     items:
-      - const: apple,t8103-pinctrl
+      - enum:
+          - apple,t8103-pinctrl
+          - apple,t6000-pinctrl
       - const: apple,pinctrl
 
   reg:
@@ -50,6 +52,9 @@ properties:
   '#interrupt-cells':
     const: 2
 
+  power-domains:
+    maxItems: 1
+
 patternProperties:
   '-pins$':
     type: object
diff --git a/Documentation/devicetree/bindings/power/apple,pmgr-pwrstate.yaml b/Documentation/devicetree/bindings/power/apple,pmgr-pwrstate.yaml
new file mode 100644 (file)
index 0000000..19a1949
--- /dev/null
@@ -0,0 +1,79 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/apple,pmgr-pwrstate.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Apple SoC PMGR Power States
+
+maintainers:
+  - Hector Martin <marcan@marcan.st>
+
+allOf:
+  - $ref: "power-domain.yaml#"
+
+description: |
+  Apple SoCs include PMGR blocks responsible for power management,
+  which can control various clocks, resets, power states, and
+  performance features. This binding describes the device power
+  state registers, which control power states and resets.
+
+  Each instance of a power controller within the PMGR syscon node
+  represents a generic power domain provider, as documented in
+  Documentation/devicetree/bindings/power/power-domain.yaml.
+  The provider controls a single SoC block. The power hierarchy is
+  represented via power-domains relationships between these nodes.
+
+  See Documentation/devicetree/bindings/arm/apple/apple,pmgr.yaml
+  for the top-level PMGR node documentation.
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - apple,t8103-pmgr-pwrstate
+          - apple,t6000-pmgr-pwrstate
+      - const: apple,pmgr-pwrstate
+
+  reg:
+    maxItems: 1
+
+  "#power-domain-cells":
+    const: 0
+
+  "#reset-cells":
+    const: 0
+
+  power-domains:
+    description:
+      Reference to parent power domains. A domain may have multiple parents,
+      and all will be powered up when it is powered.
+    minItems: 1
+    maxItems: 8 # Arbitrary, should be enough
+
+  label:
+    description:
+      Specifies the name of the SoC domain being controlled. This is used to
+      name the power/reset domains.
+
+  apple,always-on:
+    description:
+      Forces this power domain to always be powered up.
+    type: boolean
+
+  apple,min-state:
+    description:
+      Specifies the minimum power state for auto-PM.
+      0 = power gated, 4 = clock gated, 15 = on.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 0
+    maximum: 15
+
+required:
+  - compatible
+  - reg
+  - "#power-domain-cells"
+  - "#reset-cells"
+  - label
+
+additionalProperties: false
index 99e8042..62a49ca 100644 (file)
@@ -41,6 +41,7 @@ properties:
       - renesas,r8a77990-sysc # R-Car E3
       - renesas,r8a77995-sysc # R-Car D3
       - renesas,r8a779a0-sysc # R-Car V3U
+      - renesas,r8a779f0-sysc # R-Car S4-8
 
   reg:
     maxItems: 1
index 620cd05..bbe313b 100644 (file)
@@ -48,6 +48,7 @@ properties:
       - renesas,r8a77990-rst      # R-Car E3
       - renesas,r8a77995-rst      # R-Car D3
       - renesas,r8a779a0-rst      # R-Car V3U
+      - renesas,r8a779f0-rst      # R-Car S4-8
 
   reg:
     maxItems: 1
diff --git a/Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.txt b/Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.txt
deleted file mode 100644 (file)
index b7d98ed..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-NVIDIA Tegra20 real-time clock
-
-The Tegra RTC maintains seconds and milliseconds counters, and five alarm
-registers. The alarms and other interrupts may wake the system from low-power
-state.
-
-Required properties:
-
-- compatible : For Tegra20, must contain "nvidia,tegra20-rtc".  Otherwise,
-  must contain '"nvidia,<chip>-rtc", "nvidia,tegra20-rtc"', where <chip>
-  can be tegra30, tegra114, tegra124, or tegra132.
-- reg : Specifies base physical address and size of the registers.
-- interrupts : A single interrupt specifier.
-- clocks : Must contain one entry, for the module clock.
-  See ../clocks/clock-bindings.txt for details.
-
-Example:
-
-timer {
-       compatible = "nvidia,tegra20-rtc";
-       reg = <0x7000e000 0x100>;
-       interrupts = <0 2 0x04>;
-       clocks = <&tegra_car 4>;
-};
diff --git a/Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.yaml b/Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.yaml
new file mode 100644 (file)
index 0000000..17d6280
--- /dev/null
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/nvidia,tegra20-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra real-time clock
+
+maintainers:
+  - Thierry Reding <thierry.reding@gmail.com>
+  - Jon Hunter <jonathanh@nvidia.com>
+
+description: |
+  The Tegra RTC maintains seconds and milliseconds counters, and five
+  alarm registers. The alarms and other interrupts may wake the system
+  from low-power state.
+
+properties:
+  compatible:
+    oneOf:
+      - const: nvidia,tegra20-rtc
+      - items:
+          - enum:
+              - nvidia,tegra30-rtc
+              - nvidia,tegra114-rtc
+              - nvidia,tegra124-rtc
+              - nvidia,tegra210-rtc
+              - nvidia,tegra186-rtc
+              - nvidia,tegra194-rtc
+              - nvidia,tegra234-rtc
+          - const: nvidia,tegra20-rtc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    items:
+      - const: rtc
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+
+examples:
+  - |
+    timer@7000e000 {
+        compatible = "nvidia,tegra20-rtc";
+        reg = <0x7000e000 0x100>;
+        interrupts = <0 2 0x04>;
+        clocks = <&tegra_car 4>;
+    };
index fa76744..3bab2f2 100644 (file)
@@ -113,9 +113,10 @@ properties:
               - nvidia,tegra30-uart
               - nvidia,tegra114-uart
               - nvidia,tegra124-uart
+              - nvidia,tegra210-uart
               - nvidia,tegra186-uart
               - nvidia,tegra194-uart
-              - nvidia,tegra210-uart
+              - nvidia,tegra234-uart
           - const: nvidia,tegra20-uart
 
   reg:
diff --git a/Documentation/devicetree/bindings/serial/nvidia,tegra194-tcu.txt b/Documentation/devicetree/bindings/serial/nvidia,tegra194-tcu.txt
deleted file mode 100644 (file)
index 085a859..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-NVIDIA Tegra Combined UART (TCU)
-
-The TCU is a system for sharing a hardware UART instance among multiple
-systems within the Tegra SoC. It is implemented through a mailbox-
-based protocol where each "virtual UART" has a pair of mailboxes, one
-for transmitting and one for receiving, that is used to communicate
-with the hardware implementing the TCU.
-
-Required properties:
-- name : Should be tcu
-- compatible
-    Array of strings
-    One of:
-    - "nvidia,tegra194-tcu"
-- mbox-names:
-    "rx" - Mailbox for receiving data from hardware UART
-    "tx" - Mailbox for transmitting data to hardware UART
-- mboxes: Mailboxes corresponding to the mbox-names.
-
-This node is a mailbox consumer. See the following files for details of
-the mailbox subsystem, and the specifiers implemented by the relevant
-provider(s):
-
-- .../mailbox/mailbox.txt
-- .../mailbox/nvidia,tegra186-hsp.txt
-
-Example bindings:
------------------
-
-tcu: tcu {
-       compatible = "nvidia,tegra194-tcu";
-       mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_SM 0>,
-                <&hsp_aon TEGRA_HSP_MBOX_TYPE_SM 1>;
-       mbox-names = "rx", "tx";
-};
diff --git a/Documentation/devicetree/bindings/serial/nvidia,tegra194-tcu.yaml b/Documentation/devicetree/bindings/serial/nvidia,tegra194-tcu.yaml
new file mode 100644 (file)
index 0000000..e2d111b
--- /dev/null
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/serial/nvidia,tegra194-tcu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra Combined UART (TCU)
+
+maintainers:
+  - Thierry Reding <thierry.reding@gmail.com>
+  - Jonathan Hunter <jonathanh@nvidia.com>
+
+description:
+  The TCU is a system for sharing a hardware UART instance among multiple
+  systems within the Tegra SoC. It is implemented through a mailbox-
+  based protocol where each "virtual UART" has a pair of mailboxes, one
+  for transmitting and one for receiving, that is used to communicate
+  with the hardware implementing the TCU.
+
+properties:
+  $nodename:
+    pattern: "^serial(@.*)?$"
+
+  compatible:
+    oneOf:
+      - const: nvidia,tegra194-tcu
+      - items:
+          - enum:
+              - nvidia,tegra234-tcu
+          - const: nvidia,tegra194-tcu
+
+  mbox-names:
+    items:
+      - const: rx
+      - const: tx
+
+  mboxes:
+    description: |
+      List of phandles to mailbox channels used for receiving and
+      transmitting data from and to the hardware UART.
+    items:
+      - description: mailbox for receiving data from hardware UART
+      - description: mailbox for transmitting data to hardware UART
+
+required:
+  - compatible
+  - mbox-names
+  - mboxes
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/mailbox/tegra186-hsp.h>
+
+    tcu: serial {
+        compatible = "nvidia,tegra194-tcu";
+        mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_SM 0>,
+                 <&hsp_aon TEGRA_HSP_MBOX_TYPE_SM 1>;
+        mbox-names = "rx", "tx";
+    };
diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml
new file mode 100644 (file)
index 0000000..fbeaac3
--- /dev/null
@@ -0,0 +1,97 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP i.MX8MN DISP blk-ctrl
+
+maintainers:
+  - Lucas Stach <l.stach@pengutronix.de>
+
+description:
+  The i.MX8MN DISP blk-ctrl is a top-level peripheral providing access to
+  the NoC and ensuring proper power sequencing of the display and MIPI CSI
+  peripherals located in the DISP domain of the SoC.
+
+properties:
+  compatible:
+    items:
+      - const: fsl,imx8mn-disp-blk-ctrl
+      - const: syscon
+
+  reg:
+    maxItems: 1
+
+  '#power-domain-cells':
+    const: 1
+
+  power-domains:
+    minItems: 5
+    maxItems: 5
+
+  power-domain-names:
+    items:
+      - const: bus
+      - const: isi
+      - const: lcdif
+      - const: mipi-dsi
+      - const: mipi-csi
+
+  clocks:
+    minItems: 11
+    maxItems: 11
+
+  clock-names:
+    items:
+      - const: disp_axi
+      - const: disp_apb
+      - const: disp_axi_root
+      - const: disp_apb_root
+      - const: lcdif-axi
+      - const: lcdif-apb
+      - const: lcdif-pix
+      - const: dsi-pclk
+      - const: dsi-ref
+      - const: csi-aclk
+      - const: csi-pclk
+
+required:
+  - compatible
+  - reg
+  - power-domains
+  - power-domain-names
+  - clocks
+  - clock-names
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/imx8mn-clock.h>
+    #include <dt-bindings/power/imx8mn-power.h>
+
+    disp_blk_ctl: blk_ctrl@32e28000 {
+      compatible = "fsl,imx8mn-disp-blk-ctrl", "syscon";
+      reg = <0x32e28000 0x100>;
+      power-domains = <&pgc_dispmix>, <&pgc_dispmix>,
+                      <&pgc_dispmix>, <&pgc_mipi>,
+                      <&pgc_mipi>;
+      power-domain-names = "bus", "isi", "lcdif", "mipi-dsi",
+                           "mipi-csi";
+      clocks = <&clk IMX8MN_CLK_DISP_AXI>,
+               <&clk IMX8MN_CLK_DISP_APB>,
+               <&clk IMX8MN_CLK_DISP_AXI_ROOT>,
+               <&clk IMX8MN_CLK_DISP_APB_ROOT>,
+               <&clk IMX8MN_CLK_DISP_AXI_ROOT>,
+               <&clk IMX8MN_CLK_DISP_APB_ROOT>,
+               <&clk IMX8MN_CLK_DISP_PIXEL_ROOT>,
+               <&clk IMX8MN_CLK_DSI_CORE>,
+               <&clk IMX8MN_CLK_DSI_PHY_REF>,
+               <&clk IMX8MN_CLK_CSI1_PHY_REF>,
+               <&clk IMX8MN_CLK_CAMERA_PIXEL_ROOT>;
+       clock-names = "disp_axi", "disp_apb", "disp_axi_root", "disp_apb_root",
+                     "lcdif-axi", "lcdif-apb", "lcdif-pix", "dsi-pclk",
+                     "dsi-ref", "csi-aclk", "csi-pclk";
+       #power-domain-cells = <1>;
+    };
diff --git a/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml b/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml
new file mode 100644 (file)
index 0000000..273f2d9
--- /dev/null
@@ -0,0 +1,159 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/samsung/exynos-usi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung's Exynos USI (Universal Serial Interface) binding
+
+maintainers:
+  - Sam Protsenko <semen.protsenko@linaro.org>
+  - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
+
+description: |
+  USI IP-core provides selectable serial protocol (UART, SPI or High-Speed I2C).
+  USI shares almost all internal circuits within each protocol, so only one
+  protocol can be chosen at a time. USI is modeled as a node with zero or more
+  child nodes, each representing a serial sub-node device. The mode setting
+  selects which particular function will be used.
+
+  Refer to next bindings documentation for information on protocol subnodes that
+  can exist under USI node:
+
+  [1] Documentation/devicetree/bindings/serial/samsung_uart.yaml
+  [2] Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
+  [3] Documentation/devicetree/bindings/spi/spi-samsung.txt
+
+properties:
+  $nodename:
+    pattern: "^usi@[0-9a-f]+$"
+
+  compatible:
+    enum:
+      - samsung,exynos850-usi   # for USIv2 (Exynos850, ExynosAutoV9)
+
+  reg: true
+
+  clocks: true
+
+  clock-names: true
+
+  ranges: true
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 1
+
+  samsung,sysreg:
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    description:
+      Should be phandle/offset pair. The phandle to System Register syscon node
+      (for the same domain where this USI controller resides) and the offset
+      of SW_CONF register for this USI controller.
+
+  samsung,mode:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      Selects USI function (which serial protocol to use). Refer to
+      <include/dt-bindings/soc/samsung,exynos-usi.h> for valid USI mode values.
+
+  samsung,clkreq-on:
+    type: boolean
+    description:
+      Enable this property if underlying protocol requires the clock to be
+      continuously provided without automatic gating. As suggested by SoC
+      manual, it should be set in case of SPI/I2C slave, UART Rx and I2C
+      multi-master mode. Usually this property is needed if USI mode is set
+      to "UART".
+
+      This property is optional.
+
+patternProperties:
+  # All other properties should be child nodes
+  "^(serial|spi|i2c)@[0-9a-f]+$":
+    type: object
+    description: Child node describing underlying USI serial protocol
+
+required:
+  - compatible
+  - ranges
+  - "#address-cells"
+  - "#size-cells"
+  - samsung,sysreg
+  - samsung,mode
+
+if:
+  properties:
+    compatible:
+      contains:
+        enum:
+          - samsung,exynos850-usi
+
+then:
+  properties:
+    reg:
+      maxItems: 1
+
+    clocks:
+      items:
+        - description: Bus (APB) clock
+        - description: Operating clock for UART/SPI/I2C protocol
+
+    clock-names:
+      items:
+        - const: pclk
+        - const: ipclk
+
+  required:
+    - reg
+    - clocks
+    - clock-names
+
+else:
+  properties:
+    reg: false
+    clocks: false
+    clock-names: false
+    samsung,clkreq-on: false
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/soc/samsung,exynos-usi.h>
+
+    usi0: usi@138200c0 {
+        compatible = "samsung,exynos850-usi";
+        reg = <0x138200c0 0x20>;
+        samsung,sysreg = <&sysreg_peri 0x1010>;
+        samsung,mode = <USI_V2_UART>;
+        samsung,clkreq-on; /* needed for UART mode */
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges;
+        clocks = <&cmu_peri 32>, <&cmu_peri 31>;
+        clock-names = "pclk", "ipclk";
+
+        serial_0: serial@13820000 {
+            compatible = "samsung,exynos850-uart";
+            reg = <0x13820000 0xc0>;
+            interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>;
+            clocks = <&cmu_peri 32>, <&cmu_peri 31>;
+            clock-names = "uart", "clk_uart_baud0";
+            status = "disabled";
+        };
+
+        hsi2c_0: i2c@13820000 {
+            compatible = "samsung,exynosautov9-hsi2c";
+            reg = <0x13820000 0xc0>;
+            interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>;
+            #address-cells = <1>;
+            #size-cells = <0>;
+            clocks = <&cmu_peri 31>, <&cmu_peri 32>;
+            clock-names = "hsi2c", "hsi2c_pclk";
+            status = "disabled";
+        };
+    };
index d4e418b..668a9a4 100644 (file)
@@ -31,6 +31,9 @@ properties:
         - amlogic,meson-gxbb-sram
         - arm,juno-sram-ns
         - atmel,sama5d2-securam
+        - nvidia,tegra186-sysram
+        - nvidia,tegra194-sysram
+        - nvidia,tegra234-sysram
         - qcom,rpm-msg-ram
         - rockchip,rk3288-pmu-sram
 
diff --git a/Documentation/devicetree/bindings/thermal/nvidia,tegra186-bpmp-thermal.txt b/Documentation/devicetree/bindings/thermal/nvidia,tegra186-bpmp-thermal.txt
deleted file mode 100644 (file)
index fc87f6a..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-NVIDIA Tegra186 BPMP thermal sensor
-
-In Tegra186, the BPMP (Boot and Power Management Processor) implements an
-interface that is used to read system temperatures, including CPU cluster
-and GPU temperatures. This binding describes the thermal sensor that is
-exposed by BPMP.
-
-The BPMP thermal node must be located directly inside the main BPMP node. See
-../firmware/nvidia,tegra186-bpmp.txt for details of the BPMP binding.
-
-This node represents a thermal sensor. See Documentation/devicetree/bindings/thermal/thermal-sensor.yaml for details of the
-core thermal binding.
-
-Required properties:
-- compatible:
-    Array of strings.
-    One of:
-    - "nvidia,tegra186-bpmp-thermal"
-    - "nvidia,tegra194-bpmp-thermal"
-- #thermal-sensor-cells: Cell for sensor index.
-    Single-cell integer.
-    Must be <1>.
-
-Example:
-
-bpmp {
-       ...
-
-       bpmp_thermal: thermal {
-               compatible = "nvidia,tegra186-bpmp-thermal";
-               #thermal-sensor-cells = <1>;
-       };
-};
diff --git a/Documentation/devicetree/bindings/thermal/nvidia,tegra186-bpmp-thermal.yaml b/Documentation/devicetree/bindings/thermal/nvidia,tegra186-bpmp-thermal.yaml
new file mode 100644 (file)
index 0000000..c91fd07
--- /dev/null
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/thermal/nvidia,tegra186-bpmp-thermal.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra186 (and later) BPMP thermal sensor
+
+maintainers:
+  - Thierry Reding <thierry.reding@gmail.com>
+  - Jon Hunter <jonathanh@nvidia.com>
+
+description: |
+  In Tegra186, the BPMP (Boot and Power Management Processor) implements
+  an interface that is used to read system temperatures, including CPU
+  cluster and GPU temperatures. This binding describes the thermal
+  sensor that is exposed by BPMP.
+
+  The BPMP thermal node must be located directly inside the main BPMP
+  node. See ../firmware/nvidia,tegra186-bpmp.yaml for details of the
+  BPMP binding.
+
+  This node represents a thermal sensor. See
+
+    Documentation/devicetree/bindings/thermal/thermal-sensor.yaml
+
+  for details of the core thermal binding.
+
+properties:
+  compatible:
+    enum:
+      - nvidia,tegra186-bpmp-thermal
+      - nvidia,tegra194-bpmp-thermal
+
+  '#thermal-sensor-cells':
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Number of cells needed in the phandle specifier to
+      identify a given sensor. Must be 1 and the single cell specifies
+      the sensor index.
+    const: 1
+
+additionalProperties: false
index 8428415..a39c76b 100644 (file)
@@ -59,6 +59,19 @@ properties:
       - const: fs_src
       - const: hs_src
 
+  interconnects:
+    items:
+      - description: memory read client
+      - description: memory write client
+
+  interconnect-names:
+    items:
+      - const: dma-mem # read
+      - const: write
+
+  iommus:
+    maxItems: 1
+
   power-domains:
     items:
       - description: XUSBB(device) power-domain
index 66d6432..6e2ac5b 100644 (file)
@@ -187,6 +187,8 @@ patternProperties:
     description: Shanghai Broadmobi Communication Technology Co.,Ltd.
   "^brcm,.*":
     description: Broadcom Corporation
+  "^bsh,.*":
+    description: BSH Hausgeraete GmbH
   "^buffalo,.*":
     description: Buffalo, Inc.
   "^bur,.*":
@@ -593,6 +595,8 @@ patternProperties:
     description: JetHome (IP Sokolov P.A.)
   "^jianda,.*":
     description: Jiandangjing Technology Co., Ltd.
+  "^joz,.*":
+    description: JOZ BV
   "^kam,.*":
     description: Kamstrup A/S
   "^karo,.*":
@@ -1318,6 +1322,8 @@ patternProperties:
     description: Wiligear, Ltd.
   "^winbond,.*":
     description: Winbond Electronics corp.
+  "^winlink,.*":
+    description: WinLink Co., Ltd
   "^winstar,.*":
     description: Winstar Display Corp.
   "^wits,.*":
diff --git a/Documentation/devicetree/bindings/watchdog/apple,wdt.yaml b/Documentation/devicetree/bindings/watchdog/apple,wdt.yaml
new file mode 100644 (file)
index 0000000..e58c56a
--- /dev/null
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/apple,wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Apple SoC Watchdog
+
+allOf:
+  - $ref: "watchdog.yaml#"
+
+maintainers:
+  - Sven Peter <sven@svenpeter.dev>
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - apple,t8103-wdt
+          - apple,t6000-wdt
+      - const: apple,wdt
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - interrupts
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/apple-aic.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    wdt: watchdog@50000000 {
+        compatible = "apple,t8103-wdt", "apple,wdt";
+        reg = <0x50000000 0x4000>;
+        clocks = <&clk>;
+        interrupts = <AIC_IRQ 123 IRQ_TYPE_LEVEL_HIGH>;
+    };
+
+...
index ec3e71f..e445cb1 100644 (file)
@@ -27,7 +27,7 @@ Sphinx Install
 ==============
 
 The ReST markups currently used by the Documentation/ files are meant to be
-built with ``Sphinx`` version 1.3 or higher.
+built with ``Sphinx`` version 1.7 or higher.
 
 There's a script that checks for the Sphinx requirements. Please see
 :ref:`sphinx-pre-install` for further details.
@@ -43,10 +43,6 @@ or ``virtualenv``, depending on how your distribution packaged Python 3.
 
 .. note::
 
-   #) Sphinx versions below 1.5 don't work properly with Python's
-      docutils version 0.13.1 or higher. So, if you're willing to use
-      those versions, you should run ``pip install 'docutils==0.12'``.
-
    #) It is recommended to use the RTD theme for html output. Depending
       on the Sphinx version, it should be installed separately,
       with ``pip install sphinx_rtd_theme``.
@@ -55,13 +51,13 @@ or ``virtualenv``, depending on how your distribution packaged Python 3.
       those expressions are written using LaTeX notation. It needs texlive
       installed with amsfonts and amsmath in order to evaluate them.
 
-In summary, if you want to install Sphinx version 1.7.9, you should do::
+In summary, if you want to install Sphinx version 2.4.4, you should do::
 
-       $ virtualenv sphinx_1.7.9
-       $ . sphinx_1.7.9/bin/activate
-       (sphinx_1.7.9) $ pip install -r Documentation/sphinx/requirements.txt
+       $ virtualenv sphinx_2.4.4
+       $ . sphinx_2.4.4/bin/activate
+       (sphinx_2.4.4) $ pip install -r Documentation/sphinx/requirements.txt
 
-After running ``. sphinx_1.7.9/bin/activate``, the prompt will change,
+After running ``. sphinx_2.4.4/bin/activate``, the prompt will change,
 in order to indicate that you're using the new environment. If you
 open a new shell, you need to rerun this command to enter again at
 the virtual environment before building the documentation.
@@ -81,7 +77,7 @@ output.
 PDF and LaTeX builds
 --------------------
 
-Such builds are currently supported only with Sphinx versions 1.4 and higher.
+Such builds are currently supported only with Sphinx versions 2.4 and higher.
 
 For PDF and LaTeX output, you'll also need ``XeLaTeX`` version 3.14159265.
 
@@ -104,8 +100,8 @@ command line options for your distro::
        You should run:
 
                sudo dnf install -y texlive-luatex85
-               /usr/bin/virtualenv sphinx_1.7.9
-               . sphinx_1.7.9/bin/activate
+               /usr/bin/virtualenv sphinx_2.4.4
+               . sphinx_2.4.4/bin/activate
                pip install -r Documentation/sphinx/requirements.txt
 
        Can't build as 1 mandatory dependency is missing at ./scripts/sphinx-pre-install line 468.
index 681c6a4..4f49027 100644 (file)
@@ -35,7 +35,7 @@ This document describes only the kernel module and the interactions
 required with any user-space program.  Subsequent text refers to this
 as the "automount daemon" or simply "the daemon".
 
-"autofs" is a Linux kernel module with provides the "autofs"
+"autofs" is a Linux kernel module which provides the "autofs"
 filesystem type.  Several "autofs" filesystems can be mounted and they
 can each be managed separately, or all managed by the same daemon.
 
index 8a2788a..5ac62a7 100644 (file)
@@ -84,6 +84,16 @@ CONFIG_ENERGY_MODEL must be enabled to use the EM framework.
 2.2 Registration of performance domains
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
+Registration of 'advanced' EM
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The 'advanced' EM gets it's name due to the fact that the driver is allowed
+to provide more precised power model. It's not limited to some implemented math
+formula in the framework (like it's in 'simple' EM case). It can better reflect
+the real power measurements performed for each performance state. Thus, this
+registration method should be preferred in case considering EM static power
+(leakage) is important.
+
 Drivers are expected to register performance domains into the EM framework by
 calling the following API::
 
@@ -103,6 +113,18 @@ to: return warning/error, stop working or panic.
 See Section 3. for an example of driver implementing this
 callback, or Section 2.4 for further documentation on this API
 
+Registration of 'simple' EM
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The 'simple' EM is registered using the framework helper function
+cpufreq_register_em_with_opp(). It implements a power model which is tight to
+math formula::
+
+       Power = C * V^2 * f
+
+The EM which is registered using this method might not reflect correctly the
+physics of a real device, e.g. when static power (leakage) is important.
+
 
 2.3 Accessing performance domains
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -138,6 +160,10 @@ or in Section 2.4
 3. Example driver
 -----------------
 
+The CPUFreq framework supports dedicated callback for registering
+the EM for a given CPU(s) 'policy' object: cpufreq_driver::register_em().
+That callback has to be implemented properly for a given driver,
+because the framework would call it at the right time during setup.
 This section provides a simple example of a CPUFreq driver registering a
 performance domain in the Energy Model framework using the (fake) 'foo'
 protocol. The driver implements an est_power() function to be provided to the
@@ -167,25 +193,22 @@ EM framework::
   20           return 0;
   21   }
   22
-  23   static int foo_cpufreq_init(struct cpufreq_policy *policy)
+  23   static void foo_cpufreq_register_em(struct cpufreq_policy *policy)
   24   {
   25           struct em_data_callback em_cb = EM_DATA_CB(est_power);
   26           struct device *cpu_dev;
-  27           int nr_opp, ret;
+  27           int nr_opp;
   28
   29           cpu_dev = get_cpu_device(cpumask_first(policy->cpus));
   30
-  31           /* Do the actual CPUFreq init work ... */
-  32           ret = do_foo_cpufreq_init(policy);
-  33           if (ret)
-  34                   return ret;
-  35
-  36           /* Find the number of OPPs for this policy */
-  37           nr_opp = foo_get_nr_opp(policy);
+  31           /* Find the number of OPPs for this policy */
+  32           nr_opp = foo_get_nr_opp(policy);
+  33
+  34           /* And register the new performance domain */
+  35           em_dev_register_perf_domain(cpu_dev, nr_opp, &em_cb, policy->cpus,
+  36                                       true);
+  37   }
   38
-  39           /* And register the new performance domain */
-  40           em_dev_register_perf_domain(cpu_dev, nr_opp, &em_cb, policy->cpus,
-  41                                       true);
-  42
-  43           return 0;
-  44   }
+  39   static struct cpufreq_driver foo_cpufreq_driver = {
+  40           .register_em = foo_cpufreq_register_em,
+  41   };
index e35ab74..b398b85 100644 (file)
@@ -54,7 +54,7 @@ mcelog                 0.6              mcelog --version
 iptables               1.4.2            iptables -V
 openssl & libcrypto    1.0.0            openssl version
 bc                     1.06.95          bc --version
-Sphinx\ [#f1]_        1.3              sphinx-build --version
+Sphinx\ [#f1]_         1.7              sphinx-build --version
 ====================== ===============  ========================================
 
 .. [#f1] Sphinx is needed only to build the Kernel documentation
index a0cc969..da085d6 100644 (file)
@@ -22,8 +22,8 @@ use it, it will make your life as a kernel developer and in general much
 easier.
 
 Some subsystems and maintainer trees have additional information about
-their workflow and expectations, see :ref:`Documentation/process/maintainer
-handbooks <maintainer_handbooks_main>`.
+their workflow and expectations, see
+:ref:`Documentation/process/maintainer-handbooks.rst <maintainer_handbooks_main>`.
 
 Obtain a current source tree
 ----------------------------
index 4e5b26f..b3166c4 100644 (file)
@@ -2442,11 +2442,10 @@ Or this simple script!
   #!/bin/bash
 
   tracefs=`sed -ne 's/^tracefs \(.*\) tracefs.*/\1/p' /proc/mounts`
-  echo nop > $tracefs/tracing/current_tracer
-  echo 0 > $tracefs/tracing/tracing_on
-  echo $$ > $tracefs/tracing/set_ftrace_pid
-  echo function > $tracefs/tracing/current_tracer
-  echo 1 > $tracefs/tracing/tracing_on
+  echo 0 > $tracefs/tracing_on
+  echo $$ > $tracefs/set_ftrace_pid
+  echo function > $tracefs/current_tracer
+  echo 1 > $tracefs/tracing_on
   exec "$@"
 
 
index 0046d75..9762452 100644 (file)
@@ -35,7 +35,7 @@ Installazione Sphinx
 ====================
 
 I marcatori ReST utilizzati nei file in Documentation/ sono pensati per essere
-processati da ``Sphinx`` nella versione 1.3 o superiore.
+processati da ``Sphinx`` nella versione 1.7 o superiore.
 
 Esiste uno script che verifica i requisiti Sphinx. Per ulteriori dettagli
 consultate :ref:`it_sphinx-pre-install`.
@@ -53,11 +53,6 @@ pacchettizzato dalla vostra distribuzione.
 
 .. note::
 
-   #) Le versioni di Sphinx inferiori alla 1.5 non funzionano bene
-      con il pacchetto Python docutils versione 0.13.1 o superiore.
-      Se volete usare queste versioni, allora dovere eseguire
-      ``pip install 'docutils==0.12'``.
-
    #) Viene raccomandato l'uso del tema RTD per la documentazione in HTML.
       A seconda della versione di Sphinx, potrebbe essere necessaria
       l'installazione tramite il comando ``pip install sphinx_rtd_theme``.
@@ -67,13 +62,13 @@ pacchettizzato dalla vostra distribuzione.
       utilizzando LaTeX. Per una corretta interpretazione, è necessario aver
       installato texlive con i pacchetti amdfonts e amsmath.
 
-Riassumendo, se volete installare la versione 1.7.9 di Sphinx dovete eseguire::
+Riassumendo, se volete installare la versione 2.4.4 di Sphinx dovete eseguire::
 
-       $ virtualenv sphinx_1.7.9
-       $ . sphinx_1.7.9/bin/activate
-       (sphinx_1.7.9) $ pip install -r Documentation/sphinx/requirements.txt
+       $ virtualenv sphinx_2.4.4
+       $ . sphinx_2.4.4/bin/activate
+       (sphinx_2.4.4) $ pip install -r Documentation/sphinx/requirements.txt
 
-Dopo aver eseguito ``. sphinx_1.7.9/bin/activate``, il prompt cambierà per
+Dopo aver eseguito ``. sphinx_2.4.4/bin/activate``, il prompt cambierà per
 indicare che state usando il nuovo ambiente. Se aprite un nuova sessione,
 prima di generare la documentazione, dovrete rieseguire questo comando per
 rientrare nell'ambiente virtuale.
@@ -94,7 +89,7 @@ Generazione in PDF e LaTeX
 --------------------------
 
 Al momento, la generazione di questi documenti è supportata solo dalle
-versioni di Sphinx superiori alla 1.4.
+versioni di Sphinx superiori alla 2.4.
 
 Per la generazione di PDF e LaTeX, avrete bisogno anche del pacchetto
 ``XeLaTeX`` nella versione 3.14159265
@@ -119,8 +114,8 @@ l'installazione::
        You should run:
 
                sudo dnf install -y texlive-luatex85
-               /usr/bin/virtualenv sphinx_1.7.9
-               . sphinx_1.7.9/bin/activate
+               /usr/bin/virtualenv sphinx_2.4.4
+               . sphinx_2.4.4/bin/activate
                pip install -r Documentation/sphinx/requirements.txt
 
        Can't build as 1 mandatory dependency is missing at ./scripts/sphinx-pre-install line 468.
index 87d0818..dc71933 100644 (file)
@@ -57,7 +57,7 @@ mcelog                 0.6                mcelog --version
 iptables               1.4.2              iptables -V
 openssl & libcrypto    1.0.0              openssl version
 bc                     1.06.95            bc --version
-Sphinx\ [#f1]_         1.3                sphinx-build --version
+Sphinx\ [#f1]_         1.7                sphinx-build --version
 ====================== =================  ========================================
 
 .. [#f1] Sphinx è necessario solo per produrre la documentazione del Kernel
index 951595c..23eac67 100644 (file)
@@ -26,7 +26,7 @@ reStructuredText文件可能包含包含来自源文件的结构化文档注释
 安装Sphinx
 ==========
 
-Documentation/ 下的ReST文件现在使用sphinx1.3或更高版本构建。
+Documentation/ 下的ReST文件现在使用sphinx1.7或更高版本构建。
 
 这有一个脚本可以检查Sphinx的依赖项。更多详细信息见
 :ref:`sphinx-pre-install_zh` 。
@@ -40,22 +40,19 @@ Documentation/ 下的ReST文件现在使用sphinx1.3或更高版本构建。
 
 .. note::
 
-   #) 低于1.5版本的Sphinx无法与Python的0.13.1或更高版本docutils一起正常工作。
-      如果您想使用这些版本,那么应该运行 ``pip install 'docutils==0.12'`` 。
-
    #) html输出建议使用RTD主题。根据Sphinx版本的不同,它应该用
       ``pip install sphinx_rtd_theme`` 单独安装。
 
    #) 一些ReST页面包含数学表达式。由于Sphinx的工作方式,这些表达式是使用 LaTeX
       编写的。它需要安装amsfonts和amsmath宏包,以便显示。
 
-总之,如您要安装Sphinx 1.7.9版本,应执行::
+总之,如您要安装Sphinx 2.4.4版本,应执行::
 
-       $ virtualenv sphinx_1.7.9
-       $ . sphinx_1.7.9/bin/activate
-       (sphinx_1.7.9) $ pip install -r Documentation/sphinx/requirements.txt
+       $ virtualenv sphinx_2.4.4
+       $ . sphinx_2.4.4/bin/activate
+       (sphinx_2.4.4) $ pip install -r Documentation/sphinx/requirements.txt
 
-在运行 ``. sphinx_1.7.9/bin/activate`` 之后,提示符将变化,以指示您正在使用新
+在运行 ``. sphinx_2.4.4/bin/activate`` 之后,提示符将变化,以指示您正在使用新
 环境。如果您打开了一个新的shell,那么在构建文档之前,您需要重新运行此命令以再
 次进入虚拟环境中。
 
@@ -71,7 +68,7 @@ Documentation/ 下的ReST文件现在使用sphinx1.3或更高版本构建。
 PDF和LaTeX构建
 --------------
 
-目前只有Sphinx 1.4及更高版本才支持这种构建。
+目前只有Sphinx 2.4及更高版本才支持这种构建。
 
 对于PDF和LaTeX输出,还需要 ``XeLaTeX`` 3.14159265版本。(译注:此版本号真实
 存在)
@@ -93,8 +90,8 @@ PDF和LaTeX构建
        You should run:
 
                sudo dnf install -y texlive-luatex85
-               /usr/bin/virtualenv sphinx_1.7.9
-               . sphinx_1.7.9/bin/activate
+               /usr/bin/virtualenv sphinx_2.4.4
+               . sphinx_2.4.4/bin/activate
                pip install -r Documentation/sphinx/requirements.txt
 
        Can't build as 1 mandatory dependency is missing at ./scripts/sphinx-pre-install line 468.
index c6a5bb2..8053ae4 100644 (file)
@@ -36,14 +36,14 @@ Linux内核管理风格
 每个人都认为管理者做决定,而且决策很重要。决定越大越痛苦,管理者就必须越高级。
 这很明显,但事实并非如此。
 
¸¸æ\88\8fç\9a\84å\90\8då­\97是 **避免** 做出决定。尤其是,如果有人告诉你“选择(a)或(b),
\9c\80é\87\8dè¦\81ç\9a\84是 **避免** 做出决定。尤其是,如果有人告诉你“选择(a)或(b),
 我们真的需要你来做决定”,你就是陷入麻烦的管理者。你管理的人比你更了解细节,
 所以如果他们来找你做技术决策,你完蛋了。你显然没有能力为他们做这个决定。
 
 (推论:如果你管理的人不比你更了解细节,你也会被搞砸,尽管原因完全不同。
 也就是说,你的工作是错的,他们应该管理你的才智)
 
\89\80以游æ\88\8fç\9a\84å\90\8då­\97是 **避免** 做出决定,至少是那些大而痛苦的决定。做一些小的
\89\80以æ\9c\80é\87\8dè¦\81ç\9a\84是 **避免** 做出决定,至少是那些大而痛苦的决定。做一些小的
 和非结果性的决定是很好的,并且使您看起来好像知道自己在做什么,所以内核管理者
 需要做的是将那些大的和痛苦的决定变成那些没有人真正关心的小事情。
 
index 7a2345c..3b01f65 100644 (file)
@@ -1745,17 +1745,21 @@ B:      https://github.com/AsahiLinux/linux/issues
 C:     irc://irc.oftc.net/asahi-dev
 T:     git https://github.com/AsahiLinux/linux.git
 F:     Documentation/devicetree/bindings/arm/apple.yaml
+F:     Documentation/devicetree/bindings/arm/apple/*
 F:     Documentation/devicetree/bindings/i2c/apple,i2c.yaml
 F:     Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml
 F:     Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml
 F:     Documentation/devicetree/bindings/pci/apple,pcie.yaml
 F:     Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
+F:     Documentation/devicetree/bindings/power/apple*
+F:     Documentation/devicetree/bindings/watchdog/apple,wdt.yaml
 F:     arch/arm64/boot/dts/apple/
 F:     drivers/i2c/busses/i2c-pasemi-core.c
 F:     drivers/i2c/busses/i2c-pasemi-platform.c
 F:     drivers/irqchip/irq-apple-aic.c
 F:     drivers/mailbox/apple-mailbox.c
 F:     drivers/pinctrl/pinctrl-apple-gpio.c
+F:     drivers/soc/apple/*
 F:     include/dt-bindings/interrupt-controller/apple-aic.h
 F:     include/dt-bindings/pinctrl/apple.h
 F:     include/linux/apple-mailbox.h
@@ -3733,7 +3737,7 @@ F:        drivers/scsi/bnx2i/
 BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER
 M:     Ariel Elior <aelior@marvell.com>
 M:     Sudarsana Kalluru <skalluru@marvell.com>
-M:     GR-everest-linux-l2@marvell.com
+M:     Manish Chopra <manishc@marvell.com>
 L:     netdev@vger.kernel.org
 S:     Supported
 F:     drivers/net/ethernet/broadcom/bnx2x/
@@ -10445,7 +10449,7 @@ F:      arch/riscv/include/uapi/asm/kvm*
 F:     arch/riscv/kvm/
 
 KERNEL VIRTUAL MACHINE for s390 (KVM/s390)
-M:     Christian Borntraeger <borntraeger@de.ibm.com>
+M:     Christian Borntraeger <borntraeger@linux.ibm.com>
 M:     Janosch Frank <frankja@linux.ibm.com>
 R:     David Hildenbrand <david@redhat.com>
 R:     Claudio Imbrenda <imbrenda@linux.ibm.com>
@@ -15593,7 +15597,7 @@ F:      drivers/scsi/qedi/
 
 QLOGIC QL4xxx ETHERNET DRIVER
 M:     Ariel Elior <aelior@marvell.com>
-M:     GR-everest-linux-l2@marvell.com
+M:     Manish Chopra <manishc@marvell.com>
 L:     netdev@vger.kernel.org
 S:     Supported
 F:     drivers/net/ethernet/qlogic/qed/
@@ -16573,7 +16577,7 @@ F:      drivers/video/fbdev/savage/
 S390
 M:     Heiko Carstens <hca@linux.ibm.com>
 M:     Vasily Gorbik <gor@linux.ibm.com>
-M:     Christian Borntraeger <borntraeger@de.ibm.com>
+M:     Christian Borntraeger <borntraeger@linux.ibm.com>
 R:     Alexander Gordeev <agordeev@linux.ibm.com>
 L:     linux-s390@vger.kernel.org
 S:     Supported
@@ -20317,7 +20321,8 @@ F:      arch/x86/include/asm/vmware.h
 F:     arch/x86/kernel/cpu/vmware.c
 
 VMWARE PVRDMA DRIVER
-M:     Adit Ranadive <aditr@vmware.com>
+M:     Bryan Tan <bryantan@vmware.com>
+M:     Vishnu Dasa <vdasa@vmware.com>
 M:     VMware PV-Drivers <pv-drivers@vmware.com>
 L:     linux-rdma@vger.kernel.org
 S:     Maintained
index 9e12c14..daf95a5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
 VERSION = 5
 PATCHLEVEL = 16
 SUBLEVEL = 0
-EXTRAVERSION = -rc1
+EXTRAVERSION = -rc2
 NAME = Trick or Treat
 
 # *DOCUMENTATION*
index f0f9e8b..c2724d9 100644 (file)
@@ -1463,6 +1463,7 @@ config HIGHMEM
        bool "High Memory Support"
        depends on MMU
        select KMAP_LOCAL
+       select KMAP_LOCAL_NON_LINEAR_PTE_ARRAY
        help
          The address space of ARM processors is only 4 Gigabytes large
          and it has to accommodate user address space, kernel address
index a8763a7..75b680e 100644 (file)
@@ -61,6 +61,7 @@ dtb-$(CONFIG_SOC_SAM_V7) += \
        at91-sama5d2_icp.dtb \
        at91-sama5d2_ptc_ek.dtb \
        at91-sama5d2_xplained.dtb \
+       at91-sama5d3_ksz9477_evb.dtb \
        at91-sama5d3_xplained.dtb \
        at91-dvk_som60.dtb \
        at91-gatwick.dtb \
@@ -263,12 +264,14 @@ dtb-$(CONFIG_ARCH_IXP4XX) += \
        intel-ixp46x-ixdp465.dtb \
        intel-ixp42x-adi-coyote.dtb \
        intel-ixp42x-ixdpg425.dtb \
+       intel-ixp42x-goramo-multilink.dtb \
        intel-ixp42x-iomega-nas100d.dtb \
        intel-ixp42x-dlink-dsm-g600.dtb \
        intel-ixp42x-gateworks-gw2348.dtb \
        intel-ixp43x-gateworks-gw2358.dtb \
        intel-ixp42x-netgear-wg302v2.dtb \
-       intel-ixp42x-arcom-vulcan.dtb
+       intel-ixp42x-arcom-vulcan.dtb \
+       intel-ixp42x-gateway-7001.dtb
 dtb-$(CONFIG_ARCH_KEYSTONE) += \
        keystone-k2hk-evm.dtb \
        keystone-k2l-evm.dtb \
@@ -483,6 +486,8 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
        imx6dl-icore-rqs.dtb \
        imx6dl-lanmcu.dtb \
        imx6dl-mamoj.dtb \
+       imx6dl-mba6a.dtb \
+       imx6dl-mba6b.dtb \
        imx6dl-nit6xlite.dtb \
        imx6dl-nitrogen6x.dtb \
        imx6dl-phytec-mira-rdk-nand.dtb \
@@ -584,6 +589,8 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
        imx6q-kp-tpc.dtb \
        imx6q-logicpd.dtb \
        imx6q-marsboard.dtb \
+       imx6q-mba6a.dtb \
+       imx6q-mba6b.dtb \
        imx6q-mccmon6.dtb \
        imx6q-nitrogen6x.dtb \
        imx6q-nitrogen6_max.dtb \
@@ -628,7 +635,9 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
        imx6q-wandboard.dtb \
        imx6q-wandboard-revb1.dtb \
        imx6q-wandboard-revd1.dtb \
+       imx6q-yapp4-crux.dtb \
        imx6q-zii-rdu2.dtb \
+       imx6qp-mba6b.dtb \
        imx6qp-nitrogen6_max.dtb \
        imx6qp-nitrogen6_som2.dtb \
        imx6qp-phytec-mira-rdk-nand.dtb \
@@ -641,6 +650,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
        imx6qp-tx6qp-8137-mb7.dtb \
        imx6qp-vicutp.dtb \
        imx6qp-wandboard-revd1.dtb \
+       imx6qp-yapp4-crux-plus.dtb \
        imx6qp-zii-rdu2.dtb \
        imx6s-dhcom-drc02.dtb
 dtb-$(CONFIG_SOC_IMX6SL) += \
@@ -688,12 +698,14 @@ dtb-$(CONFIG_SOC_IMX6UL) += \
        imx6ull-colibri-emmc-eval-v3.dtb \
        imx6ull-colibri-eval-v3.dtb \
        imx6ull-colibri-wifi-eval-v3.dtb \
+       imx6ull-jozacp.dtb \
        imx6ull-myir-mys-6ulx-eval.dtb \
        imx6ull-opos6uldev.dtb \
        imx6ull-phytec-segin-ff-rdk-nand.dtb \
        imx6ull-phytec-segin-ff-rdk-emmc.dtb \
        imx6ull-phytec-segin-lc-rdk-nand.dtb \
-       imx6ulz-14x14-evk.dtb
+       imx6ulz-14x14-evk.dtb \
+       imx6ulz-bsh-smm-m2.dtb
 dtb-$(CONFIG_SOC_IMX7D) += \
        imx7d-cl-som-imx7.dtb \
        imx7d-colibri-aster.dtb \
@@ -1140,6 +1152,7 @@ dtb-$(CONFIG_ARCH_STM32) += \
        stm32mp157a-microgea-stm32mp1-microdev2.0.dtb \
        stm32mp157a-microgea-stm32mp1-microdev2.0-of7.dtb \
        stm32mp157a-icore-stm32mp1-ctouch2.dtb \
+       stm32mp157a-icore-stm32mp1-ctouch2-of10.dtb \
        stm32mp157a-icore-stm32mp1-edimm2.2.dtb \
        stm32mp157a-stinger96.dtb \
        stm32mp157c-dhcom-pdk2.dtb \
@@ -1465,6 +1478,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
        mt2701-evb.dtb \
        mt6580-evbp1.dtb \
        mt6589-aquaris5.dtb \
+       mt6589-fairphone-fp1.dtb \
        mt6592-evb.dtb \
        mt7623a-rfb-emmc.dtb \
        mt7623a-rfb-nand.dtb \
index 0ccdc7c..56ae509 100644 (file)
 &rtc {
        clocks = <&clk_32768_ck>, <&clk_24mhz_clkctrl AM3_CLK_24MHZ_CLKDIV32K_CLKCTRL 0>;
        clock-names = "ext-clk", "int-clk";
+       system-power-controller;
 };
 
 &pruss_tm {
index 10494c4..a7a8c61 100644 (file)
        non-removable;
 };
 
-&rtc {
-       system-power-controller;
-};
-
 / {
        memory@80000000 {
                device_type = "memory";
index c6bb325..147c00d 100644 (file)
                        #address-cells = <1>;
                        #size-cells = <0>;
                        ax8975@c {
-                               compatible = "ak,ak8975";
+                               compatible = "asahi-kasei,ak8975";
                                reg = <0x0c>;
                        };
                };
index e5ce89c..5835c0c 100644 (file)
 &pruss_tm {
        status = "okay";
 };
+
+&rtc {
+       system-power-controller;
+};
index 605b2a4..b2846cd 100644 (file)
@@ -84,7 +84,7 @@
                        #address-cells = <1>;
                        #size-cells = <0>;
                        ax8975@c {
-                               compatible = "ak,ak8975";
+                               compatible = "asahi-kasei,ak8975";
                                reg = <0x0c>;
                        };
                };
index 5ce8e68..3e33547 100644 (file)
        tsc {
                ti,wires = <4>;
                ti,x-plate-resistance = <200>;
-               ti,coordiante-readouts = <5>;
+               ti,coordinate-readouts = <5>;
                ti,wire-config = <0x00 0x11 0x22 0x33>;
        };
 
index c2e4896..4416ddb 100644 (file)
        };
 };
 
+&magadc {
+       status = "okay";
+
+       adc {
+               ti,adc-channels = <0 1 2 3 4 5 6 7>;
+       };
+};
+
 &ecap0 {
        status = "okay";
        pinctrl-names = "default";
index ba58e6b..8f2268c 100644 (file)
                };
 
                target-module@4c000 {                   /* 0x4834c000, ap 114 72.0 */
-                       compatible = "ti,sysc";
-                       status = "disabled";
+                       compatible = "ti,sysc-omap4", "ti,sysc";
+                       reg = <0x4c000 0x4>,
+                             <0x4c010 0x4>;
+                       reg-names = "rev", "sysc";
+                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>;
+                       clocks = <&l3s_clkctrl AM4_L3S_ADC1_CLKCTRL 0>;
+                       clock-names = "fck";
                        #address-cells = <1>;
                        #size-cells = <1>;
                        ranges = <0x0 0x4c000 0x2000>;
+
+                       magadc: magadc@0 {
+                               compatible = "ti,am4372-magadc";
+                               reg = <0x0 0x2000>;
+                               interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&adc_mag_fck>;
+                               clock-names = "fck";
+                               dmas = <&edma 54 0>, <&edma 55 0>;
+                               dma-names = "fifo0", "fifo1";
+                               status = "disabled";
+
+                               mag {
+                                       compatible = "ti,am4372-mag";
+                               };
+
+                               adc {
+                                       #io-channel-cells = <1>;
+                                       compatible ="ti,am4372-adc";
+                               };
+                       };
                };
 
                target-module@80000 {                   /* 0x48380000, ap 123 42.0 */
index 314fc59..66e892f 100644 (file)
                reg = <0x422c>;
        };
 
+       adc_mag_fck: adc_mag_fck@424c {
+               #clock-cells = <0>;
+               compatible = "ti,mux-clock";
+               clocks = <&sys_clkin_ck>, <&dpll_per_m2_ck>;
+               reg = <0x424c>;
+       };
+
        l3_gclk: l3_gclk {
                #clock-cells = <0>;
                compatible = "fixed-factor-clock";
index 9b1a24c..df3c8d1 100644 (file)
                        };
 
                        uart0: serial@12000 {
-                               compatible = "marvell,armada-38x-uart";
+                               compatible = "marvell,armada-38x-uart", "ns16550a";
                                reg = <0x12000 0x100>;
                                reg-shift = <2>;
                                interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
                        };
 
                        uart1: serial@12100 {
-                               compatible = "marvell,armada-38x-uart";
+                               compatible = "marvell,armada-38x-uart", "ns16550a";
                                reg = <0x12100 0x100>;
                                reg-shift = <2>;
                                interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
index 5827383..47a0006 100644 (file)
                        reg = <0x8000 0x3E000>;
                };
        };
-
-       spidev@1 {
-               compatible = "spidev";
-               spi-max-frequency = <2000000>;
-               reg = <1>;
-       };
 };
 
 &spi1 {
        pinctrl-0 = <&pinctrl_spi1 &pinctrl_spi1_npcs0 &pinctrl_spi1_npcs1>;
        cs-gpios = <&pioB 3 GPIO_ACTIVE_HIGH>, <&pioC 5 GPIO_ACTIVE_LOW>, <0>, <0>;
        status = "okay";
-
-       spidev@0 {
-               compatible = "spidev";
-               spi-max-frequency = <2000000>;
-               reg = <0>;
-       };
-
-       spidev@1 {
-               compatible = "spidev";
-               spi-max-frequency = <2000000>;
-               reg = <1>;
-       };
 };
 
 &usart0 {
index b1e854f..9bf2ec0 100644 (file)
@@ -66,7 +66,7 @@
                        pinctrl-names = "default";
                        pinctrl-0 = <&pinctrl_sdmmc0_default>;
                        non-removable;
-                       mmc-ddr-1_8v;
+                       mmc-ddr-3_3v;
                        status = "okay";
                };
 
                                                bias-disable;
                                        };
 
-                                       ck_cd_rstn_vddsel {
+                                       ck_cd_rstn {
                                                pinmux = <PIN_PA0__SDMMC0_CK>,
                                                         <PIN_PA10__SDMMC0_RSTN>,
-                                                        <PIN_PA11__SDMMC0_VDDSEL>,
                                                         <PIN_PA13__SDMMC0_CD>;
                                                bias-disable;
                                        };
diff --git a/arch/arm/boot/dts/at91-sama5d3_ksz9477_evb.dts b/arch/arm/boot/dts/at91-sama5d3_ksz9477_evb.dts
new file mode 100644 (file)
index 0000000..443e8b0
--- /dev/null
@@ -0,0 +1,209 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright (c) 2021 Oleksij Rempel <kernel@pengutronix.de>, Pengutronix
+ */
+/dts-v1/;
+#include "sama5d36.dtsi"
+
+/ {
+       model = "EVB-KSZ9477";
+       compatible = "microchip,sama5d3-ksz9477-evb", "atmel,sama5d36",
+                    "atmel,sama5d3", "atmel,sama5";
+
+       chosen {
+               stdout-path = &dbgu;
+       };
+
+       reg_3v3: regulator-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
+       reg_vcc_mmc0: regulator-mmc0 {
+               compatible = "regulator-fixed";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_mcc0_vcc>;
+               regulator-name = "mmc0-vcc";
+               regulator-max-microvolt = <3300000>;
+               regulator-min-microvolt = <3300000>;
+               gpio = <&pioE 2 GPIO_ACTIVE_LOW>;
+       };
+};
+
+&dbgu {
+       status = "okay";
+};
+
+&ebi {
+       pinctrl-0 = <&pinctrl_ebi_nand_addr>;
+       pinctrl-names = "default";
+       status = "okay";
+};
+
+&i2c0 {
+       pinctrl-0 = <&pinctrl_i2c0_pu>;
+       status = "okay";
+};
+
+&macb0 {
+       phy-mode = "rgmii";
+       status = "okay";
+
+       fixed-link {
+               speed = <1000>;
+               full-duplex;
+       };
+};
+
+&main_xtal {
+       clock-frequency = <12000000>;
+};
+
+&mmc0 {
+       pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3
+                    &pinctrl_mmc0_dat4_7 &pinctrl_mmc0_cd>;
+       status = "okay";
+
+       slot@0 {
+               reg = <0>;
+               bus-width = <8>;
+               cd-gpios = <&pioE 0 GPIO_ACTIVE_LOW>;
+               disable-wp;
+               vmmc-supply = <&reg_vcc_mmc0>;
+               vqmmc-supply = <&reg_3v3>;
+       };
+};
+
+&nand_controller {
+       status = "okay";
+
+       nand@3 {
+               reg = <0x3 0x0 0x2>;
+               atmel,rb = <0>;
+               nand-bus-width = <8>;
+               nand-ecc-mode = "hw";
+               nand-ecc-strength = <4>;
+               nand-ecc-step-size = <512>;
+               nand-on-flash-bbt;
+               label = "atmel_nand";
+       };
+};
+
+&slow_xtal {
+       clock-frequency = <32768>;
+};
+
+&spi0 {
+       cs-gpios = <&pioD 13 GPIO_ACTIVE_LOW>, <0>, <0>,
+                  <&pioD 16 GPIO_ACTIVE_LOW>;
+       status = "okay";
+};
+
+&spi1 {
+       pinctrl-0 = <&pinctrl_spi_ksz>;
+       cs-gpios = <&pioC 25 GPIO_ACTIVE_LOW>;
+       status = "okay";
+
+       switch@0 {
+               compatible = "microchip,ksz9477";
+               reg = <0>;
+               spi-max-frequency = <1000000>;
+               spi-cpha;
+               spi-cpol;
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               label = "lan1";
+                       };
+
+                       port@1 {
+                               reg = <1>;
+                               label = "lan2";
+                       };
+
+                       port@2 {
+                               reg = <2>;
+                               label = "lan3";
+                       };
+
+                       port@3 {
+                               reg = <3>;
+                               label = "lan4";
+                       };
+
+                       port@4 {
+                               reg = <4>;
+                               label = "lan5";
+                       };
+
+                       port@5 {
+                               reg = <5>;
+                               label = "cpu";
+                               ethernet = <&macb0>;
+                               phy-mode = "rgmii-txid";
+
+                               fixed-link {
+                                       speed = <1000>;
+                                       full-duplex;
+                               };
+                       };
+               };
+       };
+};
+
+&usb0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usba_vbus>;
+       atmel,vbus-gpio = <&pioE 9 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+};
+
+&pinctrl {
+       board {
+               pinctrl_i2c0_pu: i2c0-pu {
+                       atmel,pins =
+                               <AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
+                               <AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
+               };
+
+               pinctrl_mmc0_cd: mmc0-cd {
+                       atmel,pins = <AT91_PIOE 0 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+               };
+
+               pinctrl_mcc0_vcc: mmc0-vcc {
+                       atmel,pins = <AT91_PIOE 2 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+               };
+
+               pinctrl_spi_ksz: spi-ksz {
+                       atmel,pins =
+                               <
+                               /* SPI1_MISO */
+                               AT91_PIOC 22 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
+                               /* SPI1_MOSI */
+                               AT91_PIOC 23 AT91_PERIPH_A AT91_PINCTRL_NONE
+                               /* SPI1_SPCK */
+                               AT91_PIOC 24 AT91_PERIPH_A AT91_PINCTRL_NONE
+
+                               /* SPI CS */
+                               AT91_PIOC 25 AT91_PERIPH_GPIO AT91_PINCTRL_NONE
+                               /* switch IRQ */
+                               AT91_PIOB 28 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH
+                               /* switch PME_N, SoC IN */
+                               AT91_PIOC 30 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP
+                               /* switch RST */
+                               AT91_PIOC 31 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH
+                               >;
+               };
+
+               pinctrl_usba_vbus: usba-vbus {
+                       atmel,pins =
+                               <AT91_PIOE 9 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;
+               };
+       };
+};
index 0e1975c..ccf9e22 100644 (file)
@@ -13,6 +13,7 @@
 #include "sama7g5.dtsi"
 #include <dt-bindings/mfd/atmel-flexcom.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/at91.h>
 
 / {
        model = "Microchip SAMA7G5-EK";
        cpu-supply = <&vddcpu>;
 };
 
+&qspi0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_qspi>;
+       status = "okay";
+
+       flash@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <133000000>;
+               spi-tx-bus-width = <8>;
+               spi-rx-bus-width = <8>;
+               m25p,fast-read;
+
+               at91bootstrap@0 {
+                       label = "ospi: at91bootstrap";
+                       reg = <0x0 0x40000>;
+               };
+
+               bootloader@40000 {
+                       label = "ospi: bootloader";
+                       reg = <0x40000 0xc0000>;
+               };
+
+               bootloaderenvred@100000 {
+                       label = "ospi: bootloader env redundant";
+                       reg = <0x100000 0x40000>;
+               };
+
+               bootloaderenv@140000 {
+                       label = "ospi: bootloader env";
+                       reg = <0x140000 0x40000>;
+               };
+
+               dtb@180000 {
+                       label = "ospi: device tree";
+                       reg = <0x180000 0x80000>;
+               };
+
+               kernel@200000 {
+                       label = "ospi: kernel";
+                       reg = <0x200000 0x600000>;
+               };
+
+               rootfs@800000 {
+                       label = "ospi: rootfs";
+                       reg = <0x800000 0x7800000>;
+               };
+
+       };
+};
+
 &dma0 {
        status = "okay";
 };
                bias-disable;
        };
 
+       pinctrl_qspi: qspi {
+               pinmux = <PIN_PB12__QSPI0_IO0>,
+                        <PIN_PB11__QSPI0_IO1>,
+                        <PIN_PB10__QSPI0_IO2>,
+                        <PIN_PB9__QSPI0_IO3>,
+                        <PIN_PB16__QSPI0_IO4>,
+                        <PIN_PB17__QSPI0_IO5>,
+                        <PIN_PB18__QSPI0_IO6>,
+                        <PIN_PB19__QSPI0_IO7>,
+                        <PIN_PB13__QSPI0_CS>,
+                        <PIN_PB14__QSPI0_SCK>,
+                        <PIN_PB15__QSPI0_SCKN>,
+                        <PIN_PB20__QSPI0_DQS>,
+                        <PIN_PB21__QSPI0_INT>;
+               bias-disable;
+               slew-rate = <0>;
+               atmel,drive-strength = <ATMEL_PIO_DRVSTR_HI>;
+       };
+
        pinctrl_sdmmc0_default: sdmmc0_default {
                cmd_data {
                        pinmux = <PIN_PA1__SDMMC0_CMD>,
index a5e45bb..89f0f71 100644 (file)
 
 &spi1 {
        status = "okay";
-
-       spidev@0 {
-               compatible = "spidev";
-               reg = <0>;
-               spi-max-frequency = <8000000>;
-       };
 };
 
 &usb0 {
index d87ee47..9698801 100644 (file)
@@ -5,7 +5,7 @@
 
 / {
        elpida_ECB240ABACN: lpddr2 {
-               compatible      = "Elpida,ECB240ABACN","jedec,lpddr2-s4";
+               compatible      = "elpida,ECB240ABACN","jedec,lpddr2-s4";
                density         = <2048>;
                io-width        = <32>;
 
index 19bb7dc..3389405 100644 (file)
                compatible = "brcm,bcm4330-bt";
 
                shutdown-gpios = <&gpl0 4 GPIO_ACTIVE_HIGH>;
-               reset-gpios = <&gpl1 0 GPIO_ACTIVE_HIGH>;
+               reset-gpios = <&gpl1 0 GPIO_ACTIVE_LOW>;
                device-wakeup-gpios = <&gpx3 1 GPIO_ACTIVE_HIGH>;
-               host-wakeup-gpios = <&gpx2 6 GPIO_ACTIVE_HIGH>;
+
+               interrupt-parent = <&gpx2>;
+               interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
+               interrupt-names = "host-wakeup";
        };
 };
 
index 52fa211..524d244 100644 (file)
                        status = "disabled";
                };
 
-               hsi2c_0: hsi2c@12da0000 {
+               hsi2c_0: i2c@12da0000 {
                        compatible = "samsung,exynos5260-hsi2c";
                        reg = <0x12DA0000 0x1000>;
                        interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_1: hsi2c@12db0000 {
+               hsi2c_1: i2c@12db0000 {
                        compatible = "samsung,exynos5260-hsi2c";
                        reg = <0x12DB0000 0x1000>;
                        interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_2: hsi2c@12dc0000 {
+               hsi2c_2: i2c@12dc0000 {
                        compatible = "samsung,exynos5260-hsi2c";
                        reg = <0x12DC0000 0x1000>;
                        interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_3: hsi2c@12dd0000 {
+               hsi2c_3: i2c@12dd0000 {
                        compatible = "samsung,exynos5260-hsi2c";
                        reg = <0x12DD0000 0x1000>;
                        interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
index 13112a8..6544c73 100644 (file)
@@ -84,7 +84,7 @@
                        partitions {
                                compatible = "redboot-fis";
                                /* Eraseblock at 0xfe0000 */
-                               fis-index-block = <0x1fc>;
+                               fis-index-block = <0x7f>;
                        };
                };
 
index 050a1fc..bd2e679 100644 (file)
@@ -26,9 +26,9 @@
  *                2 - 0
  *                3 - 1
  *
- * 'pin' is an integer between 0 and 0xbf. i.MX1 has 4 ports with 32 configurable
- * configurable pins each. 'pin' is PORT * 32 + PORT_PIN, PORT_PIN is the pin
- * number on the specific port (between 0 and 31).
+ * 'pin' is an integer between 0 and 0xbf. i.MX1 has 4 ports with 32
+ * configurable pins each. 'pin' is PORT * 32 + PORT_PIN, PORT_PIN is
+ * the pin number on the specific port (between 0 and 31).
  */
 
 #define MX1_PAD_A24__A24                       0x00 0x004
index 9b94098..e312f1e 100644 (file)
@@ -55,7 +55,7 @@
 
        clocks {
                clk32 {
-                       compatible = "fsl,imx-clk32", "fixed-clock";
+                       compatible = "fixed-clock";
                        #clock-cells = <0>;
                        clock-frequency = <32000>;
                };
index fdcca82..fa8044c 100644 (file)
@@ -62,7 +62,7 @@
 
        clocks {
                osc {
-                       compatible = "fsl,imx-osc", "fixed-clock";
+                       compatible = "fixed-clock";
                        #clock-cells = <0>;
                        clock-frequency = <24000000>;
                };
                        };
                };
 
-               spba@50000000 {
+               spba-bus@50000000 {
                        compatible = "fsl,spba-bus", "simple-bus";
                        #address-cells = <1>;
                        #size-cells = <1>;
index 1514d80..75aea0c 100644 (file)
@@ -26,9 +26,9 @@
  *                2 - 0
  *                3 - 1
  *
- * 'pin' is an integer between 0 and 0xbf. imx27 has 6 ports with 32 configurable
- * configurable pins each. 'pin' is PORT * 32 + PORT_PIN, PORT_PIN is the pin
- * number on the specific port (between 0 and 31).
+ * 'pin' is an integer between 0 and 0xbf. imx27 has 6 ports with 32
+ * configurable pins each. 'pin' is PORT * 32 + PORT_PIN, PORT_PIN is
+ * the pin number on the specific port (between 0 and 31).
  */
 
 #define MX27_PAD_USBH2_CLK__USBH2_CLK                      0x00 0x000
index 164254c..9e5651c 100644 (file)
                >;
                /* enable this and disable ssp3 below, if you need full duplex SPI transfer */
                status = "disabled";
-
-               spi@0 {
-                       compatible = "spidev";
-                       reg = <0>;
-                       spi-max-frequency = <57600000>;
-               };
-
-               spi@1 {
-                       compatible = "spidev";
-                       reg = <1>;
-                       spi-max-frequency = <57600000>;
-               };
-
-               spi@2 {
-                       compatible = "spidev";
-                       reg = <2>;
-                       spi-max-frequency = <57600000>;
-               };
        };
 };
 
        pinctrl-0 = <&spi3_pins_a>;
        clock-frequency = <57600000>;
        status = "okay";
-
-       spi@0 {
-               compatible = "spidev";
-               reg = <0>;
-               spi-max-frequency = <57600000>;
-       };
-
-       spi@1 {
-               compatible = "spidev";
-               reg = <1>;
-               spi-max-frequency = <57600000>;
-       };
-
-       spi@2 {
-               compatible = "spidev";
-               reg = <2>;
-               spi-max-frequency = <57600000>;
-       };
 };
 
 &usb0 {
index 948d2a5..2adb923 100644 (file)
                        };
                };
 
-               spba@50000000 {
+               spba-bus@50000000 {
                        compatible = "fsl,spba-bus", "simple-bus";
                        #address-cells = <1>;
                        #size-cells = <1>;
index a969f33..be0de0f 100644 (file)
 
        clocks {
                ckil {
-                       compatible = "fsl,imx-ckil", "fixed-clock";
+                       compatible = "fixed-clock";
                        #clock-cells = <0>;
                        clock-frequency = <32768>;
                };
 
                ckih1 {
-                       compatible = "fsl,imx-ckih1", "fixed-clock";
+                       compatible = "fixed-clock";
                        #clock-cells = <0>;
                        clock-frequency = <22579200>;
                };
 
                ckih2 {
-                       compatible = "fsl,imx-ckih2", "fixed-clock";
+                       compatible = "fixed-clock";
                        #clock-cells = <0>;
                        clock-frequency = <0>;
                };
 
                osc {
-                       compatible = "fsl,imx-osc", "fixed-clock";
+                       compatible = "fixed-clock";
                        #clock-cells = <0>;
                        clock-frequency = <24000000>;
                };
                        reg = <0x50000000 0x10000000>;
                        ranges;
 
-                       spba@50000000 {
+                       spba-bus@50000000 {
                                compatible = "fsl,spba-bus", "simple-bus";
                                #address-cells = <1>;
                                #size-cells = <1>;
index 01cfcbe..56c8d87 100644 (file)
 
        clocks {
                ckil {
-                       compatible = "fsl,imx-ckil", "fixed-clock";
+                       compatible = "fixed-clock";
                        #clock-cells = <0>;
                        clock-frequency = <32768>;
                };
 
                ckih1 {
-                       compatible = "fsl,imx-ckih1", "fixed-clock";
+                       compatible = "fixed-clock";
                        #clock-cells = <0>;
                        clock-frequency = <0>;
                };
 
                ckih2 {
-                       compatible = "fsl,imx-ckih2", "fixed-clock";
+                       compatible = "fixed-clock";
                        #clock-cells = <0>;
                        clock-frequency = <0>;
                };
 
                osc {
-                       compatible = "fsl,imx-osc", "fixed-clock";
+                       compatible = "fixed-clock";
                        #clock-cells = <0>;
                        clock-frequency = <24000000>;
                };
                        reg = <0x70000000 0x10000000>;
                        ranges;
 
-                       spba@70000000 {
+                       spba-bus@70000000 {
                                compatible = "fsl,spba-bus", "simple-bus";
                                #address-cells = <1>;
                                #size-cells = <1>;
index 7c9730f..81c2726 100644 (file)
                &gpio3 19 GPIO_ACTIVE_HIGH
        >;
 
-       spidev0: spi@0 {
-               compatible = "spidev";
-               reg = <0>;
-               spi-max-frequency = <54000000>;
-       };
-
-       spidev1: spi@1 {
-               compatible = "spidev";
-               reg = <1>;
-               spi-max-frequency = <54000000>;
-       };
 };
 
 &esdhc1 {
index 2cf3909..67487f3 100644 (file)
 
        clocks {
                ckil {
-                       compatible = "fsl,imx-ckil", "fixed-clock";
+                       compatible = "fixed-clock";
                        #clock-cells = <0>;
                        clock-frequency = <32768>;
                };
 
                ckih1 {
-                       compatible = "fsl,imx-ckih1", "fixed-clock";
+                       compatible = "fixed-clock";
                        #clock-cells = <0>;
                        clock-frequency = <22579200>;
                };
 
                ckih2 {
-                       compatible = "fsl,imx-ckih2", "fixed-clock";
+                       compatible = "fixed-clock";
                        #clock-cells = <0>;
                        clock-frequency = <0>;
                };
 
                osc {
-                       compatible = "fsl,imx-osc", "fixed-clock";
+                       compatible = "fixed-clock";
                        #clock-cells = <0>;
                        clock-frequency = <24000000>;
                };
                        reg = <0x50000000 0x10000000>;
                        ranges;
 
-                       spba@50000000 {
+                       spba-bus@50000000 {
                                compatible = "fsl,spba-bus", "simple-bus";
                                #address-cells = <1>;
                                #size-cells = <1>;
diff --git a/arch/arm/boot/dts/imx6dl-mba6.dtsi b/arch/arm/boot/dts/imx6dl-mba6.dtsi
new file mode 100644 (file)
index 0000000..b749b42
--- /dev/null
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright 2013 Sascha Hauer, Pengutronix
+ *
+ * Copyright 2013-2021 TQ-Systems GmbH
+ * Author: Markus Niebel <Markus.Niebel@tq-group.com>
+ */
+
+&ethphy {
+       rxdv-skew-ps = <180>;
+       txen-skew-ps = <0>;
+       rxd3-skew-ps = <180>;
+       rxd2-skew-ps = <180>;
+       rxd1-skew-ps = <180>;
+       rxd0-skew-ps = <180>;
+       txd3-skew-ps = <120>;
+       txd2-skew-ps = <0>;
+       txd1-skew-ps = <300>;
+       txd0-skew-ps = <120>;
+       txc-skew-ps = <1860>;
+       rxc-skew-ps = <1860>;
+};
diff --git a/arch/arm/boot/dts/imx6dl-mba6a.dts b/arch/arm/boot/dts/imx6dl-mba6a.dts
new file mode 100644 (file)
index 0000000..df0a96b
--- /dev/null
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright 2013 Sascha Hauer, Pengutronix
+ *
+ * Copyright 2013-2021 TQ-Systems GmbH
+ * Author: Markus Niebel <Markus.Niebel@tq-group.com>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include "imx6dl-tqma6a.dtsi"
+#include "imx6qdl-mba6.dtsi"
+#include "imx6qdl-mba6a.dtsi"
+#include "imx6dl-mba6.dtsi"
+
+/ {
+       model = "TQ TQMa6S/DL on MBa6x";
+       compatible = "tq,imx6dl-mba6x-a", "tq,mba6a",
+                    "tq,imx6dl-tqma6dl-a", "fsl,imx6dl";
+};
diff --git a/arch/arm/boot/dts/imx6dl-mba6b.dts b/arch/arm/boot/dts/imx6dl-mba6b.dts
new file mode 100644 (file)
index 0000000..610b19d
--- /dev/null
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright 2013 Sascha Hauer, Pengutronix
+ *
+ * Copyright 2013-2021 TQ-Systems GmbH
+ * Author: Markus Niebel <Markus.Niebel@tq-group.com>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include "imx6dl-tqma6b.dtsi"
+#include "imx6qdl-mba6.dtsi"
+#include "imx6qdl-mba6b.dtsi"
+#include "imx6dl-mba6.dtsi"
+
+/ {
+       model = "TQ TQMa6S/DL on MBa6x";
+       compatible = "tq,imx6dl-mba6x-b", "tq,mba6b",
+                    "tq,imx6dl-tqma6dl-b", "fsl,imx6dl";
+};
index 9f7f9f9..d906a7f 100644 (file)
@@ -8,6 +8,9 @@
 #include "imx6dl.dtsi"
 #include "imx6qdl-phytec-phycore-som.dtsi"
 #include "imx6qdl-phytec-mira.dtsi"
+#include "imx6qdl-phytec-mira-peb-eval-01.dtsi"
+#include "imx6qdl-phytec-mira-peb-av-02.dtsi"
+#include "imx6qdl-phytec-mira-peb-wlbt-05.dtsi"
 
 / {
        model = "PHYTEC phyBOARD-Mira DualLite/Solo Carrier-Board with NAND";
diff --git a/arch/arm/boot/dts/imx6q-mba6.dtsi b/arch/arm/boot/dts/imx6q-mba6.dtsi
new file mode 100644 (file)
index 0000000..0d7be45
--- /dev/null
@@ -0,0 +1,44 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright 2013 Sascha Hauer, Pengutronix
+ *
+ * Copyright 2013-2021 TQ-Systems GmbH
+ * Author: Markus Niebel <Markus.Niebel@tq-group.com>
+ */
+
+&ecspi5 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_ecspi5_mba6x>;
+       cs-gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
+};
+
+&ethphy {
+       rxdv-skew-ps = <180>;
+       txen-skew-ps = <120>;
+       rxd3-skew-ps = <180>;
+       rxd2-skew-ps = <180>;
+       rxd1-skew-ps = <180>;
+       rxd0-skew-ps = <180>;
+       txd3-skew-ps = <120>;
+       txd2-skew-ps = <0>;
+       txd1-skew-ps = <180>;
+       txd0-skew-ps = <360>;
+       txc-skew-ps = <1860>;
+       rxc-skew-ps = <1860>;
+};
+
+&sata {
+       status = "okay";
+};
+
+&iomuxc {
+       pinctrl_ecspi5_mba6x: ecspi5grp-mba6x {
+               fsl,pins = <
+                       /* HYS, SPEED = MED, 100k up, DSE = 011, SRE_FAST */
+                       MX6QDL_PAD_SD1_DAT0__ECSPI5_MISO 0x1b099
+                       MX6QDL_PAD_SD1_CMD__ECSPI5_MOSI 0xb099
+                       MX6QDL_PAD_SD1_CLK__ECSPI5_SCLK 0xb099
+                       MX6QDL_PAD_SD1_DAT1__GPIO1_IO17 0xb099 /* eCSPI5 SS0 */
+               >;
+       };
+};
diff --git a/arch/arm/boot/dts/imx6q-mba6a.dts b/arch/arm/boot/dts/imx6q-mba6a.dts
new file mode 100644 (file)
index 0000000..349a086
--- /dev/null
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright 2013 Sascha Hauer, Pengutronix
+ *
+ * Copyright 2013-2021 TQ-Systems GmbH
+ * Author: Markus Niebel <Markus.Niebel@tq-group.com>
+ */
+
+/dts-v1/;
+
+#include "imx6q-tqma6a.dtsi"
+#include "imx6qdl-mba6.dtsi"
+#include "imx6qdl-mba6a.dtsi"
+#include "imx6q-mba6.dtsi"
+
+/ {
+       model = "TQ TQMa6Q on MBa6x";
+       compatible = "tq,imx6q-mba6x-a", "tq,mba6a",
+                    "tq,imx6q-tqma6q-a", "fsl,imx6q";
+};
diff --git a/arch/arm/boot/dts/imx6q-mba6b.dts b/arch/arm/boot/dts/imx6q-mba6b.dts
new file mode 100644 (file)
index 0000000..02c9f3e
--- /dev/null
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright 2013 Sascha Hauer, Pengutronix
+ *
+ * Copyright 2013-2021 TQ-Systems GmbH
+ * Author: Markus Niebel <Markus.Niebel@tq-group.com>
+ */
+
+/dts-v1/;
+
+#include "imx6q-tqma6b.dtsi"
+#include "imx6qdl-mba6.dtsi"
+#include "imx6qdl-mba6b.dtsi"
+#include "imx6q-mba6.dtsi"
+
+/ {
+       model = "TQ TQMa6Q on MBa6x";
+       compatible = "tq,imx6q-mba6x-b", "tq,mba6b",
+                    "tq,imx6q-tqma6q-b", "fsl,imx6q";
+};
index 2e70ea5..322f071 100644 (file)
@@ -8,6 +8,9 @@
 #include "imx6q.dtsi"
 #include "imx6qdl-phytec-phycore-som.dtsi"
 #include "imx6qdl-phytec-mira.dtsi"
+#include "imx6qdl-phytec-mira-peb-eval-01.dtsi"
+#include "imx6qdl-phytec-mira-peb-av-02.dtsi"
+#include "imx6qdl-phytec-mira-peb-wlbt-05.dtsi"
 
 / {
        model = "PHYTEC phyBOARD-Mira Quad Carrier-Board with eMMC";
index 65d2e48..3f13726 100644 (file)
@@ -8,6 +8,9 @@
 #include "imx6q.dtsi"
 #include "imx6qdl-phytec-phycore-som.dtsi"
 #include "imx6qdl-phytec-mira.dtsi"
+#include "imx6qdl-phytec-mira-peb-eval-01.dtsi"
+#include "imx6qdl-phytec-mira-peb-av-02.dtsi"
+#include "imx6qdl-phytec-mira-peb-wlbt-05.dtsi"
 
 / {
        model = "PHYTEC phyBOARD-Mira Quad Carrier-Board with NAND";
diff --git a/arch/arm/boot/dts/imx6q-yapp4-crux.dts b/arch/arm/boot/dts/imx6q-yapp4-crux.dts
new file mode 100644 (file)
index 0000000..15f4824
--- /dev/null
@@ -0,0 +1,54 @@
+// SPDX-License-Identifier: GPL-2.0
+//
+// Copyright (C) 2021 Y Soft Corporation, a.s.
+
+/dts-v1/;
+
+#include "imx6q.dtsi"
+#include "imx6dl-yapp4-common.dtsi"
+
+/ {
+       model = "Y Soft IOTA Crux i.MX6Quad board";
+       compatible = "ysoft,imx6q-yapp4-crux", "fsl,imx6q";
+
+       memory@10000000 {
+               device_type = "memory";
+               reg = <0x10000000 0xf0000000>;
+       };
+};
+
+&gpio_oled {
+       status = "okay";
+};
+
+&leds {
+       status = "okay";
+};
+
+&oled_1305 {
+       status = "okay";
+};
+
+&oled_1309 {
+       status = "okay";
+};
+
+&reg_usb_h1_vbus {
+       status = "okay";
+};
+
+&touchkeys {
+       status = "okay";
+};
+
+&uart2 {
+       status = "disabled";
+};
+
+&usbh1 {
+       status = "okay";
+};
+
+&usbphy2 {
+       status = "okay";
+};
index 3d0a50a..702cd4a 100644 (file)
        rts-gpios = <&gpio7 13 GPIO_ACTIVE_HIGH>; /* GPIO P */
 };
 
+&usbh1 {
+       disable-over-current;
+};
+
 &usdhc2 { /* SD card */
        status = "okay";
 };
index dc21853..dc89b55 100644 (file)
        status = "okay";
 };
 
+&usbh1 {
+       disable-over-current;
+};
+
 &usdhc2 { /* SD card */
        status = "okay";
 };
index 5d10c40..5befbe1 100644 (file)
                #size-cells = <0>;
 
                ethphy0: ethernet-phy@0 { /* SMSC LAN8710Ai */
-                       compatible = "ethernet-phy-ieee802.3-c22";
+                       compatible = "ethernet-phy-id0007.c0f0",
+                                    "ethernet-phy-ieee802.3-c22";
                        interrupt-parent = <&gpio4>;
                        interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
                        pinctrl-0 = <&pinctrl_ethphy0>;
                        pinctrl-names = "default";
                        reg = <0>;
-                       reset-assert-us = <1000>;
-                       reset-deassert-us = <1000>;
+                       reset-assert-us = <500>;
+                       reset-deassert-us = <500>;
                        reset-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
                        smsc,disable-energy-detect; /* Make plugin detection reliable */
                };
        pinctrl_usbh1: usbh1-grp {
                fsl,pins = <
                        MX6QDL_PAD_EIM_D31__GPIO3_IO31          0x120b0
+                       MX6QDL_PAD_EIM_D30__USB_H1_OC           0x1b0b1
                >;
        };
 
diff --git a/arch/arm/boot/dts/imx6qdl-mba6.dtsi b/arch/arm/boot/dts/imx6qdl-mba6.dtsi
new file mode 100644 (file)
index 0000000..daf7634
--- /dev/null
@@ -0,0 +1,526 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright 2013 Sascha Hauer, Pengutronix
+ *
+ * Copyright 2013-2021 TQ-Systems GmbH
+ * Author: Markus Niebel <Markus.Niebel@tq-group.com>
+ */
+
+#include <dt-bindings/clock/imx6qdl-clock.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/sound/fsl-imx-audmux.h>
+
+/ {
+       aliases {
+               mmc0 = &usdhc3;
+               mmc1 = &usdhc2;
+               /delete-property/ mmc2;
+               /delete-property/ mmc3;
+       };
+
+       chosen {
+               stdout-path = &uart2;
+       };
+
+       beeper: gpio-beeper {
+               compatible = "gpio-beeper";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_gpiobeeper>;
+               gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
+       };
+
+       gpio_buttons: gpio-buttons {
+               compatible = "gpio-keys";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_gpiobuttons>;
+
+               button1 {
+                       label = "s6";
+                       linux,code = <KEY_F6>;
+                       gpios = <&gpio7 13 GPIO_ACTIVE_LOW>;
+               };
+
+               button2 {
+                       label = "s7";
+                       linux,code = <KEY_F7>;
+                       gpios = <&gpio7 12 GPIO_ACTIVE_LOW>;
+               };
+
+               button3 {
+                       label = "s8";
+                       linux,code = <KEY_F8>;
+                       gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_gpioled>;
+
+               led1 {
+                       label = "led1";
+                       gpios = <&gpio6 16 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "default-on";
+               };
+
+               led2 {
+                       label = "led2";
+                       gpios = <&gpio6 31 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+               };
+       };
+
+       reg_mba6_3p3v: regulator-mba6-3p3v {
+               compatible = "regulator-fixed";
+               regulator-name = "supply-mba6-3p3v";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+       };
+
+       reg_pcie: regulator-pcie {
+               compatible = "regulator-fixed";
+               regulator-name = "supply-pcie";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               /* PCIE.PWR_EN */
+               gpio = <&gpio2 0 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+               regulator-always-on;
+               vin-supply = <&reg_mba6_3p3v>;
+       };
+
+       reg_vcc3v3_audio: regulator-vcc3v3-audio {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc3v3-audio";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               vin-supply = <&reg_mba6_3p3v>;
+       };
+
+       sound {
+               compatible = "fsl,imx-audio-tlv320aic32x4";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_audmux>;
+               model = "imx-audio-tlv320aic32x4";
+               ssi-controller = <&ssi1>;
+               audio-codec = <&tlv320aic32x4>;
+               audio-asrc = <&asrc>;
+               audio-routing =
+                       "IN3_L", "Mic Jack",
+                       "Mic Jack", "Mic Bias",
+                       "IN1_L", "Line In Jack",
+                       "IN1_R", "Line In Jack",
+                       "Line Out Jack", "LOL",
+                       "Line Out Jack", "LOR";
+               mux-int-port = <1>;
+               mux-ext-port = <3>;
+       };
+};
+
+&audmux {
+       status = "okay";
+
+       ssi0 {
+               fsl,audmux-port = <MX31_AUDMUX_PORT1_SSI0>;
+               fsl,port-config = <
+                       (IMX_AUDMUX_V2_PTCR_SYN |
+                               IMX_AUDMUX_V2_PTCR_TFSDIR |
+                               IMX_AUDMUX_V2_PTCR_TFSEL(MX31_AUDMUX_PORT3_SSI_PINS_3) |
+                               IMX_AUDMUX_V2_PTCR_TCLKDIR |
+                               IMX_AUDMUX_V2_PTCR_TCSEL(MX31_AUDMUX_PORT3_SSI_PINS_3))
+                       IMX_AUDMUX_V2_PDCR_RXDSEL(MX31_AUDMUX_PORT3_SSI_PINS_3)
+               >;
+       };
+
+       aud3 {
+               fsl,audmux-port = <MX31_AUDMUX_PORT3_SSI_PINS_3>;
+               fsl,port-config = <
+                       IMX_AUDMUX_V2_PTCR_SYN
+                       IMX_AUDMUX_V2_PDCR_RXDSEL(MX31_AUDMUX_PORT1_SSI0)
+               >;
+       };
+};
+
+&can1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_can1>;
+       status = "okay";
+};
+
+&can2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_can2>;
+       status = "okay";
+};
+
+&ecspi1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_ecspi1>, <&pinctrl_ecspi1_mba6>;
+       cs-gpios = <&gpio3 19 0>, <&gpio3 24 0>;
+};
+
+&fec {
+       phy-mode = "rgmii-id";
+       phy-handle = <&ethphy>;
+       mac-address = [00 00 00 00 00 00];
+       status = "okay";
+
+       mdio {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               ethphy: ethernet-phy@3 {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <3>;
+                       interrupt-parent = <&gpio1>;
+                       interrupts = <28 IRQ_TYPE_LEVEL_LOW>;
+                       reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
+                       reset-assert-us = <1000>;
+                       reset-deassert-us = <100000>;
+                       micrel,force-master;
+                       max-speed = <1000>;
+               };
+       };
+};
+
+&i2c1 {
+       tlv320aic32x4: audio-codec@18 {
+               compatible = "ti,tlv320aic32x4";
+               reg = <0x18>;
+               clocks = <&clks IMX6QDL_CLK_CKO>;
+               clock-names = "mclk";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_codec>;
+               ldoin-supply = <&reg_vcc3v3_audio>;
+               iov-supply = <&reg_mba6_3p3v>;
+       };
+};
+
+&pcie {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pcie>;
+       reset-gpio = <&gpio6 7 GPIO_ACTIVE_LOW>;
+       status = "okay";
+};
+
+&pwm1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm1>;
+       status = "okay";
+};
+
+&pwm3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm3>;
+       status = "okay";
+};
+
+&pwm4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm4>;
+       status = "okay";
+};
+
+&snvs_poweroff {
+       status = "okay";
+};
+
+&ssi1 {
+       status = "okay";
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart2>;
+       status = "okay";
+};
+
+
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart3>;
+       uart-has-rtscts;
+       status = "okay";
+};
+
+&uart4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart4>;
+       uart-has-rtscts;
+       linux,rs485-enabled-at-boot-time;
+       rs485-rts-active-low;
+       rs485-rx-during-tx;
+       status = "okay";
+};
+
+&uart5 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart5>;
+       uart-has-rtscts;
+       status = "okay";
+};
+
+&usbh1 {
+       disable-over-current;
+       status = "okay";
+};
+
+&usbotg {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usbotg>;
+       power-active-high;
+       over-current-active-low;
+       srp-disable;
+       hnp-disable;
+       adp-disable;
+       dr_mode = "otg";
+       status = "okay";
+};
+
+/* SD card slot */
+&usdhc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc2>;
+       vmmc-supply = <&reg_mba6_3p3v>;
+       bus-width = <4>;
+       no-1-8-v;
+       no-mmc;
+       no-sdio;
+       cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
+       wp-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+};
+
+&wdog1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_wdog1>;
+       /* does not work on unmodified starter kit */
+       /* fsl,ext-reset-output; */
+       status = "okay";
+};
+
+&iomuxc {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_hog>;
+
+       pinctrl_audmux: audmuxgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_CSI0_DAT7__AUD3_RXD  0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT4__AUD3_TXC  0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT5__AUD3_TXD  0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT6__AUD3_TXFS 0x1b0b0
+               >;
+       };
+
+       pinctrl_can1: can1grp {
+               fsl,pins = <
+                       MX6QDL_PAD_KEY_COL2__FLEXCAN1_TX 0xb099
+                       MX6QDL_PAD_KEY_ROW2__FLEXCAN1_RX 0xb099
+               >;
+       };
+
+       pinctrl_can2: can2grp {
+               fsl,pins = <
+                       MX6QDL_PAD_KEY_COL4__FLEXCAN2_TX 0xb099
+                       MX6QDL_PAD_KEY_ROW4__FLEXCAN2_RX 0xb099
+               >;
+       };
+
+       pinctrl_codec: codecgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_CSI0_MCLK__CCM_CLKO1 0xb0 /* CLK */
+               >;
+       };
+
+       pinctrl_ecspi1_mba6: ecspimba6grp {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_D24__GPIO3_IO24 0xb099 /* eCSPI1 SS2 */
+               >;
+       };
+
+       pinctrl_enet: enetgrp {
+               fsl,pins = <
+                       /* FEC phy IRQ */
+                       MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28     0x00011008
+                       /* FEC phy reset */
+                       MX6QDL_PAD_ENET_CRS_DV__GPIO1_IO25   0x1b099
+                       /* DSE = 100, 100k up, SPEED = MED */
+                       MX6QDL_PAD_ENET_MDIO__ENET_MDIO       0xb0a0
+                       MX6QDL_PAD_ENET_MDC__ENET_MDC         0xb0a0
+                       /* DSE = 111, pull 100k up */
+                       MX6QDL_PAD_RGMII_TXC__RGMII_TXC       0xb038
+                       MX6QDL_PAD_RGMII_TD0__RGMII_TD0       0xb038
+                       MX6QDL_PAD_RGMII_TD1__RGMII_TD1       0xb038
+                       MX6QDL_PAD_RGMII_TD2__RGMII_TD2       0xb038
+                       MX6QDL_PAD_RGMII_TD3__RGMII_TD3       0xb038
+                       MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0xb038
+                       /* DSE = 111, pull external */
+                       MX6QDL_PAD_RGMII_RXC__RGMII_RXC       0x0038
+                       MX6QDL_PAD_RGMII_RD0__RGMII_RD0       0x0038
+                       MX6QDL_PAD_RGMII_RD1__RGMII_RD1       0x0038
+                       MX6QDL_PAD_RGMII_RD2__RGMII_RD2       0x0038
+                       MX6QDL_PAD_RGMII_RD3__RGMII_RD3       0x0038
+                       MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x0038
+                       /* HYS = 1, DSE = 111, 100k up, SPEED = HIGH */
+                       MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK  0x1b0f0
+               >;
+       };
+
+       pinctrl_gpiobeeper: gpiobeepergrp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD1_DAT3__GPIO1_IO21 0xb099
+               >;
+       };
+
+       pinctrl_gpiobuttons: gpiobuttongrp {
+               fsl,pins = <
+                       MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x0001b099
+                       MX6QDL_PAD_GPIO_18__GPIO7_IO13 0x0001b099
+                       MX6QDL_PAD_GPIO_8__GPIO1_IO08 0x0001b099
+               >;
+       };
+
+       pinctrl_gpioled: gpioledgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_NANDF_CS3__GPIO6_IO16 0xb099 /* LED V15 */
+                       MX6QDL_PAD_EIM_BCLK__GPIO6_IO31 0xb099 /* LED V16 */
+               >;
+       };
+
+       pinctrl_hog: hoggrp {
+               fsl,pins = <
+                       /* LCD.CONTRAST -> Rev 0100 only, not used on Rev.0200*/
+                       MX6QDL_PAD_DI0_PIN4__GPIO4_IO20 0x0001b099
+
+                       MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x0001b099
+                       MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 0x0001b099
+                       MX6QDL_PAD_ENET_TXD0__GPIO1_IO30 0x0001b099
+
+                       MX6QDL_PAD_NANDF_D1__GPIO2_IO01 0x0001b099
+                       MX6QDL_PAD_NANDF_D2__GPIO2_IO02 0x0001b099
+                       MX6QDL_PAD_NANDF_D3__GPIO2_IO03 0x0001b099
+                       MX6QDL_PAD_SD4_DAT0__GPIO2_IO08 0x0001b099
+                       MX6QDL_PAD_EIM_CS0__GPIO2_IO23 0x0001b099
+                       MX6QDL_PAD_EIM_CS1__GPIO2_IO24 0x0001b099
+                       MX6QDL_PAD_EIM_OE__GPIO2_IO25 0x0001b099
+
+                       MX6QDL_PAD_EIM_D20__GPIO3_IO20 0x0001b099
+                       MX6QDL_PAD_EIM_D26__GPIO3_IO26 0x0001b099
+                       MX6QDL_PAD_EIM_D27__GPIO3_IO27 0x0001b099
+                       MX6QDL_PAD_EIM_D28__GPIO3_IO28 0x0001b099
+                       MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x0001b099
+
+                       MX6QDL_PAD_KEY_COL0__GPIO4_IO06 0x0001b099
+                       MX6QDL_PAD_KEY_ROW0__GPIO4_IO07 0x0001b099
+                       MX6QDL_PAD_KEY_COL1__GPIO4_IO08 0x0001b099
+                       MX6QDL_PAD_KEY_ROW1__GPIO4_IO09 0x0001b099
+
+                       MX6QDL_PAD_CSI0_PIXCLK__GPIO5_IO18 0x0001b099
+                       MX6QDL_PAD_CSI0_DATA_EN__GPIO5_IO20 0x0001b099
+                       MX6QDL_PAD_CSI0_VSYNC__GPIO5_IO21 0x0001b099
+
+                       MX6QDL_PAD_NANDF_ALE__GPIO6_IO08 0x0001b099
+                       MX6QDL_PAD_NANDF_CS1__GPIO6_IO14 0x0001b099
+               >;
+       };
+
+       pinctrl_pcie: pciegrp {
+               fsl,pins = <
+                       /* HYS = 1, DSE = 110, 100k up, SPEED = HIGH (11)*/
+                       MX6QDL_PAD_SD4_DAT3__GPIO2_IO11 0x001b0f0 /* #PCIE.WAKE */
+                       MX6QDL_PAD_NANDF_CLE__GPIO6_IO07 0x001b0f0 /* #PCIE.RST */
+                       MX6QDL_PAD_NANDF_CS0__GPIO6_IO11 0x001b0f0 /* #PCIE.DIS */
+                       /* HYS = 1, DSE = 110, PUE+PKE, SPEED = HIGH (11)*/
+                       MX6QDL_PAD_NANDF_D0__GPIO2_IO00 0x00130f0 /* PCIE.PWR_EN */
+               >;
+       };
+
+       pinctrl_pwm1: pwm1grp {
+               fsl,pins = <
+                       /* 100 k PD, DSE 120 OHM, SPPEED LO */
+                       MX6QDL_PAD_GPIO_9__PWM1_OUT 0x00003050
+               >;
+       };
+
+       pinctrl_pwm3: pwm3grp {
+               fsl,pins = <
+                       /* 100 k PD, DSE 120 OHM, SPPEED LO */
+                       MX6QDL_PAD_SD4_DAT1__PWM3_OUT 0x00003050
+               >;
+       };
+
+       pinctrl_pwm4: pwm4grp {
+               fsl,pins = <
+                       /* 100 k PD, DSE 120 OHM, SPPEED LO */
+                       MX6QDL_PAD_SD4_DAT2__PWM4_OUT 0x00003050
+               >;
+       };
+
+       pinctrl_uart2: uart2grp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD4_DAT4__UART2_RX_DATA 0x1b099
+                       MX6QDL_PAD_SD4_DAT7__UART2_TX_DATA 0x1b099
+               >;
+       };
+
+       pinctrl_uart3: uart3grp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD4_CLK__UART3_RX_DATA 0x1b0b1
+                       MX6QDL_PAD_SD4_CMD__UART3_TX_DATA 0x1b0b1
+                       MX6QDL_PAD_EIM_D30__UART3_CTS_B   0x1b0b1
+                       MX6QDL_PAD_EIM_D31__UART3_RTS_B   0x1b0b1
+               >;
+       };
+
+       pinctrl_uart4: uart4grp {
+               fsl,pins = <
+                       MX6QDL_PAD_CSI0_DAT12__UART4_TX_DATA 0x1b0b1
+                       MX6QDL_PAD_CSI0_DAT13__UART4_RX_DATA 0x1b0b1
+                       MX6QDL_PAD_CSI0_DAT16__UART4_RTS_B 0x1b0b1
+                       MX6QDL_PAD_CSI0_DAT17__UART4_CTS_B 0x1b0b1
+               >;
+       };
+
+       pinctrl_uart5: uart5grp {
+               fsl,pins = <
+                       MX6QDL_PAD_CSI0_DAT14__UART5_TX_DATA 0x1b0b1
+                       MX6QDL_PAD_CSI0_DAT15__UART5_RX_DATA 0x1b0b1
+                       MX6QDL_PAD_CSI0_DAT18__UART5_RTS_B 0x1b0b1
+                       MX6QDL_PAD_CSI0_DAT19__UART5_CTS_B 0x1b0b1
+               >;
+       };
+
+       pinctrl_usdhc2: usdhc2grp {
+               fsl,pins = <
+                       /* CLK: 47k Pup SPD_LOW DSE 40Ohm SRE_FAST HYS */
+                       MX6QDL_PAD_SD2_CLK__SD2_CLK    0x00017071
+                       /* SD2: 47k Pup SPD_LOW DSE 80Ohm SRE_FAST HYS */
+                       MX6QDL_PAD_SD2_CMD__SD2_CMD    0x00017059
+                       MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x00017059
+                       MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x00017059
+                       MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x00017059
+                       MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x00017059
+
+                       MX6QDL_PAD_GPIO_4__GPIO1_IO04  0x0001b099 /* usdhc2 CD */
+                       MX6QDL_PAD_GPIO_2__GPIO1_IO02  0x0001b099 /* usdhc2 WP */
+               >;
+       };
+
+       pinctrl_usbotg: usbotggrp {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_D21__USB_OTG_OC  0x0001b0b0
+                       MX6QDL_PAD_GPIO_1__USB_OTG_ID   0x00017059
+                       MX6QDL_PAD_EIM_D22__USB_OTG_PWR 0x0001b099
+               >;
+       };
+
+       pinctrl_wdog1: wdog1grp {
+               fsl,pins = <
+                        /* Watchdog out */
+                       MX6QDL_PAD_SD1_DAT2__WDOG1_B 0x0000b099
+               >;
+       };
+};
diff --git a/arch/arm/boot/dts/imx6qdl-mba6a.dtsi b/arch/arm/boot/dts/imx6qdl-mba6a.dtsi
new file mode 100644 (file)
index 0000000..a61f270
--- /dev/null
@@ -0,0 +1,36 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright 2013 Sascha Hauer, Pengutronix
+ *
+ * Copyright 2013-2021 TQ-Systems GmbH
+ * Author: Markus Niebel <Markus.Niebel@tq-group.com>
+ */
+
+/ {
+       aliases {
+               rtc0 = &rtc0;
+       };
+};
+
+&fec {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_enet>, <&pinctrl_enet_fix>;
+};
+
+&i2c1 {
+       lm75: temperature-sensor@49 {
+               compatible = "national,lm75";
+               reg = <0x49>;
+       };
+
+       m24c64_57: eeprom@57 {
+               compatible = "atmel,24c64";
+               reg = <0x57>;
+               pagesize = <32>;
+       };
+
+       rtc0: rtc@68 {
+               compatible = "dallas,ds1339";
+               reg = <0x68>;
+       };
+};
diff --git a/arch/arm/boot/dts/imx6qdl-mba6b.dtsi b/arch/arm/boot/dts/imx6qdl-mba6b.dtsi
new file mode 100644 (file)
index 0000000..9f9f703
--- /dev/null
@@ -0,0 +1,52 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright 2013 Sascha Hauer, Pengutronix
+ *
+ * Copyright 2013-2021 TQ-Systems GmbH
+ * Author: Markus Niebel <Markus.Niebel@tq-group.com>
+ */
+
+/ {
+       aliases {
+               rtc0 = &rtc0;
+       };
+};
+
+&fec {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_enet>;
+};
+
+&i2c1 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c1>;
+       status = "okay";
+};
+
+&i2c3 {
+       lm75: temperature-sensor@49 {
+               compatible = "national,lm75";
+               reg = <0x49>;
+       };
+
+       m24c64_57: eeprom@57 {
+               compatible = "atmel,24c64";
+               reg = <0x57>;
+               pagesize = <32>;
+       };
+
+       rtc0: rtc@68 {
+               compatible = "dallas,ds1339";
+               reg = <0x68>;
+       };
+};
+
+&iomuxc {
+       pinctrl_i2c1: i2c1grp {
+               fsl,pins = <
+                       MX6QDL_PAD_CSI0_DAT8__I2C1_SDA 0x4001b899
+                       MX6QDL_PAD_CSI0_DAT9__I2C1_SCL 0x4001b899
+               >;
+       };
+};
diff --git a/arch/arm/boot/dts/imx6qdl-phytec-mira-peb-av-02.dtsi b/arch/arm/boot/dts/imx6qdl-phytec-mira-peb-av-02.dtsi
new file mode 100644 (file)
index 0000000..393475c
--- /dev/null
@@ -0,0 +1,119 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2018 PHYTEC Messtechnik
+ * Author: Christian Hemp <c.hemp@phytec.de>
+ */
+
+/ {
+       display: display0 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "fsl,imx-parallel-display";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_disp0>;
+               interface-pix-fmt = "rgb24";
+               status = "disabled";
+
+               port@0 {
+                       reg = <0>;
+
+                       display0_in: endpoint {
+                               remote-endpoint = <&ipu1_di0_disp0>;
+                       };
+               };
+
+               port@1 {
+                       reg = <1>;
+
+                       display0_out: endpoint {
+                               remote-endpoint = <&peb_panel_lcd_in>;
+                       };
+               };
+       };
+
+       panel-lcd {
+               compatible = "edt,etm0700g0edh6";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_disp0_pwr>;
+               power-supply = <&reg_display>;
+               enable-gpios = <&gpio3 22 GPIO_ACTIVE_HIGH>;
+               backlight = <&backlight>;
+               status = "disabled";
+
+               port {
+                       peb_panel_lcd_in: endpoint {
+                               remote-endpoint = <&display0_out>;
+                       };
+               };
+       };
+
+       reg_display: regulator-peb-display {
+               compatible = "regulator-fixed";
+               regulator-name = "peb-display";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+};
+
+&i2c1 {
+       edt_ft5x06: touchscreen@38 {
+               compatible = "edt,edt-ft5406";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_edt_ft5x06>;
+               reg = <0x38>;
+               interrupt-parent = <&gpio3>;
+               interrupts = <2 IRQ_TYPE_NONE>;
+               status = "disabled";
+        };
+};
+
+&ipu1_di0_disp0 {
+       remote-endpoint = <&display0_in>;
+};
+
+&iomuxc {
+       pinctrl_disp0: disp0grp {
+               fsl,pins = <
+                       MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK      0x10
+                       MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02             0x10
+                       MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03             0x10
+                       MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15            0x1b080
+                       MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00        0x10
+                       MX6QDL_PAD_DISP0_DAT1__IPU1_DISP0_DATA01        0x10
+                       MX6QDL_PAD_DISP0_DAT2__IPU1_DISP0_DATA02        0x10
+                       MX6QDL_PAD_DISP0_DAT3__IPU1_DISP0_DATA03        0x10
+                       MX6QDL_PAD_DISP0_DAT4__IPU1_DISP0_DATA04        0x10
+                       MX6QDL_PAD_DISP0_DAT5__IPU1_DISP0_DATA05        0x10
+                       MX6QDL_PAD_DISP0_DAT6__IPU1_DISP0_DATA06        0x10
+                       MX6QDL_PAD_DISP0_DAT7__IPU1_DISP0_DATA07        0x10
+                       MX6QDL_PAD_DISP0_DAT8__IPU1_DISP0_DATA08        0x10
+                       MX6QDL_PAD_DISP0_DAT9__IPU1_DISP0_DATA09        0x10
+                       MX6QDL_PAD_DISP0_DAT10__IPU1_DISP0_DATA10       0x10
+                       MX6QDL_PAD_DISP0_DAT11__IPU1_DISP0_DATA11       0x10
+                       MX6QDL_PAD_DISP0_DAT12__IPU1_DISP0_DATA12       0x10
+                       MX6QDL_PAD_DISP0_DAT13__IPU1_DISP0_DATA13       0x10
+                       MX6QDL_PAD_DISP0_DAT14__IPU1_DISP0_DATA14       0x10
+                       MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15       0x10
+                       MX6QDL_PAD_DISP0_DAT16__IPU1_DISP0_DATA16       0x10
+                       MX6QDL_PAD_DISP0_DAT17__IPU1_DISP0_DATA17       0x10
+                       MX6QDL_PAD_DISP0_DAT18__IPU1_DISP0_DATA18       0x10
+                       MX6QDL_PAD_DISP0_DAT19__IPU1_DISP0_DATA19       0x10
+                       MX6QDL_PAD_DISP0_DAT20__IPU1_DISP0_DATA20       0x10
+                       MX6QDL_PAD_DISP0_DAT21__IPU1_DISP0_DATA21       0x10
+                       MX6QDL_PAD_DISP0_DAT22__IPU1_DISP0_DATA22       0x10
+                       MX6QDL_PAD_DISP0_DAT23__IPU1_DISP0_DATA23       0x10
+               >;
+       };
+
+       pinctrl_disp0_pwr: disp0pwrgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_D22__GPIO3_IO22                  0x1b0b0
+               >;
+       };
+
+       pinctrl_edt_ft5x06: edtft5x06grp {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_DA2__GPIO3_IO02                  0xb0b1
+               >;
+       };
+};
diff --git a/arch/arm/boot/dts/imx6qdl-phytec-mira-peb-eval-01.dtsi b/arch/arm/boot/dts/imx6qdl-phytec-mira-peb-eval-01.dtsi
new file mode 100644 (file)
index 0000000..037b601
--- /dev/null
@@ -0,0 +1,71 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2018 PHYTEC Messtechnik
+ * Author: Christian Hemp <c.hemp@phytec.de>
+ */
+
+#include <dt-bindings/input/input.h>
+
+/ {
+       gpio-keys {
+               compatible = "gpio-keys";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_gpio_keys>;
+               status = "disabled";
+
+               power {
+                       label = "Power Button";
+                       gpios = <&gpio5 28 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_WAKEUP>;
+                       wakeup-source;
+               };
+
+               sleep {
+                       label = "Sleep Button";
+                       gpios = <&gpio6 18 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_SLEEP>;
+               };
+       };
+
+       user_leds: user-leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_user_leds>;
+               status = "disabled";
+
+               user-led1 {
+                       gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "gpio";
+                       default-state = "on";
+               };
+
+               user-led2 {
+                       gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "gpio";
+                       default-state = "on";
+               };
+
+               user-led3 {
+                       gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "gpio";
+                       default-state = "on";
+               };
+       };
+};
+
+&iomuxc {
+       pinctrl_gpio_keys: gpiokeysgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD3_DAT6__GPIO6_IO18         0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT10__GPIO5_IO28       0x1b0b0
+               >;
+       };
+
+       pinctrl_user_leds: userledsgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD3_DAT4__GPIO7_IO01         0x1b0b0
+                       MX6QDL_PAD_SD3_DAT5__GPIO7_IO00         0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT11__GPIO5_IO29       0x1b0b0
+               >;
+       };
+};
diff --git a/arch/arm/boot/dts/imx6qdl-phytec-mira-peb-wlbt-05.dtsi b/arch/arm/boot/dts/imx6qdl-phytec-mira-peb-wlbt-05.dtsi
new file mode 100644 (file)
index 0000000..84f884d
--- /dev/null
@@ -0,0 +1,85 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2021 PHYTEC Messtechnik GmbH
+ * Author: Yunus Bas <y.bas@phytec.de>
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       reg_wl_en: regulator-wl-en {
+               compatible = "regulator-fixed";
+               regulator-name = "wlan_en";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_wl>;
+               gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+               startup-delay-us = <100>;
+               status = "disabled";
+       };
+};
+
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart3_bt>;
+       uart-has-rtscts;
+
+       bluetooth {
+               compatible = "brcm,bcm43438-bt";
+               shutdown-gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>;
+               device-wakeup-gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>;
+               host-wakeup-gpios = <&gpio5 26 GPIO_ACTIVE_HIGH>;
+               status = "disabled";
+       };
+};
+
+&usdhc3 {
+       #address-cells = <1>;
+       #size-cells = <0>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc3_wl>;
+       vmmc-supply = <&reg_wl_en>;
+       bus-width = <4>;
+       non-removable;
+       no-1-8-v;
+       status = "disabled";
+
+       brmcf: wifi@1 {
+               compatible = "brcm,bcm4329-fmac";
+               reg = <1>;
+       };
+};
+
+&iomuxc {
+       pinctrl_uart3_bt: uart3grp-bt {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_D25__UART3_RX_DATA       0x1b0b1
+                       MX6QDL_PAD_EIM_D24__UART3_TX_DATA       0x1b0b1
+                       MX6QDL_PAD_EIM_EB3__UART3_RTS_B         0x1b0b1
+                       MX6QDL_PAD_EIM_D23__UART3_CTS_B         0x1b0b1
+                       MX6QDL_PAD_SD3_DAT5__GPIO7_IO00         0xb0b1  /* BT ENABLE */
+                       MX6QDL_PAD_SD3_DAT4__GPIO7_IO01         0xb0b1  /* DEV WAKEUP */
+                       MX6QDL_PAD_CSI0_DAT8__GPIO5_IO26        0xb0b1  /* HOST WAKEUP */
+               >;
+       };
+
+       pinctrl_usdhc3_wl: usdhc3grp-wl {
+               fsl,pins = <
+                       MX6QDL_PAD_SD3_CMD__SD3_CMD             0x17059
+                       MX6QDL_PAD_SD3_CLK__SD3_CLK             0x10059
+                       MX6QDL_PAD_SD3_DAT0__SD3_DATA0          0x17059
+                       MX6QDL_PAD_SD3_DAT1__SD3_DATA1          0x17059
+                       MX6QDL_PAD_SD3_DAT2__SD3_DATA2          0x17059
+                       MX6QDL_PAD_SD3_DAT3__SD3_DATA3          0x17059
+               >;
+       };
+
+       pinctrl_wl: wlgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_A25__GPIO5_IO02      0xb0b1      /* WLAN ENABLE */
+               >;
+       };
+};
index b679bec..bfb67da 100644 (file)
@@ -4,6 +4,12 @@
  * Copyright 2013-2017 Markus Niebel <Markus.Niebel@tq-group.com>
  */
 
+&fec {
+       interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>,
+                             <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;
+       fsl,err006687-workaround-present;
+};
+
 &i2c1 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_i2c1>;
                pagesize = <32>;
        };
 };
+
+&iomuxc {
+       /*
+        * This pinmuxing is required for the ERR006687 workaround. Board
+        * DTS files that enable the FEC controller with
+        * fsl,err006687-workaround-present must include this group.
+        */
+       pinctrl_enet_fix: enetfixgrp {
+               fsl,pins = <
+                       /* ENET ping patch */
+                       MX6QDL_PAD_GPIO_6__ENET_IRQ 0x000b1
+               >;
+       };
+};
index 362e65c..bcc5bbc 100644 (file)
                &gpio3 19 GPIO_ACTIVE_HIGH
        >;
        status = "disabled";
-
-       spidev0: spi@0 {
-               compatible = "spidev";
-               reg = <0>;
-               spi-max-frequency = <54000000>;
-       };
-
-       spidev1: spi@1 {
-               compatible = "spidev";
-               reg = <1>;
-               spi-max-frequency = <54000000>;
-       };
 };
 
 &fec {
index f5de5de..d27beb4 100644 (file)
 
        clocks {
                ckil {
-                       compatible = "fsl,imx-ckil", "fixed-clock";
+                       compatible = "fixed-clock";
                        #clock-cells = <0>;
                        clock-frequency = <32768>;
                };
 
                ckih1 {
-                       compatible = "fsl,imx-ckih1", "fixed-clock";
+                       compatible = "fixed-clock";
                        #clock-cells = <0>;
                        clock-frequency = <0>;
                };
 
                osc {
-                       compatible = "fsl,imx-osc", "fixed-clock";
+                       compatible = "fixed-clock";
                        #clock-cells = <0>;
                        clock-frequency = <24000000>;
                };
                                        status = "okay";
                                };
 
-                               spba@203c000 {
+                               spba-bus@203c000 {
                                        reg = <0x0203c000 0x4000>;
                                };
                        };
diff --git a/arch/arm/boot/dts/imx6qp-mba6b.dts b/arch/arm/boot/dts/imx6qp-mba6b.dts
new file mode 100644 (file)
index 0000000..eee2e09
--- /dev/null
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright 2015-2021 TQ-Systems GmbH
+ * Author: Markus Niebel <Markus.Niebel@tq-group.com>
+ */
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include "imx6qp-tqma6b.dtsi"
+#include "imx6qdl-mba6.dtsi"
+#include "imx6qdl-mba6b.dtsi"
+#include "imx6q-mba6.dtsi"
+
+/ {
+       model = "TQ TQMa6QP on MBa6x";
+       compatible = "tq,imx6qp-mba6x-b", "tq,mba6b",
+                    "tq,imx6qp-tqma6qp-b", "fsl,imx6qp";
+};
index f27d7ab..a182665 100644 (file)
@@ -8,6 +8,9 @@
 #include "imx6qp.dtsi"
 #include "imx6qdl-phytec-phycore-som.dtsi"
 #include "imx6qdl-phytec-mira.dtsi"
+#include "imx6qdl-phytec-mira-peb-eval-01.dtsi"
+#include "imx6qdl-phytec-mira-peb-av-02.dtsi"
+#include "imx6qdl-phytec-mira-peb-wlbt-05.dtsi"
 
 / {
        model = "PHYTEC phyBOARD-Mira QuadPlus Carrier-Board with NAND";
diff --git a/arch/arm/boot/dts/imx6qp-yapp4-crux-plus.dts b/arch/arm/boot/dts/imx6qp-yapp4-crux-plus.dts
new file mode 100644 (file)
index 0000000..cea165f
--- /dev/null
@@ -0,0 +1,54 @@
+// SPDX-License-Identifier: GPL-2.0
+//
+// Copyright (C) 2021 Y Soft Corporation, a.s.
+
+/dts-v1/;
+
+#include "imx6qp.dtsi"
+#include "imx6dl-yapp4-common.dtsi"
+
+/ {
+       model = "Y Soft IOTA Crux+ i.MX6QuadPlus board";
+       compatible = "ysoft,imx6qp-yapp4-crux-plus", "fsl,imx6qp";
+
+       memory@10000000 {
+               device_type = "memory";
+               reg = <0x10000000 0xf0000000>;
+       };
+};
+
+&gpio_oled {
+       status = "okay";
+};
+
+&leds {
+       status = "okay";
+};
+
+&oled_1305 {
+       status = "okay";
+};
+
+&oled_1309 {
+       status = "okay";
+};
+
+&reg_usb_h1_vbus {
+       status = "okay";
+};
+
+&touchkeys {
+       status = "okay";
+};
+
+&uart2 {
+       status = "disabled";
+};
+
+&usbh1 {
+       status = "okay";
+};
+
+&usbphy2 {
+       status = "okay";
+};
index 935a77d..18cac19 100644 (file)
        pinctrl-0 = <&pinctrl_ecspi4>;
        cs-gpios = <&gpio4 9 GPIO_ACTIVE_LOW>, <&gpio4 3 GPIO_ACTIVE_LOW>;
        status = "okay";
-
-       spidev0: spi@0 {
-               compatible = "spidev";
-               reg = <0>;
-               spi-max-frequency = <5000000>;
-       };
-
-       spidev1: spi@1 {
-               compatible = "spidev";
-               reg = <1>;
-               spi-max-frequency = <5000000>;
-       };
 };
 
 &i2c1 {
index bff98e6..607eddc 100644 (file)
@@ -10,6 +10,7 @@
 #include "imx6ul-phytec-segin.dtsi"
 #include "imx6ul-phytec-segin-peb-eval-01.dtsi"
 #include "imx6ul-phytec-segin-peb-av-02.dtsi"
+#include "imx6ul-phytec-segin-peb-wlbt-05.dtsi"
 
 / {
        model = "PHYTEC phyBOARD-Segin i.MX6 UltraLite Full Featured with NAND";
diff --git a/arch/arm/boot/dts/imx6ul-phytec-segin-peb-wlbt-05.dtsi b/arch/arm/boot/dts/imx6ul-phytec-segin-peb-wlbt-05.dtsi
new file mode 100644 (file)
index 0000000..04477fd
--- /dev/null
@@ -0,0 +1,90 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2021 PHYTEC Messtechnik GmbH
+ * Author: Yunus Bas <y.bas@phytec.de>
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       reg_wl_en: regulator-wl-en {
+               compatible = "regulator-fixed";
+               regulator-name = "wlan_en";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_wl>;
+               gpio = <&gpio5 9 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+               startup-delay-us = <100>;
+               status = "disabled";
+       };
+};
+
+&iomuxc {
+       pinctrl_bt: btgrp {
+               fsl,pins = <
+                       MX6UL_PAD_GPIO1_IO01__GPIO1_IO01        0x3031  /* BT ENABLE */
+                       MX6UL_PAD_GPIO1_IO03__GPIO1_IO03        0x3031  /* HOST WAKEUP */
+                       MX6UL_PAD_JTAG_MOD__GPIO1_IO10          0x3031  /* DEV WAKEUP */
+               >;
+       };
+
+       pinctrl_uart2_bt: uart2grp-bt {
+               fsl,pins = <
+                       MX6UL_PAD_UART2_TX_DATA__UART2_DCE_TX   0x17059
+                       MX6UL_PAD_UART2_RX_DATA__UART2_DCE_RX   0x17059
+                       MX6UL_PAD_UART2_CTS_B__UART2_DCE_CTS    0x17059
+                       MX6UL_PAD_UART2_RTS_B__UART2_DCE_RTS    0x17059
+               >;
+       };
+
+       pinctrl_usdhc2_wl: usdhc2grp-wl {
+               fsl,pins = <
+                       MX6UL_PAD_LCD_DATA18__USDHC2_CMD    0x10051
+                       MX6UL_PAD_LCD_DATA19__USDHC2_CLK    0x10061
+                       MX6UL_PAD_LCD_DATA20__USDHC2_DATA0  0x10051
+                       MX6UL_PAD_LCD_DATA21__USDHC2_DATA1  0x10051
+                       MX6UL_PAD_LCD_DATA22__USDHC2_DATA2  0x10051
+                       MX6UL_PAD_LCD_DATA23__USDHC2_DATA3  0x10051
+               >;
+       };
+
+       pinctrl_wl: wlgrp {
+               fsl,pins = <
+                       MX6UL_PAD_SNVS_TAMPER9__GPIO5_IO09  0x3031      /* WLAN ENABLE */
+               >;
+       };
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart2_bt &pinctrl_bt>;
+       uart-has-rtscts;
+       status = "disabled";
+
+       bluetooth {
+               compatible = "brcm,bcm43438-bt";
+               shutdown-gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
+               device-wakeup-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
+               host-wakeup-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
+       };
+};
+
+&usdhc2 {
+       #address-cells = <1>;
+       #size-cells = <0>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc2_wl>;
+       vmmc-supply = <&reg_wl_en>;
+       bus-width = <4>;
+       non-removable;
+       no-1-8-v;
+       status = "disabled";
+
+       brmcf: wifi@1 {
+               compatible = "brcm,bcm4329-fmac";
+               reg = <1>;
+       };
+};
index d620157..c18390f 100644 (file)
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_ecspi2>;
        status = "okay";
-
-       spi@0 {
-               compatible = "spidev";
-               reg = <0>;
-               spi-max-frequency = <1000000>;
-       };
 };
 
 &fec1 {
index 938a32c..c485d05 100644 (file)
                        &gpio1 10 GPIO_ACTIVE_HIGH
                >;
                status = "disabled";
-
-               spi@0 {
-                       compatible = "spidev";
-                       reg = <0>;
-                       spi-max-frequency = <660000>;
-               };
-
-               spi@1 {
-                       compatible = "spidev";
-                       reg = <1>;
-                       spi-max-frequency = <660000>;
-               };
        };
 
        sound {
                &gpio1 10 GPIO_ACTIVE_HIGH
        >;
        status = "disabled";
-
-       spidev0: spi@0 {
-               compatible = "spidev";
-               reg = <0>;
-               spi-max-frequency = <60000000>;
-       };
-
-       spidev1: spi@1 {
-               compatible = "spidev";
-               reg = <1>;
-               spi-max-frequency = <60000000>;
-       };
 };
 
 &fec1 {
diff --git a/arch/arm/boot/dts/imx6ull-jozacp.dts b/arch/arm/boot/dts/imx6ull-jozacp.dts
new file mode 100644 (file)
index 0000000..a152eeb
--- /dev/null
@@ -0,0 +1,456 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright (c) 2020 Protonic Holland
+ * Copyright (c) 2020 Oleksij Rempel <kernel@pengutronix.de>, Pengutronix
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+#include "imx6ull.dtsi"
+
+/ {
+       model = "JOZ Access Point";
+       compatible = "joz,jozacp", "fsl,imx6ull";
+
+       chosen {
+               stdout-path = &uart1;
+       };
+
+       /* On board name LED_RGB1 */
+       led-controller-1 {
+               compatible = "pwm-leds";
+
+               led-0 {
+                       color = <LED_COLOR_ID_RED>;
+                       function = LED_FUNCTION_INDICATOR;
+                       function-enumerator = <0>;
+                       pwms = <&pwm1 0 10000000 0>;
+                       max-brightness = <255>;
+               };
+
+               led-1 {
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_INDICATOR;
+                       function-enumerator = <1>;
+                       pwms = <&pwm3 0 10000000 0>;
+                       max-brightness = <255>;
+               };
+
+               led-2 {
+                       color = <LED_COLOR_ID_BLUE>;
+                       function = LED_FUNCTION_INDICATOR;
+                       function-enumerator = <2>;
+                       pwms = <&pwm5 0 10000000 0>;
+                       max-brightness = <255>;
+                       linux,default-trigger = "heartbeat";
+               };
+       };
+
+       /* On board name LED_RGB2 */
+       led-controller-2 {
+               compatible = "pwm-leds";
+
+               led-3 {
+                       color = <LED_COLOR_ID_RED>;
+                       function = LED_FUNCTION_INDICATOR;
+                       function-enumerator = <3>;
+                       pwms = <&pwm2 0 10000000 0>;
+                       max-brightness = <255>;
+               };
+
+               led-4 {
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_INDICATOR;
+                       function-enumerator = <4>;
+                       pwms = <&pwm4 0 10000000 0>;
+                       max-brightness = <255>;
+               };
+
+               led-5 {
+                       color = <LED_COLOR_ID_BLUE>;
+                       function = LED_FUNCTION_INDICATOR;
+                       function-enumerator = <5>;
+                       pwms = <&pwm6 0 10000000 0>;
+                       max-brightness = <255>;
+               };
+       };
+
+       reg_3v3: regulator-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               vin-supply = <&reg_5v0>;
+       };
+
+       reg_5v0: regulator-5v0 {
+               compatible = "regulator-fixed";
+               regulator-name = "5v0";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+       };
+
+       reg_vbus: regulator-vbus {
+               compatible = "regulator-fixed";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_vbus>;
+               regulator-name = "vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               vin-supply = <&reg_5v0>;
+               gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       usdhc2_wifi_pwrseq: usdhc2-wifi-pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_wifi_npd>;
+               reset-gpios = <&gpio4 25 GPIO_ACTIVE_LOW>;
+       };
+};
+
+&can1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_can1>;
+       status = "okay";
+};
+
+&cpu0 {
+       clock-frequency = <792000000>;
+};
+
+&fec1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_enet1>;
+       phy-mode = "rmii";
+       phy-handle = <&ethphy0>;
+       status = "okay";
+
+       mdio {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               ethphy0: ethernet-phy@0 {
+                       reg = <0>;
+                       clocks = <&clks IMX6UL_CLK_ENET_REF>;
+                       clock-names = "rmii-ref";
+                       interrupts-extended = <&gpio1 29 IRQ_TYPE_LEVEL_LOW>;
+                       reset-gpios = <&gpio1 28 GPIO_ACTIVE_LOW>;
+                       reset-assert-us = <10000>;
+                       reset-deassert-us = <300>;
+               };
+       };
+};
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c1>;
+       clock-frequency = <100000>;
+       status = "okay";
+};
+
+&i2c2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c2>;
+       clock-frequency = <100000>;
+       status = "okay";
+
+       rtc@51 {
+               compatible = "nxp,pcf8563";
+               reg = <0x51>;
+       };
+};
+
+&pwm1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm1>;
+       status = "okay";
+};
+
+&pwm2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm2>;
+       status = "okay";
+};
+
+&pwm3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm3>;
+       status = "okay";
+};
+
+&pwm4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm4>;
+       status = "okay";
+};
+
+&pwm5 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm5>;
+       status = "okay";
+};
+
+&pwm6 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm6>;
+       status = "okay";
+};
+
+&snvs_rtc {
+       status = "disabled";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart1>;
+       status = "okay";
+};
+
+&uart4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart4>;
+       dtr-gpios = <&gpio3 4 GPIO_ACTIVE_LOW>;
+       uart-has-rtscts;
+       status = "okay";
+};
+
+&usbotg1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usbotg1>;
+       vbus-supply = <&reg_vbus>;
+       dr_mode = "host";
+       over-current-active-low;
+       status = "okay";
+};
+
+&usdhc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc1>;
+       vmmc-supply = <&reg_3v3>;
+       bus-width = <8>;
+       no-1-8-v;
+       non-removable;
+       cap-mmc-hw-reset;
+       no-sd;
+       no-sdio;
+       status = "okay";
+};
+
+&usdhc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc2>;
+       mmc-pwrseq = <&usdhc2_wifi_pwrseq>;
+       bus-width = <4>;
+       no-1-8-v;
+       no-mmc;
+       no-sd;
+       non-removable;
+       #address-cells = <1>;
+       #size-cells = <0>;
+       status = "okay";
+
+       wifi@1 {
+               compatible = "brcm,bcm4329-fmac";
+               reg = <1>;
+       };
+};
+
+&iomuxc {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_hog>;
+
+       pinctrl_can1: can1grp {
+               fsl,pins = <
+                       MX6UL_PAD_UART3_CTS_B__FLEXCAN1_TX      0x1b0b0
+                       MX6UL_PAD_UART3_RTS_B__FLEXCAN1_RX      0x1b0b0
+               >;
+       };
+
+       pinctrl_enet1: enet1grp {
+               fsl,pins = <
+                       MX6UL_PAD_GPIO1_IO07__ENET1_MDC  0x1b0b0
+                       MX6UL_PAD_GPIO1_IO06__ENET1_MDIO        0x1b0b0
+                       MX6UL_PAD_ENET1_RX_EN__ENET1_RX_EN      0x1b0b0
+                       MX6UL_PAD_ENET1_RX_ER__ENET1_RX_ER      0x1b0b0
+                       MX6UL_PAD_ENET1_RX_DATA0__ENET1_RDATA00 0x1b0b0
+                       MX6UL_PAD_ENET1_RX_DATA1__ENET1_RDATA01 0x1b0b0
+                       MX6UL_PAD_ENET1_TX_EN__ENET1_TX_EN      0x1b0b0
+                       MX6UL_PAD_ENET1_TX_DATA0__ENET1_TDATA00 0x1b0b0
+                       MX6UL_PAD_ENET1_TX_DATA1__ENET1_TDATA01 0x1b0b0
+                       MX6UL_PAD_ENET1_TX_CLK__ENET1_REF_CLK1  0x4001b031
+
+                       MX6UL_PAD_UART4_TX_DATA__GPIO1_IO28     0x038b0
+                       MX6UL_PAD_UART4_RX_DATA__GPIO1_IO29     0x170b0
+               >;
+       };
+
+       pinctrl_hog: hoggrp {
+               fsl,pins = <
+                       /* HW Revision */
+                       MX6UL_PAD_ENET2_RX_DATA0__GPIO2_IO08    0x1b0b0
+                       MX6UL_PAD_ENET2_RX_DATA1__GPIO2_IO09    0x1b0b0
+                       MX6UL_PAD_ENET2_RX_EN__GPIO2_IO10       0x1b0b0
+
+                       /* HW ID */
+                       MX6UL_PAD_ENET2_TX_DATA0__GPIO2_IO11    0x1b0b0
+                       MX6UL_PAD_ENET2_TX_DATA1__GPIO2_IO12    0x1b0b0
+                       MX6UL_PAD_ENET2_TX_EN__GPIO2_IO13       0x1b0b0
+                       MX6UL_PAD_ENET2_TX_CLK__GPIO2_IO14      0x1b0b0
+                       MX6UL_PAD_ENET2_RX_ER__GPIO2_IO15       0x1b0b0
+
+                       /* Digital inputs */
+                       MX6UL_PAD_GPIO1_IO03__GPIO1_IO03        0x11000
+                       MX6UL_PAD_GPIO1_IO04__GPIO1_IO04        0x11000
+                       MX6UL_PAD_GPIO1_IO05__GPIO1_IO05        0x11000
+                       MX6UL_PAD_GPIO1_IO08__GPIO1_IO08        0x11000
+                       MX6UL_PAD_GPIO1_IO09__GPIO1_IO09        0x11000
+
+                       /* Isolated outputs */
+                       MX6UL_PAD_UART2_TX_DATA__GPIO1_IO20     0x01020
+                       MX6UL_PAD_UART2_RX_DATA__GPIO1_IO21     0x01020
+                       MX6UL_PAD_UART2_RTS_B__GPIO1_IO23       0x01020
+                       MX6UL_PAD_UART3_TX_DATA__GPIO1_IO24     0x01020
+                       MX6UL_PAD_UART3_RX_DATA__GPIO1_IO25     0x01020
+               >;
+       };
+
+       pinctrl_i2c1: i2c1grp {
+               fsl,pins = <
+                       MX6UL_PAD_CSI_MCLK__I2C1_SDA            0x4001f8b1
+                       MX6UL_PAD_CSI_PIXCLK__I2C1_SCL          0x4001f8b1
+               >;
+       };
+
+       pinctrl_i2c2: i2c2grp {
+               fsl,pins = <
+                       MX6UL_PAD_UART5_RX_DATA__I2C2_SDA       0x4001f8b1
+                       MX6UL_PAD_UART5_TX_DATA__I2C2_SCL       0x4001f8b1
+               >;
+       };
+
+       pinctrl_pwm1: pwm1grp {
+               fsl,pins = <
+                       MX6UL_PAD_LCD_DATA00__PWM1_OUT          0x01010
+               >;
+       };
+
+       pinctrl_pwm2: pwm2grp {
+               fsl,pins = <
+                       MX6UL_PAD_LCD_DATA01__PWM2_OUT          0x01010
+               >;
+       };
+
+       pinctrl_pwm3: pwm3grp {
+               fsl,pins = <
+                       MX6UL_PAD_LCD_DATA02__PWM3_OUT          0x01010
+               >;
+       };
+
+       pinctrl_pwm4: pwm4grp {
+               fsl,pins = <
+                       MX6UL_PAD_LCD_DATA03__PWM4_OUT          0x01010
+               >;
+       };
+
+       pinctrl_pwm5: pwm5grp {
+               fsl,pins = <
+                       MX6UL_PAD_LCD_DATA18__PWM5_OUT          0x01010
+               >;
+       };
+
+       pinctrl_pwm6: pwm6grp {
+               fsl,pins = <
+                       MX6UL_PAD_LCD_DATA19__PWM6_OUT          0x01010
+               >;
+       };
+
+       pinctrl_uart1: uart1grp {
+               fsl,pins = <
+                       MX6UL_PAD_UART1_TX_DATA__UART1_DCE_TX   0x1b0b1
+                       MX6UL_PAD_UART1_RX_DATA__UART1_DCE_RX   0x1b0b1
+               >;
+       };
+
+       pinctrl_uart4: uart4grp {
+               fsl,pins = <
+                       MX6UL_PAD_LCD_CLK__UART4_DCE_TX         0x1b0b0
+                       MX6UL_PAD_LCD_ENABLE__UART4_DCE_RX      0x1b0b0
+                       MX6UL_PAD_LCD_HSYNC__UART4_DCE_CTS      0x1b0b0
+                       MX6UL_PAD_LCD_VSYNC__UART4_DCE_RTS      0x1b0b0
+                       MX6UL_PAD_LCD_RESET__GPIO3_IO04         0x1b0b0
+               >;
+       };
+
+       pinctrl_usbotg1: usbotg1grp {
+               fsl,pins = <
+                       MX6UL_PAD_GPIO1_IO01__USB_OTG1_OC       0x1b0b0
+               >;
+       };
+
+       pinctrl_usdhc1: usdhc1grp {
+               fsl,pins = <
+                       MX6UL_PAD_NAND_WP_B__USDHC1_RESET_B     0x17099
+                       MX6UL_PAD_SD1_CMD__USDHC1_CMD           0x1f099
+                       MX6UL_PAD_SD1_CLK__USDHC1_CLK           0x10099
+                       MX6UL_PAD_SD1_DATA0__USDHC1_DATA0       0x17099
+                       MX6UL_PAD_SD1_DATA1__USDHC1_DATA1       0x17099
+                       MX6UL_PAD_SD1_DATA2__USDHC1_DATA2       0x17099
+                       MX6UL_PAD_SD1_DATA3__USDHC1_DATA3       0x17099
+                       MX6UL_PAD_NAND_READY_B__USDHC1_DATA4    0x17099
+                       MX6UL_PAD_NAND_CE0_B__USDHC1_DATA5      0x17099
+                       MX6UL_PAD_NAND_CE1_B__USDHC1_DATA6      0x17099
+                       MX6UL_PAD_NAND_CLE__USDHC1_DATA7        0x17099
+               >;
+       };
+
+       pinctrl_usdhc2: usdhc2grp {
+               fsl,pins = <
+                       MX6UL_PAD_CSI_VSYNC__USDHC2_CLK         0x100b9
+                       MX6UL_PAD_CSI_HSYNC__USDHC2_CMD         0x170b9
+                       MX6UL_PAD_CSI_DATA00__USDHC2_DATA0      0x170b9
+                       MX6UL_PAD_CSI_DATA01__USDHC2_DATA1      0x170b9
+                       MX6UL_PAD_CSI_DATA02__USDHC2_DATA2      0x170b9
+                       MX6UL_PAD_CSI_DATA03__USDHC2_DATA3      0x170b9
+               >;
+       };
+
+       pinctrl_vbus: vbus0grp {
+               fsl,pins = <
+                       MX6UL_PAD_GPIO1_IO02__GPIO1_IO02        0x030b0
+               >;
+       };
+
+       pinctrl_wifi_npd: wifigrp {
+               fsl,pins = <
+                       /* WL_REG_ON */
+                       MX6UL_PAD_CSI_DATA04__GPIO4_IO25        0x03020
+               >;
+       };
+};
+
+&iomuxc_snvs {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_snvs_hog>;
+
+       pinctrl_snvs_hog: snvs-hog-grp {
+               fsl,pins = <
+                       /* Digital outputs */
+                       MX6ULL_PAD_SNVS_TAMPER2__GPIO5_IO02     0x00020
+                       MX6ULL_PAD_SNVS_TAMPER3__GPIO5_IO03     0x00020
+                       MX6ULL_PAD_SNVS_TAMPER4__GPIO5_IO04     0x00020
+                       MX6ULL_PAD_SNVS_TAMPER5__GPIO5_IO05     0x00020
+                       MX6ULL_PAD_SNVS_TAMPER6__GPIO5_IO06     0x00020
+
+                       /* Digital outputs fault feedback */
+                       MX6ULL_PAD_SNVS_TAMPER0__GPIO5_IO00     0x17000
+                       MX6ULL_PAD_SNVS_TAMPER1__GPIO5_IO01     0x17000
+                       MX6ULL_PAD_SNVS_TAMPER7__GPIO5_IO07     0x17000
+                       MX6ULL_PAD_SNVS_TAMPER8__GPIO5_IO08     0x17000
+                       MX6ULL_PAD_SNVS_TAMPER9__GPIO5_IO09     0x17000
+               >;
+       };
+};
index c8d3eff..1d7362b 100644 (file)
@@ -10,6 +10,7 @@
 #include "imx6ull-phytec-segin.dtsi"
 #include "imx6ull-phytec-segin-peb-eval-01.dtsi"
 #include "imx6ull-phytec-segin-peb-av-02.dtsi"
+#include "imx6ull-phytec-segin-peb-wlbt-05.dtsi"
 
 / {
        model = "PHYTEC phyBOARD-Segin i.MX6 ULL Full Featured with NAND";
index e168494..4bcbae0 100644 (file)
@@ -9,6 +9,7 @@
 #include "imx6ull-phytec-phycore-som.dtsi"
 #include "imx6ull-phytec-segin.dtsi"
 #include "imx6ull-phytec-segin-peb-eval-01.dtsi"
+#include "imx6ull-phytec-segin-peb-wlbt-05.dtsi"
 
 / {
        model = "PHYTEC phyBOARD-Segin i.MX6 ULL Low Cost with NAND";
diff --git a/arch/arm/boot/dts/imx6ull-phytec-segin-peb-wlbt-05.dtsi b/arch/arm/boot/dts/imx6ull-phytec-segin-peb-wlbt-05.dtsi
new file mode 100644 (file)
index 0000000..df25814
--- /dev/null
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2021 PHYTEC Messtechnik GmbH
+ * Author: Yunus Bas <y.bas@phytec.de>
+ */
+
+#include "imx6ul-phytec-segin-peb-wlbt-05.dtsi"
+
+&iomuxc {
+       /delete-node/ wlgrp;
+};
+
+&iomuxc_snvs {
+       pinctrl_wl: wlgrp {
+               fsl,pins = <
+                       MX6ULL_PAD_SNVS_TAMPER9__GPIO5_IO09     0x3031
+               >;
+       };
+};
diff --git a/arch/arm/boot/dts/imx6ulz-bsh-smm-m2.dts b/arch/arm/boot/dts/imx6ulz-bsh-smm-m2.dts
new file mode 100644 (file)
index 0000000..59bcfc9
--- /dev/null
@@ -0,0 +1,146 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2021 BSH Hausgeraete GmbH
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/input/input.h>
+#include "imx6ulz.dtsi"
+
+/ {
+       model = "BSH SMM M2";
+       compatible = "bsh,imx6ulz-bsh-smm-m2", "fsl,imx6ull", "fsl,imx6ulz";
+
+       chosen {
+               stdout-path = &uart4;
+       };
+
+       usdhc2_pwrseq: usdhc2-pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               reset-gpios = <&gpio2 21 GPIO_ACTIVE_LOW>;
+       };
+};
+
+&gpmi {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_gpmi_nand>;
+       nand-on-flash-bbt;
+       status = "okay";
+};
+
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart3>;
+       uart-has-rtscts;
+       status = "okay";
+
+       bluetooth {
+               compatible = "brcm,bcm4330-bt";
+               max-speed = <3000000>;
+               shutdown-gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
+               device-wakeup-gpios = <&gpio2 17 GPIO_ACTIVE_HIGH>;
+               host-wakeup-gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>;
+       };
+};
+
+&uart4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart4>;
+       status = "okay";
+};
+
+&usbotg1 {
+       dr_mode = "peripheral";
+       srp-disable;
+       hnp-disable;
+       adp-disable;
+       status = "okay";
+};
+
+&usbphy1 {
+       fsl,tx-d-cal = <106>;
+};
+
+&usdhc2 {
+       #address-cells = <1>;
+       #size-cells = <0>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_wlan>;
+       bus-width = <4>;
+       no-1-8-v;
+       non-removable;
+       cap-power-off-card;
+       keep-power-in-suspend;
+       cap-sdio-irq;
+       mmc-pwrseq = <&usdhc2_pwrseq>;
+       status = "okay";
+
+       brcmf: wifi@1 {
+               reg = <1>;
+               compatible = "brcm,bcm4329-fmac";
+               interrupt-parent = <&gpio1>;
+               interrupts = <18 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "host-wake";
+       };
+};
+
+&wdog1 {
+       status = "okay";
+};
+
+&iomuxc {
+       pinctrl_gpmi_nand: gpmi-nand {
+               fsl,pins = <
+                       MX6UL_PAD_NAND_CLE__RAWNAND_CLE         0xb0b1
+                       MX6UL_PAD_NAND_ALE__RAWNAND_ALE         0xb0b1
+                       MX6UL_PAD_NAND_WP_B__RAWNAND_WP_B       0xb0b1
+                       MX6UL_PAD_NAND_READY_B__RAWNAND_READY_B 0xb000
+                       MX6UL_PAD_NAND_CE0_B__RAWNAND_CE0_B     0xb0b1
+                       MX6UL_PAD_NAND_RE_B__RAWNAND_RE_B       0xb0b1
+                       MX6UL_PAD_NAND_WE_B__RAWNAND_WE_B       0xb0b1
+                       MX6UL_PAD_NAND_DATA00__RAWNAND_DATA00   0xb0b1
+                       MX6UL_PAD_NAND_DATA01__RAWNAND_DATA01   0xb0b1
+                       MX6UL_PAD_NAND_DATA02__RAWNAND_DATA02   0xb0b1
+                       MX6UL_PAD_NAND_DATA03__RAWNAND_DATA03   0xb0b1
+                       MX6UL_PAD_NAND_DATA04__RAWNAND_DATA04   0xb0b1
+                       MX6UL_PAD_NAND_DATA05__RAWNAND_DATA05   0xb0b1
+                       MX6UL_PAD_NAND_DATA06__RAWNAND_DATA06   0xb0b1
+                       MX6UL_PAD_NAND_DATA07__RAWNAND_DATA07   0xb0b1
+               >;
+       };
+
+       pinctrl_uart3: uart3grp {
+               fsl,pins = <
+                       MX6UL_PAD_UART3_TX_DATA__UART3_DCE_TX   0x1b0b1
+                       MX6UL_PAD_UART3_RX_DATA__UART3_DCE_RX   0x1b099
+                       MX6UL_PAD_UART3_RTS_B__UART3_DCE_RTS    0x1b0b1
+                       MX6UL_PAD_UART3_CTS_B__UART3_DCE_CTS    0x1b099
+                       MX6UL_PAD_GPIO1_IO01__GPIO1_IO01        0x79            /* BT_REG_ON */
+                       MX6UL_PAD_SD1_CLK__GPIO2_IO17           0x100b1         /* BT_DEV_WAKE out */
+                       MX6UL_PAD_ENET2_TX_EN__GPIO2_IO13       0x1b0b0         /* BT_HOST_WAKE in */
+               >;
+       };
+
+       pinctrl_uart4: uart4grp {
+               fsl,pins = <
+                       MX6UL_PAD_UART4_TX_DATA__UART4_DCE_TX   0x1b0b1
+                       MX6UL_PAD_UART4_RX_DATA__UART4_DCE_RX   0x1b0b1
+               >;
+       };
+
+       pinctrl_wlan: wlangrp {
+               fsl,pins = <
+                       MX6UL_PAD_CSI_HSYNC__USDHC2_CMD         0x17059
+                       MX6UL_PAD_CSI_VSYNC__USDHC2_CLK         0x10059
+                       MX6UL_PAD_CSI_DATA00__USDHC2_DATA0      0x17059
+                       MX6UL_PAD_CSI_DATA01__USDHC2_DATA1      0x17059
+                       MX6UL_PAD_CSI_DATA02__USDHC2_DATA2      0x17059
+                       MX6UL_PAD_CSI_DATA03__USDHC2_DATA3      0x17059
+                       MX6UL_PAD_SD1_DATA3__GPIO2_IO21         0x79            /* WL_REG_ON */
+                       MX6UL_PAD_UART2_CTS_B__GPIO1_IO22       0x100b1         /* WL_DEV_WAKE - WiFi_GPIO_4 - WiFi FW UART */
+                       MX6UL_PAD_UART1_CTS_B__GPIO1_IO18       0x1b0b1         /* WL_HOST_WAKE - WIFI_GPIO_0 - OOB IRQ */
+                       MX6UL_PAD_ENET1_RX_EN__OSC32K_32K_OUT   0x4001b031      /* OSC 32Khz wifi clk in */
+               >;
+       };
+};
index 89cbf13..a2a91bf 100644 (file)
                startup-delay-us = <150>;
        };
 
+       reg_digitizer: regulator-digitizer {
+               compatible = "regulator-fixed";
+               regulator-name = "VDD_3V3_DIGITIZER";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               pinctrl-names = "default", "sleep";
+               pinctrl-0 = <&pinctrl_digitizer_reg>;
+               pinctrl-1 = <&pinctrl_digitizer_reg>;
+               gpio = <&gpio1 6 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+               startup-delay-us = <100000>; /* 100 ms */
+       };
+
        wifi_pwrseq: wifi_pwrseq {
                compatible = "mmc-pwrseq-simple";
                pinctrl-names = "default";
        assigned-clock-rates = <0>, <32768>;
 };
 
+&i2c1 {
+       clock-frequency = <400000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c1>;
+       status = "okay";
+
+       wacom_digitizer: digitizer@9 {
+               compatible = "hid-over-i2c";
+               reg = <0x09>;
+               hid-descr-addr = <0x01>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_wacom>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
+               touchscreen-inverted-x;
+               touchscreen-inverted-y;
+               vdd-supply = <&reg_digitizer>;
+       };
+};
+
 &snvs_pwrkey {
        status = "okay";
 };
        fsl,ext-reset-output;
 };
 
+&iomuxc_lpsr {
+       pinctrl_digitizer_reg: digitizerreggrp {
+               fsl,pins = <
+                       /* DIGITIZER_PWR_EN */
+                       MX7D_PAD_LPSR_GPIO1_IO06__GPIO1_IO6     0x14
+               >;
+       };
+
+       pinctrl_wacom: wacomgrp {
+               fsl,pins = <
+                       /*MX7D_PAD_LPSR_GPIO1_IO05__GPIO1_IO5   0x00000014 FWE */
+                       MX7D_PAD_LPSR_GPIO1_IO04__GPIO1_IO4     0x00000074 /* PDCTB */
+                       MX7D_PAD_LPSR_GPIO1_IO01__GPIO1_IO1     0x00000034 /* WACOM INT */
+                       /*MX7D_PAD_LPSR_GPIO1_IO06__GPIO1_IO6   0x00000014 WACOM PWR ENABLE */
+                       /*MX7D_PAD_LPSR_GPIO1_IO00__GPIO1_IO0   0x00000074 WACOM RESET */
+               >;
+       };
+};
+
 &iomuxc {
        pinctrl_brcm_reg: brcmreggrp {
                fsl,pins = <
                >;
        };
 
+       pinctrl_i2c1: i2c1grp {
+               fsl,pins = <
+                       MX7D_PAD_I2C1_SDA__I2C1_SDA             0x4000007f
+                       MX7D_PAD_I2C1_SCL__I2C1_SCL             0x4000007f
+               >;
+       };
+
        pinctrl_uart1: uart1grp {
                fsl,pins = <
                        MX7D_PAD_UART1_TX_DATA__UART1_DCE_TX    0x79
index 569bbd8..4f1edef 100644 (file)
 
 &mipi_csi {
        clock-frequency = <166000000>;
-       fsl,csis-hs-settle = <3>;
        status = "okay";
 
-       port@0 {
-               reg = <0>;
+       ports {
+               port@0 {
+                       reg = <0>;
 
-               mipi_from_sensor: endpoint {
-                       remote-endpoint = <&ov2680_to_mipi>;
-                       data-lanes = <1>;
+                       mipi_from_sensor: endpoint {
+                               remote-endpoint = <&ov2680_to_mipi>;
+                               data-lanes = <1>;
+                       };
                };
-
        };
 };
 
index 1843fc0..52a9aee 100644 (file)
                        mipi_csi: mipi-csi@30750000 {
                                compatible = "fsl,imx7-mipi-csi2";
                                reg = <0x30750000 0x10000>;
-                               #address-cells = <1>;
-                               #size-cells = <0>;
                                interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
                                clocks = <&clks IMX7D_IPG_ROOT_CLK>,
                                         <&clks IMX7D_MIPI_CSI_ROOT_CLK>,
                                power-domains = <&pgc_mipi_phy>;
                                phy-supply = <&reg_1p0d>;
                                resets = <&src IMX7_RESET_MIPI_PHY_MRST>;
-                               reset-names = "mrst";
                                status = "disabled";
 
-                               port@0 {
-                                       reg = <0>;
-                               };
+                               ports {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
 
-                               port@1 {
-                                       reg = <1>;
+                                       port@0 {
+                                               reg = <0>;
+                                       };
 
-                                       mipi_vc0_to_csi_mux: endpoint {
-                                               remote-endpoint = <&csi_mux_from_mipi_vc0>;
+                                       port@1 {
+                                               reg = <1>;
+
+                                               mipi_vc0_to_csi_mux: endpoint {
+                                                       remote-endpoint = <&csi_mux_from_mipi_vc0>;
+                                               };
                                        };
                                };
                        };
index 598586f..b740403 100644 (file)
                                        fis-index-block = <0x1f>;
                                };
                        };
+
+                       /* Small syscon with some LEDs at CS2 */
+                       syscon@2,0 {
+                               compatible = "freecom,fsg-cs2-system-controller", "syscon";
+                               reg = <2 0x0 0x200>;
+                               reg-io-width = <2>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               ranges = <2 0x0 0x0 0x200>;
+
+                               led@0,0 {
+                                       compatible = "register-bit-led";
+                                       reg = <0x00 0x02>;
+                                       mask = <0x01>;
+                                       label = "fsg:blue:wlan";
+                                       linux,default-trigger = "wlan";
+                                       default-state = "on";
+                               };
+                               led@0,1 {
+                                       compatible = "register-bit-led";
+                                       reg = <0x00 0x02>;
+                                       mask = <0x02>;
+                                       label = "fsg:blue:wan";
+                                       linux,default-trigger = "";
+                                       default-state = "on";
+                               };
+                               led@0,2 {
+                                       compatible = "register-bit-led";
+                                       reg = <0x00 0x02>;
+                                       mask = <0x04>;
+                                       label = "fsg:blue:sata";
+                                       linux,default-trigger = "";
+                                       default-state = "on";
+                               };
+                               led@0,3 {
+                                       compatible = "register-bit-led";
+                                       reg = <0x00 0x02>;
+                                       mask = <0x04>;
+                                       label = "fsg:blue:usb";
+                                       linux,default-trigger = "";
+                                       default-state = "on";
+                               };
+                               led@0,4 {
+                                       compatible = "register-bit-led";
+                                       reg = <0x00 0x02>;
+                                       mask = <0x08>;
+                                       label = "fsg:blue:sync";
+                                       linux,default-trigger = "";
+                                       default-state = "on";
+                               };
+                               led@0,5 {
+                                       compatible = "register-bit-led";
+                                       reg = <0x00 0x02>;
+                                       mask = <0x10>;
+                                       label = "fsg:blue:ring";
+                                       linux,default-trigger = "";
+                                       default-state = "on";
+                               };
+                       };
                };
 
                pci@c0000000 {
diff --git a/arch/arm/boot/dts/intel-ixp42x-gateway-7001.dts b/arch/arm/boot/dts/intel-ixp42x-gateway-7001.dts
new file mode 100644 (file)
index 0000000..a1c03c9
--- /dev/null
@@ -0,0 +1,111 @@
+// SPDX-License-Identifier: ISC
+/*
+ * Device Tree file for Gateway 7001 AP
+ * Derived from boardfiles written by Imre Kaloz
+ */
+
+/dts-v1/;
+
+#include "intel-ixp42x.dtsi"
+#include <dt-bindings/input/input.h>
+
+/ {
+       model = "Gateway 7001 AP";
+       compatible = "gateway,7001", "intel,ixp42x";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       memory@0 {
+               /* 32 MB SDRAM */
+               device_type = "memory";
+               reg = <0x00000000 0x2000000>;
+       };
+
+       chosen {
+               bootargs = "console=ttyS0,115200n8";
+               stdout-path = "uart1:115200n8";
+       };
+
+       aliases {
+               /* second UART is the primary console */
+               serial0 = &uart1;
+               serial1 = &uart0;
+       };
+
+       soc {
+               bus@c4000000 {
+                       flash@0,0 {
+                               compatible = "intel,ixp4xx-flash", "cfi-flash";
+                               bank-width = <2>;
+                               /*
+                                * 8 MB of flash
+                                */
+                               reg = <0 0x00000000 0x800000>;
+
+                               /* Configure expansion bus to allow writes */
+                               intel,ixp4xx-eb-write-enable = <1>;
+
+                               partitions {
+                                       compatible = "redboot-fis";
+                                       /* Eraseblock at 0x7e0000 */
+                                       fis-index-block = <0x3f>;
+                               };
+                       };
+               };
+
+               pci@c0000000 {
+                       status = "ok";
+
+                       /*
+                        * Taken from Gateway 7001 PCI boardfile (gateway7001-pci.c)
+                        * We have slots (IDSEL) 1 and 2 with one assigned IRQ
+                        * each handling all IRQs.
+                        */
+                       interrupt-map =
+                       /* IDSEL 1 */
+                       <0x0800 0 0 1 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 1 is irq 11 */
+                       <0x0800 0 0 2 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 1 is irq 11 */
+                       <0x0800 0 0 3 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 1 is irq 11 */
+                       <0x0800 0 0 4 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 1 is irq 11 */
+                       /* IDSEL 2 */
+                       <0x1000 0 0 1 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 2 is irq 10 */
+                       <0x1000 0 0 2 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 2 is irq 10 */
+                       <0x1000 0 0 3 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 2 is irq 10 */
+                       <0x1000 0 0 4 &gpio0 10 IRQ_TYPE_LEVEL_LOW>; /* INT D on slot 2 is irq 10 */
+               };
+
+               ethernet@c8009000 {
+                       status = "ok";
+                       queue-rx = <&qmgr 3>;
+                       queue-txready = <&qmgr 20>;
+                       phy-mode = "rgmii";
+                       phy-handle = <&phy1>;
+
+                       mdio {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               phy1: ethernet-phy@1 {
+                                       reg = <1>;
+                               };
+                       };
+               };
+
+               ethernet@c800a000 {
+                       status = "ok";
+                       queue-rx = <&qmgr 4>;
+                       queue-txready = <&qmgr 21>;
+                       phy-mode = "rgmii";
+                       phy-handle = <&phy2>;
+
+                       mdio {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               phy2: ethernet-phy@2 {
+                                       reg = <2>;
+                               };
+                       };
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/intel-ixp42x-goramo-multilink.dts b/arch/arm/boot/dts/intel-ixp42x-goramo-multilink.dts
new file mode 100644 (file)
index 0000000..f80388b
--- /dev/null
@@ -0,0 +1,180 @@
+// SPDX-License-Identifier: ISC
+/*
+ * Device Tree file for the Goramo MultiLink Router
+ * There are two variants:
+ * - MultiLink Basic (a box)
+ * - MultiLink Max (19" rack mount)
+ * This device tree supports MultiLink Basic.
+ * This machine is based on IXP425.
+ * This is one of the few devices supporting the IXP4xx High-Speed Serial
+ * (HSS) link for a V.35 WAN interface.
+ * The hardware originates in Poland.
+ */
+
+/dts-v1/;
+
+#include "intel-ixp42x.dtsi"
+#include <dt-bindings/input/input.h>
+
+/ {
+       model = "Goramo MultiLink Router";
+       compatible = "goramo,multilink-router", "intel,ixp42x";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       memory@0 {
+               /*
+                * 64 MB of RAM according to the manual. The MultiLink
+                * Max has 128 MB.
+                */
+               device_type = "memory";
+               reg = <0x00000000 0x4000000>;
+       };
+
+       chosen {
+               bootargs = "console=ttyS0,115200n8";
+               stdout-path = "uart0:115200n8";
+       };
+
+       aliases {
+               serial0 = &uart0;
+               serial1 = &uart1;
+       };
+
+       /*
+        * 74HC4094 which is used as a rudimentary GPIO expander
+        * FIXME:
+        * - Create device tree bindings for this as GPIO expander
+        * - Write a pure DT GPIO driver using these bindings
+        * - Support cascading in the style of gpio-74x164.c (cannot be reused, very different)
+        */
+       gpio_74: gpio-74hc4094 {
+               compatible = "nxp,74hc4094";
+               cp-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
+               d-gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+               str-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
+               /* oe-gpios is optional */
+               gpio-controller;
+               #gpio-cells = <2>;
+               /* We are not cascaded */
+               registers-number = <1>;
+               gpio-line-names = "CONTROL_HSS0_CLK_INT", "CONTROL_HSS1_CLK_INT", "CONTROL_HSS0_DTR_N",
+                               "CONTROL_HSS1_DTR_N", "CONTROL_EXT", "CONTROL_AUTO_RESET",
+                               "CONTROL_PCI_RESET_N", "CONTROL_EEPROM_WC_N";
+       };
+
+       soc {
+               bus@c4000000 {
+                       flash@0,0 {
+                               compatible = "intel,ixp4xx-flash", "cfi-flash";
+                               bank-width = <2>;
+                               /* Enable writes on the expansion bus */
+                               intel,ixp4xx-eb-write-enable = <1>;
+                               /* 16 MB of Flash mapped in at CS0 */
+                               reg = <0 0x00000000 0x1000000>;
+
+                               partitions {
+                                       compatible = "redboot-fis";
+                                       /* Eraseblock at 0x0fe0000 */
+                                       fis-index-block = <0x7f>;
+                               };
+                       };
+               };
+
+               pci@c0000000 {
+                       status = "ok";
+
+                       /*
+                        * The device has 4 slots (IDSEL) with one dedicated IRQ per slot.
+                        * The slots have Ethernet, Ethernet, NEC and MPCI.
+                        * The IDSELs are 11, 12, 13, 14.
+                        */
+                       interrupt-map =
+                       /* IDSEL 11 - Ethernet A */
+                       <0x5800 0 0 1 &gpio0 4 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 11 is irq 4 */
+                       <0x5800 0 0 2 &gpio0 4 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 11 is irq 4 */
+                       <0x5800 0 0 3 &gpio0 4 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 11 is irq 4 */
+                       <0x5800 0 0 4 &gpio0 4 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 11 is irq 4 */
+                       /* IDSEL 12 - Ethernet B */
+                       <0x6000 0 0 1 &gpio0 5 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 12 is irq 5 */
+                       <0x6000 0 0 2 &gpio0 5 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 12 is irq 5 */
+                       <0x6000 0 0 3 &gpio0 5 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 12 is irq 5 */
+                       <0x6000 0 0 4 &gpio0 5 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 12 is irq 5 */
+                       /* IDSEL 13 - MPCI */
+                       <0x6800 0 0 1 &gpio0 12 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 13 is irq 12 */
+                       <0x6800 0 0 2 &gpio0 12 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 13 is irq 12 */
+                       <0x6800 0 0 3 &gpio0 12 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 13 is irq 12 */
+                       <0x6800 0 0 4 &gpio0 12 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 13 is irq 12 */
+                       /* IDSEL 14 - NEC */
+                       <0x7000 0 0 1 &gpio0 3 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 14 is irq 3 */
+                       <0x7000 0 0 2 &gpio0 3 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 14 is irq 3 */
+                       <0x7000 0 0 3 &gpio0 3 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 14 is irq 3 */
+                       <0x7000 0 0 4 &gpio0 3 IRQ_TYPE_LEVEL_LOW>; /* INT D on slot 14 is irq 3 */
+               };
+
+               /* HSS links */
+               npe@c8006000 {
+                       hss@0 {
+                               status = "okay";
+                               intel,queue-chl-rxtrig = <&qmgr 12>;
+                               intel,queue-chl-txready = <&qmgr 34>;
+                               intel,queue-pkt-rx = <&qmgr 13>;
+                               intel,queue-pkt-tx = <&qmgr 14>, <&qmgr 15>, <&qmgr 16>, <&qmgr 17>;
+                               intel,queue-pkt-rxfree = <&qmgr 18>, <&qmgr 19>, <&qmgr 20>, <&qmgr 21>;
+                               intel,queue-pkt-txdone = <&qmgr 22>;
+                               /* The Goramo GPIO-based clock etc control */
+                               cts-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+                               rts-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+                               dcd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
+                               dtr-gpios = <&gpio_74 2 GPIO_ACTIVE_LOW>;
+                               clk-internal-gpios = <&gpio_74 0 GPIO_ACTIVE_HIGH>;
+                       };
+                       hss@1 {
+                               status = "okay";
+                               intel,queue-chl-rxtrig = <&qmgr 10>;
+                               intel,queue-chl-txready = <&qmgr 35>;
+                               intel,queue-pkt-rx = <&qmgr 0>;
+                               intel,queue-pkt-tx = <&qmgr 5>, <&qmgr 6>, <&qmgr 7>, <&qmgr 8>;
+                               intel,queue-pkt-rxfree = <&qmgr 1>, <&qmgr 2>, <&qmgr 3>, <&qmgr 4>;
+                               intel,queue-pkt-txdone = <&qmgr 9>;
+                               /* The Goramo GPIO-based clock etc control */
+                               cts-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+                               rts-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+                               dcd-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+                               dtr-gpios = <&gpio_74 3 GPIO_ACTIVE_LOW>;
+                               clk-internal-gpios = <&gpio_74 1 GPIO_ACTIVE_HIGH>;
+                       };
+               };
+
+               /* EthB */
+               ethernet@c8009000 {
+                       status = "ok";
+                       queue-rx = <&qmgr 3>;
+                       queue-txready = <&qmgr 32>;
+                       phy-mode = "rgmii";
+                       phy-handle = <&phy0>;
+
+                       mdio {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               phy0: ethernet-phy@0 {
+                                       reg = <0>;
+                               };
+
+                               phy1: ethernet-phy@1 {
+                                       reg = <1>;
+                               };
+                       };
+               };
+
+               /* EthC */
+               ethernet@c800a000 {
+                       status = "ok";
+                       queue-rx = <&qmgr 4>;
+                       queue-txready = <&qmgr 33>;
+                       phy-mode = "rgmii";
+                       phy-handle = <&phy1>;
+               };
+       };
+};
index 46fede0..51a716c 100644 (file)
                npe: npe@c8006000 {
                        compatible = "intel,ixp4xx-network-processing-engine";
                        reg = <0xc8006000 0x1000>, <0xc8007000 0x1000>, <0xc8008000 0x1000>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       /* NPE-A contains two high-speed serial links */
+                       hss@0 {
+                               compatible = "intel,ixp4xx-hss";
+                               reg = <0>;
+                               intel,npe-handle = <&npe 0>;
+                               status = "disabled";
+                       };
+
+                       hss@1 {
+                               compatible = "intel,ixp4xx-hss";
+                               reg = <1>;
+                               intel,npe-handle = <&npe 0>;
+                               status = "disabled";
+                       };
 
                        /* NPE-C contains a crypto accelerator */
                        crypto {
index aa7c6ca..75f0c0a 100644 (file)
                              <0x1d002000 0x1000>; /* CPU I/f base and size */
                };
 
+               clk: clock-ctrl@1d021000 {
+                       compatible = "socionext,milbeaut-m10v-ccu";
+                       #clock-cells = <1>;
+                       reg = <0x1d021000 0x1000>;
+                       clocks = <&uclk40xi>;
+               };
+
                timer@1e000050 { /* 32-bit Reload Timers */
                        compatible = "socionext,milbeaut-timer";
                        reg = <0x1e000050 0x20>;
                        interrupts = <0 91 4>;
+                       clocks = <&clk 4>;
                };
 
                uart1: serial@1e700010 { /* PE4, PE5 */
@@ -77,6 +85,7 @@
                        reg = <0x1e700010 0x10>;
                        interrupts = <0 141 0x4>, <0 149 0x4>;
                        interrupt-names = "rx", "tx";
+                       clocks = <&clk 2>;
                };
 
        };
index a4423ff..c7a1f3f 100644 (file)
        #address-cells = <1>;
        #size-cells = <0>;
        wlcore: wlcore@2 {
-               compatible = "ti,wl1285", "ti,wl1283";
+               compatible = "ti,wl1285";
                reg = <2>;
                /* gpio_100 with gpmc_wait2 pad as wakeirq */
                interrupts-extended = <&gpio4 4 IRQ_TYPE_LEVEL_HIGH>,
diff --git a/arch/arm/boot/dts/mt6589-fairphone-fp1.dts b/arch/arm/boot/dts/mt6589-fairphone-fp1.dts
new file mode 100644 (file)
index 0000000..c952347
--- /dev/null
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2021, Luca Weiss <luca@z3ntu.xyz>
+ */
+
+/dts-v1/;
+#include "mt6589.dtsi"
+
+/ {
+       model = "Fairphone 1";
+       compatible = "fairphone,fp1", "mediatek,mt6589";
+
+       chosen {
+               stdout-path = &uart3;
+       };
+
+       memory@80000000 {
+               device_type = "memory";
+               reg = <0x80000000 0x40000000>;
+       };
+};
+
+&cpus {
+       /* SMP is not stable on this board, makes the kernel panic */
+       /delete-property/ enable-method;
+};
+
+&uart3 {
+       status = "okay";
+};
index 70df00a..c6babc8 100644 (file)
@@ -14,7 +14,7 @@
        compatible = "mediatek,mt6589";
        interrupt-parent = <&sysirq>;
 
-       cpus {
+       cpus: cpus {
                #address-cells = <1>;
                #size-cells = <0>;
                enable-method = "mediatek,mt6589-smp";
index 580bfa1..7f440d1 100644 (file)
 &mcspi1 {
        pinctrl-names = "default";
        pinctrl-0 = <&mcspi1_pins>;
-
-       spidev@0 {
-               compatible = "spidev";
-               spi-max-frequency = <48000000>;
-               reg = <0>;
-               spi-cpha;
-       };
 };
 
 &mcspi3 {
        pinctrl-names = "default";
        pinctrl-0 = <&mcspi3_pins>;
-
-       spidev@0 {
-               compatible = "spidev";
-               spi-max-frequency = <48000000>;
-               reg = <0>;
-               spi-cpha;
-       };
 };
 
 #include "twl4030.dtsi"
index 942e3a2..0827de5 100644 (file)
 
 &gsbi3_spi {
        spi@0 {
-               compatible = "swir,mangoh-iotport-spi", "spidev";
+               compatible = "swir,mangoh-iotport-spi";
                spi-max-frequency = <24000000>;
                reg = <0>;
        };
index 33db593..3c8a7c8 100644 (file)
                #clock-cells = <0>;
                clock-frequency = <26000000>;
        };
+
+       reg_1p8v: 1p8v {
+               compatible = "regulator-fixed";
+               regulator-name = "1P8V";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               regulator-always-on;
+       };
+
+       reg_2p8v: 2p8v {
+               compatible = "regulator-fixed";
+               regulator-name = "2P8V";
+               regulator-min-microvolt = <2800000>;
+               regulator-max-microvolt = <2800000>;
+               regulator-always-on;
+       };
 };
 
 &avb {
index 70c72ba..40cef0b 100644 (file)
@@ -17,6 +17,9 @@
                reg = <0x3c>;
                clocks = <&MCLK_CAM>;
                clock-names = "xclk";
+               AVDD-supply = <&reg_2p8v>;
+               DOVDD-supply = <&reg_2p8v>;
+               DVDD-supply = <&reg_1p8v>;
                status = "okay";
 
                port {
index 801969c..09c741e 100644 (file)
                                reg-names = "qspi_base", "qspi_mmap";
                                interrupts = <52 IRQ_TYPE_LEVEL_HIGH 7>;
                                clocks = <&pmc PMC_TYPE_PERIPHERAL 52>;
+                               clock-names = "pclk";
                                #address-cells = <1>;
                                #size-cells = <0>;
                                status = "disabled";
                                reg-names = "qspi_base", "qspi_mmap";
                                interrupts = <53 IRQ_TYPE_LEVEL_HIGH 7>;
                                clocks = <&pmc PMC_TYPE_PERIPHERAL 53>;
+                               clock-names = "pclk";
                                #address-cells = <1>;
                                #size-cells = <0>;
                                status = "disabled";
index 22fe9e5..4eb3044 100644 (file)
 #define PIN_PD20__PCK0                 PINMUX_PIN(PIN_PD20, 1, 3)
 #define PIN_PD20__FLEXCOM2_IO3         PINMUX_PIN(PIN_PD20, 2, 2)
 #define PIN_PD20__PWMH3                        PINMUX_PIN(PIN_PD20, 3, 4)
-#define PIN_PD20__CANTX4               PINMUX_PIN(PIN_PD20, 5, 2)
+#define PIN_PD20__CANTX4               PINMUX_PIN(PIN_PD20, 4, 2)
 #define PIN_PD20__FLEXCOM5_IO0         PINMUX_PIN(PIN_PD20, 6, 5)
 #define PIN_PD21                       117
 #define PIN_PD21__GPIO                 PINMUX_PIN(PIN_PD21, 0, 0)
index 7039311..eddcfbf 100644 (file)
                        clock-names = "t0_clk", "t1_clk", "t2_clk", "slow_clk";
                };
 
+               qspi0: spi@e080c000 {
+                       compatible = "microchip,sama7g5-ospi";
+                       reg = <0xe080c000 0x400>, <0x20000000 0x10000000>;
+                       reg-names = "qspi_base", "qspi_mmap";
+                       interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
+                       dmas = <&dma0 AT91_XDMAC_DT_PERID(41)>,
+                              <&dma0 AT91_XDMAC_DT_PERID(40)>;
+                       dma-names = "tx", "rx";
+                       clocks = <&pmc PMC_TYPE_PERIPHERAL 78>, <&pmc PMC_TYPE_GCK 78>;
+                       clock-names = "pclk", "gclk";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               qspi1: spi@e0810000 {
+                       compatible = "microchip,sama7g5-qspi";
+                       reg = <0xe0810000 0x400>, <0x30000000 0x10000000>;
+                       reg-names = "qspi_base", "qspi_mmap";
+                       interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+                       dmas = <&dma0 AT91_XDMAC_DT_PERID(43)>,
+                              <&dma0 AT91_XDMAC_DT_PERID(42)>;
+                       dma-names = "tx", "rx";
+                       clocks = <&pmc PMC_TYPE_PERIPHERAL 79>, <&pmc PMC_TYPE_GCK 79>;
+                       clock-names = "pclk", "gclk";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
                adc: adc@e1000000 {
                        compatible = "microchip,sama7g5-adc";
                        reg = <0xe1000000 0x200>;
index 8fcb6be..4cbadcb 100644 (file)
                                        pl022,wait-state = <0>;
                                        pl022,duplex = <0>;
                                };
-
-                               spidev@2 {
-                                       compatible = "spidev";
-                                       reg = <2>;
-                                       spi-max-frequency = <25000000>;
-                                       spi-cpha;
-                                       pl022,hierarchy = <0>;
-                                       pl022,interface = <0>;
-                                       pl022,slave-tx-disable;
-                                       pl022,com-mode = <0x2>;
-                                       pl022,rx-level-trig = <0>;
-                                       pl022,tx-level-trig = <0>;
-                                       pl022,ctrl-len = <0x11>;
-                                       pl022,wait-state = <0>;
-                                       pl022,duplex = <0>;
-                               };
                        };
 
                        wdt@ec800620 {
index f70ff56..fd194eb 100644 (file)
                                                ts,i-drive = <1>;
                                        };
                                };
-
-                               spidev@2 {
-                                       compatible = "spidev";
-                                       reg = <2>;
-                                       spi-max-frequency = <25000000>;
-                                       spi-cpha;
-                                       pl022,hierarchy = <0>;
-                                       pl022,interface = <0>;
-                                       pl022,slave-tx-disable;
-                                       pl022,com-mode = <0x2>;
-                                       pl022,rx-level-trig = <0>;
-                                       pl022,tx-level-trig = <0>;
-                                       pl022,ctrl-len = <0x11>;
-                                       pl022,wait-state = <0>;
-                                       pl022,duplex = <0>;
-                               };
                        };
 
                        timer@ec800600 {
index 8ce751a..7757083 100644 (file)
@@ -92,6 +92,7 @@
                        gpiopinctrl: gpio@b4000000 {
                                compatible = "st,spear-plgpio";
                                reg = <0xb4000000 0x1000>;
+                               regmap = <&pinmux>;
                                #interrupt-cells = <1>;
                                interrupt-controller;
                                gpio-controller;
index 3bc1e93..47ac447 100644 (file)
                        gpiopinctrl: gpio@b3000000 {
                                compatible = "st,spear-plgpio";
                                reg = <0xb3000000 0x1000>;
+                               regmap = <&pinmux>;
                                #interrupt-cells = <1>;
                                interrupt-controller;
                                gpio-controller;
diff --git a/arch/arm/boot/dts/spear320s.dtsi b/arch/arm/boot/dts/spear320s.dtsi
new file mode 100644 (file)
index 0000000..133236d
--- /dev/null
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * DTS file for SPEAr320s SoC
+ *
+ * Copyright 2021 Herve Codina <herve.codina@bootlin.com>
+ */
+
+/include/ "spear320.dtsi"
+
+/ {
+       ahb {
+               apb {
+                       gpiopinctrl: gpio@b3000000 {
+                               /*
+                                * The "RM0321 SPEAr320s address and map
+                                * registers" document mentions interrupt 6
+                                * (NPGIO_INTR) for the PL_GPIO interrupt.
+                                */
+                               interrupts = <6>;
+                               interrupt-parent = <&shirq>;
+                       };
+               };
+       };
+};
index 68607e4..dc0bcc7 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/reset/stericsson,db8500-prcc-reset.h>
 #include <dt-bindings/mfd/dbx500-prcmu.h>
 #include <dt-bindings/arm/ux500_pm_domains.h>
 #include <dt-bindings/gpio/gpio.h>
                                #clock-cells = <2>;
                        };
 
+                       prcc_reset: prcc-reset-controller {
+                               #reset-cells = <2>;
+                       };
+
                        rtc_clk: rtc32k-clock {
                                #clock-cells = <0>;
                        };
                        clocks = <&prcc_kclk 3 3>, <&prcc_pclk 3 3>;
                        clock-names = "i2cclk", "apb_pclk";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+                       resets = <&prcc_reset DB8500_PRCC_3 DB8500_PRCC_3_RESET_I2C0>;
 
                        status = "disabled";
                };
                        clocks = <&prcc_kclk 1 2>, <&prcc_pclk 1 2>;
                        clock-names = "i2cclk", "apb_pclk";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+                       resets = <&prcc_reset DB8500_PRCC_1 DB8500_PRCC_1_RESET_I2C1>;
 
                        status = "disabled";
                };
                        clocks = <&prcc_kclk 1 6>, <&prcc_pclk 1 6>;
                        clock-names = "i2cclk", "apb_pclk";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+                       resets = <&prcc_reset DB8500_PRCC_1 DB8500_PRCC_1_RESET_I2C2>;
 
                        status = "disabled";
                };
                        clocks = <&prcc_kclk 2 0>, <&prcc_pclk 2 0>;
                        clock-names = "i2cclk", "apb_pclk";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+                       resets = <&prcc_reset DB8500_PRCC_2 DB8500_PRCC_2_RESET_I2C3>;
 
                        status = "disabled";
                };
                        clocks = <&prcc_kclk 1 9>, <&prcc_pclk 1 10>;
                        clock-names = "i2cclk", "apb_pclk";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+                       resets = <&prcc_reset DB8500_PRCC_1 DB8500_PRCC_1_RESET_I2C4>;
 
                        status = "disabled";
                };
                               <&dma 8 0 0x0>; /* Logical - MemToDev */
                        dma-names = "rx", "tx";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+                       resets = <&prcc_reset DB8500_PRCC_3 DB8500_PRCC_3_RESET_SSP0>;
 
                        status = "disabled";
                };
                               <&dma 9 0 0x0>; /* Logical - MemToDev */
                        dma-names = "rx", "tx";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+                       resets = <&prcc_reset DB8500_PRCC_3 DB8500_PRCC_3_RESET_SSP1>;
 
                        status = "disabled";
                };
                               <&dma 40 0 0x0>; /* Logical - MemToDev */
                        dma-names = "rx", "tx";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+                       resets = <&prcc_reset DB8500_PRCC_1 DB8500_PRCC_1_RESET_SPI3>;
 
                        status = "disabled";
                };
 
                        clocks = <&prcc_kclk 1 0>, <&prcc_pclk 1 0>;
                        clock-names = "uart", "apb_pclk";
+                       resets = <&prcc_reset DB8500_PRCC_1 DB8500_PRCC_1_RESET_UART0>;
 
                        status = "disabled";
                };
 
                        clocks = <&prcc_kclk 1 1>, <&prcc_pclk 1 1>;
                        clock-names = "uart", "apb_pclk";
+                       resets = <&prcc_reset DB8500_PRCC_1 DB8500_PRCC_1_RESET_UART1>;
 
                        status = "disabled";
                };
 
                        clocks = <&prcc_kclk 3 6>, <&prcc_pclk 3 6>;
                        clock-names = "uart", "apb_pclk";
+                       resets = <&prcc_reset DB8500_PRCC_3 DB8500_PRCC_3_RESET_UART2>;
 
                        status = "disabled";
                };
                        clocks = <&prcc_kclk 1 5>, <&prcc_pclk 1 5>;
                        clock-names = "sdi", "apb_pclk";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+                       resets = <&prcc_reset DB8500_PRCC_1 DB8500_PRCC_1_RESET_SDI0>;
 
                        status = "disabled";
                };
                        clocks = <&prcc_kclk 2 4>, <&prcc_pclk 2 6>;
                        clock-names = "sdi", "apb_pclk";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+                       resets = <&prcc_reset DB8500_PRCC_2 DB8500_PRCC_2_RESET_SDI1>;
 
                        status = "disabled";
                };
                        clocks = <&prcc_kclk 3 4>, <&prcc_pclk 3 4>;
                        clock-names = "sdi", "apb_pclk";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+                       resets = <&prcc_reset DB8500_PRCC_3 DB8500_PRCC_3_RESET_SDI2>;
 
                        status = "disabled";
                };
                        clocks = <&prcc_kclk 2 5>, <&prcc_pclk 2 7>;
                        clock-names = "sdi", "apb_pclk";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+                       resets = <&prcc_reset DB8500_PRCC_2 DB8500_PRCC_2_RESET_SDI3>;
 
                        status = "disabled";
                };
                        clocks = <&prcc_kclk 2 2>, <&prcc_pclk 2 4>;
                        clock-names = "sdi", "apb_pclk";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+                       resets = <&prcc_reset DB8500_PRCC_2 DB8500_PRCC_2_RESET_SDI4>;
 
                        status = "disabled";
                };
                        clocks = <&prcc_kclk 3 7>, <&prcc_pclk 3 7>;
                        clock-names = "sdi", "apb_pclk";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+                       resets = <&prcc_reset DB8500_PRCC_3 DB8500_PRCC_3_RESET_SDI5>;
 
                        status = "disabled";
                };
 
                        clocks = <&prcc_kclk 1 3>, <&prcc_pclk 1 3>;
                        clock-names = "msp", "apb_pclk";
+                       resets = <&prcc_reset DB8500_PRCC_1 DB8500_PRCC_1_RESET_MSP0>;
 
                        status = "disabled";
                };
 
                        clocks = <&prcc_kclk 1 4>, <&prcc_pclk 1 4>;
                        clock-names = "msp", "apb_pclk";
+                       resets = <&prcc_reset DB8500_PRCC_1 DB8500_PRCC_1_RESET_MSP1>;
 
                        status = "disabled";
                };
 
                        clocks = <&prcc_kclk 2 3>, <&prcc_pclk 2 5>;
                        clock-names = "msp", "apb_pclk";
+                       resets = <&prcc_reset DB8500_PRCC_2 DB8500_PRCC_2_RESET_MSP2>;
 
                        status = "disabled";
                };
 
                        clocks = <&prcc_kclk 1 10>, <&prcc_pclk 1 11>;
                        clock-names = "msp", "apb_pclk";
+                       resets = <&prcc_reset DB8500_PRCC_1 DB8500_PRCC_1_RESET_MSP3>;
 
                        status = "disabled";
                };
index 47bbf5a..1c0e5cf 100644 (file)
                #address-cells = <1>;
                #size-cells = <0>;
 
-               /* TODO: Memsic MMC328 magnetometer */
-               magnetometer@30 {
-                       compatible = "memsic,mmc328";
-                       reg = <0x30>;
-                       /* TODO: if you have the schematic, check if both voltages come from AUX2 */
-                       /* VDA 1.8 V */
-                       vda-supply = <&ab8500_ldo_aux2_reg>;
-                       /* VDD 1.8V */
-                       vdd-supply = <&ab8500_ldo_aux2_reg>;
-                       /* GPIO204 */
+               /* Yamaha YAS530 magnetometer */
+               magnetometer@2e {
+                       compatible = "yamaha,yas530";
+                       reg = <0x2e>;
+                       /* VDD 3V */
+                       vdd-supply = <&ab8500_ldo_aux1_reg>;
+                       /* IOVDD 1.8V */
+                       iovdd-supply = <&ab8500_ldo_aux2_reg>;
+                       /* GPIO204 COMPASS_RST_N */
                        reset-gpios = <&gpio6 12 GPIO_ACTIVE_LOW>;
                        pinctrl-names = "default";
-                       pinctrl-0 = <&mmc328_default>;
+                       pinctrl-0 = <&yas530_default>;
                };
                /* TODO: this should also be used by the NCP6914 Camera power management unit */
        };
                        };
                };
        };
+       /* Reset line for the Yamaha YAS530 magnetometer */
+       yas530 {
+               yas530_default: yas530_janice {
+                       janice_cfg1 {
+                               pins = "GPIO204_AF23";
+                               ste,config = <&gpio_out_hi>;
+                       };
+               };
+       };
        /* Flash and torch */
        flash {
                gpio_flash_default_mode: flash_default {
                        };
                };
        };
-       /* Reset line for the Memsic MMC328 magnetometer */
-       mmc328 {
-               mmc328_default: mmc328_gavini {
-                       gavini_cfg1 {
-                               pins = "GPIO204_AF23";
-                               ste,config = <&gpio_out_hi>;
-                       };
-               };
-       };
        /* Interrupt line for Invensense MPU3050 gyroscope */
        mpu3050 {
                mpu3050_default: mpu3050 {
index 075ac57..6435e09 100644 (file)
 
        display: display@1{
                /* Connect panel-ilitek-9341 to ltdc */
-               compatible = "st,sf-tc240t-9370-t";
+               compatible = "st,sf-tc240t-9370-t", "ilitek,ili9341";
                reg = <1>;
                spi-3wire;
                spi-max-frequency = <10000000>;
index 2ebafe2..3b65130 100644 (file)
 
        stusb1600_pins_a: stusb1600-0 {
                pins {
-                       pinmux = <STM32_PINMUX('I', 11, ANALOG)>;
+                       pinmux = <STM32_PINMUX('I', 11, GPIO)>;
                        bias-pull-up;
                };
        };
        };
 
        uart4_idle_pins_a: uart4-idle-0 {
-                  pins1 {
-                        pinmux = <STM32_PINMUX('G', 11, ANALOG)>; /* UART4_TX */
-                  };
-                  pins2 {
-                        pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
-                        bias-disable;
-                  };
+               pins1 {
+                       pinmux = <STM32_PINMUX('G', 11, ANALOG)>; /* UART4_TX */
+               };
+               pins2 {
+                       pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
+                       bias-disable;
+               };
        };
 
        uart4_sleep_pins_a: uart4-sleep-0 {
-                  pins {
+               pins {
                        pinmux = <STM32_PINMUX('G', 11, ANALOG)>, /* UART4_TX */
                                 <STM32_PINMUX('B', 2, ANALOG)>; /* UART4_RX */
-                   };
+               };
        };
 
        uart4_pins_b: uart4-1 {
                };
                pins2 {
                        pinmux = <STM32_PINMUX('E', 7, AF7)>; /* UART7_RX */
-                       bias-disable;
+                       bias-pull-up;
                };
        };
 
                };
                pins2 {
                        pinmux = <STM32_PINMUX('E', 7, AF7)>; /* UART7_RX */
-                       bias-disable;
+                       bias-pull-up;
                };
        };
 
                pins2 {
                        pinmux = <STM32_PINMUX('B', 12, AF8)>, /* USART3_RX */
                                 <STM32_PINMUX('I', 10, AF8)>; /* USART3_CTS_NSS */
-                       bias-disable;
+                       bias-pull-up;
                };
        };
 
                };
                pins3 {
                        pinmux = <STM32_PINMUX('B', 12, AF8)>; /* USART3_RX */
-                       bias-disable;
+                       bias-pull-up;
                };
        };
 
                pins2 {
                        pinmux = <STM32_PINMUX('B', 12, AF8)>, /* USART3_RX */
                                 <STM32_PINMUX('B', 13, AF7)>; /* USART3_CTS_NSS */
-                       bias-disable;
+                       bias-pull-up;
                };
        };
 
                };
                pins3 {
                        pinmux = <STM32_PINMUX('B', 12, AF8)>; /* USART3_RX */
-                       bias-disable;
+                       bias-pull-up;
                };
        };
 
diff --git a/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-ctouch2-of10.dts b/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-ctouch2-of10.dts
new file mode 100644 (file)
index 0000000..2a28292
--- /dev/null
@@ -0,0 +1,132 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (c) STMicroelectronics 2019 - All Rights Reserved
+ * Copyright (c) 2020 Engicam srl
+ * Copyright (c) 2020 Amarula Solutons(India)
+ */
+
+/dts-v1/;
+#include "stm32mp157.dtsi"
+#include "stm32mp157a-icore-stm32mp1.dtsi"
+#include "stm32mp15-pinctrl.dtsi"
+#include "stm32mp15xxaa-pinctrl.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+       model = "Engicam i.Core STM32MP1 C.TOUCH 2.0 10.1\" Open Frame";
+       compatible = "engicam,icore-stm32mp1-ctouch2-of10",
+                    "engicam,icore-stm32mp1", "st,stm32mp157";
+
+       aliases {
+               serial0 = &uart4;
+       };
+
+       backlight: backlight {
+               compatible = "gpio-backlight";
+               gpios = <&gpiod 13 GPIO_ACTIVE_HIGH>;
+               default-on;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       panel {
+               compatible = "ampire,am-1280800n3tzqw-t00h";
+               backlight = <&backlight>;
+               power-supply = <&v3v3>;
+
+               port {
+                       panel_in_lvds: endpoint {
+                               remote-endpoint = <&bridge_out>;
+                       };
+               };
+       };
+};
+
+&dsi {
+       status = "okay";
+       phy-dsi-supply = <&reg18>;
+
+       ports {
+               port@0 {
+                       reg = <0>;
+                       dsi_in: endpoint {
+                               remote-endpoint = <&ltdc_ep0_out>;
+                       };
+               };
+
+               port@1 {
+                       reg = <1>;
+                       dsi_out: endpoint {
+                               remote-endpoint = <&bridge_in>;
+                       };
+               };
+       };
+};
+
+&i2c6 {
+       i2c-scl-falling-time-ns = <20>;
+       i2c-scl-rising-time-ns = <185>;
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&i2c6_pins_a>;
+       pinctrl-1 = <&i2c6_sleep_pins_a>;
+       status = "okay";
+
+       bridge@2c {
+               compatible = "ti,sn65dsi84";
+               reg = <0x2c>;
+               enable-gpios = <&gpiof 15 GPIO_ACTIVE_HIGH>;
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               bridge_in: endpoint {
+                                       remote-endpoint = <&dsi_out>;
+                                       data-lanes = <1 2>;
+                               };
+                       };
+
+                       port@2 {
+                               reg = <2>;
+                               bridge_out: endpoint {
+                                       remote-endpoint = <&panel_in_lvds>;
+                               };
+                       };
+               };
+       };
+};
+
+&ltdc {
+       status = "okay";
+
+       port {
+               ltdc_ep0_out: endpoint@0 {
+                       reg = <0>;
+                       remote-endpoint = <&dsi_in>;
+               };
+       };
+};
+
+&sdmmc1 {
+       bus-width = <4>;
+       disable-wp;
+       pinctrl-names = "default", "opendrain", "sleep";
+       pinctrl-0 = <&sdmmc1_b4_pins_a>;
+       pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
+       pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
+       st,neg-edge;
+       vmmc-supply = <&v3v3>;
+       status = "okay";
+};
+
+&uart4 {
+       pinctrl-names = "default", "sleep", "idle";
+       pinctrl-0 = <&uart4_pins_a>;
+       pinctrl-1 = <&uart4_sleep_pins_a>;
+       pinctrl-2 = <&uart4_idle_pins_a>;
+       status = "okay";
+};
index ec9f1d1..a797eaa 100644 (file)
        chosen {
                stdout-path = "serial0:115200n8";
        };
+
+       backlight: backlight {
+               compatible = "gpio-backlight";
+               gpios = <&gpiod 13 GPIO_ACTIVE_HIGH>;
+               default-on;
+       };
+
+       panel {
+               compatible = "yes-optoelectronics,ytc700tlag-05-201c";
+               backlight = <&backlight>;
+               power-supply = <&v3v3>;
+
+               port {
+                       panel_out_bridge: endpoint {
+                               remote-endpoint = <&bridge_out_panel>;
+                       };
+               };
+       };
+};
+
+&dsi {
+       status = "okay";
+       phy-dsi-supply = <&reg18>;
+
+       ports {
+               port@0 {
+                       reg = <0>;
+                       dsi_in_ltdc: endpoint {
+                               remote-endpoint = <&ltdc_out_dsi>;
+                       };
+               };
+
+               port@1 {
+                       reg = <1>;
+                       dsi_out_bridge: endpoint {
+                               remote-endpoint = <&bridge_in_dsi>;
+                       };
+               };
+       };
+};
+
+&i2c6 {
+       i2c-scl-falling-time-ns = <20>;
+       i2c-scl-rising-time-ns = <185>;
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&i2c6_pins_a>;
+       pinctrl-1 = <&i2c6_sleep_pins_a>;
+       status = "okay";
+
+       bridge@2c {
+               compatible = "ti,sn65dsi84";
+               reg = <0x2c>;
+               enable-gpios = <&gpiof 15 GPIO_ACTIVE_HIGH>;
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               bridge_in_dsi: endpoint {
+                                       remote-endpoint = <&dsi_out_bridge>;
+                                       data-lanes = <1 2>;
+                               };
+                       };
+
+                       port@2 {
+                               reg = <2>;
+                               bridge_out_panel: endpoint {
+                                       remote-endpoint = <&panel_out_bridge>;
+                               };
+                       };
+               };
+       };
+};
+
+&ltdc {
+       status = "okay";
+
+       port {
+               ltdc_out_dsi: endpoint@0 {
+                       reg = <0>;
+                       remote-endpoint = <&dsi_in_ltdc>;
+               };
+       };
 };
 
 &sdmmc1 {
index 5c5b1dd..e222d2d 100644 (file)
 &usbphyc {
        status = "okay";
 };
+
+&usbphyc_port0 {
+       st,tune-hs-dc-level = <2>;
+       st,enable-fs-rftime-tuning;
+       st,enable-hs-rftime-reduction;
+       st,trim-hs-current = <15>;
+       st,trim-hs-impedance = <1>;
+       st,tune-squelch-level = <3>;
+       st,tune-hs-rx-offset = <2>;
+       st,no-lsfs-sc;
+};
+
+&usbphyc_port1 {
+       st,tune-hs-dc-level = <2>;
+       st,enable-fs-rftime-tuning;
+       st,enable-hs-rftime-reduction;
+       st,trim-hs-current = <15>;
+       st,trim-hs-impedance = <1>;
+       st,tune-squelch-level = <3>;
+       st,tune-hs-rx-offset = <2>;
+       st,no-lsfs-sc;
+};
index 48beed0..6caeb44 100644 (file)
 
 &usbphyc_port0 {
        phy-supply = <&vdd_usb>;
+       st,tune-hs-dc-level = <2>;
+       st,enable-fs-rftime-tuning;
+       st,enable-hs-rftime-reduction;
+       st,trim-hs-current = <15>;
+       st,trim-hs-impedance = <1>;
+       st,tune-squelch-level = <3>;
+       st,tune-hs-rx-offset = <2>;
+       st,no-lsfs-sc;
 };
 
 &usbphyc_port1 {
        phy-supply = <&vdd_usb>;
+       st,tune-hs-dc-level = <2>;
+       st,enable-fs-rftime-tuning;
+       st,enable-hs-rftime-reduction;
+       st,trim-hs-current = <15>;
+       st,trim-hs-impedance = <1>;
+       st,tune-squelch-level = <3>;
+       st,tune-hs-rx-offset = <2>;
+       st,no-lsfs-sc;
 };
 
 &vrefbuf {
index 8e8634f..d5c7b79 100644 (file)
@@ -52,8 +52,9 @@
 
                sw4 {
                        label = "power";
-                       linux,code = <BTN_0>;
+                       linux,code = <KEY_POWER>;
                        gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+                       wakeup-source;
                };
        };
 
index f0e591e..cd9f655 100644 (file)
                ethernet1 = &sdiowifi;
        };
 
+       cec-gpio {
+               compatible = "cec-gpio";
+               cec-gpios = <&pio 0 14 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; /* PA14 */
+               hdmi-phandle = <&hdmi>;
+       };
+
        chosen {
                stdout-path = "serial0:115200n8";
        };
                };
        };
 
-       wifi_pwrseq: wifi_pwrseq {
-               compatible = "mmc-pwrseq-simple";
-               reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
-               clocks = <&rtc 1>;
-               clock-names = "ext_clock";
+       r-gpio-keys {
+               compatible = "gpio-keys";
+
+               power {
+                       label = "power";
+                       linux,code = <KEY_POWER>;
+                       gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+                       wakeup-source;
+               };
        };
 
        sound_spdif {
                compatible = "linux,spdif-dit";
        };
 
-       r-gpio-keys {
-               compatible = "gpio-keys";
-
-               power {
-                       label = "power";
-                       linux,code = <KEY_POWER>;
-                       gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
-                       wakeup-source;
-               };
+       wifi_pwrseq: wifi_pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
+               clocks = <&rtc 1>;
+               clock-names = "ext_clock";
        };
 };
 
index c7c3e7d..fc45d5a 100644 (file)
@@ -81,6 +81,7 @@
                        label = "k1";
                        linux,code = <KEY_POWER>;
                        gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+                       wakeup-source;
                };
        };
 };
index 597c425..9daffd9 100644 (file)
@@ -99,8 +99,9 @@
 
                sw4 {
                        label = "sw4";
-                       linux,code = <BTN_0>;
+                       linux,code = <KEY_POWER>;
                        gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+                       wakeup-source;
                };
        };
 
index 5aff8ec..90f75fa 100644 (file)
@@ -91,8 +91,9 @@
 
                sw4 {
                        label = "sw4";
-                       linux,code = <BTN_0>;
+                       linux,code = <KEY_POWER>;
                        gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+                       wakeup-source;
                };
        };
 };
index ae4f933..845f252 100644 (file)
        compatible = "allwinner,sun8i-h3-de2-clk";
 };
 
+&mbus {
+       compatible = "allwinner,sun8i-h3-mbus";
+};
+
 &mmc0 {
        compatible = "allwinner,sun7i-a20-mmc";
        clocks = <&ccu CLK_BUS_MMC0>,
index 1d87fc0..f10436b 100644 (file)
                        reg-io-width = <1>;
                        interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&ccu CLK_BUS_HDMI0>, <&ccu CLK_HDMI_SLOW>,
-                                <&ccu CLK_HDMI>;
-                       clock-names = "iahb", "isfr", "tmds";
+                                <&ccu CLK_HDMI>, <&rtc 0>;
+                       clock-names = "iahb", "isfr", "tmds", "cec";
                        resets = <&ccu RST_BUS_HDMI1>;
                        reset-names = "ctrl";
                        phys = <&hdmi_phy>;
index 7a6af54..d03f585 100644 (file)
@@ -82,8 +82,9 @@
 
                sw4 {
                        label = "power";
-                       linux,code = <BTN_0>;
+                       linux,code = <KEY_POWER>;
                        gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+                       wakeup-source;
                };
        };
 
index c7428df..4aeca9e 100644 (file)
                };
 
                mbus: dram-controller@1c62000 {
-                       compatible = "allwinner,sun8i-h3-mbus";
-                       reg = <0x01c62000 0x1000>;
-                       clocks = <&ccu CLK_MBUS>;
+                       /* compatible is in per SoC .dtsi file */
+                       reg = <0x01c62000 0x1000>,
+                             <0x01c63000 0x1000>;
+                       reg-names = "mbus", "dram";
+                       clocks = <&ccu CLK_MBUS>,
+                                <&ccu CLK_DRAM>,
+                                <&ccu CLK_BUS_DRAM>;
+                       clock-names = "mbus", "dram", "bus";
                        #address-cells = <1>;
                        #size-cells = <1>;
                        dma-ranges = <0x00000000 0x40000000 0xc0000000>;
                        reg-io-width = <1>;
                        interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_DDC>,
-                                <&ccu CLK_HDMI>;
-                       clock-names = "iahb", "isfr", "tmds";
+                                <&ccu CLK_HDMI>, <&rtc 0>;
+                       clock-names = "iahb", "isfr", "tmds", "cec";
                        resets = <&ccu RST_BUS_HDMI1>;
                        reset-names = "ctrl";
                        phys = <&hdmi_phy>;
index c44fd72..9e14fe5 100644 (file)
@@ -49,6 +49,7 @@
                        label = "power";
                        linux,code = <KEY_POWER>;
                        gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
+                       wakeup-source;
                };
        };
 
index 043ddd7..1f9686c 100644 (file)
                                                reg = <5>;
                                                label = "dsa";
                                                link = <&switch2port9>;
-                                               phy-mode = "rgmii-txid";
+                                               phy-mode = "1000base-x";
 
                                                fixed-link {
                                                        speed = <1000>;
                                                reg = <0>;
                                                label = "lan6";
                                                phy-handle = <&switch2phy0>;
+                                               phy-mode = "sgmii";
                                        };
 
                                        port@1 {
                                                reg = <1>;
                                                label = "lan7";
                                                phy-handle = <&switch2phy1>;
+                                               phy-mode = "sgmii";
                                        };
 
                                        port@2 {
                                        switch2port9: port@9 {
                                                reg = <9>;
                                                label = "dsa";
-                                               phy-mode = "rgmii-txid";
+                                               phy-mode = "1000base-x";
                                                link = <&switch1port5
                                                        &switch0port5>;
 
index a96d9d2..8fa5c06 100644 (file)
@@ -37,3 +37,4 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-orangepi-one-plus.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64-model-b.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-tanix-tx6.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-tanix-tx6-mini.dtb
index 34e67f5..63571df 100644 (file)
@@ -15,6 +15,7 @@
 / {
        model = "Pinebook";
        compatible = "pine64,pinebook", "allwinner,sun50i-a64";
+       chassis-type = "laptop";
 
        aliases {
                serial0 = &uart0;
index 5b44a97..8784711 100644 (file)
@@ -12,6 +12,8 @@
 #include <dt-bindings/pwm/pwm.h>
 
 / {
+       chassis-type = "handset";
+
        aliases {
                ethernet0 = &rtl8723cs;
                serial0 = &uart0;
index adb0b28..0a5607f 100644 (file)
@@ -16,6 +16,7 @@
 / {
        model = "PineTab, Development Sample";
        compatible = "pine64,pinetab", "allwinner,sun50i-a64";
+       chassis-type = "tablet";
 
        aliases {
                serial0 = &uart0;
index aef571a..aff0660 100644 (file)
@@ -14,6 +14,7 @@
 / {
        model = "Olimex A64 Teres-I";
        compatible = "olimex,a64-teres-i", "allwinner,sun50i-a64";
+       chassis-type = "laptop";
 
        aliases {
                serial0 = &uart0;
index 5ba3790..de77c87 100644 (file)
 
                mbus: dram-controller@1c62000 {
                        compatible = "allwinner,sun50i-a64-mbus";
-                       reg = <0x01c62000 0x1000>;
-                       clocks = <&ccu 112>;
+                       reg = <0x01c62000 0x1000>,
+                             <0x01c63000 0x1000>;
+                       reg-names = "mbus", "dram";
+                       clocks = <&ccu CLK_MBUS>,
+                                <&ccu CLK_DRAM>,
+                                <&ccu CLK_BUS_DRAM>;
+                       clock-names = "mbus", "dram", "bus";
+                       interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <1>;
                        dma-ranges = <0x00000000 0x40000000 0xc0000000>;
                        reg-io-width = <1>;
                        interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_DDC>,
-                                <&ccu CLK_HDMI>;
-                       clock-names = "iahb", "isfr", "tmds";
+                                <&ccu CLK_HDMI>, <&rtc 0>;
+                       clock-names = "iahb", "isfr", "tmds", "cec";
                        resets = <&ccu RST_BUS_HDMI1>;
                        reset-names = "ctrl";
                        phys = <&hdmi_phy>;
index 9988e87..a56fae7 100644 (file)
        compatible = "allwinner,sun50i-h5-de2-clk";
 };
 
+&mbus {
+       compatible = "allwinner,sun50i-h5-mbus";
+};
+
 &mmc0 {
        compatible = "allwinner,sun50i-h5-mmc",
                     "allwinner,sun50i-a64-mmc";
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6-mini.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6-mini.dts
new file mode 100644 (file)
index 0000000..08d8416
--- /dev/null
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+// Copyright (c) 2021 Jernej Skrabec <jernej.skrabec@gmail.com>
+
+/dts-v1/;
+
+#include "sun50i-h6-tanix.dtsi"
+
+/ {
+       model = "Tanix TX6 mini";
+       compatible = "oranth,tanix-tx6-mini", "allwinner,sun50i-h6";
+};
+
+&r_ir {
+       linux,rc-map-name = "rc-tanix-tx3mini";
+};
index 8f2a80f..9a38ff9 100644 (file)
 
 /dts-v1/;
 
-#include "sun50i-h6.dtsi"
-#include "sun50i-h6-cpu-opp.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
+#include "sun50i-h6-tanix.dtsi"
 
 / {
        model = "Tanix TX6";
        compatible = "oranth,tanix-tx6", "allwinner,sun50i-h6";
-
-       aliases {
-               serial0 = &uart0;
-       };
-
-       chosen {
-               stdout-path = "serial0:115200n8";
-       };
-
-       connector {
-               compatible = "hdmi-connector";
-               ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
-               type = "a";
-
-               port {
-                       hdmi_con_in: endpoint {
-                               remote-endpoint = <&hdmi_out_con>;
-                       };
-               };
-       };
-
-       reg_vcc1v8: regulator-vcc1v8 {
-               compatible = "regulator-fixed";
-               regulator-name = "vcc1v8";
-               regulator-min-microvolt = <1800000>;
-               regulator-max-microvolt = <1800000>;
-       };
-
-       reg_vcc3v3: regulator-vcc3v3 {
-               compatible = "regulator-fixed";
-               regulator-name = "vcc3v3";
-               regulator-min-microvolt = <3300000>;
-               regulator-max-microvolt = <3300000>;
-       };
-
-       reg_vdd_cpu_gpu: regulator-vdd-cpu-gpu {
-               compatible = "regulator-fixed";
-               regulator-name = "vdd-cpu-gpu";
-               regulator-min-microvolt = <1135000>;
-               regulator-max-microvolt = <1135000>;
-       };
-};
-
-&cpu0 {
-       cpu-supply = <&reg_vdd_cpu_gpu>;
-};
-
-&de {
-       status = "okay";
-};
-
-&dwc3 {
-       status = "okay";
-};
-
-&ehci0 {
-       status = "okay";
-};
-
-&ehci3 {
-       status = "okay";
-};
-
-&gpu {
-       mali-supply = <&reg_vdd_cpu_gpu>;
-       status = "okay";
-};
-
-&hdmi {
-       status = "okay";
-};
-
-&hdmi_out {
-       hdmi_out_con: endpoint {
-               remote-endpoint = <&hdmi_con_in>;
-       };
-};
-
-&mmc0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&mmc0_pins>;
-       vmmc-supply = <&reg_vcc3v3>;
-       cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
-       bus-width = <4>;
-       status = "okay";
-};
-
-&mmc2 {
-       vmmc-supply = <&reg_vcc3v3>;
-       vqmmc-supply = <&reg_vcc1v8>;
-       bus-width = <8>;
-       non-removable;
-       cap-mmc-hw-reset;
-       mmc-hs200-1_8v;
-       status = "okay";
-};
-
-&ohci0 {
-       status = "okay";
-};
-
-&ohci3 {
-       status = "okay";
-};
-
-&pio {
-       vcc-pc-supply = <&reg_vcc1v8>;
-       vcc-pd-supply = <&reg_vcc3v3>;
-       vcc-pg-supply = <&reg_vcc1v8>;
 };
 
 &r_ir {
        linux,rc-map-name = "rc-tanix-tx5max";
-       status = "okay";
 };
 
-&uart0 {
+&uart1 {
        pinctrl-names = "default";
-       pinctrl-0 = <&uart0_ph_pins>;
+       pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
+       uart-has-rtscts;
        status = "okay";
-};
 
-&usb2otg {
-       dr_mode = "host";
-       status = "okay";
-};
-
-&usb2phy {
-       status = "okay";
-};
-
-&usb3phy {
-       status = "okay";
+       bluetooth {
+               compatible = "realtek,rtl8822cs-bt";
+               device-wake-gpios = <&r_pio 1 2 GPIO_ACTIVE_HIGH>; /* PM2 */
+               host-wake-gpios = <&r_pio 1 1 GPIO_ACTIVE_HIGH>; /* PM1 */
+               enable-gpios = <&r_pio 1 4 GPIO_ACTIVE_HIGH>; /* PM4 */
+       };
 };
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi
new file mode 100644 (file)
index 0000000..edb71e4
--- /dev/null
@@ -0,0 +1,189 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+// Copyright (c) 2019 Jernej Skrabec <jernej.skrabec@siol.net>
+
+/dts-v1/;
+
+#include "sun50i-h6.dtsi"
+#include "sun50i-h6-cpu-opp.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       connector {
+               compatible = "hdmi-connector";
+               ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
+               type = "a";
+
+               port {
+                       hdmi_con_in: endpoint {
+                               remote-endpoint = <&hdmi_out_con>;
+                       };
+               };
+       };
+
+       /* used for FD650 LED display driver */
+       i2c {
+               compatible = "i2c-gpio";
+               sda-gpios = <&pio 7 6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; /* PH6 */
+               scl-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; /* PH5 */
+               i2c-gpio,delay-us = <5>;
+       };
+
+       reg_vcc1v8: regulator-vcc1v8 {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc1v8";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+       };
+
+       reg_vcc3v3: regulator-vcc3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
+       reg_vdd_cpu_gpu: regulator-vdd-cpu-gpu {
+               compatible = "regulator-fixed";
+               regulator-name = "vdd-cpu-gpu";
+               regulator-min-microvolt = <1135000>;
+               regulator-max-microvolt = <1135000>;
+       };
+
+       sound-spdif {
+               compatible = "simple-audio-card";
+               simple-audio-card,name = "sun50i-h6-spdif";
+
+               simple-audio-card,cpu {
+                       sound-dai = <&spdif>;
+               };
+
+               simple-audio-card,codec {
+                       sound-dai = <&spdif_out>;
+               };
+       };
+
+       spdif_out: spdif-out {
+               #sound-dai-cells = <0>;
+               compatible = "linux,spdif-dit";
+       };
+
+       wifi_pwrseq: wifi-pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               clocks = <&rtc 1>;
+               clock-names = "ext_clock";
+               reset-gpios = <&r_pio 1 3 GPIO_ACTIVE_LOW>; /* PM3 */
+       };
+};
+
+&cpu0 {
+       cpu-supply = <&reg_vdd_cpu_gpu>;
+};
+
+&de {
+       status = "okay";
+};
+
+&dwc3 {
+       status = "okay";
+};
+
+&ehci0 {
+       status = "okay";
+};
+
+&ehci3 {
+       status = "okay";
+};
+
+&gpu {
+       mali-supply = <&reg_vdd_cpu_gpu>;
+       status = "okay";
+};
+
+&hdmi {
+       status = "okay";
+};
+
+&hdmi_out {
+       hdmi_out_con: endpoint {
+               remote-endpoint = <&hdmi_con_in>;
+       };
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins>;
+       vmmc-supply = <&reg_vcc3v3>;
+       cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
+       bus-width = <4>;
+       status = "okay";
+};
+
+&mmc1 {
+       vmmc-supply = <&reg_vcc3v3>;
+       vqmmc-supply = <&reg_vcc1v8>;
+       mmc-pwrseq = <&wifi_pwrseq>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+};
+
+&mmc2 {
+       vmmc-supply = <&reg_vcc3v3>;
+       vqmmc-supply = <&reg_vcc1v8>;
+       bus-width = <8>;
+       non-removable;
+       cap-mmc-hw-reset;
+       mmc-hs200-1_8v;
+       status = "okay";
+};
+
+&ohci0 {
+       status = "okay";
+};
+
+&ohci3 {
+       status = "okay";
+};
+
+&pio {
+       vcc-pc-supply = <&reg_vcc1v8>;
+       vcc-pd-supply = <&reg_vcc3v3>;
+       vcc-pg-supply = <&reg_vcc1v8>;
+};
+
+&r_ir {
+       status = "okay";
+};
+
+&spdif {
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_ph_pins>;
+       status = "okay";
+};
+
+&usb2otg {
+       dr_mode = "host";
+       status = "okay";
+};
+
+&usb2phy {
+       status = "okay";
+};
+
+&usb3phy {
+       status = "okay";
+};
index 46ed529..fbe94ab 100644 (file)
                        };
                };
 
+               video-codec-g2@1c00000 {
+                       compatible = "allwinner,sun50i-h6-vpu-g2";
+                       reg = <0x01c00000 0x1000>;
+                       interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_VP9>, <&ccu CLK_VP9>;
+                       clock-names = "bus", "mod";
+                       resets = <&ccu RST_BUS_VP9>;
+               };
+
                video-codec@1c0e000 {
                        compatible = "allwinner,sun50i-h6-video-engine";
                        reg = <0x01c0e000 0x2000>;
index f9b4a39..bbc3db4 100644 (file)
                };
 
                partition@200000 {
-                       label = "env";
-                       reg = <0x200000 0x40000>;
-               };
-
-               partition@240000 {
-                       label = "dtb";
-                       reg = <0x240000 0x40000>;
-               };
-
-               partition@280000 {
-                       label = "kernel";
-                       reg = <0x280000 0x2000000>;
-               };
-
-               partition@2280000 {
-                       label = "misc";
-                       reg = <0x2280000 0x2000000>;
-               };
-
-               partition@4280000 {
-                       label = "rootfs";
-                       reg = <0x4280000 0x3bd80000>;
+                       label = "root";
+                       reg = <0x200000 0x3fe00000>;
                };
        };
 };
index 00c6f53..517519e 100644 (file)
@@ -58,7 +58,7 @@
                secure-monitor = <&sm>;
        };
 
-       gpu_opp_table: gpu-opp-table {
+       gpu_opp_table: opp-table-gpu {
                compatible = "operating-points-v2";
 
                opp-124999998 {
                        status = "disabled";
                };
 
-               thermal-zones {
-                       cpu_thermal: cpu-thermal {
-                               polling-delay = <1000>;
-                               polling-delay-passive = <100>;
-                               thermal-sensors = <&cpu_temp>;
-
-                               trips {
-                                       cpu_passive: cpu-passive {
-                                               temperature = <85000>; /* millicelsius */
-                                               hysteresis = <2000>; /* millicelsius */
-                                               type = "passive";
-                                       };
-
-                                       cpu_hot: cpu-hot {
-                                               temperature = <95000>; /* millicelsius */
-                                               hysteresis = <2000>; /* millicelsius */
-                                               type = "hot";
-                                       };
-
-                                       cpu_critical: cpu-critical {
-                                               temperature = <110000>; /* millicelsius */
-                                               hysteresis = <2000>; /* millicelsius */
-                                               type = "critical";
-                                       };
-                               };
-                       };
-
-                       ddr_thermal: ddr-thermal {
-                               polling-delay = <1000>;
-                               polling-delay-passive = <100>;
-                               thermal-sensors = <&ddr_temp>;
-
-                               trips {
-                                       ddr_passive: ddr-passive {
-                                               temperature = <85000>; /* millicelsius */
-                                               hysteresis = <2000>; /* millicelsius */
-                                               type = "passive";
-                                       };
-
-                                       ddr_critical: ddr-critical {
-                                               temperature = <110000>; /* millicelsius */
-                                               hysteresis = <2000>; /* millicelsius */
-                                               type = "critical";
-                                       };
-                               };
-
-                               cooling-maps {
-                                       map {
-                                               trip = <&ddr_passive>;
-                                               cooling-device = <&mali THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
-                                       };
-                               };
-                       };
-               };
-
                ethmac: ethernet@ff3f0000 {
                        compatible = "amlogic,meson-g12a-dwmac",
                                     "snps,dwmac-3.70a",
                };
        };
 
+       thermal-zones {
+               cpu_thermal: cpu-thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       thermal-sensors = <&cpu_temp>;
+
+                       trips {
+                               cpu_passive: cpu-passive {
+                                       temperature = <85000>; /* millicelsius */
+                                       hysteresis = <2000>; /* millicelsius */
+                                       type = "passive";
+                               };
+
+                               cpu_hot: cpu-hot {
+                                       temperature = <95000>; /* millicelsius */
+                                       hysteresis = <2000>; /* millicelsius */
+                                       type = "hot";
+                               };
+
+                               cpu_critical: cpu-critical {
+                                       temperature = <110000>; /* millicelsius */
+                                       hysteresis = <2000>; /* millicelsius */
+                                       type = "critical";
+                               };
+                       };
+               };
+
+               ddr_thermal: ddr-thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       thermal-sensors = <&ddr_temp>;
+
+                       trips {
+                               ddr_passive: ddr-passive {
+                                       temperature = <85000>; /* millicelsius */
+                                       hysteresis = <2000>; /* millicelsius */
+                                       type = "passive";
+                               };
+
+                               ddr_critical: ddr-critical {
+                                       temperature = <110000>; /* millicelsius */
+                                       hysteresis = <2000>; /* millicelsius */
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               map {
+                                       trip = <&ddr_passive>;
+                                       cooling-device = <&mali THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                               };
+                       };
+               };
+       };
+
        timer {
                compatible = "arm,armv8-timer";
                interrupts = <GIC_PPI 13
index e8a00a2..3e968b2 100644 (file)
        pinctrl-0 = <&nor_pins>;
        pinctrl-names = "default";
 
-       mx25u64: spi-flash@0 {
+       mx25u64: flash@0 {
                #address-cells = <1>;
                #size-cells = <1>;
                compatible = "mxicy,mx25u6435f", "jedec,spi-nor";
index a350fee..94dafb9 100644 (file)
@@ -6,6 +6,8 @@
  */
 
 #include "meson-gxbb.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
 
 / {
        aliases {
        leds {
                compatible = "gpio-leds";
 
-               led-system {
-                       label = "wetek-play:system-status";
+               led-power {
+                       /* red in suspend or power-off */
+                       color = <LED_COLOR_ID_BLUE>;
+                       function = LED_FUNCTION_POWER;
                        gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                        panic-indicator;
@@ -64,6 +68,7 @@
                regulator-name = "VDDIO_AO18";
                regulator-min-microvolt = <1800000>;
                regulator-max-microvolt = <1800000>;
+               regulator-always-on;
        };
 
        vcc_3v3: regulator-vcc_3v3 {
        status = "okay";
        pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
        pinctrl-names = "default";
+       hdmi-supply = <&vddio_ao18>;
 };
 
 &hdmi_tx_tmds_port {
index eb7f5a3..ff906be 100644 (file)
@@ -8,6 +8,7 @@
 /dts-v1/;
 
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/sound/meson-aiu.h>
 
 #include "meson-gxl-s805x.dtsi"
 
                ethernet0 = &ethmac;
        };
 
+       au2: analog-amplifier {
+               compatible = "simple-audio-amplifier";
+               sound-name-prefix = "AU2";
+               VCC-supply = <&vcc_5v>;
+               enable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;
+       };
+
        chosen {
                stdout-path = "serial0:115200n8";
        };
                regulator-max-microvolt = <3300000>;
        };
 
+       vcc_5v: regulator-vcc-5v {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC_5V";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+       };
+
+
        emmc_pwrseq: emmc-pwrseq {
                compatible = "mmc-pwrseq-emmc";
                reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
                clocks = <&wifi32k>;
                clock-names = "ext_clock";
        };
+
+       sound {
+               compatible = "amlogic,gx-sound-card";
+               model = "GXL-P241";
+               audio-aux-devs = <&au2>;
+               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>;
+               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>;
+                       };
+
+                       codec-1 {
+                               sound-dai = <&aiu AIU_ACODEC CTRL_I2S>;
+                       };
+               };
+
+               dai-link-2 {
+                       sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
+
+                       codec-0 {
+                               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";
 };
 
 &cec_AO {
        status = "okay";
        pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
        pinctrl-names = "default";
+       hdmi-supply = <&vcc_5v>;
 };
 
 &hdmi_tx_tmds_port {
        status = "okay";
        dr_mode = "host";
 };
+
+&usb2_phy0 {
+       phy-supply = <&vcc_5v>;
+};
index 5779e70..0bd1e98 100644 (file)
        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";
 };
index cbbd701..c0510c2 100644 (file)
@@ -1,2 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_APPLE) += t8103-j274.dtb
+dtb-$(CONFIG_ARCH_APPLE) += t8103-j293.dtb
+dtb-$(CONFIG_ARCH_APPLE) += t8103-j313.dtb
+dtb-$(CONFIG_ARCH_APPLE) += t8103-j456.dtb
+dtb-$(CONFIG_ARCH_APPLE) += t8103-j457.dtb
index 33a80f9..2cd429e 100644 (file)
 /dts-v1/;
 
 #include "t8103.dtsi"
+#include "t8103-jxxx.dtsi"
 
 / {
        compatible = "apple,j274", "apple,t8103", "apple,arm-platform";
        model = "Apple Mac mini (M1, 2020)";
 
        aliases {
-               serial0 = &serial0;
                ethernet0 = &ethernet0;
        };
-
-       chosen {
-               #address-cells = <2>;
-               #size-cells = <2>;
-               ranges;
-
-               stdout-path = "serial0";
-
-               framebuffer0: framebuffer@0 {
-                       compatible = "apple,simple-framebuffer", "simple-framebuffer";
-                       reg = <0 0 0 0>; /* To be filled by loader */
-                       /* Format properties will be added by loader */
-                       status = "disabled";
-               };
-       };
-
-       memory@800000000 {
-               device_type = "memory";
-               reg = <0x8 0 0x2 0>; /* To be filled by loader */
-       };
-};
-
-&serial0 {
-       status = "okay";
 };
 
 /*
@@ -50,9 +26,6 @@
  * on-board devices and properties that are populated by the bootloader
  * (such as MAC addresses).
  */
-&port00 {
-       bus-range = <1 1>;
-};
 
 &port01 {
        bus-range = <2 2>;
 
 &port02 {
        bus-range = <3 3>;
-       ethernet0: pci@0,0 {
+       ethernet0: ethernet@0,0 {
                reg = <0x30000 0x0 0x0 0x0 0x0>;
                /* To be filled by the loader */
                local-mac-address = [00 10 18 00 00 00];
        };
 };
+
+&i2c2 {
+       status = "okay";
+};
diff --git a/arch/arm64/boot/dts/apple/t8103-j293.dts b/arch/arm64/boot/dts/apple/t8103-j293.dts
new file mode 100644 (file)
index 0000000..49cdf4b
--- /dev/null
@@ -0,0 +1,41 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * Apple MacBook Pro (13-inch, M1, 2020)
+ *
+ * target-type: J293
+ *
+ * Copyright The Asahi Linux Contributors
+ */
+
+/dts-v1/;
+
+#include "t8103.dtsi"
+#include "t8103-jxxx.dtsi"
+
+/ {
+       compatible = "apple,j293", "apple,t8103", "apple,arm-platform";
+       model = "Apple MacBook Pro (13-inch, M1, 2020)";
+};
+
+/*
+ * Remove unused PCIe ports and disable the associated DARTs.
+ */
+
+&pcie0_dart_1 {
+       status = "disabled";
+};
+
+&pcie0_dart_2 {
+       status = "disabled";
+};
+
+/delete-node/ &port01;
+/delete-node/ &port02;
+
+&i2c2 {
+       status = "okay";
+};
+
+&i2c4 {
+       status = "okay";
+};
diff --git a/arch/arm64/boot/dts/apple/t8103-j313.dts b/arch/arm64/boot/dts/apple/t8103-j313.dts
new file mode 100644 (file)
index 0000000..b0ebb45
--- /dev/null
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * Apple MacBook Air (M1, 2020)
+ *
+ * target-type: J313
+ *
+ * Copyright The Asahi Linux Contributors
+ */
+
+/dts-v1/;
+
+#include "t8103.dtsi"
+#include "t8103-jxxx.dtsi"
+
+/ {
+       compatible = "apple,j313", "apple,t8103", "apple,arm-platform";
+       model = "Apple MacBook Air (M1, 2020)";
+};
+
+/*
+ * Remove unused PCIe ports and disable the associated DARTs.
+ */
+
+&pcie0_dart_1 {
+       status = "disabled";
+};
+
+&pcie0_dart_2 {
+       status = "disabled";
+};
+
+/delete-node/ &port01;
+/delete-node/ &port02;
diff --git a/arch/arm64/boot/dts/apple/t8103-j456.dts b/arch/arm64/boot/dts/apple/t8103-j456.dts
new file mode 100644 (file)
index 0000000..884fddf
--- /dev/null
@@ -0,0 +1,59 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * Apple iMac (24-inch, 4x USB-C, M1, 2020)
+ *
+ * target-type: J456
+ *
+ * Copyright The Asahi Linux Contributors
+ */
+
+/dts-v1/;
+
+#include "t8103.dtsi"
+#include "t8103-jxxx.dtsi"
+
+/ {
+       compatible = "apple,j456", "apple,t8103", "apple,arm-platform";
+       model = "Apple iMac (24-inch, 4x USB-C, M1, 2020)";
+
+       aliases {
+               ethernet0 = &ethernet0;
+       };
+};
+
+&i2c0 {
+       hpm2: usb-pd@3b {
+               compatible = "apple,cd321x";
+               reg = <0x3b>;
+               interrupt-parent = <&pinctrl_ap>;
+               interrupts = <106 IRQ_TYPE_LEVEL_LOW>;
+               interrupt-names = "irq";
+       };
+
+       hpm3: usb-pd@3c {
+               compatible = "apple,cd321x";
+               reg = <0x3c>;
+               interrupt-parent = <&pinctrl_ap>;
+               interrupts = <106 IRQ_TYPE_LEVEL_LOW>;
+               interrupt-names = "irq";
+       };
+};
+
+/*
+ * Force the bus number assignments so that we can declare some of the
+ * on-board devices and properties that are populated by the bootloader
+ * (such as MAC addresses).
+ */
+
+&port01 {
+       bus-range = <2 2>;
+};
+
+&port02 {
+       bus-range = <3 3>;
+       ethernet0: ethernet@0,0 {
+               reg = <0x30000 0x0 0x0 0x0 0x0>;
+               /* To be filled by the loader */
+               local-mac-address = [00 10 18 00 00 00];
+       };
+};
diff --git a/arch/arm64/boot/dts/apple/t8103-j457.dts b/arch/arm64/boot/dts/apple/t8103-j457.dts
new file mode 100644 (file)
index 0000000..d7c6229
--- /dev/null
@@ -0,0 +1,47 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * Apple iMac (24-inch, 2x USB-C, M1, 2020)
+ *
+ * target-type: J457
+ *
+ * Copyright The Asahi Linux Contributors
+ */
+
+/dts-v1/;
+
+#include "t8103.dtsi"
+#include "t8103-jxxx.dtsi"
+
+/ {
+       compatible = "apple,j457", "apple,t8103", "apple,arm-platform";
+       model = "Apple iMac (24-inch, 2x USB-C, M1, 2020)";
+
+       aliases {
+               ethernet0 = &ethernet0;
+       };
+};
+
+/*
+ * Force the bus number assignments so that we can declare some of the
+ * on-board devices and properties that are populated by the bootloader
+ * (such as MAC addresses).
+ */
+
+&port02 {
+       bus-range = <3 3>;
+       ethernet0: ethernet@0,0 {
+               reg = <0x30000 0x0 0x0 0x0 0x0>;
+               /* To be filled by the loader */
+               local-mac-address = [00 10 18 00 00 00];
+       };
+};
+
+/*
+ * Remove unused PCIe port and disable the associated DART.
+ */
+
+&pcie0_dart_1 {
+       status = "disabled";
+};
+
+/delete-node/ &port01;
diff --git a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
new file mode 100644 (file)
index 0000000..fe2ae40
--- /dev/null
@@ -0,0 +1,78 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * Apple M1 Mac mini, MacBook Air/Pro, iMac 24" (M1, 2020/2021)
+ *
+ * This file contains parts common to all Apple M1 devices using the t8103.
+ *
+ * target-type: J274, J293, J313, J456, J457
+ *
+ * Copyright The Asahi Linux Contributors
+ */
+
+/ {
+       aliases {
+               serial0 = &serial0;
+               serial2 = &serial2;
+               wifi0 = &wifi0;
+       };
+
+       chosen {
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+
+               stdout-path = "serial0";
+
+               framebuffer0: framebuffer@0 {
+                       compatible = "apple,simple-framebuffer", "simple-framebuffer";
+                       reg = <0 0 0 0>; /* To be filled by loader */
+                       /* Format properties will be added by loader */
+                       status = "disabled";
+               };
+       };
+
+       memory@800000000 {
+               device_type = "memory";
+               reg = <0x8 0 0x2 0>; /* To be filled by loader */
+       };
+};
+
+&serial0 {
+       status = "okay";
+};
+
+&serial2 {
+       status = "okay";
+};
+
+&i2c0 {
+       hpm0: usb-pd@38 {
+               compatible = "apple,cd321x";
+               reg = <0x38>;
+               interrupt-parent = <&pinctrl_ap>;
+               interrupts = <106 IRQ_TYPE_LEVEL_LOW>;
+               interrupt-names = "irq";
+       };
+
+       hpm1: usb-pd@3f {
+               compatible = "apple,cd321x";
+               reg = <0x3f>;
+               interrupt-parent = <&pinctrl_ap>;
+               interrupts = <106 IRQ_TYPE_LEVEL_LOW>;
+               interrupt-names = "irq";
+       };
+};
+
+/*
+ * Force the bus number assignments so that we can declare some of the
+ * on-board devices and properties that are populated by the bootloader
+ * (such as MAC addresses).
+ */
+&port00 {
+       bus-range = <1 1>;
+       wifi0: network@0,0 {
+               reg = <0x10000 0x0 0x0 0x0 0x0>;
+               /* To be filled by the loader */
+               local-mac-address = [00 00 00 00 00 00];
+       };
+};
diff --git a/arch/arm64/boot/dts/apple/t8103-pmgr.dtsi b/arch/arm64/boot/dts/apple/t8103-pmgr.dtsi
new file mode 100644 (file)
index 0000000..fc51bc8
--- /dev/null
@@ -0,0 +1,1138 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * PMGR Power domains for the Apple T8103 "M1" SoC
+ *
+ * Copyright The Asahi Linux Contributors
+ */
+
+
+&pmgr {
+       ps_sbr: power-controller@100 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x100 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "sbr";
+               apple,always-on; /* Core device */
+       };
+
+       ps_aic: power-controller@108 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x108 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "aic";
+               apple,always-on; /* Core device */
+       };
+
+       ps_dwi: power-controller@110 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x110 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "dwi";
+               apple,always-on; /* Core device */
+       };
+
+       ps_soc_spmi0: power-controller@118 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x118 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "soc_spmi0";
+       };
+
+       ps_soc_spmi1: power-controller@120 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x120 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "soc_spmi1";
+       };
+
+       ps_soc_spmi2: power-controller@128 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x128 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "soc_spmi2";
+       };
+
+       ps_gpio: power-controller@130 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x130 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "gpio";
+       };
+
+       ps_pms_busif: power-controller@138 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x138 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "pms_busif";
+               apple,always-on; /* Core device */
+       };
+
+       ps_pms: power-controller@140 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x140 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "pms";
+               apple,always-on; /* Core device */
+       };
+
+       ps_pms_fpwm0: power-controller@148 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x148 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "pms_fpwm0";
+               power-domains = <&ps_pms>;
+       };
+
+       ps_pms_fpwm1: power-controller@150 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x150 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "pms_fpwm1";
+               power-domains = <&ps_pms>;
+       };
+
+       ps_pms_fpwm2: power-controller@158 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x158 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "pms_fpwm2";
+               power-domains = <&ps_pms>;
+       };
+
+       ps_pms_fpwm3: power-controller@160 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x160 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "pms_fpwm3";
+               power-domains = <&ps_pms>;
+       };
+
+       ps_pms_fpwm4: power-controller@168 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x168 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "pms_fpwm4";
+               power-domains = <&ps_pms>;
+       };
+
+       ps_soc_dpe: power-controller@170 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x170 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "soc_dpe";
+               apple,always-on; /* Core device */
+       };
+
+       ps_pmgr_soc_ocla: power-controller@178 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x178 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "pmgr_soc_ocla";
+       };
+
+       ps_ispsens0: power-controller@180 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x180 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "ispsens0";
+       };
+
+       ps_ispsens1: power-controller@188 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x188 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "ispsens1";
+       };
+
+       ps_ispsens2: power-controller@190 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x190 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "ispsens2";
+       };
+
+       ps_ispsens3: power-controller@198 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x198 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "ispsens3";
+       };
+
+       ps_pcie_ref: power-controller@1a0 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x1a0 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "pcie_ref";
+       };
+
+       ps_aft0: power-controller@1a8 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x1a8 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "aft0";
+       };
+
+       ps_devc0_ivdmc: power-controller@1b0 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x1b0 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "devc0_ivdmc";
+       };
+
+       ps_imx: power-controller@1b8 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x1b8 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "imx";
+               apple,always-on; /* Apple fabric, critical block */
+       };
+
+       ps_sio_busif: power-controller@1c0 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x1c0 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "sio_busif";
+       };
+
+       ps_sio: power-controller@1c8 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x1c8 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "sio";
+               power-domains = <&ps_sio_busif>;
+       };
+
+       ps_sio_cpu: power-controller@1d0 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x1d0 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "sio_cpu";
+               power-domains = <&ps_sio>;
+       };
+
+       ps_fpwm0: power-controller@1d8 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x1d8 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "fpwm0";
+       };
+
+       ps_fpwm1: power-controller@1e0 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x1e0 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "fpwm1";
+       };
+
+       ps_fpwm2: power-controller@1e8 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x1e8 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "fpwm2";
+       };
+
+       ps_i2c0: power-controller@1f0 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x1f0 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "i2c0";
+               power-domains = <&ps_sio>;
+       };
+
+       ps_i2c1: power-controller@1f8 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x1f8 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "i2c1";
+               power-domains = <&ps_sio>;
+       };
+
+       ps_i2c2: power-controller@200 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x200 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "i2c2";
+               power-domains = <&ps_sio>;
+       };
+
+       ps_i2c3: power-controller@208 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x208 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "i2c3";
+               power-domains = <&ps_sio>;
+       };
+
+       ps_i2c4: power-controller@210 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x210 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "i2c4";
+               power-domains = <&ps_sio>;
+       };
+
+       ps_spi_p: power-controller@218 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x218 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "spi_p";
+               power-domains = <&ps_sio>;
+       };
+
+       ps_uart_p: power-controller@220 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x220 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "uart_p";
+               power-domains = <&ps_sio>;
+       };
+
+       ps_audio_p: power-controller@228 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x228 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "audio_p";
+               power-domains = <&ps_sio>;
+       };
+
+       ps_sio_adma: power-controller@230 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x230 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "sio_adma";
+               power-domains = <&ps_sio>, <&ps_pms>;
+       };
+
+       ps_aes: power-controller@238 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x238 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "aes";
+               power-domains = <&ps_sio>;
+       };
+
+       ps_spi0: power-controller@240 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x240 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "spi0";
+               power-domains = <&ps_sio>, <&ps_spi_p>;
+       };
+
+       ps_spi1: power-controller@248 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x248 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "spi1";
+               power-domains = <&ps_sio>, <&ps_spi_p>;
+       };
+
+       ps_spi2: power-controller@250 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x250 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "spi2";
+               power-domains = <&ps_sio>, <&ps_spi_p>;
+       };
+
+       ps_spi3: power-controller@258 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x258 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "spi3";
+               power-domains = <&ps_sio>, <&ps_spi_p>;
+       };
+
+       ps_uart_n: power-controller@268 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x268 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "uart_n";
+               power-domains = <&ps_uart_p>;
+       };
+
+       ps_uart0: power-controller@270 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x270 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "uart0";
+               power-domains = <&ps_uart_p>;
+       };
+
+       ps_uart1: power-controller@278 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x278 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "uart1";
+               power-domains = <&ps_uart_p>;
+       };
+
+       ps_uart2: power-controller@280 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x280 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "uart2";
+               power-domains = <&ps_uart_p>;
+       };
+
+       ps_uart3: power-controller@288 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x288 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "uart3";
+               power-domains = <&ps_uart_p>;
+       };
+
+       ps_uart4: power-controller@290 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x290 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "uart4";
+               power-domains = <&ps_uart_p>;
+       };
+
+       ps_uart5: power-controller@298 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x298 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "uart5";
+               power-domains = <&ps_uart_p>;
+       };
+
+       ps_uart6: power-controller@2a0 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x2a0 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "uart6";
+               power-domains = <&ps_uart_p>;
+       };
+
+       ps_uart7: power-controller@2a8 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x2a8 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "uart7";
+               power-domains = <&ps_uart_p>;
+       };
+
+       ps_uart8: power-controller@2b0 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x2b0 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "uart8";
+               power-domains = <&ps_uart_p>;
+       };
+
+       ps_mca0: power-controller@2b8 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x2b8 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "mca0";
+               power-domains = <&ps_audio_p>, <&ps_sio_adma>;
+       };
+
+       ps_mca1: power-controller@2c0 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x2c0 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "mca1";
+               power-domains = <&ps_audio_p>, <&ps_sio_adma>;
+       };
+
+       ps_mca2: power-controller@2c8 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x2c8 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "mca2";
+               power-domains = <&ps_audio_p>, <&ps_sio_adma>;
+       };
+
+       ps_mca3: power-controller@2d0 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x2d0 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "mca3";
+               power-domains = <&ps_audio_p>, <&ps_sio_adma>;
+       };
+
+       ps_mca4: power-controller@2d8 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x2d8 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "mca4";
+               power-domains = <&ps_audio_p>, <&ps_sio_adma>;
+       };
+
+       ps_mca5: power-controller@2e0 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x2e0 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "mca5";
+               power-domains = <&ps_audio_p>, <&ps_sio_adma>;
+       };
+
+       ps_dpa0: power-controller@2e8 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x2e8 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "dpa0";
+               power-domains = <&ps_audio_p>;
+       };
+
+       ps_dpa1: power-controller@2f0 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x2f0 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "dpa1";
+               power-domains = <&ps_audio_p>;
+       };
+
+       ps_mcc: power-controller@2f8 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x2f8 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "mcc";
+               apple,always-on; /* Memory controller */
+       };
+
+       ps_spi4: power-controller@260 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x260 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "spi4";
+               power-domains = <&ps_sio>, <&ps_spi_p>;
+       };
+
+       ps_dcs0: power-controller@300 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x300 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "dcs0";
+               apple,always-on; /* LPDDR4 interface */
+       };
+
+       ps_dcs1: power-controller@310 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x310 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "dcs1";
+               apple,always-on; /* LPDDR4 interface */
+       };
+
+       ps_dcs2: power-controller@308 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x308 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "dcs2";
+               apple,always-on; /* LPDDR4 interface */
+       };
+
+       ps_dcs3: power-controller@318 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x318 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "dcs3";
+               apple,always-on; /* LPDDR4 interface */
+       };
+
+       ps_smx: power-controller@340 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x340 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "smx";
+               apple,always-on; /* Apple fabric, critical block */
+       };
+
+       ps_apcie: power-controller@348 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x348 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "apcie";
+               power-domains = <&ps_imx>, <&ps_pcie_ref>;
+       };
+
+       ps_rmx: power-controller@350 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x350 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "rmx";
+               /* Apple Fabric, display/image stuff: this can power down */
+       };
+
+       ps_mmx: power-controller@358 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x358 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "mmx";
+               /* Apple Fabric, media stuff: this can power down */
+       };
+
+       ps_disp0_fe: power-controller@360 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x360 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "disp0_fe";
+               power-domains = <&ps_rmx>;
+               apple,always-on; /* TODO: figure out if we can enable PM here */
+       };
+
+       ps_dispext_fe: power-controller@368 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x368 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "dispext_fe";
+               power-domains = <&ps_rmx>;
+       };
+
+       ps_dispext_cpu0: power-controller@378 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x378 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "dispext_cpu0";
+               power-domains = <&ps_dispext_fe>;
+               apple,min-state = <4>;
+       };
+
+       ps_jpg: power-controller@3c0 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x3c0 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "jpg";
+               power-domains = <&ps_mmx>;
+       };
+
+       ps_msr: power-controller@3c8 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x3c8 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "msr";
+               power-domains = <&ps_mmx>;
+       };
+
+       ps_msr_ase_core: power-controller@3d0 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x3d0 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "msr_ase_core";
+       };
+
+       ps_pmp: power-controller@3d8 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x3d8 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "pmp";
+       };
+
+       ps_pms_sram: power-controller@3e0 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x3e0 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "pms_sram";
+       };
+
+       ps_apcie_gp: power-controller@3e8 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x3e8 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "apcie_gp";
+               power-domains = <&ps_apcie>;
+       };
+
+       ps_ans2: power-controller@3f0 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x3f0 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "ans2";
+               /*
+                * The ADT makes ps_apcie_st depend on ps_ans2 instead, but this
+                * doesn't make much sense since ANS2 uses APCIE_ST.
+                */
+               power-domains = <&ps_apcie_st>;
+       };
+
+       ps_gfx: power-controller@3f8 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x3f8 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "gfx";
+       };
+
+       ps_dcs4: power-controller@320 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x320 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "dcs4";
+               apple,always-on; /* LPDDR4 interface */
+       };
+
+       ps_dcs5: power-controller@330 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x330 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "dcs5";
+               apple,always-on; /* LPDDR4 interface */
+       };
+
+       ps_dcs6: power-controller@328 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x328 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "dcs6";
+               apple,always-on; /* LPDDR4 interface */
+       };
+
+       ps_dcs7: power-controller@338 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x338 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "dcs7";
+               apple,always-on; /* LPDDR4 interface */
+       };
+
+       ps_dispdfr_fe: power-controller@3a8 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x3a8 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "dispdfr_fe";
+               power-domains = <&ps_rmx>;
+       };
+
+       ps_dispdfr_be: power-controller@3b0 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x3b0 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "dispdfr_be";
+               power-domains = <&ps_dispdfr_fe>;
+       };
+
+       ps_mipi_dsi: power-controller@3b8 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x3b8 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "mipi_dsi";
+               power-domains = <&ps_dispdfr_be>;
+       };
+
+       ps_isp_sys: power-controller@400 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x400 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "isp_sys";
+               power-domains = <&ps_rmx>;
+       };
+
+       ps_venc_sys: power-controller@408 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x408 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "venc_sys";
+               power-domains = <&ps_mmx>;
+       };
+
+       ps_avd_sys: power-controller@410 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x410 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "avd_sys";
+               power-domains = <&ps_mmx>;
+       };
+
+       ps_apcie_st: power-controller@418 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x418 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "apcie_st";
+               power-domains = <&ps_apcie>;
+       };
+
+       ps_ane_sys: power-controller@470 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x470 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "ane_sys";
+       };
+
+       ps_atc0_common: power-controller@420 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x420 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "atc0_common";
+       };
+
+       ps_atc0_pcie: power-controller@428 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x428 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "atc0_pcie";
+               power-domains = <&ps_atc0_common>;
+       };
+
+       ps_atc0_cio: power-controller@430 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x430 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "atc0_cio";
+               power-domains = <&ps_atc0_common>;
+       };
+
+       ps_atc0_cio_pcie: power-controller@438 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x438 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "atc0_cio_pcie";
+               power-domains = <&ps_atc0_cio>;
+       };
+
+       ps_atc0_cio_usb: power-controller@440 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x440 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "atc0_cio_usb";
+               power-domains = <&ps_atc0_cio>;
+       };
+
+       ps_atc1_common: power-controller@448 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x448 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "atc1_common";
+       };
+
+       ps_atc1_pcie: power-controller@450 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x450 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "atc1_pcie";
+               power-domains = <&ps_atc1_common>;
+       };
+
+       ps_atc1_cio: power-controller@458 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x458 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "atc1_cio";
+               power-domains = <&ps_atc1_common>;
+       };
+
+       ps_atc1_cio_pcie: power-controller@460 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x460 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "atc1_cio_pcie";
+               power-domains = <&ps_atc1_cio>;
+       };
+
+       ps_atc1_cio_usb: power-controller@468 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x468 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "atc1_cio_usb";
+               power-domains = <&ps_atc1_cio>;
+       };
+
+       ps_sep: power-controller@c00 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0xc00 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "sep";
+               apple,always-on; /* Locked on */
+       };
+
+       ps_venc_dma: power-controller@8000 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x8000 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "venc_dma";
+               power-domains = <&ps_venc_sys>;
+       };
+
+       ps_venc_pipe4: power-controller@8008 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x8008 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "venc_pipe4";
+               power-domains = <&ps_venc_dma>;
+       };
+
+       ps_venc_pipe5: power-controller@8010 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x8010 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "venc_pipe5";
+               power-domains = <&ps_venc_dma>;
+       };
+
+       ps_venc_me0: power-controller@8018 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x8018 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "venc_me0";
+               power-domains = <&ps_venc_pipe4>, <&ps_venc_pipe5>;
+       };
+
+       ps_venc_me1: power-controller@8020 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x8020 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "venc_me1";
+               power-domains = <&ps_venc_pipe4>, <&ps_venc_pipe5>;
+       };
+
+       ps_ane_sys_cpu: power-controller@c000 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0xc000 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "ane_sys_cpu";
+               power-domains = <&ps_ane_sys>;
+       };
+
+       ps_disp0_cpu0: power-controller@10018 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x10018 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "disp0_cpu0";
+               power-domains = <&ps_disp0_fe>;
+               apple,always-on; /* TODO: figure out if we can enable PM here */
+               apple,min-state = <4>;
+       };
+};
+
+&pmgr_mini {
+       ps_debug: power-controller@58 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x58 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "debug";
+               apple,always-on; /* Core AON device */
+       };
+
+       ps_nub_spmi0: power-controller@60 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x60 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "nub_spmi0";
+               apple,always-on; /* Core AON device */
+       };
+
+       ps_nub_aon: power-controller@70 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x70 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "nub_aon";
+               apple,always-on; /* Core AON device */
+       };
+
+       ps_nub_gpio: power-controller@80 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x80 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "nub_gpio";
+               apple,always-on; /* Core AON device */
+       };
+
+       ps_nub_fabric: power-controller@a8 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0xa8 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "nub_fabric";
+               apple,always-on; /* Core AON device */
+       };
+
+       ps_nub_sram: power-controller@b0 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0xb0 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "nub_sram";
+               apple,always-on; /* Core AON device */
+       };
+
+       ps_debug_usb: power-controller@b8 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0xb8 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "debug_usb";
+               apple,always-on; /* Core AON device */
+               power-domains = <&ps_debug>;
+       };
+
+       ps_debug_auth: power-controller@c0 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0xc0 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "debug_auth";
+               apple,always-on; /* Core AON device */
+               power-domains = <&ps_debug>;
+       };
+
+       ps_nub_spmi1: power-controller@68 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x68 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "nub_spmi1";
+               apple,always-on; /* Core AON device */
+       };
+
+       ps_msg: power-controller@78 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x78 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "msg";
+       };
+
+       ps_atc0_usb_aon: power-controller@88 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x88 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "atc0_usb_aon";
+       };
+
+       ps_atc1_usb_aon: power-controller@90 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x90 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "atc1_usb_aon";
+       };
+
+       ps_atc0_usb: power-controller@98 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0x98 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "atc0_usb";
+               power-domains = <&ps_atc0_usb_aon>, <&ps_atc0_common>;
+       };
+
+       ps_atc1_usb: power-controller@a0 {
+               compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+               reg = <0xa0 4>;
+               #power-domain-cells = <0>;
+               #reset-cells = <0>;
+               label = "atc1_usb";
+               power-domains = <&ps_atc1_usb_aon>, <&ps_atc1_common>;
+       };
+};
index fc8b2bb..4950e63 100644 (file)
                             <AIC_FIQ AIC_TMR_HV_VIRT IRQ_TYPE_LEVEL_HIGH>;
        };
 
-       clk24: clock-24m {
+       clkref: clock-ref {
                compatible = "fixed-clock";
                #clock-cells = <0>;
                clock-frequency = <24000000>;
-               clock-output-names = "clk24";
+               clock-output-names = "clkref";
        };
 
        soc {
                ranges;
                nonposted-mmio;
 
+               i2c0: i2c@235010000 {
+                       compatible = "apple,t8103-i2c", "apple,i2c";
+                       reg = <0x2 0x35010000 0x0 0x4000>;
+                       clocks = <&clkref>;
+                       interrupt-parent = <&aic>;
+                       interrupts = <AIC_IRQ 627 IRQ_TYPE_LEVEL_HIGH>;
+                       pinctrl-0 = <&i2c0_pins>;
+                       pinctrl-names = "default";
+                       #address-cells = <0x1>;
+                       #size-cells = <0x0>;
+                       power-domains = <&ps_i2c0>;
+               };
+
+               i2c1: i2c@235014000 {
+                       compatible = "apple,t8103-i2c", "apple,i2c";
+                       reg = <0x2 0x35014000 0x0 0x4000>;
+                       clocks = <&clkref>;
+                       interrupt-parent = <&aic>;
+                       interrupts = <AIC_IRQ 628 IRQ_TYPE_LEVEL_HIGH>;
+                       pinctrl-0 = <&i2c1_pins>;
+                       pinctrl-names = "default";
+                       #address-cells = <0x1>;
+                       #size-cells = <0x0>;
+                       power-domains = <&ps_i2c1>;
+               };
+
+               i2c2: i2c@235018000 {
+                       compatible = "apple,t8103-i2c", "apple,i2c";
+                       reg = <0x2 0x35018000 0x0 0x4000>;
+                       clocks = <&clkref>;
+                       interrupt-parent = <&aic>;
+                       interrupts = <AIC_IRQ 629 IRQ_TYPE_LEVEL_HIGH>;
+                       pinctrl-0 = <&i2c2_pins>;
+                       pinctrl-names = "default";
+                       #address-cells = <0x1>;
+                       #size-cells = <0x0>;
+                       status = "disabled"; /* not used in all devices */
+                       power-domains = <&ps_i2c2>;
+               };
+
+               i2c3: i2c@23501c000 {
+                       compatible = "apple,t8103-i2c", "apple,i2c";
+                       reg = <0x2 0x3501c000 0x0 0x4000>;
+                       clocks = <&clkref>;
+                       interrupt-parent = <&aic>;
+                       interrupts = <AIC_IRQ 630 IRQ_TYPE_LEVEL_HIGH>;
+                       pinctrl-0 = <&i2c3_pins>;
+                       pinctrl-names = "default";
+                       #address-cells = <0x1>;
+                       #size-cells = <0x0>;
+                       power-domains = <&ps_i2c3>;
+               };
+
+               i2c4: i2c@235020000 {
+                       compatible = "apple,t8103-i2c", "apple,i2c";
+                       reg = <0x2 0x35020000 0x0 0x4000>;
+                       clocks = <&clkref>;
+                       interrupt-parent = <&aic>;
+                       interrupts = <AIC_IRQ 631 IRQ_TYPE_LEVEL_HIGH>;
+                       pinctrl-0 = <&i2c4_pins>;
+                       pinctrl-names = "default";
+                       #address-cells = <0x1>;
+                       #size-cells = <0x0>;
+                       power-domains = <&ps_i2c4>;
+                       status = "disabled"; /* only used in J293 */
+               };
+
                serial0: serial@235200000 {
                        compatible = "apple,s5l-uart";
                        reg = <0x2 0x35200000 0x0 0x1000>;
                         * TODO: figure out the clocking properly, there may
                         * be a third selectable clock.
                         */
-                       clocks = <&clk24>, <&clk24>;
+                       clocks = <&clkref>, <&clkref>;
                        clock-names = "uart", "clk_uart_baud0";
+                       power-domains = <&ps_uart0>;
+                       status = "disabled";
+               };
+
+               serial2: serial@235208000 {
+                       compatible = "apple,s5l-uart";
+                       reg = <0x2 0x35208000 0x0 0x1000>;
+                       reg-io-width = <4>;
+                       interrupt-parent = <&aic>;
+                       interrupts = <AIC_IRQ 607 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&clkref>, <&clkref>;
+                       clock-names = "uart", "clk_uart_baud0";
+                       power-domains = <&ps_uart2>;
                        status = "disabled";
                };
 
                        #interrupt-cells = <3>;
                        interrupt-controller;
                        reg = <0x2 0x3b100000 0x0 0x8000>;
+                       power-domains = <&ps_aic>;
+               };
+
+               pmgr: power-management@23b700000 {
+                       compatible = "apple,t8103-pmgr", "apple,pmgr", "syscon", "simple-mfd";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       reg = <0x2 0x3b700000 0 0x14000>;
                };
 
                pinctrl_ap: pinctrl@23c100000 {
                        compatible = "apple,t8103-pinctrl", "apple,pinctrl";
                        reg = <0x2 0x3c100000 0x0 0x100000>;
+                       power-domains = <&ps_gpio>;
 
                        gpio-controller;
                        #gpio-cells = <2>;
                        apple,npins = <212>;
 
                        interrupt-controller;
+                       #interrupt-cells = <2>;
                        interrupt-parent = <&aic>;
                        interrupts = <AIC_IRQ 190 IRQ_TYPE_LEVEL_HIGH>,
                                     <AIC_IRQ 191 IRQ_TYPE_LEVEL_HIGH>,
                                     <AIC_IRQ 195 IRQ_TYPE_LEVEL_HIGH>,
                                     <AIC_IRQ 196 IRQ_TYPE_LEVEL_HIGH>;
 
+                       i2c0_pins: i2c0-pins {
+                               pinmux = <APPLE_PINMUX(192, 1)>,
+                                        <APPLE_PINMUX(188, 1)>;
+                       };
+
+                       i2c1_pins: i2c1-pins {
+                               pinmux = <APPLE_PINMUX(201, 1)>,
+                                        <APPLE_PINMUX(199, 1)>;
+                       };
+
+                       i2c2_pins: i2c2-pins {
+                               pinmux = <APPLE_PINMUX(163, 1)>,
+                                        <APPLE_PINMUX(162, 1)>;
+                       };
+
+                       i2c3_pins: i2c3-pins {
+                               pinmux = <APPLE_PINMUX(73, 1)>,
+                                        <APPLE_PINMUX(72, 1)>;
+                       };
+
+                       i2c4_pins: i2c4-pins {
+                               pinmux = <APPLE_PINMUX(135, 1)>,
+                                        <APPLE_PINMUX(134, 1)>;
+                       };
+
                        pcie_pins: pcie-pins {
                                pinmux = <APPLE_PINMUX(150, 1)>,
                                         <APPLE_PINMUX(151, 1)>,
                        };
                };
 
-               pinctrl_aop: pinctrl@24a820000 {
-                       compatible = "apple,t8103-pinctrl", "apple,pinctrl";
-                       reg = <0x2 0x4a820000 0x0 0x4000>;
-
-                       gpio-controller;
-                       #gpio-cells = <2>;
-                       gpio-ranges = <&pinctrl_aop 0 0 42>;
-                       apple,npins = <42>;
-
-                       interrupt-controller;
-                       interrupt-parent = <&aic>;
-                       interrupts = <AIC_IRQ 268 IRQ_TYPE_LEVEL_HIGH>,
-                                    <AIC_IRQ 269 IRQ_TYPE_LEVEL_HIGH>,
-                                    <AIC_IRQ 270 IRQ_TYPE_LEVEL_HIGH>,
-                                    <AIC_IRQ 271 IRQ_TYPE_LEVEL_HIGH>,
-                                    <AIC_IRQ 272 IRQ_TYPE_LEVEL_HIGH>,
-                                    <AIC_IRQ 273 IRQ_TYPE_LEVEL_HIGH>,
-                                    <AIC_IRQ 274 IRQ_TYPE_LEVEL_HIGH>;
-               };
-
                pinctrl_nub: pinctrl@23d1f0000 {
                        compatible = "apple,t8103-pinctrl", "apple,pinctrl";
                        reg = <0x2 0x3d1f0000 0x0 0x4000>;
+                       power-domains = <&ps_nub_gpio>;
 
                        gpio-controller;
                        #gpio-cells = <2>;
                        apple,npins = <23>;
 
                        interrupt-controller;
+                       #interrupt-cells = <2>;
                        interrupt-parent = <&aic>;
                        interrupts = <AIC_IRQ 330 IRQ_TYPE_LEVEL_HIGH>,
                                     <AIC_IRQ 331 IRQ_TYPE_LEVEL_HIGH>,
                                     <AIC_IRQ 336 IRQ_TYPE_LEVEL_HIGH>;
                };
 
+               pmgr_mini: power-management@23d280000 {
+                       compatible = "apple,t8103-pmgr", "apple,pmgr", "syscon", "simple-mfd";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       reg = <0x2 0x3d280000 0 0x4000>;
+               };
+
+               wdt: watchdog@23d2b0000 {
+                       compatible = "apple,t8103-wdt", "apple,wdt";
+                       reg = <0x2 0x3d2b0000 0x0 0x4000>;
+                       clocks = <&clkref>;
+                       interrupt-parent = <&aic>;
+                       interrupts = <AIC_IRQ 338 IRQ_TYPE_LEVEL_HIGH>;
+               };
+
                pinctrl_smc: pinctrl@23e820000 {
                        compatible = "apple,t8103-pinctrl", "apple,pinctrl";
                        reg = <0x2 0x3e820000 0x0 0x4000>;
                        apple,npins = <16>;
 
                        interrupt-controller;
+                       #interrupt-cells = <2>;
                        interrupt-parent = <&aic>;
                        interrupts = <AIC_IRQ 391 IRQ_TYPE_LEVEL_HIGH>,
                                     <AIC_IRQ 392 IRQ_TYPE_LEVEL_HIGH>,
                                     <AIC_IRQ 397 IRQ_TYPE_LEVEL_HIGH>;
                };
 
+               pinctrl_aop: pinctrl@24a820000 {
+                       compatible = "apple,t8103-pinctrl", "apple,pinctrl";
+                       reg = <0x2 0x4a820000 0x0 0x4000>;
+
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       gpio-ranges = <&pinctrl_aop 0 0 42>;
+                       apple,npins = <42>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+                       interrupt-parent = <&aic>;
+                       interrupts = <AIC_IRQ 268 IRQ_TYPE_LEVEL_HIGH>,
+                                    <AIC_IRQ 269 IRQ_TYPE_LEVEL_HIGH>,
+                                    <AIC_IRQ 270 IRQ_TYPE_LEVEL_HIGH>,
+                                    <AIC_IRQ 271 IRQ_TYPE_LEVEL_HIGH>,
+                                    <AIC_IRQ 272 IRQ_TYPE_LEVEL_HIGH>,
+                                    <AIC_IRQ 273 IRQ_TYPE_LEVEL_HIGH>,
+                                    <AIC_IRQ 274 IRQ_TYPE_LEVEL_HIGH>;
+               };
+
                pcie0_dart_0: dart@681008000 {
                        compatible = "apple,t8103-dart";
                        reg = <0x6 0x81008000 0x0 0x4000>;
                        #iommu-cells = <1>;
                        interrupt-parent = <&aic>;
                        interrupts = <AIC_IRQ 696 IRQ_TYPE_LEVEL_HIGH>;
+                       power-domains = <&ps_apcie_gp>;
                };
 
                pcie0_dart_1: dart@682008000 {
                        #iommu-cells = <1>;
                        interrupt-parent = <&aic>;
                        interrupts = <AIC_IRQ 699 IRQ_TYPE_LEVEL_HIGH>;
+                       power-domains = <&ps_apcie_gp>;
                };
 
                pcie0_dart_2: dart@683008000 {
                        #iommu-cells = <1>;
                        interrupt-parent = <&aic>;
                        interrupts = <AIC_IRQ 702 IRQ_TYPE_LEVEL_HIGH>;
+                       power-domains = <&ps_apcie_gp>;
                };
 
                pcie0: pcie@690000000 {
                        ranges = <0x43000000 0x6 0xa0000000 0x6 0xa0000000 0x0 0x20000000>,
                                 <0x02000000 0x0 0xc0000000 0x6 0xc0000000 0x0 0x40000000>;
 
+                       power-domains = <&ps_apcie_gp>;
                        pinctrl-0 = <&pcie_pins>;
                        pinctrl-names = "default";
 
                                device_type = "pci";
                                reg = <0x0 0x0 0x0 0x0 0x0>;
                                reset-gpios = <&pinctrl_ap 152 0>;
-                               max-link-speed = <2>;
 
                                #address-cells = <3>;
                                #size-cells = <2>;
                                device_type = "pci";
                                reg = <0x800 0x0 0x0 0x0 0x0>;
                                reset-gpios = <&pinctrl_ap 153 0>;
-                               max-link-speed = <2>;
 
                                #address-cells = <3>;
                                #size-cells = <2>;
                                device_type = "pci";
                                reg = <0x1000 0x0 0x0 0x0 0x0>;
                                reset-gpios = <&pinctrl_ap 33 0>;
-                               max-link-speed = <1>;
 
                                #address-cells = <3>;
                                #size-cells = <2>;
                };
        };
 };
+
+#include "t8103-pmgr.dtsi"
index 4422021..bfe4ed8 100644 (file)
                        status = "disabled";
                };
 
-               hsi2c_0: hsi2c@14e40000 {
+               hsi2c_0: i2c@14e40000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x14e40000 0x1000>;
                        interrupts = <GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_1: hsi2c@14e50000 {
+               hsi2c_1: i2c@14e50000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x14e50000 0x1000>;
                        interrupts = <GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_2: hsi2c@14e60000 {
+               hsi2c_2: i2c@14e60000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x14e60000 0x1000>;
                        interrupts = <GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_3: hsi2c@14e70000 {
+               hsi2c_3: i2c@14e70000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x14e70000 0x1000>;
                        interrupts = <GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_4: hsi2c@14ec0000 {
+               hsi2c_4: i2c@14ec0000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x14ec0000 0x1000>;
                        interrupts = <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_5: hsi2c@14ed0000 {
+               hsi2c_5: i2c@14ed0000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x14ed0000 0x1000>;
                        interrupts = <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_6: hsi2c@14ee0000 {
+               hsi2c_6: i2c@14ee0000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x14ee0000 0x1000>;
                        interrupts = <GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_7: hsi2c@14ef0000 {
+               hsi2c_7: i2c@14ef0000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x14ef0000 0x1000>;
                        interrupts = <GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_8: hsi2c@14d90000 {
+               hsi2c_8: i2c@14d90000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x14d90000 0x1000>;
                        interrupts = <GIC_SPI 443 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_9: hsi2c@14da0000 {
+               hsi2c_9: i2c@14da0000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x14da0000 0x1000>;
                        interrupts = <GIC_SPI 444 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_10: hsi2c@14de0000 {
+               hsi2c_10: i2c@14de0000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x14de0000 0x1000>;
                        interrupts = <GIC_SPI 445 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_11: hsi2c@14df0000 {
+               hsi2c_11: i2c@14df0000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x14df0000 0x1000>;
                        interrupts = <GIC_SPI 446 IRQ_TYPE_LEVEL_HIGH>;
index c73a597..c3efbc8 100644 (file)
                        interrupts = <GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>;
                };
 
-               hsi2c_0: hsi2c@13640000 {
+               hsi2c_0: i2c@13640000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x13640000 0x1000>;
                        interrupts = <GIC_SPI 441 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_1: hsi2c@13650000 {
+               hsi2c_1: i2c@13650000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x13650000 0x1000>;
                        interrupts = <GIC_SPI 442 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_2: hsi2c@14e60000 {
+               hsi2c_2: i2c@14e60000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x14e60000 0x1000>;
                        interrupts = <GIC_SPI 459 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_3: hsi2c@14e70000 {
+               hsi2c_3: i2c@14e70000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x14e70000 0x1000>;
                        interrupts = <GIC_SPI 460 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_4: hsi2c@13660000 {
+               hsi2c_4: i2c@13660000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x13660000 0x1000>;
                        interrupts = <GIC_SPI 443 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_5: hsi2c@13670000 {
+               hsi2c_5: i2c@13670000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x13670000 0x1000>;
                        interrupts = <GIC_SPI 444 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_6: hsi2c@14e00000 {
+               hsi2c_6: i2c@14e00000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x14e00000 0x1000>;
                        interrupts = <GIC_SPI 461 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_7: hsi2c@13e10000 {
+               hsi2c_7: i2c@13e10000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x13e10000 0x1000>;
                        interrupts = <GIC_SPI 462 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_8: hsi2c@14e20000 {
+               hsi2c_8: i2c@14e20000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x14e20000 0x1000>;
                        interrupts = <GIC_SPI 463 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_9: hsi2c@13680000 {
+               hsi2c_9: i2c@13680000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x13680000 0x1000>;
                        interrupts = <GIC_SPI 445 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_10: hsi2c@13690000 {
+               hsi2c_10: i2c@13690000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x13690000 0x1000>;
                        interrupts = <GIC_SPI 446 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               hsi2c_11: hsi2c@136a0000 {
+               hsi2c_11: i2c@136a0000 {
                        compatible = "samsung,exynos7-hsi2c";
                        reg = <0x136a0000 0x1000>;
                        interrupts = <GIC_SPI 447 IRQ_TYPE_LEVEL_HIGH>;
index ef46d7a..57518cb 100644 (file)
@@ -54,3 +54,7 @@
        vcc-supply = <&ufs_0_fixed_vcc_reg>;
        vcc-fixed-regulator;
 };
+
+&usi_0 {
+       status = "okay";
+};
index 3e47273..0fab0aa 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/soc/samsung,exynos-usi.h>
 
 / {
        compatible = "samsung,exynosautov9";
                        reg = <0x17c20000 0x1000>;
                };
 
-               /* USI: UART */
-               serial_0: uart@10300000 {
-                       compatible = "samsung,exynos850-uart";
-                       reg = <0x10300000 0x100>;
-                       interrupts = <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&uart0_bus_dual>;
+               syscon_peric0: syscon@10220000 {
+                       compatible = "samsung,exynosautov9-sysreg", "syscon";
+                       reg = <0x10220000 0x2000>;
+               };
+
+               usi_0: usi@103000c0 {
+                       compatible = "samsung,exynos850-usi";
+                       reg = <0x103000c0 0x20>;
+                       samsung,sysreg = <&syscon_peric0 0x1000>;
+                       samsung,mode = <USI_V2_UART>;
+                       samsung,clkreq-on; /* needed for UART mode */
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
                        clocks = <&uart_clock>, <&uart_clock>;
-                       clock-names = "uart", "clk_uart_baud0";
+                       clock-names = "pclk", "ipclk";
                        status = "disabled";
+
+                       /* USI: UART */
+                       serial_0: serial@10300000 {
+                               compatible = "samsung,exynos850-uart";
+                               reg = <0x10300000 0xc0>;
+                               interrupts = <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&uart0_bus_dual>;
+                               clocks = <&uart_clock>, <&uart_clock>;
+                               clock-names = "uart", "clk_uart_baud0";
+                               status = "disabled";
+                       };
                };
 
                ufs_0_phy: ufs0-phy@17e04000 {
index a14a617..6d8f0a5 100644 (file)
@@ -1,4 +1,14 @@
 # SPDX-License-Identifier: GPL-2.0
+
+# required for overlay support
+DTC_FLAGS_fsl-ls1028a-qds := -@
+DTC_FLAGS_fsl-ls1028a-qds-13bb := -@
+DTC_FLAGS_fsl-ls1028a-qds-65bb := -@
+DTC_FLAGS_fsl-ls1028a-qds-7777 := -@
+DTC_FLAGS_fsl-ls1028a-qds-85bb := -@
+DTC_FLAGS_fsl-ls1028a-qds-899b := -@
+DTC_FLAGS_fsl-ls1028a-qds-9999 := -@
+
 dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1012a-frdm.dtb
 dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1012a-frwy.dtb
 dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1012a-oxalis.dtb
@@ -11,6 +21,12 @@ dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1028a-kontron-sl28-var2.dtb
 dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1028a-kontron-sl28-var3-ads2.dtb
 dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1028a-kontron-sl28-var4.dtb
 dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1028a-qds.dtb
+dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1028a-qds-13bb.dtb
+dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1028a-qds-65bb.dtb
+dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1028a-qds-7777.dtb
+dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1028a-qds-85bb.dtb
+dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1028a-qds-899b.dtb
+dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1028a-qds-9999.dtb
 dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1028a-rdb.dtb
 dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1043a-qds.dtb
 dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1043a-rdb.dtb
@@ -40,6 +56,7 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mm-icore-mx8mm-ctouch2.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mm-icore-mx8mm-edimm2.2.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mm-kontron-n801x-s.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mm-nitrogen-r2.dtb
+dtb-$(CONFIG_ARCH_MXC) += imx8mm-tqma8mqml-mba8mx.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mm-var-som-symphony.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw71xx-0x.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw72xx-0x.dtb
@@ -47,8 +64,11 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw73xx-0x.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw7901.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw7902.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mn-beacon-kit.dtb
+dtb-$(CONFIG_ARCH_MXC) += imx8mn-bsh-smm-s2.dtb
+dtb-$(CONFIG_ARCH_MXC) += imx8mn-bsh-smm-s2pro.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mn-evk.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mn-ddr4-evk.dtb
+dtb-$(CONFIG_ARCH_MXC) += imx8mn-tqma8mqnl-mba8mx.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mn-var-som-symphony.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mn-venice-gw7902.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk.dtb
@@ -60,6 +80,7 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mq-librem5-devkit.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-librem5-r2.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-librem5-r3.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-librem5-r4.dtb
+dtb-$(CONFIG_ARCH_MXC) += imx8mq-tqma8mq-mba8mx.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-mnt-reform2.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-nitrogen.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-phanbell.dtb
@@ -71,6 +92,7 @@ dtb-$(CONFIG_ARCH_MXC) += imx8qm-mek.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8qxp-ai_ml.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8qxp-colibri-eval-v3.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8qxp-mek.dtb
+dtb-$(CONFIG_ARCH_MXC) += imx8ulp-evk.dtb
 
 dtb-$(CONFIG_ARCH_S32) += s32g274a-evb.dtb
 dtb-$(CONFIG_ARCH_S32) += s32g274a-rdb2.dtb
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-13bb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-13bb.dts
new file mode 100644 (file)
index 0000000..f748a2c
--- /dev/null
@@ -0,0 +1,113 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree fragment for LS1028A QDS board, serdes 13bb
+ *
+ * Copyright 2019-2021 NXP
+ *
+ * Requires a LS1028A QDS board with lane B rework.
+ * Requires a SCH-30841 card with lane A of connector rewired to PHY lane C.
+ * Set-up is a SCH-30842 card in slot 1 and SCH-30841 in slot 2.
+ */
+
+/dts-v1/;
+/plugin/;
+
+/ {
+       fragment@0 {
+               target = <&mdio_slot1>;
+
+               __overlay__ {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       slot1_sgmii: ethernet-phy@2 {
+                               /* AQR112 */
+                               reg = <0x2>;
+                               compatible = "ethernet-phy-ieee802.3-c45";
+                       };
+               };
+       };
+
+       fragment@1 {
+               target = <&enetc_port0>;
+
+               __overlay__ {
+                       phy-handle = <&slot1_sgmii>;
+                       phy-mode = "usxgmii";
+                       managed = "in-band-status";
+                       status = "okay";
+               };
+       };
+
+       fragment@2 {
+               target = <&mdio_slot2>;
+
+               __overlay__ {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       /* 4 ports on AQR412 */
+                       slot2_qxgmii0: ethernet-phy@0 {
+                               reg = <0x0>;
+                               compatible = "ethernet-phy-ieee802.3-c45";
+                       };
+
+                       slot2_qxgmii1: ethernet-phy@1 {
+                               reg = <0x1>;
+                               compatible = "ethernet-phy-ieee802.3-c45";
+                       };
+
+                       slot2_qxgmii2: ethernet-phy@2 {
+                               reg = <0x2>;
+                               compatible = "ethernet-phy-ieee802.3-c45";
+                       };
+
+                       slot2_qxgmii3: ethernet-phy@3 {
+                               reg = <0x3>;
+                               compatible = "ethernet-phy-ieee802.3-c45";
+                       };
+               };
+       };
+
+       fragment@3 {
+               target = <&mscc_felix_ports>;
+
+               __overlay__ {
+                       port@0 {
+                               status = "okay";
+                               phy-handle = <&slot2_qxgmii0>;
+                               phy-mode = "usxgmii";
+                               managed = "in-band-status";
+                       };
+
+                       port@1 {
+                               status = "okay";
+                               phy-handle = <&slot2_qxgmii1>;
+                               phy-mode = "usxgmii";
+                               managed = "in-band-status";
+                       };
+
+                       port@2 {
+                               status = "okay";
+                               phy-handle = <&slot2_qxgmii2>;
+                               phy-mode = "usxgmii";
+                               managed = "in-band-status";
+                       };
+
+                       port@3 {
+                               status = "okay";
+                               phy-handle = <&slot2_qxgmii3>;
+                               phy-mode = "usxgmii";
+                               managed = "in-band-status";
+                       };
+               };
+       };
+
+       fragment@4 {
+               target = <&mscc_felix>;
+
+               __overlay__ {
+                       status = "okay";
+               };
+       };
+};
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-65bb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-65bb.dts
new file mode 100644 (file)
index 0000000..8ffb707
--- /dev/null
@@ -0,0 +1,108 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree fragment for LS1028A QDS board, serdes 69xx
+ *
+ * Copyright 2019-2021 NXP
+ *
+ * Requires a LS1028A QDS board with lane B rework.
+ * Requires a SCH-30842 card in slot 1 and a SCH-28021 card in slot 2.
+ */
+
+/dts-v1/;
+/plugin/;
+
+/ {
+       fragment@0 {
+               target = <&mdio_slot1>;
+
+               __overlay__ {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       slot1_sgmii: ethernet-phy@2 {
+                               /* AQR112 */
+                               reg = <0x2>;
+                               compatible = "ethernet-phy-ieee802.3-c45";
+                       };
+               };
+       };
+
+       fragment@1 {
+               target = <&enetc_port0>;
+
+               __overlay__ {
+                       phy-handle = <&slot1_sgmii>;
+                       phy-mode = "2500base-x";
+                       managed = "in-band-status";
+                       status = "okay";
+               };
+       };
+
+       fragment@2 {
+               target = <&mdio_slot2>;
+
+               __overlay__ {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       /* 4 ports on VSC8514 */
+                       slot2_qsgmii0: ethernet-phy@8 {
+                               reg = <0x8>;
+                       };
+
+                       slot2_qsgmii1: ethernet-phy@9 {
+                               reg = <0x9>;
+                       };
+
+                       slot2_qsgmii2: ethernet-phy@a {
+                               reg = <0xa>;
+                       };
+
+                       slot2_qsgmii3: ethernet-phy@b {
+                               reg = <0xb>;
+                       };
+               };
+       };
+
+       fragment@3 {
+               target = <&mscc_felix_ports>;
+
+               __overlay__ {
+                       port@0 {
+                               status = "okay";
+                               phy-handle = <&slot2_qsgmii0>;
+                               phy-mode = "qsgmii";
+                               managed = "in-band-status";
+                       };
+
+                       port@1 {
+                               status = "okay";
+                               phy-handle = <&slot2_qsgmii1>;
+                               phy-mode = "qsgmii";
+                               managed = "in-band-status";
+                       };
+
+                       port@2 {
+                               status = "okay";
+                               phy-handle = <&slot2_qsgmii2>;
+                               phy-mode = "qsgmii";
+                               managed = "in-band-status";
+                       };
+
+                       port@3 {
+                               status = "okay";
+                               phy-handle = <&slot2_qsgmii3>;
+                               phy-mode = "qsgmii";
+                               managed = "in-band-status";
+                       };
+               };
+       };
+
+       fragment@4 {
+               target = <&mscc_felix>;
+
+               __overlay__ {
+                       status = "okay";
+               };
+       };
+};
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-7777.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-7777.dts
new file mode 100644 (file)
index 0000000..eb6a1e6
--- /dev/null
@@ -0,0 +1,82 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree fragment for LS1028A QDS board, serdes 7777
+ *
+ * Copyright 2019-2021 NXP
+ *
+ * Requires a LS1028A QDS board without lane B rework.
+ * Requires a SCH-30841 card without lane A/C rewire and with a FW with muxing
+ * disabled, plugged in slot 1.
+ */
+
+/dts-v1/;
+/plugin/;
+
+/ {
+       fragment@0 {
+               target = <&mdio_slot1>;
+
+               __overlay__ {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       /* 4 ports on AQR412 */
+                       slot1_sxgmii0: ethernet-phy@0 {
+                               reg = <0x0>;
+                               compatible = "ethernet-phy-ieee802.3-c45";
+                       };
+
+                       slot1_sxgmii1: ethernet-phy@1 {
+                               reg = <0x1>;
+                               compatible = "ethernet-phy-ieee802.3-c45";
+                       };
+
+                       slot1_sxgmii2: ethernet-phy@2 {
+                               reg = <0x2>;
+                               compatible = "ethernet-phy-ieee802.3-c45";
+                       };
+
+                       slot1_sxgmii3: ethernet-phy@3 {
+                               reg = <0x3>;
+                               compatible = "ethernet-phy-ieee802.3-c45";
+                       };
+               };
+       };
+
+       fragment@1 {
+               target = <&mscc_felix_ports>;
+
+               __overlay__ {
+                       port@0 {
+                               status = "okay";
+                               phy-handle = <&slot1_sxgmii0>;
+                               phy-mode = "2500base-x";
+                       };
+
+                       port@1 {
+                               status = "okay";
+                               phy-handle = <&slot1_sxgmii1>;
+                               phy-mode = "2500base-x";
+                       };
+
+                       port@2 {
+                               status = "okay";
+                               phy-handle = <&slot1_sxgmii2>;
+                               phy-mode = "2500base-x";
+                       };
+
+                       port@3 {
+                               status = "okay";
+                               phy-handle = <&slot1_sxgmii3>;
+                               phy-mode = "2500base-x";
+                       };
+               };
+       };
+
+       fragment@2 {
+               target = <&mscc_felix>;
+               __overlay__ {
+                       status = "okay";
+               };
+       };
+};
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-85bb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-85bb.dts
new file mode 100644 (file)
index 0000000..8e90c30
--- /dev/null
@@ -0,0 +1,107 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree fragment for LS1028A QDS board, serdes 85bb
+ *
+ * Copyright 2019-2021 NXP
+ *
+ * Requires a LS1028A QDS board with lane B rework.
+ * Requires a SCH-24801 card in slot 1 and a SCH-28021 card in slot 2.
+ */
+
+/dts-v1/;
+/plugin/;
+
+/ {
+       fragment@0 {
+               target = <&mdio_slot1>;
+
+               __overlay__ {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       slot1_sgmii: ethernet-phy@1c {
+                               /* 1st port on VSC8234 */
+                               reg = <0x1c>;
+                       };
+               };
+       };
+
+       fragment@1 {
+               target = <&enetc_port0>;
+
+               __overlay__ {
+                       phy-handle = <&slot1_sgmii>;
+                       phy-mode = "sgmii";
+                       managed = "in-band-status";
+                       status = "okay";
+               };
+       };
+
+       fragment@2 {
+               target = <&mdio_slot2>;
+
+               __overlay__ {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       /* 4 ports on VSC8514 */
+                       slot2_qsgmii0: ethernet-phy@8 {
+                               reg = <0x8>;
+                       };
+
+                       slot2_qsgmii1: ethernet-phy@9 {
+                               reg = <0x9>;
+                       };
+
+                       slot2_qsgmii2: ethernet-phy@a {
+                               reg = <0xa>;
+                       };
+
+                       slot2_qsgmii3: ethernet-phy@b {
+                               reg = <0xb>;
+                       };
+               };
+       };
+
+       fragment@3 {
+               target = <&mscc_felix_ports>;
+
+               __overlay__ {
+                       port@0 {
+                               status = "okay";
+                               phy-handle = <&slot2_qsgmii0>;
+                               phy-mode = "qsgmii";
+                               managed = "in-band-status";
+                       };
+
+                       port@1 {
+                               status = "okay";
+                               phy-handle = <&slot2_qsgmii1>;
+                               phy-mode = "qsgmii";
+                               managed = "in-band-status";
+                       };
+
+                       port@2 {
+                               status = "okay";
+                               phy-handle = <&slot2_qsgmii2>;
+                               phy-mode = "qsgmii";
+                               managed = "in-band-status";
+                       };
+
+                       port@3 {
+                               status = "okay";
+                               phy-handle = <&slot2_qsgmii3>;
+                               phy-mode = "qsgmii";
+                               managed = "in-band-status";
+                       };
+               };
+       };
+
+       fragment@4 {
+               target = <&mscc_felix>;
+
+               __overlay__ {
+                       status = "okay";
+               };
+       };
+};
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-899b.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-899b.dts
new file mode 100644 (file)
index 0000000..5d0a094
--- /dev/null
@@ -0,0 +1,75 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree fragment for LS1028A QDS board, serdes 85xx
+ *
+ * Copyright 2019-2021 NXP
+ *
+ * Requires a LS1028A QDS board without lane B rework.
+ * Requires a SCH-24801 card in slot 1.
+ */
+
+/dts-v1/;
+/plugin/;
+
+/ {
+       fragment@0 {
+               target = <&mdio_slot1>;
+               __overlay__ {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       /* VSC8234 */
+                       slot1_sgmii0: ethernet-phy@1c {
+                               reg = <0x1c>;
+                       };
+
+                       slot1_sgmii1: ethernet-phy@1d {
+                               reg = <0x1d>;
+                       };
+
+                       slot1_sgmii2: ethernet-phy@1e {
+                               reg = <0x1e>;
+                       };
+
+                       slot1_sgmii3: ethernet-phy@1f {
+                               reg = <0x1f>;
+                       };
+               };
+       };
+
+       fragment@1 {
+               target = <&enetc_port0>;
+               __overlay__ {
+                       phy-handle = <&slot1_sgmii0>;
+                       phy-mode = "sgmii";
+                       managed = "in-band-status";
+                       status = "okay";
+               };
+       };
+
+       fragment@2 {
+               target = <&mscc_felix_ports>;
+               __overlay__ {
+                       port@1 {
+                               status = "okay";
+                               phy-handle = <&slot1_sgmii1>;
+                               phy-mode = "sgmii";
+                               managed = "in-band-status";
+                       };
+
+                       port@2 {
+                               status = "okay";
+                               phy-handle = <&slot1_sgmii2>;
+                               phy-mode = "sgmii";
+                               managed = "in-band-status";
+                       };
+               };
+       };
+
+       fragment@3 {
+               target = <&mscc_felix>;
+               __overlay__ {
+                       status = "okay";
+               };
+       };
+};
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-9999.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-9999.dts
new file mode 100644 (file)
index 0000000..1ef743c
--- /dev/null
@@ -0,0 +1,79 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree fragment for LS1028A QDS board, serdes 85xx
+ *
+ * Copyright 2019-2021 NXP
+ *
+ * Requires a LS1028A QDS board without lane B rework.
+ * Requires a SCH-24801 card in slot 1.
+ */
+
+/dts-v1/;
+/plugin/;
+
+/ {
+       fragment@0 {
+               target = <&mdio_slot1>;
+               __overlay__ {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       /* VSC8234 */
+                       slot1_sgmii0: ethernet-phy@1c {
+                               reg = <0x1c>;
+                       };
+
+                       slot1_sgmii1: ethernet-phy@1d {
+                               reg = <0x1d>;
+                       };
+
+                       slot1_sgmii2: ethernet-phy@1e {
+                               reg = <0x1e>;
+                       };
+
+                       slot1_sgmii3: ethernet-phy@1f {
+                               reg = <0x1f>;
+                       };
+               };
+       };
+
+       fragment@1 {
+               target = <&mscc_felix_ports>;
+               __overlay__ {
+                       port@0 {
+                               status = "okay";
+                               phy-handle = <&slot1_sgmii0>;
+                               phy-mode = "sgmii";
+                               managed = "in-band-status";
+                       };
+
+                       port@1 {
+                               status = "okay";
+                               phy-handle = <&slot1_sgmii1>;
+                               phy-mode = "sgmii";
+                               managed = "in-band-status";
+                       };
+
+                       port@2 {
+                               status = "okay";
+                               phy-handle = <&slot1_sgmii2>;
+                               phy-mode = "sgmii";
+                               managed = "in-band-status";
+                       };
+
+                       port@3 {
+                               status = "okay";
+                               phy-handle = <&slot1_sgmii3>;
+                               phy-mode = "sgmii";
+                               managed = "in-band-status";
+                       };
+               };
+       };
+
+       fragment@2 {
+               target = <&mscc_felix>;
+               __overlay__ {
+                       status = "okay";
+               };
+       };
+};
index 6e2a1da..177bc14 100644 (file)
@@ -25,7 +25,7 @@
                serial1 = &duart1;
                mmc0 = &esdhc;
                mmc1 = &esdhc1;
-               rtc1 = &ftm_alarm0;
+               rtc1 = &ftm_alarm1;
        };
 
        chosen {
        status = "okay";
 };
 
+&enetc_port1 {
+       phy-handle = <&qds_phy1>;
+       phy-mode = "rgmii-id";
+       status = "okay";
+};
+
+&enetc_port2 {
+       status = "okay";
+};
+
 &esdhc {
        status = "okay";
 };
        };
 };
 
+&ftm_alarm1 {
+       status = "okay";
+};
+
 &i2c0 {
        status = "okay";
 
                                vcc-supply = <&sb_3v3>;
                        };
 
-                       rtc@51 {
-                               compatible = "nxp,pcf2129";
-                               reg = <0x51>;
-                       };
-
                        eeprom@56 {
                                compatible = "atmel,24c512";
                                reg = <0x56>;
 
 };
 
-&enetc_port1 {
-       phy-handle = <&qds_phy1>;
-       phy-mode = "rgmii-id";
+&i2c1 {
        status = "okay";
+
+       rtc@51 {
+               compatible = "nxp,pcf2129";
+               reg = <0x51>;
+       };
 };
 
 &lpuart0 {
        status = "okay";
 };
 
+&lpuart1 {
+       status = "okay";
+};
+
+&mscc_felix_port4 {
+       ethernet = <&enetc_port2>;
+       status = "okay";
+};
+
 &sai1 {
        status = "okay";
 };
index 7719f44..68c31cb 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * Device Tree file for NXP LS1028A RDB Board.
  *
- * Copyright 2018 NXP
+ * Copyright 2018-2021 NXP
  *
  * Harninder Rai <harninder.rai@nxp.com>
  *
                serial1 = &duart1;
                mmc0 = &esdhc;
                mmc1 = &esdhc1;
-               rtc1 = &ftm_alarm0;
+               rtc1 = &ftm_alarm1;
+               spi0 = &fspi;
+               ethernet0 = &enetc_port0;
+               ethernet1 = &enetc_port2;
+               ethernet2 = &mscc_felix_port0;
+               ethernet3 = &mscc_felix_port1;
+               ethernet4 = &mscc_felix_port2;
+               ethernet5 = &mscc_felix_port3;
        };
 
        chosen {
        };
 };
 
+&duart0 {
+       status = "okay";
+};
+
+&duart1 {
+       status = "okay";
+};
+
+&enetc_mdio_pf3 {
+       sgmii_phy0: ethernet-phy@2 {
+               reg = <0x2>;
+       };
+
+       /* VSC8514 QSGMII quad PHY */
+       qsgmii_phy0: ethernet-phy@10 {
+               reg = <0x10>;
+       };
+
+       qsgmii_phy1: ethernet-phy@11 {
+               reg = <0x11>;
+       };
+
+       qsgmii_phy2: ethernet-phy@12 {
+               reg = <0x12>;
+       };
+
+       qsgmii_phy3: ethernet-phy@13 {
+               reg = <0x13>;
+       };
+};
+
+&enetc_port0 {
+       phy-handle = <&sgmii_phy0>;
+       phy-mode = "sgmii";
+       managed = "in-band-status";
+       status = "okay";
+};
+
+&enetc_port2 {
+       status = "okay";
+};
+
 &esdhc {
        sd-uhs-sdr104;
        sd-uhs-sdr50;
        };
 };
 
+&ftm_alarm1 {
+       status = "okay";
+};
+
 &i2c0 {
        status = "okay";
 
        };
 };
 
-&duart0 {
-       status = "okay";
-};
-
-&duart1 {
-       status = "okay";
-};
-
-&enetc_mdio_pf3 {
-       sgmii_phy0: ethernet-phy@2 {
-               reg = <0x2>;
-       };
-
-       /* VSC8514 QSGMII quad PHY */
-       qsgmii_phy0: ethernet-phy@10 {
-               reg = <0x10>;
-       };
-
-       qsgmii_phy1: ethernet-phy@11 {
-               reg = <0x11>;
-       };
-
-       qsgmii_phy2: ethernet-phy@12 {
-               reg = <0x12>;
-       };
-
-       qsgmii_phy3: ethernet-phy@13 {
-               reg = <0x13>;
-       };
-};
-
-&enetc_port0 {
-       phy-handle = <&sgmii_phy0>;
-       phy-mode = "sgmii";
-       managed = "in-band-status";
-       status = "okay";
-};
-
-&enetc_port2 {
-       status = "okay";
-};
-
 &mscc_felix {
        status = "okay";
 };
        status = "okay";
 };
 
+&pwm0 {
+       status = "okay";
+};
+
 &sai4 {
        status = "okay";
 };
index fd3f3e8..5bb8c26 100644 (file)
                };
        };
 
+       rtc_clk: rtc-clk {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <32768>;
+               clock-output-names = "rtc_clk";
+       };
+
        sysclk: sysclk {
                compatible = "fixed-clock";
                #clock-cells = <0>;
                        status = "disabled";
                };
 
+               pcie_ep1: pcie-ep@3400000 {
+                       compatible = "fsl,ls1028a-pcie-ep","fsl,ls-pcie-ep";
+                       reg = <0x00 0x03400000 0x0 0x00100000
+                              0x80 0x00000000 0x8 0x00000000>;
+                       reg-names = "regs", "addr_space";
+                       interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; /* PME interrupt */
+                       interrupt-names = "pme";
+                       num-ib-windows = <6>;
+                       num-ob-windows = <8>;
+                       status = "disabled";
+               };
+
                pcie2: pcie@3500000 {
                        compatible = "fsl,ls1028a-pcie";
                        reg = <0x00 0x03500000 0x0 0x00100000>, /* controller registers */
                        status = "disabled";
                };
 
+               pcie_ep2: pcie-ep@3500000 {
+                       compatible = "fsl,ls1028a-pcie-ep","fsl,ls-pcie-ep";
+                       reg = <0x00 0x03500000 0x0 0x00100000
+                              0x88 0x00000000 0x8 0x00000000>;
+                       reg-names = "regs", "addr_space";
+                       interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>; /* PME interrupt */
+                       interrupt-names = "pme";
+                       num-ib-windows = <6>;
+                       num-ob-windows = <8>;
+                       status = "disabled";
+               };
+
                smmu: iommu@5000000 {
                        compatible = "arm,mmu-500";
                        reg = <0 0x5000000 0 0x800000>;
                                interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
                                status = "disabled";
 
-                               ports {
+                               mscc_felix_ports: ports {
                                        #address-cells = <1>;
                                        #size-cells = <0>;
 
                        reg = <0x01 0xf0800000 0x0 0x10000>;
                };
 
+               pwm0: pwm@2800000 {
+                       compatible = "fsl,vf610-ftm-pwm";
+                       #pwm-cells = <3>;
+                       reg = <0x0 0x2800000 0x0 0x10000>;
+                       clock-names = "ftm_sys", "ftm_ext",
+                                     "ftm_fix", "ftm_cnt_clk_en";
+                       clocks = <&clockgen 4 1>, <&clockgen 4 1>,
+                                <&rtc_clk>, <&clockgen 4 1>;
+                       status = "disabled";
+               };
+
+               pwm1: pwm@2810000 {
+                       compatible = "fsl,vf610-ftm-pwm";
+                       #pwm-cells = <3>;
+                       reg = <0x0 0x2810000 0x0 0x10000>;
+                       clock-names = "ftm_sys", "ftm_ext",
+                                     "ftm_fix", "ftm_cnt_clk_en";
+                       clocks = <&clockgen 4 1>, <&clockgen 4 1>,
+                                <&rtc_clk>, <&clockgen 4 1>;
+                       status = "disabled";
+               };
+
+               pwm2: pwm@2820000 {
+                       compatible = "fsl,vf610-ftm-pwm";
+                       #pwm-cells = <3>;
+                       reg = <0x0 0x2820000 0x0 0x10000>;
+                       clock-names = "ftm_sys", "ftm_ext",
+                                     "ftm_fix", "ftm_cnt_clk_en";
+                       clocks = <&clockgen 4 1>, <&clockgen 4 1>,
+                                <&rtc_clk>, <&clockgen 4 1>;
+                       status = "disabled";
+               };
+
+               pwm3: pwm@2830000 {
+                       compatible = "fsl,vf610-ftm-pwm";
+                       #pwm-cells = <3>;
+                       reg = <0x0 0x2830000 0x0 0x10000>;
+                       clock-names = "ftm_sys", "ftm_ext",
+                                     "ftm_fix", "ftm_cnt_clk_en";
+                       clocks = <&clockgen 4 1>, <&clockgen 4 1>,
+                                <&rtc_clk>, <&clockgen 4 1>;
+                       status = "disabled";
+               };
+
+               pwm4: pwm@2840000 {
+                       compatible = "fsl,vf610-ftm-pwm";
+                       #pwm-cells = <3>;
+                       reg = <0x0 0x2840000 0x0 0x10000>;
+                       clock-names = "ftm_sys", "ftm_ext",
+                                     "ftm_fix", "ftm_cnt_clk_en";
+                       clocks = <&clockgen 4 1>, <&clockgen 4 1>,
+                                <&rtc_clk>, <&clockgen 4 1>;
+                       status = "disabled";
+               };
+
+               pwm5: pwm@2850000 {
+                       compatible = "fsl,vf610-ftm-pwm";
+                       #pwm-cells = <3>;
+                       reg = <0x0 0x2850000 0x0 0x10000>;
+                       clock-names = "ftm_sys", "ftm_ext",
+                                     "ftm_fix", "ftm_cnt_clk_en";
+                       clocks = <&clockgen 4 1>, <&clockgen 4 1>,
+                                <&rtc_clk>, <&clockgen 4 1>;
+                       status = "disabled";
+               };
+
+               pwm6: pwm@2860000 {
+                       compatible = "fsl,vf610-ftm-pwm";
+                       #pwm-cells = <3>;
+                       reg = <0x0 0x2860000 0x0 0x10000>;
+                       clock-names = "ftm_sys", "ftm_ext",
+                                     "ftm_fix", "ftm_cnt_clk_en";
+                       clocks = <&clockgen 4 1>, <&clockgen 4 1>,
+                                <&rtc_clk>, <&clockgen 4 1>;
+                       status = "disabled";
+               };
+
+               pwm7: pwm@2870000 {
+                       compatible = "fsl,vf610-ftm-pwm";
+                       #pwm-cells = <3>;
+                       reg = <0x0 0x2870000 0x0 0x10000>;
+                       clock-names = "ftm_sys", "ftm_ext",
+                                     "ftm_fix", "ftm_cnt_clk_en";
+                       clocks = <&clockgen 4 1>, <&clockgen 4 1>,
+                                <&rtc_clk>, <&clockgen 4 1>;
+                       status = "disabled";
+               };
+
                rcpm: power-controller@1e34040 {
                        compatible = "fsl,ls1028a-rcpm", "fsl,qoriq-rcpm-2.1+";
                        reg = <0x0 0x1e34040 0x0 0x1c>;
                        reg = <0x0 0x2800000 0x0 0x10000>;
                        fsl,rcpm-wakeup = <&rcpm 0x0 0x0 0x0 0x0 0x4000 0x0 0x0>;
                        interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
+                       status = "disabled";
+               };
+
+               ftm_alarm1: timer@2810000 {
+                       compatible = "fsl,ls1028a-ftm-alarm";
+                       reg = <0x0 0x2810000 0x0 0x10000>;
+                       fsl,rcpm-wakeup = <&rcpm 0x0 0x0 0x0 0x0 0x4000 0x0 0x0>;
+                       interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
+                       status = "disabled";
                };
        };
 
index 3516af4..b290605 100644 (file)
@@ -94,6 +94,8 @@
                compatible = "n25q128a13", "jedec,spi-nor";  /* 16MB */
                reg = <0>;
                spi-max-frequency = <1000000>; /* input clock */
+               fsl,spi-cs-sck-delay = <100>;
+               fsl,spi-sck-cs-delay = <100>;
        };
 
        slic@2 {
index f891ef6..3ed1f2c 100644 (file)
                clock-output-names = "sysclk";
        };
 
+       reboot {
+               compatible = "syscon-reboot";
+               regmap = <&reset>;
+               offset = <0x0>;
+               mask = <0x02>;
+       };
+
        soc {
                compatible = "simple-bus";
                #address-cells = <2>;
                        little-endian;
                };
 
+               reset: syscon@1e60000 {
+                       compatible = "fsl,ls1088a-reset", "syscon";
+                       reg = <0x0 0x1e60000 0x0 0x10000>;
+               };
+
                isc: syscon@1f70000 {
                        compatible = "fsl,ls1088a-isc", "syscon";
                        reg = <0x0 0x1f70000 0x0 0x10000>;
                        dr_mode = "host";
                        snps,quirk-frame-length-adjustment = <0x20>;
                        snps,dis_rxdet_inp3_quirk;
+                       snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
                        status = "disabled";
                };
 
index d858d9c..2ecfa90 100644 (file)
                regulator-boot-on;
                regulator-always-on;
        };
+
+       mdio-mux-1 {
+               compatible = "mdio-mux-multiplexer";
+               mux-controls = <&mux 0>;
+               mdio-parent-bus = <&emdio1>;
+               #address-cells=<1>;
+               #size-cells = <0>;
+
+               mdio@0 { /* On-board PHY #1 RGMI1*/
+                       reg = <0x00>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
+               mdio@8 { /* On-board PHY #2 RGMI2*/
+                       reg = <0x8>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
+               mdio@18 { /* Slot #1 */
+                       reg = <0x18>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
+               mdio@19 { /* Slot #2 */
+                       reg = <0x19>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
+               mdio@1a { /* Slot #3 */
+                       reg = <0x1a>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
+               mdio@1b { /* Slot #4 */
+                       reg = <0x1b>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
+               mdio@1c { /* Slot #5 */
+                       reg = <0x1c>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
+               mdio@1d { /* Slot #6 */
+                       reg = <0x1d>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
+               mdio@1e { /* Slot #7 */
+                       reg = <0x1e>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
+               mdio@1f { /* Slot #8 */
+                       reg = <0x1f>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+       };
+
+       mdio-mux-2 {
+               compatible = "mdio-mux-multiplexer";
+               mux-controls = <&mux 1>;
+               mdio-parent-bus = <&emdio2>;
+               #address-cells=<1>;
+               #size-cells = <0>;
+
+               mdio@0 { /* Slot #1 (secondary EMI) */
+                       reg = <0x00>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
+               mdio@1 { /* Slot #2 (secondary EMI) */
+                       reg = <0x01>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
+               mdio@2 { /* Slot #3 (secondary EMI) */
+                       reg = <0x02>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
+               mdio@3 { /* Slot #4 (secondary EMI) */
+                       reg = <0x03>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
+               mdio@4 { /* Slot #5 (secondary EMI) */
+                       reg = <0x04>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
+               mdio@5 { /* Slot #6 (secondary EMI) */
+                       reg = <0x05>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
+               mdio@6 { /* Slot #7 (secondary EMI) */
+                       reg = <0x06>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
+               mdio@7 { /* Slot #8 (secondary EMI) */
+                       reg = <0x07>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+       };
 };
 
 &can0 {
        };
 };
 
+&emdio1 {
+       status = "okay";
+};
+
+&emdio2 {
+       status = "okay";
+};
+
 &esdhc0 {
        status = "okay";
 };
 &i2c0 {
        status = "okay";
 
+       fpga@66 {
+               compatible = "fsl,lx2160aqds-fpga", "fsl,fpga-qixis-i2c",
+                            "simple-mfd";
+               reg = <0x66>;
+
+               mux: mux-controller {
+                       compatible = "reg-mux";
+                       #mux-control-cells = <1>;
+                       mux-reg-masks = <0x54 0xf8>, /* 0: reg 0x54, bits 7:3 */
+                                       <0x54 0x07>; /* 1: reg 0x54, bit 2:0 */
+               };
+       };
+
        i2c-mux@77 {
                compatible = "nxp,pca9547";
                reg = <0x77>;
        };
 };
 
+&optee {
+       status = "okay";
+};
+
 &sata0 {
        status = "okay";
 };
index 028ff80..0c44b3c 100644 (file)
        managed = "in-band-status";
 };
 
+&dpmac5 {
+       phy-handle = <&inphi_phy>;
+};
+
+&dpmac6 {
+       phy-handle = <&inphi_phy>;
+};
+
 &dpmac17 {
        phy-handle = <&rgmii_phy1>;
        phy-connection-type = "rgmii-id";
        };
 };
 
+&emdio2 {
+       status = "okay";
+
+       inphi_phy: ethernet-phy@0 {
+               compatible = "ethernet-phy-id0210.7440";
+               reg = <0x0>;
+       };
+};
+
 &esdhc0 {
        sd-uhs-sdr104;
        sd-uhs-sdr50;
        };
 };
 
+&optee {
+       status = "okay";
+};
+
 &pcs_mdio3 {
        status = "okay";
 };
index dc8661e..6274bec 100644 (file)
                        interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
                        dr_mode = "host";
                        snps,quirk-frame-length-adjustment = <0x20>;
+                       usb3-lpm-capable;
                        snps,dis_rxdet_inp3_quirk;
                        snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
                        status = "disabled";
                        interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
                        dr_mode = "host";
                        snps,quirk-frame-length-adjustment = <0x20>;
+                       usb3-lpm-capable;
                        snps,dis_rxdet_inp3_quirk;
                        snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
                        status = "disabled";
                        };
                };
        };
+
+       firmware {
+               optee: optee {
+                       compatible = "linaro,optee-tz";
+                       method = "smc";
+                       status = "disabled";
+               };
+       };
 };
index e1defee..a1644ce 100644 (file)
        };
 };
 
+&can0 {
+       status = "okay";
+};
+
+&can1 {
+       status = "okay";
+};
+
 &crypto {
        status = "okay";
 };
 };
 
 &esdhc0 {
+       sd-uhs-sdr104;
+       sd-uhs-sdr50;
+       sd-uhs-sdr25;
+       sd-uhs-sdr12;
        status = "okay";
 };
 
 &esdhc1 {
+       mmc-hs200-1_8v;
+       mmc-hs400-1_8v;
+       bus-width = <8>;
        status = "okay";
 };
 
                        rtc@51 {
                                compatible = "nxp,pcf2129";
                                reg = <0x51>;
+                               /* IRQ_RTC_B -> IRQ11_B(CPLD) -> IRQ11(CPU), active low */
+                               interrupts-extended = <&extirq 11 IRQ_TYPE_LEVEL_LOW>;
                        };
                };
        };
 };
 
+&optee {
+       status = "okay";
+};
+
 &sata0 {
        status = "okay";
 };
index 6f5e636..0da3118 100644 (file)
                enable-active-high;
        };
 
+       reg_usbotg1: regulator-usbotg1 {
+               compatible = "regulator-fixed";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_reg_usb_otg1>;
+               regulator-name = "usb_otg_vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       reg_camera: regulator-camera {
+               compatible = "regulator-fixed";
+               regulator-name = "mipi_pwr";
+               regulator-min-microvolt = <2800000>;
+               regulator-max-microvolt = <2800000>;
+               gpio = <&pca6416_1 0 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+               startup-delay-us = <100000>;
+       };
+
        reg_usdhc2_vmmc: regulator-usdhc2 {
                compatible = "regulator-fixed";
                regulator-name = "VSD_3V3";
        };
 };
 
+&csi {
+       status = "okay";
+};
+
 &ecspi2 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_espi2>;
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_i2c2>;
        status = "okay";
+
+       camera@3c {
+               compatible = "ovti,ov5640";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_ov5640>;
+               reg = <0x3c>;
+               clocks = <&clk IMX8MM_CLK_CLKO1>;
+               clock-names = "xclk";
+               assigned-clocks = <&clk IMX8MM_CLK_CLKO1>;
+               assigned-clock-parents = <&clk IMX8MM_CLK_24M>;
+               assigned-clock-rates = <24000000>;
+               AVDD-supply = <&reg_camera>;  /* 2.8v */
+               powerdown-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
+               reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+
+               port {
+                       /* MIPI CSI-2 bus endpoint */
+                       ov5640_to_mipi_csi2: endpoint {
+                               remote-endpoint = <&imx8mm_mipi_csi_in>;
+                               clock-lanes = <0>;
+                               data-lanes = <1 2>;
+                       };
+               };
+       };
 };
 
 &i2c4 {
        };
 };
 
+&mipi_csi {
+       status = "okay";
+       ports {
+               port@0 {
+                       imx8mm_mipi_csi_in: endpoint {
+                               remote-endpoint = <&ov5640_to_mipi_csi2>;
+                               data-lanes = <1 2>;
+                       };
+               };
+       };
+};
+
 &sai3 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_sai3>;
        status = "okay";
 };
 
+&usbotg1 {
+       vbus-supply = <&reg_usbotg1>;
+       disable-over-current;
+       dr_mode="otg";
+       status = "okay";
+};
+
+&usbotg2 {
+       pinctrl-names = "default";
+       disable-over-current;
+       dr_mode="host";
+       status = "okay";
+};
+
+&usbphynop2 {
+       reset-gpios = <&pca6416_1 7 GPIO_ACTIVE_HIGH>;
+};
+
 &usdhc2 {
        pinctrl-names = "default", "state_100mhz", "state_200mhz";
        pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
                >;
        };
 
+       pinctrl_ov5640: ov5640grp {
+               fsl,pins = <
+                       MX8MM_IOMUXC_GPIO1_IO07_GPIO1_IO7               0x19
+                       MX8MM_IOMUXC_GPIO1_IO06_GPIO1_IO6               0x19
+                       MX8MM_IOMUXC_GPIO1_IO14_CCMSRCGPCMIX_CLKO1      0x59
+               >;
+       };
+
        pinctrl_pcal6414: pcal6414-gpiogrp {
                fsl,pins = <
                        MX8MM_IOMUXC_SAI2_MCLK_GPIO4_IO27               0x19
                >;
        };
 
+       pinctrl_reg_usb_otg1: usbotg1grp {
+               fsl,pins = <
+                       MX8MM_IOMUXC_SAI3_RXC_GPIO4_IO29     0x19
+               >;
+       };
+
        pinctrl_sai3: sai3grp {
                fsl,pins = <
                        MX8MM_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC     0xd6
index 40f5e7a..cf07987 100644 (file)
        bus-width = <4>;
        non-removable;
        cap-power-off-card;
-       pm-ignore-notify;
        keep-power-in-suspend;
        mmc-pwrseq = <&usdhc1_pwrseq>;
        status = "okay";
index e033d02..3bac87b 100644 (file)
                        reg = <0>;
                        reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;
                        reset-assert-us = <10000>;
+                       qca,disable-smarteee;
+                       vddio-supply = <&vddio>;
+
+                       vddio: vddio-regulator {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                       };
                };
        };
 };
index 5389d6f..5027454 100644 (file)
@@ -91,7 +91,6 @@
        max-frequency = <50000000>;
        bus-width = <4>;
        no-1-8-v;
-       pm-ignore-notify;
        keep-power-in-suspend;
        status = "okay";
 };
index a4a2ada..ddac8bc 100644 (file)
@@ -91,7 +91,6 @@
        max-frequency = <50000000>;
        bus-width = <4>;
        no-1-8-v;
-       pm-ignore-notify;
        keep-power-in-suspend;
        status = "okay";
 };
diff --git a/arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml-mba8mx.dts b/arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml-mba8mx.dts
new file mode 100644 (file)
index 0000000..7844878
--- /dev/null
@@ -0,0 +1,253 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright 2020-2021 TQ-Systems GmbH
+ */
+
+/dts-v1/;
+
+#include "imx8mm-tqma8mqml.dtsi"
+#include "mba8mx.dtsi"
+
+/ {
+       model = "TQ-Systems GmbH i.MX8MM TQMa8MxML on MBa8Mx";
+       compatible = "tq,imx8mm-tqma8mqml-mba8mx", "tq,imx8mm-tqma8mqml", "fsl,imx8mm";
+
+       aliases {
+               eeprom0 = &eeprom3;
+               mmc0 = &usdhc3;
+               mmc1 = &usdhc2;
+               mmc2 = &usdhc1;
+               rtc0 = &pcf85063;
+               rtc1 = &snvs_rtc;
+       };
+
+       reg_usdhc2_vmmc: regulator-vmmc {
+               compatible = "regulator-fixed";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_reg_usdhc2_vmmc>;
+               regulator-name = "VSD_3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+               startup-delay-us = <100>;
+               off-on-delay-us = <12000>;
+       };
+
+       extcon_usbotg1: extcon-usbotg1 {
+               compatible = "linux,extcon-usb-gpio";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb1_extcon>;
+               id-gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>;
+       };
+};
+
+&i2c1 {
+       expander2: gpio@27 {
+               compatible = "nxp,pca9555";
+               reg = <0x27>;
+               gpio-controller;
+               #gpio-cells = <2>;
+               vcc-supply = <&reg_vcc_3v3>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_expander>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+};
+
+&sai3 {
+       assigned-clocks = <&clk IMX8MM_CLK_SAI3>;
+       assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
+       clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k", "pll11k";
+       clocks = <&clk IMX8MM_CLK_SAI3_IPG>, <&clk IMX8MM_CLK_DUMMY>,
+               <&clk IMX8MM_CLK_SAI3_ROOT>, <&clk IMX8MM_CLK_DUMMY>,
+               <&clk IMX8MM_CLK_DUMMY>, <&clk IMX8MM_AUDIO_PLL1_OUT>,
+               <&clk IMX8MM_AUDIO_PLL2_OUT>;
+};
+
+&tlv320aic3x04 {
+       clock-names = "mclk";
+       clocks = <&clk IMX8MM_CLK_SAI3_ROOT>;
+};
+
+&uart1 {
+       assigned-clocks = <&clk IMX8MM_CLK_UART1>;
+       assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
+};
+
+&uart2 {
+       assigned-clocks = <&clk IMX8MM_CLK_UART2>;
+       assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
+};
+
+&usbotg1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usbotg1>;
+       dr_mode = "otg";
+       extcon = <&extcon_usbotg1>;
+       srp-disable;
+       hnp-disable;
+       adp-disable;
+       power-active-high;
+       over-current-active-low;
+       status = "okay";
+};
+
+&usbotg2 {
+       dr_mode = "host";
+       disable-over-current;
+       vbus-supply = <&reg_hub_vbus>;
+       status = "okay";
+};
+
+&iomuxc {
+       pinctrl_ecspi1: ecspi1grp {
+               fsl,pins = <MX8MM_IOMUXC_ECSPI1_SCLK_ECSPI1_SCLK        0x00000006>,
+                          <MX8MM_IOMUXC_ECSPI1_MOSI_ECSPI1_MOSI        0x00000006>,
+                          <MX8MM_IOMUXC_ECSPI1_MISO_ECSPI1_MISO        0x00000006>,
+                          <MX8MM_IOMUXC_ECSPI1_SS0_GPIO5_IO9           0x00000006>;
+       };
+
+       pinctrl_ecspi2: ecspi2grp {
+               fsl,pins = <MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK        0x00000006>,
+                          <MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI        0x00000006>,
+                          <MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO        0x00000006>,
+                          <MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13          0x00000006>;
+       };
+
+       pinctrl_expander: expandergrp {
+               fsl,pins = <MX8MM_IOMUXC_GPIO1_IO09_GPIO1_IO9           0x94>;
+       };
+
+       pinctrl_fec1: fec1grp {
+               fsl,pins = <MX8MM_IOMUXC_ENET_MDC_ENET1_MDC             0x40000002>,
+                          <MX8MM_IOMUXC_ENET_MDIO_ENET1_MDIO           0x40000002>,
+                          <MX8MM_IOMUXC_ENET_TD3_ENET1_RGMII_TD3       0x14>,
+                          <MX8MM_IOMUXC_ENET_TD2_ENET1_RGMII_TD2       0x14>,
+                          <MX8MM_IOMUXC_ENET_TD1_ENET1_RGMII_TD1       0x14>,
+                          <MX8MM_IOMUXC_ENET_TD0_ENET1_RGMII_TD0       0x14>,
+                          <MX8MM_IOMUXC_ENET_RD3_ENET1_RGMII_RD3       0x90>,
+                          <MX8MM_IOMUXC_ENET_RD2_ENET1_RGMII_RD2       0x90>,
+                          <MX8MM_IOMUXC_ENET_RD1_ENET1_RGMII_RD1       0x90>,
+                          <MX8MM_IOMUXC_ENET_RD0_ENET1_RGMII_RD0       0x90>,
+                          <MX8MM_IOMUXC_ENET_TXC_ENET1_RGMII_TXC       0x14>,
+                          <MX8MM_IOMUXC_ENET_RXC_ENET1_RGMII_RXC       0x90>,
+                          <MX8MM_IOMUXC_ENET_RX_CTL_ENET1_RGMII_RX_CTL 0x90>,
+                          <MX8MM_IOMUXC_ENET_TX_CTL_ENET1_RGMII_TX_CTL 0x14>;
+       };
+
+       pinctrl_gpiobutton: gpiobuttongrp {
+               fsl,pins = <MX8MM_IOMUXC_GPIO1_IO05_GPIO1_IO5           0x84>,
+                          <MX8MM_IOMUXC_GPIO1_IO07_GPIO1_IO7           0x84>,
+                          <MX8MM_IOMUXC_SD1_CLK_GPIO2_IO0              0x84>;
+       };
+
+       pinctrl_gpioled: gpioledgrp {
+               fsl,pins = <MX8MM_IOMUXC_GPIO1_IO00_GPIO1_IO0           0x84>,
+                          <MX8MM_IOMUXC_NAND_DQS_GPIO3_IO14            0x84>;
+       };
+
+       pinctrl_i2c2: i2c2grp {
+               fsl,pins = <MX8MM_IOMUXC_I2C2_SCL_I2C2_SCL              0x40000004>,
+                          <MX8MM_IOMUXC_I2C2_SDA_I2C2_SDA              0x40000004>;
+       };
+
+       pinctrl_i2c2_gpio: i2c2gpiogrp {
+               fsl,pins = <MX8MM_IOMUXC_I2C2_SCL_GPIO5_IO16            0x40000004>,
+                          <MX8MM_IOMUXC_I2C2_SDA_GPIO5_IO17            0x40000004>;
+       };
+
+       pinctrl_i2c3: i2c3grp {
+               fsl,pins = <MX8MM_IOMUXC_I2C3_SCL_I2C3_SCL              0x40000004>,
+                          <MX8MM_IOMUXC_I2C3_SDA_I2C3_SDA              0x40000004>;
+       };
+
+       pinctrl_i2c3_gpio: i2c3gpiogrp {
+               fsl,pins = <MX8MM_IOMUXC_I2C3_SCL_GPIO5_IO18            0x40000004>,
+                          <MX8MM_IOMUXC_I2C3_SDA_GPIO5_IO19            0x40000004>;
+       };
+
+       pinctrl_pwm3: pwm3grp {
+               fsl,pins = <MX8MM_IOMUXC_GPIO1_IO14_PWM3_OUT            0x14>;
+       };
+
+       pinctrl_pwm4: pwm4grp {
+               fsl,pins = <MX8MM_IOMUXC_GPIO1_IO15_PWM4_OUT            0x14>;
+       };
+
+       pinctrl_sai3: sai3grp {
+               fsl,pins = <MX8MM_IOMUXC_SAI3_MCLK_SAI3_MCLK            0x94>,
+                          <MX8MM_IOMUXC_SAI3_RXC_SAI3_RX_BCLK          0x94>,
+                          <MX8MM_IOMUXC_SAI3_RXFS_SAI3_RX_SYNC         0x94>,
+                          <MX8MM_IOMUXC_SAI3_RXD_SAI3_RX_DATA0         0x94>,
+                          <MX8MM_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC         0x94>,
+                          <MX8MM_IOMUXC_SAI3_TXD_SAI3_TX_DATA0         0x94>,
+                          <MX8MM_IOMUXC_SAI3_TXC_SAI3_TX_BCLK          0x94>;
+       };
+
+       pinctrl_uart1: uart1grp {
+               fsl,pins = <MX8MM_IOMUXC_UART1_RXD_UART1_DCE_RX         0x16>,
+                          <MX8MM_IOMUXC_UART1_TXD_UART1_DCE_TX         0x16>;
+       };
+
+       pinctrl_uart2: uart2grp {
+               fsl,pins = <MX8MM_IOMUXC_UART2_RXD_UART2_DCE_RX         0x16>,
+                          <MX8MM_IOMUXC_UART2_TXD_UART2_DCE_TX         0x16>;
+       };
+
+       pinctrl_uart3: uart3grp {
+               fsl,pins = <MX8MM_IOMUXC_UART3_RXD_UART3_DCE_RX         0x16>,
+                          <MX8MM_IOMUXC_UART3_TXD_UART3_DCE_TX         0x16>;
+       };
+
+       pinctrl_uart4: uart4grp {
+               fsl,pins = <MX8MM_IOMUXC_UART4_RXD_UART4_DCE_RX         0x16>,
+                          <MX8MM_IOMUXC_UART4_TXD_UART4_DCE_TX         0x16>;
+       };
+
+       pinctrl_usbotg1: usbotg1grp {
+               fsl,pins = <MX8MM_IOMUXC_GPIO1_IO12_USB1_OTG_PWR        0x84>,
+                          <MX8MM_IOMUXC_GPIO1_IO13_USB1_OTG_OC         0x84>;
+       };
+
+       pinctrl_usb1_extcon: usb1-extcongrp {
+               fsl,pins = <MX8MM_IOMUXC_GPIO1_IO10_GPIO1_IO10          0x1c0>;
+       };
+
+       pinctrl_usdhc2_gpio: usdhc2grpgpiogrp {
+               fsl,pins = <MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12            0x84>;
+       };
+
+       pinctrl_usdhc2: usdhc2grp {
+               fsl,pins = <MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK             0x1d4>,
+                          <MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD             0x1d4>,
+                          <MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0         0x1d4>,
+                          <MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1         0x1d4>,
+                          <MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2         0x1d4>,
+                          <MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3         0x1d4>,
+                          <MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT      0x84>;
+       };
+
+       pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
+               fsl,pins = <MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK             0x1d4>,
+                          <MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD             0x1d4>,
+                          <MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0         0x1d4>,
+                          <MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1         0x1d4>,
+                          <MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2         0x1d4>,
+                          <MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3         0x1d4>,
+                          <MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT      0x84>;
+       };
+
+       pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
+               fsl,pins = <MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK             0x1d4>,
+                          <MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD             0x1d4>,
+                          <MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0         0x1d4>,
+                          <MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1         0x1d4>,
+                          <MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2         0x1d4>,
+                          <MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3         0x1d4>,
+                          <MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT      0x84>;
+       };
+};
diff --git a/arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml.dtsi
new file mode 100644 (file)
index 0000000..284e62a
--- /dev/null
@@ -0,0 +1,335 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright 2020-2021 TQ-Systems GmbH
+ */
+
+#include "imx8mm.dtsi"
+
+/ {
+       model = "TQ-Systems GmbH i.MX8MM TQMa8MxML";
+       compatible = "tq,imx8mm-tqma8mqml", "fsl,imx8mm";
+
+       memory@40000000 {
+               device_type = "memory";
+               /*  our minimum RAM config will be 1024 MiB */
+               reg = <0x00000000 0x40000000 0 0x40000000>;
+       };
+
+       /* e-MMC IO, needed for HS modes */
+       reg_vcc1v8: regulator-vcc1v8 {
+               compatible = "regulator-fixed";
+               regulator-name = "TQMA8MXML_VCC1V8";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+       };
+
+       /* identical to buck4_reg, but should never change */
+       reg_vcc3v3: regulator-vcc3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "TQMA8MXML_VCC3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
+       reserved-memory {
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+
+               /* global autoconfigured region for contiguous allocations */
+               linux,cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 640 MiB */
+                       size = <0 0x28000000>;
+                       /*  1024 - 128 MiB, our minimum RAM config will be 1024 MiB */
+                       alloc-ranges = <0 0x40000000 0 0x78000000>;
+                       linux,cma-default;
+               };
+       };
+};
+
+&A53_0 {
+       cpu-supply = <&buck2_reg>;
+};
+
+&flexspi {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_flexspi>;
+       status = "okay";
+
+       flash0: flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               spi-max-frequency = <84000000>;
+               spi-tx-bus-width = <1>;
+               spi-rx-bus-width = <4>;
+       };
+};
+
+&gpu_2d {
+       status = "okay";
+};
+
+&gpu_3d {
+       status = "okay";
+};
+
+&i2c1 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default", "gpio";
+       pinctrl-0 = <&pinctrl_i2c1>;
+       pinctrl-1 = <&pinctrl_i2c1_gpio>;
+       scl-gpios = <&gpio5 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+       sda-gpios = <&gpio5 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+       status = "okay";
+
+       sensor0: temperature-sensor-eeprom@1b {
+               compatible = "nxp,se97", "jedec,jc-42.4-temp";
+               reg = <0x1b>;
+       };
+
+       pca9450: pmic@25 {
+               compatible = "nxp,pca9450a";
+               reg = <0x25>;
+
+               /* PMIC PCA9450 PMIC_nINT GPIO1_IO08 */
+               pinctrl-0 = <&pinctrl_pmic>;
+               pinctrl-names = "default";
+               interrupt-parent = <&gpio1>;
+               interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
+
+               regulators {
+                       /* V_0V85_SOC: 0.85 */
+                       buck1_reg: BUCK1 {
+                               regulator-name = "BUCK1";
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <850000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <3125>;
+                       };
+
+                       /* VDD_ARM */
+                       buck2_reg: BUCK2 {
+                               regulator-name = "BUCK2";
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               nxp,dvs-run-voltage = <950000>;
+                               nxp,dvs-standby-voltage = <850000>;
+                               regulator-ramp-delay = <3125>;
+                       };
+
+                       /* V_0V85_GPU / DRAM / VPU */
+                       buck3_reg: BUCK3 {
+                               regulator-name = "BUCK3";
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <950000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <3125>;
+                       };
+
+                       /* VCC3V3 -> VMMC, ... must not be changed */
+                       buck4_reg: BUCK4 {
+                               regulator-name = "BUCK4";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       /* V_1V8 -> VQMMC, SPI-NOR, ... must not be changed */
+                       buck5_reg: BUCK5 {
+                               regulator-name = "BUCK5";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       /* V_1V1 -> RAM, ... must not be changed */
+                       buck6_reg: BUCK6 {
+                               regulator-name = "BUCK6";
+                               regulator-min-microvolt = <1100000>;
+                               regulator-max-microvolt = <1100000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       /* V_1V8_SNVS */
+                       ldo1_reg: LDO1 {
+                               regulator-name = "LDO1";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       /* V_0V8_SNVS */
+                       ldo2_reg: LDO2 {
+                               regulator-name = "LDO2";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <850000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       /* V_1V8_ANA */
+                       ldo3_reg: LDO3 {
+                               regulator-name = "LDO3";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       /* V_0V9_MIPI */
+                       ldo4_reg: LDO4 {
+                               regulator-name = "LDO4";
+                               regulator-min-microvolt = <900000>;
+                               regulator-max-microvolt = <900000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       /* VCC SD IO - switched using SD2 VSELECT */
+                       ldo5_reg: LDO5 {
+                               regulator-name = "LDO5";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                       };
+               };
+       };
+
+
+       pcf85063: rtc@51 {
+               compatible = "nxp,pcf85063a";
+               reg = <0x51>;
+               quartz-load-femtofarads = <7000>;
+       };
+
+       eeprom1: eeprom@53 {
+               compatible = "nxp,se97b", "atmel,24c02";
+               read-only;
+               reg = <0x53>;
+               pagesize = <16>;
+       };
+
+       eeprom0: eeprom@57 {
+               compatible = "atmel,24c64";
+               reg = <0x57>;
+               pagesize = <32>;
+       };
+};
+
+&usdhc3 {
+       pinctrl-names = "default", "state_100mhz", "state_200mhz";
+       pinctrl-0 = <&pinctrl_usdhc3>;
+       pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
+       pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
+       bus-width = <8>;
+       non-removable;
+       no-sd;
+       no-sdio;
+       vmmc-supply = <&reg_vcc3v3>;
+       vqmmc-supply = <&reg_vcc1v8>;
+       status = "okay";
+};
+
+/*
+ * Attention:
+ * wdog reset is routed to PMIC, PMIC must be preconfigured to force POR
+ * without LDO for SNVS. GPIO1_IO02 must not be used as GPIO.
+ */
+&wdog1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_wdog>;
+       fsl,ext-reset-output;
+       status = "okay";
+};
+
+&iomuxc {
+       pinctrl_flexspi: flexspigrp {
+               fsl,pins = <MX8MM_IOMUXC_NAND_ALE_QSPI_A_SCLK           0x82>,
+                          <MX8MM_IOMUXC_NAND_CE0_B_QSPI_A_SS0_B        0x82>,
+                          <MX8MM_IOMUXC_NAND_DATA00_QSPI_A_DATA0       0x82>,
+                          <MX8MM_IOMUXC_NAND_DATA01_QSPI_A_DATA1       0x82>,
+                          <MX8MM_IOMUXC_NAND_DATA02_QSPI_A_DATA2       0x82>,
+                          <MX8MM_IOMUXC_NAND_DATA03_QSPI_A_DATA3       0x82>;
+       };
+
+       pinctrl_i2c1: i2c1grp {
+               fsl,pins = <MX8MM_IOMUXC_I2C1_SCL_I2C1_SCL              0x40000004>,
+                          <MX8MM_IOMUXC_I2C1_SDA_I2C1_SDA              0x40000004>;
+       };
+
+       pinctrl_i2c1_gpio: i2c1gpiogrp {
+               fsl,pins = <MX8MM_IOMUXC_I2C1_SCL_GPIO5_IO14            0x40000004>,
+                          <MX8MM_IOMUXC_I2C1_SDA_GPIO5_IO15            0x40000004>;
+       };
+
+       pinctrl_pmic: pmicgrp {
+               fsl,pins = <MX8MM_IOMUXC_GPIO1_IO08_GPIO1_IO8           0x94>;
+       };
+
+       pinctrl_reg_usdhc2_vmmc: regusdhc2vmmcgrp {
+               fsl,pins = <MX8MM_IOMUXC_SD2_RESET_B_GPIO2_IO19         0x84>;
+       };
+
+       pinctrl_usdhc3: usdhc3grp {
+               fsl,pins = <MX8MM_IOMUXC_NAND_WE_B_USDHC3_CLK           0x1d4>,
+                          <MX8MM_IOMUXC_NAND_WP_B_USDHC3_CMD           0x1d2>,
+                          <MX8MM_IOMUXC_NAND_DATA04_USDHC3_DATA0       0x1d4>,
+                          <MX8MM_IOMUXC_NAND_DATA05_USDHC3_DATA1       0x1d4>,
+                          <MX8MM_IOMUXC_NAND_DATA06_USDHC3_DATA2       0x1d4>,
+                          <MX8MM_IOMUXC_NAND_DATA07_USDHC3_DATA3       0x1d4>,
+                          <MX8MM_IOMUXC_NAND_RE_B_USDHC3_DATA4         0x1d4>,
+                          <MX8MM_IOMUXC_NAND_CE2_B_USDHC3_DATA5        0x1d4>,
+                          <MX8MM_IOMUXC_NAND_CE3_B_USDHC3_DATA6        0x1d4>,
+                          <MX8MM_IOMUXC_NAND_CLE_USDHC3_DATA7          0x1d4>,
+                          <MX8MM_IOMUXC_NAND_CE1_B_USDHC3_STROBE       0x84>,
+                          /* option USDHC3_RESET_B not defined, only in RM */
+                          <MX8MM_IOMUXC_NAND_READY_B_GPIO3_IO16        0x84>;
+       };
+
+       pinctrl_usdhc3_100mhz: usdhc3-100mhzgrp {
+               fsl,pins = <MX8MM_IOMUXC_NAND_WE_B_USDHC3_CLK           0x1d2>,
+                          <MX8MM_IOMUXC_NAND_WP_B_USDHC3_CMD           0x1d2>,
+                          <MX8MM_IOMUXC_NAND_DATA04_USDHC3_DATA0       0x1d4>,
+                          <MX8MM_IOMUXC_NAND_DATA05_USDHC3_DATA1       0x1d4>,
+                          <MX8MM_IOMUXC_NAND_DATA06_USDHC3_DATA2       0x1d4>,
+                          <MX8MM_IOMUXC_NAND_DATA07_USDHC3_DATA3       0x1d4>,
+                          <MX8MM_IOMUXC_NAND_RE_B_USDHC3_DATA4         0x1d4>,
+                          <MX8MM_IOMUXC_NAND_CE2_B_USDHC3_DATA5        0x1d4>,
+                          <MX8MM_IOMUXC_NAND_CE3_B_USDHC3_DATA6        0x1d4>,
+                          <MX8MM_IOMUXC_NAND_CLE_USDHC3_DATA7          0x1d4>,
+                          <MX8MM_IOMUXC_NAND_CE1_B_USDHC3_STROBE       0x84>,
+                          /* option USDHC3_RESET_B not defined, only in RM */
+                          <MX8MM_IOMUXC_NAND_READY_B_GPIO3_IO16        0x84>;
+       };
+
+       pinctrl_usdhc3_200mhz: usdhc3-200mhzgrp {
+               fsl,pins = <MX8MM_IOMUXC_NAND_WE_B_USDHC3_CLK           0x1d6>,
+                          <MX8MM_IOMUXC_NAND_WP_B_USDHC3_CMD           0x1d2>,
+                          <MX8MM_IOMUXC_NAND_DATA04_USDHC3_DATA0       0x1d4>,
+                          <MX8MM_IOMUXC_NAND_DATA05_USDHC3_DATA1       0x1d4>,
+                          <MX8MM_IOMUXC_NAND_DATA06_USDHC3_DATA2       0x1d4>,
+                          <MX8MM_IOMUXC_NAND_DATA07_USDHC3_DATA3       0x1d4>,
+                          <MX8MM_IOMUXC_NAND_RE_B_USDHC3_DATA4         0x1d4>,
+                          <MX8MM_IOMUXC_NAND_CE2_B_USDHC3_DATA5        0x1d4>,
+                          <MX8MM_IOMUXC_NAND_CE3_B_USDHC3_DATA6        0x1d4>,
+                          <MX8MM_IOMUXC_NAND_CLE_USDHC3_DATA7          0x1d4>,
+                          <MX8MM_IOMUXC_NAND_CE1_B_USDHC3_STROBE       0x84>,
+                          /* option USDHC3_RESET_B not defined, only in RM */
+                          <MX8MM_IOMUXC_NAND_READY_B_GPIO3_IO16        0x84>;
+       };
+
+       pinctrl_wdog: wdoggrp {
+               fsl,pins = <MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B        0x84>;
+       };
+};
index c2f3f11..f77f90e 100644 (file)
                        clock-latency = <61036>; /* two CLK32 periods */
                        clocks = <&clk IMX8MM_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        nvmem-cells = <&cpu_speed_grade>;
                        clock-latency = <61036>; /* two CLK32 periods */
                        clocks = <&clk IMX8MM_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        cpu-idle-states = <&cpu_pd_wait>;
                        clock-latency = <61036>; /* two CLK32 periods */
                        clocks = <&clk IMX8MM_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        cpu-idle-states = <&cpu_pd_wait>;
                        clock-latency = <61036>; /* two CLK32 periods */
                        clocks = <&clk IMX8MM_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        cpu-idle-states = <&cpu_pd_wait>;
 
                A53_L2: l2-cache0 {
                        compatible = "cache";
+                       cache-level = <2>;
+                       cache-size = <0x80000>;
+                       cache-line-size = <64>;
+                       cache-sets = <512>;
                };
        };
 
                                                <&clk IMX8MM_CLK_IPG_AUDIO_ROOT>,
                                                <&clk IMX8MM_SYS_PLL3>,
                                                <&clk IMX8MM_VIDEO_PLL1>,
-                                               <&clk IMX8MM_AUDIO_PLL1>,
-                                               <&clk IMX8MM_AUDIO_PLL2>;
+                                               <&clk IMX8MM_AUDIO_PLL1>;
                                assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_800M>,
                                                         <&clk IMX8MM_ARM_PLL_OUT>,
                                                         <&clk IMX8MM_SYS_PLL3_OUT>,
                                                        <400000000>,
                                                        <750000000>,
                                                        <594000000>,
-                                                       <393216000>,
-                                                       <361267200>;
+                                                       <393216000>;
                        };
 
                        src: reset-controller@30390000 {
                                fsl,num-rx-queues = <3>;
                                nvmem-cells = <&fec_mac_address>;
                                nvmem-cell-names = "mac-address";
-                               nvmem_macaddr_swap;
                                fsl,stop-mode = <&gpr 0x10 3>;
                                status = "disabled";
                        };
                        #size-cells = <1>;
                        ranges = <0x32c00000 0x32c00000 0x400000>;
 
+                       csi: csi@32e20000 {
+                               compatible = "fsl,imx8mm-csi", "fsl,imx7-csi";
+                               reg = <0x32e20000 0x1000>;
+                               interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clk IMX8MM_CLK_CSI1_ROOT>;
+                               clock-names = "mclk";
+                               power-domains = <&disp_blk_ctrl IMX8MM_DISPBLK_PD_CSI_BRIDGE>;
+                               status = "disabled";
+
+                               port {
+                                       csi_in: endpoint {
+                                               remote-endpoint = <&imx8mm_mipi_csi_out>;
+                                       };
+                               };
+                       };
+
                        disp_blk_ctrl: blk-ctrl@32e28000 {
                                compatible = "fsl,imx8mm-disp-blk-ctrl", "syscon";
                                reg = <0x32e28000 0x100>;
                                #power-domain-cells = <1>;
                        };
 
+                       mipi_csi: mipi-csi@32e30000 {
+                               compatible = "fsl,imx8mm-mipi-csi2";
+                               reg = <0x32e30000 0x1000>;
+                               interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
+                               assigned-clocks = <&clk IMX8MM_CLK_CSI1_CORE>,
+                                                 <&clk IMX8MM_CLK_CSI1_PHY_REF>;
+                               assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_1000M>,
+                                                         <&clk IMX8MM_SYS_PLL2_1000M>;
+                               clock-frequency = <333000000>;
+                               clocks = <&clk IMX8MM_CLK_DISP_APB_ROOT>,
+                                        <&clk IMX8MM_CLK_CSI1_ROOT>,
+                                        <&clk IMX8MM_CLK_CSI1_PHY_REF>,
+                                        <&clk IMX8MM_CLK_DISP_AXI_ROOT>;
+                               clock-names = "pclk", "wrap", "phy", "axi";
+                               power-domains = <&disp_blk_ctrl IMX8MM_DISPBLK_PD_MIPI_CSI>;
+                               status = "disabled";
+
+                               ports {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       port@0 {
+                                               reg = <0>;
+                                       };
+
+                                       port@1 {
+                                               reg = <1>;
+
+                                               imx8mm_mipi_csi_out: endpoint {
+                                                       remote-endpoint = <&csi_in>;
+                                               };
+                                       };
+                               };
+                       };
+
                        usbotg1: usb@32e40000 {
                                compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb";
                                reg = <0x32e40000 0x200>;
index 376ca8f..0f40b43 100644 (file)
                compatible = "wlf,wm8962";
                reg = <0x1a>;
                clocks = <&clk IMX8MN_CLK_SAI3_ROOT>;
-               clock-names = "xclk";
                DCVDD-supply = <&reg_audio>;
                DBVDD-supply = <&reg_audio>;
                AVDD-supply = <&reg_audio>;
index 3b2d627..1133cde 100644 (file)
        bus-width = <4>;
        non-removable;
        cap-power-off-card;
-       pm-ignore-notify;
        keep-power-in-suspend;
        mmc-pwrseq = <&usdhc1_pwrseq>;
        status = "okay";
diff --git a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi
new file mode 100644 (file)
index 0000000..c11895d
--- /dev/null
@@ -0,0 +1,426 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2021 Collabora Ltd.
+ * Copyright 2021 BSH Hausgeraete GmbH
+ */
+
+/dts-v1/;
+
+#include "imx8mn.dtsi"
+
+/ {
+       chosen {
+               stdout-path = &uart4;
+       };
+
+       fec_supply: fec-supply-en {
+               compatible = "regulator-fixed";
+               vin-supply = <&buck4_reg>;
+               regulator-name = "tja1101_en";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               gpio = <&gpio2 20 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       usdhc2_pwrseq: usdhc2-pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usdhc2_pwrseq>;
+               reset-gpios = <&gpio4 27 GPIO_ACTIVE_LOW>;
+       };
+};
+
+&A53_0 {
+       cpu-supply = <&buck2_reg>;
+};
+
+&A53_1 {
+       cpu-supply = <&buck2_reg>;
+};
+
+&A53_2 {
+       cpu-supply = <&buck2_reg>;
+};
+
+&A53_3 {
+       cpu-supply = <&buck2_reg>;
+};
+
+&ecspi2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_espi2>;
+       status = "okay";
+};
+
+&fec1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_fec1>;
+       phy-mode = "rmii";
+       phy-handle = <&ethphy0>;
+       phy-supply = <&fec_supply>;
+       fsl,magic-packet;
+       status = "okay";
+
+       mdio {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               ethphy0: ethernet-phy@0 {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <0>;
+                       reset-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;
+                       reset-assert-us = <20>;
+                       reset-deassert-us = <2000>;
+               };
+       };
+};
+
+&i2c1 {
+       clock-frequency = <400000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c1>;
+       status = "okay";
+
+       bd71847: pmic@4b {
+               compatible = "rohm,bd71847";
+               reg = <0x4b>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_pmic>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
+               rohm,reset-snvs-powered;
+
+               #clock-cells = <0>;
+               clocks = <&osc_32k 0>;
+               clock-output-names = "clk-32k-out";
+
+               regulators {
+                       buck1_reg: BUCK1 {
+                               /* PMIC_BUCK1 - VDD_SOC */
+                               regulator-name = "buck1";
+                               regulator-min-microvolt = <700000>;
+                               regulator-max-microvolt = <1300000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <1250>;
+                       };
+
+                       buck2_reg: BUCK2 {
+                               /* PMIC_BUCK2 - VDD_ARM */
+                               regulator-name = "buck2";
+                               regulator-min-microvolt = <700000>;
+                               regulator-max-microvolt = <1300000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <1250>;
+                       };
+
+                       buck3_reg: BUCK3 {
+                               /* PMIC_BUCK5 - VDD_DRAM_VPU_GPU */
+                               regulator-name = "buck3";
+                               regulator-min-microvolt = <700000>;
+                               regulator-max-microvolt = <1350000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       buck4_reg: BUCK4 {
+                               /* PMIC_BUCK6 - VDD_3V3 */
+                               regulator-name = "buck4";
+                               regulator-min-microvolt = <3000000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       buck5_reg: BUCK5 {
+                               /* PMIC_BUCK7 - VDD_1V8 */
+                               regulator-name = "buck5";
+                               regulator-min-microvolt = <1605000>;
+                               regulator-max-microvolt = <1995000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       buck6_reg: BUCK6 {
+                               /* PMIC_BUCK8 - NVCC_DRAM */
+                               regulator-name = "buck6";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <1400000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       ldo1_reg: LDO1 {
+                               /* PMIC_LDO1 - NVCC_SNVS_1V8 */
+                               regulator-name = "ldo1";
+                               regulator-min-microvolt = <1600000>;
+                               regulator-max-microvolt = <1900000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       ldo2_reg: LDO2 {
+                               /* PMIC_LDO2 - VDD_SNVS_0V8 */
+                               regulator-name = "ldo2";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <900000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       ldo3_reg: LDO3 {
+                               /* PMIC_LDO3 - VDDA_1V8 */
+                               regulator-name = "ldo3";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       ldo4_reg: LDO4 {
+                               /* PMIC_LDO4 - VDD_MIPI_0V9 */
+                               regulator-name = "ldo4";
+                               regulator-min-microvolt = <900000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       ldo6_reg: LDO6 {
+                               /* PMIC_LDO6 - VDD_MIPI_1V2 */
+                               regulator-name = "ldo6";
+                               regulator-min-microvolt = <900000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+               };
+       };
+};
+
+&i2c3 {
+       clock-frequency = <400000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c3>;
+       status = "okay";
+};
+
+&i2c4 {
+       clock-frequency = <400000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c4>;
+       status = "okay";
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart2>;
+       status = "okay";
+};
+
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart3>;
+       assigned-clocks = <&clk IMX8MN_CLK_UART3>;
+       assigned-clock-parents = <&clk IMX8MN_SYS_PLL1_80M>;
+       uart-has-rtscts;
+       status = "okay";
+
+       bluetooth {
+               compatible = "brcm,bcm43438-bt";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_bluetooth>;
+               shutdown-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
+               device-wakeup-gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>;
+               host-wakeup-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
+               max-speed = <3000000>;
+       };
+};
+
+/* Console */
+&uart4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart4>;
+       status = "okay";
+};
+
+&usbotg1 {
+       dr_mode = "peripheral";
+       disable-over-current;
+       status = "okay";
+};
+
+&usdhc2 {
+       #address-cells = <1>;
+       #size-cells = <0>;
+       pinctrl-names = "default", "state_100mhz", "state_200mhz";
+       pinctrl-0 = <&pinctrl_usdhc2>;
+       pinctrl-1 = <&pinctrl_usdhc2_100mhz>;
+       pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
+       mmc-pwrseq = <&usdhc2_pwrseq>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+
+       brcmf: bcrmf@1 {
+               compatible = "brcm,bcm4329-fmac";
+               reg = <1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_wlan>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "host-wake";
+       };
+};
+
+&wdog1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_wdog>;
+       fsl,ext-reset-output;
+       status = "okay";
+};
+
+&iomuxc {
+       pinctrl_bluetooth: bluetoothgrp {
+               fsl,pins = <
+                       MX8MN_IOMUXC_GPIO1_IO15_GPIO1_IO15              0x044   /* BT_REG_ON */
+                       MX8MN_IOMUXC_ENET_TD3_GPIO1_IO18                0x046   /* BT_DEV_WAKE */
+                       MX8MN_IOMUXC_ENET_RD2_GPIO1_IO28                0x090   /* BT_HOST_WAKE */
+               >;
+       };
+
+       pinctrl_espi2: espi2grp {
+               fsl,pins = <
+                       MX8MN_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK            0x082
+                       MX8MN_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI            0x082
+                       MX8MN_IOMUXC_ECSPI2_MISO_ECSPI2_MISO            0x082
+                       MX8MN_IOMUXC_ECSPI2_SS0_ECSPI2_SS0              0x040
+               >;
+       };
+
+       pinctrl_fec1: fec1grp {
+               fsl,pins = <
+                       MX8MN_IOMUXC_ENET_MDC_ENET1_MDC                 0x002
+                       MX8MN_IOMUXC_ENET_MDIO_ENET1_MDIO               0x002
+                       MX8MN_IOMUXC_ENET_RD0_ENET1_RGMII_RD0           0x090
+                       MX8MN_IOMUXC_ENET_RD1_ENET1_RGMII_RD1           0x090
+                       MX8MN_IOMUXC_ENET_RXC_ENET1_RX_ER               0x090
+                       MX8MN_IOMUXC_ENET_TD0_ENET1_RGMII_TD0           0x016
+                       MX8MN_IOMUXC_ENET_TD1_ENET1_RGMII_TD1           0x016
+                       MX8MN_IOMUXC_ENET_TD2_ENET1_TX_CLK              0x016
+                       MX8MN_IOMUXC_ENET_TX_CTL_ENET1_RGMII_TX_CTL     0x016
+                       MX8MN_IOMUXC_ENET_RX_CTL_ENET1_RGMII_RX_CTL     0x090
+                       MX8MN_IOMUXC_ENET_TXC_ENET1_TX_ER               0x016
+                       MX8MN_IOMUXC_SD2_CD_B_GPIO2_IO12                0x150   /* RMII_INT - ENET_INT */
+                       MX8MN_IOMUXC_SD2_WP_GPIO2_IO20                  0x150   /* RMII_EN - ENET_EN */
+                       MX8MN_IOMUXC_SD2_RESET_B_GPIO2_IO19             0x016   /* RMII_WAKE - GPIO_ENET_WAKE */
+                       MX8MN_IOMUXC_ENET_RD3_GPIO1_IO29                0x016   /* RMII_RESET - GPIO_ENET_RST */
+               >;
+       };
+
+       pinctrl_i2c1: i2c1grp {
+               fsl,pins = <
+                       MX8MN_IOMUXC_I2C1_SCL_I2C1_SCL                  0x400000c2
+                       MX8MN_IOMUXC_I2C1_SDA_I2C1_SDA                  0x400000c2
+               >;
+       };
+
+       pinctrl_i2c3: i2c3grp {
+               fsl,pins = <
+                       MX8MN_IOMUXC_I2C3_SCL_I2C3_SCL                  0x400000c2
+                       MX8MN_IOMUXC_I2C3_SDA_I2C3_SDA                  0x400000c2
+               >;
+       };
+
+       pinctrl_i2c4: i2c4grp {
+               fsl,pins = <
+                       MX8MN_IOMUXC_I2C4_SCL_I2C4_SCL                  0x400000c2
+                       MX8MN_IOMUXC_I2C4_SDA_I2C4_SDA                  0x400000c2
+               >;
+       };
+
+       pinctrl_pmic: pmicirq {
+               fsl,pins = <
+                       MX8MN_IOMUXC_GPIO1_IO03_GPIO1_IO3               0x040
+               >;
+       };
+
+       pinctrl_uart2: uart2grp {
+               fsl,pins = <
+                       MX8MN_IOMUXC_UART2_RXD_UART2_DCE_RX             0x040
+                       MX8MN_IOMUXC_UART2_TXD_UART2_DCE_TX             0x040
+               >;
+       };
+
+       pinctrl_uart3: uart3grp {
+               fsl,pins = <
+                       MX8MN_IOMUXC_UART3_TXD_UART3_DCE_TX             0x040
+                       MX8MN_IOMUXC_UART3_RXD_UART3_DCE_RX             0x040
+                       MX8MN_IOMUXC_ECSPI1_MISO_UART3_DCE_CTS_B        0x040
+                       MX8MN_IOMUXC_ECSPI1_SS0_UART3_DCE_RTS_B         0x040
+               >;
+       };
+
+       pinctrl_uart4: uart4grp {
+               fsl,pins = <
+                       MX8MN_IOMUXC_UART4_RXD_UART4_DCE_RX             0x040
+                       MX8MN_IOMUXC_UART4_TXD_UART4_DCE_TX             0x040
+               >;
+       };
+
+       pinctrl_usdhc2: usdhc2grp {
+               fsl,pins = <
+                       MX8MN_IOMUXC_SD2_CLK_USDHC2_CLK                 0x090
+                       MX8MN_IOMUXC_SD2_CMD_USDHC2_CMD                 0x0d0
+                       MX8MN_IOMUXC_SD2_DATA0_USDHC2_DATA0             0x0d0
+                       MX8MN_IOMUXC_SD2_DATA1_USDHC2_DATA1             0x0d0
+                       MX8MN_IOMUXC_SD2_DATA2_USDHC2_DATA2             0x0d0
+                       MX8MN_IOMUXC_SD2_DATA3_USDHC2_DATA3             0x0d0
+               >;
+       };
+
+       pinctrl_usdhc2_100mhz: usdhc2grp100mhz {
+               fsl,pins = <
+                       MX8MN_IOMUXC_SD2_CLK_USDHC2_CLK                 0x094
+                       MX8MN_IOMUXC_SD2_CMD_USDHC2_CMD                 0x0d4
+                       MX8MN_IOMUXC_SD2_DATA0_USDHC2_DATA0             0x0d4
+                       MX8MN_IOMUXC_SD2_DATA1_USDHC2_DATA1             0x0d4
+                       MX8MN_IOMUXC_SD2_DATA2_USDHC2_DATA2             0x0d4
+                       MX8MN_IOMUXC_SD2_DATA3_USDHC2_DATA3             0x0d4
+               >;
+       };
+
+       pinctrl_usdhc2_200mhz: usdhc2grp200mhz {
+               fsl,pins = <
+                       MX8MN_IOMUXC_SD2_CLK_USDHC2_CLK                 0x096
+                       MX8MN_IOMUXC_SD2_CMD_USDHC2_CMD                 0x0d6
+                       MX8MN_IOMUXC_SD2_DATA0_USDHC2_DATA0             0x0d6
+                       MX8MN_IOMUXC_SD2_DATA1_USDHC2_DATA1             0x0d6
+                       MX8MN_IOMUXC_SD2_DATA2_USDHC2_DATA2             0x0d6
+                       MX8MN_IOMUXC_SD2_DATA3_USDHC2_DATA3             0x0d6
+               >;
+       };
+
+       pinctrl_usdhc2_pwrseq: usdhc2pwrseqgrp {
+               fsl,pins = <
+                       MX8MN_IOMUXC_SAI2_MCLK_GPIO4_IO27               0x040   /* WL_REG_ON */
+               >;
+       };
+
+       pinctrl_wdog: wdoggrp {
+               fsl,pins = <
+                       MX8MN_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B            0x046
+               >;
+       };
+
+       pinctrl_wlan: wlangrp {
+               fsl,pins = <
+                       MX8MN_IOMUXC_GPIO1_IO00_GPIO1_IO0               0x0d6   /* GPIO_0 - WIFI_GPIO_0 */
+                       MX8MN_IOMUXC_GPIO1_IO08_GPIO1_IO8               0x0d6   /* GPIO_1 - WIFI_GPIO_1 */
+                       MX8MN_IOMUXC_GPIO1_IO04_GPIO1_IO4               0x0d6   /* BT_GPIO_5 - WIFI_GPIO_5 */
+                       MX8MN_IOMUXC_SPDIF_RX_GPIO5_IO4                 0x0d6   /* I2S_CLK - WIFI_GPIO_6 */
+               >;
+       };
+};
diff --git a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2.dts b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2.dts
new file mode 100644 (file)
index 0000000..33f9858
--- /dev/null
@@ -0,0 +1,48 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2021 Collabora Ltd.
+ * Copyright 2021 BSH Hausgeraete GmbH
+ */
+
+/dts-v1/;
+
+#include "imx8mn-bsh-smm-s2-common.dtsi"
+
+/ {
+       model = "BSH SMM S2";
+       compatible = "bsh,imx8mn-bsh-smm-s2", "fsl,imx8mn";
+
+       memory@40000000 {
+               device_type = "memory";
+               reg = <0x0 0x40000000 0x0 0x10000000>;
+       };
+};
+
+&gpmi {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_gpmi_nand>;
+       nand-on-flash-bbt;
+       status = "okay";
+};
+
+&iomuxc {
+       pinctrl_gpmi_nand: gpmi-nand {
+               fsl,pins = <
+                       MX8MN_IOMUXC_NAND_ALE_RAWNAND_ALE               0x00000096
+                       MX8MN_IOMUXC_NAND_CE0_B_RAWNAND_CE0_B           0x00000096
+                       MX8MN_IOMUXC_NAND_CLE_RAWNAND_CLE               0x00000096
+                       MX8MN_IOMUXC_NAND_DATA00_RAWNAND_DATA00         0x00000096
+                       MX8MN_IOMUXC_NAND_DATA01_RAWNAND_DATA01         0x00000096
+                       MX8MN_IOMUXC_NAND_DATA02_RAWNAND_DATA02         0x00000096
+                       MX8MN_IOMUXC_NAND_DATA03_RAWNAND_DATA03         0x00000096
+                       MX8MN_IOMUXC_NAND_DATA04_RAWNAND_DATA04         0x00000096
+                       MX8MN_IOMUXC_NAND_DATA05_RAWNAND_DATA05         0x00000096
+                       MX8MN_IOMUXC_NAND_DATA06_RAWNAND_DATA06         0x00000096
+                       MX8MN_IOMUXC_NAND_DATA07_RAWNAND_DATA07         0x00000096
+                       MX8MN_IOMUXC_NAND_RE_B_RAWNAND_RE_B             0x00000096
+                       MX8MN_IOMUXC_NAND_READY_B_RAWNAND_READY_B       0x00000056
+                       MX8MN_IOMUXC_NAND_WE_B_RAWNAND_WE_B             0x00000096
+                       MX8MN_IOMUXC_NAND_WP_B_RAWNAND_WP_B             0x00000096
+               >;
+       };
+};
diff --git a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2pro.dts b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2pro.dts
new file mode 100644 (file)
index 0000000..c6a8ed6
--- /dev/null
@@ -0,0 +1,80 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2021 Collabora Ltd.
+ * Copyright 2021 BSH Hausgeraete GmbH
+ */
+
+/dts-v1/;
+
+#include "imx8mn-bsh-smm-s2-common.dtsi"
+
+/ {
+       model = "BSH SMM S2 PRO";
+       compatible = "bsh,imx8mn-bsh-smm-s2pro", "fsl,imx8mn";
+
+       memory@40000000 {
+               device_type = "memory";
+               reg = <0x0 0x40000000 0x0 0x20000000>;
+       };
+};
+
+/* eMMC */
+&usdhc1 {
+       pinctrl-names = "default", "state_100mhz", "state_200mhz";
+       pinctrl-0 = <&pinctrl_usdhc1>;
+       pinctrl-1 = <&pinctrl_usdhc1_100mhz>;
+       pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
+       bus-width = <8>;
+       non-removable;
+       status = "okay";
+};
+
+&iomuxc {
+       pinctrl_usdhc1: usdhc1grp {
+               fsl,pins = <
+                       MX8MN_IOMUXC_SD1_CLK_USDHC1_CLK                 0x40000090
+                       MX8MN_IOMUXC_SD1_CMD_USDHC1_CMD                 0x0d0
+                       MX8MN_IOMUXC_SD1_DATA0_USDHC1_DATA0             0x0d0
+                       MX8MN_IOMUXC_SD1_DATA1_USDHC1_DATA1             0x0d0
+                       MX8MN_IOMUXC_SD1_DATA2_USDHC1_DATA2             0x0d0
+                       MX8MN_IOMUXC_SD1_DATA3_USDHC1_DATA3             0x0d0
+                       MX8MN_IOMUXC_SD1_DATA4_USDHC1_DATA4             0x0d0
+                       MX8MN_IOMUXC_SD1_DATA5_USDHC1_DATA5             0x0d0
+                       MX8MN_IOMUXC_SD1_DATA6_USDHC1_DATA6             0x0d0
+                       MX8MN_IOMUXC_SD1_DATA7_USDHC1_DATA7             0x0d0
+                       MX8MN_IOMUXC_SD1_STROBE_USDHC1_STROBE           0x090
+               >;
+       };
+
+       pinctrl_usdhc1_100mhz: usdhc1grp100mhz {
+               fsl,pins = <
+                       MX8MN_IOMUXC_SD1_CLK_USDHC1_CLK                 0x40000094
+                       MX8MN_IOMUXC_SD1_CMD_USDHC1_CMD                 0x0d4
+                       MX8MN_IOMUXC_SD1_DATA0_USDHC1_DATA0             0x0d4
+                       MX8MN_IOMUXC_SD1_DATA1_USDHC1_DATA1             0x0d4
+                       MX8MN_IOMUXC_SD1_DATA2_USDHC1_DATA2             0x0d4
+                       MX8MN_IOMUXC_SD1_DATA3_USDHC1_DATA3             0x0d4
+                       MX8MN_IOMUXC_SD1_DATA4_USDHC1_DATA4             0x0d4
+                       MX8MN_IOMUXC_SD1_DATA5_USDHC1_DATA5             0x0d4
+                       MX8MN_IOMUXC_SD1_DATA6_USDHC1_DATA6             0x0d4
+                       MX8MN_IOMUXC_SD1_DATA7_USDHC1_DATA7             0x0d4
+                       MX8MN_IOMUXC_SD1_STROBE_USDHC1_STROBE           0x094
+               >;
+       };
+
+       pinctrl_usdhc1_200mhz: usdhc1grp200mhz {
+               fsl,pins = <
+                       MX8MN_IOMUXC_SD1_CLK_USDHC1_CLK                 0x40000096
+                       MX8MN_IOMUXC_SD1_CMD_USDHC1_CMD                 0x0d6
+                       MX8MN_IOMUXC_SD1_DATA0_USDHC1_DATA0             0x0d6
+                       MX8MN_IOMUXC_SD1_DATA1_USDHC1_DATA1             0x0d6
+                       MX8MN_IOMUXC_SD1_DATA2_USDHC1_DATA2             0x0d6
+                       MX8MN_IOMUXC_SD1_DATA3_USDHC1_DATA3             0x0d6
+                       MX8MN_IOMUXC_SD1_DATA4_USDHC1_DATA4             0x0d6
+                       MX8MN_IOMUXC_SD1_DATA5_USDHC1_DATA5             0x0d6
+                       MX8MN_IOMUXC_SD1_DATA6_USDHC1_DATA6             0x0d6
+                       MX8MN_IOMUXC_SD1_DATA7_USDHC1_DATA7             0x0d6
+                       MX8MN_IOMUXC_SD1_STROBE_USDHC1_STROBE           0x096
+               >;
+       };
+};
index 85e65f8..c3f1519 100644 (file)
                ethphy0: ethernet-phy@0 {
                        compatible = "ethernet-phy-ieee802.3-c22";
                        reg = <0>;
+                       reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;
+                       reset-assert-us = <10000>;
+                       qca,disable-smarteee;
+                       vddio-supply = <&vddio>;
+
+                       vddio: vddio-regulator {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                       };
                };
        };
 };
diff --git a/arch/arm64/boot/dts/freescale/imx8mn-tqma8mqnl-mba8mx.dts b/arch/arm64/boot/dts/freescale/imx8mn-tqma8mqnl-mba8mx.dts
new file mode 100644 (file)
index 0000000..3f1e49b
--- /dev/null
@@ -0,0 +1,237 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright 2020-2021 TQ-Systems GmbH
+ */
+
+/dts-v1/;
+
+#include "imx8mn-tqma8mqnl.dtsi"
+#include "mba8mx.dtsi"
+
+/ {
+       model = "TQ-Systems GmbH i.MX8MN TQMa8MxNL on MBa8Mx";
+       compatible = "tq,imx8mn-tqma8mqnl-mba8mx", "tq,imx8mn-tqma8mqnl", "fsl,imx8mn";
+
+       aliases {
+               eeprom0 = &eeprom3;
+               mmc0 = &usdhc3;
+               mmc1 = &usdhc2;
+               mmc2 = &usdhc1;
+               rtc0 = &pcf85063;
+               rtc1 = &snvs_rtc;
+       };
+
+       reg_usdhc2_vmmc: regulator-vmmc {
+               compatible = "regulator-fixed";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_reg_usdhc2_vmmc>;
+               regulator-name = "VSD_3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+               startup-delay-us = <100>;
+               off-on-delay-us = <12000>;
+       };
+};
+
+/* Located on TQMa8MxML-ADAP */
+&gpio2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usb0hub_sel>;
+
+       sel-usb-hub-hog {
+               gpio-hog;
+               gpios = <1 GPIO_ACTIVE_HIGH>;
+               output-high;
+       };
+};
+
+&i2c1 {
+       expander2: gpio@27 {
+               compatible = "nxp,pca9555";
+               reg = <0x27>;
+               gpio-controller;
+               #gpio-cells = <2>;
+               vcc-supply = <&reg_vcc_3v3>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_expander2>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+};
+
+&sai3 {
+       assigned-clocks = <&clk IMX8MN_CLK_SAI3>;
+       assigned-clock-parents = <&clk IMX8MN_AUDIO_PLL1_OUT>;
+       clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k", "pll11k";
+       clocks = <&clk IMX8MN_CLK_SAI3_IPG>, <&clk IMX8MN_CLK_DUMMY>,
+                <&clk IMX8MN_CLK_SAI3_ROOT>, <&clk IMX8MN_CLK_DUMMY>,
+                <&clk IMX8MN_CLK_DUMMY>, <&clk IMX8MN_AUDIO_PLL1_OUT>,
+                <&clk IMX8MN_AUDIO_PLL2_OUT>;
+};
+
+&tlv320aic3x04 {
+       clock-names = "mclk";
+       clocks = <&clk IMX8MN_CLK_SAI3_ROOT>;
+};
+
+&usbotg1 {
+       dr_mode = "host";
+       disable-over-current;
+       power-active-high;
+       status = "okay";
+};
+
+&iomuxc {
+       pinctrl_ecspi1: ecspi1grp {
+               fsl,pins = <MX8MN_IOMUXC_ECSPI1_SCLK_ECSPI1_SCLK        0x00000146>,
+                          <MX8MN_IOMUXC_ECSPI1_MOSI_ECSPI1_MOSI        0x00000146>,
+                          <MX8MN_IOMUXC_ECSPI1_MISO_ECSPI1_MISO        0x00000146>,
+                          <MX8MN_IOMUXC_ECSPI1_SS0_GPIO5_IO9           0x00000146>;
+       };
+
+       pinctrl_ecspi2: ecspi2grp {
+               fsl,pins = <MX8MN_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK        0x00000146>,
+                          <MX8MN_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI        0x00000146>,
+                          <MX8MN_IOMUXC_ECSPI2_MISO_ECSPI2_MISO        0x00000146>,
+                          <MX8MN_IOMUXC_ECSPI2_SS0_GPIO5_IO13          0x00000146>;
+       };
+
+       pinctrl_expander2: expander2grp {
+               fsl,pins = <MX8MN_IOMUXC_GPIO1_IO09_GPIO1_IO9           0x94>;
+       };
+
+       pinctrl_fec1: fec1grp {
+               fsl,pins = <MX8MN_IOMUXC_ENET_MDC_ENET1_MDC             0x40000002>,
+                          <MX8MN_IOMUXC_ENET_MDIO_ENET1_MDIO           0x40000002>,
+                          <MX8MN_IOMUXC_ENET_TD3_ENET1_RGMII_TD3       0x14>,
+                          <MX8MN_IOMUXC_ENET_TD2_ENET1_RGMII_TD2       0x14>,
+                          <MX8MN_IOMUXC_ENET_TD1_ENET1_RGMII_TD1       0x14>,
+                          <MX8MN_IOMUXC_ENET_TD0_ENET1_RGMII_TD0       0x14>,
+                          <MX8MN_IOMUXC_ENET_RD3_ENET1_RGMII_RD3       0x90>,
+                          <MX8MN_IOMUXC_ENET_RD2_ENET1_RGMII_RD2       0x90>,
+                          <MX8MN_IOMUXC_ENET_RD1_ENET1_RGMII_RD1       0x90>,
+                          <MX8MN_IOMUXC_ENET_RD0_ENET1_RGMII_RD0       0x90>,
+                          <MX8MN_IOMUXC_ENET_TXC_ENET1_RGMII_TXC       0x14>,
+                          <MX8MN_IOMUXC_ENET_RXC_ENET1_RGMII_RXC       0x90>,
+                          <MX8MN_IOMUXC_ENET_RX_CTL_ENET1_RGMII_RX_CTL 0x90>,
+                          <MX8MN_IOMUXC_ENET_TX_CTL_ENET1_RGMII_TX_CTL 0x14>;
+       };
+
+       pinctrl_gpiobutton: gpiobuttongrp {
+               fsl,pins = <MX8MN_IOMUXC_GPIO1_IO05_GPIO1_IO5           0x84>,
+                          <MX8MN_IOMUXC_GPIO1_IO07_GPIO1_IO7           0x84>,
+                          <MX8MN_IOMUXC_SD1_CLK_GPIO2_IO0              0x84>;
+       };
+
+       pinctrl_gpioled: gpioledgrp {
+               fsl,pins = <MX8MN_IOMUXC_GPIO1_IO00_GPIO1_IO0           0x84>,
+                          <MX8MN_IOMUXC_NAND_DQS_GPIO3_IO14            0x84>;
+       };
+
+       pinctrl_i2c2: i2c2grp {
+               fsl,pins = <MX8MN_IOMUXC_I2C2_SCL_I2C2_SCL              0x400001C4>,
+                          <MX8MN_IOMUXC_I2C2_SDA_I2C2_SDA              0x400001C4>;
+       };
+
+       pinctrl_i2c2_gpio: i2c2gpiogrp {
+               fsl,pins = <MX8MN_IOMUXC_I2C2_SCL_GPIO5_IO16            0x400001C4>,
+                          <MX8MN_IOMUXC_I2C2_SDA_GPIO5_IO17            0x400001C4>;
+       };
+
+       pinctrl_i2c3: i2c3grp {
+               fsl,pins = <MX8MN_IOMUXC_I2C3_SCL_I2C3_SCL              0x400001C4>,
+                          <MX8MN_IOMUXC_I2C3_SDA_I2C3_SDA              0x400001C4>;
+       };
+
+       pinctrl_i2c3_gpio: i2c3gpiogrp {
+               fsl,pins = <MX8MN_IOMUXC_I2C3_SCL_GPIO5_IO18            0x400001C4>,
+                          <MX8MN_IOMUXC_I2C3_SDA_GPIO5_IO19            0x400001C4>;
+       };
+
+       pinctrl_pwm3: pwm3grp {
+               fsl,pins = <MX8MN_IOMUXC_GPIO1_IO14_PWM3_OUT            0x14>;
+       };
+
+       pinctrl_pwm4: pwm4grp {
+               fsl,pins = <MX8MN_IOMUXC_GPIO1_IO15_PWM4_OUT            0x14>;
+       };
+
+       pinctrl_sai3: sai3grp {
+               fsl,pins = <MX8MN_IOMUXC_SAI3_MCLK_SAI3_MCLK            0x94>,
+                          <MX8MN_IOMUXC_SAI3_RXC_SAI3_RX_BCLK          0x94>,
+                          <MX8MN_IOMUXC_SAI3_RXFS_SAI3_RX_SYNC         0x94>,
+                          <MX8MN_IOMUXC_SAI3_RXD_SAI3_RX_DATA0         0x94>,
+                          <MX8MN_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC         0x94>,
+                          <MX8MN_IOMUXC_SAI3_TXD_SAI3_TX_DATA0         0x94>,
+                          <MX8MN_IOMUXC_SAI3_TXC_SAI3_TX_BCLK          0x94>;
+       };
+
+       pinctrl_uart1: uart1grp {
+               fsl,pins = <MX8MN_IOMUXC_UART1_RXD_UART1_DCE_RX         0x16>,
+                          <MX8MN_IOMUXC_UART1_TXD_UART1_DCE_TX         0x16>;
+       };
+
+       pinctrl_uart2: uart2grp {
+               fsl,pins = <MX8MN_IOMUXC_UART2_RXD_UART2_DCE_RX         0x16>,
+                          <MX8MN_IOMUXC_UART2_TXD_UART2_DCE_TX         0x16>;
+       };
+
+       pinctrl_uart3: uart3grp {
+               fsl,pins = <MX8MN_IOMUXC_UART3_RXD_UART3_DCE_RX         0x16>,
+                          <MX8MN_IOMUXC_UART3_TXD_UART3_DCE_TX         0x16>;
+       };
+
+       pinctrl_uart4: uart4grp {
+               fsl,pins = <MX8MN_IOMUXC_UART4_RXD_UART4_DCE_RX         0x16>,
+                          <MX8MN_IOMUXC_UART4_TXD_UART4_DCE_TX         0x16>;
+       };
+
+       pinctrl_usb0hub_sel: usb0hub-selgrp {
+               /* SEL_USB_HUB_B */
+               fsl,pins = <MX8MN_IOMUXC_SD1_CMD_GPIO2_IO1              0x84>;
+       };
+
+       pinctrl_usbotg: usbotggrp {
+               fsl,pins = <MX8MN_IOMUXC_GPIO1_IO12_USB1_OTG_PWR        0x84>,
+                          <MX8MN_IOMUXC_GPIO1_IO13_USB1_OTG_OC         0x84>,
+                          <MX8MN_IOMUXC_GPIO1_IO10_USB1_OTG_ID         0x1C4>;
+       };
+
+       pinctrl_usdhc2: usdhc2grp {
+               fsl,pins = <MX8MN_IOMUXC_SD2_CLK_USDHC2_CLK             0x1d4>,
+                          <MX8MN_IOMUXC_SD2_CMD_USDHC2_CMD             0x1d4>,
+                          <MX8MN_IOMUXC_SD2_DATA0_USDHC2_DATA0         0x1d4>,
+                          <MX8MN_IOMUXC_SD2_DATA1_USDHC2_DATA1         0x1d4>,
+                          <MX8MN_IOMUXC_SD2_DATA2_USDHC2_DATA2         0x1d4>,
+                          <MX8MN_IOMUXC_SD2_DATA3_USDHC2_DATA3         0x1d4>,
+                          <MX8MN_IOMUXC_GPIO1_IO04_USDHC2_VSELECT      0x84>;
+       };
+
+       pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
+               fsl,pins = <MX8MN_IOMUXC_SD2_CLK_USDHC2_CLK             0x1d4>,
+                          <MX8MN_IOMUXC_SD2_CMD_USDHC2_CMD             0x1d4>,
+                          <MX8MN_IOMUXC_SD2_DATA0_USDHC2_DATA0         0x1d4>,
+                          <MX8MN_IOMUXC_SD2_DATA1_USDHC2_DATA1         0x1d4>,
+                          <MX8MN_IOMUXC_SD2_DATA2_USDHC2_DATA2         0x1d4>,
+                          <MX8MN_IOMUXC_SD2_DATA3_USDHC2_DATA3         0x1d4>,
+                          <MX8MN_IOMUXC_GPIO1_IO04_USDHC2_VSELECT      0x84>;
+       };
+
+       pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
+               fsl,pins = <MX8MN_IOMUXC_SD2_CLK_USDHC2_CLK             0x1d4>,
+                          <MX8MN_IOMUXC_SD2_CMD_USDHC2_CMD             0x1d4>,
+                          <MX8MN_IOMUXC_SD2_DATA0_USDHC2_DATA0         0x1d4>,
+                          <MX8MN_IOMUXC_SD2_DATA1_USDHC2_DATA1         0x1d4>,
+                          <MX8MN_IOMUXC_SD2_DATA2_USDHC2_DATA2         0x1d4>,
+                          <MX8MN_IOMUXC_SD2_DATA3_USDHC2_DATA3         0x1d4>,
+                          <MX8MN_IOMUXC_GPIO1_IO04_USDHC2_VSELECT      0x84>;
+       };
+
+       pinctrl_usdhc2_gpio: usdhc2-gpiogrp {
+               fsl,pins = <MX8MN_IOMUXC_SD2_CD_B_GPIO2_IO12            0x84>;
+       };
+};
diff --git a/arch/arm64/boot/dts/freescale/imx8mn-tqma8mqnl.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-tqma8mqnl.dtsi
new file mode 100644 (file)
index 0000000..9ea2894
--- /dev/null
@@ -0,0 +1,322 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright 2020-2021 TQ-Systems GmbH
+ */
+
+#include "imx8mn.dtsi"
+
+/ {
+       model = "TQ-Systems i.MX8MN TQMa8MxNL";
+       compatible = "tq,imx8mn-tqma8mqnl", "fsl,imx8mn";
+
+       memory@40000000 {
+               device_type = "memory";
+               /*  our minimum RAM config will be 1024 MiB */
+               reg = <0x00000000 0x40000000 0 0x40000000>;
+       };
+
+       /* e-MMC IO, needed for HS modes */
+       reg_vcc1v8: regulator-vcc1v8 {
+               compatible = "regulator-fixed";
+               regulator-name = "TQMA8MXNL_VCC1V8";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+       };
+
+       reg_vcc3v3: regulator-vcc3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "TQMA8MXNL_VCC3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
+       reserved-memory {
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+
+               /* global autoconfigured region for contiguous allocations */
+               linux,cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 640 MiB */
+                       size = <0 0x28000000>;
+                       /*  1024 - 128 MiB, our minimum RAM config will be 1024 MiB */
+                       alloc-ranges = <0 0x40000000 0 0x78000000>;
+                       linux,cma-default;
+               };
+       };
+};
+
+&A53_0 {
+       cpu-supply = <&buck2_reg>;
+};
+
+&flexspi {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_flexspi>;
+       status = "okay";
+
+       flash0: flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               spi-max-frequency = <84000000>;
+               spi-tx-bus-width = <1>;
+               spi-rx-bus-width = <4>;
+       };
+};
+
+&i2c1 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default", "gpio";
+       pinctrl-0 = <&pinctrl_i2c1>;
+       pinctrl-1 = <&pinctrl_i2c1_gpio>;
+       scl-gpios = <&gpio5 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+       sda-gpios = <&gpio5 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+       status = "okay";
+
+       sensor0: temperature-sensor-eeprom@1b {
+               compatible = "nxp,se97", "jedec,jc-42.4-temp";
+               reg = <0x1b>;
+       };
+
+       pca9450: pmic@25 {
+               compatible = "nxp,pca9450a";
+               reg = <0x25>;
+
+               /* PMIC PCA9450 PMIC_nINT GPIO1_IO08 */
+               pinctrl-0 = <&pinctrl_pmic>;
+               pinctrl-names = "default";
+               interrupt-parent = <&gpio1>;
+               interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
+
+               regulators {
+                       /* V_0V85_SOC: 0.85 .. 0.95 */
+                       buck1_reg: BUCK1 {
+                               regulator-name = "BUCK1";
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <950000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <3125>;
+                       };
+
+                       /* VDD_ARM */
+                       buck2_reg: BUCK2 {
+                               regulator-name = "BUCK2";
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               nxp,dvs-run-voltage = <950000>;
+                               nxp,dvs-standby-voltage = <850000>;
+                               regulator-ramp-delay = <3125>;
+                       };
+
+                       /* V_0V85_GPU / DRAM: shall be equal to BUCK1 for i.MX8MN */
+                       buck3_reg: BUCK3 {
+                               regulator-name = "BUCK3";
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <950000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <3125>;
+                       };
+
+                       /* VCC3V3 -> VMMC, ... must not be changed */
+                       buck4_reg: BUCK4 {
+                               regulator-name = "BUCK4";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       /* V_1V8 -> VQMMC, SPI-NOR, ... must not be changed */
+                       buck5_reg: BUCK5 {
+                               regulator-name = "BUCK5";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       /* V_1V1 -> RAM, ... must not be changed */
+                       buck6_reg: BUCK6 {
+                               regulator-name = "BUCK6";
+                               regulator-min-microvolt = <1100000>;
+                               regulator-max-microvolt = <1100000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       /* V_1V8_SNVS */
+                       ldo1_reg: LDO1 {
+                               regulator-name = "LDO1";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       /* V_0V8_SNVS */
+                       ldo2_reg: LDO2 {
+                               regulator-name = "LDO2";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <850000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       /* V_1V8_ANA */
+                       ldo3_reg: LDO3 {
+                               regulator-name = "LDO3";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       /* V_0V9_MIPI */
+                       ldo4_reg: LDO4 {
+                               regulator-name = "LDO4";
+                               regulator-min-microvolt = <900000>;
+                               regulator-max-microvolt = <900000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       /* VCC SD IO - switched using SD2 VSELECT */
+                       ldo5_reg: LDO5 {
+                               regulator-name = "LDO5";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                       };
+               };
+       };
+
+       pcf85063: rtc@51 {
+               compatible = "nxp,pcf85063a";
+               reg = <0x51>;
+               quartz-load-femtofarads = <7000>;
+       };
+
+       eeprom1: eeprom@53 {
+               compatible = "nxp,se97b", "atmel,24c02";
+               read-only;
+               reg = <0x53>;
+               pagesize = <16>;
+       };
+
+       eeprom0: eeprom@57 {
+               compatible = "atmel,24c64";
+               reg = <0x57>;
+               pagesize = <32>;
+       };
+};
+
+&usdhc3 {
+       pinctrl-names = "default", "state_100mhz", "state_200mhz";
+       pinctrl-0 = <&pinctrl_usdhc3>;
+       pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
+       pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
+       bus-width = <8>;
+       non-removable;
+       no-sd;
+       no-sdio;
+       vmmc-supply = <&reg_vcc3v3>;
+       vqmmc-supply = <&reg_vcc1v8>;
+       status = "okay";
+};
+
+/*
+ * Attention:
+ * wdog reset is routed to PMIC, PMIC must be preconfigured to force POR
+ * without LDO for SNVS. GPIO1_IO02 must not be used as GPIO.
+ */
+&wdog1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_wdog>;
+       fsl,ext-reset-output;
+       status = "okay";
+};
+
+&iomuxc {
+       pinctrl_flexspi: flexspigrp {
+               fsl,pins = <MX8MN_IOMUXC_NAND_ALE_QSPI_A_SCLK           0x84>,
+                          <MX8MN_IOMUXC_NAND_CE0_B_QSPI_A_SS0_B        0x84>,
+                          <MX8MN_IOMUXC_NAND_DATA00_QSPI_A_DATA0       0x84>,
+                          <MX8MN_IOMUXC_NAND_DATA01_QSPI_A_DATA1       0x84>,
+                          <MX8MN_IOMUXC_NAND_DATA02_QSPI_A_DATA2       0x84>,
+                          <MX8MN_IOMUXC_NAND_DATA03_QSPI_A_DATA3       0x84>;
+       };
+
+       pinctrl_i2c1: i2c1grp {
+               fsl,pins = <MX8MN_IOMUXC_I2C1_SCL_I2C1_SCL              0x400001c4>,
+                          <MX8MN_IOMUXC_I2C1_SDA_I2C1_SDA              0x400001c4>;
+       };
+
+       pinctrl_i2c1_gpio: i2c1gpiogrp {
+               fsl,pins = <MX8MN_IOMUXC_I2C1_SCL_GPIO5_IO14    0x400001c4>,
+                          <MX8MN_IOMUXC_I2C1_SDA_GPIO5_IO15    0x400001c4>;
+       };
+
+       pinctrl_pmic: pmicgrp {
+               fsl,pins = <MX8MN_IOMUXC_GPIO1_IO08_GPIO1_IO8   0x84>;
+       };
+
+       pinctrl_reg_usdhc2_vmmc: regusdhc2vmmcgrp {
+               fsl,pins = <MX8MN_IOMUXC_SD2_RESET_B_GPIO2_IO19         0x84>;
+       };
+
+       pinctrl_usdhc3: usdhc3grp {
+               fsl,pins = <MX8MN_IOMUXC_NAND_WE_B_USDHC3_CLK           0x1d4>,
+                          <MX8MN_IOMUXC_NAND_WP_B_USDHC3_CMD           0x1d2>,
+                          <MX8MN_IOMUXC_NAND_DATA04_USDHC3_DATA0       0x1d4>,
+                          <MX8MN_IOMUXC_NAND_DATA05_USDHC3_DATA1       0x1d4>,
+                          <MX8MN_IOMUXC_NAND_DATA06_USDHC3_DATA2       0x1d4>,
+                          <MX8MN_IOMUXC_NAND_DATA07_USDHC3_DATA3       0x1d4>,
+                          <MX8MN_IOMUXC_NAND_RE_B_USDHC3_DATA4         0x1d4>,
+                          <MX8MN_IOMUXC_NAND_CE2_B_USDHC3_DATA5        0x1d4>,
+                          <MX8MN_IOMUXC_NAND_CE3_B_USDHC3_DATA6        0x1d4>,
+                          <MX8MN_IOMUXC_NAND_CLE_USDHC3_DATA7          0x1d4>,
+                          <MX8MN_IOMUXC_NAND_CE1_B_USDHC3_STROBE       0x84>,
+                          <MX8MN_IOMUXC_NAND_READY_B_USDHC3_RESET_B    0x84>;
+       };
+
+       pinctrl_usdhc3_100mhz: usdhc3-100mhzgrp {
+               fsl,pins = <MX8MN_IOMUXC_NAND_WE_B_USDHC3_CLK           0x1d2>,
+                          <MX8MN_IOMUXC_NAND_WP_B_USDHC3_CMD           0x1d2>,
+                          <MX8MN_IOMUXC_NAND_DATA04_USDHC3_DATA0       0x1d4>,
+                          <MX8MN_IOMUXC_NAND_DATA05_USDHC3_DATA1       0x1d4>,
+                          <MX8MN_IOMUXC_NAND_DATA06_USDHC3_DATA2       0x1d4>,
+                          <MX8MN_IOMUXC_NAND_DATA07_USDHC3_DATA3       0x1d4>,
+                          <MX8MN_IOMUXC_NAND_RE_B_USDHC3_DATA4         0x1d4>,
+                          <MX8MN_IOMUXC_NAND_CE2_B_USDHC3_DATA5        0x1d4>,
+                          <MX8MN_IOMUXC_NAND_CE3_B_USDHC3_DATA6        0x1d4>,
+                          <MX8MN_IOMUXC_NAND_CLE_USDHC3_DATA7          0x1d4>,
+                          <MX8MN_IOMUXC_NAND_CE1_B_USDHC3_STROBE       0x84>,
+                          <MX8MN_IOMUXC_NAND_READY_B_USDHC3_RESET_B    0x84>;
+       };
+
+       pinctrl_usdhc3_200mhz: usdhc3-200mhzgrp {
+               fsl,pins = <MX8MN_IOMUXC_NAND_WE_B_USDHC3_CLK           0x1d6>,
+                          <MX8MN_IOMUXC_NAND_WP_B_USDHC3_CMD           0x1d2>,
+                          <MX8MN_IOMUXC_NAND_DATA04_USDHC3_DATA0       0x1d4>,
+                          <MX8MN_IOMUXC_NAND_DATA05_USDHC3_DATA1       0x1d4>,
+                          <MX8MN_IOMUXC_NAND_DATA06_USDHC3_DATA2       0x1d4>,
+                          <MX8MN_IOMUXC_NAND_DATA07_USDHC3_DATA3       0x1d4>,
+                          <MX8MN_IOMUXC_NAND_RE_B_USDHC3_DATA4         0x1d4>,
+                          <MX8MN_IOMUXC_NAND_CE2_B_USDHC3_DATA5        0x1d4>,
+                          <MX8MN_IOMUXC_NAND_CE3_B_USDHC3_DATA6        0x1d4>,
+                          <MX8MN_IOMUXC_NAND_CLE_USDHC3_DATA7          0x1d4>,
+                          <MX8MN_IOMUXC_NAND_CE1_B_USDHC3_STROBE       0x84>,
+                          <MX8MN_IOMUXC_NAND_READY_B_USDHC3_RESET_B    0x84>;
+       };
+
+       pinctrl_wdog: wdoggrp {
+               fsl,pins = <MX8MN_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B        0x84>;
+       };
+};
index da6c942..b8d49d5 100644 (file)
                        clock-latency = <61036>;
                        clocks = <&clk IMX8MN_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        nvmem-cells = <&cpu_speed_grade>;
                        clock-latency = <61036>;
                        clocks = <&clk IMX8MN_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        cpu-idle-states = <&cpu_pd_wait>;
                        clock-latency = <61036>;
                        clocks = <&clk IMX8MN_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        cpu-idle-states = <&cpu_pd_wait>;
                        clock-latency = <61036>;
                        clocks = <&clk IMX8MN_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        cpu-idle-states = <&cpu_pd_wait>;
 
                A53_L2: l2-cache0 {
                        compatible = "cache";
+                       cache-level = <2>;
+                       cache-size = <0x80000>;
+                       cache-line-size = <64>;
+                       cache-sets = <512>;
                };
        };
 
                                fsl,num-rx-queues = <3>;
                                nvmem-cells = <&fec_mac_address>;
                                nvmem-cell-names = "mac-address";
-                               nvmem_macaddr_swap;
                                fsl,stop-mode = <&gpr 0x10 3>;
                                status = "disabled";
                        };
index 7b99fad..2eb9432 100644 (file)
@@ -86,6 +86,9 @@
        pinctrl-0 = <&pinctrl_eqos>;
        phy-mode = "rgmii-id";
        phy-handle = <&ethphy0>;
+       snps,force_thresh_dma_mode;
+       snps,mtl-tx-config = <&mtl_tx_setup>;
+       snps,mtl-rx-config = <&mtl_rx_setup>;
        status = "okay";
 
        mdio {
                        compatible = "ethernet-phy-ieee802.3-c22";
                        reg = <1>;
                        eee-broken-1000t;
+                       reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;
+                       reset-assert-us = <10000>;
+                       reset-deassert-us = <80000>;
+                       realtek,clkout-disable;
+               };
+       };
+
+       mtl_tx_setup: tx-queues-config {
+               snps,tx-queues-to-use = <5>;
+               snps,tx-sched-sp;
+
+               queue0 {
+                       snps,dcb-algorithm;
+                       snps,priority = <0x1>;
+               };
+
+               queue1 {
+                       snps,dcb-algorithm;
+                       snps,priority = <0x2>;
+               };
+
+               queue2 {
+                       snps,dcb-algorithm;
+                       snps,priority = <0x4>;
+               };
+
+               queue3 {
+                       snps,dcb-algorithm;
+                       snps,priority = <0x8>;
+               };
+
+               queue4 {
+                       snps,dcb-algorithm;
+                       snps,priority = <0xf0>;
+               };
+       };
+
+       mtl_rx_setup: rx-queues-config {
+               snps,rx-queues-to-use = <5>;
+               snps,rx-sched-sp;
+
+               queue0 {
+                       snps,dcb-algorithm;
+                       snps,priority = <0x1>;
+                       snps,map-to-dma-channel = <0>;
+               };
+
+               queue1 {
+                       snps,dcb-algorithm;
+                       snps,priority = <0x2>;
+                       snps,map-to-dma-channel = <1>;
+               };
+
+               queue2 {
+                       snps,dcb-algorithm;
+                       snps,priority = <0x4>;
+                       snps,map-to-dma-channel = <2>;
+               };
+
+               queue3 {
+                       snps,dcb-algorithm;
+                       snps,priority = <0x8>;
+                       snps,map-to-dma-channel = <3>;
+               };
+
+               queue4 {
+                       snps,dcb-algorithm;
+                       snps,priority = <0xf0>;
+                       snps,map-to-dma-channel = <4>;
                };
        };
 };
                        reset-gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
                        reset-assert-us = <10000>;
                        reset-deassert-us = <80000>;
+                       realtek,clkout-disable;
                };
        };
 };
index 04d259d..6b840c0 100644 (file)
                        clock-latency = <61036>;
                        clocks = <&clk IMX8MP_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        #cooling-cells = <2>;
                };
                        clock-latency = <61036>;
                        clocks = <&clk IMX8MP_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        #cooling-cells = <2>;
                };
                        clock-latency = <61036>;
                        clocks = <&clk IMX8MP_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        #cooling-cells = <2>;
                };
                        clock-latency = <61036>;
                        clocks = <&clk IMX8MP_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        #cooling-cells = <2>;
                };
 
                A53_L2: l2-cache0 {
                        compatible = "cache";
+                       cache-level = <2>;
+                       cache-size = <0x80000>;
+                       cache-line-size = <64>;
+                       cache-sets = <512>;
                };
        };
 
                                eth_mac1: mac-address@90 {
                                        reg = <0x90 6>;
                                };
+
+                               eth_mac2: mac-address@96 {
+                                       reg = <0x96 6>;
+                               };
                        };
 
                        anatop: anatop@30360000 {
                                nvmem-cells = <&eth_mac1>;
                                nvmem-cell-names = "mac-address";
                                fsl,stop-mode = <&gpr 0x10 3>;
-                               nvmem_macaddr_swap;
                                status = "disabled";
                        };
 
                                                         <&clk IMX8MP_SYS_PLL2_100M>,
                                                         <&clk IMX8MP_SYS_PLL2_125M>;
                                assigned-clock-rates = <0>, <100000000>, <125000000>;
+                               nvmem-cells = <&eth_mac2>;
+                               nvmem-cell-names = "mac-address";
                                intf_mode = <&gpr 0x4>;
                                status = "disabled";
                        };
index b83df77..a1b7582 100644 (file)
                        reg = <0>;
                        reset-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
                        reset-assert-us = <10000>;
+                       qca,disable-smarteee;
+                       vddio-supply = <&vddh>;
+
+                       vddh: vddh-regulator {
+                       };
                };
        };
 };
        power-supply = <&sw1a_reg>;
 };
 
+&pgc_vpu {
+       power-supply = <&sw1c_reg>;
+};
+
 &qspi0 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_qspi>;
index cd3c3ed..4533a84 100644 (file)
@@ -1,14 +1,9 @@
 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-// Copyright (C) 2020 Purism SPC <kernel@puri.sm>
+// Copyright (C) 2021 Purism SPC <kernel@puri.sm>
 
 /dts-v1/;
 
-#include "imx8mq-librem5.dtsi"
-
-/ {
-       model = "Purism Librem 5r3";
-       compatible = "purism,librem5r3", "purism,librem5", "fsl,imx8mq";
-};
+#include "imx8mq-librem5-r3.dtsi"
 
 &a53_opp_table {
        opp-1000000000 {
        };
 };
 
-&accel_gyro {
-       mount-matrix =  "1",  "0",  "0",
-                       "0",  "1",  "0",
-                       "0",  "0", "-1";
-};
-
-&bq25895 {
-       ti,battery-regulation-voltage = <4200000>; /* uV */
-       ti,charge-current = <1500000>; /* uA */
-       ti,termination-current = <144000>;  /* uA */
-};
-
 &buck3_reg {
        regulator-always-on;
 };
-
-&proximity {
-       proximity-near-level = <25>;
-};
diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dtsi
new file mode 100644 (file)
index 0000000..e4f8b47
--- /dev/null
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+// Copyright (C) 2021 Purism SPC <kernel@puri.sm>
+
+/dts-v1/;
+
+/*
+ * This file describes hardware that is shared among r3 ("Dogwood") and
+ * later revisions of the Librem 5 so it has to be included in dts there.
+ */
+
+#include "imx8mq-librem5.dtsi"
+
+/ {
+       model = "Purism Librem 5r3";
+       compatible = "purism,librem5r3", "purism,librem5", "fsl,imx8mq";
+};
+
+&accel_gyro {
+       mount-matrix =  "1",  "0",  "0",
+                       "0",  "1",  "0",
+                       "0",  "0", "-1";
+};
+
+&bq25895 {
+       ti,battery-regulation-voltage = <4200000>; /* uV */
+       ti,charge-current = <1500000>; /* uA */
+       ti,termination-current = <144000>;  /* uA */
+};
+
+&camera_front {
+       pinctrl-0 = <&pinctrl_csi1>, <&pinctrl_r3_camera_pwr>;
+       shutdown-gpios = <&gpio5 4 GPIO_ACTIVE_LOW>;
+};
+
+&iomuxc {
+       pinctrl_r3_camera_pwr: r3camerapwrgrp {
+               fsl,pins = <
+                       MX8MQ_IOMUXC_SPDIF_RX_GPIO5_IO4         0x83
+               >;
+       };
+};
+
+&proximity {
+       proximity-near-level = <25>;
+};
index cbfb49a..30d65be 100644 (file)
@@ -1,31 +1,19 @@
 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-// Copyright (C) 2020 Purism SPC <kernel@puri.sm>
+// Copyright (C) 2021 Purism SPC <kernel@puri.sm>
 
 /dts-v1/;
 
-#include "imx8mq-librem5.dtsi"
+#include "imx8mq-librem5-r3.dtsi"
 
 / {
        model = "Purism Librem 5r4";
        compatible = "purism,librem5r4", "purism,librem5", "fsl,imx8mq";
 };
 
-&accel_gyro {
-       mount-matrix =  "1",  "0",  "0",
-                       "0",  "1",  "0",
-                       "0",  "0", "-1";
-};
-
 &bat {
        maxim,rsns-microohm = <1667>;
 };
 
-&bq25895 {
-       ti,battery-regulation-voltage = <4200000>; /* uV */
-       ti,charge-current = <1500000>; /* uA */
-       ti,termination-current = <144000>;  /* uA */
-};
-
 &led_backlight {
        led-max-microamp = <25000>;
 };
index 60d47c7..f3e3418 100644 (file)
@@ -14,6 +14,7 @@
 / {
        model = "Purism Librem 5";
        compatible = "purism,librem5", "fsl,imx8mq";
+       chassis-type = "handset";
 
        backlight_dsi: backlight-dsi {
                compatible = "led-backlight";
                enable-active-high;
        };
 
+       /*
+        * the pinctrl for reg_csi_1v8 and reg_vcam_1v8 is added to the PMIC
+        * since we can't have it twice in the 2 different regulator nodes.
+        */
+       reg_csi_1v8: regulator-csi-1v8 {
+               compatible = "regulator-fixed";
+               regulator-name = "CAMERA_VDDIO_1V8";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               vin-supply = <&reg_vdd_3v3>;
+               gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       /* controlled by the CAMERA_POWER_KEY HKS */
+       reg_vcam_1v2: regulator-vcam-1v2 {
+               compatible = "regulator-fixed";
+               regulator-name = "CAMERA_VDDD_1V2";
+               regulator-min-microvolt = <1200000>;
+               regulator-max-microvolt = <1200000>;
+               vin-supply = <&reg_vdd_1v8>;
+               enable-active-high;
+       };
+
+       reg_vcam_2v8: regulator-vcam-2v8 {
+               compatible = "regulator-fixed";
+               regulator-name = "CAMERA_VDDA_2V8";
+               regulator-min-microvolt = <2800000>;
+               regulator-max-microvolt = <2800000>;
+               vin-supply = <&reg_vdd_3v3>;
+               gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
        reg_gnss: regulator-gnss {
                compatible = "regulator-fixed";
                pinctrl-names = "default";
        cpu-supply = <&buck2_reg>;
 };
 
+&csi1 {
+       status = "okay";
+};
+
 &ddrc {
        operating-points-v2 = <&ddrc_opp_table>;
 
                >;
        };
 
+       pinctrl_camera_pwr: camerapwrgrp {
+               fsl,pins = <
+                       /* CAMERA_PWR_EN_3V3 */
+                       MX8MQ_IOMUXC_GPIO1_IO00_GPIO1_IO0       0x83
+               >;
+       };
+
+       pinctrl_csi1: csi1grp {
+               fsl,pins = <
+                       /* CSI1_NRST */
+                       MX8MQ_IOMUXC_ENET_RXC_GPIO1_IO25        0x83
+               >;
+       };
+
        pinctrl_charger_in: chargeringrp {
                fsl,pins = <
                        /* CHRG_INT */
                compatible = "rohm,bd71837";
                reg = <0x4b>;
                pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_pmic>;
+               pinctrl-0 = <&pinctrl_pmic>, <&pinctrl_camera_pwr>;
                clocks = <&pmic_osc>;
                clock-names = "osc";
                clock-output-names = "pmic_clk";
                >;
        };
 
+       camera_front: camera@20 {
+               compatible = "hynix,hi846";
+               reg = <0x20>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_csi1>;
+               clocks = <&clk IMX8MQ_CLK_CLKO2>;
+               assigned-clocks = <&clk IMX8MQ_CLK_CLKO2>;
+               assigned-clock-rates = <25000000>;
+               reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
+               vdda-supply = <&reg_vcam_2v8>;
+               vddd-supply = <&reg_vcam_1v2>;
+               vddio-supply = <&reg_csi_1v8>;
+               rotation = <90>;
+               orientation = <0>;
+
+               port {
+                       camera1_ep: endpoint {
+                               data-lanes = <1 2>;
+                               link-frequencies = /bits/ 64
+                                       <80000000 200000000 300000000>;
+                               remote-endpoint = <&mipi1_sensor_ep>;
+                       };
+               };
+       };
+
        backlight@36 {
                compatible = "ti,lm36922";
                reg = <0x36>;
        status = "okay";
 };
 
+&mipi_csi1 {
+       #address-cells = <1>;
+       #size-cells = <0>;
+       status = "okay";
+
+       ports {
+               port@1 {
+                       reg = <1>;
+
+                       mipi1_sensor_ep: endpoint {
+                               remote-endpoint = <&camera1_ep>;
+                               data-lanes = <1 2>;
+                       };
+               };
+       };
+};
+
 &mipi_dsi {
        #address-cells = <1>;
        #size-cells = <0>;
index 4f2db61..fa721a1 100644 (file)
@@ -12,6 +12,7 @@
 / {
        model = "MNT Reform 2";
        compatible = "mntre,reform2", "boundary,imx8mq-nitrogen8m-som", "fsl,imx8mq";
+       chassis-type = "laptop";
 
        pcie1_refclk: clock-pcie1-refclk {
                compatible = "fixed-clock";
index 36fc428..395f77b 100644 (file)
@@ -69,6 +69,9 @@
                        reg = <4>;
                        interrupt-parent = <&gpio1>;
                        interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
+                       reset-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
+                       reset-assert-us = <10000>;
+                       reset-deassert-us = <300>;
                };
        };
 };
                        MX8MQ_IOMUXC_ENET_TD2_ENET1_RGMII_TD2           0x1f
                        MX8MQ_IOMUXC_ENET_TD3_ENET1_RGMII_TD3           0x1f
                        MX8MQ_IOMUXC_ENET_RX_CTL_ENET1_RGMII_RX_CTL     0x91
-                       MX8MQ_IOMUXC_ENET_RXC_ENET1_RGMII_RXC           0x91
+                       MX8MQ_IOMUXC_ENET_RXC_ENET1_RGMII_RXC           0xd1
                        MX8MQ_IOMUXC_ENET_RD0_ENET1_RGMII_RD0           0x91
                        MX8MQ_IOMUXC_ENET_RD1_ENET1_RGMII_RD1           0x91
                        MX8MQ_IOMUXC_ENET_RD2_ENET1_RGMII_RD2           0x91
-                       MX8MQ_IOMUXC_ENET_RD3_ENET1_RGMII_RD3           0x91
-                       MX8MQ_IOMUXC_GPIO1_IO09_GPIO1_IO9               0x19
-                       MX8MQ_IOMUXC_GPIO1_IO11_GPIO1_IO11              0x59
+                       MX8MQ_IOMUXC_ENET_RD3_ENET1_RGMII_RD3           0xd1
+                       MX8MQ_IOMUXC_GPIO1_IO09_GPIO1_IO9               0x1
+                       MX8MQ_IOMUXC_GPIO1_IO11_GPIO1_IO11              0x41
                >;
        };
 
        pinctrl_i2c1: i2c1grp {
                fsl,pins = <
-                       MX8MQ_IOMUXC_I2C1_SCL_I2C1_SCL                  0x4000007f
-                       MX8MQ_IOMUXC_I2C1_SDA_I2C1_SDA                  0x4000007f
+                       MX8MQ_IOMUXC_I2C1_SCL_I2C1_SCL                  0x40000022
+                       MX8MQ_IOMUXC_I2C1_SDA_I2C1_SDA                  0x40000022
                >;
        };
 
diff --git a/arch/arm64/boot/dts/freescale/imx8mq-tqma8mq-mba8mx.dts b/arch/arm64/boot/dts/freescale/imx8mq-tqma8mq-mba8mx.dts
new file mode 100644 (file)
index 0000000..d7660ea
--- /dev/null
@@ -0,0 +1,349 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright 2019-2021 TQ-Systems GmbH
+ */
+
+/dts-v1/;
+
+#include "imx8mq-tqma8mq.dtsi"
+#include "mba8mx.dtsi"
+
+/ {
+       model = "TQ-Systems GmbH i.MX8MQ TQMa8MQ on MBa8Mx";
+       compatible = "tq,imx8mq-tqma8mq-mba8mx", "tq,imx8mq-tqma8mq", "fsl,imx8mq";
+
+       aliases {
+               eeprom0 = &eeprom3;
+               mmc0 = &usdhc1;
+               mmc1 = &usdhc2;
+               rtc0 = &pcf85063;
+               rtc1 = &snvs_rtc;
+       };
+
+       extcon_usbotg: extcon-usbotg0 {
+               compatible = "linux,extcon-usb-gpio";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usbcon0>;
+               id-gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>;
+       };
+
+       pcie0_refclk: pcie0-refclk {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <100000000>;
+       };
+
+       pcie1_refclk: pcie1-refclk {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <100000000>;
+       };
+
+       reg_otg_vbus: regulator-otg-vbus {
+               compatible = "regulator-fixed";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_regotgvbus>;
+               regulator-name = "MBA8MQ_OTG_VBUS";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       reg_usdhc2_vmmc: regulator-vmmc {
+               compatible = "regulator-fixed";
+               regulator-name = "VSD_3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+};
+
+&btn2 {
+       gpios = <&gpio3 17 GPIO_ACTIVE_LOW>;
+};
+
+&gpio_leds {
+       led3 {
+               label = "led3";
+               gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
+       };
+};
+
+&i2c1 {
+       expander2: gpio@25 {
+               compatible = "nxp,pca9555";
+               reg = <0x25>;
+               gpio-controller;
+               #gpio-cells = <2>;
+               vcc-supply = <&reg_vcc_3v3>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_expander>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+
+               mpcie-rst-hog {
+                       gpio-hog;
+                       gpios = <13 0>;
+                       output-high;
+                       line-name = "MPCIE_RST#";
+               };
+       };
+};
+
+&irqsteer {
+       status = "okay";
+};
+
+&led2 {
+       gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>;
+};
+
+&pcie0 {
+       reset-gpio = <&expander0 14 GPIO_ACTIVE_LOW>;
+       clocks = <&clk IMX8MQ_CLK_PCIE1_ROOT>,
+                <&clk IMX8MQ_CLK_PCIE1_AUX>,
+                <&clk IMX8MQ_CLK_PCIE1_PHY>,
+                <&pcie0_refclk>;
+       clock-names = "pcie", "pcie_aux", "pcie_phy", "pcie_bus";
+       epdev_on-supply = <&reg_vcc_3v3>;
+       hard-wired = <1>;
+       status = "okay";
+};
+
+/*
+ * miniPCIe, also usable for cards with USB. Therefore configure the reset as
+ * static gpio hog.
+ */
+&pcie1 {
+       clocks = <&clk IMX8MQ_CLK_PCIE2_ROOT>,
+                <&clk IMX8MQ_CLK_PCIE2_AUX>,
+                <&clk IMX8MQ_CLK_PCIE2_PHY>,
+                <&pcie1_refclk>;
+       clock-names = "pcie", "pcie_aux", "pcie_phy", "pcie_bus";
+       epdev_on-supply = <&reg_vcc_3v3>;
+       hard-wired = <1>;
+       status = "okay";
+};
+
+&sai3 {
+       assigned-clocks = <&clk IMX8MQ_CLK_SAI3>;
+       assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>;
+       clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k", "pll11k";
+       clocks = <&clk IMX8MQ_CLK_SAI3_IPG>, <&clk IMX8MQ_CLK_DUMMY>,
+               <&clk IMX8MQ_CLK_SAI3_ROOT>, <&clk IMX8MQ_CLK_DUMMY>,
+               <&clk IMX8MQ_CLK_DUMMY>, <&clk IMX8MQ_AUDIO_PLL1_OUT>,
+               <&clk IMX8MQ_AUDIO_PLL2_OUT>;
+};
+
+&tlv320aic3x04 {
+       clock-names = "mclk";
+       clocks = <&clk IMX8MQ_CLK_SAI3_ROOT>;
+};
+
+&uart1 {
+       assigned-clocks = <&clk IMX8MQ_CLK_UART1>;
+       assigned-clock-parents = <&clk IMX8MQ_SYS1_PLL_80M>;
+};
+
+&uart2 {
+       assigned-clocks = <&clk IMX8MQ_CLK_UART2>;
+       assigned-clock-parents = <&clk IMX8MQ_SYS1_PLL_80M>;
+};
+
+/* console */
+&uart3 {
+       assigned-clocks = <&clk IMX8MQ_CLK_UART3>;
+       assigned-clock-parents = <&clk IMX8MQ_CLK_25M>;
+};
+
+&usb3_phy0 {
+       vbus-supply = <&reg_otg_vbus>;
+       status = "okay";
+};
+
+&usb_dwc3_0 {
+       /* we implement dual role but not full featured OTG */
+       extcon = <&extcon_usbotg>;
+       hnp-disable;
+       srp-disable;
+       adp-disable;
+       /* OC not supported due to non matching active polarity */
+       disable-over-current;
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usb3_phy1 {
+       status = "okay";
+};
+
+&usb_dwc3_1 {
+       status = "okay";
+       dr_mode = "host";
+};
+
+&wdog1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_wdog>;
+       fsl,ext-reset-output;
+       status = "okay";
+};
+
+&iomuxc {
+       pinctrl_ecspi1: ecspi1grp {
+               fsl,pins = <MX8MQ_IOMUXC_ECSPI1_SCLK_ECSPI1_SCLK        0x0000004e>,
+                          <MX8MQ_IOMUXC_ECSPI1_MOSI_ECSPI1_MOSI        0x0000004e>,
+                          <MX8MQ_IOMUXC_ECSPI1_MISO_ECSPI1_MISO        0x0000004e>,
+                          <MX8MQ_IOMUXC_ECSPI1_SS0_GPIO5_IO9           0x0000004e>;
+       };
+
+       pinctrl_ecspi2: ecspi2grp {
+               fsl,pins = <MX8MQ_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK        0x0000004e>,
+                          <MX8MQ_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI        0x0000004e>,
+                          <MX8MQ_IOMUXC_ECSPI2_MISO_ECSPI2_MISO        0x0000004e>,
+                          <MX8MQ_IOMUXC_ECSPI2_SS0_GPIO5_IO13          0x0000004e>;
+       };
+
+       pinctrl_expander: expandergrp {
+               fsl,pins = <MX8MQ_IOMUXC_GPIO1_IO09_GPIO1_IO9           0xd6>;
+       };
+
+       pinctrl_fec1: fec1grp {
+               fsl,pins = <MX8MQ_IOMUXC_ENET_MDC_ENET1_MDC             0x3>,
+                          <MX8MQ_IOMUXC_ENET_MDIO_ENET1_MDIO           0x23>,
+                          <MX8MQ_IOMUXC_ENET_TD3_ENET1_RGMII_TD3       0x1f>,
+                          <MX8MQ_IOMUXC_ENET_TD2_ENET1_RGMII_TD2       0x1f>,
+                          <MX8MQ_IOMUXC_ENET_TD1_ENET1_RGMII_TD1       0x1f>,
+                          <MX8MQ_IOMUXC_ENET_TD0_ENET1_RGMII_TD0       0x1f>,
+                          <MX8MQ_IOMUXC_ENET_RD3_ENET1_RGMII_RD3       0x91>,
+                          <MX8MQ_IOMUXC_ENET_RD2_ENET1_RGMII_RD2       0x91>,
+                          <MX8MQ_IOMUXC_ENET_RD1_ENET1_RGMII_RD1       0x91>,
+                          <MX8MQ_IOMUXC_ENET_RD0_ENET1_RGMII_RD0       0x91>,
+                          <MX8MQ_IOMUXC_ENET_TXC_ENET1_RGMII_TXC       0x1f>,
+                          <MX8MQ_IOMUXC_ENET_RXC_ENET1_RGMII_RXC       0x91>,
+                          <MX8MQ_IOMUXC_ENET_RX_CTL_ENET1_RGMII_RX_CTL 0x91>,
+                          <MX8MQ_IOMUXC_ENET_TX_CTL_ENET1_RGMII_TX_CTL 0x1f>;
+       };
+
+       pinctrl_gpiobutton: gpiobuttongrp {
+               fsl,pins = <MX8MQ_IOMUXC_GPIO1_IO05_GPIO1_IO5           0x41>,
+                          <MX8MQ_IOMUXC_GPIO1_IO07_GPIO1_IO7           0x41>,
+                          <MX8MQ_IOMUXC_NAND_WE_B_GPIO3_IO17           0x41>;
+       };
+
+       pinctrl_gpioled: gpioledgrp {
+               fsl,pins = <MX8MQ_IOMUXC_GPIO1_IO00_GPIO1_IO0           0x41>,
+                          <MX8MQ_IOMUXC_GPIO1_IO08_GPIO1_IO8           0x41>,
+                          <MX8MQ_IOMUXC_NAND_READY_B_GPIO3_IO16        0x41>;
+       };
+
+       pinctrl_i2c2: i2c2grp {
+               fsl,pins = <MX8MQ_IOMUXC_I2C2_SCL_I2C2_SCL              0x40000067>,
+                          <MX8MQ_IOMUXC_I2C2_SDA_I2C2_SDA              0x40000067>;
+       };
+
+       pinctrl_i2c2_gpio: i2c2gpiogrp {
+               fsl,pins = <MX8MQ_IOMUXC_I2C2_SCL_GPIO5_IO16            0x40000067>,
+                          <MX8MQ_IOMUXC_I2C2_SDA_GPIO5_IO17            0x40000067>;
+       };
+
+       pinctrl_i2c3: i2c3grp {
+               fsl,pins = <MX8MQ_IOMUXC_I2C3_SCL_I2C3_SCL              0x40000067>,
+                          <MX8MQ_IOMUXC_I2C3_SDA_I2C3_SDA              0x40000067>;
+       };
+
+       pinctrl_i2c3_gpio: i2c3gpiogrp {
+               fsl,pins = <MX8MQ_IOMUXC_I2C3_SCL_GPIO5_IO18            0x40000067>,
+                          <MX8MQ_IOMUXC_I2C3_SDA_GPIO5_IO19            0x40000067>;
+       };
+
+       pinctrl_pwm3: pwm3grp {
+               fsl,pins = <MX8MQ_IOMUXC_GPIO1_IO14_PWM3_OUT            0x16>;
+       };
+
+       pinctrl_pwm4: pwm4grp {
+               fsl,pins = <MX8MQ_IOMUXC_GPIO1_IO15_PWM4_OUT            0x16>;
+       };
+
+       pinctrl_regotgvbus: reggotgvbusgrp {
+               /* USB1 OTG PWR as GPIO */
+               fsl,pins = <MX8MQ_IOMUXC_GPIO1_IO12_GPIO1_IO12          0x06>;
+       };
+
+       pinctrl_reg_usdhc2_vmmc: regusdhc2vmmcgrp {
+               fsl,pins = <MX8MQ_IOMUXC_SD2_RESET_B_GPIO2_IO19         0xc1>;
+       };
+
+       pinctrl_sai3: sai3grp {
+               fsl,pins = <MX8MQ_IOMUXC_SAI3_MCLK_SAI3_MCLK            0xd6>,
+                          <MX8MQ_IOMUXC_SAI3_RXC_SAI3_RX_BCLK          0xd6>,
+                          <MX8MQ_IOMUXC_SAI3_RXFS_SAI3_RX_SYNC         0xd6>,
+                          <MX8MQ_IOMUXC_SAI3_RXD_SAI3_RX_DATA0         0xd6>,
+                          <MX8MQ_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC         0xd6>,
+                          <MX8MQ_IOMUXC_SAI3_TXD_SAI3_TX_DATA0         0xd6>,
+                          <MX8MQ_IOMUXC_SAI3_TXC_SAI3_TX_BCLK          0xd6>;
+       };
+
+       pinctrl_uart1: uart1grp {
+               fsl,pins = <MX8MQ_IOMUXC_UART1_RXD_UART1_DCE_RX         0x79>,
+                          <MX8MQ_IOMUXC_UART1_TXD_UART1_DCE_TX         0x79>;
+       };
+
+       pinctrl_uart2: uart2grp {
+               fsl,pins = <MX8MQ_IOMUXC_UART2_RXD_UART2_DCE_RX         0x79>,
+                          <MX8MQ_IOMUXC_UART2_TXD_UART2_DCE_TX         0x79>;
+       };
+
+       pinctrl_uart3: uart3grp {
+               fsl,pins = <MX8MQ_IOMUXC_UART3_RXD_UART3_DCE_RX         0x79>,
+                          <MX8MQ_IOMUXC_UART3_TXD_UART3_DCE_TX         0x79>;
+       };
+
+       pinctrl_uart4: uart4grp {
+               fsl,pins = <MX8MQ_IOMUXC_UART4_RXD_UART4_DCE_RX         0x79>,
+                          <MX8MQ_IOMUXC_UART4_TXD_UART4_DCE_TX         0x79>;
+       };
+
+       pinctrl_usbcon0: usb0congrp {
+               /* ID: floating / high: device, low: host -> use PU */
+               fsl,pins = <MX8MQ_IOMUXC_GPIO1_IO10_GPIO1_IO10          0xe6>;
+       };
+
+       pinctrl_usdhc2: usdhc2grp {
+               fsl,pins = <MX8MQ_IOMUXC_SD2_CLK_USDHC2_CLK             0x83>,
+                          <MX8MQ_IOMUXC_SD2_CMD_USDHC2_CMD             0xc3>,
+                          <MX8MQ_IOMUXC_SD2_DATA0_USDHC2_DATA0         0xc3>,
+                          <MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1         0xc3>,
+                          <MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2         0xc3>,
+                          <MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3         0xc3>,
+                          <MX8MQ_IOMUXC_GPIO1_IO04_USDHC2_VSELECT      0xc1>;
+       };
+
+       pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
+               fsl,pins = <MX8MQ_IOMUXC_SD2_CLK_USDHC2_CLK             0x85>,
+                          <MX8MQ_IOMUXC_SD2_CMD_USDHC2_CMD             0xc5>,
+                          <MX8MQ_IOMUXC_SD2_DATA0_USDHC2_DATA0         0xc5>,
+                          <MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1         0xc5>,
+                          <MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2         0xc5>,
+                          <MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3         0xc5>,
+                          <MX8MQ_IOMUXC_GPIO1_IO04_USDHC2_VSELECT      0xc1>;
+       };
+
+       pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
+               fsl,pins = <MX8MQ_IOMUXC_SD2_CLK_USDHC2_CLK             0x9f>,
+                          <MX8MQ_IOMUXC_SD2_CMD_USDHC2_CMD             0xc7>,
+                          <MX8MQ_IOMUXC_SD2_DATA0_USDHC2_DATA0         0xc7>,
+                          <MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1         0xc7>,
+                          <MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2         0xc7>,
+                          <MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3         0xc7>,
+                          <MX8MQ_IOMUXC_GPIO1_IO04_USDHC2_VSELECT      0xc1>;
+       };
+
+       pinctrl_usdhc2_gpio: usdhc2-gpiogrp {
+               fsl,pins = <MX8MQ_IOMUXC_SD2_CD_B_GPIO2_IO12            0x41>;
+       };
+};
diff --git a/arch/arm64/boot/dts/freescale/imx8mq-tqma8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-tqma8mq.dtsi
new file mode 100644 (file)
index 0000000..8aedcdd
--- /dev/null
@@ -0,0 +1,360 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright 2019-2021 TQ-Systems GmbH
+ */
+
+#include "imx8mq.dtsi"
+
+/ {
+       model = "TQ-Systems GmbH i.MX8MQ TQMa8MQ";
+       compatible = "tq,imx8mq-tqma8mq", "fsl,imx8mq";
+
+       memory@40000000 {
+               device_type = "memory";
+               /*  our minimum RAM config will be 1024 MiB */
+               reg = <0x00000000 0x40000000 0 0x40000000>;
+       };
+
+       /* e-MMC IO, needed for HS modes */
+       reg_vcc1v8: regulator-vcc1v8 {
+               compatible = "regulator-fixed";
+               regulator-name = "TQMA8MX_VCC1V8";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+       };
+
+       reg_vcc3v3: regulator-vcc3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "TQMA8MX_VCC3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
+       reg_vdd_arm: regulator-vdd-arm {
+               compatible = "regulator-gpio";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_dvfs>;
+               regulator-min-microvolt = <900000>;
+               regulator-max-microvolt = <1000000>;
+               regulator-name = "TQMa8Mx_DVFS";
+               regulator-type = "voltage";
+               regulator-settling-time-us = <150000>;
+               gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+               states = <900000 0x1 1000000 0x0>;
+       };
+
+       reserved-memory {
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+
+               /* global autoconfigured region for contiguous allocations */
+               linux,cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 640 MiB */
+                       size = <0 0x28000000>;
+                       /*  1024 - 128 MiB, our minimum RAM config will be 1024 MiB */
+                       alloc-ranges = <0 0x40000000 0 0x78000000>;
+                       linux,cma-default;
+               };
+       };
+};
+
+&A53_0 {
+       cpu-supply = <&reg_vdd_arm>;
+};
+
+&A53_1 {
+       cpu-supply = <&reg_vdd_arm>;
+};
+
+&A53_2 {
+       cpu-supply = <&reg_vdd_arm>;
+};
+
+&A53_3 {
+       cpu-supply = <&reg_vdd_arm>;
+};
+
+&gpu {
+       status = "okay";
+};
+
+&pgc_gpu {
+       power-supply = <&sw1a_reg>;
+};
+
+&pgc_vpu {
+       power-supply = <&sw1c_reg>;
+};
+
+&i2c1 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default", "gpio";
+       pinctrl-0 = <&pinctrl_i2c1>;
+       pinctrl-1 = <&pinctrl_i2c1_gpio>;
+       scl-gpios = <&gpio5 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+       sda-gpios = <&gpio5 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+       status = "okay";
+
+       pfuze100: pmic@8 {
+               compatible = "fsl,pfuze100";
+               fsl,pfuze-support-disable-sw;
+               reg = <0x8>;
+
+               regulators {
+                       /* VDD_GPU */
+                       sw1a_reg: sw1ab {
+                               regulator-min-microvolt = <825000>;
+                               regulator-max-microvolt = <1100000>;
+                       };
+
+                       /* VDD_VPU */
+                       sw1c_reg: sw1c {
+                               regulator-min-microvolt = <825000>;
+                               regulator-max-microvolt = <1100000>;
+                       };
+
+                       /* NVCC_DRAM */
+                       sw2_reg: sw2 {
+                               regulator-min-microvolt = <1100000>;
+                               regulator-max-microvolt = <1100000>;
+                               regulator-always-on;
+                       };
+
+                       /* VDD_DRAM */
+                       sw3a_reg: sw3ab {
+                               regulator-min-microvolt = <825000>;
+                               regulator-max-microvolt = <1100000>;
+                               regulator-always-on;
+                       };
+
+                       /* 1.8 V for QSPI NOR, e-MMC IO, must not be changed */
+                       nvcc_1v8_reg: sw4 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
+                       };
+
+                       swbst_reg: swbst {
+                               regulator-min-microvolt = <5000000>;
+                               regulator-max-microvolt = <5150000>;
+                       };
+
+                       snvs_reg: vsnvs {
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <3000000>;
+                               regulator-always-on;
+                       };
+
+                       vref_reg: vrefddr {
+                               regulator-always-on;
+                       };
+
+                       /* not used */
+                       vgen1_reg: vgen1 {
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <1550000>;
+                       };
+
+                       /* VDD_PHY_0V9 */
+                       vgen2_reg: vgen2 {
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <975000>;
+                               regulator-always-on;
+                       };
+
+                       /* VDD_PHY_1V8 */
+                       vgen3_reg: vgen3 {
+                               regulator-min-microvolt = <1675000>;
+                               regulator-max-microvolt = <1975000>;
+                               regulator-always-on;
+                       };
+
+                       /* VDDA_1V8 */
+                       vgen4_reg: vgen4 {
+                               regulator-min-microvolt = <1625000>;
+                               regulator-max-microvolt = <1875000>;
+                               regulator-always-on;
+                       };
+
+                       /* VDD_PHY_3V3 */
+                       vgen5_reg: vgen5 {
+                               regulator-min-microvolt = <3075000>;
+                               regulator-max-microvolt = <3625000>;
+                               regulator-always-on;
+                       };
+
+                       /* not used */
+                       vgen6_reg: vgen6 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                       };
+               };
+       };
+
+       sensor0: temperature-sensor-eeprom@1b {
+               compatible = "nxp,se97", "jedec,jc-42.4-temp";
+               reg = <0x1b>;
+       };
+
+       pcf85063: rtc@51 {
+               compatible = "nxp,pcf85063a";
+               reg = <0x51>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_rtc>;
+               interrupt-names = "irq";
+               interrupt-parent = <&gpio1>;
+               interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
+               quartz-load-femtofarads = <7000>;
+
+               clock {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <32768>;
+               };
+       };
+
+       eeprom1: eeprom@53 {
+               compatible = "nxp,se97b", "atmel,24c02";
+               reg = <0x53>;
+               pagesize = <16>;
+               read-only;
+       };
+
+       eeprom0: eeprom@57 {
+               compatible = "atmel,24c64";
+               reg = <0x57>;
+               pagesize = <32>;
+       };
+};
+
+&pcie0 {
+       /* 3.3V supply, only way to switch on internal 1.8V supply using GPR */
+       vph-supply = <&vgen5_reg>;
+};
+
+&pcie1 {
+       /* 3.3V supply, only way to switch on internal 1.8V supply using GPR */
+       vph-supply = <&vgen5_reg>;
+};
+
+&qspi0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_qspi>;
+       assigned-clocks = <&clk IMX8MQ_CLK_QSPI>;
+       assigned-clock-parents = <&clk IMX8MQ_SYS1_PLL_266M>;
+       status = "okay";
+
+       flash0: flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               spi-max-frequency = <84000000>;
+               spi-tx-bus-width = <4>;
+               spi-rx-bus-width = <4>;
+       };
+};
+
+&usdhc1 {
+       pinctrl-names = "default", "state_100mhz", "state_200mhz";
+       pinctrl-0 = <&pinctrl_usdhc1>;
+       pinctrl-1 = <&pinctrl_usdhc1_100mhz>;
+       pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
+       bus-width = <8>;
+       non-removable;
+       no-sd;
+       no-sdio;
+       vmmc-supply = <&reg_vcc3v3>;
+       vqmmc-supply = <&reg_vcc1v8>;
+       status = "okay";
+};
+
+&vpu {
+       status = "okay";
+};
+
+/* Attention: wdog reset forcing POR needs baseboard support */
+&wdog1 {
+       status = "okay";
+};
+
+&iomuxc {
+       pinctrl_dvfs: dvfsgrp {
+               fsl,pins = <MX8MQ_IOMUXC_GPIO1_IO06_GPIO1_IO6   0x16>;
+       };
+
+       pinctrl_i2c1: i2c1grp {
+               fsl,pins = <MX8MQ_IOMUXC_I2C1_SCL_I2C1_SCL              0x4000007f>,
+                          <MX8MQ_IOMUXC_I2C1_SDA_I2C1_SDA              0x4000007f>;
+       };
+
+       pinctrl_i2c1_gpio: i2c1gpiogrp {
+               fsl,pins = <MX8MQ_IOMUXC_I2C1_SCL_GPIO5_IO14            0x40000074>,
+                          <MX8MQ_IOMUXC_I2C1_SDA_GPIO5_IO15            0x40000074>;
+       };
+
+       pinctrl_qspi: qspigrp {
+               fsl,pins = <MX8MQ_IOMUXC_NAND_ALE_QSPI_A_SCLK           0x97>,
+                          <MX8MQ_IOMUXC_NAND_CE0_B_QSPI_A_SS0_B        0x82>,
+                          <MX8MQ_IOMUXC_NAND_DATA00_QSPI_A_DATA0       0x97>,
+                          <MX8MQ_IOMUXC_NAND_DATA01_QSPI_A_DATA1       0x97>,
+                          <MX8MQ_IOMUXC_NAND_DATA02_QSPI_A_DATA2       0x97>,
+                          <MX8MQ_IOMUXC_NAND_DATA03_QSPI_A_DATA3       0x97>;
+       };
+
+       pinctrl_rtc: rtcgrp {
+               fsl,pins = <MX8MQ_IOMUXC_GPIO1_IO01_GPIO1_IO1           0x41>;
+       };
+
+       pinctrl_usdhc1: usdhc1grp {
+               fsl,pins = <MX8MQ_IOMUXC_SD1_CLK_USDHC1_CLK             0x83>,
+                          <MX8MQ_IOMUXC_SD1_CMD_USDHC1_CMD             0xc3>,
+                          <MX8MQ_IOMUXC_SD1_DATA0_USDHC1_DATA0         0xc3>,
+                          <MX8MQ_IOMUXC_SD1_DATA1_USDHC1_DATA1         0xc3>,
+                          <MX8MQ_IOMUXC_SD1_DATA2_USDHC1_DATA2         0xc3>,
+                          <MX8MQ_IOMUXC_SD1_DATA3_USDHC1_DATA3         0xc3>,
+                          <MX8MQ_IOMUXC_SD1_DATA4_USDHC1_DATA4         0xc3>,
+                          <MX8MQ_IOMUXC_SD1_DATA5_USDHC1_DATA5         0xc3>,
+                          <MX8MQ_IOMUXC_SD1_DATA6_USDHC1_DATA6         0xc3>,
+                          <MX8MQ_IOMUXC_SD1_DATA7_USDHC1_DATA7         0xc3>,
+                          <MX8MQ_IOMUXC_SD1_STROBE_USDHC1_STROBE       0x83>,
+                          <MX8MQ_IOMUXC_SD1_RESET_B_USDHC1_RESET_B     0xc1>;
+       };
+
+       pinctrl_usdhc1_100mhz: usdhc1-100mhzgrp {
+               fsl,pins = <MX8MQ_IOMUXC_SD1_CLK_USDHC1_CLK             0x85>,
+                          <MX8MQ_IOMUXC_SD1_CMD_USDHC1_CMD             0xc5>,
+                          <MX8MQ_IOMUXC_SD1_DATA0_USDHC1_DATA0         0xc5>,
+                          <MX8MQ_IOMUXC_SD1_DATA1_USDHC1_DATA1         0xc5>,
+                          <MX8MQ_IOMUXC_SD1_DATA2_USDHC1_DATA2         0xc5>,
+                          <MX8MQ_IOMUXC_SD1_DATA3_USDHC1_DATA3         0xc5>,
+                          <MX8MQ_IOMUXC_SD1_DATA4_USDHC1_DATA4         0xc5>,
+                          <MX8MQ_IOMUXC_SD1_DATA5_USDHC1_DATA5         0xc5>,
+                          <MX8MQ_IOMUXC_SD1_DATA6_USDHC1_DATA6         0xc5>,
+                          <MX8MQ_IOMUXC_SD1_DATA7_USDHC1_DATA7         0xc5>,
+                          <MX8MQ_IOMUXC_SD1_STROBE_USDHC1_STROBE       0x85>,
+                          <MX8MQ_IOMUXC_SD1_RESET_B_USDHC1_RESET_B     0xc1>;
+       };
+
+       pinctrl_usdhc1_200mhz: usdhc1-200mhzgrp {
+               fsl,pins = <MX8MQ_IOMUXC_SD1_CLK_USDHC1_CLK             0x87>,
+                          <MX8MQ_IOMUXC_SD1_CMD_USDHC1_CMD             0xc7>,
+                          <MX8MQ_IOMUXC_SD1_DATA0_USDHC1_DATA0         0xc7>,
+                          <MX8MQ_IOMUXC_SD1_DATA1_USDHC1_DATA1         0xc7>,
+                          <MX8MQ_IOMUXC_SD1_DATA2_USDHC1_DATA2         0xc7>,
+                          <MX8MQ_IOMUXC_SD1_DATA3_USDHC1_DATA3         0xc7>,
+                          <MX8MQ_IOMUXC_SD1_DATA4_USDHC1_DATA4         0xc7>,
+                          <MX8MQ_IOMUXC_SD1_DATA5_USDHC1_DATA5         0xc7>,
+                          <MX8MQ_IOMUXC_SD1_DATA6_USDHC1_DATA6         0xc7>,
+                          <MX8MQ_IOMUXC_SD1_DATA7_USDHC1_DATA7         0xc7>,
+                          <MX8MQ_IOMUXC_SD1_STROBE_USDHC1_STROBE       0x87>,
+                          <MX8MQ_IOMUXC_SD1_RESET_B_USDHC1_RESET_B     0xc1>;
+       };
+
+       pinctrl_wdog: wdoggrp {
+               fsl,pins = <MX8MQ_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B        0xc6>;
+       };
+};
index 972766b..5f57dee 100644 (file)
                        clock-latency = <61036>; /* two CLK32 periods */
                        clocks = <&clk IMX8MQ_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        #cooling-cells = <2>;
                        clock-latency = <61036>; /* two CLK32 periods */
                        clocks = <&clk IMX8MQ_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        #cooling-cells = <2>;
                        clock-latency = <61036>; /* two CLK32 periods */
                        clocks = <&clk IMX8MQ_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        #cooling-cells = <2>;
                        clock-latency = <61036>; /* two CLK32 periods */
                        clocks = <&clk IMX8MQ_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        #cooling-cells = <2>;
 
                A53_L2: l2-cache0 {
                        compatible = "cache";
+                       cache-level = <2>;
+                       cache-size = <0x100000>;
+                       cache-line-size = <64>;
+                       cache-sets = <1024>;
                };
        };
 
                                clocks = <&clk IMX8MQ_CLK_TMU_ROOT>;
                                little-endian;
                                fsl,tmu-range = <0xb0000 0xa0026 0x80048 0x70061>;
-                               fsl,tmu-calibration = <0x00000000 0x00000023
-                                                      0x00000001 0x00000029
-                                                      0x00000002 0x0000002f
-                                                      0x00000003 0x00000035
-                                                      0x00000004 0x0000003d
-                                                      0x00000005 0x00000043
-                                                      0x00000006 0x0000004b
-                                                      0x00000007 0x00000051
-                                                      0x00000008 0x00000057
-                                                      0x00000009 0x0000005f
-                                                      0x0000000a 0x00000067
-                                                      0x0000000b 0x0000006f
-
-                                                      0x00010000 0x0000001b
-                                                      0x00010001 0x00000023
-                                                      0x00010002 0x0000002b
-                                                      0x00010003 0x00000033
-                                                      0x00010004 0x0000003b
-                                                      0x00010005 0x00000043
-                                                      0x00010006 0x0000004b
-                                                      0x00010007 0x00000055
-                                                      0x00010008 0x0000005d
-                                                      0x00010009 0x00000067
-                                                      0x0001000a 0x00000070
-
-                                                      0x00020000 0x00000017
-                                                      0x00020001 0x00000023
-                                                      0x00020002 0x0000002d
-                                                      0x00020003 0x00000037
-                                                      0x00020004 0x00000041
-                                                      0x00020005 0x0000004b
-                                                      0x00020006 0x00000057
-                                                      0x00020007 0x00000063
-                                                      0x00020008 0x0000006f
-
-                                                      0x00030000 0x00000015
-                                                      0x00030001 0x00000021
-                                                      0x00030002 0x0000002d
-                                                      0x00030003 0x00000039
-                                                      0x00030004 0x00000045
-                                                      0x00030005 0x00000053
-                                                      0x00030006 0x0000005f
-                                                      0x00030007 0x00000071>;
+                               fsl,tmu-calibration = <0x00000000 0x00000023>,
+                                                     <0x00000001 0x00000029>,
+                                                     <0x00000002 0x0000002f>,
+                                                     <0x00000003 0x00000035>,
+                                                     <0x00000004 0x0000003d>,
+                                                     <0x00000005 0x00000043>,
+                                                     <0x00000006 0x0000004b>,
+                                                     <0x00000007 0x00000051>,
+                                                     <0x00000008 0x00000057>,
+                                                     <0x00000009 0x0000005f>,
+                                                     <0x0000000a 0x00000067>,
+                                                     <0x0000000b 0x0000006f>,
+
+                                                     <0x00010000 0x0000001b>,
+                                                     <0x00010001 0x00000023>,
+                                                     <0x00010002 0x0000002b>,
+                                                     <0x00010003 0x00000033>,
+                                                     <0x00010004 0x0000003b>,
+                                                     <0x00010005 0x00000043>,
+                                                     <0x00010006 0x0000004b>,
+                                                     <0x00010007 0x00000055>,
+                                                     <0x00010008 0x0000005d>,
+                                                     <0x00010009 0x00000067>,
+                                                     <0x0001000a 0x00000070>,
+
+                                                     <0x00020000 0x00000017>,
+                                                     <0x00020001 0x00000023>,
+                                                     <0x00020002 0x0000002d>,
+                                                     <0x00020003 0x00000037>,
+                                                     <0x00020004 0x00000041>,
+                                                     <0x00020005 0x0000004b>,
+                                                     <0x00020006 0x00000057>,
+                                                     <0x00020007 0x00000063>,
+                                                     <0x00020008 0x0000006f>,
+
+                                                     <0x00030000 0x00000015>,
+                                                     <0x00030001 0x00000021>,
+                                                     <0x00030002 0x0000002d>,
+                                                     <0x00030003 0x00000039>,
+                                                     <0x00030004 0x00000045>,
+                                                     <0x00030005 0x00000053>,
+                                                     <0x00030006 0x0000005f>,
+                                                     <0x00030007 0x00000071>;
                                #thermal-sensor-cells =  <1>;
                        };
 
                                fsl,num-rx-queues = <3>;
                                nvmem-cells = <&fec_mac_address>;
                                nvmem-cell-names = "mac-address";
-                               nvmem_macaddr_swap;
                                fsl,stop-mode = <&iomuxc_gpr 0x10 3>;
                                status = "disabled";
                        };
index aebbe2b..4a7c017 100644 (file)
                        compatible = "arm,cortex-a53", "arm,armv8";
                        reg = <0x0 0x0>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                };
 
                        compatible = "arm,cortex-a53", "arm,armv8";
                        reg = <0x0 0x1>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                };
 
                        compatible = "arm,cortex-a53", "arm,armv8";
                        reg = <0x0 0x2>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                };
 
                        compatible = "arm,cortex-a53", "arm,armv8";
                        reg = <0x0 0x3>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                };
 
                        compatible = "arm,cortex-a72", "arm,armv8";
                        reg = <0x0 0x100>;
                        enable-method = "psci";
+                       i-cache-size = <0xC000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <256>;
                        next-level-cache = <&A72_L2>;
                };
 
 
                A53_L2: l2-cache0 {
                        compatible = "cache";
+                       cache-level = <2>;
+                       cache-size = <0x100000>;
+                       cache-line-size = <64>;
+                       cache-sets = <1024>;
                };
 
                A72_L2: l2-cache1 {
                        compatible = "cache";
+                       cache-level = <2>;
+                       cache-size = <0x100000>;
+                       cache-line-size = <64>;
+                       cache-sets = <1024>;
                };
        };
 
index 617618e..dbec7c1 100644 (file)
                        compatible = "arm,cortex-a35";
                        reg = <0x0 0x0>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A35_L2>;
                        clocks = <&clk IMX_SC_R_A35 IMX_SC_PM_CLK_CPU>;
                        operating-points-v2 = <&a35_opp_table>;
                        compatible = "arm,cortex-a35";
                        reg = <0x0 0x1>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A35_L2>;
                        clocks = <&clk IMX_SC_R_A35 IMX_SC_PM_CLK_CPU>;
                        operating-points-v2 = <&a35_opp_table>;
                        compatible = "arm,cortex-a35";
                        reg = <0x0 0x2>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A35_L2>;
                        clocks = <&clk IMX_SC_R_A35 IMX_SC_PM_CLK_CPU>;
                        operating-points-v2 = <&a35_opp_table>;
                        compatible = "arm,cortex-a35";
                        reg = <0x0 0x3>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A35_L2>;
                        clocks = <&clk IMX_SC_R_A35 IMX_SC_PM_CLK_CPU>;
                        operating-points-v2 = <&a35_opp_table>;
 
                A35_L2: l2-cache0 {
                        compatible = "cache";
+                       cache-level = <2>;
+                       cache-size = <0x80000>;
+                       cache-line-size = <64>;
+                       cache-sets = <1024>;
                };
        };
 
diff --git a/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts b/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts
new file mode 100644 (file)
index 0000000..33e84c4
--- /dev/null
@@ -0,0 +1,64 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2021 NXP
+ */
+
+/dts-v1/;
+
+#include "imx8ulp.dtsi"
+
+/ {
+       model = "NXP i.MX8ULP EVK";
+       compatible = "fsl,imx8ulp-evk", "fsl,imx8ulp";
+
+       chosen {
+               stdout-path = &lpuart5;
+       };
+
+       memory@80000000 {
+               device_type = "memory";
+               reg = <0x0 0x80000000 0 0x80000000>;
+       };
+};
+
+&lpuart5 {
+       /* console */
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&pinctrl_lpuart5>;
+       pinctrl-1 = <&pinctrl_lpuart5>;
+       status = "okay";
+};
+
+&usdhc0 {
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&pinctrl_usdhc0>;
+       pinctrl-1 = <&pinctrl_usdhc0>;
+       non-removable;
+       bus-width = <8>;
+       status = "okay";
+};
+
+&iomuxc1 {
+       pinctrl_lpuart5: lpuart5grp {
+               fsl,pins = <
+                       MX8ULP_PAD_PTF14__LPUART5_TX    0x3
+                       MX8ULP_PAD_PTF15__LPUART5_RX    0x3
+               >;
+       };
+
+       pinctrl_usdhc0: usdhc0grp {
+               fsl,pins = <
+                       MX8ULP_PAD_PTD1__SDHC0_CMD      0x43
+                       MX8ULP_PAD_PTD2__SDHC0_CLK      0x10042
+                       MX8ULP_PAD_PTD10__SDHC0_D0      0x43
+                       MX8ULP_PAD_PTD9__SDHC0_D1       0x43
+                       MX8ULP_PAD_PTD8__SDHC0_D2       0x43
+                       MX8ULP_PAD_PTD7__SDHC0_D3       0x43
+                       MX8ULP_PAD_PTD6__SDHC0_D4       0x43
+                       MX8ULP_PAD_PTD5__SDHC0_D5       0x43
+                       MX8ULP_PAD_PTD4__SDHC0_D6       0x43
+                       MX8ULP_PAD_PTD3__SDHC0_D7       0x43
+                       MX8ULP_PAD_PTD11__SDHC0_DQS     0x10042
+               >;
+       };
+};
diff --git a/arch/arm64/boot/dts/freescale/imx8ulp-pinfunc.h b/arch/arm64/boot/dts/freescale/imx8ulp-pinfunc.h
new file mode 100755 (executable)
index 0000000..b204ac7
--- /dev/null
@@ -0,0 +1,978 @@
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
+/*
+ * Copyright 2021 NXP
+ */
+
+#ifndef __DTS_IMX8ULP_PINFUNC_H
+#define __DTS_IMX8ULP_PINFUNC_H
+
+/*
+ * The pin function ID is a tuple of
+ * <mux_reg input_reg mux_mode input_val>
+ */
+#define MX8ULP_PAD_PTD0__PTD0                                        0x0000 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD0__I2S6_RX_BCLK                                0x0000 0x0B44 0x7 0x1
+#define MX8ULP_PAD_PTD0__SDHC0_RESET_B                               0x0000 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTD0__FLEXSPI2_B_DQS                              0x0000 0x0974 0x9 0x1
+#define MX8ULP_PAD_PTD0__CLKOUT2                                     0x0000 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTD0__EPDC0_SDCLK_B                               0x0000 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTD0__LP_APD_DBG_MUX_0                            0x0000 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD0__CLKOUT1                                     0x0000 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTD0__DEBUG_MUX0_0                                0x0000 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTD0__DEBUG_MUX1_0                                0x0000 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTD1__PTD1                                        0x0004 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD1__I2S6_RX_FS                                  0x0004 0x0B48 0x7 0x1
+#define MX8ULP_PAD_PTD1__SDHC0_CMD                                   0x0004 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTD1__FLEXSPI2_B_DATA7                            0x0004 0x0970 0x9 0x1
+#define MX8ULP_PAD_PTD1__EPDC0_SDCLK                                 0x0004 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTD1__DPI0_PCLK                                   0x0004 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD1__LP_APD_DBG_MUX_1                            0x0004 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTD1__DEBUG_MUX0_1                                0x0004 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTD1__DEBUG_MUX1_1                                0x0004 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTD2__PTD2                                        0x0008 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD2__I2S6_RXD0                                   0x0008 0x0B34 0x7 0x1
+#define MX8ULP_PAD_PTD2__SDHC0_CLK                                   0x0008 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTD2__FLEXSPI2_B_DATA6                            0x0008 0x096C 0x9 0x1
+#define MX8ULP_PAD_PTD2__EPDC0_SDLE                                  0x0008 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTD2__DPI0_HSYNC                                  0x0008 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD2__LP_APD_DBG_MUX_2                            0x0008 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTD2__DEBUG_MUX0_2                                0x0008 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTD2__DEBUG_MUX1_2                                0x0008 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTD3__PTD3                                        0x000C 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD3__I2S6_RXD1                                   0x000C 0x0B38 0x7 0x1
+#define MX8ULP_PAD_PTD3__SDHC0_D7                                    0x000C 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTD3__FLEXSPI2_B_DATA5                            0x000C 0x0968 0x9 0x1
+#define MX8ULP_PAD_PTD3__EPDC0_GDSP                                  0x000C 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTD3__DPI0_VSYNC                                  0x000C 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD3__LP_APD_DBG_MUX_3                            0x000C 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTD3__DEBUG_MUX0_3                                0x000C 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTD3__DEBUG_MUX1_3                                0x000C 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTD4__PTD4                                        0x0010 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD4__EXT_AUD_MCLK3                               0x0010 0x0B14 0x4 0x1
+#define MX8ULP_PAD_PTD4__SDHC0_VS                                    0x0010 0x0000 0x5 0x0
+#define MX8ULP_PAD_PTD4__TPM8_CH5                                    0x0010 0x0B2C 0x6 0x1
+#define MX8ULP_PAD_PTD4__I2S6_MCLK                                   0x0010 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTD4__SDHC0_D6                                    0x0010 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTD4__FLEXSPI2_B_DATA4                            0x0010 0x0964 0x9 0x1
+#define MX8ULP_PAD_PTD4__EPDC0_SDCE0                                 0x0010 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTD4__DPI0_DE                                     0x0010 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD4__LP_APD_DBG_MUX_4                            0x0010 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTD4__DEBUG_MUX0_4                                0x0010 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTD4__DEBUG_MUX1_4                                0x0010 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTD5__PTD5                                        0x0014 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD5__SDHC0_CD                                    0x0014 0x0000 0x5 0x0
+#define MX8ULP_PAD_PTD5__TPM8_CH4                                    0x0014 0x0B28 0x6 0x1
+#define MX8ULP_PAD_PTD5__I2S6_TX_BCLK                                0x0014 0x0B4C 0x7 0x1
+#define MX8ULP_PAD_PTD5__SDHC0_D5                                    0x0014 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTD5__FLEXSPI2_B_SS0_B                            0x0014 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTD5__FLEXSPI2_B_SCLK_B                           0x0014 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTD5__EPDC0_D0                                    0x0014 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTD5__DPI0_D0                                     0x0014 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD5__LP_APD_DBG_MUX_5                            0x0014 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTD5__DEBUG_MUX0_5                                0x0014 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTD5__DEBUG_MUX1_5                                0x0014 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTD6__PTD6                                        0x0018 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD6__SDHC0_WP                                    0x0018 0x0000 0x5 0x0
+#define MX8ULP_PAD_PTD6__TPM8_CH3                                    0x0018 0x0B24 0x6 0x1
+#define MX8ULP_PAD_PTD6__I2S6_TX_FS                                  0x0018 0x0B50 0x7 0x1
+#define MX8ULP_PAD_PTD6__SDHC0_D4                                    0x0018 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTD6__FLEXSPI2_B_SCLK                             0x0018 0x0978 0x9 0x1
+#define MX8ULP_PAD_PTD6__EPDC0_D1                                    0x0018 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTD6__DPI0_D1                                     0x0018 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD6__LP_APD_DBG_MUX_6                            0x0018 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTD6__DEBUG_MUX0_6                                0x0018 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTD6__DEBUG_MUX1_6                                0x0018 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTD7__PTD7                                        0x001C 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD7__TPM8_CH2                                    0x001C 0x0B20 0x6 0x1
+#define MX8ULP_PAD_PTD7__I2S6_TXD0                                   0x001C 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTD7__SDHC0_D3                                    0x001C 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTD7__FLEXSPI2_B_DATA3                            0x001C 0x0960 0x9 0x1
+#define MX8ULP_PAD_PTD7__EPDC0_D2                                    0x001C 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTD7__DPI0_D2                                     0x001C 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD7__LP_APD_DBG_MUX_7                            0x001C 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTD7__DEBUG_MUX0_7                                0x001C 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTD7__DEBUG_MUX1_7                                0x001C 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTD8__PTD8                                        0x0020 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD8__TPM8_CH1                                    0x0020 0x0B1C 0x6 0x1
+#define MX8ULP_PAD_PTD8__I2S6_TXD1                                   0x0020 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTD8__SDHC0_D2                                    0x0020 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTD8__FLEXSPI2_B_DATA2                            0x0020 0x095C 0x9 0x1
+#define MX8ULP_PAD_PTD8__EPDC0_D3                                    0x0020 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTD8__DPI0_D3                                     0x0020 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD8__LP_APD_DBG_MUX_8                            0x0020 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTD8__DEBUG_MUX1_8                                0x0020 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTD9__PTD9                                        0x0024 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD9__TPM8_CLKIN                                  0x0024 0x0B30 0x6 0x1
+#define MX8ULP_PAD_PTD9__I2S6_TXD2                                   0x0024 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTD9__SDHC0_D1                                    0x0024 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTD9__FLEXSPI2_B_DATA1                            0x0024 0x0958 0x9 0x1
+#define MX8ULP_PAD_PTD9__EPDC0_D4                                    0x0024 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTD9__DPI0_D4                                     0x0024 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD9__LP_APD_DBG_MUX_9                            0x0024 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTD9__DEBUG_MUX1_9                                0x0024 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTD10__PTD10                                      0x0028 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD10__TPM8_CH0                                   0x0028 0x0B18 0x6 0x1
+#define MX8ULP_PAD_PTD10__I2S6_TXD3                                  0x0028 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTD10__SDHC0_D0                                   0x0028 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTD10__FLEXSPI2_B_DATA0                           0x0028 0x0954 0x9 0x1
+#define MX8ULP_PAD_PTD10__EPDC0_D5                                   0x0028 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTD10__DPI0_D5                                    0x0028 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD10__LP_APD_DBG_MUX_10                          0x0028 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTD10__DEBUG_MUX1_10                              0x0028 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTD11__PTD11                                      0x002C 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD11__TPM8_CH5                                   0x002C 0x0B2C 0x6 0x2
+#define MX8ULP_PAD_PTD11__I2S6_RXD2                                  0x002C 0x0B3C 0x7 0x1
+#define MX8ULP_PAD_PTD11__SDHC0_DQS                                  0x002C 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTD11__FLEXSPI2_B_SS0_B                           0x002C 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTD11__FLEXSPI2_A_SS1_B                           0x002C 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTD11__EPDC0_D6                                   0x002C 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTD11__DPI0_D6                                    0x002C 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD11__LP_APD_DBG_MUX_11                          0x002C 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTD12__PTD12                                      0x0030 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD12__USB0_ID                                    0x0030 0x0AC8 0x5 0x1
+#define MX8ULP_PAD_PTD12__SDHC2_D3                                   0x0030 0x0AA4 0x6 0x1
+#define MX8ULP_PAD_PTD12__I2S7_RX_BCLK                               0x0030 0x0B64 0x7 0x1
+#define MX8ULP_PAD_PTD12__SDHC1_DQS                                  0x0030 0x0A84 0x8 0x1
+#define MX8ULP_PAD_PTD12__FLEXSPI2_A_SS0_B                           0x0030 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTD12__FLEXSPI2_B_SS1_B                           0x0030 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTD12__EPDC0_D7                                   0x0030 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTD12__DPI0_D7                                    0x0030 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD12__LP_APD_DBG_MUX_12                          0x0030 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTD13__PTD13                                      0x0034 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD13__SPDIF_IN3                                  0x0034 0x0B80 0x4 0x1
+#define MX8ULP_PAD_PTD13__USB0_PWR                                   0x0034 0x0000 0x5 0x0
+#define MX8ULP_PAD_PTD13__SDHC2_D2                                   0x0034 0x0AA0 0x6 0x1
+#define MX8ULP_PAD_PTD13__I2S7_RX_FS                                 0x0034 0x0B68 0x7 0x1
+#define MX8ULP_PAD_PTD13__SDHC1_RESET_B                              0x0034 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTD13__FLEXSPI2_A_SCLK                            0x0034 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTD13__CLKOUT2                                    0x0034 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTD13__EPDC0_D8                                   0x0034 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTD13__DPI0_D8                                    0x0034 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD13__CLKOUT1                                    0x0034 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTD13__LP_APD_DBG_MUX_13                          0x0034 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTD14__PTD14                                      0x0038 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD14__SPDIF_OUT3                                 0x0038 0x0000 0x4 0x0
+#define MX8ULP_PAD_PTD14__USB0_OC                                    0x0038 0x0AC0 0x5 0x1
+#define MX8ULP_PAD_PTD14__SDHC2_D1                                   0x0038 0x0A9C 0x6 0x1
+#define MX8ULP_PAD_PTD14__I2S7_RXD0                                  0x0038 0x0B54 0x7 0x1
+#define MX8ULP_PAD_PTD14__SDHC1_D7                                   0x0038 0x0A80 0x8 0x1
+#define MX8ULP_PAD_PTD14__FLEXSPI2_A_DATA3                           0x0038 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTD14__TRACE0_D7                                  0x0038 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTD14__EPDC0_D9                                   0x0038 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTD14__DPI0_D9                                    0x0038 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD14__LP_APD_DBG_MUX_14                          0x0038 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTD15__PTD15                                      0x003C 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD15__SPDIF_IN2                                  0x003C 0x0B7C 0x4 0x1
+#define MX8ULP_PAD_PTD15__SDHC1_VS                                   0x003C 0x0000 0x5 0x0
+#define MX8ULP_PAD_PTD15__SDHC2_D0                                   0x003C 0x0A98 0x6 0x1
+#define MX8ULP_PAD_PTD15__I2S7_TX_BCLK                               0x003C 0x0B6C 0x7 0x1
+#define MX8ULP_PAD_PTD15__SDHC1_D6                                   0x003C 0x0A7C 0x8 0x1
+#define MX8ULP_PAD_PTD15__FLEXSPI2_A_DATA2                           0x003C 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTD15__TRACE0_D6                                  0x003C 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTD15__EPDC0_D10                                  0x003C 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTD15__DPI0_D10                                   0x003C 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD15__LP_APD_DBG_MUX_15                          0x003C 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTD16__PTD16                                      0x0040 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD16__FXIO1_D31                                  0x0040 0x08A0 0x2 0x1
+#define MX8ULP_PAD_PTD16__LPSPI4_PCS1                                0x0040 0x08F8 0x3 0x1
+#define MX8ULP_PAD_PTD16__SPDIF_OUT2                                 0x0040 0x0000 0x4 0x0
+#define MX8ULP_PAD_PTD16__SDHC1_CD                                   0x0040 0x0A58 0x5 0x1
+#define MX8ULP_PAD_PTD16__SDHC2_CLK                                  0x0040 0x0A90 0x6 0x1
+#define MX8ULP_PAD_PTD16__I2S7_TX_FS                                 0x0040 0x0B70 0x7 0x1
+#define MX8ULP_PAD_PTD16__SDHC1_D5                                   0x0040 0x0A78 0x8 0x1
+#define MX8ULP_PAD_PTD16__FLEXSPI2_A_DATA1                           0x0040 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTD16__TRACE0_D5                                  0x0040 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTD16__EPDC0_D11                                  0x0040 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTD16__DPI0_D11                                   0x0040 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD16__LP_APD_DBG_MUX_16                          0x0040 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTD17__PTD17                                      0x0044 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD17__FXIO1_D30                                  0x0044 0x089C 0x2 0x1
+#define MX8ULP_PAD_PTD17__LPSPI4_PCS2                                0x0044 0x08FC 0x3 0x1
+#define MX8ULP_PAD_PTD17__EXT_AUD_MCLK3                              0x0044 0x0B14 0x4 0x2
+#define MX8ULP_PAD_PTD17__SDHC1_WP                                   0x0044 0x0A88 0x5 0x1
+#define MX8ULP_PAD_PTD17__SDHC2_CMD                                  0x0044 0x0A94 0x6 0x1
+#define MX8ULP_PAD_PTD17__I2S7_TXD0                                  0x0044 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTD17__SDHC1_D4                                   0x0044 0x0A74 0x8 0x1
+#define MX8ULP_PAD_PTD17__FLEXSPI2_A_DATA0                           0x0044 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTD17__TRACE0_D4                                  0x0044 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTD17__EPDC0_D12                                  0x0044 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTD17__DPI0_D12                                   0x0044 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD17__LP_APD_DBG_MUX_17                          0x0044 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTD18__PTD18                                      0x0048 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD18__FXIO1_D29                                  0x0048 0x0894 0x2 0x1
+#define MX8ULP_PAD_PTD18__LPSPI4_PCS3                                0x0048 0x0900 0x3 0x1
+#define MX8ULP_PAD_PTD18__SPDIF_CLK                                  0x0048 0x0000 0x4 0x0
+#define MX8ULP_PAD_PTD18__EXT_AUD_MCLK3                              0x0048 0x0B14 0x5 0x3
+#define MX8ULP_PAD_PTD18__TPM8_CH0                                   0x0048 0x0B18 0x6 0x2
+#define MX8ULP_PAD_PTD18__I2S7_MCLK                                  0x0048 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTD18__SDHC1_D3                                   0x0048 0x0A70 0x8 0x1
+#define MX8ULP_PAD_PTD18__FLEXSPI2_A_DQS                             0x0048 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTD18__TRACE0_D3                                  0x0048 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTD18__EPDC0_D13                                  0x0048 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTD18__DPI0_D13                                   0x0048 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD18__LP_APD_DBG_MUX_18                          0x0048 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTD19__PTD19                                      0x004C 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD19__FXIO1_D28                                  0x004C 0x0890 0x2 0x1
+#define MX8ULP_PAD_PTD19__SPDIF_IN0                                  0x004C 0x0B74 0x4 0x1
+#define MX8ULP_PAD_PTD19__TPM8_CH1                                   0x004C 0x0B1C 0x6 0x2
+#define MX8ULP_PAD_PTD19__I2S6_RXD3                                  0x004C 0x0B40 0x7 0x1
+#define MX8ULP_PAD_PTD19__SDHC1_D2                                   0x004C 0x0A6C 0x8 0x1
+#define MX8ULP_PAD_PTD19__FLEXSPI2_A_DATA7                           0x004C 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTD19__TRACE0_D2                                  0x004C 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTD19__EPDC0_D14                                  0x004C 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTD19__DPI0_D14                                   0x004C 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD19__LP_APD_DBG_MUX_19                          0x004C 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTD20__PTD20                                      0x0050 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD20__FXIO1_D27                                  0x0050 0x088C 0x2 0x1
+#define MX8ULP_PAD_PTD20__LPSPI4_SIN                                 0x0050 0x0908 0x3 0x1
+#define MX8ULP_PAD_PTD20__SPDIF_OUT0                                 0x0050 0x0000 0x4 0x0
+#define MX8ULP_PAD_PTD20__TPM8_CLKIN                                 0x0050 0x0B30 0x6 0x2
+#define MX8ULP_PAD_PTD20__I2S7_RXD1                                  0x0050 0x0B58 0x7 0x1
+#define MX8ULP_PAD_PTD20__SDHC1_D1                                   0x0050 0x0A68 0x8 0x1
+#define MX8ULP_PAD_PTD20__FLEXSPI2_A_DATA6                           0x0050 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTD20__TRACE0_D1                                  0x0050 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTD20__EPDC0_D15                                  0x0050 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTD20__DPI0_D15                                   0x0050 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD20__LP_APD_DBG_MUX_20                          0x0050 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTD21__PTD21                                      0x0054 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD21__FXIO1_D26                                  0x0054 0x0888 0x2 0x1
+#define MX8ULP_PAD_PTD21__LPSPI4_SOUT                                0x0054 0x090C 0x3 0x1
+#define MX8ULP_PAD_PTD21__SPDIF_IN1                                  0x0054 0x0B78 0x4 0x1
+#define MX8ULP_PAD_PTD21__USB1_PWR                                   0x0054 0x0000 0x5 0x0
+#define MX8ULP_PAD_PTD21__TPM8_CH2                                   0x0054 0x0B20 0x6 0x2
+#define MX8ULP_PAD_PTD21__I2S7_TXD1                                  0x0054 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTD21__SDHC1_D0                                   0x0054 0x0A64 0x8 0x1
+#define MX8ULP_PAD_PTD21__FLEXSPI2_A_DATA5                           0x0054 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTD21__TRACE0_D0                                  0x0054 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTD21__DPI0_D16                                   0x0054 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD21__WDOG5_RST                                  0x0054 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTD21__LP_APD_DBG_MUX_21                          0x0054 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTD22__PTD22                                      0x0058 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD22__FXIO1_D25                                  0x0058 0x0884 0x2 0x1
+#define MX8ULP_PAD_PTD22__LPSPI4_SCK                                 0x0058 0x0904 0x3 0x1
+#define MX8ULP_PAD_PTD22__SPDIF_OUT1                                 0x0058 0x0000 0x4 0x0
+#define MX8ULP_PAD_PTD22__USB1_OC                                    0x0058 0x0AC4 0x5 0x1
+#define MX8ULP_PAD_PTD22__TPM8_CH3                                   0x0058 0x0B24 0x6 0x2
+#define MX8ULP_PAD_PTD22__I2S7_TXD2                                  0x0058 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTD22__SDHC1_CLK                                  0x0058 0x0A5C 0x8 0x1
+#define MX8ULP_PAD_PTD22__FLEXSPI2_A_DATA4                           0x0058 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTD22__TRACE0_CLKOUT                              0x0058 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTD22__DPI0_D17                                   0x0058 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD22__LP_APD_DBG_MUX_22                          0x0058 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTD23__PTD23                                      0x005C 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTD23__FXIO1_D24                                  0x005C 0x0880 0x2 0x1
+#define MX8ULP_PAD_PTD23__LPSPI4_PCS0                                0x005C 0x08F4 0x3 0x1
+#define MX8ULP_PAD_PTD23__USB1_ID                                    0x005C 0x0ACC 0x5 0x1
+#define MX8ULP_PAD_PTD23__TPM8_CH4                                   0x005C 0x0B28 0x6 0x2
+#define MX8ULP_PAD_PTD23__I2S7_TXD3                                  0x005C 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTD23__SDHC1_CMD                                  0x005C 0x0A60 0x8 0x1
+#define MX8ULP_PAD_PTD23__FLEXSPI2_A_SS0_B                           0x005C 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTD23__FLEXSPI2_A_SCLK_B                          0x005C 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTD23__DPI0_D18                                   0x005C 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTD23__LP_APD_DBG_MUX_23                          0x005C 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTE0__PTE0                                        0x0080 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE0__FXIO1_D23                                   0x0080 0x087C 0x2 0x1
+#define MX8ULP_PAD_PTE0__SPDIF_IN3                                   0x0080 0x0B80 0x3 0x2
+#define MX8ULP_PAD_PTE0__LPUART4_CTS_B                               0x0080 0x08DC 0x4 0x1
+#define MX8ULP_PAD_PTE0__LPI2C4_SCL                                  0x0080 0x08C8 0x5 0x1
+#define MX8ULP_PAD_PTE0__TPM8_CLKIN                                  0x0080 0x0B30 0x6 0x3
+#define MX8ULP_PAD_PTE0__I2S7_RXD2                                   0x0080 0x0B5C 0x7 0x1
+#define MX8ULP_PAD_PTE0__SDHC2_D1                                    0x0080 0x0A9C 0x8 0x2
+#define MX8ULP_PAD_PTE0__FLEXSPI2_B_DQS                              0x0080 0x0974 0x9 0x2
+#define MX8ULP_PAD_PTE0__ENET0_CRS                                   0x0080 0x0AE8 0xa 0x1
+#define MX8ULP_PAD_PTE0__DBI0_WRX                                    0x0080 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTE0__DPI0_D19                                    0x0080 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTE0__WUU1_P0                                     0x0080 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTE0__DEBUG_MUX0_8                                0x0080 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTE0__DEBUG_MUX1_11                               0x0080 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTE1__PTE1                                        0x0084 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE1__FXIO1_D22                                   0x0084 0x0878 0x2 0x1
+#define MX8ULP_PAD_PTE1__SPDIF_OUT3                                  0x0084 0x0000 0x3 0x0
+#define MX8ULP_PAD_PTE1__LPUART4_RTS_B                               0x0084 0x0000 0x4 0x0
+#define MX8ULP_PAD_PTE1__LPI2C4_SDA                                  0x0084 0x08CC 0x5 0x1
+#define MX8ULP_PAD_PTE1__TPM8_CH0                                    0x0084 0x0B18 0x6 0x3
+#define MX8ULP_PAD_PTE1__I2S7_RXD3                                   0x0084 0x0B60 0x7 0x1
+#define MX8ULP_PAD_PTE1__SDHC2_D0                                    0x0084 0x0A98 0x8 0x2
+#define MX8ULP_PAD_PTE1__FLEXSPI2_B_DATA7                            0x0084 0x0970 0x9 0x2
+#define MX8ULP_PAD_PTE1__ENET0_COL                                   0x0084 0x0AE4 0xa 0x1
+#define MX8ULP_PAD_PTE1__DBI0_CSX                                    0x0084 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTE1__DPI0_D20                                    0x0084 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTE1__WUU1_P1                                     0x0084 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTE1__DEBUG_MUX0_9                                0x0084 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTE1__DEBUG_MUX1_12                               0x0084 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTE2__PTE2                                        0x0088 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE2__FXIO1_D21                                   0x0088 0x0874 0x2 0x1
+#define MX8ULP_PAD_PTE2__SPDIF_IN2                                   0x0088 0x0B7C 0x3 0x2
+#define MX8ULP_PAD_PTE2__LPUART4_TX                                  0x0088 0x08E4 0x4 0x1
+#define MX8ULP_PAD_PTE2__LPI2C4_HREQ                                 0x0088 0x08C4 0x5 0x1
+#define MX8ULP_PAD_PTE2__TPM8_CH1                                    0x0088 0x0B1C 0x6 0x3
+#define MX8ULP_PAD_PTE2__EXT_AUD_MCLK3                               0x0088 0x0B14 0x7 0x4
+#define MX8ULP_PAD_PTE2__SDHC2_CLK                                   0x0088 0x0A90 0x8 0x2
+#define MX8ULP_PAD_PTE2__FLEXSPI2_B_DATA6                            0x0088 0x096C 0x9 0x2
+#define MX8ULP_PAD_PTE2__ENET0_TXER                                  0x0088 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTE2__DBI0_DCX                                    0x0088 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTE2__DPI0_D21                                    0x0088 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTE2__LP_HV_DBG_MUX_0                             0x0088 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTE2__DEBUG_MUX0_10                               0x0088 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTE2__DEBUG_MUX1_13                               0x0088 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTE3__PTE3                                        0x008C 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE3__FXIO1_D20                                   0x008C 0x0870 0x2 0x1
+#define MX8ULP_PAD_PTE3__SPDIF_OUT2                                  0x008C 0x0000 0x3 0x0
+#define MX8ULP_PAD_PTE3__LPUART4_RX                                  0x008C 0x08E0 0x4 0x1
+#define MX8ULP_PAD_PTE3__TPM8_CH2                                    0x008C 0x0B20 0x6 0x3
+#define MX8ULP_PAD_PTE3__I2S6_MCLK                                   0x008C 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTE3__SDHC2_CMD                                   0x008C 0x0A94 0x8 0x2
+#define MX8ULP_PAD_PTE3__FLEXSPI2_B_DATA5                            0x008C 0x0968 0x9 0x2
+#define MX8ULP_PAD_PTE3__ENET0_TXCLK                                 0x008C 0x0B10 0xa 0x1
+#define MX8ULP_PAD_PTE3__DBI0_RWX                                    0x008C 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTE3__DPI0_D22                                    0x008C 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTE3__WUU1_P2                                     0x008C 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTE3__DEBUG_MUX0_11                               0x008C 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTE3__DEBUG_MUX1_14                               0x008C 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTE4__PTE4                                        0x0090 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE4__FXIO1_D19                                   0x0090 0x0868 0x2 0x1
+#define MX8ULP_PAD_PTE4__SPDIF_CLK                                   0x0090 0x0000 0x3 0x0
+#define MX8ULP_PAD_PTE4__LPUART5_CTS_B                               0x0090 0x08E8 0x4 0x1
+#define MX8ULP_PAD_PTE4__LPI2C5_SCL                                  0x0090 0x08D4 0x5 0x1
+#define MX8ULP_PAD_PTE4__TPM8_CH3                                    0x0090 0x0B24 0x6 0x3
+#define MX8ULP_PAD_PTE4__I2S6_RX_BCLK                                0x0090 0x0B44 0x7 0x2
+#define MX8ULP_PAD_PTE4__SDHC2_D3                                    0x0090 0x0AA4 0x8 0x2
+#define MX8ULP_PAD_PTE4__FLEXSPI2_B_DATA4                            0x0090 0x0964 0x9 0x2
+#define MX8ULP_PAD_PTE4__ENET0_TXD3                                  0x0090 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTE4__DBI0_E                                      0x0090 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTE4__DPI0_D23                                    0x0090 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTE4__WUU1_P3                                     0x0090 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTE4__DEBUG_MUX0_12                               0x0090 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTE4__DEBUG_MUX1_15                               0x0090 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTE5__PTE5                                        0x0094 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE5__FXIO1_D18                                   0x0094 0x0864 0x2 0x1
+#define MX8ULP_PAD_PTE5__SPDIF_IN0                                   0x0094 0x0B74 0x3 0x2
+#define MX8ULP_PAD_PTE5__LPUART5_RTS_B                               0x0094 0x0000 0x4 0x0
+#define MX8ULP_PAD_PTE5__LPI2C5_SDA                                  0x0094 0x08D8 0x5 0x1
+#define MX8ULP_PAD_PTE5__TPM8_CH4                                    0x0094 0x0B28 0x6 0x3
+#define MX8ULP_PAD_PTE5__I2S6_RX_FS                                  0x0094 0x0B48 0x7 0x2
+#define MX8ULP_PAD_PTE5__SDHC2_D2                                    0x0094 0x0AA0 0x8 0x2
+#define MX8ULP_PAD_PTE5__FLEXSPI2_B_SS0_B                            0x0094 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTE5__ENET0_TXD2                                  0x0094 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTE5__DBI0_D0                                     0x0094 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTE5__LP_HV_DBG_MUX_1                             0x0094 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTE5__DEBUG_MUX0_13                               0x0094 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTE5__DEBUG_MUX1_16                               0x0094 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTE6__PTE6                                        0x0098 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE6__FXIO1_D17                                   0x0098 0x0860 0x2 0x1
+#define MX8ULP_PAD_PTE6__SPDIF_OUT0                                  0x0098 0x0000 0x3 0x0
+#define MX8ULP_PAD_PTE6__LPUART5_TX                                  0x0098 0x08F0 0x4 0x1
+#define MX8ULP_PAD_PTE6__LPI2C5_HREQ                                 0x0098 0x08D0 0x5 0x1
+#define MX8ULP_PAD_PTE6__TPM8_CH5                                    0x0098 0x0B2C 0x6 0x3
+#define MX8ULP_PAD_PTE6__I2S6_RXD0                                   0x0098 0x0B34 0x7 0x2
+#define MX8ULP_PAD_PTE6__SDHC2_D4                                    0x0098 0x0AA8 0x8 0x1
+#define MX8ULP_PAD_PTE6__FLEXSPI2_B_SCLK                             0x0098 0x0978 0x9 0x2
+#define MX8ULP_PAD_PTE6__ENET0_RXCLK                                 0x0098 0x0B0C 0xa 0x1
+#define MX8ULP_PAD_PTE6__DBI0_D1                                     0x0098 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTE6__LP_HV_DBG_MUX_2                             0x0098 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTE6__WDOG5_RST                                   0x0098 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTE6__DEBUG_MUX0_14                               0x0098 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTE6__DEBUG_MUX1_17                               0x0098 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTE7__PTE7                                        0x009C 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE7__FXIO1_D16                                   0x009C 0x085C 0x2 0x1
+#define MX8ULP_PAD_PTE7__SPDIF_IN1                                   0x009C 0x0B78 0x3 0x2
+#define MX8ULP_PAD_PTE7__LPUART5_RX                                  0x009C 0x08EC 0x4 0x1
+#define MX8ULP_PAD_PTE7__LPI2C6_HREQ                                 0x009C 0x09B4 0x5 0x1
+#define MX8ULP_PAD_PTE7__TPM4_CLKIN                                  0x009C 0x081C 0x6 0x1
+#define MX8ULP_PAD_PTE7__I2S6_RXD1                                   0x009C 0x0B38 0x7 0x2
+#define MX8ULP_PAD_PTE7__SDHC2_D5                                    0x009C 0x0AAC 0x8 0x1
+#define MX8ULP_PAD_PTE7__FLEXSPI2_B_DATA3                            0x009C 0x0960 0x9 0x2
+#define MX8ULP_PAD_PTE7__ENET0_RXD3                                  0x009C 0x0B04 0xa 0x1
+#define MX8ULP_PAD_PTE7__DBI0_D2                                     0x009C 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTE7__EPDC0_BDR1                                  0x009C 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTE7__WUU1_P4                                     0x009C 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTE7__DEBUG_MUX0_15                               0x009C 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTE7__DEBUG_MUX1_18                               0x009C 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTE8__PTE8                                        0x00A0 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE8__FXIO1_D15                                   0x00A0 0x0858 0x2 0x1
+#define MX8ULP_PAD_PTE8__LPSPI4_PCS1                                 0x00A0 0x08F8 0x3 0x2
+#define MX8ULP_PAD_PTE8__LPUART6_CTS_B                               0x00A0 0x09CC 0x4 0x1
+#define MX8ULP_PAD_PTE8__LPI2C6_SCL                                  0x00A0 0x09B8 0x5 0x1
+#define MX8ULP_PAD_PTE8__TPM4_CH0                                    0x00A0 0x0804 0x6 0x1
+#define MX8ULP_PAD_PTE8__I2S6_RXD2                                   0x00A0 0x0B3C 0x7 0x2
+#define MX8ULP_PAD_PTE8__SDHC2_D6                                    0x00A0 0x0AB0 0x8 0x1
+#define MX8ULP_PAD_PTE8__FLEXSPI2_B_DATA2                            0x00A0 0x095C 0x9 0x2
+#define MX8ULP_PAD_PTE8__ENET0_RXD2                                  0x00A0 0x0B00 0xa 0x1
+#define MX8ULP_PAD_PTE8__DBI0_D3                                     0x00A0 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTE8__EPDC0_BDR0                                  0x00A0 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTE8__LP_HV_DBG_MUX_3                             0x00A0 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTE8__DEBUG_MUX1_19                               0x00A0 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTE9__PTE9                                        0x00A4 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE9__FXIO1_D14                                   0x00A4 0x0854 0x2 0x1
+#define MX8ULP_PAD_PTE9__LPSPI4_PCS2                                 0x00A4 0x08FC 0x3 0x2
+#define MX8ULP_PAD_PTE9__LPUART6_RTS_B                               0x00A4 0x0000 0x4 0x0
+#define MX8ULP_PAD_PTE9__LPI2C6_SDA                                  0x00A4 0x09BC 0x5 0x1
+#define MX8ULP_PAD_PTE9__TPM4_CH1                                    0x00A4 0x0808 0x6 0x1
+#define MX8ULP_PAD_PTE9__I2S6_RXD3                                   0x00A4 0x0B40 0x7 0x2
+#define MX8ULP_PAD_PTE9__SDHC2_D7                                    0x00A4 0x0AB4 0x8 0x1
+#define MX8ULP_PAD_PTE9__FLEXSPI2_B_DATA1                            0x00A4 0x0958 0x9 0x2
+#define MX8ULP_PAD_PTE9__ENET0_1588_TMR3                             0x00A4 0x0AE0 0xa 0x1
+#define MX8ULP_PAD_PTE9__DBI0_D4                                     0x00A4 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTE9__EPDC0_VCOM1                                 0x00A4 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTE9__LP_HV_DBG_MUX_4                             0x00A4 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTE9__DEBUG_MUX1_20                               0x00A4 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTE10__PTE10                                      0x00A8 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE10__FXIO1_D13                                  0x00A8 0x0850 0x2 0x1
+#define MX8ULP_PAD_PTE10__LPSPI4_PCS3                                0x00A8 0x0900 0x3 0x2
+#define MX8ULP_PAD_PTE10__LPUART6_TX                                 0x00A8 0x09D4 0x4 0x1
+#define MX8ULP_PAD_PTE10__I3C2_SCL                                   0x00A8 0x08BC 0x5 0x1
+#define MX8ULP_PAD_PTE10__TPM4_CH2                                   0x00A8 0x080C 0x6 0x1
+#define MX8ULP_PAD_PTE10__I2S6_TX_BCLK                               0x00A8 0x0B4C 0x7 0x2
+#define MX8ULP_PAD_PTE10__SDHC2_DQS                                  0x00A8 0x0AB8 0x8 0x1
+#define MX8ULP_PAD_PTE10__FLEXSPI2_B_DATA0                           0x00A8 0x0954 0x9 0x2
+#define MX8ULP_PAD_PTE10__ENET0_1588_TMR2                            0x00A8 0x0ADC 0xa 0x1
+#define MX8ULP_PAD_PTE10__DBI0_D5                                    0x00A8 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTE10__EPDC0_VCOM0                                0x00A8 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTE10__LP_HV_DBG_MUX_5                            0x00A8 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTE10__DEBUG_MUX1_21                              0x00A8 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTE11__PTE11                                      0x00AC 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE11__FXIO1_D12                                  0x00AC 0x084C 0x2 0x1
+#define MX8ULP_PAD_PTE11__SPDIF_OUT1                                 0x00AC 0x0000 0x3 0x0
+#define MX8ULP_PAD_PTE11__LPUART6_RX                                 0x00AC 0x09D0 0x4 0x1
+#define MX8ULP_PAD_PTE11__I3C2_SDA                                   0x00AC 0x08C0 0x5 0x1
+#define MX8ULP_PAD_PTE11__TPM4_CH3                                   0x00AC 0x0810 0x6 0x1
+#define MX8ULP_PAD_PTE11__I2S6_TX_FS                                 0x00AC 0x0B50 0x7 0x2
+#define MX8ULP_PAD_PTE11__FLEXSPI2_B_SCLK_B                          0x00AC 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTE11__FLEXSPI2_B_SS0_B                           0x00AC 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTE11__ENET0_1588_TMR1                            0x00AC 0x0AD8 0xa 0x1
+#define MX8ULP_PAD_PTE11__DBI0_D6                                    0x00AC 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTE11__EPDC0_PWRCTRL0                             0x00AC 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTE11__LP_HV_DBG_MUX_6                            0x00AC 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTE12__PTE12                                      0x00B0 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE12__FXIO1_D11                                  0x00B0 0x0848 0x2 0x1
+#define MX8ULP_PAD_PTE12__LPSPI4_SIN                                 0x00B0 0x0908 0x3 0x2
+#define MX8ULP_PAD_PTE12__LPUART7_CTS_B                              0x00B0 0x09D8 0x4 0x1
+#define MX8ULP_PAD_PTE12__LPI2C7_SCL                                 0x00B0 0x09C4 0x5 0x1
+#define MX8ULP_PAD_PTE12__TPM4_CH4                                   0x00B0 0x0814 0x6 0x1
+#define MX8ULP_PAD_PTE12__I2S6_TXD0                                  0x00B0 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTE12__SDHC2_RESET_B                              0x00B0 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTE12__FLEXSPI2_B_SS1_B                           0x00B0 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTE12__ENET0_1588_TMR0                            0x00B0 0x0AD4 0xa 0x1
+#define MX8ULP_PAD_PTE12__DBI0_D7                                    0x00B0 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTE12__EPDC0_PWRCTRL1                             0x00B0 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTE12__WUU1_P5                                    0x00B0 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTE13__PTE13                                      0x00B4 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE13__FXIO1_D10                                  0x00B4 0x0844 0x2 0x1
+#define MX8ULP_PAD_PTE13__LPSPI4_SOUT                                0x00B4 0x090C 0x3 0x2
+#define MX8ULP_PAD_PTE13__LPUART7_RTS_B                              0x00B4 0x0000 0x4 0x0
+#define MX8ULP_PAD_PTE13__LPI2C7_SDA                                 0x00B4 0x09C8 0x5 0x1
+#define MX8ULP_PAD_PTE13__TPM4_CH5                                   0x00B4 0x0818 0x6 0x1
+#define MX8ULP_PAD_PTE13__I2S6_TXD1                                  0x00B4 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTE13__SDHC1_WP                                   0x00B4 0x0A88 0x8 0x2
+#define MX8ULP_PAD_PTE13__ENET0_1588_CLKIN                           0x00B4 0x0AD0 0xa 0x1
+#define MX8ULP_PAD_PTE13__DBI0_D8                                    0x00B4 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTE13__EPDC0_PWRCTRL2                             0x00B4 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTE13__LP_HV_DBG_MUX_7                            0x00B4 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTE14__PTE14                                      0x00B8 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE14__FXIO1_D9                                   0x00B8 0x08B8 0x2 0x1
+#define MX8ULP_PAD_PTE14__LPSPI4_SCK                                 0x00B8 0x0904 0x3 0x2
+#define MX8ULP_PAD_PTE14__LPUART7_TX                                 0x00B8 0x09E0 0x4 0x1
+#define MX8ULP_PAD_PTE14__LPI2C7_HREQ                                0x00B8 0x09C0 0x5 0x1
+#define MX8ULP_PAD_PTE14__TPM5_CLKIN                                 0x00B8 0x0838 0x6 0x1
+#define MX8ULP_PAD_PTE14__I2S6_TXD2                                  0x00B8 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTE14__SDHC1_CD                                   0x00B8 0x0A58 0x8 0x2
+#define MX8ULP_PAD_PTE14__ENET0_MDIO                                 0x00B8 0x0AF0 0xa 0x1
+#define MX8ULP_PAD_PTE14__DBI0_D9                                    0x00B8 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTE14__EPDC0_PWRCTRL3                             0x00B8 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTE14__LP_HV_DBG_MUX_8                            0x00B8 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTE15__PTE15                                      0x00BC 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE15__FXIO1_D8                                   0x00BC 0x08B4 0x2 0x1
+#define MX8ULP_PAD_PTE15__LPSPI4_PCS0                                0x00BC 0x08F4 0x3 0x2
+#define MX8ULP_PAD_PTE15__LPUART7_RX                                 0x00BC 0x09DC 0x4 0x1
+#define MX8ULP_PAD_PTE15__I3C2_PUR                                   0x00BC 0x0000 0x5 0x0
+#define MX8ULP_PAD_PTE15__TPM5_CH0                                   0x00BC 0x0820 0x6 0x1
+#define MX8ULP_PAD_PTE15__I2S6_TXD3                                  0x00BC 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTE15__MQS1_LEFT                                  0x00BC 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTE15__ENET0_MDC                                  0x00BC 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTE15__DBI0_D10                                   0x00BC 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTE15__EPDC0_PWRCOM                               0x00BC 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTE15__WUU1_P6                                    0x00BC 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTE16__PTE16                                      0x00C0 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE16__FXIO1_D7                                   0x00C0 0x08B0 0x2 0x1
+#define MX8ULP_PAD_PTE16__LPSPI5_PCS1                                0x00C0 0x0914 0x3 0x1
+#define MX8ULP_PAD_PTE16__LPUART4_CTS_B                              0x00C0 0x08DC 0x4 0x2
+#define MX8ULP_PAD_PTE16__LPI2C4_SCL                                 0x00C0 0x08C8 0x5 0x2
+#define MX8ULP_PAD_PTE16__TPM5_CH1                                   0x00C0 0x0824 0x6 0x1
+#define MX8ULP_PAD_PTE16__MQS1_LEFT                                  0x00C0 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTE16__MQS1_RIGHT                                 0x00C0 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTE16__USB0_ID                                    0x00C0 0x0AC8 0x9 0x2
+#define MX8ULP_PAD_PTE16__ENET0_TXEN                                 0x00C0 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTE16__DBI0_D11                                   0x00C0 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTE16__EPDC0_PWRIRQ                               0x00C0 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTE16__WDOG3_RST                                  0x00C0 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTE16__LP_HV_DBG_MUX_9                            0x00C0 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTE17__PTE17                                      0x00C4 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE17__FXIO1_D6                                   0x00C4 0x08AC 0x2 0x1
+#define MX8ULP_PAD_PTE17__LPSPI5_PCS2                                0x00C4 0x0918 0x3 0x1
+#define MX8ULP_PAD_PTE17__LPUART4_RTS_B                              0x00C4 0x0000 0x4 0x0
+#define MX8ULP_PAD_PTE17__LPI2C4_SDA                                 0x00C4 0x08CC 0x5 0x2
+#define MX8ULP_PAD_PTE17__MQS1_RIGHT                                 0x00C4 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTE17__SDHC1_VS                                   0x00C4 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTE17__USB0_PWR                                   0x00C4 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTE17__ENET0_RXER                                 0x00C4 0x0B08 0xa 0x1
+#define MX8ULP_PAD_PTE17__DBI0_D12                                   0x00C4 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTE17__EPDC0_PWRSTAT                              0x00C4 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTE17__LP_HV_DBG_MUX_10                           0x00C4 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTE18__PTE18                                      0x00C8 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE18__FXIO1_D5                                   0x00C8 0x08A8 0x2 0x1
+#define MX8ULP_PAD_PTE18__LPSPI5_PCS3                                0x00C8 0x091C 0x3 0x1
+#define MX8ULP_PAD_PTE18__LPUART4_TX                                 0x00C8 0x08E4 0x4 0x2
+#define MX8ULP_PAD_PTE18__LPI2C4_HREQ                                0x00C8 0x08C4 0x5 0x2
+#define MX8ULP_PAD_PTE18__I2S7_TX_BCLK                               0x00C8 0x0B6C 0x7 0x2
+#define MX8ULP_PAD_PTE18__USB0_OC                                    0x00C8 0x0AC0 0x9 0x2
+#define MX8ULP_PAD_PTE18__ENET0_CRS_DV                               0x00C8 0x0AEC 0xa 0x1
+#define MX8ULP_PAD_PTE18__DBI0_D13                                   0x00C8 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTE18__EPDC0_PWRWAKE                              0x00C8 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTE18__LP_HV_DBG_MUX_11                           0x00C8 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTE19__PTE19                                      0x00CC 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE19__FXIO1_D4                                   0x00CC 0x08A4 0x2 0x1
+#define MX8ULP_PAD_PTE19__LPUART4_RX                                 0x00CC 0x08E0 0x4 0x2
+#define MX8ULP_PAD_PTE19__LPI2C5_HREQ                                0x00CC 0x08D0 0x5 0x2
+#define MX8ULP_PAD_PTE19__I3C2_PUR                                   0x00CC 0x0000 0x6 0x0
+#define MX8ULP_PAD_PTE19__I2S7_TX_FS                                 0x00CC 0x0B70 0x7 0x2
+#define MX8ULP_PAD_PTE19__USB1_PWR                                   0x00CC 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTE19__ENET0_REFCLK                               0x00CC 0x0AF4 0xa 0x1
+#define MX8ULP_PAD_PTE19__DBI0_D14                                   0x00CC 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTE19__EPDC0_GDCLK                                0x00CC 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTE19__WUU1_P7                                    0x00CC 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTE20__PTE20                                      0x00D0 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE20__FXIO1_D3                                   0x00D0 0x0898 0x2 0x1
+#define MX8ULP_PAD_PTE20__LPSPI5_SIN                                 0x00D0 0x0924 0x3 0x1
+#define MX8ULP_PAD_PTE20__LPUART5_CTS_B                              0x00D0 0x08E8 0x4 0x2
+#define MX8ULP_PAD_PTE20__LPI2C5_SCL                                 0x00D0 0x08D4 0x5 0x2
+#define MX8ULP_PAD_PTE20__I2S7_TXD0                                  0x00D0 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTE20__USB1_OC                                    0x00D0 0x0AC4 0x9 0x2
+#define MX8ULP_PAD_PTE20__ENET0_RXD1                                 0x00D0 0x0AFC 0xa 0x1
+#define MX8ULP_PAD_PTE20__DBI0_D15                                   0x00D0 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTE20__EPDC0_GDOE                                 0x00D0 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTE20__LP_HV_DBG_MUX_12                           0x00D0 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTE21__PTE21                                      0x00D4 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE21__FXIO1_D2                                   0x00D4 0x086C 0x2 0x1
+#define MX8ULP_PAD_PTE21__LPSPI5_SOUT                                0x00D4 0x0928 0x3 0x1
+#define MX8ULP_PAD_PTE21__LPUART5_RTS_B                              0x00D4 0x0000 0x4 0x0
+#define MX8ULP_PAD_PTE21__LPI2C5_SDA                                 0x00D4 0x08D8 0x5 0x2
+#define MX8ULP_PAD_PTE21__TPM6_CLKIN                                 0x00D4 0x0994 0x6 0x1
+#define MX8ULP_PAD_PTE21__I2S7_TXD1                                  0x00D4 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTE21__USB1_ID                                    0x00D4 0x0ACC 0x9 0x2
+#define MX8ULP_PAD_PTE21__ENET0_RXD0                                 0x00D4 0x0AF8 0xa 0x1
+#define MX8ULP_PAD_PTE21__EPDC0_GDRL                                 0x00D4 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTE21__WDOG4_RST                                  0x00D4 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTE21__LP_HV_DBG_MUX_13                           0x00D4 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTE22__PTE22                                      0x00D8 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE22__FXIO1_D1                                   0x00D8 0x0840 0x2 0x1
+#define MX8ULP_PAD_PTE22__LPSPI5_SCK                                 0x00D8 0x0920 0x3 0x1
+#define MX8ULP_PAD_PTE22__LPUART5_TX                                 0x00D8 0x08F0 0x4 0x2
+#define MX8ULP_PAD_PTE22__I3C2_SCL                                   0x00D8 0x08BC 0x5 0x2
+#define MX8ULP_PAD_PTE22__TPM6_CH0                                   0x00D8 0x097C 0x6 0x1
+#define MX8ULP_PAD_PTE22__I2S7_TXD2                                  0x00D8 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTE22__EXT_AUD_MCLK3                              0x00D8 0x0B14 0x9 0x5
+#define MX8ULP_PAD_PTE22__ENET0_TXD1                                 0x00D8 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTE22__EPDC0_SDOED                                0x00D8 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTE22__CLKOUT2                                    0x00D8 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTE22__LP_HV_DBG_MUX_14                           0x00D8 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTE23__PTE23                                      0x00DC 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTE23__FXIO1_D0                                   0x00DC 0x083C 0x2 0x1
+#define MX8ULP_PAD_PTE23__LPSPI5_PCS0                                0x00DC 0x0910 0x3 0x1
+#define MX8ULP_PAD_PTE23__LPUART5_RX                                 0x00DC 0x08EC 0x4 0x2
+#define MX8ULP_PAD_PTE23__I3C2_SDA                                   0x00DC 0x08C0 0x5 0x2
+#define MX8ULP_PAD_PTE23__TPM6_CH1                                   0x00DC 0x0980 0x6 0x1
+#define MX8ULP_PAD_PTE23__I2S7_TXD3                                  0x00DC 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTE23__EXT_AUD_MCLK2                              0x00DC 0x0800 0x9 0x1
+#define MX8ULP_PAD_PTE23__ENET0_TXD0                                 0x00DC 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTE23__EPDC0_SDOEZ                                0x00DC 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTE23__CLKOUT1                                    0x00DC 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTE23__LP_HV_DBG_MUX_15                           0x00DC 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTF0__PTF0                                        0x0100 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF0__FXIO1_D0                                    0x0100 0x083C 0x2 0x2
+#define MX8ULP_PAD_PTF0__LPUART6_CTS_B                               0x0100 0x09CC 0x4 0x2
+#define MX8ULP_PAD_PTF0__LPI2C6_SCL                                  0x0100 0x09B8 0x5 0x2
+#define MX8ULP_PAD_PTF0__I2S7_RX_BCLK                                0x0100 0x0B64 0x7 0x2
+#define MX8ULP_PAD_PTF0__SDHC1_D1                                    0x0100 0x0A68 0x8 0x2
+#define MX8ULP_PAD_PTF0__ENET0_RXD1                                  0x0100 0x0AFC 0x9 0x2
+#define MX8ULP_PAD_PTF0__USB1_ID                                     0x0100 0x0ACC 0xa 0x3
+#define MX8ULP_PAD_PTF0__EPDC0_SDOE                                  0x0100 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF0__DPI0_D23                                    0x0100 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF0__WUU1_P8                                     0x0100 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTF1__PTF1                                        0x0104 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF1__FXIO1_D1                                    0x0104 0x0840 0x2 0x2
+#define MX8ULP_PAD_PTF1__LPUART6_RTS_B                               0x0104 0x0000 0x4 0x0
+#define MX8ULP_PAD_PTF1__LPI2C6_SDA                                  0x0104 0x09BC 0x5 0x2
+#define MX8ULP_PAD_PTF1__I2S7_RX_FS                                  0x0104 0x0B68 0x7 0x2
+#define MX8ULP_PAD_PTF1__SDHC1_D0                                    0x0104 0x0A64 0x8 0x2
+#define MX8ULP_PAD_PTF1__ENET0_RXD0                                  0x0104 0x0AF8 0x9 0x2
+#define MX8ULP_PAD_PTF1__LP_HV_DBG_MUX_16                            0x0104 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTF1__EPDC0_SDSHR                                 0x0104 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF1__DPI0_D22                                    0x0104 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF1__WDOG3_RST                                   0x0104 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTF1__DEBUG_MUX0_16                               0x0104 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTF1__DEBUG_MUX1_22                               0x0104 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTF2__PTF2                                        0x0108 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF2__FXIO1_D2                                    0x0108 0x086C 0x2 0x2
+#define MX8ULP_PAD_PTF2__LPUART6_TX                                  0x0108 0x09D4 0x4 0x2
+#define MX8ULP_PAD_PTF2__LPI2C6_HREQ                                 0x0108 0x09B4 0x5 0x2
+#define MX8ULP_PAD_PTF2__I2S7_RXD0                                   0x0108 0x0B54 0x7 0x2
+#define MX8ULP_PAD_PTF2__SDHC1_CLK                                   0x0108 0x0A5C 0x8 0x2
+#define MX8ULP_PAD_PTF2__ENET0_TXD1                                  0x0108 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTF2__USB0_ID                                     0x0108 0x0AC8 0xa 0x3
+#define MX8ULP_PAD_PTF2__EPDC0_SDCE9                                 0x0108 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF2__DPI0_D21                                    0x0108 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF2__LP_HV_DBG_MUX_17                            0x0108 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTF2__DEBUG_MUX0_17                               0x0108 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTF2__DEBUG_MUX1_23                               0x0108 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTF3__PTF3                                        0x010C 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF3__FXIO1_D3                                    0x010C 0x0898 0x2 0x2
+#define MX8ULP_PAD_PTF3__LPUART6_RX                                  0x010C 0x09D0 0x4 0x2
+#define MX8ULP_PAD_PTF3__LPI2C7_HREQ                                 0x010C 0x09C0 0x5 0x2
+#define MX8ULP_PAD_PTF3__I2S7_RXD1                                   0x010C 0x0B58 0x7 0x2
+#define MX8ULP_PAD_PTF3__SDHC1_CMD                                   0x010C 0x0A60 0x8 0x2
+#define MX8ULP_PAD_PTF3__ENET0_TXD0                                  0x010C 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTF3__USB0_PWR                                    0x010C 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTF3__EPDC0_SDCE8                                 0x010C 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF3__DPI0_D20                                    0x010C 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF3__WUU1_P9                                     0x010C 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTF3__DEBUG_MUX1_24                               0x010C 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTF4__PTF4                                        0x0110 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF4__FXIO1_D4                                    0x0110 0x08A4 0x2 0x2
+#define MX8ULP_PAD_PTF4__LPSPI4_PCS1                                 0x0110 0x08F8 0x3 0x3
+#define MX8ULP_PAD_PTF4__LPUART7_CTS_B                               0x0110 0x09D8 0x4 0x2
+#define MX8ULP_PAD_PTF4__LPI2C7_SCL                                  0x0110 0x09C4 0x5 0x2
+#define MX8ULP_PAD_PTF4__TPM7_CLKIN                                  0x0110 0x09B0 0x6 0x1
+#define MX8ULP_PAD_PTF4__I2S7_RXD2                                   0x0110 0x0B5C 0x7 0x2
+#define MX8ULP_PAD_PTF4__SDHC1_D3                                    0x0110 0x0A70 0x8 0x2
+#define MX8ULP_PAD_PTF4__ENET0_TXEN                                  0x0110 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTF4__USB0_OC                                     0x0110 0x0AC0 0xa 0x3
+#define MX8ULP_PAD_PTF4__EPDC0_SDCE7                                 0x0110 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF4__DPI0_D19                                    0x0110 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF4__WUU1_P10                                    0x0110 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTF4__DEBUG_MUX1_25                               0x0110 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTF5__PTF5                                        0x0114 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF5__FXIO1_D5                                    0x0114 0x08A8 0x2 0x2
+#define MX8ULP_PAD_PTF5__LPSPI4_PCS2                                 0x0114 0x08FC 0x3 0x3
+#define MX8ULP_PAD_PTF5__LPUART7_RTS_B                               0x0114 0x0000 0x4 0x0
+#define MX8ULP_PAD_PTF5__LPI2C7_SDA                                  0x0114 0x09C8 0x5 0x2
+#define MX8ULP_PAD_PTF5__TPM7_CH0                                    0x0114 0x0998 0x6 0x1
+#define MX8ULP_PAD_PTF5__I2S7_RXD3                                   0x0114 0x0B60 0x7 0x2
+#define MX8ULP_PAD_PTF5__SDHC1_D2                                    0x0114 0x0A6C 0x8 0x2
+#define MX8ULP_PAD_PTF5__ENET0_RXER                                  0x0114 0x0B08 0x9 0x2
+#define MX8ULP_PAD_PTF5__USB1_PWR                                    0x0114 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTF5__EPDC0_SDCE6                                 0x0114 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF5__DPI0_D18                                    0x0114 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF5__LP_HV_DBG_MUX_18                            0x0114 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTF5__DEBUG_MUX0_18                               0x0114 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTF5__DEBUG_MUX1_26                               0x0114 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTF6__LP_HV_DBG_MUX_19                            0x0118 0x0000 0x0 0x0
+#define MX8ULP_PAD_PTF6__PTF6                                        0x0118 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF6__FXIO1_D6                                    0x0118 0x08AC 0x2 0x2
+#define MX8ULP_PAD_PTF6__LPSPI4_PCS3                                 0x0118 0x0900 0x3 0x3
+#define MX8ULP_PAD_PTF6__LPUART7_TX                                  0x0118 0x09E0 0x4 0x2
+#define MX8ULP_PAD_PTF6__I3C2_SCL                                    0x0118 0x08BC 0x5 0x3
+#define MX8ULP_PAD_PTF6__TPM7_CH1                                    0x0118 0x099C 0x6 0x1
+#define MX8ULP_PAD_PTF6__I2S7_MCLK                                   0x0118 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF6__SDHC1_D4                                    0x0118 0x0A74 0x8 0x2
+#define MX8ULP_PAD_PTF6__ENET0_CRS_DV                                0x0118 0x0AEC 0x9 0x2
+#define MX8ULP_PAD_PTF6__USB1_OC                                     0x0118 0x0AC4 0xa 0x3
+#define MX8ULP_PAD_PTF6__EPDC0_SDCE5                                 0x0118 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF6__DPI0_D17                                    0x0118 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF6__WDOG4_RST                                   0x0118 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTF6__DEBUG_MUX0_19                               0x0118 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTF6__DEBUG_MUX1_27                               0x0118 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTF7__PTF7                                        0x011C 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF7__FXIO1_D7                                    0x011C 0x08B0 0x2 0x2
+#define MX8ULP_PAD_PTF7__LPUART7_RX                                  0x011C 0x09DC 0x4 0x2
+#define MX8ULP_PAD_PTF7__I3C2_SDA                                    0x011C 0x08C0 0x5 0x3
+#define MX8ULP_PAD_PTF7__TPM7_CH2                                    0x011C 0x09A0 0x6 0x1
+#define MX8ULP_PAD_PTF7__MQS1_LEFT                                   0x011C 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF7__SDHC1_D5                                    0x011C 0x0A78 0x8 0x2
+#define MX8ULP_PAD_PTF7__ENET0_REFCLK                                0x011C 0x0AF4 0x9 0x2
+#define MX8ULP_PAD_PTF7__TRACE0_D15                                  0x011C 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTF7__EPDC0_SDCE4                                 0x011C 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF7__DPI0_D16                                    0x011C 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF7__WUU1_P11                                    0x011C 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTF7__DEBUG_MUX1_28                               0x011C 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTF8__PTF8                                        0x0120 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF8__FXIO1_D8                                    0x0120 0x08B4 0x2 0x2
+#define MX8ULP_PAD_PTF8__LPSPI4_SIN                                  0x0120 0x0908 0x3 0x3
+#define MX8ULP_PAD_PTF8__LPUART4_CTS_B                               0x0120 0x08DC 0x4 0x3
+#define MX8ULP_PAD_PTF8__LPI2C4_SCL                                  0x0120 0x08C8 0x5 0x3
+#define MX8ULP_PAD_PTF8__TPM7_CH3                                    0x0120 0x09A4 0x6 0x1
+#define MX8ULP_PAD_PTF8__MQS1_RIGHT                                  0x0120 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF8__SDHC1_D6                                    0x0120 0x0A7C 0x8 0x2
+#define MX8ULP_PAD_PTF8__ENET0_MDIO                                  0x0120 0x0AF0 0x9 0x2
+#define MX8ULP_PAD_PTF8__TRACE0_D14                                  0x0120 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTF8__EPDC0_D15                                   0x0120 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF8__DPI0_D15                                    0x0120 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF8__LP_HV_DBG_MUX_24                            0x0120 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTF8__DEBUG_MUX1_29                               0x0120 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTF9__PTF9                                        0x0124 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF9__FXIO1_D9                                    0x0124 0x08B8 0x2 0x2
+#define MX8ULP_PAD_PTF9__LPSPI4_SOUT                                 0x0124 0x090C 0x3 0x3
+#define MX8ULP_PAD_PTF9__LPUART4_RTS_B                               0x0124 0x0000 0x4 0x0
+#define MX8ULP_PAD_PTF9__LPI2C4_SDA                                  0x0124 0x08CC 0x5 0x3
+#define MX8ULP_PAD_PTF9__TPM7_CH4                                    0x0124 0x09A8 0x6 0x1
+#define MX8ULP_PAD_PTF9__EXT_AUD_MCLK2                               0x0124 0x0800 0x7 0x2
+#define MX8ULP_PAD_PTF9__SDHC1_D7                                    0x0124 0x0A80 0x8 0x2
+#define MX8ULP_PAD_PTF9__ENET0_MDC                                   0x0124 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTF9__TRACE0_D13                                  0x0124 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTF9__EPDC0_D14                                   0x0124 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF9__DPI0_D14                                    0x0124 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF9__LP_HV_DBG_MUX_25                            0x0124 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTF9__DEBUG_MUX1_30                               0x0124 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTF10__LP_HV_DBG_MUX_26                           0x0128 0x0000 0x0 0x0
+#define MX8ULP_PAD_PTF10__PTF10                                      0x0128 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF10__FXIO1_D10                                  0x0128 0x0844 0x2 0x2
+#define MX8ULP_PAD_PTF10__LPSPI4_SCK                                 0x0128 0x0904 0x3 0x3
+#define MX8ULP_PAD_PTF10__LPUART4_TX                                 0x0128 0x08E4 0x4 0x3
+#define MX8ULP_PAD_PTF10__LPI2C4_HREQ                                0x0128 0x08C4 0x5 0x3
+#define MX8ULP_PAD_PTF10__TPM7_CH5                                   0x0128 0x09AC 0x6 0x1
+#define MX8ULP_PAD_PTF10__I2S4_RX_BCLK                               0x0128 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF10__SDHC1_DQS                                  0x0128 0x0A84 0x8 0x2
+#define MX8ULP_PAD_PTF10__ENET0_1588_CLKIN                           0x0128 0x0AD0 0x9 0x2
+#define MX8ULP_PAD_PTF10__TRACE0_D12                                 0x0128 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTF10__EPDC0_D13                                  0x0128 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF10__DPI0_D13                                   0x0128 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF10__DEBUG_MUX0_20                              0x0128 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTF10__DEBUG_MUX1_31                              0x0128 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTF11__PTF11                                      0x012C 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF11__FXIO1_D11                                  0x012C 0x0848 0x2 0x2
+#define MX8ULP_PAD_PTF11__LPSPI4_PCS0                                0x012C 0x08F4 0x3 0x3
+#define MX8ULP_PAD_PTF11__LPUART4_RX                                 0x012C 0x08E0 0x4 0x3
+#define MX8ULP_PAD_PTF11__TPM4_CLKIN                                 0x012C 0x081C 0x6 0x2
+#define MX8ULP_PAD_PTF11__I2S4_RX_FS                                 0x012C 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF11__SDHC1_RESET_B                              0x012C 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTF11__ENET0_1588_TMR0                            0x012C 0x0AD4 0x9 0x2
+#define MX8ULP_PAD_PTF11__TRACE0_D11                                 0x012C 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTF11__EPDC0_D12                                  0x012C 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF11__DPI0_D12                                   0x012C 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF11__LP_HV_DBG_MUX_27                           0x012C 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTF11__DEBUG_MUX1_32                              0x012C 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTF12__PTF12                                      0x0130 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF12__FXIO1_D12                                  0x0130 0x084C 0x2 0x2
+#define MX8ULP_PAD_PTF12__LPSPI5_PCS1                                0x0130 0x0914 0x3 0x2
+#define MX8ULP_PAD_PTF12__LPUART5_CTS_B                              0x0130 0x08E8 0x4 0x3
+#define MX8ULP_PAD_PTF12__LPI2C5_SCL                                 0x0130 0x08D4 0x5 0x3
+#define MX8ULP_PAD_PTF12__TPM4_CH0                                   0x0130 0x0804 0x6 0x2
+#define MX8ULP_PAD_PTF12__I2S4_RXD0                                  0x0130 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF12__SDHC2_WP                                   0x0130 0x0ABC 0x8 0x1
+#define MX8ULP_PAD_PTF12__ENET0_1588_TMR1                            0x0130 0x0AD8 0x9 0x2
+#define MX8ULP_PAD_PTF12__TRACE0_D10                                 0x0130 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTF12__EPDC0_D11                                  0x0130 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF12__DPI0_D11                                   0x0130 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF12__LP_HV_DBG_MUX_28                           0x0130 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTF12__DEBUG_MUX1_33                              0x0130 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTF13__PTF13                                      0x0134 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF13__FXIO1_D13                                  0x0134 0x0850 0x2 0x2
+#define MX8ULP_PAD_PTF13__LPSPI5_PCS2                                0x0134 0x0918 0x3 0x2
+#define MX8ULP_PAD_PTF13__LPUART5_RTS_B                              0x0134 0x0000 0x4 0x0
+#define MX8ULP_PAD_PTF13__LPI2C5_SDA                                 0x0134 0x08D8 0x5 0x3
+#define MX8ULP_PAD_PTF13__TPM4_CH1                                   0x0134 0x0808 0x6 0x2
+#define MX8ULP_PAD_PTF13__I2S4_RXD1                                  0x0134 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF13__SDHC2_CD                                   0x0134 0x0A8C 0x8 0x1
+#define MX8ULP_PAD_PTF13__ENET0_1588_TMR2                            0x0134 0x0ADC 0x9 0x2
+#define MX8ULP_PAD_PTF13__TRACE0_D9                                  0x0134 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTF13__EPDC0_D10                                  0x0134 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF13__DPI0_D10                                   0x0134 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF13__DEBUG_MUX0_21                              0x0134 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTF13__LP_HV_DBG_MUX_29                           0x0134 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTF14__PTF14                                      0x0138 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF14__FXIO1_D14                                  0x0138 0x0854 0x2 0x2
+#define MX8ULP_PAD_PTF14__LPSPI5_PCS3                                0x0138 0x091C 0x3 0x2
+#define MX8ULP_PAD_PTF14__LPUART5_TX                                 0x0138 0x08F0 0x4 0x3
+#define MX8ULP_PAD_PTF14__LPI2C5_HREQ                                0x0138 0x08D0 0x5 0x3
+#define MX8ULP_PAD_PTF14__TPM4_CH2                                   0x0138 0x080C 0x6 0x2
+#define MX8ULP_PAD_PTF14__I2S4_MCLK                                  0x0138 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF14__SDHC2_VS                                   0x0138 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTF14__ENET0_1588_TMR3                            0x0138 0x0AE0 0x9 0x2
+#define MX8ULP_PAD_PTF14__TRACE0_D8                                  0x0138 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTF14__EPDC0_D9                                   0x0138 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF14__DPI0_D9                                    0x0138 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF14__DEBUG_MUX0_22                              0x0138 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTF14__LP_HV_DBG_MUX_30                           0x0138 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTF15__PTF15                                      0x013C 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF15__FXIO1_D15                                  0x013C 0x0858 0x2 0x2
+#define MX8ULP_PAD_PTF15__LPUART5_RX                                 0x013C 0x08EC 0x4 0x3
+#define MX8ULP_PAD_PTF15__TPM4_CH3                                   0x013C 0x0810 0x6 0x2
+#define MX8ULP_PAD_PTF15__I2S4_TX_BCLK                               0x013C 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF15__SDHC2_D1                                   0x013C 0x0A9C 0x8 0x3
+#define MX8ULP_PAD_PTF15__ENET0_RXD2                                 0x013C 0x0B00 0x9 0x2
+#define MX8ULP_PAD_PTF15__TRACE0_D7                                  0x013C 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTF15__EPDC0_D8                                   0x013C 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF15__DPI0_D8                                    0x013C 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF15__LP_HV_DBG_MUX_31                           0x013C 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTF16__PTF16                                      0x0140 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF16__FXIO1_D16                                  0x0140 0x085C 0x2 0x2
+#define MX8ULP_PAD_PTF16__LPSPI5_SIN                                 0x0140 0x0924 0x3 0x2
+#define MX8ULP_PAD_PTF16__LPUART6_CTS_B                              0x0140 0x09CC 0x4 0x3
+#define MX8ULP_PAD_PTF16__LPI2C6_SCL                                 0x0140 0x09B8 0x5 0x3
+#define MX8ULP_PAD_PTF16__TPM4_CH4                                   0x0140 0x0814 0x6 0x2
+#define MX8ULP_PAD_PTF16__I2S4_TX_FS                                 0x0140 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF16__SDHC2_D0                                   0x0140 0x0A98 0x8 0x3
+#define MX8ULP_PAD_PTF16__ENET0_RXD3                                 0x0140 0x0B04 0x9 0x2
+#define MX8ULP_PAD_PTF16__TRACE0_D6                                  0x0140 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTF16__EPDC0_D7                                   0x0140 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF16__DPI0_D7                                    0x0140 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF16__LP_HV_DBG_MUX_32                           0x0140 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTF17__PTF17                                      0x0144 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF17__FXIO1_D17                                  0x0144 0x0860 0x2 0x2
+#define MX8ULP_PAD_PTF17__LPSPI5_SOUT                                0x0144 0x0928 0x3 0x2
+#define MX8ULP_PAD_PTF17__LPUART6_RTS_B                              0x0144 0x0000 0x4 0x0
+#define MX8ULP_PAD_PTF17__LPI2C6_SDA                                 0x0144 0x09BC 0x5 0x3
+#define MX8ULP_PAD_PTF17__TPM4_CH5                                   0x0144 0x0818 0x6 0x2
+#define MX8ULP_PAD_PTF17__I2S4_TXD0                                  0x0144 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF17__SDHC2_CLK                                  0x0144 0x0A90 0x8 0x3
+#define MX8ULP_PAD_PTF17__ENET0_RXCLK                                0x0144 0x0B0C 0x9 0x2
+#define MX8ULP_PAD_PTF17__TRACE0_D5                                  0x0144 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTF17__EPDC0_D6                                   0x0144 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF17__DPI0_D6                                    0x0144 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF17__DEBUG_MUX0_23                              0x0144 0x0000 0xe 0x0
+#define MX8ULP_PAD_PTF17__LP_HV_DBG_MUX_33                           0x0144 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTF18__PTF18                                      0x0148 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF18__FXIO1_D18                                  0x0148 0x0864 0x2 0x2
+#define MX8ULP_PAD_PTF18__LPSPI5_SCK                                 0x0148 0x0920 0x3 0x2
+#define MX8ULP_PAD_PTF18__LPUART6_TX                                 0x0148 0x09D4 0x4 0x3
+#define MX8ULP_PAD_PTF18__LPI2C6_HREQ                                0x0148 0x09B4 0x5 0x3
+#define MX8ULP_PAD_PTF18__TPM5_CLKIN                                 0x0148 0x0838 0x6 0x2
+#define MX8ULP_PAD_PTF18__I2S4_TXD1                                  0x0148 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF18__SDHC2_CMD                                  0x0148 0x0A94 0x8 0x3
+#define MX8ULP_PAD_PTF18__ENET0_TXD2                                 0x0148 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTF18__TRACE0_D4                                  0x0148 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTF18__EPDC0_D5                                   0x0148 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF18__DPI0_D5                                    0x0148 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF19__PTF19                                      0x014C 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF19__FXIO1_D19                                  0x014C 0x0868 0x2 0x2
+#define MX8ULP_PAD_PTF19__LPSPI5_PCS0                                0x014C 0x0910 0x3 0x2
+#define MX8ULP_PAD_PTF19__LPUART6_RX                                 0x014C 0x09D0 0x4 0x3
+#define MX8ULP_PAD_PTF19__TPM5_CH0                                   0x014C 0x0820 0x6 0x2
+#define MX8ULP_PAD_PTF19__I2S5_RX_BCLK                               0x014C 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF19__SDHC2_D3                                   0x014C 0x0AA4 0x8 0x3
+#define MX8ULP_PAD_PTF19__ENET0_TXD3                                 0x014C 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTF19__TRACE0_D3                                  0x014C 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTF19__EPDC0_D4                                   0x014C 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF19__DPI0_D4                                    0x014C 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF20__PTF20                                      0x0150 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF20__FXIO1_D20                                  0x0150 0x0870 0x2 0x2
+#define MX8ULP_PAD_PTF20__LPUART7_CTS_B                              0x0150 0x09D8 0x4 0x3
+#define MX8ULP_PAD_PTF20__LPI2C7_SCL                                 0x0150 0x09C4 0x5 0x3
+#define MX8ULP_PAD_PTF20__TPM5_CH1                                   0x0150 0x0824 0x6 0x2
+#define MX8ULP_PAD_PTF20__I2S5_RX_FS                                 0x0150 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF20__SDHC2_D2                                   0x0150 0x0AA0 0x8 0x3
+#define MX8ULP_PAD_PTF20__ENET0_TXCLK                                0x0150 0x0B10 0x9 0x2
+#define MX8ULP_PAD_PTF20__TRACE0_D2                                  0x0150 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTF20__EPDC0_D3                                   0x0150 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF20__DPI0_D3                                    0x0150 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF21__PTF21                                      0x0154 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF21__FXIO1_D21                                  0x0154 0x0874 0x2 0x2
+#define MX8ULP_PAD_PTF21__SPDIF_CLK                                  0x0154 0x0000 0x3 0x0
+#define MX8ULP_PAD_PTF21__LPUART7_RTS_B                              0x0154 0x0000 0x4 0x0
+#define MX8ULP_PAD_PTF21__LPI2C7_SDA                                 0x0154 0x09C8 0x5 0x3
+#define MX8ULP_PAD_PTF21__TPM6_CLKIN                                 0x0154 0x0994 0x6 0x2
+#define MX8ULP_PAD_PTF21__I2S5_RXD0                                  0x0154 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF21__SDHC2_D4                                   0x0154 0x0AA8 0x8 0x2
+#define MX8ULP_PAD_PTF21__ENET0_CRS                                  0x0154 0x0AE8 0x9 0x2
+#define MX8ULP_PAD_PTF21__TRACE0_D1                                  0x0154 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTF21__EPDC0_D2                                   0x0154 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF21__DPI0_D2                                    0x0154 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF22__PTF22                                      0x0158 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF22__FXIO1_D22                                  0x0158 0x0878 0x2 0x2
+#define MX8ULP_PAD_PTF22__SPDIF_IN0                                  0x0158 0x0B74 0x3 0x3
+#define MX8ULP_PAD_PTF22__LPUART7_TX                                 0x0158 0x09E0 0x4 0x3
+#define MX8ULP_PAD_PTF22__LPI2C7_HREQ                                0x0158 0x09C0 0x5 0x3
+#define MX8ULP_PAD_PTF22__TPM6_CH0                                   0x0158 0x097C 0x6 0x2
+#define MX8ULP_PAD_PTF22__I2S5_RXD1                                  0x0158 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF22__SDHC2_D5                                   0x0158 0x0AAC 0x8 0x2
+#define MX8ULP_PAD_PTF22__ENET0_COL                                  0x0158 0x0AE4 0x9 0x2
+#define MX8ULP_PAD_PTF22__TRACE0_D0                                  0x0158 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTF22__EPDC0_D1                                   0x0158 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF22__DPI0_D1                                    0x0158 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF23__PTF23                                      0x015C 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF23__FXIO1_D23                                  0x015C 0x087C 0x2 0x2
+#define MX8ULP_PAD_PTF23__SPDIF_OUT0                                 0x015C 0x0000 0x3 0x0
+#define MX8ULP_PAD_PTF23__LPUART7_RX                                 0x015C 0x09DC 0x4 0x3
+#define MX8ULP_PAD_PTF23__I3C2_PUR                                   0x015C 0x0000 0x5 0x0
+#define MX8ULP_PAD_PTF23__TPM6_CH1                                   0x015C 0x0980 0x6 0x2
+#define MX8ULP_PAD_PTF23__I2S5_RXD2                                  0x015C 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF23__SDHC2_D6                                   0x015C 0x0AB0 0x8 0x2
+#define MX8ULP_PAD_PTF23__ENET0_TXER                                 0x015C 0x0000 0x9 0x0
+#define MX8ULP_PAD_PTF23__TRACE0_CLKOUT                              0x015C 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTF23__EPDC0_D0                                   0x015C 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF23__DPI0_D0                                    0x015C 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF24__PTF24                                      0x0160 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF24__FXIO1_D24                                  0x0160 0x0880 0x2 0x2
+#define MX8ULP_PAD_PTF24__SPDIF_IN1                                  0x0160 0x0B78 0x3 0x3
+#define MX8ULP_PAD_PTF24__I3C2_SCL                                   0x0160 0x08BC 0x5 0x4
+#define MX8ULP_PAD_PTF24__I2S5_RXD3                                  0x0160 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF24__SDHC2_D7                                   0x0160 0x0AB4 0x8 0x2
+#define MX8ULP_PAD_PTF24__DBI0_WRX                                   0x0160 0x0000 0xa 0x0
+#define MX8ULP_PAD_PTF24__EPDC0_SDCLK                                0x0160 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF24__DPI0_PCLK                                  0x0160 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF24__WUU1_P12                                   0x0160 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTF25__PTF25                                      0x0164 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF25__FXIO1_D25                                  0x0164 0x0884 0x2 0x2
+#define MX8ULP_PAD_PTF25__SPDIF_OUT1                                 0x0164 0x0000 0x3 0x0
+#define MX8ULP_PAD_PTF25__I3C2_SDA                                   0x0164 0x08C0 0x5 0x4
+#define MX8ULP_PAD_PTF25__TPM7_CH5                                   0x0164 0x09AC 0x6 0x2
+#define MX8ULP_PAD_PTF25__I2S5_MCLK                                  0x0164 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF25__SDHC2_DQS                                  0x0164 0x0AB8 0x8 0x2
+#define MX8ULP_PAD_PTF25__EXT_AUD_MCLK2                              0x0164 0x0800 0x9 0x3
+#define MX8ULP_PAD_PTF25__EPDC0_GDSP                                 0x0164 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF25__DPI0_VSYNC                                 0x0164 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF25__WUU1_P13                                   0x0164 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTF26__PTF26                                      0x0168 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF26__FXIO1_D26                                  0x0168 0x0888 0x2 0x2
+#define MX8ULP_PAD_PTF26__SPDIF_IN2                                  0x0168 0x0B7C 0x3 0x3
+#define MX8ULP_PAD_PTF26__TPM7_CLKIN                                 0x0168 0x09B0 0x6 0x2
+#define MX8ULP_PAD_PTF26__I2S5_TX_BCLK                               0x0168 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF26__SDHC2_RESET_B                              0x0168 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTF26__EPDC0_SDLE                                 0x0168 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF26__DPI0_HSYNC                                 0x0168 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF26__WUU1_P14                                   0x0168 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTF27__PTF27                                      0x016C 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF27__FXIO1_D27                                  0x016C 0x088C 0x2 0x2
+#define MX8ULP_PAD_PTF27__SPDIF_OUT2                                 0x016C 0x0000 0x3 0x0
+#define MX8ULP_PAD_PTF27__TPM7_CH0                                   0x016C 0x0998 0x6 0x2
+#define MX8ULP_PAD_PTF27__I2S5_TX_FS                                 0x016C 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF27__SDHC2_WP                                   0x016C 0x0ABC 0x8 0x2
+#define MX8ULP_PAD_PTF27__EPDC0_SDCE0                                0x016C 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF27__DPI0_DE                                    0x016C 0x0000 0xc 0x0
+#define MX8ULP_PAD_PTF27__WUU1_P15                                   0x016C 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTF28__PTF28                                      0x0170 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF28__FXIO1_D28                                  0x0170 0x0890 0x2 0x2
+#define MX8ULP_PAD_PTF28__SPDIF_IN3                                  0x0170 0x0B80 0x3 0x3
+#define MX8ULP_PAD_PTF28__TPM7_CH1                                   0x0170 0x099C 0x6 0x2
+#define MX8ULP_PAD_PTF28__I2S5_TXD0                                  0x0170 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF28__SDHC2_CD                                   0x0170 0x0A8C 0x8 0x2
+#define MX8ULP_PAD_PTF28__EPDC0_SDCLK_B                              0x0170 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF28__LP_HV_DBG_MUX_20                           0x0170 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTF29__PTF29                                      0x0174 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF29__FXIO1_D29                                  0x0174 0x0894 0x2 0x2
+#define MX8ULP_PAD_PTF29__SPDIF_OUT3                                 0x0174 0x0000 0x3 0x0
+#define MX8ULP_PAD_PTF29__TPM7_CH2                                   0x0174 0x09A0 0x6 0x2
+#define MX8ULP_PAD_PTF29__I2S5_TXD1                                  0x0174 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF29__SDHC2_VS                                   0x0174 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTF29__EPDC0_SDCE1                                0x0174 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF29__WDOG3_RST                                  0x0174 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTF29__LP_HV_DBG_MUX_21                           0x0174 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTF30__PTF30                                      0x0178 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF30__FXIO1_D30                                  0x0178 0x089C 0x2 0x2
+#define MX8ULP_PAD_PTF30__TPM7_CH3                                   0x0178 0x09A4 0x6 0x2
+#define MX8ULP_PAD_PTF30__I2S5_TXD2                                  0x0178 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF30__MQS1_LEFT                                  0x0178 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTF30__EPDC0_SDCE2                                0x0178 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF30__WDOG4_RST                                  0x0178 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTF30__LP_HV_DBG_MUX_22                           0x0178 0x0000 0xf 0x0
+#define MX8ULP_PAD_PTF31__PTF31                                      0x017C 0x0000 0x1 0x0
+#define MX8ULP_PAD_PTF31__FXIO1_D31                                  0x017C 0x08A0 0x2 0x2
+#define MX8ULP_PAD_PTF31__TPM7_CH4                                   0x017C 0x09A8 0x6 0x2
+#define MX8ULP_PAD_PTF31__I2S5_TXD3                                  0x017C 0x0000 0x7 0x0
+#define MX8ULP_PAD_PTF31__MQS1_RIGHT                                 0x017C 0x0000 0x8 0x0
+#define MX8ULP_PAD_PTF31__EPDC0_SDCE3                                0x017C 0x0000 0xb 0x0
+#define MX8ULP_PAD_PTF31__WDOG5_RST                                  0x017C 0x0000 0xd 0x0
+#define MX8ULP_PAD_PTF31__LP_HV_DBG_MUX_23                           0x017C 0x0000 0xf 0x0
+#define MX8ULP_PAD_BOOT_MODE0__BOOT_MODE0                            0x0400 0x0000 0x0 0x0
+#define MX8ULP_PAD_BOOT_MODE1__BOOT_MODE1                            0x0404 0x0000 0x0 0x0
+
+#endif /* __DTS_IMX8ULP_PINFUNC_H */
diff --git a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
new file mode 100644 (file)
index 0000000..a987ff7
--- /dev/null
@@ -0,0 +1,434 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2021 NXP
+ */
+
+#include <dt-bindings/clock/imx8ulp-clock.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/power/imx8ulp-power.h>
+
+#include "imx8ulp-pinfunc.h"
+
+/ {
+       interrupt-parent = <&gic>;
+       #address-cells = <2>;
+       #size-cells = <2>;
+
+       aliases {
+               gpio0 = &gpiod;
+               gpio1 = &gpioe;
+               gpio2 = &gpiof;
+               mmc0 = &usdhc0;
+               mmc1 = &usdhc1;
+               mmc2 = &usdhc2;
+               serial0 = &lpuart4;
+               serial1 = &lpuart5;
+               serial2 = &lpuart6;
+               serial3 = &lpuart7;
+       };
+
+       cpus {
+               #address-cells = <2>;
+               #size-cells = <0>;
+
+               A35_0: cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a35";
+                       reg = <0x0 0x0>;
+                       enable-method = "psci";
+                       next-level-cache = <&A35_L2>;
+               };
+
+               A35_1: cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a35";
+                       reg = <0x0 0x1>;
+                       enable-method = "psci";
+                       next-level-cache = <&A35_L2>;
+               };
+
+               A35_L2: l2-cache0 {
+                       compatible = "cache";
+               };
+       };
+
+       gic: interrupt-controller@2d400000 {
+               compatible = "arm,gic-v3";
+               reg = <0x0 0x2d400000 0 0x10000>, /* GIC Dist */
+                     <0x0 0x2d440000 0 0xc0000>; /* GICR (RD_base + SGI_base) */
+               #interrupt-cells = <3>;
+               interrupt-controller;
+               interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
+       };
+
+       psci {
+               compatible = "arm,psci-1.0";
+               method = "smc";
+       };
+
+       timer {
+               compatible = "arm,armv8-timer";
+               interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, /* Physical Secure */
+                            <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, /* Physical Non-Secure */
+                            <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, /* Virtual */
+                            <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; /* Hypervisor */
+       };
+
+       frosc: clock-frosc {
+               compatible = "fixed-clock";
+               clock-frequency = <192000000>;
+               clock-output-names = "frosc";
+               #clock-cells = <0>;
+       };
+
+       lposc: clock-lposc {
+               compatible = "fixed-clock";
+               clock-frequency = <1000000>;
+               clock-output-names = "lposc";
+               #clock-cells = <0>;
+       };
+
+       rosc: clock-rosc {
+               compatible = "fixed-clock";
+               clock-frequency = <32768>;
+               clock-output-names = "rosc";
+               #clock-cells = <0>;
+       };
+
+       sosc: clock-sosc {
+               compatible = "fixed-clock";
+               clock-frequency = <24000000>;
+               clock-output-names = "sosc";
+               #clock-cells = <0>;
+       };
+
+       sram@2201f000 {
+               compatible = "mmio-sram";
+               reg = <0x0 0x2201f000 0x0 0x1000>;
+
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges = <0 0x0 0x2201f000 0x1000>;
+
+               scmi_buf: scmi-buf@0 {
+                       compatible = "arm,scmi-shmem";
+                       reg = <0x0 0x400>;
+               };
+       };
+
+       firmware {
+               scmi {
+                       compatible = "arm,scmi-smc";
+                       arm,smc-id = <0xc20000fe>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       shmem = <&scmi_buf>;
+
+                       scmi_devpd: protocol@11 {
+                               reg = <0x11>;
+                               #power-domain-cells = <1>;
+                       };
+
+                       scmi_sensor: protocol@15 {
+                               reg = <0x15>;
+                               #thermal-sensor-cells = <0>;
+                       };
+               };
+       };
+
+       soc@0 {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges = <0x0 0x0 0x0 0x40000000>;
+
+               per_bridge3: bus@29000000 {
+                       compatible = "simple-bus";
+                       reg = <0x29000000 0x800000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       wdog3: watchdog@292a0000 {
+                               compatible = "fsl,imx8ulp-wdt", "fsl,imx7ulp-wdt";
+                               reg = <0x292a0000 0x10000>;
+                               interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&pcc3 IMX8ULP_CLK_WDOG3>;
+                               assigned-clocks = <&pcc3 IMX8ULP_CLK_WDOG3>;
+                               assigned-clock-parents = <&cgc1 IMX8ULP_CLK_SOSC_DIV2>;
+                               timeout-sec = <40>;
+                       };
+
+                       cgc1: clock-controller@292c0000 {
+                               compatible = "fsl,imx8ulp-cgc1";
+                               reg = <0x292c0000 0x10000>;
+                               clocks = <&rosc>, <&sosc>, <&frosc>, <&lposc>;
+                               clock-names = "rosc", "sosc", "frosc", "lposc";
+                               #clock-cells = <1>;
+                       };
+
+                       pcc3: clock-controller@292d0000 {
+                               compatible = "fsl,imx8ulp-pcc3";
+                               reg = <0x292d0000 0x10000>;
+                               #clock-cells = <1>;
+                       };
+
+                       tpm5: tpm@29340000 {
+                               compatible = "fsl,imx8ulp-tpm", "fsl,imx7ulp-tpm";
+                               reg = <0x29340000 0x1000>;
+                               interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&pcc3 IMX8ULP_CLK_TPM5>,
+                                        <&pcc3 IMX8ULP_CLK_TPM5>;
+                               clock-names = "ipg", "per";
+                               status = "disabled";
+                       };
+
+                       lpi2c4: i2c@29370000 {
+                               compatible = "fsl,imx8ulp-lpi2c", "fsl,imx7ulp-lpi2c";
+                               reg = <0x29370000 0x10000>;
+                               interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&pcc3 IMX8ULP_CLK_LPI2C4>,
+                                        <&pcc3 IMX8ULP_CLK_LPI2C4>;
+                               clock-names = "per", "ipg";
+                               assigned-clocks = <&pcc3 IMX8ULP_CLK_LPI2C4>;
+                               assigned-clock-parents = <&cgc1 IMX8ULP_CLK_XBAR_DIVBUS>;
+                               assigned-clock-rates = <48000000>;
+                               status = "disabled";
+                       };
+
+                       lpi2c5: i2c@29380000 {
+                               compatible = "fsl,imx8ulp-lpi2c", "fsl,imx7ulp-lpi2c";
+                               reg = <0x29380000 0x10000>;
+                               interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&pcc3 IMX8ULP_CLK_LPI2C5>,
+                                        <&pcc3 IMX8ULP_CLK_LPI2C5>;
+                               clock-names = "per", "ipg";
+                               assigned-clocks = <&pcc3 IMX8ULP_CLK_LPI2C5>;
+                               assigned-clock-parents = <&cgc1 IMX8ULP_CLK_XBAR_DIVBUS>;
+                               assigned-clock-rates = <48000000>;
+                               status = "disabled";
+                       };
+
+                       lpuart4: serial@29390000 {
+                               compatible = "fsl,imx8ulp-lpuart", "fsl,imx7ulp-lpuart";
+                               reg = <0x29390000 0x1000>;
+                               interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&pcc3 IMX8ULP_CLK_LPUART4>;
+                               clock-names = "ipg";
+                               status = "disabled";
+                       };
+
+                       lpuart5: serial@293a0000 {
+                               compatible = "fsl,imx8ulp-lpuart", "fsl,imx7ulp-lpuart";
+                               reg = <0x293a0000 0x1000>;
+                               interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&pcc3 IMX8ULP_CLK_LPUART5>;
+                               clock-names = "ipg";
+                               status = "disabled";
+                       };
+
+                       lpspi4: spi@293b0000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "fsl,imx8ulp-spi", "fsl,imx7ulp-spi";
+                               reg = <0x293b0000 0x10000>;
+                               interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&pcc3 IMX8ULP_CLK_LPSPI4>,
+                                        <&pcc3 IMX8ULP_CLK_LPSPI4>;
+                               clock-names = "per", "ipg";
+                               assigned-clocks = <&pcc3 IMX8ULP_CLK_LPSPI4>;
+                               assigned-clock-parents = <&cgc1 IMX8ULP_CLK_XBAR_DIVBUS>;
+                               assigned-clock-rates = <16000000>;
+                               status = "disabled";
+                       };
+
+                       lpspi5: spi@293c0000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "fsl,imx8ulp-spi", "fsl,imx7ulp-spi";
+                               reg = <0x293c0000 0x10000>;
+                               interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&pcc3 IMX8ULP_CLK_LPSPI5>,
+                                        <&pcc3 IMX8ULP_CLK_LPSPI5>;
+                               clock-names = "per", "ipg";
+                               assigned-clocks = <&pcc3 IMX8ULP_CLK_LPSPI5>;
+                               assigned-clock-parents = <&cgc1 IMX8ULP_CLK_XBAR_DIVBUS>;
+                               assigned-clock-rates = <16000000>;
+                               status = "disabled";
+                       };
+               };
+
+               per_bridge4: bus@29800000 {
+                       compatible = "simple-bus";
+                       reg = <0x29800000 0x800000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       pcc4: clock-controller@29800000 {
+                               compatible = "fsl,imx8ulp-pcc4";
+                               reg = <0x29800000 0x10000>;
+                               #clock-cells = <1>;
+                       };
+
+                       lpi2c6: i2c@29840000 {
+                               compatible = "fsl,imx8ulp-lpi2c", "fsl,imx7ulp-lpi2c";
+                               reg = <0x29840000 0x10000>;
+                               interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&pcc4 IMX8ULP_CLK_LPI2C6>,
+                                        <&pcc4 IMX8ULP_CLK_LPI2C6>;
+                               clock-names = "per", "ipg";
+                               assigned-clocks = <&pcc4 IMX8ULP_CLK_LPI2C6>;
+                               assigned-clock-parents = <&cgc1 IMX8ULP_CLK_XBAR_DIVBUS>;
+                               assigned-clock-rates = <48000000>;
+                               status = "disabled";
+                       };
+
+                       lpi2c7: i2c@29850000 {
+                               compatible = "fsl,imx8ulp-lpi2c", "fsl,imx7ulp-lpi2c";
+                               reg = <0x29850000 0x10000>;
+                               interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&pcc4 IMX8ULP_CLK_LPI2C7>,
+                                        <&pcc4 IMX8ULP_CLK_LPI2C7>;
+                               clock-names = "per", "ipg";
+                               assigned-clocks = <&pcc4 IMX8ULP_CLK_LPI2C7>;
+                               assigned-clock-parents = <&cgc1 IMX8ULP_CLK_XBAR_DIVBUS>;
+                               assigned-clock-rates = <48000000>;
+                               status = "disabled";
+                       };
+
+                       lpuart6: serial@29860000 {
+                               compatible = "fsl,imx8ulp-lpuart", "fsl,imx7ulp-lpuart";
+                               reg = <0x29860000 0x1000>;
+                               interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&pcc4 IMX8ULP_CLK_LPUART6>;
+                               clock-names = "ipg";
+                               status = "disabled";
+                       };
+
+                       lpuart7: serial@29870000 {
+                               compatible = "fsl,imx8ulp-lpuart", "fsl,imx7ulp-lpuart";
+                               reg = <0x29870000 0x1000>;
+                               interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&pcc4 IMX8ULP_CLK_LPUART7>;
+                               clock-names = "ipg";
+                               status = "disabled";
+                       };
+
+                       iomuxc1: pinctrl@298c0000 {
+                               compatible = "fsl,imx8ulp-iomuxc1";
+                               reg = <0x298c0000 0x10000>;
+                       };
+
+                       usdhc0: mmc@298d0000 {
+                               compatible = "fsl,imx8ulp-usdhc", "fsl,imx8mm-usdhc";
+                               reg = <0x298d0000 0x10000>;
+                               interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&cgc1 IMX8ULP_CLK_XBAR_DIVBUS>,
+                                        <&cgc1 IMX8ULP_CLK_XBAR_AD_DIVPLAT>,
+                                        <&pcc4 IMX8ULP_CLK_USDHC0>;
+                               clock-names = "ipg", "ahb", "per";
+                               power-domains = <&scmi_devpd IMX8ULP_PD_USDHC0>;
+                               fsl,tuning-start-tap = <20>;
+                               fsl,tuning-step= <2>;
+                               bus-width = <4>;
+                               status = "disabled";
+                       };
+
+                       usdhc1: mmc@298e0000 {
+                               compatible = "fsl,imx8ulp-usdhc", "fsl,imx8mm-usdhc";
+                               reg = <0x298e0000 0x10000>;
+                               interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&cgc1 IMX8ULP_CLK_XBAR_DIVBUS>,
+                                        <&cgc1 IMX8ULP_CLK_NIC_PER_DIVPLAT>,
+                                        <&pcc4 IMX8ULP_CLK_USDHC1>;
+                               clock-names = "ipg", "ahb", "per";
+                               power-domains = <&scmi_devpd IMX8ULP_PD_USDHC1>;
+                               fsl,tuning-start-tap = <20>;
+                               fsl,tuning-step= <2>;
+                               bus-width = <4>;
+                               status = "disabled";
+                       };
+
+                       usdhc2: mmc@298f0000 {
+                               compatible = "fsl,imx8ulp-usdhc", "fsl,imx8mm-usdhc";
+                               reg = <0x298f0000 0x10000>;
+                               interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&cgc1 IMX8ULP_CLK_XBAR_DIVBUS>,
+                                        <&cgc1 IMX8ULP_CLK_NIC_PER_DIVPLAT>,
+                                        <&pcc4 IMX8ULP_CLK_USDHC2>;
+                               clock-names = "ipg", "ahb", "per";
+                               power-domains = <&scmi_devpd IMX8ULP_PD_USDHC2_USB1>;
+                               fsl,tuning-start-tap = <20>;
+                               fsl,tuning-step= <2>;
+                               bus-width = <4>;
+                               status = "disabled";
+                       };
+               };
+
+               gpioe: gpio@2d000000 {
+                               compatible = "fsl,imx8ulp-gpio", "fsl,imx7ulp-gpio";
+                               reg = <0x2d000080 0x1000>, <0x2d000040 0x40>;
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupts = <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pcc4 IMX8ULP_CLK_RGPIOE>,
+                                        <&pcc4 IMX8ULP_CLK_PCTLE>;
+                               clock-names = "gpio", "port";
+                               gpio-ranges = <&iomuxc1 0 32 24>;
+               };
+
+               gpiof: gpio@2d010000 {
+                               compatible = "fsl,imx8ulp-gpio", "fsl,imx7ulp-gpio";
+                               reg = <0x2d010080 0x1000>, <0x2d010040 0x40>;
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pcc4 IMX8ULP_CLK_RGPIOF>,
+                                        <&pcc4 IMX8ULP_CLK_PCTLF>;
+                               clock-names = "gpio", "port";
+                               gpio-ranges = <&iomuxc1 0 64 32>;
+               };
+
+               per_bridge5: bus@2d800000 {
+                       compatible = "simple-bus";
+                       reg = <0x2d800000 0x800000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       cgc2: clock-controller@2da60000 {
+                               compatible = "fsl,imx8ulp-cgc2";
+                               reg = <0x2da60000 0x10000>;
+                               clocks = <&sosc>, <&frosc>;
+                               clock-names = "sosc", "frosc";
+                               #clock-cells = <1>;
+                       };
+
+                       pcc5: clock-controller@2da70000 {
+                               compatible = "fsl,imx8ulp-pcc5";
+                               reg = <0x2da70000 0x10000>;
+                               #clock-cells = <1>;
+                       };
+               };
+
+               gpiod: gpio@2e200000 {
+                       compatible = "fsl,imx8ulp-gpio", "fsl,imx7ulp-gpio";
+                       reg = <0x2e200080 0x1000>, <0x2e200040 0x40>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+                       clocks = <&pcc5 IMX8ULP_CLK_RGPIOD>,
+                                <&pcc5 IMX8ULP_CLK_RGPIOD>;
+                       clock-names = "gpio", "port";
+                       gpio-ranges = <&iomuxc1 0 0 24>;
+               };
+       };
+};
diff --git a/arch/arm64/boot/dts/freescale/mba8mx.dtsi b/arch/arm64/boot/dts/freescale/mba8mx.dtsi
new file mode 100644 (file)
index 0000000..f27e3c8
--- /dev/null
@@ -0,0 +1,282 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright 2020-2021 TQ-Systems GmbH
+ */
+
+#include <dt-bindings/net/ti-dp83867.h>
+
+/* TQ-Systems GmbH MBa8Mx baseboard */
+
+/ {
+       beeper {
+               compatible = "pwm-beeper";
+               pwms = <&pwm4 0 250000 0>;
+               beeper-hz = <4000>;
+               amp-supply = <&reg_vcc_3v3>;
+       };
+
+       chosen {
+               // bootargs = "console=ttymxc2,115200 earlycon=ec_imx6q,0x30880000,115200";
+               stdout-path = &uart3;
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_gpiobutton>;
+               autorepeat;
+
+               switch1 {
+                       label = "switch1";
+                       linux,code = <BTN_0>;
+                       gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
+                       wakeup-source;
+               };
+
+               btn2: switch2 {
+                       label = "switch2";
+                       linux,code = <BTN_1>;
+                       gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+                       wakeup-source;
+               };
+
+               switch3 {
+                       label = "switch3";
+                       linux,code = <BTN_2>;
+                       gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
+                       wakeup-source;
+               };
+       };
+
+       gpio_leds: gpio-leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_gpioled>;
+
+               led1 {
+                       label = "led1";
+                       gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "default-on";
+               };
+
+               led2: led2 {
+                       label = "led2";
+                       gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+               };
+       };
+
+       reg_hub_vbus: regulator-hub-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "MBA8MX_HUB_VBUS";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+       };
+
+       reg_sn65dsi83_1v8: regulator-sn65dsi83-1v8 {
+               compatible = "regulator-fixed";
+               regulator-name = "SN65DSI83_1V8";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               gpio = <&expander0 5 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       reg_vcc_3v3: regulator-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "MBA8MX_3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
+       sound {
+               compatible = "fsl,imx-audio-tlv320aic32x4";
+               model = "tqm-tlv320aic32";
+               ssi-controller = <&sai3>;
+               audio-codec = <&tlv320aic3x04>;
+       };
+};
+
+&ecspi1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_ecspi1>;
+       cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
+       status = "okay";
+};
+
+&ecspi2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_ecspi2>;
+       cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
+       status = "okay";
+};
+
+&fec1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_fec1>;
+       phy-mode = "rgmii-id";
+       phy-handle = <&ethphy0>;
+       phy-supply = <&reg_vcc_3v3>;
+       fsl,magic-packet;
+       mac-address = [ 00 00 00 00 00 00 ];
+       status = "okay";
+
+       mdio {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               ethphy0: ethernet-phy@e {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <0xe>;
+                       ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_50_NS>;
+                       ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_50_NS>;
+                       ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+                       ti,dp83867-rxctrl-strap-quirk;
+                       ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
+                       enet-phy-lane-no-swap;
+                       reset-gpios = <&expander2 7 GPIO_ACTIVE_LOW>;
+                       reset-assert-us = <500000>;
+                       reset-deassert-us = <500>;
+               };
+       };
+};
+
+&i2c1 {
+       expander0: gpio@23 {
+               compatible = "nxp,pca9555";
+               reg = <0x23>;
+               gpio-controller;
+               #gpio-cells = <2>;
+               vcc-supply = <&reg_vcc_3v3>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+
+               sd-mux-oe-hog {
+                       gpio-hog;
+                       gpios = <8 0>;
+                       output-low;
+                       line-name = "SD_MUX_EN#";
+               };
+
+               boot-cfg-oe-hog {
+                       gpio-hog;
+                       gpios = <12 0>;
+                       output-high;
+                       line-name = "BOOT_CFG_OE#";
+               };
+
+               rst-usb-hub-hog {
+                       gpio-hog;
+                       gpios = <13 0>;
+                       output-high;
+                       line-name = "RST_USB_HUB#";
+               };
+       };
+
+       expander1: gpio@24 {
+               compatible = "nxp,pca9555";
+               reg = <0x24>;
+               gpio-controller;
+               #gpio-cells = <2>;
+               vcc-supply = <&reg_vcc_3v3>;
+       };
+};
+
+&i2c2 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default", "gpio";
+       pinctrl-0 = <&pinctrl_i2c2>;
+       pinctrl-1 = <&pinctrl_i2c2_gpio>;
+       scl-gpios = <&gpio5 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+       sda-gpios = <&gpio5 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+       status = "okay";
+
+       tlv320aic3x04: audio-codec@18 {
+               compatible = "ti,tlv320aic32x4";
+               reg = <0x18>;
+               reset-gpios = <&expander2 0 GPIO_ACTIVE_LOW>;
+               iov-supply = <&reg_vcc_3v3>;
+               ldoin-supply = <&reg_vcc_3v3>;
+       };
+
+       sensor1: sensor@1f {
+               compatible = "nxp,se97", "jedec,jc-42.4-temp";
+               reg = <0x1f>;
+       };
+
+       eeprom3: eeprom@57 {
+               compatible = "nxp,se97b", "atmel,24c02";
+               reg = <0x57>;
+               pagesize = <16>;
+       };
+};
+
+&i2c3 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default", "gpio";
+       pinctrl-0 = <&pinctrl_i2c3>;
+       pinctrl-1 = <&pinctrl_i2c3_gpio>;
+       scl-gpios = <&gpio5 18 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+       sda-gpios = <&gpio5 19 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+       status = "okay";
+};
+
+&pwm3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm3>;
+       status = "okay";
+};
+
+&pwm4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm4>;
+       status = "okay";
+};
+
+&sai3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_sai3>;
+       #sound-dai-cells = <0>;
+       assigned-clock-rates = <49152000>;
+       status = "okay";
+};
+
+&snvs_pwrkey {
+       status = "okay";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart1>;
+       status = "okay";
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart2>;
+       status = "okay";
+};
+
+/* console */
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart3>;
+       status = "okay";
+};
+
+/* UART4 is assigned to Cortex-M4 */
+&usdhc2 {
+       pinctrl-names = "default", "state_100mhz", "state_200mhz";
+       pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
+       pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>;
+       pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
+       bus-width = <4>;
+       cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
+       disable-wp;
+       no-mmc;
+       no-sdio;
+       vmmc-supply = <&reg_usdhc2_vmmc>;
+       status = "okay";
+};
index cc2dcab..57f8348 100644 (file)
                        reg = <0 0x200000>;
                };
                partition@200000 {
-                       label = "env";
-                       reg = <0x200000 0x40000>;
-               };
-               partition@240000 {
-                       label = "dtb";
-                       reg = <0x240000 0x40000>;
-               };
-               partition@280000 {
-                       label = "kernel";
-                       reg = <0x280000 0x2000000>;
-               };
-               partition@2280000 {
-                       label = "misc";
-                       reg = <0x2280000 0x2000000>;
-               };
-               partition@4280000 {
-                       label = "rootfs";
-                       reg = <0x4280000 0x3bd80000>;
+                       label = "root";
+                       reg = <0x200000 0x3fe00000>;
                };
        };
 };
index 01f1307..f3c1310 100644 (file)
        compatible = "intel,easic-n5x-clkmgr";
 };
 
+&gmac0 {
+       status = "okay";
+       phy-mode = "rgmii";
+       phy-handle = <&phy0>;
+
+       max-frame-size = <9000>;
+
+       mdio0 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "snps,dwmac-mdio";
+               phy0: ethernet-phy@0 {
+                       reg = <4>;
+
+                       txd0-skew-ps = <0>; /* -420ps */
+                       txd1-skew-ps = <0>; /* -420ps */
+                       txd2-skew-ps = <0>; /* -420ps */
+                       txd3-skew-ps = <0>; /* -420ps */
+                       rxd0-skew-ps = <420>; /* 0ps */
+                       rxd1-skew-ps = <420>; /* 0ps */
+                       rxd2-skew-ps = <420>; /* 0ps */
+                       rxd3-skew-ps = <420>; /* 0ps */
+                       txen-skew-ps = <0>; /* -420ps */
+                       txc-skew-ps = <900>; /* 0ps */
+                       rxdv-skew-ps = <420>; /* 0ps */
+                       rxc-skew-ps = <1680>; /* 780ps */
+               };
+       };
+};
+
 &mmc {
        status = "okay";
        cap-sd-highspeed;
        clock-frequency = <25000000>;
 };
 
+&qspi {
+       status = "okay";
+       flash@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "micron,mt25qu02g", "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <100000000>;
+
+               m25p,fast-read;
+               cdns,page-size = <256>;
+               cdns,block-size = <16>;
+               cdns,read-delay = <2>;
+               cdns,tshsl-ns = <50>;
+               cdns,tsd2d-ns = <50>;
+               cdns,tchsh-ns = <4>;
+               cdns,tslch-ns = <4>;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       qspi_boot: partition@0 {
+                               label = "Boot and fpga data";
+                               reg = <0x0 0x03FE0000>;
+                       };
+
+                       qspi_rootfs: partition@3FE0000 {
+                               label = "Root Filesystem - JFFS2";
+                               reg = <0x03FE0000 0x0C020000>;
+                       };
+               };
+       };
+};
+
 &uart0 {
        status = "okay";
 };
 
+&usb0 {
+       status = "okay";
+       disable-over-current;
+};
+
 &watchdog0 {
        status = "okay";
 };
index 9acc5d2..673f490 100644 (file)
                                            "lane2_sata_usb3";
                                #address-cells = <1>;
                                #size-cells = <0>;
+                               clocks = <&xtalclk>;
+                               clock-names = "xtal";
 
                                comphy0: phy@0 {
                                        reg = <0>;
index 505ae69..d9f9f2c 100644 (file)
@@ -17,6 +17,8 @@
                ethernet0 = &cp0_eth0;
                ethernet1 = &cp0_eth1;
                ethernet2 = &cp0_eth2;
+               gpio1 = &cp0_gpio1;
+               gpio2 = &cp0_gpio2;
        };
 
        memory@0 {
                enable-active-high;
                regulator-always-on;
        };
+
+       sfp: sfp {
+               compatible = "sff,sfp";
+               i2c-bus = <&cp0_i2c1>;
+               mod-def0-gpios = <&expander0 3 GPIO_ACTIVE_LOW>;
+               los-gpio = <&expander0 15 GPIO_ACTIVE_HIGH>;
+               tx-disable-gpio = <&expander0 2 GPIO_ACTIVE_HIGH>;
+               tx-fault-gpio = <&cp0_gpio1 24 GPIO_ACTIVE_HIGH>;
+               maximum-power-milliwatt = <3000>;
+               status = "okay";
+       };
 };
 
 &uart0 {
        };
 };
 
+&cp0_gpio1 {
+       status = "okay";
+};
+
+&cp0_gpio2 {
+       status = "okay";
+};
+
 &cp0_i2c0 {
        pinctrl-names = "default";
        pinctrl-0 = <&cp0_i2c0_pins>;
        phy0: ethernet-phy@0 {
                reg = <0>;
        };
+
+       switch6: switch0@6 {
+               /* Actual device is MV88E6393X */
+               compatible = "marvell,mv88e6190";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               reg = <6>;
+               interrupt-parent = <&cp0_gpio1>;
+               interrupts = <28 IRQ_TYPE_LEVEL_LOW>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+
+               dsa,member = <0 0>;
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@1 {
+                               reg = <1>;
+                               label = "p1";
+                               phy-handle = <&switch0phy1>;
+                       };
+
+                       port@2 {
+                               reg = <2>;
+                               label = "p2";
+                               phy-handle = <&switch0phy2>;
+                       };
+
+                       port@3 {
+                               reg = <3>;
+                               label = "p3";
+                               phy-handle = <&switch0phy3>;
+                       };
+
+                       port@4 {
+                               reg = <4>;
+                               label = "p4";
+                               phy-handle = <&switch0phy4>;
+                       };
+
+                       port@5 {
+                               reg = <5>;
+                               label = "p5";
+                               phy-handle = <&switch0phy5>;
+                       };
+
+                       port@6 {
+                               reg = <6>;
+                               label = "p6";
+                               phy-handle = <&switch0phy6>;
+                       };
+
+                       port@7 {
+                               reg = <7>;
+                               label = "p7";
+                               phy-handle = <&switch0phy7>;
+                       };
+
+                       port@8 {
+                               reg = <8>;
+                               label = "p8";
+                               phy-handle = <&switch0phy8>;
+                       };
+
+                       port@9 {
+                               reg = <9>;
+                               label = "p9";
+                               phy-mode = "10gbase-r";
+                               sfp = <&sfp>;
+                               managed = "in-band-status";
+                       };
+
+                       port@a {
+                               reg = <10>;
+                               label = "cpu";
+                               ethernet = <&cp0_eth0>;
+                       };
+
+               };
+
+               mdio {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       switch0phy1: switch0phy1@1 {
+                               reg = <0x1>;
+                       };
+
+                       switch0phy2: switch0phy2@2 {
+                               reg = <0x2>;
+                       };
+
+                       switch0phy3: switch0phy3@3 {
+                               reg = <0x3>;
+                       };
+
+                       switch0phy4: switch0phy4@4 {
+                               reg = <0x4>;
+                       };
+
+                       switch0phy5: switch0phy5@5 {
+                               reg = <0x5>;
+                       };
+
+                       switch0phy6: switch0phy6@6 {
+                               reg = <0x6>;
+                       };
+
+                       switch0phy7: switch0phy7@7 {
+                               reg = <0x7>;
+                       };
+
+                       switch0phy8: switch0phy8@8 {
+                               reg = <0x8>;
+                       };
+               };
+       };
 };
 
 &cp0_xmdio {
index a2b7e5e..327b041 100644 (file)
        model = "Marvell Armada CN9130 SoC";
        compatible = "marvell,cn9130", "marvell,armada-ap807-quad",
                     "marvell,armada-ap807";
+
+       aliases {
+               gpio1 = &cp0_gpio1;
+               gpio2 = &cp0_gpio2;
+               spi1 = &cp0_spi0;
+               spi2 = &cp0_spi1;
+       };
 };
 
 /*
 #undef CP11X_PCIE0_BASE
 #undef CP11X_PCIE1_BASE
 #undef CP11X_PCIE2_BASE
+
+&cp0_gpio1 {
+       status = "okay";
+};
+
+&cp0_gpio2 {
+       status = "okay";
+};
index 4f68ebe..8c1e180 100644 (file)
@@ -7,6 +7,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-bananapi-bpi-r64.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-rfb.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986b-rfb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8167-pumpkin.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-elm.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-elm-hana.dtb
@@ -14,16 +16,20 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-elm-hana-rev7.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-jacuzzi-burnet.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-jacuzzi-cozmo.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-jacuzzi-damu.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-jacuzzi-fennel-sku1.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-jacuzzi-fennel-sku6.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-jacuzzi-fennel-sku7.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-jacuzzi-fennel14.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-jacuzzi-fennel14-sku2.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-jacuzzi-juniper-sku16.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-jacuzzi-kappa.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-jacuzzi-kenzo.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-jacuzzi-willow-sku0.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-jacuzzi-willow-sku1.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-kakadu.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-kakadu-sku22.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-kodama-sku16.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-kodama-sku272.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-kodama-sku288.dtb
diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts
new file mode 100644 (file)
index 0000000..5cd760a
--- /dev/null
@@ -0,0 +1,57 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2021 MediaTek Inc.
+ * Author: Sam.Shih <sam.shih@mediatek.com>
+ */
+
+/dts-v1/;
+#include "mt7986a.dtsi"
+
+/ {
+       model = "MediaTek MT7986a RFB";
+       compatible = "mediatek,mt7986a-rfb";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       memory {
+               reg = <0 0x40000000 0 0x40000000>;
+       };
+};
+
+&uart0 {
+       status = "okay";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_pins>;
+       status = "okay";
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart2_pins>;
+       status = "okay";
+};
+
+&pio {
+       uart1_pins: uart1-pins {
+               mux {
+                       function = "uart";
+                       groups = "uart1";
+               };
+       };
+
+       uart2_pins: uart2-pins {
+               mux {
+                       function = "uart";
+                       groups = "uart2";
+               };
+       };
+};
diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
new file mode 100644 (file)
index 0000000..b8da76b
--- /dev/null
@@ -0,0 +1,169 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2021 MediaTek Inc.
+ * Author: Sam.Shih <sam.shih@mediatek.com>
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+       interrupt-parent = <&gic>;
+       #address-cells = <2>;
+       #size-cells = <2>;
+
+       system_clk: dummy40m {
+               compatible = "fixed-clock";
+               clock-frequency = <40000000>;
+               #clock-cells = <0>;
+       };
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               cpu0: cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53";
+                       enable-method = "psci";
+                       reg = <0x0>;
+                       #cooling-cells = <2>;
+               };
+
+               cpu1: cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53";
+                       enable-method = "psci";
+                       reg = <0x1>;
+                       #cooling-cells = <2>;
+               };
+
+               cpu2: cpu@2 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53";
+                       enable-method = "psci";
+                       reg = <0x2>;
+                       #cooling-cells = <2>;
+               };
+
+               cpu3: cpu@3 {
+                       device_type = "cpu";
+                       enable-method = "psci";
+                       compatible = "arm,cortex-a53";
+                       reg = <0x3>;
+                       #cooling-cells = <2>;
+               };
+       };
+
+       psci {
+               compatible  = "arm,psci-0.2";
+               method      = "smc";
+       };
+
+       reserved-memory {
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+               /* 192 KiB reserved for ARM Trusted Firmware (BL31) */
+               secmon_reserved: secmon@43000000 {
+                       reg = <0 0x43000000 0 0x30000>;
+                       no-map;
+               };
+       };
+
+       timer {
+               compatible = "arm,armv8-timer";
+               interrupt-parent = <&gic>;
+               interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
+                            <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
+                            <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
+                            <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
+       };
+
+       soc {
+               #address-cells = <2>;
+               #size-cells = <2>;
+               compatible = "simple-bus";
+               ranges;
+
+               gic: interrupt-controller@c000000 {
+                       compatible = "arm,gic-v3";
+                       #interrupt-cells = <3>;
+                       interrupt-parent = <&gic>;
+                       interrupt-controller;
+                       reg = <0 0x0c000000 0 0x10000>,  /* GICD */
+                             <0 0x0c080000 0 0x80000>,  /* GICR */
+                             <0 0x0c400000 0 0x2000>,   /* GICC */
+                             <0 0x0c410000 0 0x1000>,   /* GICH */
+                             <0 0x0c420000 0 0x2000>;   /* GICV */
+                       interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
+               };
+
+               watchdog: watchdog@1001c000 {
+                       compatible = "mediatek,mt7986-wdt",
+                                    "mediatek,mt6589-wdt";
+                       reg = <0 0x1001c000 0 0x1000>;
+                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+                       #reset-cells = <1>;
+                       status = "disabled";
+               };
+
+               pio: pinctrl@1001f000 {
+                       compatible = "mediatek,mt7986a-pinctrl";
+                       reg = <0 0x1001f000 0 0x1000>,
+                             <0 0x11c30000 0 0x1000>,
+                             <0 0x11c40000 0 0x1000>,
+                             <0 0x11e20000 0 0x1000>,
+                             <0 0x11e30000 0 0x1000>,
+                             <0 0x11f00000 0 0x1000>,
+                             <0 0x11f10000 0 0x1000>,
+                             <0 0x1000b000 0 0x1000>;
+                       reg-names = "gpio", "iocfg_rt", "iocfg_rb", "iocfg_lt",
+                                   "iocfg_lb", "iocfg_tr", "iocfg_tl", "eint";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       gpio-ranges = <&pio 0 0 100>;
+                       interrupt-controller;
+                       interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-parent = <&gic>;
+                       #interrupt-cells = <2>;
+               };
+
+               trng: trng@1020f000 {
+                       compatible = "mediatek,mt7986-rng",
+                                    "mediatek,mt7623-rng";
+                       reg = <0 0x1020f000 0 0x100>;
+                       clocks = <&system_clk>;
+                       clock-names = "rng";
+                       status = "disabled";
+               };
+
+               uart0: serial@11002000 {
+                       compatible = "mediatek,mt7986-uart",
+                                    "mediatek,mt6577-uart";
+                       reg = <0 0x11002000 0 0x400>;
+                       interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&system_clk>;
+                       status = "disabled";
+               };
+
+               uart1: serial@11003000 {
+                       compatible = "mediatek,mt7986-uart",
+                                    "mediatek,mt6577-uart";
+                       reg = <0 0x11003000 0 0x400>;
+                       interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&system_clk>;
+                       status = "disabled";
+               };
+
+               uart2: serial@11004000 {
+                       compatible = "mediatek,mt7986-uart",
+                                    "mediatek,mt6577-uart";
+                       reg = <0 0x11004000 0 0x400>;
+                       interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&system_clk>;
+                       status = "disabled";
+               };
+
+       };
+
+};
diff --git a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts b/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts
new file mode 100644 (file)
index 0000000..5fb752e
--- /dev/null
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2021 MediaTek Inc.
+ * Author: Sam.Shih <sam.shih@mediatek.com>
+ */
+
+/dts-v1/;
+#include "mt7986b.dtsi"
+
+/ {
+       model = "MediaTek MT7986b RFB";
+       compatible = "mediatek,mt7986b-rfb";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       memory {
+               reg = <0 0x40000000 0 0x40000000>;
+       };
+};
+
+&uart0 {
+       status = "okay";
+};
diff --git a/arch/arm64/boot/dts/mediatek/mt7986b.dtsi b/arch/arm64/boot/dts/mediatek/mt7986b.dtsi
new file mode 100644 (file)
index 0000000..23923b9
--- /dev/null
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2021 MediaTek Inc.
+ * Author: Sam.Shih <sam.shih@mediatek.com>
+ */
+
+#include "mt7986a.dtsi"
+
+&pio {
+       compatible = "mediatek,mt7986b-pinctrl";
+       gpio-ranges = <&pio 0 0 41>, <&pio 66 66 35>;
+};
index e666ebb..9c75fbb 100644 (file)
@@ -28,7 +28,7 @@
                enable-gpios = <&pio 95 GPIO_ACTIVE_HIGH>;
 
                pinctrl-names = "default";
-               pinctrl-0 = <&disp_pwm0_pins>;
+               pinctrl-0 = <&panel_backlight_en_pins>;
                status = "okay";
        };
 
                };
        };
 
+       panel_backlight_en_pins: panel_backlight_en_pins {
+               pins1 {
+                       pinmux = <MT8173_PIN_95_PCM_TX__FUNC_GPIO95>;
+               };
+       };
+
        panel_fixed_pins: panel_fixed_pins {
                pins1 {
                        pinmux = <MT8173_PIN_41_CMMCLK__FUNC_GPIO41>;
 };
 
 &pwm0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&disp_pwm0_pins>;
        status = "okay";
 };
 
index dee66e5..2b7d331 100644 (file)
                        interrupts = <GIC_SPI 191 IRQ_TYPE_LEVEL_LOW>;
                        power-domains = <&spm MT8173_POWER_DOMAIN_MM>;
                        clocks = <&mmsys CLK_MM_DISP_UFOE>;
+                       mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0xa000 0x1000>;
                };
 
                dsi0: dsi@1401b000 {
                        compatible = "mediatek,mt8173-disp-od";
                        reg = <0 0x14023000 0 0x1000>;
                        clocks = <&mmsys CLK_MM_DISP_OD>;
+                       mediatek,gce-client-reg = <&gce SUBSYS_1402XXXX 0x3000 0x1000>;
                };
 
                hdmi0: hdmi@14025000 {
index 7bc0a6a..f3fd3cc 100644 (file)
                        no-map;
                };
        };
+
+       ntc@0 {
+               compatible = "murata,ncp03wf104";
+               pullup-uv = <1800000>;
+               pullup-ohm = <390000>;
+               pulldown-ohm = <0>;
+               io-channels = <&auxadc 0>;
+       };
 };
 
 &auxadc {
diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-cozmo.dts b/arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-cozmo.dts
new file mode 100644 (file)
index 0000000..072133f
--- /dev/null
@@ -0,0 +1,36 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2021 Google LLC
+ */
+
+/dts-v1/;
+#include "mt8183-kukui-jacuzzi.dtsi"
+#include "mt8183-kukui-audio-ts3a227e-max98357a.dtsi"
+
+/ {
+       model = "Google cozmo board";
+       compatible = "google,cozmo", "mediatek,mt8183";
+};
+
+&i2c_tunnel {
+       google,remote-bus = <0>;
+};
+
+&i2c2 {
+       trackpad@2c {
+               compatible = "hid-over-i2c";
+               reg = <0x2c>;
+               hid-descr-addr = <0x20>;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&trackpad_pins>;
+
+               interrupts-extended = <&pio 7 IRQ_TYPE_LEVEL_LOW>;
+
+               wakeup-source;
+       };
+};
+
+&qca_wifi {
+       qcom,ath10k-calibration-variant = "GO_COZMO";
+};
index ef6257c..dec11a4 100644 (file)
@@ -5,6 +5,7 @@
 
 /dts-v1/;
 #include "mt8183-kukui-jacuzzi-fennel.dtsi"
+#include "mt8183-kukui-audio-da7219-rt1015p.dtsi"
 
 / {
        model = "Google fennel sku1 board";
index 899c2e4..37e6e58 100644 (file)
@@ -5,6 +5,7 @@
 
 /dts-v1/;
 #include "mt8183-kukui-jacuzzi-fennel.dtsi"
+#include "mt8183-kukui-audio-da7219-rt1015p.dtsi"
 
 / {
        model = "Google fennel sku6 board";
diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku7.dts b/arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku7.dts
new file mode 100644 (file)
index 0000000..0e09604
--- /dev/null
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2021 Google LLC
+ */
+
+/dts-v1/;
+#include "mt8183-kukui-jacuzzi-fennel.dtsi"
+#include "mt8183-kukui-audio-ts3a227e-rt1015p.dtsi"
+
+/ {
+       model = "Google fennel sku7 board";
+       compatible = "google,fennel-sku7", "google,fennel", "mediatek,mt8183";
+};
+
+&touchscreen {
+       status = "okay";
+
+       compatible = "hid-over-i2c";
+       reg = <0x10>;
+       interrupt-parent = <&pio>;
+       interrupts = <155 IRQ_TYPE_LEVEL_LOW>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&touchscreen_pins>;
+
+       post-power-on-delay-ms = <10>;
+       hid-descr-addr = <0x0001>;
+};
+
+
+&qca_wifi {
+       qcom,ath10k-calibration-variant = "GO_FENNEL";
+};
+
index 577519a..bbe6c33 100644 (file)
@@ -5,7 +5,6 @@
 
 /dts-v1/;
 #include "mt8183-kukui-jacuzzi.dtsi"
-#include "mt8183-kukui-audio-da7219-rt1015p.dtsi"
 
 &mt6358codec {
        mediatek,dmic-mode = <1>; /* one-wire */
diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel14-sku2.dts b/arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel14-sku2.dts
new file mode 100644 (file)
index 0000000..3fc5a61
--- /dev/null
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2021 Google LLC
+ */
+
+/dts-v1/;
+#include "mt8183-kukui-jacuzzi-fennel.dtsi"
+#include "mt8183-kukui-audio-ts3a227e-rt1015p.dtsi"
+
+/ {
+       model = "Google fennel14 sku2 board";
+       compatible = "google,fennel-sku2", "google,fennel", "mediatek,mt8183";
+};
+
+&qca_wifi {
+       qcom,ath10k-calibration-variant = "GO_FENNEL14";
+};
index e8c41f6..23ad0b9 100644 (file)
@@ -5,6 +5,7 @@
 
 /dts-v1/;
 #include "mt8183-kukui-jacuzzi-fennel.dtsi"
+#include "mt8183-kukui-audio-da7219-rt1015p.dtsi"
 
 / {
        model = "Google fennel14 sku0 board";
index d8826c8..8f7bf33 100644 (file)
@@ -9,7 +9,6 @@
        panel: panel {
                compatible = "auo,b116xw03";
                power-supply = <&pp3300_panel>;
-               ddc-i2c-bus = <&i2c4>;
                backlight = <&backlight_lcd0>;
 
                port {
diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui-kakadu-sku22.dts b/arch/arm64/boot/dts/mediatek/mt8183-kukui-kakadu-sku22.dts
new file mode 100644 (file)
index 0000000..3a724e6
--- /dev/null
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2021 Google LLC
+ */
+
+/dts-v1/;
+#include "mt8183-kukui-kakadu.dtsi"
+#include "mt8183-kukui-audio-rt1015p.dtsi"
+
+/ {
+       model = "MediaTek kakadu board sku22";
+       compatible = "google,kakadu-rev3-sku22", "google,kakadu-rev2-sku22",
+                    "google,kakadu", "mediatek,mt8183";
+};
+
+&sound {
+       compatible = "mediatek,mt8183_mt6358_ts3a227_rt1015p";
+};
+
index b42d81d..0f9480f 100644 (file)
                #thermal-sensor-cells = <0>;
                io-channels = <&auxadc 0>;
                io-channel-names = "sensor-channel";
-               temperature-lookup-table = <    (-5000) 4241
-                                               0 4063
-                                               5000 3856
-                                               10000 3621
-                                               15000 3364
-                                               20000 3091
-                                               25000 2810
-                                               30000 2526
-                                               35000 2247
-                                               40000 1982
-                                               45000 1734
-                                               50000 1507
-                                               55000 1305
-                                               60000 1122
-                                               65000 964
-                                               70000 827
-                                               75000 710
-                                               80000 606
-                                               85000 519
-                                               90000 445
-                                               95000 382
-                                               100000 330
-                                               105000 284
-                                               110000 245
-                                               115000 213
-                                               120000 183
-                                               125000 161>;
+               temperature-lookup-table = <    (-5000) 1553
+                                               0 1488
+                                               5000 1412
+                                               10000 1326
+                                               15000 1232
+                                               20000 1132
+                                               25000 1029
+                                               30000 925
+                                               35000 823
+                                               40000 726
+                                               45000 635
+                                               50000 552
+                                               55000 478
+                                               60000 411
+                                               65000 353
+                                               70000 303
+                                               75000 260
+                                               80000 222
+                                               85000 190
+                                               90000 163
+                                               95000 140
+                                               100000 121
+                                               105000 104
+                                               110000 90
+                                               115000 78
+                                               120000 67
+                                               125000 59>;
        };
 
        tboard_thermistor2: thermal-sensor2 {
                #thermal-sensor-cells = <0>;
                io-channels = <&auxadc 1>;
                io-channel-names = "sensor-channel";
-               temperature-lookup-table = <    (-5000) 4241
-                                               0 4063
-                                               5000 3856
-                                               10000 3621
-                                               15000 3364
-                                               20000 3091
-                                               25000 2810
-                                               30000 2526
-                                               35000 2247
-                                               40000 1982
-                                               45000 1734
-                                               50000 1507
-                                               55000 1305
-                                               60000 1122
-                                               65000 964
-                                               70000 827
-                                               75000 710
-                                               80000 606
-                                               85000 519
-                                               90000 445
-                                               95000 382
-                                               100000 330
-                                               105000 284
-                                               110000 245
-                                               115000 213
-                                               120000 183
-                                               125000 161>;
+               temperature-lookup-table = <    (-5000) 1553
+                                               0 1488
+                                               5000 1412
+                                               10000 1326
+                                               15000 1232
+                                               20000 1132
+                                               25000 1029
+                                               30000 925
+                                               35000 823
+                                               40000 726
+                                               45000 635
+                                               50000 552
+                                               55000 478
+                                               60000 411
+                                               65000 353
+                                               70000 303
+                                               75000 260
+                                               80000 222
+                                               85000 190
+                                               90000 163
+                                               95000 140
+                                               100000 121
+                                               105000 104
+                                               110000 90
+                                               115000 78
+                                               120000 67
+                                               125000 59>;
        };
 };
 
 
        cros_ec {
                compatible = "google,cros-ec-rpmsg";
-               mtk,rpmsg-name = "cros-ec-rpmsg";
+               mediatek,rpmsg-name = "cros-ec-rpmsg";
        };
 };
 
                cbas {
                        compatible = "google,cros-cbas";
                };
+
+               typec {
+                       compatible = "google,cros-ec-typec";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       usb_c0: connector@0 {
+                               compatible = "usb-c-connector";
+                               reg = <0>;
+                               power-role = "dual";
+                               data-role = "host";
+                               try-power-role = "sink";
+                       };
+               };
        };
 };
 
index ba4584f..00f2ddd 100644 (file)
                        reg = <0 0x0c530a80 0 0x50>;
                };
 
+               cpu_debug0: cpu-debug@d410000 {
+                       compatible = "arm,coresight-cpu-debug", "arm,primecell";
+                       reg = <0x0 0xd410000 0x0 0x1000>;
+                       clocks = <&infracfg CLK_INFRA_DEBUGSYS>;
+                       clock-names = "apb_pclk";
+                       cpu = <&cpu0>;
+               };
+
+               cpu_debug1: cpu-debug@d510000 {
+                       compatible = "arm,coresight-cpu-debug", "arm,primecell";
+                       reg = <0x0 0xd510000 0x0 0x1000>;
+                       clocks = <&infracfg CLK_INFRA_DEBUGSYS>;
+                       clock-names = "apb_pclk";
+                       cpu = <&cpu1>;
+               };
+
+               cpu_debug2: cpu-debug@d610000 {
+                       compatible = "arm,coresight-cpu-debug", "arm,primecell";
+                       reg = <0x0 0xd610000 0x0 0x1000>;
+                       clocks = <&infracfg CLK_INFRA_DEBUGSYS>;
+                       clock-names = "apb_pclk";
+                       cpu = <&cpu2>;
+               };
+
+               cpu_debug3: cpu-debug@d710000 {
+                       compatible = "arm,coresight-cpu-debug", "arm,primecell";
+                       reg = <0x0 0xd710000 0x0 0x1000>;
+                       clocks = <&infracfg CLK_INFRA_DEBUGSYS>;
+                       clock-names = "apb_pclk";
+                       cpu = <&cpu3>;
+               };
+
+               cpu_debug4: cpu-debug@d810000 {
+                       compatible = "arm,coresight-cpu-debug", "arm,primecell";
+                       reg = <0x0 0xd810000 0x0 0x1000>;
+                       clocks = <&infracfg CLK_INFRA_DEBUGSYS>;
+                       clock-names = "apb_pclk";
+                       cpu = <&cpu4>;
+               };
+
+               cpu_debug5: cpu-debug@d910000 {
+                       compatible = "arm,coresight-cpu-debug", "arm,primecell";
+                       reg = <0x0 0xd910000 0x0 0x1000>;
+                       clocks = <&infracfg CLK_INFRA_DEBUGSYS>;
+                       clock-names = "apb_pclk";
+                       cpu = <&cpu5>;
+               };
+
+               cpu_debug6: cpu-debug@da10000 {
+                       compatible = "arm,coresight-cpu-debug", "arm,primecell";
+                       reg = <0x0 0xda10000 0x0 0x1000>;
+                       clocks = <&infracfg CLK_INFRA_DEBUGSYS>;
+                       clock-names = "apb_pclk";
+                       cpu = <&cpu6>;
+               };
+
+               cpu_debug7: cpu-debug@db10000 {
+                       compatible = "arm,coresight-cpu-debug", "arm,primecell";
+                       reg = <0x0 0xdb10000 0x0 0x1000>;
+                       clocks = <&infracfg CLK_INFRA_DEBUGSYS>;
+                       clock-names = "apb_pclk";
+                       cpu = <&cpu7>;
+               };
+
                topckgen: syscon@10000000 {
                        compatible = "mediatek,mt8183-topckgen", "syscon";
                        reg = <0 0x10000000 0 0x1000>;
index c7c7d4e..53d790c 100644 (file)
                        #clock-cells = <1>;
                };
 
-               i2c3: i2c3@11cb0000 {
+               i2c3: i2c@11cb0000 {
                        compatible = "mediatek,mt8192-i2c";
                        reg = <0 0x11cb0000 0 0x1000>,
                              <0 0x10217300 0 0x80>;
                        #clock-cells = <1>;
                };
 
-               i2c7: i2c7@11d00000 {
+               i2c7: i2c@11d00000 {
                        compatible = "mediatek,mt8192-i2c";
                        reg = <0 0x11d00000 0 0x1000>,
                              <0 0x10217600 0 0x180>;
                        status = "disabled";
                };
 
-               i2c8: i2c8@11d01000 {
+               i2c8: i2c@11d01000 {
                        compatible = "mediatek,mt8192-i2c";
                        reg = <0 0x11d01000 0 0x1000>,
                              <0 0x10217780 0 0x180>;
                        status = "disabled";
                };
 
-               i2c9: i2c9@11d02000 {
+               i2c9: i2c@11d02000 {
                        compatible = "mediatek,mt8192-i2c";
                        reg = <0 0x11d02000 0 0x1000>,
                              <0 0x10217900 0 0x180>;
                        #clock-cells = <1>;
                };
 
-               i2c1: i2c1@11d20000 {
+               i2c1: i2c@11d20000 {
                        compatible = "mediatek,mt8192-i2c";
                        reg = <0 0x11d20000 0 0x1000>,
                              <0 0x10217100 0 0x80>;
                        status = "disabled";
                };
 
-               i2c2: i2c2@11d21000 {
+               i2c2: i2c@11d21000 {
                        compatible = "mediatek,mt8192-i2c";
                        reg = <0 0x11d21000 0 0x1000>,
                              <0 0x10217180 0 0x180>;
                        status = "disabled";
                };
 
-               i2c4: i2c4@11d22000 {
+               i2c4: i2c@11d22000 {
                        compatible = "mediatek,mt8192-i2c";
                        reg = <0 0x11d22000 0 0x1000>,
                              <0 0x10217380 0 0x180>;
                        #clock-cells = <1>;
                };
 
-               i2c5: i2c5@11e00000 {
+               i2c5: i2c@11e00000 {
                        compatible = "mediatek,mt8192-i2c";
                        reg = <0 0x11e00000 0 0x1000>,
                              <0 0x10217500 0 0x80>;
                        #clock-cells = <1>;
                };
 
-               i2c0: i2c0@11f00000 {
+               i2c0: i2c@11f00000 {
                        compatible = "mediatek,mt8192-i2c";
                        reg = <0 0x11f00000 0 0x1000>,
                              <0 0x10217080 0 0x80>;
                        status = "disabled";
                };
 
-               i2c6: i2c6@11f01000 {
+               i2c6: i2c@11f01000 {
                        compatible = "mediatek,mt8192-i2c";
                        reg = <0 0x11f01000 0 0x1000>,
                              <0 0x10217580 0 0x80>;
index bbe5a14..d1b67c8 100644 (file)
                        reg = <0 0x11009000 0 0x90>,
                              <0 0x11000180 0 0x80>;
                        interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_LOW>;
-                       clocks = <&topckgen CLK_TOP_AHB_INFRA_D2>,
-                                <&infracfg CLK_IFR_I2C0_SEL>,
-                                <&topckgen CLK_TOP_I2C0>,
+                       clocks = <&topckgen CLK_TOP_I2C0>,
                                 <&topckgen CLK_TOP_APDMA>;
-                       clock-names = "main-source",
-                                     "main-sel",
-                                     "main",
-                                     "dma";
+                       clock-names = "main", "dma";
                        #address-cells = <1>;
                        #size-cells = <0>;
                        status = "disabled";
                        reg = <0 0x1100a000 0 0x90>,
                              <0 0x11000200 0 0x80>;
                        interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_LOW>;
-                       clocks = <&topckgen CLK_TOP_AHB_INFRA_D2>,
-                                <&infracfg CLK_IFR_I2C1_SEL>,
-                                <&topckgen CLK_TOP_I2C1>,
+                       clocks = <&topckgen CLK_TOP_I2C1>,
                                 <&topckgen CLK_TOP_APDMA>;
-                       clock-names = "main-source",
-                                     "main-sel",
-                                     "main",
-                                     "dma";
+                       clock-names = "main", "dma";
                        #address-cells = <1>;
                        #size-cells = <0>;
                        status = "disabled";
                        reg = <0 0x1100b000 0 0x90>,
                              <0 0x11000280 0 0x80>;
                        interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_LOW>;
-                       clocks = <&topckgen CLK_TOP_AHB_INFRA_D2>,
-                                <&infracfg CLK_IFR_I2C2_SEL>,
-                                <&topckgen CLK_TOP_I2C2>,
+                       clocks = <&topckgen CLK_TOP_I2C2>,
                                 <&topckgen CLK_TOP_APDMA>;
-                       clock-names = "main-source",
-                                     "main-sel",
-                                     "main",
-                                     "dma";
+                       clock-names = "main", "dma";
                        #address-cells = <1>;
                        #size-cells = <0>;
                        status = "disabled";
index c80f7dc..ea3f338 100644 (file)
@@ -12,3 +12,4 @@ dtb-$(CONFIG_ARCH_TEGRA_194_SOC) += tegra194-p2972-0000.dtb
 dtb-$(CONFIG_ARCH_TEGRA_194_SOC) += tegra194-p3509-0000+p3668-0000.dtb
 dtb-$(CONFIG_ARCH_TEGRA_194_SOC) += tegra194-p3509-0000+p3668-0001.dtb
 dtb-$(CONFIG_ARCH_TEGRA_234_SOC) += tegra234-sim-vdk.dtb
+dtb-$(CONFIG_ARCH_TEGRA_234_SOC) += tegra234-p3737-0000+p3701-0000.dtb
index 8a51751..f16acb4 100644 (file)
                        pinctrl-names = "default";
                        pinctrl-0 = <&as3722_default>;
 
-                       as3722_default: pinmux@0 {
+                       as3722_default: pinmux {
                                gpio0 {
                                        pins = "gpio0";
                                        function = "gpio";
 
                                google,remote-bus = <0>;
 
-                               charger: bq24735 {
+                               charger: bq24735@9 {
                                        compatible = "ti,bq24735";
                                        reg = <0x9>;
                                        interrupt-parent = <&gpio>;
                                                        GPIO_ACTIVE_HIGH>;
                                };
 
-                               battery: smart-battery {
+                               battery: smart-battery@b {
                                        compatible = "sbs,sbs-battery";
                                        reg = <0xb>;
                                        sbs,i2c-retry-count = <2>;
        pmc@7000e400 {
                nvidia,invert-interrupt;
                nvidia,suspend-mode = <0>;
-               #wake-cells = <3>;
                nvidia,cpu-pwr-good-time = <500>;
                nvidia,cpu-pwr-off-time = <300>;
                nvidia,core-pwr-good-time = <641 3845>;
                nvidia,core-pwr-off-time = <61036>;
                nvidia,core-power-req-active-high;
                nvidia,sys-clock-req-active-high;
-               nvidia,reset-gpio = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>;
        };
 
        usb@70090000 {
                default-brightness-level = <6>;
        };
 
-       clk32k_in: clock@0 {
+       clk32k_in: clock-32k {
                compatible = "fixed-clock";
                clock-frequency = <32768>;
                #clock-cells = <0>;
                ddc-i2c-bus = <&dpaux>;
        };
 
-       vdd_mux: regulator@0 {
+       vdd_mux: regulator-vdd-mux {
                compatible = "regulator-fixed";
                regulator-name = "+VDD_MUX";
                regulator-min-microvolt = <19000000>;
                regulator-boot-on;
        };
 
-       vdd_5v0_sys: regulator@1 {
+       vdd_5v0_sys: regulator-vdd-5v0-sys {
                compatible = "regulator-fixed";
                regulator-name = "+5V_SYS";
                regulator-min-microvolt = <5000000>;
                vin-supply = <&vdd_mux>;
        };
 
-       vdd_3v3_sys: regulator@2 {
+       vdd_3v3_sys: regulator-vdd-3v3-sys {
                compatible = "regulator-fixed";
                regulator-name = "+3.3V_SYS";
                regulator-min-microvolt = <3300000>;
                vin-supply = <&vdd_mux>;
        };
 
-       vdd_3v3_run: regulator@3 {
+       vdd_3v3_run: regulator-vdd-3v3-run {
                compatible = "regulator-fixed";
                regulator-name = "+3.3V_RUN";
                regulator-min-microvolt = <3300000>;
                vin-supply = <&vdd_3v3_sys>;
        };
 
-       vdd_3v3_hdmi: regulator@4 {
+       vdd_3v3_hdmi: regulator-vdd-3v3-hdmi {
                compatible = "regulator-fixed";
                regulator-name = "+3.3V_AVDD_HDMI_AP_GATED";
                regulator-min-microvolt = <3300000>;
                vin-supply = <&vdd_3v3_run>;
        };
 
-       vdd_led: regulator@5 {
+       vdd_led: regulator-vdd-led {
                compatible = "regulator-fixed";
                regulator-name = "+VDD_LED";
                regulator-min-microvolt = <3300000>;
                vin-supply = <&vdd_mux>;
        };
 
-       vdd_usb1_vbus: regulator@6 {
+       vdd_usb1_vbus: regulator-vdd-usb1-vbus {
                compatible = "regulator-fixed";
                regulator-name = "+5V_USB_HS";
                regulator-min-microvolt = <5000000>;
                vin-supply = <&vdd_5v0_sys>;
        };
 
-       vdd_usb3_vbus: regulator@7 {
+       vdd_usb3_vbus: regulator-vdd-usb3-vbus {
                compatible = "regulator-fixed";
                regulator-name = "+5V_USB_SS";
                regulator-min-microvolt = <5000000>;
                vin-supply = <&vdd_5v0_sys>;
        };
 
-       vdd_3v3_panel: regulator@8 {
+       vdd_3v3_panel: regulator-vdd-3v3-panel {
                compatible = "regulator-fixed";
                regulator-name = "+3.3V_PANEL";
                regulator-min-microvolt = <3300000>;
                vin-supply = <&vdd_3v3_sys>;
        };
 
-       vdd_hdmi_pll: regulator@9 {
+       vdd_hdmi_pll: regulator-vdd-hdmi-pll {
                compatible = "regulator-fixed";
                regulator-name = "+1.05V_RUN_AVDD_HDMI_PLL_AP_GATE";
                regulator-min-microvolt = <1050000>;
                vin-supply = <&vdd_1v05_run>;
        };
 
-       vdd_5v0_hdmi: regulator@10 {
+       vdd_5v0_hdmi: regulator-vdd-5v0-hdmi {
                compatible = "regulator-fixed";
                regulator-name = "+5V_HDMI_CON";
                regulator-min-microvolt = <5000000>;
                vin-supply = <&vdd_5v0_sys>;
        };
 
-       vdd_5v0_ts: regulator@11 {
+       vdd_5v0_ts: regulator-vdd-5v0-ts {
                compatible = "regulator-fixed";
                regulator-name = "+5V_VDD_TS";
                regulator-min-microvolt = <5000000>;
                enable-active-high;
        };
 
-       vdd_3v3_lp0: regulator@12 {
+       vdd_3v3_lp0: regulator-vdd-3v3-lp0 {
                compatible = "regulator-fixed";
                regulator-name = "+3.3V_LP0";
                regulator-min-microvolt = <3300000>;
diff --git a/arch/arm64/boot/dts/nvidia/tegra132-peripherals-opp.dtsi b/arch/arm64/boot/dts/nvidia/tegra132-peripherals-opp.dtsi
new file mode 100644 (file)
index 0000000..66ffb7f
--- /dev/null
@@ -0,0 +1,426 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/ {
+       /* EMC DVFS OPP table */
+       emc_icc_dvfs_opp_table: opp-table-dvfs0 {
+               compatible = "operating-points-v2";
+
+               opp-12750000-800 {
+                       opp-microvolt = <800000 800000 1150000>;
+                       opp-hz = /bits/ 64 <12750000>;
+                       opp-supported-hw = <0x0003>;
+               };
+
+               opp-12750000-950 {
+                       opp-microvolt = <950000 950000 1150000>;
+                       opp-hz = /bits/ 64 <12750000>;
+                       opp-supported-hw = <0x0008>;
+               };
+
+               opp-12750000-1050 {
+                       opp-microvolt = <1050000 1050000 1150000>;
+                       opp-hz = /bits/ 64 <12750000>;
+                       opp-supported-hw = <0x0010>;
+               };
+
+               opp-12750000-1110 {
+                       opp-microvolt = <1110000 1110000 1150000>;
+                       opp-hz = /bits/ 64 <12750000>;
+                       opp-supported-hw = <0x0004>;
+               };
+
+               opp-20400000-800 {
+                       opp-microvolt = <800000 800000 1150000>;
+                       opp-hz = /bits/ 64 <20400000>;
+                       opp-supported-hw = <0x0003>;
+               };
+
+               opp-20400000-950 {
+                       opp-microvolt = <950000 950000 1150000>;
+                       opp-hz = /bits/ 64 <20400000>;
+                       opp-supported-hw = <0x0008>;
+               };
+
+               opp-20400000-1050 {
+                       opp-microvolt = <1050000 1050000 1150000>;
+                       opp-hz = /bits/ 64 <20400000>;
+                       opp-supported-hw = <0x0010>;
+               };
+
+               opp-20400000-1110 {
+                       opp-microvolt = <1110000 1110000 1150000>;
+                       opp-hz = /bits/ 64 <20400000>;
+                       opp-supported-hw = <0x0004>;
+               };
+
+               opp-40800000-800 {
+                       opp-microvolt = <800000 800000 1150000>;
+                       opp-hz = /bits/ 64 <40800000>;
+                       opp-supported-hw = <0x0003>;
+               };
+
+               opp-40800000-950 {
+                       opp-microvolt = <950000 950000 1150000>;
+                       opp-hz = /bits/ 64 <40800000>;
+                       opp-supported-hw = <0x0008>;
+               };
+
+               opp-40800000-1050 {
+                       opp-microvolt = <1050000 1050000 1150000>;
+                       opp-hz = /bits/ 64 <40800000>;
+                       opp-supported-hw = <0x0010>;
+               };
+
+               opp-40800000-1110 {
+                       opp-microvolt = <1110000 1110000 1150000>;
+                       opp-hz = /bits/ 64 <40800000>;
+                       opp-supported-hw = <0x0004>;
+               };
+
+               opp-68000000-800 {
+                       opp-microvolt = <800000 800000 1150000>;
+                       opp-hz = /bits/ 64 <68000000>;
+                       opp-supported-hw = <0x0003>;
+               };
+
+               opp-68000000-950 {
+                       opp-microvolt = <950000 950000 1150000>;
+                       opp-hz = /bits/ 64 <68000000>;
+                       opp-supported-hw = <0x0008>;
+               };
+
+               opp-68000000-1050 {
+                       opp-microvolt = <1050000 1050000 1150000>;
+                       opp-hz = /bits/ 64 <68000000>;
+                       opp-supported-hw = <0x0010>;
+               };
+
+               opp-68000000-1110 {
+                       opp-microvolt = <1110000 1110000 1150000>;
+                       opp-hz = /bits/ 64 <68000000>;
+                       opp-supported-hw = <0x0004>;
+               };
+
+               opp-102000000-800 {
+                       opp-microvolt = <800000 800000 1150000>;
+                       opp-hz = /bits/ 64 <102000000>;
+                       opp-supported-hw = <0x0003>;
+               };
+
+               opp-102000000-950 {
+                       opp-microvolt = <950000 950000 1150000>;
+                       opp-hz = /bits/ 64 <102000000>;
+                       opp-supported-hw = <0x0008>;
+               };
+
+               opp-102000000-1050 {
+                       opp-microvolt = <1050000 1050000 1150000>;
+                       opp-hz = /bits/ 64 <102000000>;
+                       opp-supported-hw = <0x0010>;
+               };
+
+               opp-102000000-1110 {
+                       opp-microvolt = <1110000 1110000 1150000>;
+                       opp-hz = /bits/ 64 <102000000>;
+                       opp-supported-hw = <0x0004>;
+               };
+
+               opp-204000000-800 {
+                       opp-microvolt = <800000 800000 1150000>;
+                       opp-hz = /bits/ 64 <204000000>;
+                       opp-supported-hw = <0x0003>;
+                       opp-suspend;
+               };
+
+               opp-204000000-950 {
+                       opp-microvolt = <950000 950000 1150000>;
+                       opp-hz = /bits/ 64 <204000000>;
+                       opp-supported-hw = <0x0008>;
+                       opp-suspend;
+               };
+
+               opp-204000000-1050 {
+                       opp-microvolt = <1050000 1050000 1150000>;
+                       opp-hz = /bits/ 64 <204000000>;
+                       opp-supported-hw = <0x0010>;
+                       opp-suspend;
+               };
+
+               opp-204000000-1110 {
+                       opp-microvolt = <1110000 1110000 1150000>;
+                       opp-hz = /bits/ 64 <204000000>;
+                       opp-supported-hw = <0x0004>;
+                       opp-suspend;
+               };
+
+               opp-264000000-800 {
+                       opp-microvolt = <800000 800000 1150000>;
+                       opp-hz = /bits/ 64 <264000000>;
+                       opp-supported-hw = <0x0003>;
+               };
+
+               opp-264000000-950 {
+                       opp-microvolt = <950000 950000 1150000>;
+                       opp-hz = /bits/ 64 <264000000>;
+                       opp-supported-hw = <0x0008>;
+               };
+
+               opp-264000000-1050 {
+                       opp-microvolt = <1050000 1050000 1150000>;
+                       opp-hz = /bits/ 64 <264000000>;
+                       opp-supported-hw = <0x0010>;
+               };
+
+               opp-264000000-1110 {
+                       opp-microvolt = <1110000 1110000 1150000>;
+                       opp-hz = /bits/ 64 <264000000>;
+                       opp-supported-hw = <0x0004>;
+               };
+
+               opp-300000000-850 {
+                       opp-microvolt = <850000 850000 1150000>;
+                       opp-hz = /bits/ 64 <300000000>;
+                       opp-supported-hw = <0x0003>;
+               };
+
+               opp-300000000-950 {
+                       opp-microvolt = <950000 950000 1150000>;
+                       opp-hz = /bits/ 64 <300000000>;
+                       opp-supported-hw = <0x0008>;
+               };
+
+               opp-300000000-1050 {
+                       opp-microvolt = <1050000 1050000 1150000>;
+                       opp-hz = /bits/ 64 <300000000>;
+                       opp-supported-hw = <0x0010>;
+               };
+
+               opp-300000000-1110 {
+                       opp-microvolt = <1110000 1110000 1150000>;
+                       opp-hz = /bits/ 64 <300000000>;
+                       opp-supported-hw = <0x0004>;
+               };
+
+               opp-348000000-850 {
+                       opp-microvolt = <850000 850000 1150000>;
+                       opp-hz = /bits/ 64 <348000000>;
+                       opp-supported-hw = <0x0003>;
+               };
+
+               opp-348000000-950 {
+                       opp-microvolt = <950000 950000 1150000>;
+                       opp-hz = /bits/ 64 <348000000>;
+                       opp-supported-hw = <0x0008>;
+               };
+
+               opp-348000000-1050 {
+                       opp-microvolt = <1050000 1050000 1150000>;
+                       opp-hz = /bits/ 64 <348000000>;
+                       opp-supported-hw = <0x0010>;
+               };
+
+               opp-348000000-1110 {
+                       opp-microvolt = <1110000 1110000 1150000>;
+                       opp-hz = /bits/ 64 <348000000>;
+                       opp-supported-hw = <0x0004>;
+               };
+
+               opp-396000000-950 {
+                       opp-microvolt = <950000 950000 1150000>;
+                       opp-hz = /bits/ 64 <396000000>;
+                       opp-supported-hw = <0x0008>;
+               };
+
+               opp-396000000-1000 {
+                       opp-microvolt = <1000000 1000000 1150000>;
+                       opp-hz = /bits/ 64 <396000000>;
+                       opp-supported-hw = <0x0003>;
+               };
+
+               opp-396000000-1050 {
+                       opp-microvolt = <1050000 1050000 1150000>;
+                       opp-hz = /bits/ 64 <396000000>;
+                       opp-supported-hw = <0x0010>;
+               };
+
+               opp-396000000-1110 {
+                       opp-microvolt = <1110000 1110000 1150000>;
+                       opp-hz = /bits/ 64 <396000000>;
+                       opp-supported-hw = <0x0004>;
+               };
+
+               opp-528000000-950 {
+                       opp-microvolt = <950000 950000 1150000>;
+                       opp-hz = /bits/ 64 <528000000>;
+                       opp-supported-hw = <0x0008>;
+               };
+
+               opp-528000000-1000 {
+                       opp-microvolt = <1000000 1000000 1150000>;
+                       opp-hz = /bits/ 64 <528000000>;
+                       opp-supported-hw = <0x0003>;
+               };
+
+               opp-528000000-1050 {
+                       opp-microvolt = <1050000 1050000 1150000>;
+                       opp-hz = /bits/ 64 <528000000>;
+                       opp-supported-hw = <0x0010>;
+               };
+
+               opp-528000000-1110 {
+                       opp-microvolt = <1110000 1110000 1150000>;
+                       opp-hz = /bits/ 64 <528000000>;
+                       opp-supported-hw = <0x0004>;
+               };
+
+               opp-600000000-950 {
+                       opp-microvolt = <950000 950000 1150000>;
+                       opp-hz = /bits/ 64 <600000000>;
+                       opp-supported-hw = <0x0008>;
+               };
+
+               opp-600000000-1000 {
+                       opp-microvolt = <1000000 1000000 1150000>;
+                       opp-hz = /bits/ 64 <600000000>;
+                       opp-supported-hw = <0x0003>;
+               };
+
+               opp-600000000-1050 {
+                       opp-microvolt = <1050000 1050000 1150000>;
+                       opp-hz = /bits/ 64 <600000000>;
+                       opp-supported-hw = <0x0010>;
+               };
+
+               opp-600000000-1110 {
+                       opp-microvolt = <1110000 1110000 1150000>;
+                       opp-hz = /bits/ 64 <600000000>;
+                       opp-supported-hw = <0x0004>;
+               };
+
+               opp-792000000-1000 {
+                       opp-microvolt = <1000000 1000000 1150000>;
+                       opp-hz = /bits/ 64 <792000000>;
+                       opp-supported-hw = <0x000B>;
+               };
+
+               opp-792000000-1050 {
+                       opp-microvolt = <1050000 1050000 1150000>;
+                       opp-hz = /bits/ 64 <792000000>;
+                       opp-supported-hw = <0x0010>;
+               };
+
+               opp-792000000-1110 {
+                       opp-microvolt = <1110000 1110000 1150000>;
+                       opp-hz = /bits/ 64 <792000000>;
+                       opp-supported-hw = <0x0004>;
+               };
+
+               opp-924000000-1100 {
+                       opp-microvolt = <1100000 1100000 1150000>;
+                       opp-hz = /bits/ 64 <924000000>;
+                       opp-supported-hw = <0x0013>;
+               };
+
+               opp-1200000000-1100 {
+                       opp-microvolt = <1100000 1100000 1150000>;
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-supported-hw = <0x0003>;
+               };
+       };
+
+       /* EMC bandwidth OPP table */
+       emc_bw_dfs_opp_table: opp-table-dvfs1 {
+               compatible = "operating-points-v2";
+
+               opp-12750000 {
+                       opp-hz = /bits/ 64 <12750000>;
+                       opp-supported-hw = <0x001F>;
+                       opp-peak-kBps = <204000>;
+               };
+
+               opp-20400000 {
+                       opp-hz = /bits/ 64 <20400000>;
+                       opp-supported-hw = <0x001F>;
+                       opp-peak-kBps = <326400>;
+               };
+
+               opp-40800000 {
+                       opp-hz = /bits/ 64 <40800000>;
+                       opp-supported-hw = <0x001F>;
+                       opp-peak-kBps = <652800>;
+               };
+
+               opp-68000000 {
+                       opp-hz = /bits/ 64 <68000000>;
+                       opp-supported-hw = <0x001F>;
+                       opp-peak-kBps = <1088000>;
+               };
+
+               opp-102000000 {
+                       opp-hz = /bits/ 64 <102000000>;
+                       opp-supported-hw = <0x001F>;
+                       opp-peak-kBps = <1632000>;
+               };
+
+               opp-204000000 {
+                       opp-hz = /bits/ 64 <204000000>;
+                       opp-supported-hw = <0x001F>;
+                       opp-peak-kBps = <3264000>;
+                       opp-suspend;
+               };
+
+               opp-264000000 {
+                       opp-hz = /bits/ 64 <264000000>;
+                       opp-supported-hw = <0x001F>;
+                       opp-peak-kBps = <4224000>;
+               };
+
+               opp-300000000 {
+                       opp-hz = /bits/ 64 <300000000>;
+                       opp-supported-hw = <0x001F>;
+                       opp-peak-kBps = <4800000>;
+               };
+
+               opp-348000000 {
+                       opp-hz = /bits/ 64 <348000000>;
+                       opp-supported-hw = <0x001F>;
+                       opp-peak-kBps = <5568000>;
+               };
+
+               opp-396000000 {
+                       opp-hz = /bits/ 64 <396000000>;
+                       opp-supported-hw = <0x001F>;
+                       opp-peak-kBps = <6336000>;
+               };
+
+               opp-528000000 {
+                       opp-hz = /bits/ 64 <528000000>;
+                       opp-supported-hw = <0x001F>;
+                       opp-peak-kBps = <8448000>;
+               };
+
+               opp-600000000 {
+                       opp-hz = /bits/ 64 <600000000>;
+                       opp-supported-hw = <0x001F>;
+                       opp-peak-kBps = <9600000>;
+               };
+
+               opp-792000000 {
+                       opp-hz = /bits/ 64 <792000000>;
+                       opp-supported-hw = <0x001F>;
+                       opp-peak-kBps = <12672000>;
+               };
+
+               opp-924000000 {
+                       opp-hz = /bits/ 64 <924000000>;
+                       opp-supported-hw = <0x0013>;
+                       opp-peak-kBps = <14784000>;
+               };
+
+               opp-1200000000 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-supported-hw = <0x0003>;
+                       opp-peak-kBps = <19200000>;
+               };
+       };
+};
index 63aa312..3673f79 100644 (file)
@@ -8,6 +8,8 @@
 #include <dt-bindings/thermal/tegra124-soctherm.h>
 #include <dt-bindings/soc/tegra-pmc.h>
 
+#include "tegra132-peripherals-opp.dtsi"
+
 / {
        compatible = "nvidia,tegra132", "nvidia,tegra124";
        interrupt-parent = <&lic>;
        };
 
        timer@60005000 {
-               compatible = "nvidia,tegra124-timer", "nvidia,tegra20-timer";
+               compatible = "nvidia,tegra124-timer", "nvidia,tegra30-timer";
                reg = <0x0 0x60005000 0x0 0x400>;
                interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
                             <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
                clock-names = "actmon", "emc";
                resets = <&tegra_car 119>;
                reset-names = "actmon";
+               operating-points-v2 = <&emc_bw_dfs_opp_table>;
+               interconnects = <&mc TEGRA124_MC_MPCORER &emc>;
+               interconnect-names = "cpu-read";
+               #cooling-cells = <2>;
        };
 
        gpio: gpio@6000d000 {
        };
 
        i2c@7000c000 {
-               compatible = "nvidia,tegra124-i2c", "nvidia,tegra114-i2c";
+               compatible = "nvidia,tegra124-i2c";
                reg = <0x0 0x7000c000 0x0 0x100>;
                interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
        };
 
        i2c@7000c400 {
-               compatible = "nvidia,tegra124-i2c", "nvidia,tegra114-i2c";
+               compatible = "nvidia,tegra124-i2c";
                reg = <0x0 0x7000c400 0x0 0x100>;
                interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
        };
 
        i2c@7000c500 {
-               compatible = "nvidia,tegra124-i2c", "nvidia,tegra114-i2c";
+               compatible = "nvidia,tegra124-i2c";
                reg = <0x0 0x7000c500 0x0 0x100>;
                interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
        };
 
        i2c@7000c700 {
-               compatible = "nvidia,tegra124-i2c", "nvidia,tegra114-i2c";
+               compatible = "nvidia,tegra124-i2c";
                reg = <0x0 0x7000c700 0x0 0x100>;
                interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
        };
 
        i2c@7000d000 {
-               compatible = "nvidia,tegra124-i2c", "nvidia,tegra114-i2c";
+               compatible = "nvidia,tegra124-i2c";
                reg = <0x0 0x7000d000 0x0 0x100>;
                interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
        };
 
        i2c@7000d100 {
-               compatible = "nvidia,tegra124-i2c", "nvidia,tegra114-i2c";
+               compatible = "nvidia,tegra124-i2c";
                reg = <0x0 0x7000d100 0x0 0x100>;
                interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
                interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
 
                #iommu-cells = <1>;
+               #reset-cells = <1>;
+               #interconnect-cells = <1>;
        };
 
        emc: external-memory-controller@7001b000 {
-               compatible = "nvidia,tegra132-emc";
+               compatible = "nvidia,tegra132-emc", "nvidia,tegra124-emc";
                reg = <0x0 0x7001b000 0x0 0x1000>;
                clocks = <&tegra_car TEGRA124_CLK_EMC>;
                clock-names = "emc";
 
                nvidia,memory-controller = <&mc>;
+               operating-points-v2 = <&emc_icc_dvfs_opp_table>;
+
+               #interconnect-cells = <0>;
        };
 
        sata@70020000 {
                      <0x0 0x70020000 0x0 0x7000>; /* SATA */
                interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&tegra_car TEGRA124_CLK_SATA>,
-                        <&tegra_car TEGRA124_CLK_SATA_OOB>,
-                        <&tegra_car TEGRA124_CLK_CML1>,
-                        <&tegra_car TEGRA124_CLK_PLL_E>;
-               clock-names = "sata", "sata-oob", "cml1", "pll_e";
+                        <&tegra_car TEGRA124_CLK_SATA_OOB>;
+               clock-names = "sata", "sata-oob";
                resets = <&tegra_car 124>,
                         <&tegra_car 129>,
                         <&tegra_car 123>;
                         <&tegra_car TEGRA124_CLK_XUSB_HOST_SRC>,
                         <&tegra_car TEGRA124_CLK_XUSB_FALCON_SRC>,
                         <&tegra_car TEGRA124_CLK_XUSB_SS>,
-                        <&tegra_car TEGRA124_CLK_XUSB_SS_SRC>,
                         <&tegra_car TEGRA124_CLK_XUSB_SS_DIV2>,
+                        <&tegra_car TEGRA124_CLK_XUSB_SS_SRC>,
                         <&tegra_car TEGRA124_CLK_XUSB_HS_SRC>,
                         <&tegra_car TEGRA124_CLK_XUSB_FS_SRC>,
                         <&tegra_car TEGRA124_CLK_PLL_U_480M>,
                         <&tegra_car TEGRA124_CLK_PLL_E>;
                clock-names = "xusb_host", "xusb_host_src",
                              "xusb_falcon_src", "xusb_ss",
-                             "xusb_ss_src", "xusb_ss_div2",
+                             "xusb_ss_div2", "xusb_ss_src",
                              "xusb_hs_src", "xusb_fs_src",
                              "pll_u_480m", "clk_m", "pll_e";
                resets = <&tegra_car 89>, <&tegra_car 156>,
        };
 
        thermal-zones {
-               cpu {
+               cpu-thermal {
                        polling-delay-passive = <1000>;
                        polling-delay = <0>;
 
                                };
                        };
                };
-               mem {
+
+               mem-thermal {
                        polling-delay-passive = <0>;
                        polling-delay = <0>;
 
                                 */
                        };
                };
-               gpu {
+
+               gpu-thermal {
                        polling-delay-passive = <1000>;
                        polling-delay = <0>;
 
                                };
                        };
                };
-               pllx {
+
+               pllx-thermal {
                        polling-delay-passive = <0>;
                        polling-delay = <0>;
 
index 52fa258..c4dee05 100644 (file)
                        #address-cells = <1>;
                        #size-cells = <0>;
 
-                       channel@0 {
+                       input@0 {
                                reg = <0x0>;
                                label = "VDD_MUX";
                                shunt-resistor-micro-ohms = <20000>;
                        };
 
-                       channel@1 {
+                       input@1 {
                                reg = <0x1>;
                                label = "VDD_5V0_IO_SYS";
                                shunt-resistor-micro-ohms = <5000>;
                        };
 
-                       channel@2 {
+                       input@2 {
                                reg = <0x2>;
                                label = "VDD_3V3_SYS";
                                shunt-resistor-micro-ohms = <10000>;
                        #address-cells = <1>;
                        #size-cells = <0>;
 
-                       channel@0 {
+                       input@0 {
                                reg = <0x0>;
                                label = "VDD_3V3_IO_SLP";
                                shunt-resistor-micro-ohms = <10000>;
                        };
 
-                       channel@1 {
+                       input@1 {
                                reg = <0x1>;
                                label = "VDD_1V8_IO";
                                shunt-resistor-micro-ohms = <10000>;
                        };
 
-                       channel@2 {
+                       input@2 {
                                reg = <0x2>;
                                label = "VDD_M2_IN";
                                shunt-resistor-micro-ohms = <10000>;
                };
        };
 
-       vdd_sd: regulator@100 {
+       vdd_sd: regulator-vdd-sd {
                compatible = "regulator-fixed";
                regulator-name = "SD_CARD_SW_PWR";
                regulator-min-microvolt = <3300000>;
                vin-supply = <&vdd_3v3_sys>;
        };
 
-       vdd_hdmi: regulator@101 {
+       vdd_hdmi: regulator-vdd-hdmi {
                compatible = "regulator-fixed";
                regulator-name = "VDD_HDMI_5V0";
                regulator-min-microvolt = <5000000>;
                vin-supply = <&vdd_5v0_sys>;
        };
 
-       vdd_usb0: regulator@102 {
+       vdd_usb0: regulator-vdd-usb0 {
                compatible = "regulator-fixed";
                regulator-name = "VDD_USB0";
                regulator-min-microvolt = <5000000>;
                vin-supply = <&vdd_5v0_sys>;
        };
 
-       vdd_usb1: regulator@103 {
+       vdd_usb1: regulator-vdd-usb1 {
                compatible = "regulator-fixed";
                regulator-name = "VDD_USB1";
                regulator-min-microvolt = <5000000>;
index fcd71bf..aff857d 100644 (file)
@@ -44,7 +44,7 @@
                        #address-cells = <1>;
                        #size-cells = <0>;
 
-                       phy: phy@0 {
+                       phy: ethernet-phy@0 {
                                compatible = "ethernet-phy-ieee802.3-c22";
                                reg = <0x0>;
                                interrupt-parent = <&gpio>;
                        #address-cells = <1>;
                        #size-cells = <0>;
 
-                       channel@0 {
+                       input@0 {
                                reg = <0x0>;
                                label = "VDD_SYS_GPU";
                                shunt-resistor-micro-ohms = <10000>;
                        };
 
-                       channel@1 {
+                       input@1 {
                                reg = <0x1>;
                                label = "VDD_SYS_SOC";
                                shunt-resistor-micro-ohms = <10000>;
                        };
 
-                       channel@2 {
+                       input@2 {
                                reg = <0x2>;
                                label = "VDD_3V8_WIFI";
                                shunt-resistor-micro-ohms = <10000>;
                        #address-cells = <1>;
                        #size-cells = <0>;
 
-                       channel@0 {
+                       input@0 {
                                reg = <0x0>;
                                label = "VDD_IN";
                                shunt-resistor-micro-ohms = <5000>;
                        };
 
-                       channel@1 {
+                       input@1 {
                                reg = <0x1>;
                                label = "VDD_SYS_CPU";
                                shunt-resistor-micro-ohms = <10000>;
                        };
 
-                       channel@2 {
+                       input@2 {
                                reg = <0x2>;
                                label = "VDD_5V0_DDR";
                                shunt-resistor-micro-ohms = <10000>;
                method = "smc";
        };
 
-       gnd: regulator@0 {
+       gnd: regulator-gnd {
                compatible = "regulator-fixed";
                regulator-name = "GND";
                regulator-min-microvolt = <0>;
                regulator-boot-on;
        };
 
-       vdd_5v0_sys: regulator@1 {
+       vdd_5v0_sys: regulator-vdd-5v0-sys {
                compatible = "regulator-fixed";
                regulator-name = "VDD_5V0_SYS";
                regulator-min-microvolt = <5000000>;
                regulator-boot-on;
        };
 
-       vdd_1v8_ap: regulator@2 {
+       vdd_1v8_ap: regulator-vdd-1v8-ap {
                compatible = "regulator-fixed";
                regulator-name = "VDD_1V8_AP";
                regulator-min-microvolt = <1800000>;
index af33fe9..4631504 100644 (file)
@@ -46,7 +46,7 @@
                        #address-cells = <1>;
                        #size-cells = <0>;
 
-                       phy: phy@0 {
+                       phy: ethernet-phy@0 {
                                compatible = "ethernet-phy-ieee802.3-c22";
                                reg = <0x0>;
                                interrupt-parent = <&gpio_aon>;
                        #address-cells = <1>;
                        #size-cells = <0>;
 
-                       channel@0 {
+                       input@0 {
                                reg = <0>;
                                label = "VDD_IN";
                                shunt-resistor-micro-ohms = <5>;
                        };
 
-                       channel@1 {
+                       input@1 {
                                reg = <1>;
                                label = "VDD_CPU_GPU";
                                shunt-resistor-micro-ohms = <5>;
                        };
 
-                       channel@2 {
+                       input@2 {
                                reg = <2>;
                                label = "VDD_SOC";
-                               shunt-resistor-micro-ohms = <>;
+                               shunt-resistor-micro-ohms = <5>;
                        };
                };
        };
                method = "smc";
        };
 
-       gnd: regulator@0 {
+       gnd: regulator-gnd {
                compatible = "regulator-fixed";
                regulator-name = "GND";
                regulator-min-microvolt = <0>;
                regulator-boot-on;
        };
 
-       vdd_5v0_sys: regulator@1 {
+       vdd_5v0_sys: regulator-vdd-5v0-sys {
                compatible = "regulator-fixed";
                regulator-name = "VDD_5V0_SYS";
                regulator-min-microvolt = <5000000>;
                regulator-boot-on;
        };
 
-       vdd_1v8_ap: regulator@2 {
+       vdd_1v8_ap: regulator-vdd-1v8-ap {
                compatible = "regulator-fixed";
                regulator-name = "VDD_1V8_AP";
                regulator-min-microvolt = <1800000>;
                vin-supply = <&vdd_1v8>;
        };
 
-       vdd_hdmi: regulator@3 {
+       vdd_hdmi: regulator-vdd-hdmi {
                compatible = "regulator-fixed";
                regulator-name = "VDD_5V0_HDMI_CON";
                regulator-min-microvolt = <5000000>;
        };
 
        thermal-zones {
-               cpu {
+               cpu-thermal {
                        polling-delay = <0>;
                        polling-delay-passive = <500>;
                        status = "okay";
                        };
                };
 
-               gpu {
+               aux-thermal {
                        polling-delay = <0>;
                        polling-delay-passive = <500>;
                        status = "okay";
 
                        trips {
-                               gpu_alert0: critical {
-                                       temperature = <99000>;
+                               aux_alert0: critical {
+                                       temperature = <90000>;
                                        hysteresis = <0>;
                                        type = "critical";
                                };
                        };
                };
 
-               aux {
+               gpu-thermal {
                        polling-delay = <0>;
                        polling-delay-passive = <500>;
                        status = "okay";
 
                        trips {
-                               aux_alert0: critical {
-                                       temperature = <90000>;
+                               gpu_alert0: critical {
+                                       temperature = <99000>;
                                        hysteresis = <0>;
                                        type = "critical";
                                };
index 9ac4f01..c91afff 100644 (file)
                };
        };
 
+       timer@3010000 {
+               compatible = "nvidia,tegra186-timer";
+               reg = <0x0 0x03010000 0x0 0x000e0000>;
+               interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
        uarta: serial@3100000 {
                compatible = "nvidia,tegra186-uart", "nvidia,tegra20-uart";
                reg = <0x0 0x03100000 0x0 0x40>;
        };
 
        gen1_i2c: i2c@3160000 {
-               compatible = "nvidia,tegra186-i2c", "nvidia,tegra210-i2c";
+               compatible = "nvidia,tegra186-i2c";
                reg = <0x0 0x03160000 0x0 0x10000>;
                interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
        };
 
        cam_i2c: i2c@3180000 {
-               compatible = "nvidia,tegra186-i2c", "nvidia,tegra210-i2c";
+               compatible = "nvidia,tegra186-i2c";
                reg = <0x0 0x03180000 0x0 0x10000>;
                interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
 
        /* shares pads with dpaux1 */
        dp_aux_ch1_i2c: i2c@3190000 {
-               compatible = "nvidia,tegra186-i2c", "nvidia,tegra210-i2c";
+               compatible = "nvidia,tegra186-i2c";
                reg = <0x0 0x03190000 0x0 0x10000>;
                interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
 
        /* controlled by BPMP, should not be enabled */
        pwr_i2c: i2c@31a0000 {
-               compatible = "nvidia,tegra186-i2c", "nvidia,tegra210-i2c";
+               compatible = "nvidia,tegra186-i2c";
                reg = <0x0 0x031a0000 0x0 0x10000>;
                interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
 
        /* shares pads with dpaux0 */
        dp_aux_ch0_i2c: i2c@31b0000 {
-               compatible = "nvidia,tegra186-i2c", "nvidia,tegra210-i2c";
+               compatible = "nvidia,tegra186-i2c";
                reg = <0x0 0x031b0000 0x0 0x10000>;
                interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
        };
 
        gen7_i2c: i2c@31c0000 {
-               compatible = "nvidia,tegra186-i2c", "nvidia,tegra210-i2c";
+               compatible = "nvidia,tegra186-i2c";
                reg = <0x0 0x031c0000 0x0 0x10000>;
                interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
        };
 
        gen9_i2c: i2c@31e0000 {
-               compatible = "nvidia,tegra186-i2c", "nvidia,tegra210-i2c";
+               compatible = "nvidia,tegra186-i2c";
                reg = <0x0 0x031e0000 0x0 0x10000>;
                interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
        };
 
        gen2_i2c: i2c@c240000 {
-               compatible = "nvidia,tegra186-i2c", "nvidia,tegra210-i2c";
+               compatible = "nvidia,tegra186-i2c";
                reg = <0x0 0x0c240000 0x0 0x10000>;
                interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
        };
 
        gen8_i2c: i2c@c250000 {
-               compatible = "nvidia,tegra186-i2c", "nvidia,tegra210-i2c";
+               compatible = "nvidia,tegra186-i2c";
                reg = <0x0 0x0c250000 0x0 0x10000>;
                interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
 
        ccplex@e000000 {
                compatible = "nvidia,tegra186-ccplex-cluster";
-               reg = <0x0 0x0e000000 0x0 0x3fffff>;
+               reg = <0x0 0x0e000000 0x0 0x400000>;
 
                nvidia,bpmp = <&bpmp>;
        };
                        iommus = <&smmu TEGRA186_SID_VIC>;
                };
 
+               nvjpg@15380000 {
+                       compatible = "nvidia,tegra186-nvjpg";
+                       reg = <0x15380000 0x40000>;
+                       clocks = <&bpmp TEGRA186_CLK_NVJPG>;
+                       clock-names = "nvjpg";
+                       resets = <&bpmp TEGRA186_RESET_NVJPG>;
+                       reset-names = "nvjpg";
+
+                       power-domains = <&bpmp TEGRA186_POWER_DOMAIN_NVJPG>;
+                       interconnects = <&mc TEGRA186_MEMORY_CLIENT_NVJPGSRD &emc>,
+                                       <&mc TEGRA186_MEMORY_CLIENT_NVJPGSWR &emc>;
+                       interconnect-names = "dma-mem", "write";
+                       iommus = <&smmu TEGRA186_SID_NVJPG>;
+               };
+
                dsib: dsi@15400000 {
                        compatible = "nvidia,tegra186-dsi";
                        reg = <0x15400000 0x10000>;
                        iommus = <&smmu TEGRA186_SID_NVDEC>;
                };
 
+               nvenc@154c0000 {
+                       compatible = "nvidia,tegra186-nvenc";
+                       reg = <0x154c0000 0x40000>;
+                       clocks = <&bpmp TEGRA186_CLK_NVENC>;
+                       clock-names = "nvenc";
+                       resets = <&bpmp TEGRA186_RESET_NVENC>;
+                       reset-names = "nvenc";
+
+                       power-domains = <&bpmp TEGRA186_POWER_DOMAIN_MPE>;
+                       interconnects = <&mc TEGRA186_MEMORY_CLIENT_NVENCSRD &emc>,
+                                       <&mc TEGRA186_MEMORY_CLIENT_NVENCSWR &emc>;
+                       interconnect-names = "dma-mem", "write";
+                       iommus = <&smmu TEGRA186_SID_NVENC>;
+               };
+
                sor0: sor@15540000 {
                        compatible = "nvidia,tegra186-sor";
                        reg = <0x15540000 0x10000>;
                iommus = <&smmu TEGRA186_SID_BPMP>;
                mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_DB
                                    TEGRA_HSP_DB_MASTER_BPMP>;
-               shmem = <&cpu_bpmp_tx &cpu_bpmp_rx>;
+               shmem = <&cpu_bpmp_tx>, <&cpu_bpmp_rx>;
                #clock-cells = <1>;
                #reset-cells = <1>;
                #power-domain-cells = <1>;
        };
 
        thermal-zones {
-               a57 {
+               /* Cortex-A57 cluster */
+               cpu-thermal {
                        polling-delay = <0>;
                        polling-delay-passive = <1000>;
 
-                       thermal-sensors =
-                               <&bpmp_thermal TEGRA186_BPMP_THERMAL_ZONE_CPU>;
+                       thermal-sensors = <&bpmp_thermal TEGRA186_BPMP_THERMAL_ZONE_CPU>;
 
                        trips {
                                critical {
                        };
                };
 
-               denver {
+               /* Denver cluster */
+               aux-thermal {
                        polling-delay = <0>;
                        polling-delay-passive = <1000>;
 
-                       thermal-sensors =
-                               <&bpmp_thermal TEGRA186_BPMP_THERMAL_ZONE_AUX>;
+                       thermal-sensors = <&bpmp_thermal TEGRA186_BPMP_THERMAL_ZONE_AUX>;
 
                        trips {
                                critical {
                        };
                };
 
-               gpu {
+               gpu-thermal {
                        polling-delay = <0>;
                        polling-delay-passive = <1000>;
 
-                       thermal-sensors =
-                               <&bpmp_thermal TEGRA186_BPMP_THERMAL_ZONE_GPU>;
+                       thermal-sensors = <&bpmp_thermal TEGRA186_BPMP_THERMAL_ZONE_GPU>;
 
                        trips {
                                critical {
                        };
                };
 
-               pll {
+               pll-thermal {
                        polling-delay = <0>;
                        polling-delay-passive = <1000>;
 
-                       thermal-sensors =
-                               <&bpmp_thermal TEGRA186_BPMP_THERMAL_ZONE_PLLX>;
+                       thermal-sensors = <&bpmp_thermal TEGRA186_BPMP_THERMAL_ZONE_PLLX>;
 
                        trips {
                                critical {
                        };
                };
 
-               always_on {
+               ao-thermal {
                        polling-delay = <0>;
                        polling-delay-passive = <1000>;
 
-                       thermal-sensors =
-                               <&bpmp_thermal TEGRA186_BPMP_THERMAL_ZONE_AO>;
+                       thermal-sensors = <&bpmp_thermal TEGRA186_BPMP_THERMAL_ZONE_AO>;
 
                        trips {
                                critical {
index c4058ee..a7d7cfd 100644 (file)
@@ -39,7 +39,7 @@
                                #address-cells = <1>;
                                #size-cells = <0>;
 
-                               phy: phy@0 {
+                               phy: ethernet-phy@0 {
                                        compatible = "ethernet-phy-ieee802.3-c22";
                                        reg = <0x0>;
                                        interrupt-parent = <&gpio>;
                };
        };
 
-       vdd_5v0_sys: regulator@0 {
+       vdd_5v0_sys: regulator-vdd-5v0-sys {
                compatible = "regulator-fixed";
                regulator-name = "VIN_SYS_5V0";
                regulator-min-microvolt = <5000000>;
                regulator-boot-on;
        };
 
-       vdd_hdmi: regulator@1 {
+       vdd_hdmi: regulator-vdd-hdmi {
                compatible = "regulator-fixed";
                regulator-name = "VDD_5V0_HDMI_CON";
                regulator-min-microvolt = <5000000>;
                enable-active-high;
        };
 
-       vdd_3v3_pcie: regulator@2 {
+       vdd_3v3_pcie: regulator-vdd-3v3-pcie {
                compatible = "regulator-fixed";
                regulator-name = "PEX_3V3";
                regulator-min-microvolt = <3300000>;
                enable-active-high;
        };
 
-       vdd_12v_pcie: regulator@3 {
+       vdd_12v_pcie: regulator-vdd-12v-pcie {
                compatible = "regulator-fixed";
                regulator-name = "VDD_12V";
                regulator-min-microvolt = <1200000>;
                regulator-boot-on;
        };
 
-       vdd_5v_sata: regulator@4 {
+       vdd_5v_sata: regulator-vdd-5v0-sata {
                compatible = "regulator-fixed";
                regulator-name = "VDD_5V_SATA";
                regulator-min-microvolt = <5000000>;
index 9f34871..2478ece 100644 (file)
                                                i2s6_port: port@1 {
                                                        reg = <1>;
 
-                                                       i2s6_dap_ep: endpoint@0 {
+                                                       i2s6_dap_ep: endpoint {
                                                                dai-format = "i2s";
                                                                /* Place holder for external Codec */
                                                        };
        };
 
        thermal-zones {
-               cpu {
+               cpu-thermal {
                        polling-delay = <0>;
                        polling-delay-passive = <500>;
                        status = "okay";
                        };
                };
 
-               gpu {
+               gpu-thermal {
                        polling-delay = <0>;
                        polling-delay-passive = <500>;
                        status = "okay";
                        };
                };
 
-               aux {
+               aux-thermal {
                        polling-delay = <0>;
                        polling-delay-passive = <500>;
                        status = "okay";
index a055f17..1323fa9 100644 (file)
                                                i2s5_port: port@1 {
                                                        reg = <1>;
 
-                                                       i2s5_dap_ep: endpoint@0 {
+                                                       i2s5_dap_ep: endpoint {
                                                                dai-format = "i2s";
                                                                /* Place holder for external Codec */
                                                        };
                        status = "okay";
 
                        flash@0 {
-                               compatible = "spi-nor";
+                               compatible = "jedec,spi-nor";
                                reg = <0>;
                                spi-max-frequency = <102000000>;
                                spi-tx-bus-width = <4>;
                };
        };
 
-       vdd_5v0_sys: regulator@100 {
+       vdd_5v0_sys: regulator-vdd-5v0-sys {
                compatible = "regulator-fixed";
                regulator-name = "VDD_5V_SYS";
                regulator-min-microvolt = <5000000>;
                regulator-boot-on;
        };
 
-       vdd_3v3_sys: regulator@101 {
+       vdd_3v3_sys: regulator-vdd-3v3-sys {
                compatible = "regulator-fixed";
                regulator-name = "VDD_3V3_SYS";
                regulator-min-microvolt = <3300000>;
                regulator-boot-on;
        };
 
-       vdd_3v3_ao: regulator@102 {
+       vdd_3v3_ao: regulator-vdd-3v3-ao {
                compatible = "regulator-fixed";
                regulator-name = "VDD_3V3_AO";
                regulator-min-microvolt = <3300000>;
                regulator-boot-on;
        };
 
-       vdd_1v8: regulator@103 {
+       vdd_1v8: regulator-vdd-1v8 {
                compatible = "regulator-fixed";
                regulator-name = "VDD_1V8";
                regulator-min-microvolt = <1800000>;
                regulator-boot-on;
        };
 
-       vdd_hdmi: regulator@104 {
+       vdd_hdmi: regulator-vdd-hdmi {
                compatible = "regulator-fixed";
                regulator-name = "VDD_5V0_HDMI_CON";
                regulator-min-microvolt = <5000000>;
        };
 
        thermal-zones {
-               cpu {
+               cpu-thermal {
                        polling-delay = <0>;
                        polling-delay-passive = <500>;
                        status = "okay";
                        };
                };
 
-               gpu {
+               gpu-thermal {
                        polling-delay = <0>;
                        polling-delay-passive = <500>;
                        status = "okay";
                        };
                };
 
-               aux {
+               aux-thermal {
                        polling-delay = <0>;
                        polling-delay-passive = <500>;
                        status = "okay";
index 14da420..8c2c709 100644 (file)
@@ -20,7 +20,7 @@
                };
        };
 
-       vdd_3v3_sd: regulator@0 {
+       vdd_3v3_sd: regulator-vdd-3v3-sd {
                compatible = "regulator-fixed";
                regulator-name = "VDD_3V3_SD";
                regulator-min-microvolt = <3300000>;
index f16b0aa..0bd66f9 100644 (file)
@@ -36,7 +36,7 @@
                                #address-cells = <1>;
                                #size-cells = <0>;
 
-                               phy: phy@0 {
+                               phy: ethernet-phy@0 {
                                        compatible = "ethernet-phy-ieee802.3-c22";
                                        reg = <0x0>;
                                        interrupt-parent = <&gpio>;
index 851e049..3c4acfc 100644 (file)
@@ -3,6 +3,7 @@
 #include <dt-bindings/gpio/tegra194-gpio.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/mailbox/tegra186-hsp.h>
+#include <dt-bindings/pinctrl/pinctrl-tegra-io-pad.h>
 #include <dt-bindings/pinctrl/pinctrl-tegra.h>
 #include <dt-bindings/power/tegra194-powergate.h>
 #include <dt-bindings/reset/tegra194-reset.h>
                                pex_rst {
                                        nvidia,pins = "pex_l5_rst_n_pgg1";
                                        nvidia,schmitt = <TEGRA_PIN_DISABLE>;
-                                       nvidia,lpdr = <TEGRA_PIN_ENABLE>;
                                        nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                                        nvidia,io-hv = <TEGRA_PIN_ENABLE>;
                                        nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                clkreq {
                                        nvidia,pins = "pex_l5_clkreq_n_pgg0";
                                        nvidia,schmitt = <TEGRA_PIN_DISABLE>;
-                                       nvidia,lpdr = <TEGRA_PIN_ENABLE>;
                                        nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                                        nvidia,io-hv = <TEGRA_PIN_ENABLE>;
                                        nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                compatible = "nvidia,tegra194-emc";
                                reg = <0x0 0x02c60000 0x0 0x90000>,
                                      <0x0 0x01780000 0x0 0x80000>;
+                               interrupts = <GIC_SPI 224 IRQ_TYPE_LEVEL_HIGH>;
                                clocks = <&bpmp TEGRA194_CLK_EMC>;
                                clock-names = "emc";
 
                                        <&mc TEGRA194_MEMORY_CLIENT_SDMMCWA &emc>;
                        interconnect-names = "dma-mem", "write";
                        iommus = <&smmu TEGRA194_SID_SDMMC1>;
+                       pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
+                       pinctrl-0 = <&sdmmc1_3v3>;
+                       pinctrl-1 = <&sdmmc1_1v8>;
                        nvidia,pad-autocal-pull-up-offset-3v3-timeout =
                                                                        <0x07>;
                        nvidia,pad-autocal-pull-down-offset-3v3-timeout =
                        nvidia,pad-autocal-pull-down-offset-sdr104 = <0x00>;
                        nvidia,default-tap = <0x9>;
                        nvidia,default-trim = <0x5>;
+                       sd-uhs-sdr25;
+                       sd-uhs-sdr50;
+                       sd-uhs-ddr50;
+                       sd-uhs-sdr104;
                        status = "disabled";
                };
 
                                        <&mc TEGRA194_MEMORY_CLIENT_SDMMCW &emc>;
                        interconnect-names = "dma-mem", "write";
                        iommus = <&smmu TEGRA194_SID_SDMMC3>;
+                       pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
+                       pinctrl-0 = <&sdmmc3_3v3>;
+                       pinctrl-1 = <&sdmmc3_1v8>;
                        nvidia,pad-autocal-pull-up-offset-1v8 = <0x00>;
                        nvidia,pad-autocal-pull-down-offset-1v8 = <0x7a>;
                        nvidia,pad-autocal-pull-up-offset-3v3-timeout = <0x07>;
                        nvidia,pad-autocal-pull-down-offset-sdr104 = <0x00>;
                        nvidia,default-tap = <0x9>;
                        nvidia,default-trim = <0x5>;
+                       sd-uhs-sdr25;
+                       sd-uhs-sdr50;
+                       sd-uhs-ddr50;
+                       sd-uhs-sdr104;
                        status = "disabled";
                };
 
                        nvidia,default-tap = <0x8>;
                        nvidia,default-trim = <0x14>;
                        nvidia,dqs-trim = <40>;
+                       cap-mmc-highspeed;
+                       mmc-ddr-1_8v;
+                       mmc-hs200-1_8v;
+                       mmc-hs400-1_8v;
+                       mmc-hs400-enhanced-strobe;
                        supports-cqe;
                        status = "disabled";
                };
                };
 
                hsp_top0: hsp@3c00000 {
-                       compatible = "nvidia,tegra194-hsp", "nvidia,tegra186-hsp";
+                       compatible = "nvidia,tegra194-hsp";
                        reg = <0x03c00000 0xa0000>;
                        interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
                };
 
                hsp_aon: hsp@c150000 {
-                       compatible = "nvidia,tegra194-hsp", "nvidia,tegra186-hsp";
+                       compatible = "nvidia,tegra194-hsp";
                        reg = <0x0c150000 0x90000>;
                        interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>,
 
                        #interrupt-cells = <2>;
                        interrupt-controller;
+                       sdmmc1_3v3: sdmmc1-3v3 {
+                               pins = "sdmmc1-hv";
+                               power-source = <TEGRA_IO_PAD_VOLTAGE_3V3>;
+                       };
+
+                       sdmmc1_1v8: sdmmc1-1v8 {
+                               pins = "sdmmc1-hv";
+                               power-source = <TEGRA_IO_PAD_VOLTAGE_1V8>;
+                       };
+                       sdmmc3_3v3: sdmmc3-3v3 {
+                               pins = "sdmmc3-hv";
+                               power-source = <TEGRA_IO_PAD_VOLTAGE_3V3>;
+                       };
+
+                       sdmmc3_1v8: sdmmc3-1v8 {
+                               pins = "sdmmc3-hv";
+                               power-source = <TEGRA_IO_PAD_VOLTAGE_1V8>;
+                       };
+
+               };
+
+               iommu@10000000 {
+                       compatible = "nvidia,tegra194-smmu", "nvidia,smmu-500";
+                       reg = <0x10000000 0x800000>;
+                       interrupts = <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>;
+                       stream-match-mask = <0x7f80>;
+                       #global-interrupts = <1>;
+                       #iommu-cells = <1>;
+
+                       nvidia,memory-controller = <&mc>;
+                       status = "okay";
                };
 
                smmu: iommu@12000000 {
                                                <&mc TEGRA194_MEMORY_CLIENT_VICSWR &emc>;
                                interconnect-names = "dma-mem", "write";
                                iommus = <&smmu TEGRA194_SID_VIC>;
+                               dma-coherent;
+                       };
+
+                       nvjpg@15380000 {
+                               compatible = "nvidia,tegra194-nvjpg";
+                               reg = <0x15380000 0x40000>;
+                               clocks = <&bpmp TEGRA194_CLK_NVJPG>;
+                               clock-names = "nvjpg";
+                               resets = <&bpmp TEGRA194_RESET_NVJPG>;
+                               reset-names = "nvjpg";
+
+                               power-domains = <&bpmp TEGRA194_POWER_DOMAIN_NVJPG>;
+                               interconnects = <&mc TEGRA194_MEMORY_CLIENT_NVJPGSRD &emc>,
+                                               <&mc TEGRA194_MEMORY_CLIENT_NVJPGSWR &emc>;
+                               interconnect-names = "dma-mem", "write";
+                               iommus = <&smmu TEGRA194_SID_NVJPG>;
+                               dma-coherent;
                        };
 
                        nvdec@15480000 {
                                nvidia,host1x-class = <0xf0>;
                        };
 
+                       nvenc@154c0000 {
+                               compatible = "nvidia,tegra194-nvenc";
+                               reg = <0x154c0000 0x40000>;
+                               clocks = <&bpmp TEGRA194_CLK_NVENC>;
+                               clock-names = "nvenc";
+                               resets = <&bpmp TEGRA194_RESET_NVENC>;
+                               reset-names = "nvenc";
+
+                               power-domains = <&bpmp TEGRA194_POWER_DOMAIN_NVENCA>;
+                               interconnects = <&mc TEGRA194_MEMORY_CLIENT_NVENCSRD &emc>,
+                                               <&mc TEGRA194_MEMORY_CLIENT_NVENCSRD1 &emc>,
+                                               <&mc TEGRA194_MEMORY_CLIENT_NVENCSWR &emc>;
+                               interconnect-names = "dma-mem", "read-1", "write";
+                               iommus = <&smmu TEGRA194_SID_NVENC>;
+                               dma-coherent;
+
+                               nvidia,host1x-class = <0x21>;
+                       };
+
                        dpaux0: dpaux@155c0000 {
                                compatible = "nvidia,tegra194-dpaux";
                                reg = <0x155c0000 0x10000>;
                                };
                        };
 
+                       nvenc@15a80000 {
+                               compatible = "nvidia,tegra194-nvenc";
+                               reg = <0x15a80000 0x00040000>;
+                               clocks = <&bpmp TEGRA194_CLK_NVENC1>;
+                               clock-names = "nvenc";
+                               resets = <&bpmp TEGRA194_RESET_NVENC1>;
+                               reset-names = "nvenc";
+
+                               power-domains = <&bpmp TEGRA194_POWER_DOMAIN_NVENCB>;
+                               interconnects = <&mc TEGRA194_MEMORY_CLIENT_NVENC1SRD &emc>,
+                                               <&mc TEGRA194_MEMORY_CLIENT_NVENC1SRD1 &emc>,
+                                               <&mc TEGRA194_MEMORY_CLIENT_NVENC1SWR &emc>;
+                               interconnect-names = "dma-mem", "read-1", "write";
+                               iommus = <&smmu TEGRA194_SID_NVENC1>;
+                               dma-coherent;
+
+                               nvidia,host1x-class = <0x22>;
+                       };
+
                        sor0: sor@15b00000 {
                                compatible = "nvidia,tegra194-sor";
                                reg = <0x15b00000 0x40000>;
                #size-cells = <2>;
                device_type = "pci";
                num-lanes = <1>;
-               num-viewport = <8>;
                linux,pci-domain = <1>;
 
                clocks = <&bpmp TEGRA194_CLK_PEX0_CORE_1>;
                interconnects = <&mc TEGRA194_MEMORY_CLIENT_PCIE1R &emc>,
                                <&mc TEGRA194_MEMORY_CLIENT_PCIE1W &emc>;
                interconnect-names = "dma-mem", "write";
-               iommus = <&smmu TEGRA194_SID_PCIE1>;
                iommu-map = <0x0 &smmu TEGRA194_SID_PCIE1 0x1000>;
                iommu-map-mask = <0x0>;
                dma-coherent;
                #size-cells = <2>;
                device_type = "pci";
                num-lanes = <1>;
-               num-viewport = <8>;
                linux,pci-domain = <2>;
 
                clocks = <&bpmp TEGRA194_CLK_PEX0_CORE_2>;
                interconnects = <&mc TEGRA194_MEMORY_CLIENT_PCIE2AR &emc>,
                                <&mc TEGRA194_MEMORY_CLIENT_PCIE2AW &emc>;
                interconnect-names = "dma-mem", "write";
-               iommus = <&smmu TEGRA194_SID_PCIE2>;
                iommu-map = <0x0 &smmu TEGRA194_SID_PCIE2 0x1000>;
                iommu-map-mask = <0x0>;
                dma-coherent;
                #size-cells = <2>;
                device_type = "pci";
                num-lanes = <1>;
-               num-viewport = <8>;
                linux,pci-domain = <3>;
 
                clocks = <&bpmp TEGRA194_CLK_PEX0_CORE_3>;
                interconnects = <&mc TEGRA194_MEMORY_CLIENT_PCIE3R &emc>,
                                <&mc TEGRA194_MEMORY_CLIENT_PCIE3W &emc>;
                interconnect-names = "dma-mem", "write";
-               iommus = <&smmu TEGRA194_SID_PCIE3>;
                iommu-map = <0x0 &smmu TEGRA194_SID_PCIE3 0x1000>;
                iommu-map-mask = <0x0>;
                dma-coherent;
                #size-cells = <2>;
                device_type = "pci";
                num-lanes = <4>;
-               num-viewport = <8>;
                linux,pci-domain = <4>;
 
                clocks = <&bpmp TEGRA194_CLK_PEX0_CORE_4>;
                interconnects = <&mc TEGRA194_MEMORY_CLIENT_PCIE4R &emc>,
                                <&mc TEGRA194_MEMORY_CLIENT_PCIE4W &emc>;
                interconnect-names = "dma-mem", "write";
-               iommus = <&smmu TEGRA194_SID_PCIE4>;
                iommu-map = <0x0 &smmu TEGRA194_SID_PCIE4 0x1000>;
                iommu-map-mask = <0x0>;
                dma-coherent;
                #size-cells = <2>;
                device_type = "pci";
                num-lanes = <8>;
-               num-viewport = <8>;
                linux,pci-domain = <0>;
 
                clocks = <&bpmp TEGRA194_CLK_PEX0_CORE_0>;
                interconnects = <&mc TEGRA194_MEMORY_CLIENT_PCIE0R &emc>,
                                <&mc TEGRA194_MEMORY_CLIENT_PCIE0W &emc>;
                interconnect-names = "dma-mem", "write";
-               iommus = <&smmu TEGRA194_SID_PCIE0>;
                iommu-map = <0x0 &smmu TEGRA194_SID_PCIE0 0x1000>;
                iommu-map-mask = <0x0>;
                dma-coherent;
                #size-cells = <2>;
                device_type = "pci";
                num-lanes = <8>;
-               num-viewport = <8>;
                linux,pci-domain = <5>;
 
                pinctrl-names = "default";
                pinctrl-0 = <&pex_rst_c5_out_state>, <&clkreq_c5_bi_dir_state>;
 
-               clocks = <&bpmp TEGRA194_CLK_PEX1_CORE_5>,
-                        <&bpmp TEGRA194_CLK_PEX1_CORE_5M>;
-               clock-names = "core", "core_m";
+               clocks = <&bpmp TEGRA194_CLK_PEX1_CORE_5>;
+               clock-names = "core";
 
                resets = <&bpmp TEGRA194_RESET_PEX1_CORE_5_APB>,
                         <&bpmp TEGRA194_RESET_PEX1_CORE_5>;
                interconnects = <&mc TEGRA194_MEMORY_CLIENT_PCIE5R &emc>,
                                <&mc TEGRA194_MEMORY_CLIENT_PCIE5W &emc>;
                interconnect-names = "dma-mem", "write";
-               iommus = <&smmu TEGRA194_SID_PCIE5>;
                iommu-map = <0x0 &smmu TEGRA194_SID_PCIE5 0x1000>;
                iommu-map-mask = <0x0>;
                dma-coherent;
                interconnects = <&mc TEGRA194_MEMORY_CLIENT_PCIE4R &emc>,
                                <&mc TEGRA194_MEMORY_CLIENT_PCIE4W &emc>;
                interconnect-names = "dma-mem", "write";
-               iommus = <&smmu TEGRA194_SID_PCIE4>;
                iommu-map = <0x0 &smmu TEGRA194_SID_PCIE4 0x1000>;
                iommu-map-mask = <0x0>;
                dma-coherent;
                interconnects = <&mc TEGRA194_MEMORY_CLIENT_PCIE0R &emc>,
                                <&mc TEGRA194_MEMORY_CLIENT_PCIE0W &emc>;
                interconnect-names = "dma-mem", "write";
-               iommus = <&smmu TEGRA194_SID_PCIE0>;
                iommu-map = <0x0 &smmu TEGRA194_SID_PCIE0 0x1000>;
                iommu-map-mask = <0x0>;
                dma-coherent;
                interconnects = <&mc TEGRA194_MEMORY_CLIENT_PCIE5R &emc>,
                                <&mc TEGRA194_MEMORY_CLIENT_PCIE5W &emc>;
                interconnect-names = "dma-mem", "write";
-               iommus = <&smmu TEGRA194_SID_PCIE5>;
                iommu-map = <0x0 &smmu TEGRA194_SID_PCIE5 0x1000>;
                iommu-map-mask = <0x0>;
                dma-coherent;
                compatible = "nvidia,tegra186-bpmp";
                mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_DB
                                    TEGRA_HSP_DB_MASTER_BPMP>;
-               shmem = <&cpu_bpmp_tx &cpu_bpmp_rx>;
+               shmem = <&cpu_bpmp_tx>, <&cpu_bpmp_rx>;
                #clock-cells = <1>;
                #reset-cells = <1>;
                #power-domain-cells = <1>;
                iommus = <&smmu TEGRA194_SID_APE>;
        };
 
-       tcu: tcu {
+       tcu: serial {
                compatible = "nvidia,tegra194-tcu";
                mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_SM TEGRA_HSP_SM_RX(0)>,
                         <&hsp_aon TEGRA_HSP_MBOX_TYPE_SM TEGRA_HSP_SM_TX(1)>;
        };
 
        thermal-zones {
-               cpu {
-                       thermal-sensors = <&{/bpmp/thermal}
-                                          TEGRA194_BPMP_THERMAL_ZONE_CPU>;
+               cpu-thermal {
+                       thermal-sensors = <&{/bpmp/thermal} TEGRA194_BPMP_THERMAL_ZONE_CPU>;
                        status = "disabled";
                };
 
-               gpu {
-                       thermal-sensors = <&{/bpmp/thermal}
-                                          TEGRA194_BPMP_THERMAL_ZONE_GPU>;
+               gpu-thermal {
+                       thermal-sensors = <&{/bpmp/thermal} TEGRA194_BPMP_THERMAL_ZONE_GPU>;
                        status = "disabled";
                };
 
-               aux {
-                       thermal-sensors = <&{/bpmp/thermal}
-                                          TEGRA194_BPMP_THERMAL_ZONE_AUX>;
+               aux-thermal {
+                       thermal-sensors = <&{/bpmp/thermal} TEGRA194_BPMP_THERMAL_ZONE_AUX>;
                        status = "disabled";
                };
 
-               pllx {
-                       thermal-sensors = <&{/bpmp/thermal}
-                                          TEGRA194_BPMP_THERMAL_ZONE_PLLX>;
+               pllx-thermal {
+                       thermal-sensors = <&{/bpmp/thermal} TEGRA194_BPMP_THERMAL_ZONE_PLLX>;
                        status = "disabled";
                };
 
-               ao {
-                       thermal-sensors = <&{/bpmp/thermal}
-                                          TEGRA194_BPMP_THERMAL_ZONE_AO>;
+               ao-thermal {
+                       thermal-sensors = <&{/bpmp/thermal} TEGRA194_BPMP_THERMAL_ZONE_AO>;
                        status = "disabled";
                };
 
-               tj {
-                       thermal-sensors = <&{/bpmp/thermal}
-                                          TEGRA194_BPMP_THERMAL_ZONE_TJ_MAX>;
+               tj-thermal {
+                       thermal-sensors = <&{/bpmp/thermal} TEGRA194_BPMP_THERMAL_ZONE_TJ_MAX>;
                        status = "disabled";
                };
        };
index 6077d57..75eb743 100644 (file)
                vqmmc-supply = <&vdd_1v8>;
        };
 
-       clk32k_in: clock@0 {
+       clk32k_in: clock-32k {
                compatible = "fixed-clock";
                clock-frequency = <32768>;
                #clock-cells = <0>;
                method = "smc";
        };
 
-       vdd_gpu: regulator@100 {
+       vdd_gpu: regulator-vdd-gpu {
                compatible = "pwm-regulator";
                pwms = <&pwm 1 8000>;
                regulator-name = "VDD_GPU";
index 2e17df6..328fbfe 100644 (file)
        pcie@1003000 {
                status = "okay";
 
-               avdd-pll-uerefe-supply = <&avdd_1v05_pll>;
                hvddio-pex-supply = <&vdd_1v8>;
                dvddio-pex-supply = <&vdd_pex_1v05>;
-               dvdd-pex-pll-supply = <&vdd_pex_1v05>;
-               hvdd-pex-pll-e-supply = <&vdd_1v8>;
                vddio-pex-ctl-supply = <&vdd_1v8>;
 
                pci@1,0 {
index 58aa051..0a70dae 100644 (file)
@@ -40,7 +40,7 @@
                non-removable;
        };
 
-       clk32k_in: clock@0 {
+       clk32k_in: clock-32k {
                compatible = "fixed-clock";
                clock-frequency = <32768>;
                #clock-cells = <0>;
index d8409c1..4b43b89 100644 (file)
                dvddio-pex-supply = <&vdd_pex_1v05>;
                hvddio-pex-supply = <&vdd_1v8>;
                avdd-usb-supply = <&vdd_3v3_sys>;
-               /* XXX what are these? */
-               avdd-pll-utmip-supply = <&vdd_1v8>;
-               avdd-pll-uerefe-supply = <&vdd_pex_1v05>;
-               dvdd-usb-ss-pll-supply = <&vdd_pex_1v05>;
-               hvdd-usb-ss-pll-e-supply = <&vdd_1v8>;
 
                status = "okay";
 
                };
        };
 
-       vdd_sys_mux: regulator@0 {
+       vdd_sys_mux: regulator-vdd-sys-mux {
                compatible = "regulator-fixed";
                regulator-name = "VDD_SYS_MUX";
                regulator-min-microvolt = <5000000>;
                regulator-boot-on;
        };
 
-       vdd_5v0_sys: regulator@1 {
+       vdd_5v0_sys: regulator-vdd-5v0-sys {
                compatible = "regulator-fixed";
                regulator-name = "VDD_5V0_SYS";
                regulator-min-microvolt = <5000000>;
                vin-supply = <&vdd_sys_mux>;
        };
 
-       vdd_3v3_sys: regulator@2 {
+       vdd_3v3_sys: regulator-vdd-3v3-sys {
                compatible = "regulator-fixed";
                regulator-name = "VDD_3V3_SYS";
                regulator-min-microvolt = <3300000>;
                vin-supply = <&vdd_sys_mux>;
 
                regulator-enable-ramp-delay = <160>;
-               regulator-disable-ramp-delay = <10000>;
        };
 
-       vdd_5v0_io: regulator@3 {
+       vdd_5v0_io: regulator-vdd-5v0-io {
                compatible = "regulator-fixed";
                regulator-name = "VDD_5V0_IO_SYS";
                regulator-min-microvolt = <5000000>;
                regulator-boot-on;
        };
 
-       vdd_3v3_sd: regulator@4 {
+       vdd_3v3_sd: regulator-vdd-3v3-sd {
                compatible = "regulator-fixed";
                regulator-name = "VDD_3V3_SD";
                regulator-min-microvolt = <3300000>;
                vin-supply = <&vdd_3v3_sys>;
 
                regulator-enable-ramp-delay = <472>;
-               regulator-disable-ramp-delay = <4880>;
        };
 
-       vdd_dsi_csi: regulator@5 {
+       vdd_dsi_csi: regulator-vdd-dsi-csi {
                compatible = "regulator-fixed";
                regulator-name = "AVDD_DSI_CSI_1V2";
                regulator-min-microvolt = <1200000>;
                vin-supply = <&vdd_sys_1v2>;
        };
 
-       vdd_3v3_dis: regulator@6 {
+       vdd_3v3_dis: regulator-vdd-3v3-dis {
                compatible = "regulator-fixed";
                regulator-name = "VDD_DIS_3V3_LCD";
                regulator-min-microvolt = <3300000>;
                vin-supply = <&vdd_3v3_sys>;
        };
 
-       vdd_1v8_dis: regulator@7 {
+       vdd_1v8_dis: regulator-vdd-1v8-dis {
                compatible = "regulator-fixed";
                regulator-name = "VDD_LCD_1V8_DIS";
                regulator-min-microvolt = <1800000>;
                vin-supply = <&vdd_1v8>;
        };
 
-       vdd_5v0_rtl: regulator@8 {
+       vdd_5v0_rtl: regulator-vdd-5v0-rtl {
                compatible = "regulator-fixed";
                regulator-name = "RTL_5V";
                regulator-min-microvolt = <5000000>;
                vin-supply = <&vdd_5v0_sys>;
        };
 
-       vdd_usb_vbus: regulator@9 {
+       vdd_usb_vbus: regulator-vdd-usb-vbus {
                compatible = "regulator-fixed";
                regulator-name = "USB_VBUS_EN1";
                regulator-min-microvolt = <5000000>;
                vin-supply = <&vdd_5v0_sys>;
        };
 
-       vdd_hdmi: regulator@10 {
+       vdd_hdmi: regulator-vdd-hdmi {
                compatible = "regulator-fixed";
                regulator-name = "VDD_HDMI_5V0";
                regulator-min-microvolt = <5000000>;
                vin-supply = <&vdd_5v0_sys>;
        };
 
-       vdd_cam_1v2: regulator@11 {
+       vdd_cam_1v2: regulator-vdd-cam-1v8 {
                compatible = "regulator-fixed";
                regulator-name = "vdd-cam-1v2";
                regulator-min-microvolt = <1200000>;
                vin-supply = <&vdd_3v3_sys>;
        };
 
-       vdd_cam_2v8: regulator@12 {
+       vdd_cam_2v8: regulator-vdd-cam-2v8 {
                compatible = "regulator-fixed";
                regulator-name = "vdd-cam-2v8";
                regulator-min-microvolt = <2800000>;
                vin-supply = <&vdd_3v3_sys>;
        };
 
-       vdd_cam_1v8: regulator@13 {
+       vdd_cam_1v8: regulator-vdd-cam-1v8 {
                compatible = "regulator-fixed";
                regulator-name = "vdd-cam-1v8";
                regulator-min-microvolt = <1800000>;
                vin-supply = <&vdd_3v3_sys>;
        };
 
-       vdd_usb_vbus_otg: regulator@14 {
+       vdd_usb_vbus_otg: regulator-vdd-usb-vbus-otg {
                compatible = "regulator-fixed";
                regulator-name = "USB_VBUS_EN0";
                regulator-min-microvolt = <5000000>;
index 41beab6..10347b6 100644 (file)
                                };
                        };
 
-                       gpio@0 {
+                       hog-0 {
                                gpio-hog;
                                output-high;
                                gpios = <2 GPIO_ACTIVE_HIGH>,
                status = "okay";
        };
 
-       clk32k_in: clock@0 {
+       clk32k_in: clock-32k {
                compatible = "fixed-clock";
                clock-frequency = <32768>;
                #clock-cells = <0>;
                method = "smc";
        };
 
-       battery_reg: regulator@0 {
+       battery_reg: regulator-vdd-ac-bat {
                compatible = "regulator-fixed";
                regulator-name = "vdd-ac-bat";
                regulator-min-microvolt = <5000000>;
                regulator-always-on;
        };
 
-       vdd_3v3: regulator@1 {
+       vdd_3v3: regulator-vdd-3v3 {
                compatible = "regulator-fixed";
                regulator-name = "vdd-3v3";
                regulator-enable-ramp-delay = <160>;
                enable-active-high;
        };
 
-       max77620_gpio7: regulator@2 {
+       max77620_gpio7: regulator-max77620-gpio7 {
                compatible = "regulator-fixed";
                regulator-name = "max77620-gpio7";
                regulator-enable-ramp-delay = <240>;
                enable-active-high;
        };
 
-       lcd_bl_en: regulator@3 {
+       lcd_bl_en: regulator-lcd-bl-en {
                compatible = "regulator-fixed";
                regulator-name = "lcd-bl-en";
                regulator-min-microvolt = <1800000>;
                enable-active-high;
        };
 
-       en_vdd_sd: regulator@4 {
+       en_vdd_sd: regulator-vdd-sd {
                compatible = "regulator-fixed";
                regulator-name = "en-vdd-sd";
                regulator-enable-ramp-delay = <472>;
                enable-active-high;
        };
 
-       en_vdd_cam: regulator@5 {
+       en_vdd_cam: regulator-vdd-cam {
                compatible = "regulator-fixed";
                regulator-name = "en-vdd-cam";
                regulator-min-microvolt = <1800000>;
                enable-active-high;
        };
 
-       vdd_sys_boost: regulator@6 {
+       vdd_sys_boost: regulator-vdd-sys-boost {
                compatible = "regulator-fixed";
                regulator-name = "vdd-sys-boost";
                regulator-enable-ramp-delay = <3090>;
                enable-active-high;
        };
 
-       vdd_hdmi: regulator@7 {
+       vdd_hdmi: regulator-vdd-hdmi {
                compatible = "regulator-fixed";
                regulator-name = "vdd-hdmi";
                regulator-enable-ramp-delay = <468>;
                enable-active-high;
        };
 
-       en_vdd_cpu_fixed: regulator@8 {
+       en_vdd_cpu_fixed: regulator-vdd-cpu-fixed {
                compatible = "regulator-fixed";
                regulator-name = "vdd-cpu-fixed";
                regulator-min-microvolt = <1000000>;
                regulator-max-microvolt = <1000000>;
        };
 
-       vdd_aux_3v3: regulator@9 {
+       vdd_aux_3v3: regulator-vdd-aux-3v3 {
                compatible = "regulator-fixed";
                regulator-name = "aux-3v3";
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
        };
 
-       vdd_snsr_pm: regulator@10 {
+       vdd_snsr_pm: regulator-vdd-snsr-pm {
                compatible = "regulator-fixed";
                regulator-name = "snsr_pm";
                regulator-min-microvolt = <3300000>;
                enable-active-high;
        };
 
-       vdd_usb_5v0: regulator@11 {
+       vdd_usb_5v0: regulator-vdd-usb-5v0 {
                compatible = "regulator-fixed";
                status = "disabled";
                regulator-name = "vdd-usb-5v0";
                enable-active-high;
        };
 
-       vdd_cdc_1v2_aud: regulator@101 {
+       vdd_cdc_1v2_aud: regulator-vdd-cdc-1v2-aud {
                compatible = "regulator-fixed";
                status = "disabled";
                regulator-name = "vdd_cdc_1v2_aud";
                enable-active-high;
        };
 
-       vdd_disp_3v0: regulator@12 {
+       vdd_disp_3v0: regulator-vdd-disp-3v0 {
                compatible = "regulator-fixed";
                regulator-name = "vdd-disp-3v0";
                regulator-enable-ramp-delay = <232>;
                enable-active-high;
        };
 
-       vdd_fan: regulator@13 {
+       vdd_fan: regulator-vdd-fan {
                compatible = "regulator-fixed";
                regulator-name = "vdd-fan";
                regulator-enable-ramp-delay = <284>;
                enable-active-high;
        };
 
-       usb_vbus1: regulator@14 {
+       usb_vbus1: regulator-usb-vbus1 {
                compatible = "regulator-fixed";
                regulator-name = "usb-vbus1";
                regulator-min-microvolt = <5000000>;
                gpio-open-drain;
        };
 
-       usb_vbus2: regulator@15 {
+       usb_vbus2: regulator-usb-vbus2 {
                compatible = "regulator-fixed";
                regulator-name = "usb-vbus2";
                regulator-min-microvolt = <5000000>;
                gpio-open-drain;
        };
 
-       vdd_3v3_eth: regulator@16 {
+       vdd_3v3_eth: regulator-vdd-3v3-eth {
                compatible = "regulator-fixed";
                regulator-name = "vdd-3v3-eth-a02";
                regulator-min-microvolt = <3300000>;
index 030f264..72c2dc3 100644 (file)
        pcie@1003000 {
                status = "okay";
 
-               avdd-pll-uerefe-supply = <&vdd_pex_1v05>;
                hvddio-pex-supply = <&vdd_1v8>;
                dvddio-pex-supply = <&vdd_pex_1v05>;
-               dvdd-pex-pll-supply = <&vdd_pex_1v05>;
-               hvdd-pex-pll-e-supply = <&vdd_1v8>;
                vddio-pex-ctl-supply = <&vdd_1v8>;
 
                pci@1,0 {
                                        regulator-min-microvolt = <1000000>;
                                        regulator-max-microvolt = <1170000>;
                                        regulator-enable-ramp-delay = <146>;
-                                       regulator-disable-ramp-delay = <4080>;
                                        regulator-ramp-delay = <27500>;
                                        regulator-ramp-delay-scale = <300>;
                                        regulator-always-on;
                                        regulator-min-microvolt = <1150000>;
                                        regulator-max-microvolt = <1150000>;
                                        regulator-enable-ramp-delay = <176>;
-                                       regulator-disable-ramp-delay = <145800>;
                                        regulator-ramp-delay = <27500>;
                                        regulator-ramp-delay-scale = <300>;
                                        regulator-always-on;
                                        regulator-min-microvolt = <1350000>;
                                        regulator-max-microvolt = <1350000>;
                                        regulator-enable-ramp-delay = <176>;
-                                       regulator-disable-ramp-delay = <32000>;
                                        regulator-ramp-delay = <27500>;
                                        regulator-ramp-delay-scale = <350>;
                                        regulator-always-on;
                                        regulator-min-microvolt = <1800000>;
                                        regulator-max-microvolt = <1800000>;
                                        regulator-enable-ramp-delay = <242>;
-                                       regulator-disable-ramp-delay = <118000>;
                                        regulator-ramp-delay = <27500>;
                                        regulator-ramp-delay-scale = <360>;
                                        regulator-always-on;
                                        regulator-min-microvolt = <1200000>;
                                        regulator-max-microvolt = <1200000>;
                                        regulator-enable-ramp-delay = <26>;
-                                       regulator-disable-ramp-delay = <626>;
                                        regulator-ramp-delay = <100000>;
                                        regulator-ramp-delay-scale = <200>;
                                        regulator-always-on;
                                        regulator-min-microvolt = <1050000>;
                                        regulator-max-microvolt = <1050000>;
                                        regulator-enable-ramp-delay = <22>;
-                                       regulator-disable-ramp-delay = <650>;
                                        regulator-ramp-delay = <100000>;
                                        regulator-ramp-delay-scale = <200>;
 
                                        regulator-min-microvolt = <1800000>;
                                        regulator-max-microvolt = <3300000>;
                                        regulator-enable-ramp-delay = <62>;
-                                       regulator-disable-ramp-delay = <650>;
                                        regulator-ramp-delay = <100000>;
                                        regulator-ramp-delay-scale = <200>;
 
                                        regulator-min-microvolt = <850000>;
                                        regulator-max-microvolt = <1100000>;
                                        regulator-enable-ramp-delay = <22>;
-                                       regulator-disable-ramp-delay = <610>;
                                        regulator-ramp-delay = <100000>;
                                        regulator-ramp-delay-scale = <200>;
                                        regulator-disable-active-discharge;
                                        regulator-min-microvolt = <1050000>;
                                        regulator-max-microvolt = <1050000>;
                                        regulator-enable-ramp-delay = <24>;
-                                       regulator-disable-ramp-delay = <2768>;
                                        regulator-ramp-delay = <100000>;
                                        regulator-ramp-delay-scale = <200>;
 
                                        regulator-min-microvolt = <1050000>;
                                        regulator-max-microvolt = <1050000>;
                                        regulator-enable-ramp-delay = <22>;
-                                       regulator-disable-ramp-delay = <1160>;
                                        regulator-ramp-delay = <100000>;
                                        regulator-ramp-delay-scale = <200>;
 
                avdd-usb-supply = <&vdd_3v3_sys>;
                dvddio-pex-supply = <&vdd_pex_1v05>;
                hvddio-pex-supply = <&vdd_1v8>;
-               /* these really belong to the XUSB pad controller */
-               avdd-pll-utmip-supply = <&vdd_1v8>;
-               avdd-pll-uerefe-supply = <&vdd_pex_1v05>;
-               dvdd-usb-ss-pll-supply = <&vdd_pex_1v05>;
-               hvdd-usb-ss-pll-e-supply = <&vdd_1v8>;
 
                status = "okay";
        };
                                        i2s4_port: port@1 {
                                                reg = <1>;
 
-                                               i2s4_dap_ep: endpoint@0 {
+                                               i2s4_dap_ep: endpoint {
                                                        dai-format = "i2s";
                                                        /* Placeholder for external Codec */
                                                };
                                        port@0 {
                                                reg = <0>;
 
-                                               dmic1_cif_ep: endpoint@0 {
+                                               dmic1_cif_ep: endpoint {
                                                        remote-endpoint = <&xbar_dmic1_ep>;
                                                };
                                        };
                                        dmic1_port: port@1 {
                                                reg = <1>;
 
-                                               dmic1_dap_ep: endpoint@0 {
+                                               dmic1_dap_ep: endpoint {
                                                        /* Placeholder for external Codec */
                                                };
                                        };
                                        port@0 {
                                                reg = <0>;
 
-                                               dmic2_cif_ep: endpoint@0 {
+                                               dmic2_cif_ep: endpoint {
                                                        remote-endpoint = <&xbar_dmic2_ep>;
                                                };
                                        };
                                        dmic2_port: port@1 {
                                                reg = <1>;
 
-                                               dmic2_dap_ep: endpoint@0 {
+                                               dmic2_dap_ep: endpoint {
                                                        /* Placeholder for external Codec */
                                                };
                                        };
                status = "okay";
 
                flash@0 {
-                       compatible = "spi-nor";
+                       compatible = "jedec,spi-nor";
                        reg = <0>;
                        spi-max-frequency = <104000000>;
                        spi-tx-bus-width = <2>;
                };
        };
 
-       clk32k_in: clock@0 {
+       clk32k_in: clock-32k {
                compatible = "fixed-clock";
                clock-frequency = <32768>;
                #clock-cells = <0>;
        };
 
        thermal-zones {
-               cpu {
+               cpu-thermal {
                        trips {
                                cpu_trip_critical: critical {
                                        temperature = <96500>;
                method = "smc";
        };
 
-       vdd_5v0_sys: regulator@0 {
+       vdd_5v0_sys: regulator-vdd-5v0-sys {
                compatible = "regulator-fixed";
 
                regulator-name = "VDD_5V0_SYS";
                regulator-boot-on;
        };
 
-       vdd_3v3_sys: regulator@1 {
+       vdd_3v3_sys: regulator-vdd-3v3-sys {
                compatible = "regulator-fixed";
 
                regulator-name = "VDD_3V3_SYS";
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
                regulator-enable-ramp-delay = <240>;
-               regulator-disable-ramp-delay = <11340>;
                regulator-always-on;
                regulator-boot-on;
 
                vin-supply = <&vdd_5v0_sys>;
        };
 
-       vdd_3v3_sd: regulator@2 {
+       vdd_3v3_sd: regulator-vdd-3v3-sd {
                compatible = "regulator-fixed";
 
                regulator-name = "VDD_3V3_SD";
                vin-supply = <&vdd_3v3_sys>;
        };
 
-       vdd_hdmi: regulator@3 {
+       vdd_hdmi: regulator-vdd-hdmi-5v0 {
                compatible = "regulator-fixed";
 
                regulator-name = "VDD_HDMI_5V0";
                vin-supply = <&vdd_5v0_sys>;
        };
 
-       vdd_hub_3v3: regulator@4 {
+       vdd_hub_3v3: regulator-vdd-hub-3v3 {
                compatible = "regulator-fixed";
 
                regulator-name = "VDD_HUB_3V3";
                vin-supply = <&vdd_5v0_sys>;
        };
 
-       vdd_cpu: regulator@5 {
+       vdd_cpu: regulator-vdd-cpu {
                compatible = "regulator-fixed";
 
                regulator-name = "VDD_CPU";
                vin-supply = <&vdd_5v0_sys>;
        };
 
-       vdd_gpu: regulator@6 {
+       vdd_gpu: regulator-vdd-gpu {
                compatible = "pwm-regulator";
                pwms = <&pwm 1 8000>;
 
                vin-supply = <&vdd_5v0_sys>;
        };
 
-       avdd_io_edp_1v05: regulator@7 {
+       avdd_io_edp_1v05: regulator-avdd-io-epd-1v05 {
                compatible = "regulator-fixed";
 
                regulator-name = "AVDD_IO_EDP_1V05";
                vin-supply = <&avdd_1v05_pll>;
        };
 
-       vdd_5v0_usb: regulator@8 {
+       vdd_5v0_usb: regulator-vdd-5v-usb {
                compatible = "regulator-fixed";
 
                regulator-name = "VDD_5V_USB";
index 131c064..a263d51 100644 (file)
                dvddio-pex-supply = <&avddio_1v05>;
                hvddio-pex-supply = <&pp1800>;
                avdd-usb-supply = <&pp3300>;
-               avdd-pll-utmip-supply = <&pp1800>;
-               avdd-pll-uerefe-supply = <&pp1050_avdd>;
-               dvdd-pex-pll-supply = <&avddio_1v05>;
-               hvdd-pex-pll-e-supply = <&pp1800>;
 
                status = "okay";
        };
                };
        };
 
-       clk32k_in: clock@0 {
+       clk32k_in: clock-32k {
                compatible = "fixed-clock";
                clock-frequency = <32768>;
                #clock-cells = <0>;
                method = "smc";
        };
 
-       ppvar_sys: regulator@0 {
+       ppvar_sys: regulator-ppvar-sys {
                compatible = "regulator-fixed";
                regulator-name = "PPVAR_SYS";
                regulator-min-microvolt = <4400000>;
                regulator-always-on;
        };
 
-       pplcd_vdd: regulator@1 {
+       pplcd_vdd: regulator-pplcd-vdd {
                compatible = "regulator-fixed";
                regulator-name = "PPLCD_VDD";
                regulator-min-microvolt = <4400000>;
                regulator-boot-on;
        };
 
-       pp3000_always: regulator@2 {
+       pp3000_always: regulator-pp3000-always {
                compatible = "regulator-fixed";
                regulator-name = "PP3000_ALWAYS";
                regulator-min-microvolt = <3000000>;
                regulator-always-on;
        };
 
-       pp3300: regulator@3 {
+       pp3300: regulator-pp3000 {
                compatible = "regulator-fixed";
                regulator-name = "PP3300";
                regulator-min-microvolt = <3300000>;
                enable-active-high;
        };
 
-       pp5000: regulator@4 {
+       pp5000: regulator-pp5000 {
                compatible = "regulator-fixed";
                regulator-name = "PP5000";
                regulator-min-microvolt = <5000000>;
                regulator-always-on;
        };
 
-       pp1800_lcdio: regulator@5 {
+       pp1800_lcdio: regulator-pp1800-lcdio {
                compatible = "regulator-fixed";
                regulator-name = "PP1800_LCDIO";
                regulator-min-microvolt = <1800000>;
                regulator-boot-on;
        };
 
-       pp1800_cam: regulator@6 {
+       pp1800_cam: regulator-pp1800-cam {
                compatible = "regulator-fixed";
                regulator-name = "PP1800_CAM";
                regulator-min-microvolt = <1800000>;
                enable-active-high;
        };
 
-       usbc_vbus: regulator@7 {
+       usbc_vbus: regulator-usbc-vbus {
                compatible = "regulator-fixed";
                regulator-name = "USBC_VBUS";
                regulator-min-microvolt = <5000000>;
index ccdc0de..218a2b3 100644 (file)
@@ -93,8 +93,8 @@
                interrupt-names = "syncpt", "host1x";
                clocks = <&tegra_car TEGRA210_CLK_HOST1X>;
                clock-names = "host1x";
-               resets = <&tegra_car 28>;
-               reset-names = "host1x";
+               resets = <&tegra_car 28>, <&mc TEGRA210_MC_RESET_HC>;
+               reset-names = "host1x", "mc";
 
                #address-cells = <2>;
                #size-cells = <2>;
                tsec@54100000 {
                        compatible = "nvidia,tegra210-tsec";
                        reg = <0x0 0x54100000 0x0 0x00040000>;
+                       interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&tegra_car TEGRA210_CLK_TSEC>;
+                       clock-names = "tsec";
+                       resets = <&tegra_car 83>;
+                       reset-names = "tsec";
+                       status = "disabled";
                };
 
                dc@54200000 {
                tsec@54500000 {
                        compatible = "nvidia,tegra210-tsec";
                        reg = <0x0 0x54500000 0x0 0x00040000>;
+                       interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&tegra_car TEGRA210_CLK_TSECB>;
+                       clock-names = "tsec";
+                       resets = <&tegra_car 206>;
+                       reset-names = "tsec";
                        status = "disabled";
                };
 
                         <&tegra_car TEGRA210_CLK_XUSB_HOST_SRC>,
                         <&tegra_car TEGRA210_CLK_XUSB_FALCON_SRC>,
                         <&tegra_car TEGRA210_CLK_XUSB_SS>,
-                        <&tegra_car TEGRA210_CLK_XUSB_SS_SRC>,
                         <&tegra_car TEGRA210_CLK_XUSB_SS_DIV2>,
+                        <&tegra_car TEGRA210_CLK_XUSB_SS_SRC>,
                         <&tegra_car TEGRA210_CLK_XUSB_HS_SRC>,
                         <&tegra_car TEGRA210_CLK_XUSB_FS_SRC>,
                         <&tegra_car TEGRA210_CLK_PLL_U_480M>,
                         <&tegra_car TEGRA210_CLK_PLL_E>;
                clock-names = "xusb_host", "xusb_host_src",
                              "xusb_falcon_src", "xusb_ss",
-                             "xusb_ss_src", "xusb_ss_div2",
+                             "xusb_ss_div2", "xusb_ss_src",
                              "xusb_hs_src", "xusb_fs_src",
                              "pll_u_480m", "clk_m", "pll_e";
                resets = <&tegra_car 89>, <&tegra_car 156>,
        };
 
        thermal-zones {
-               cpu {
+               cpu-thermal {
                        polling-delay-passive = <1000>;
                        polling-delay = <0>;
 
                        };
                };
 
-               mem {
+               mem-thermal {
                        polling-delay-passive = <0>;
                        polling-delay = <0>;
 
                        };
                };
 
-               gpu {
+               gpu-thermal {
                        polling-delay-passive = <1000>;
                        polling-delay = <0>;
 
                        };
                };
 
-               pllx {
+               pllx-thermal {
                        polling-delay-passive = <0>;
                        polling-delay = <0>;
 
diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3701-0000.dtsi b/arch/arm64/boot/dts/nvidia/tegra234-p3701-0000.dtsi
new file mode 100644 (file)
index 0000000..d95a542
--- /dev/null
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include "tegra234.dtsi"
+
+/ {
+       model = "NVIDIA Jetson AGX Orin";
+       compatible = "nvidia,p3701-0000", "nvidia,tegra234";
+
+       bus@0 {
+               mmc@3460000 {
+                       status = "okay";
+                       bus-width = <8>;
+                       non-removable;
+               };
+
+               rtc@c2a0000 {
+                       status = "okay";
+               };
+
+               pmc@c360000 {
+                       nvidia,invert-interrupt;
+               };
+       };
+};
diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts
new file mode 100644 (file)
index 0000000..efbbb87
--- /dev/null
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+
+#include "tegra234-p3701-0000.dtsi"
+#include "tegra234-p3737-0000.dtsi"
+
+/ {
+       model = "NVIDIA Jetson AGX Orin Developer Kit";
+       compatible = "nvidia,p3737-0000+p3701-0000", "nvidia,p3701-0000", "nvidia,tegra234";
+
+       aliases {
+               mmc3 = "/bus@0/mmc@3460000";
+               serial0 = &tcu;
+       };
+
+       chosen {
+               bootargs = "console=ttyS0,115200n8";
+               stdout-path = "serial0:115200n8";
+       };
+
+       serial {
+               status = "okay";
+       };
+};
diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi
new file mode 100644 (file)
index 0000000..a85993c
--- /dev/null
@@ -0,0 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/ {
+       compatible = "nvidia,p3737-0000";
+};
index b5d9a55..5804acf 100644 (file)
@@ -26,7 +26,6 @@
                        status = "okay";
                        bus-width = <8>;
                        non-removable;
-                       only-1-8-v;
                };
 
                rtc@c2a0000 {
index f0efb3a..6b6f158 100644 (file)
@@ -3,6 +3,7 @@
 #include <dt-bindings/clock/tegra234-clock.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/mailbox/tegra186-hsp.h>
+#include <dt-bindings/memory/tegra234-mc.h>
 #include <dt-bindings/reset/tegra234-reset.h>
 
 / {
                        status = "okay";
                };
 
+               gpio: gpio@2200000 {
+                       compatible = "nvidia,tegra234-gpio";
+                       reg-names = "security", "gpio";
+                       reg = <0x02200000 0x10000>,
+                             <0x02210000 0x10000>;
+                       interrupts = <GIC_SPI 288 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 289 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 291 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 292 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 293 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 294 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 295 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 296 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 297 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 298 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 299 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 301 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 302 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 303 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 304 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 306 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+               };
+
+               mc: memory-controller@2c00000 {
+                       compatible = "nvidia,tegra234-mc";
+                       reg = <0x02c00000 0x100000>,
+                             <0x02b80000 0x040000>,
+                             <0x01700000 0x100000>;
+                       interrupts = <GIC_SPI 223 IRQ_TYPE_LEVEL_HIGH>;
+                       #interconnect-cells = <1>;
+                       status = "okay";
+
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+
+                       ranges = <0x01700000 0x0 0x01700000 0x0 0x100000>,
+                                <0x02b80000 0x0 0x02b80000 0x0 0x040000>,
+                                <0x02c00000 0x0 0x02c00000 0x0 0x100000>;
+
+                       /*
+                        * Bit 39 of addresses passing through the memory
+                        * controller selects the XBAR format used when memory
+                        * is accessed. This is used to transparently access
+                        * memory in the XBAR format used by the discrete GPU
+                        * (bit 39 set) or Tegra (bit 39 clear).
+                        *
+                        * As a consequence, the operating system must ensure
+                        * that bit 39 is never used implicitly, for example
+                        * via an I/O virtual address mapping of an IOMMU. If
+                        * devices require access to the XBAR switch, their
+                        * drivers must set this bit explicitly.
+                        *
+                        * Limit the DMA range for memory clients to [38:0].
+                        */
+                       dma-ranges = <0x0 0x0 0x0 0x80 0x0>;
+
+                       emc: external-memory-controller@2c60000 {
+                               compatible = "nvidia,tegra234-emc";
+                               reg = <0x0 0x02c60000 0x0 0x90000>,
+                                     <0x0 0x01780000 0x0 0x80000>;
+                               interrupts = <GIC_SPI 224 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&bpmp TEGRA234_CLK_EMC>;
+                               clock-names = "emc";
+                               status = "okay";
+
+                               #interconnect-cells = <0>;
+
+                               nvidia,bpmp = <&bpmp>;
+                       };
+               };
+
                uarta: serial@3100000 {
                        compatible = "nvidia,tegra234-uart", "nvidia,tegra20-uart";
                        reg = <0x03100000 0x10000>;
                        compatible = "nvidia,tegra234-sdhci", "nvidia,tegra186-sdhci";
                        reg = <0x03460000 0x20000>;
                        interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&bpmp TEGRA234_CLK_SDMMC4>;
-                       clock-names = "sdhci";
+                       clocks = <&bpmp TEGRA234_CLK_SDMMC4>,
+                                <&bpmp TEGRA234_CLK_SDMMC_LEGACY_TM>;
+                       clock-names = "sdhci", "tmclk";
+                       assigned-clocks = <&bpmp TEGRA234_CLK_SDMMC4>,
+                                         <&bpmp TEGRA234_CLK_PLLC4>;
+                       assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLC4>;
                        resets = <&bpmp TEGRA234_RESET_SDMMC4>;
                        reset-names = "sdhci";
-                       dma-coherent;
+                       interconnects = <&mc TEGRA234_MEMORY_CLIENT_SDMMCRAB &emc>,
+                                       <&mc TEGRA234_MEMORY_CLIENT_SDMMCWAB &emc>;
+                       interconnect-names = "dma-mem", "write";
+                       nvidia,pad-autocal-pull-up-offset-hs400 = <0x00>;
+                       nvidia,pad-autocal-pull-down-offset-hs400 = <0x00>;
+                       nvidia,pad-autocal-pull-up-offset-1v8-timeout = <0x0a>;
+                       nvidia,pad-autocal-pull-down-offset-1v8-timeout = <0x0a>;
+                       nvidia,pad-autocal-pull-up-offset-3v3-timeout = <0x0a>;
+                       nvidia,pad-autocal-pull-down-offset-3v3-timeout = <0x0a>;
+                       nvidia,default-tap = <0x8>;
+                       nvidia,default-trim = <0x14>;
+                       nvidia,dqs-trim = <40>;
+                       supports-cqe;
                        status = "disabled";
                };
 
                        reg = <0x0c2a0000 0x10000>;
                        interrupt-parent = <&pmc>;
                        interrupts = <73 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&bpmp TEGRA234_CLK_CLK_32K>;
+                       clock-names = "rtc";
                        status = "disabled";
                };
 
+               gpio_aon: gpio@c2f0000 {
+                       compatible = "nvidia,tegra234-gpio-aon";
+                       reg-names = "security", "gpio";
+                       reg = <0x0c2f0000 0x1000>,
+                             <0x0c2f1000 0x1000>;
+                       interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+               };
+
                pmc: pmc@c360000 {
                        compatible = "nvidia,tegra234-pmc";
                        reg = <0x0c360000 0x10000>,
                };
        };
 
-       sysram@40000000 {
+       sram@40000000 {
                compatible = "nvidia,tegra234-sysram", "mmio-sram";
-               reg = <0x0 0x40000000 0x0 0x50000>;
+               reg = <0x0 0x40000000 0x0 0x80000>;
                #address-cells = <1>;
                #size-cells = <1>;
-               ranges = <0x0 0x0 0x40000000 0x50000>;
+               ranges = <0x0 0x0 0x40000000 0x80000>;
 
-               cpu_bpmp_tx: shmem@4e000 {
-                       reg = <0x4e000 0x1000>;
+               cpu_bpmp_tx: sram@70000 {
+                       reg = <0x70000 0x1000>;
                        label = "cpu-bpmp-tx";
                        pool;
                };
 
-               cpu_bpmp_rx: shmem@4f000 {
-                       reg = <0x4f000 0x1000>;
+               cpu_bpmp_rx: sram@71000 {
+                       reg = <0x71000 0x1000>;
                        label = "cpu-bpmp-rx";
                        pool;
                };
                compatible = "nvidia,tegra234-bpmp", "nvidia,tegra186-bpmp";
                mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_DB
                                    TEGRA_HSP_DB_MASTER_BPMP>;
-               shmem = <&cpu_bpmp_tx &cpu_bpmp_rx>;
+               shmem = <&cpu_bpmp_tx>, <&cpu_bpmp_rx>;
                #clock-cells = <1>;
                #reset-cells = <1>;
                #power-domain-cells = <1>;
+               interconnects = <&mc TEGRA234_MEMORY_CLIENT_BPMPR &emc>,
+                               <&mc TEGRA234_MEMORY_CLIENT_BPMPW &emc>,
+                               <&mc TEGRA234_MEMORY_CLIENT_BPMPDMAR &emc>,
+                               <&mc TEGRA234_MEMORY_CLIENT_BPMPDMAW &emc>;
+               interconnect-names = "read", "write", "dma-mem", "dma-write";
 
                bpmp_i2c: i2c {
                        compatible = "nvidia,tegra186-bpmp-i2c";
                #address-cells = <1>;
                #size-cells = <0>;
 
-               cpu@0 {
+               cpu0_0: cpu@0 {
+                       compatible = "arm,cortex-a78";
+                       device_type = "cpu";
+                       reg = <0x00000>;
+
+                       enable-method = "psci";
+
+                       i-cache-size = <65536>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <65536>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <256>;
+                       next-level-cache = <&l2c0_0>;
+               };
+
+               cpu0_1: cpu@100 {
+                       compatible = "arm,cortex-a78";
+                       device_type = "cpu";
+                       reg = <0x00100>;
+
+                       enable-method = "psci";
+
+                       i-cache-size = <65536>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <65536>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <256>;
+                       next-level-cache = <&l2c0_1>;
+               };
+
+               cpu0_2: cpu@200 {
+                       compatible = "arm,cortex-a78";
+                       device_type = "cpu";
+                       reg = <0x00200>;
+
+                       enable-method = "psci";
+
+                       i-cache-size = <65536>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <65536>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <256>;
+                       next-level-cache = <&l2c0_2>;
+               };
+
+               cpu0_3: cpu@300 {
+                       compatible = "arm,cortex-a78";
+                       device_type = "cpu";
+                       reg = <0x00300>;
+
+                       enable-method = "psci";
+
+                       i-cache-size = <65536>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <65536>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <256>;
+                       next-level-cache = <&l2c0_3>;
+               };
+
+               cpu1_0: cpu@10000 {
+                       compatible = "arm,cortex-a78";
+                       device_type = "cpu";
+                       reg = <0x10000>;
+
+                       enable-method = "psci";
+
+                       i-cache-size = <65536>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <65536>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <256>;
+                       next-level-cache = <&l2c1_0>;
+               };
+
+               cpu1_1: cpu@10100 {
+                       compatible = "arm,cortex-a78";
+                       device_type = "cpu";
+                       reg = <0x10100>;
+
+                       enable-method = "psci";
+
+                       i-cache-size = <65536>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <65536>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <256>;
+                       next-level-cache = <&l2c1_1>;
+               };
+
+               cpu1_2: cpu@10200 {
+                       compatible = "arm,cortex-a78";
+                       device_type = "cpu";
+                       reg = <0x10200>;
+
+                       enable-method = "psci";
+
+                       i-cache-size = <65536>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <65536>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <256>;
+                       next-level-cache = <&l2c1_2>;
+               };
+
+               cpu1_3: cpu@10300 {
+                       compatible = "arm,cortex-a78";
+                       device_type = "cpu";
+                       reg = <0x10300>;
+
+                       enable-method = "psci";
+
+                       i-cache-size = <65536>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <65536>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <256>;
+                       next-level-cache = <&l2c1_3>;
+               };
+
+               cpu2_0: cpu@20000 {
+                       compatible = "arm,cortex-a78";
                        device_type = "cpu";
-                       reg = <0x000>;
+                       reg = <0x20000>;
 
                        enable-method = "psci";
+
+                       i-cache-size = <65536>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <65536>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <256>;
+                       next-level-cache = <&l2c2_0>;
+               };
+
+               cpu2_1: cpu@20100 {
+                       compatible = "arm,cortex-a78";
+                       device_type = "cpu";
+                       reg = <0x20100>;
+
+                       enable-method = "psci";
+
+                       i-cache-size = <65536>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <65536>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <256>;
+                       next-level-cache = <&l2c2_1>;
+               };
+
+               cpu2_2: cpu@20200 {
+                       compatible = "arm,cortex-a78";
+                       device_type = "cpu";
+                       reg = <0x20200>;
+
+                       enable-method = "psci";
+
+                       i-cache-size = <65536>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <65536>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <256>;
+                       next-level-cache = <&l2c2_2>;
+               };
+
+               cpu2_3: cpu@20300 {
+                       compatible = "arm,cortex-a78";
+                       device_type = "cpu";
+                       reg = <0x20300>;
+
+                       enable-method = "psci";
+
+                       i-cache-size = <65536>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <65536>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <256>;
+                       next-level-cache = <&l2c2_3>;
+               };
+
+               cpu-map {
+                       cluster0 {
+                               core0 {
+                                       cpu = <&cpu0_0>;
+                               };
+
+                               core1 {
+                                       cpu = <&cpu0_1>;
+                               };
+
+                               core2 {
+                                       cpu = <&cpu0_2>;
+                               };
+
+                               core3 {
+                                       cpu = <&cpu0_3>;
+                               };
+                       };
+
+                       cluster1 {
+                               core0 {
+                                       cpu = <&cpu1_0>;
+                               };
+
+                               core1 {
+                                       cpu = <&cpu1_1>;
+                               };
+
+                               core2 {
+                                       cpu = <&cpu1_2>;
+                               };
+
+                               core3 {
+                                       cpu = <&cpu1_3>;
+                               };
+                       };
+
+                       cluster2 {
+                               core0 {
+                                       cpu = <&cpu2_0>;
+                               };
+
+                               core1 {
+                                       cpu = <&cpu2_1>;
+                               };
+
+                               core2 {
+                                       cpu = <&cpu2_2>;
+                               };
+
+                               core3 {
+                                       cpu = <&cpu2_3>;
+                               };
+                       };
+               };
+
+               l2c0_0: l2-cache00 {
+                       cache-size = <262144>;
+                       cache-line-size = <64>;
+                       cache-sets = <512>;
+                       cache-unified;
+                       next-level-cache = <&l3c0>;
                };
+
+               l2c0_1: l2-cache01 {
+                       cache-size = <262144>;
+                       cache-line-size = <64>;
+                       cache-sets = <512>;
+                       cache-unified;
+                       next-level-cache = <&l3c0>;
+               };
+
+               l2c0_2: l2-cache02 {
+                       cache-size = <262144>;
+                       cache-line-size = <64>;
+                       cache-sets = <512>;
+                       cache-unified;
+                       next-level-cache = <&l3c0>;
+               };
+
+               l2c0_3: l2-cache03 {
+                       cache-size = <262144>;
+                       cache-line-size = <64>;
+                       cache-sets = <512>;
+                       cache-unified;
+                       next-level-cache = <&l3c0>;
+               };
+
+               l2c1_0: l2-cache10 {
+                       cache-size = <262144>;
+                       cache-line-size = <64>;
+                       cache-sets = <512>;
+                       cache-unified;
+                       next-level-cache = <&l3c1>;
+               };
+
+               l2c1_1: l2-cache11 {
+                       cache-size = <262144>;
+                       cache-line-size = <64>;
+                       cache-sets = <512>;
+                       cache-unified;
+                       next-level-cache = <&l3c1>;
+               };
+
+               l2c1_2: l2-cache12 {
+                       cache-size = <262144>;
+                       cache-line-size = <64>;
+                       cache-sets = <512>;
+                       cache-unified;
+                       next-level-cache = <&l3c1>;
+               };
+
+               l2c1_3: l2-cache13 {
+                       cache-size = <262144>;
+                       cache-line-size = <64>;
+                       cache-sets = <512>;
+                       cache-unified;
+                       next-level-cache = <&l3c1>;
+               };
+
+               l2c2_0: l2-cache20 {
+                       cache-size = <262144>;
+                       cache-line-size = <64>;
+                       cache-sets = <512>;
+                       cache-unified;
+                       next-level-cache = <&l3c2>;
+               };
+
+               l2c2_1: l2-cache21 {
+                       cache-size = <262144>;
+                       cache-line-size = <64>;
+                       cache-sets = <512>;
+                       cache-unified;
+                       next-level-cache = <&l3c2>;
+               };
+
+               l2c2_2: l2-cache22 {
+                       cache-size = <262144>;
+                       cache-line-size = <64>;
+                       cache-sets = <512>;
+                       cache-unified;
+                       next-level-cache = <&l3c2>;
+               };
+
+               l2c2_3: l2-cache23 {
+                       cache-size = <262144>;
+                       cache-line-size = <64>;
+                       cache-sets = <512>;
+                       cache-unified;
+                       next-level-cache = <&l3c2>;
+               };
+
+               l3c0: l3-cache0 {
+                       cache-size = <2097152>;
+                       cache-line-size = <64>;
+                       cache-sets = <2048>;
+               };
+
+               l3c1: l3-cache1 {
+                       cache-size = <2097152>;
+                       cache-line-size = <64>;
+                       cache-sets = <2048>;
+               };
+
+               l3c2: l3-cache2 {
+                       cache-size = <2097152>;
+                       cache-line-size = <64>;
+                       cache-sets = <2048>;
+               };
+       };
+
+       pmu {
+               compatible = "arm,cortex-a78-pmu";
+               interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH>;
+               status = "okay";
        };
 
        psci {
                method = "smc";
        };
 
+       tcu: serial {
+               compatible = "nvidia,tegra234-tcu", "nvidia,tegra194-tcu";
+               mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_SM TEGRA_HSP_SM_RX(0)>,
+                        <&hsp_aon TEGRA_HSP_MBOX_TYPE_SM TEGRA_HSP_SM_TX(1)>;
+               mbox-names = "rx", "tx";
+               status = "disabled";
+       };
+
        timer {
                compatible = "arm,armv8-timer";
                interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
index d1c5c21..5bc8065 100644 (file)
@@ -63,6 +63,8 @@ dtb-$(CONFIG_ARCH_R8A77995) += r8a77995-draak.dtb
 
 dtb-$(CONFIG_ARCH_R8A779A0) += r8a779a0-falcon.dtb
 
+dtb-$(CONFIG_ARCH_R8A779F0) += r8a779f0-spider.dtb
+
 dtb-$(CONFIG_ARCH_R8A77951) += r8a779m1-salvator-xs.dtb
 dtb-$(CONFIG_ARCH_R8A77951) += r8a779m1-ulcb.dtb
 dtb-$(CONFIG_ARCH_R8A77951) += r8a779m1-ulcb-kf.dtb
index a69d24e..8c9da8b 100644 (file)
@@ -18,6 +18,7 @@
        pinctrl-names = "default";
        renesas,no-ether-link;
        phy-handle = <&phy0>;
+       phy-mode = "rgmii-id";
        status = "okay";
 
        phy0: ethernet-phy@0 {
index 6f4fffa..eda6a84 100644 (file)
@@ -58,7 +58,7 @@
                clock-frequency = <0>;
        };
 
-       cluster0_opp: opp_table0 {
+       cluster0_opp: opp-table-0 {
                compatible = "operating-points-v2";
                opp-shared;
 
@@ -80,7 +80,7 @@
                };
        };
 
-       cluster1_opp: opp_table1 {
+       cluster1_opp: opp-table-1 {
                compatible = "operating-points-v2";
                opp-shared;
 
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee100000 0 0x2000>;
                        interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 314>;
+                       clocks = <&cpg CPG_MOD 314>, <&cpg CPG_CORE R8A774A1_CLK_SD0H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A774A1_PD_ALWAYS_ON>;
                        resets = <&cpg 314>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee120000 0 0x2000>;
                        interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 313>;
+                       clocks = <&cpg CPG_MOD 313>, <&cpg CPG_CORE R8A774A1_CLK_SD1H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A774A1_PD_ALWAYS_ON>;
                        resets = <&cpg 313>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee140000 0 0x2000>;
                        interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 312>;
+                       clocks = <&cpg CPG_MOD 312>, <&cpg CPG_CORE R8A774A1_CLK_SD2H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A774A1_PD_ALWAYS_ON>;
                        resets = <&cpg 312>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee160000 0 0x2000>;
                        interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 311>;
+                       clocks = <&cpg CPG_MOD 311>, <&cpg CPG_CORE R8A774A1_CLK_SD3H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A774A1_PD_ALWAYS_ON>;
                        resets = <&cpg 311>;
        };
 
        thermal-zones {
-               sensor_thermal1: sensor-thermal1 {
+               sensor1_thermal: sensor1-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 0>;
                        };
                };
 
-               sensor_thermal2: sensor-thermal2 {
+               sensor2_thermal: sensor2-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 1>;
                        };
                };
 
-               sensor_thermal3: sensor-thermal3 {
+               sensor3_thermal: sensor3-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 2>;
index 0f7bdfc..44f79fb 100644 (file)
@@ -47,7 +47,7 @@
                clock-frequency = <0>;
        };
 
-       cluster0_opp: opp_table0 {
+       cluster0_opp: opp-table-0 {
                compatible = "operating-points-v2";
                opp-shared;
 
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee100000 0 0x2000>;
                        interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 314>;
+                       clocks = <&cpg CPG_MOD 314>, <&cpg CPG_CORE R8A774B1_CLK_SD0H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
                        resets = <&cpg 314>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee120000 0 0x2000>;
                        interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 313>;
+                       clocks = <&cpg CPG_MOD 313>, <&cpg CPG_CORE R8A774B1_CLK_SD1H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
                        resets = <&cpg 313>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee140000 0 0x2000>;
                        interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 312>;
+                       clocks = <&cpg CPG_MOD 312>, <&cpg CPG_CORE R8A774B1_CLK_SD2H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
                        resets = <&cpg 312>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee160000 0 0x2000>;
                        interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 311>;
+                       clocks = <&cpg CPG_MOD 311>, <&cpg CPG_CORE R8A774B1_CLK_SD3H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
                        resets = <&cpg 311>;
        };
 
        thermal-zones {
-               sensor_thermal1: sensor-thermal1 {
+               sensor1_thermal: sensor1-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 0>;
                        };
                };
 
-               sensor_thermal2: sensor-thermal2 {
+               sensor2_thermal: sensor2-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 1>;
                        };
                };
 
-               sensor_thermal3: sensor-thermal3 {
+               sensor3_thermal: sensor3-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 2>;
index d597772..b8dcbbb 100644 (file)
@@ -44,7 +44,7 @@
                clock-frequency = <0>;
        };
 
-       cluster1_opp: opp_table10 {
+       cluster1_opp: opp-table-1 {
                compatible = "operating-points-v2";
                opp-shared;
                opp-800000000 {
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee100000 0 0x2000>;
                        interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 314>;
+                       clocks = <&cpg CPG_MOD 314>, <&cpg CPG_CORE R8A774C0_CLK_SD0H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A774C0_PD_ALWAYS_ON>;
                        resets = <&cpg 314>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee120000 0 0x2000>;
                        interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 313>;
+                       clocks = <&cpg CPG_MOD 313>, <&cpg CPG_CORE R8A774C0_CLK_SD1H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A774C0_PD_ALWAYS_ON>;
                        resets = <&cpg 313>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee160000 0 0x2000>;
                        interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 311>;
+                       clocks = <&cpg CPG_MOD 311>, <&cpg CPG_CORE R8A774C0_CLK_SD3H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A774C0_PD_ALWAYS_ON>;
                        resets = <&cpg 311>;
index 379a130..e6d8610 100644 (file)
@@ -47,7 +47,7 @@
                clock-frequency = <0>;
        };
 
-       cluster0_opp: opp_table0 {
+       cluster0_opp: opp-table-0 {
                compatible = "operating-points-v2";
                opp-shared;
 
@@ -69,7 +69,7 @@
                };
        };
 
-       cluster1_opp: opp_table1 {
+       cluster1_opp: opp-table-1 {
                compatible = "operating-points-v2";
                opp-shared;
 
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee100000 0 0x2000>;
                        interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 314>;
+                       clocks = <&cpg CPG_MOD 314>, <&cpg CPG_CORE R8A774E1_CLK_SD0H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A774E1_PD_ALWAYS_ON>;
                        resets = <&cpg 314>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee120000 0 0x2000>;
                        interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 313>;
+                       clocks = <&cpg CPG_MOD 313>, <&cpg CPG_CORE R8A774E1_CLK_SD1H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A774E1_PD_ALWAYS_ON>;
                        resets = <&cpg 313>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee140000 0 0x2000>;
                        interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 312>;
+                       clocks = <&cpg CPG_MOD 312>, <&cpg CPG_CORE R8A774E1_CLK_SD2H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A774E1_PD_ALWAYS_ON>;
                        resets = <&cpg 312>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee160000 0 0x2000>;
                        interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 311>;
+                       clocks = <&cpg CPG_MOD 311>, <&cpg CPG_CORE R8A774E1_CLK_SD3H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A774E1_PD_ALWAYS_ON>;
                        resets = <&cpg 311>;
        };
 
        thermal-zones {
-               sensor_thermal1: sensor-thermal1 {
+               sensor1_thermal: sensor1-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 0>;
                        };
                };
 
-               sensor_thermal2: sensor-thermal2 {
+               sensor2_thermal: sensor2-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 1>;
                        };
                };
 
-               sensor_thermal3: sensor-thermal3 {
+               sensor3_thermal: sensor3-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 2>;
index 1768a3e..9265a57 100644 (file)
@@ -62,7 +62,7 @@
                clock-frequency = <0>;
        };
 
-       cluster0_opp: opp_table0 {
+       cluster0_opp: opp-table-0 {
                compatible = "operating-points-v2";
                opp-shared;
 
@@ -96,7 +96,7 @@
                };
        };
 
-       cluster1_opp: opp_table1 {
+       cluster1_opp: opp-table-1 {
                compatible = "operating-points-v2";
                opp-shared;
 
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee100000 0 0x2000>;
                        interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 314>;
+                       clocks = <&cpg CPG_MOD 314>, <&cpg CPG_CORE R8A7795_CLK_SD0H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
                        resets = <&cpg 314>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee120000 0 0x2000>;
                        interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 313>;
+                       clocks = <&cpg CPG_MOD 313>, <&cpg CPG_CORE R8A7795_CLK_SD1H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
                        resets = <&cpg 313>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee140000 0 0x2000>;
                        interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 312>;
+                       clocks = <&cpg CPG_MOD 312>, <&cpg CPG_CORE R8A7795_CLK_SD2H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
                        resets = <&cpg 312>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee160000 0 0x2000>;
                        interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 311>;
+                       clocks = <&cpg CPG_MOD 311>, <&cpg CPG_CORE R8A7795_CLK_SD3H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
                        resets = <&cpg 311>;
        };
 
        thermal-zones {
-               sensor_thermal1: sensor-thermal1 {
+               sensor1_thermal: sensor1-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 0>;
                        };
                };
 
-               sensor_thermal2: sensor-thermal2 {
+               sensor2_thermal: sensor2-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 1>;
                        };
                };
 
-               sensor_thermal3: sensor-thermal3 {
+               sensor3_thermal: sensor3-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 2>;
index 2bd8169..26f7103 100644 (file)
@@ -57,7 +57,7 @@
                clock-frequency = <0>;
        };
 
-       cluster0_opp: opp_table0 {
+       cluster0_opp: opp-table-0 {
                compatible = "operating-points-v2";
                opp-shared;
 
@@ -97,7 +97,7 @@
                };
        };
 
-       cluster1_opp: opp_table1 {
+       cluster1_opp: opp-table-1 {
                compatible = "operating-points-v2";
                opp-shared;
 
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee100000 0 0x2000>;
                        interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 314>;
+                       clocks = <&cpg CPG_MOD 314>, <&cpg CPG_CORE R8A7796_CLK_SD0H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
                        resets = <&cpg 314>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee120000 0 0x2000>;
                        interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 313>;
+                       clocks = <&cpg CPG_MOD 313>, <&cpg CPG_CORE R8A7796_CLK_SD1H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
                        resets = <&cpg 313>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee140000 0 0x2000>;
                        interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 312>;
+                       clocks = <&cpg CPG_MOD 312>, <&cpg CPG_CORE R8A7796_CLK_SD2H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
                        resets = <&cpg 312>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee160000 0 0x2000>;
                        interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 311>;
+                       clocks = <&cpg CPG_MOD 311>, <&cpg CPG_CORE R8A7796_CLK_SD3H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
                        resets = <&cpg 311>;
        };
 
        thermal-zones {
-               sensor_thermal1: sensor-thermal1 {
+               sensor1_thermal: sensor1-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 0>;
                        };
                };
 
-               sensor_thermal2: sensor-thermal2 {
+               sensor2_thermal: sensor2-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 1>;
                        };
                };
 
-               sensor_thermal3: sensor-thermal3 {
+               sensor3_thermal: sensor3-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 2>;
index 86d59e7..ac9b587 100644 (file)
@@ -46,7 +46,7 @@
                clock-frequency = <0>;
        };
 
-       cluster0_opp: opp_table0 {
+       cluster0_opp: opp-table-0 {
                compatible = "operating-points-v2";
                opp-shared;
 
@@ -86,7 +86,7 @@
                };
        };
 
-       cluster1_opp: opp_table1 {
+       cluster1_opp: opp-table-1 {
                compatible = "operating-points-v2";
                opp-shared;
 
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee100000 0 0x2000>;
                        interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 314>;
+                       clocks = <&cpg CPG_MOD 314>, <&cpg CPG_CORE R8A77961_CLK_SD0H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
                        resets = <&cpg 314>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee120000 0 0x2000>;
                        interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 313>;
+                       clocks = <&cpg CPG_MOD 313>, <&cpg CPG_CORE R8A77961_CLK_SD1H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
                        resets = <&cpg 313>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee140000 0 0x2000>;
                        interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 312>;
+                       clocks = <&cpg CPG_MOD 312>, <&cpg CPG_CORE R8A77961_CLK_SD2H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
                        resets = <&cpg 312>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee160000 0 0x2000>;
                        interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 311>;
+                       clocks = <&cpg CPG_MOD 311>, <&cpg CPG_CORE R8A77961_CLK_SD3H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
                        resets = <&cpg 311>;
        };
 
        thermal-zones {
-               sensor_thermal1: sensor-thermal1 {
+               sensor1_thermal: sensor1-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 0>;
                        };
                };
 
-               sensor_thermal2: sensor-thermal2 {
+               sensor2_thermal: sensor2-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 1>;
                        };
                };
 
-               sensor_thermal3: sensor-thermal3 {
+               sensor3_thermal: sensor3-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 2>;
index 08df756..f898aad 100644 (file)
@@ -62,7 +62,7 @@
                clock-frequency = <0>;
        };
 
-       cluster0_opp: opp_table0 {
+       cluster0_opp: opp-table-0 {
                compatible = "operating-points-v2";
                opp-shared;
 
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee100000 0 0x2000>;
                        interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 314>;
+                       clocks = <&cpg CPG_MOD 314>, <&cpg CPG_CORE R8A77965_CLK_SD0H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
                        resets = <&cpg 314>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee120000 0 0x2000>;
                        interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 313>;
+                       clocks = <&cpg CPG_MOD 313>, <&cpg CPG_CORE R8A77965_CLK_SD1H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
                        resets = <&cpg 313>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee140000 0 0x2000>;
                        interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 312>;
+                       clocks = <&cpg CPG_MOD 312>, <&cpg CPG_CORE R8A77965_CLK_SD2H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
                        resets = <&cpg 312>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee160000 0 0x2000>;
                        interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 311>;
+                       clocks = <&cpg CPG_MOD 311>, <&cpg CPG_CORE R8A77965_CLK_SD3H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
                        resets = <&cpg 311>;
        };
 
        thermal-zones {
-               sensor_thermal1: sensor-thermal1 {
+               sensor1_thermal: sensor1-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 0>;
                        };
                };
 
-               sensor_thermal2: sensor-thermal2 {
+               sensor2_thermal: sensor2-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 1>;
                        };
                };
 
-               sensor_thermal3: sensor-thermal3 {
+               sensor3_thermal: sensor3-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 2>;
index 6347d15..347c068 100644 (file)
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee140000 0 0x2000>;
                        interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 314>;
+                       clocks = <&cpg CPG_MOD 314>, <&cpg CPG_CORE R8A77980_CLK_SD0H>;
+                       clock-names = "core", "clkh";
                        power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
                        resets = <&cpg 314>;
                        max-frequency = <200000000>;
        };
 
        thermal-zones {
-               thermal-sensor-1 {
+               sensor1_thermal: sensor1-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 0>;
                        };
                };
 
-               thermal-sensor-2 {
+               sensor2_thermal: sensor2-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 1>;
index 0ea300a..14caedd 100644 (file)
@@ -55,7 +55,7 @@
                clock-frequency = <0>;
        };
 
-       cluster1_opp: opp_table10 {
+       cluster1_opp: opp-table-1 {
                compatible = "operating-points-v2";
                opp-shared;
                opp-800000000 {
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee100000 0 0x2000>;
                        interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 314>;
+                       clocks = <&cpg CPG_MOD 314>, <&cpg CPG_CORE R8A77990_CLK_SD0H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
                        resets = <&cpg 314>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee120000 0 0x2000>;
                        interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 313>;
+                       clocks = <&cpg CPG_MOD 313>, <&cpg CPG_CORE R8A77990_CLK_SD1H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
                        resets = <&cpg 313>;
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee160000 0 0x2000>;
                        interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 311>;
+                       clocks = <&cpg CPG_MOD 311>, <&cpg CPG_CORE R8A77990_CLK_SD3H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
                        resets = <&cpg 311>;
index 16ad5fc..f29f398 100644 (file)
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee140000 0 0x2000>;
                        interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 312>;
+                       clocks = <&cpg CPG_MOD 312>, <&cpg CPG_CORE R8A77995_CLK_SD0H>;
+                       clock-names = "core", "clkh";
                        max-frequency = <200000000>;
                        power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
                        resets = <&cpg 312>;
index cd2f0d6..6af3f4f 100644 (file)
                reg = <0x7 0x00000000 0x0 0x80000000>;
        };
 
+       mini-dp-con {
+               compatible = "dp-connector";
+               label = "CN5";
+               type = "mini";
+
+               port {
+                       mini_dp_con_in: endpoint {
+                               remote-endpoint = <&sn65dsi86_out>;
+                       };
+               };
+       };
+
+       reg_1p2v: regulator-1p2v {
+               compatible = "regulator-fixed";
+               regulator-name = "fixed-1.2V";
+               regulator-min-microvolt = <1200000>;
+               regulator-max-microvolt = <1200000>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+
        reg_1p8v: regulator-1p8v {
                compatible = "regulator-fixed";
                regulator-name = "fixed-1.8V";
                regulator-boot-on;
                regulator-always-on;
        };
+
+       sn65dsi86_refclk: clk-x6 {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <38400000>;
+       };
+};
+
+&dsi0 {
+       status = "okay";
+
+       ports {
+               port@1 {
+                       dsi0_out: endpoint {
+                               remote-endpoint = <&sn65dsi86_in>;
+                               data-lanes = <1 2 3 4>;
+                       };
+               };
+       };
+};
+
+&du {
+       status = "okay";
 };
 
 &extal_clk {
 
        status = "okay";
        clock-frequency = <400000>;
+
+       bridge@2c {
+               compatible = "ti,sn65dsi86";
+               reg = <0x2c>;
+
+               clocks = <&sn65dsi86_refclk>;
+               clock-names = "refclk";
+
+               interrupt-parent = <&gpio1>;
+               interrupts = <24 IRQ_TYPE_LEVEL_HIGH>;
+
+               vccio-supply = <&reg_1p8v>;
+               vpll-supply = <&reg_1p8v>;
+               vcca-supply = <&reg_1p2v>;
+               vcc-supply = <&reg_1p2v>;
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               sn65dsi86_in: endpoint {
+                                       remote-endpoint = <&dsi0_out>;
+                               };
+                       };
+
+                       port@1 {
+                               reg = <1>;
+                               sn65dsi86_out: endpoint {
+                                       remote-endpoint = <&mini_dp_con_in>;
+                               };
+                       };
+               };
+       };
 };
 
 &i2c6 {
index 43bf2cb..1e7ed12 100644 (file)
@@ -87,7 +87,7 @@
                        status = "disabled";
                };
 
-               pfc: pin-controller@e6050000 {
+               pfc: pinctrl@e6050000 {
                        compatible = "renesas,pfc-r8a779a0";
                        reg = <0 0xe6050000 0 0x16c>, <0 0xe6050800 0 0x16c>,
                              <0 0xe6058000 0 0x16c>, <0 0xe6058800 0 0x16c>,
                                     "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee140000 0 0x2000>;
                        interrupts = <GIC_SPI 236 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 706>;
+                       clocks = <&cpg CPG_MOD 706>, <&cpg CPG_CORE R8A779A0_CLK_SD0H>;
+                       clock-names = "core", "clkh";
                        power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
                        resets = <&cpg 706>;
                        max-frequency = <200000000>;
                        };
                };
 
+               du: display@feb00000 {
+                       compatible = "renesas,du-r8a779a0";
+                       reg = <0 0xfeb00000 0 0x40000>;
+                       interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 411>;
+                       clock-names = "du.0";
+                       power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
+                       resets = <&cpg 411>;
+                       reset-names = "du.0";
+                       renesas,vsps = <&vspd0 0>, <&vspd1 0>;
+
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@0 {
+                                       reg = <0>;
+                                       du_out_dsi0: endpoint {
+                                               remote-endpoint = <&dsi0_in>;
+                                       };
+                               };
+
+                               port@1 {
+                                       reg = <1>;
+                                       du_out_dsi1: endpoint {
+                                               remote-endpoint = <&dsi1_in>;
+                                       };
+                               };
+                       };
+               };
+
                isp0: isp@fed00000 {
                        compatible = "renesas,r8a779a0-isp";
                        reg = <0 0xfed00000 0 0x10000>;
                        };
                };
 
+               dsi0: dsi-encoder@fed80000 {
+                       compatible = "renesas,r8a779a0-dsi-csi2-tx";
+                       reg = <0 0xfed80000 0 0x10000>;
+                       power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
+                       clocks = <&cpg CPG_MOD 415>,
+                                <&cpg CPG_CORE R8A779A0_CLK_DSI>,
+                                <&cpg CPG_CORE R8A779A0_CLK_CL16MCK>;
+                       clock-names = "fck", "dsi", "pll";
+                       resets = <&cpg 415>;
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@0 {
+                                       reg = <0>;
+                                       dsi0_in: endpoint {
+                                               remote-endpoint = <&du_out_dsi0>;
+                                       };
+                               };
+
+                               port@1 {
+                                       reg = <1>;
+                               };
+                       };
+               };
+
+               dsi1: dsi-encoder@fed90000 {
+                       compatible = "renesas,r8a779a0-dsi-csi2-tx";
+                       reg = <0 0xfed90000 0 0x10000>;
+                       power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
+                       clocks = <&cpg CPG_MOD 416>,
+                                <&cpg CPG_CORE R8A779A0_CLK_DSI>,
+                                <&cpg CPG_CORE R8A779A0_CLK_CL16MCK>;
+                       clock-names = "fck", "dsi", "pll";
+                       resets = <&cpg 416>;
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@0 {
+                                       reg = <0>;
+                                       dsi1_in: endpoint {
+                                               remote-endpoint = <&du_out_dsi1>;
+                                       };
+                               };
+
+                               port@1 {
+                                       reg = <1>;
+                               };
+                       };
+               };
+
                prr: chipid@fff00044 {
                        compatible = "renesas,prr";
                        reg = <0 0xfff00044 0 4>;
        };
 
        thermal-zones {
-               sensor_thermal1: sensor-thermal1 {
+               sensor1_thermal: sensor1-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 0>;
                        };
                };
 
-               sensor_thermal2: sensor-thermal2 {
+               sensor2_thermal: sensor2-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 1>;
                        };
                };
 
-               sensor_thermal3: sensor-thermal3 {
+               sensor3_thermal: sensor3-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 2>;
                        };
                };
 
-               sensor_thermal4: sensor-thermal4 {
+               sensor4_thermal: sensor4-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 3>;
                        };
                };
 
-               sensor_thermal5: sensor-thermal5 {
+               sensor5_thermal: sensor5-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                        thermal-sensors = <&tsc 4>;
diff --git a/arch/arm64/boot/dts/renesas/r8a779f0-spider-cpu.dtsi b/arch/arm64/boot/dts/renesas/r8a779f0-spider-cpu.dtsi
new file mode 100644 (file)
index 0000000..1565865
--- /dev/null
@@ -0,0 +1,36 @@
+// SPDX-License-Identifier: (GPL-2.0 or MIT)
+/*
+ * Device Tree Source for the Spider CPU board
+ *
+ * Copyright (C) 2021 Renesas Electronics Corp.
+ */
+
+#include "r8a779f0.dtsi"
+
+/ {
+       model = "Renesas Spider CPU board";
+       compatible = "renesas,spider-cpu", "renesas,r8a779f0";
+
+       memory@48000000 {
+               device_type = "memory";
+               /* first 128MB is reserved for secure area. */
+               reg = <0x0 0x48000000 0x0 0x78000000>;
+       };
+
+       memory@480000000 {
+               device_type = "memory";
+               reg = <0x4 0x80000000 0x0 0x80000000>;
+       };
+};
+
+&extal_clk {
+       clock-frequency = <20000000>;
+};
+
+&extalr_clk {
+       clock-frequency = <32768>;
+};
+
+&scif3 {
+       status = "okay";
+};
diff --git a/arch/arm64/boot/dts/renesas/r8a779f0-spider.dts b/arch/arm64/boot/dts/renesas/r8a779f0-spider.dts
new file mode 100644 (file)
index 0000000..f286254
--- /dev/null
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: (GPL-2.0 or MIT)
+/*
+ * Device Tree Source for the Spider CPU and BreakOut boards
+ *
+ * Copyright (C) 2021 Renesas Electronics Corp.
+ */
+
+/dts-v1/;
+#include "r8a779f0-spider-cpu.dtsi"
+
+/ {
+       model = "Renesas Spider CPU and Breakout boards based on r8a779f0";
+       compatible = "renesas,spider-breakout", "renesas,spider-cpu", "renesas,r8a779f0";
+
+       aliases {
+               serial0 = &scif3;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+};
diff --git a/arch/arm64/boot/dts/renesas/r8a779f0.dtsi b/arch/arm64/boot/dts/renesas/r8a779f0.dtsi
new file mode 100644 (file)
index 0000000..eda5977
--- /dev/null
@@ -0,0 +1,121 @@
+// SPDX-License-Identifier: (GPL-2.0 or MIT)
+/*
+ * Device Tree Source for the R-Car S4-8 (R8A779F0) SoC
+ *
+ * Copyright (C) 2021 Renesas Electronics Corp.
+ */
+
+#include <dt-bindings/clock/r8a779f0-cpg-mssr.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/power/r8a779f0-sysc.h>
+
+/ {
+       compatible = "renesas,r8a779f0";
+       #address-cells = <2>;
+       #size-cells = <2>;
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               a55_0: cpu@0 {
+                       compatible = "arm,cortex-a55";
+                       reg = <0>;
+                       device_type = "cpu";
+                       power-domains = <&sysc R8A779F0_PD_A1E0D0C0>;
+               };
+       };
+
+       extal_clk: extal {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               /* This value must be overridden by the board */
+               clock-frequency = <0>;
+       };
+
+       extalr_clk: extalr {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               /* This value must be overridden by the board */
+               clock-frequency = <0>;
+       };
+
+       pmu_a55 {
+               compatible = "arm,cortex-a55-pmu";
+               interrupts-extended = <&gic GIC_PPI 7 IRQ_TYPE_LEVEL_LOW>;
+       };
+
+       /* External SCIF clock - to be overridden by boards that provide it */
+       scif_clk: scif {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <0>;
+       };
+
+       soc: soc {
+               compatible = "simple-bus";
+               interrupt-parent = <&gic>;
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+
+               cpg: clock-controller@e6150000 {
+                       compatible = "renesas,r8a779f0-cpg-mssr";
+                       reg = <0 0xe6150000 0 0x4000>;
+                       clocks = <&extal_clk>, <&extalr_clk>;
+                       clock-names = "extal", "extalr";
+                       #clock-cells = <2>;
+                       #power-domain-cells = <0>;
+                       #reset-cells = <1>;
+               };
+
+               rst: reset-controller@e6160000 {
+                       compatible = "renesas,r8a779f0-rst";
+                       reg = <0 0xe6160000 0 0x4000>;
+               };
+
+               sysc: system-controller@e6180000 {
+                       compatible = "renesas,r8a779f0-sysc";
+                       reg = <0 0xe6180000 0 0x4000>;
+                       #power-domain-cells = <1>;
+               };
+
+               scif3: serial@e6c50000 {
+                       compatible = "renesas,scif-r8a779f0",
+                                    "renesas,rcar-gen4-scif", "renesas,scif";
+                       reg = <0 0xe6c50000 0 64>;
+                       interrupts = <GIC_SPI 252 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 704>,
+                                <&cpg CPG_CORE R8A779F0_CLK_S0D3_PER>,
+                                <&scif_clk>;
+                       clock-names = "fck", "brg_int", "scif_clk";
+                       power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>;
+                       resets = <&cpg 704>;
+                       status = "disabled";
+               };
+
+               gic: interrupt-controller@f1000000 {
+                       compatible = "arm,gic-v3";
+                       #interrupt-cells = <3>;
+                       #address-cells = <0>;
+                       interrupt-controller;
+                       reg = <0x0 0xf1000000 0 0x20000>,
+                             <0x0 0xf1060000 0 0x110000>;
+                       interrupts = <GIC_PPI 9
+                                     (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_HIGH)>;
+               };
+
+               prr: chipid@fff00044 {
+                       compatible = "renesas,prr";
+                       reg = <0 0xfff00044 0 4>;
+               };
+       };
+
+       timer {
+               compatible = "arm,armv8-timer";
+               interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>,
+                                     <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>,
+                                     <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>,
+                                     <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>;
+       };
+};
index 485ef5f..19287cc 100644 (file)
                clock-frequency = <0>;
        };
 
-       psci {
-               compatible = "arm,psci-1.0", "arm,psci-0.2";
-               method = "smc";
+       cluster0_opp: opp-table-0 {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp-150000000 {
+                       opp-hz = /bits/ 64 <150000000>;
+                       opp-microvolt = <1100000>;
+                       clock-latency-ns = <300000>;
+               };
+               opp-300000000 {
+                       opp-hz = /bits/ 64 <300000000>;
+                       opp-microvolt = <1100000>;
+                       clock-latency-ns = <300000>;
+               };
+               opp-600000000 {
+                       opp-hz = /bits/ 64 <600000000>;
+                       opp-microvolt = <1100000>;
+                       clock-latency-ns = <300000>;
+               };
+               opp-1200000000 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-microvolt = <1100000>;
+                       clock-latency-ns = <300000>;
+                       opp-suspend;
+               };
        };
 
        cpus {
                        compatible = "arm,cortex-a55";
                        reg = <0>;
                        device_type = "cpu";
+                       #cooling-cells = <2>;
                        next-level-cache = <&L3_CA55>;
                        enable-method = "psci";
+                       clocks = <&cpg CPG_CORE R9A07G044_CLK_I>;
+                       operating-points-v2 = <&cluster0_opp>;
                };
 
                cpu1: cpu@100 {
                        device_type = "cpu";
                        next-level-cache = <&L3_CA55>;
                        enable-method = "psci";
+                       clocks = <&cpg CPG_CORE R9A07G044_CLK_I>;
+                       operating-points-v2 = <&cluster0_opp>;
                };
 
                L3_CA55: cache-controller-0 {
                };
        };
 
+       gpu_opp_table: opp-table-1 {
+               compatible = "operating-points-v2";
+
+               opp-500000000 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <1100000>;
+               };
+
+               opp-400000000 {
+                       opp-hz = /bits/ 64 <400000000>;
+                       opp-microvolt = <1100000>;
+               };
+
+               opp-250000000 {
+                       opp-hz = /bits/ 64 <250000000>;
+                       opp-microvolt = <1100000>;
+               };
+
+               opp-200000000 {
+                       opp-hz = /bits/ 64 <200000000>;
+                       opp-microvolt = <1100000>;
+               };
+
+               opp-125000000 {
+                       opp-hz = /bits/ 64 <125000000>;
+                       opp-microvolt = <1100000>;
+               };
+
+               opp-100000000 {
+                       opp-hz = /bits/ 64 <100000000>;
+                       opp-microvolt = <1100000>;
+               };
+
+               opp-62500000 {
+                       opp-hz = /bits/ 64 <62500000>;
+                       opp-microvolt = <1100000>;
+               };
+
+               opp-50000000 {
+                       opp-hz = /bits/ 64 <50000000>;
+                       opp-microvolt = <1100000>;
+               };
+       };
+
+       psci {
+               compatible = "arm,psci-1.0", "arm,psci-0.2";
+               method = "smc";
+       };
+
        soc: soc {
                compatible = "simple-bus";
                interrupt-parent = <&gic>;
                        status = "disabled";
                };
 
+               spi0: spi@1004ac00 {
+                       compatible = "renesas,r9a07g044-rspi", "renesas,rspi-rz";
+                       reg = <0 0x1004ac00 0 0x400>;
+                       interrupts = <GIC_SPI 415 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 413 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 414 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "error", "rx", "tx";
+                       clocks = <&cpg CPG_MOD R9A07G044_RSPI0_CLKB>;
+                       resets = <&cpg R9A07G044_RSPI0_RST>;
+                       power-domains = <&cpg>;
+                       num-cs = <1>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               spi1: spi@1004b000 {
+                       compatible = "renesas,r9a07g044-rspi", "renesas,rspi-rz";
+                       reg = <0 0x1004b000 0 0x400>;
+                       interrupts = <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "error", "rx", "tx";
+                       clocks = <&cpg CPG_MOD R9A07G044_RSPI1_CLKB>;
+                       resets = <&cpg R9A07G044_RSPI1_RST>;
+                       power-domains = <&cpg>;
+                       num-cs = <1>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               spi2: spi@1004b400 {
+                       compatible = "renesas,r9a07g044-rspi", "renesas,rspi-rz";
+                       reg = <0 0x1004b400 0 0x400>;
+                       interrupts = <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "error", "rx", "tx";
+                       clocks = <&cpg CPG_MOD R9A07G044_RSPI2_CLKB>;
+                       resets = <&cpg R9A07G044_RSPI2_RST>;
+                       power-domains = <&cpg>;
+                       num-cs = <1>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
                scif0: serial@1004b800 {
                        compatible = "renesas,scif-r9a07g044";
                        reg = <0 0x1004b800 0 0x400>;
                        status = "disabled";
                };
 
+               scif1: serial@1004bc00 {
+                       compatible = "renesas,scif-r9a07g044";
+                       reg = <0 0x1004bc00 0 0x400>;
+                       interrupts = <GIC_SPI 385 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 387 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 388 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 386 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 389 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 389 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "eri", "rxi", "txi",
+                                         "bri", "dri", "tei";
+                       clocks = <&cpg CPG_MOD R9A07G044_SCIF1_CLK_PCK>;
+                       clock-names = "fck";
+                       power-domains = <&cpg>;
+                       resets = <&cpg R9A07G044_SCIF1_RST_SYSTEM_N>;
+                       status = "disabled";
+               };
+
+               scif2: serial@1004c000 {
+                       compatible = "renesas,scif-r9a07g044";
+                       reg = <0 0x1004c000 0 0x400>;
+                       interrupts = <GIC_SPI 390 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 392 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 393 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 391 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 394 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 394 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "eri", "rxi", "txi",
+                                         "bri", "dri", "tei";
+                       clocks = <&cpg CPG_MOD R9A07G044_SCIF2_CLK_PCK>;
+                       clock-names = "fck";
+                       power-domains = <&cpg>;
+                       resets = <&cpg R9A07G044_SCIF2_RST_SYSTEM_N>;
+                       status = "disabled";
+               };
+
+               scif3: serial@1004c400 {
+                       compatible = "renesas,scif-r9a07g044";
+                       reg = <0 0x1004c400 0 0x400>;
+                       interrupts = <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 398 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "eri", "rxi", "txi",
+                                         "bri", "dri", "tei";
+                       clocks = <&cpg CPG_MOD R9A07G044_SCIF3_CLK_PCK>;
+                       clock-names = "fck";
+                       power-domains = <&cpg>;
+                       resets = <&cpg R9A07G044_SCIF3_RST_SYSTEM_N>;
+                       status = "disabled";
+               };
+
+               scif4: serial@1004c800 {
+                       compatible = "renesas,scif-r9a07g044";
+                       reg = <0 0x1004c800 0 0x400>;
+                       interrupts = <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 402 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 401 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "eri", "rxi", "txi",
+                                         "bri", "dri", "tei";
+                       clocks = <&cpg CPG_MOD R9A07G044_SCIF4_CLK_PCK>;
+                       clock-names = "fck";
+                       power-domains = <&cpg>;
+                       resets = <&cpg R9A07G044_SCIF4_RST_SYSTEM_N>;
+                       status = "disabled";
+               };
+
+               sci0: serial@1004d000 {
+                       compatible = "renesas,r9a07g044-sci", "renesas,sci";
+                       reg = <0 0x1004d000 0 0x400>;
+                       interrupts = <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "eri", "rxi", "txi", "tei";
+                       clocks = <&cpg CPG_MOD R9A07G044_SCI0_CLKP>;
+                       clock-names = "fck";
+                       power-domains = <&cpg>;
+                       resets = <&cpg R9A07G044_SCI0_RST>;
+                       status = "disabled";
+               };
+
+               sci1: serial@1004d400 {
+                       compatible = "renesas,r9a07g044-sci", "renesas,sci";
+                       reg = <0 0x1004d400 0 0x400>;
+                       interrupts = <GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 410 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 411 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 412 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "eri", "rxi", "txi", "tei";
+                       clocks = <&cpg CPG_MOD R9A07G044_SCI1_CLKP>;
+                       clock-names = "fck";
+                       power-domains = <&cpg>;
+                       resets = <&cpg R9A07G044_SCI1_RST>;
+                       status = "disabled";
+               };
+
                canfd: can@10050000 {
                        compatible = "renesas,r9a07g044-canfd", "renesas,rzg2l-canfd";
                        reg = <0 0x10050000 0 0x8000>;
                        };
                };
 
+               tsu: thermal@10059400 {
+                       compatible = "renesas,r9a07g044-tsu",
+                                    "renesas,rzg2l-tsu";
+                       reg = <0 0x10059400 0 0x400>;
+                       clocks = <&cpg CPG_MOD R9A07G044_TSU_PCLK>;
+                       resets = <&cpg R9A07G044_TSU_PRESETN>;
+                       power-domains = <&cpg>;
+                       #thermal-sensor-cells = <1>;
+               };
+
                sbc: spi@10060000 {
                        compatible = "renesas,r9a07g044-rpc-if",
                                     "renesas,rzg2l-rpc-if";
                        status = "disabled";
                };
 
-               pinctrl: pin-controller@11030000 {
+               pinctrl: pinctrl@11030000 {
                        compatible = "renesas,r9a07g044-pinctrl";
                        reg = <0 0x11030000 0 0x10000>;
                        gpio-controller;
                        dma-channels = <16>;
                };
 
+               gpu: gpu@11840000 {
+                       compatible = "renesas,r9a07g044-mali",
+                                    "arm,mali-bifrost";
+                       reg = <0x0 0x11840000 0x0 0x10000>;
+                       interrupts = <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "job", "mmu", "gpu", "event";
+                       clocks = <&cpg CPG_MOD R9A07G044_GPU_CLK>,
+                                <&cpg CPG_MOD R9A07G044_GPU_AXI_CLK>,
+                                <&cpg CPG_MOD R9A07G044_GPU_ACE_CLK>;
+                       clock-names = "gpu", "bus", "bus_ace";
+                       power-domains = <&cpg>;
+                       resets = <&cpg R9A07G044_GPU_RESETN>,
+                                <&cpg R9A07G044_GPU_AXI_RESETN>,
+                                <&cpg R9A07G044_GPU_ACE_RESETN>;
+                       reset-names = "rst", "axi_rst", "ace_rst";
+                       operating-points-v2 = <&gpu_opp_table>;
+               };
+
                gic: interrupt-controller@11900000 {
                        compatible = "arm,gic-v3";
                        #interrupt-cells = <3>;
                        interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cpg CPG_MOD R9A07G044_SDHI0_IMCLK>,
-                                <&cpg CPG_MOD R9A07G044_SDHI0_IMCLK2>,
                                 <&cpg CPG_MOD R9A07G044_SDHI0_CLK_HS>,
+                                <&cpg CPG_MOD R9A07G044_SDHI0_IMCLK2>,
                                 <&cpg CPG_MOD R9A07G044_SDHI0_ACLK>;
-                       clock-names = "imclk", "imclk2", "clk_hs", "aclk";
+                       clock-names = "core", "clkh", "cd", "aclk";
                        resets = <&cpg R9A07G044_SDHI0_IXRST>;
                        power-domains = <&cpg>;
                        status = "disabled";
                        interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cpg CPG_MOD R9A07G044_SDHI1_IMCLK>,
-                                <&cpg CPG_MOD R9A07G044_SDHI1_IMCLK2>,
                                 <&cpg CPG_MOD R9A07G044_SDHI1_CLK_HS>,
+                                <&cpg CPG_MOD R9A07G044_SDHI1_IMCLK2>,
                                 <&cpg CPG_MOD R9A07G044_SDHI1_ACLK>;
-                       clock-names = "imclk", "imclk2", "clk_hs", "aclk";
+                       clock-names = "core", "clkh", "cd", "aclk";
                        resets = <&cpg R9A07G044_SDHI1_IXRST>;
                        power-domains = <&cpg>;
                        status = "disabled";
                        power-domains = <&cpg>;
                        status = "disabled";
                };
+
+               wdt0: watchdog@12800800 {
+                       compatible = "renesas,r9a07g044-wdt",
+                                    "renesas,rzg2l-wdt";
+                       reg = <0 0x12800800 0 0x400>;
+                       clocks = <&cpg CPG_MOD R9A07G044_WDT0_PCLK>,
+                                <&cpg CPG_MOD R9A07G044_WDT0_CLK>;
+                       clock-names = "pclk", "oscclk";
+                       interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "wdt", "perrout";
+                       resets = <&cpg R9A07G044_WDT0_PRESETN>;
+                       power-domains = <&cpg>;
+                       status = "disabled";
+               };
+
+               wdt1: watchdog@12800c00 {
+                       compatible = "renesas,r9a07g044-wdt",
+                                    "renesas,rzg2l-wdt";
+                       reg = <0 0x12800C00 0 0x400>;
+                       clocks = <&cpg CPG_MOD R9A07G044_WDT1_PCLK>,
+                                <&cpg CPG_MOD R9A07G044_WDT1_CLK>;
+                       clock-names = "pclk", "oscclk";
+                       interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "wdt", "perrout";
+                       resets = <&cpg R9A07G044_WDT1_PRESETN>;
+                       power-domains = <&cpg>;
+                       status = "disabled";
+               };
+
+               wdt2: watchdog@12800400 {
+                       compatible = "renesas,r9a07g044-wdt",
+                                    "renesas,rzg2l-wdt";
+                       reg = <0 0x12800400 0 0x400>;
+                       clocks = <&cpg CPG_MOD R9A07G044_WDT2_PCLK>,
+                                <&cpg CPG_MOD R9A07G044_WDT2_CLK>;
+                       clock-names = "pclk", "oscclk";
+                       interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "wdt", "perrout";
+                       resets = <&cpg R9A07G044_WDT2_PRESETN>;
+                       power-domains = <&cpg>;
+                       status = "disabled";
+               };
+
+               ostm0: timer@12801000 {
+                       compatible = "renesas,r9a07g044-ostm",
+                                    "renesas,ostm";
+                       reg = <0x0 0x12801000 0x0 0x400>;
+                       interrupts = <GIC_SPI 46 IRQ_TYPE_EDGE_RISING>;
+                       clocks = <&cpg CPG_MOD R9A07G044_OSTM0_PCLK>;
+                       resets = <&cpg R9A07G044_OSTM0_PRESETZ>;
+                       power-domains = <&cpg>;
+                       status = "disabled";
+               };
+
+               ostm1: timer@12801400 {
+                       compatible = "renesas,r9a07g044-ostm",
+                                    "renesas,ostm";
+                       reg = <0x0 0x12801400 0x0 0x400>;
+                       interrupts = <GIC_SPI 47 IRQ_TYPE_EDGE_RISING>;
+                       clocks = <&cpg CPG_MOD R9A07G044_OSTM1_PCLK>;
+                       resets = <&cpg R9A07G044_OSTM1_PRESETZ>;
+                       power-domains = <&cpg>;
+                       status = "disabled";
+               };
+
+               ostm2: timer@12801800 {
+                       compatible = "renesas,r9a07g044-ostm",
+                                    "renesas,ostm";
+                       reg = <0x0 0x12801800 0x0 0x400>;
+                       interrupts = <GIC_SPI 48 IRQ_TYPE_EDGE_RISING>;
+                       clocks = <&cpg CPG_MOD R9A07G044_OSTM2_PCLK>;
+                       resets = <&cpg R9A07G044_OSTM2_PRESETZ>;
+                       power-domains = <&cpg>;
+                       status = "disabled";
+               };
+       };
+
+       thermal-zones {
+               cpu-thermal {
+                       polling-delay-passive = <250>;
+                       polling-delay = <1000>;
+                       thermal-sensors = <&tsu 0>;
+                       sustainable-power = <717>;
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&target>;
+                                       cooling-device = <&cpu0 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+
+                       trips {
+                               sensor_crit: sensor-crit {
+                                       temperature = <125000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+
+                               target: trip-point {
+                                       temperature = <100000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                       };
+               };
        };
 
        timer {
index 7e84a29..9112e79 100644 (file)
                regulator-always-on;
        };
 
+       reg_1p1v: regulator-vdd-core {
+               compatible = "regulator-fixed";
+               regulator-name = "fixed-1.1V";
+               regulator-min-microvolt = <1100000>;
+               regulator-max-microvolt = <1100000>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+
        vccq_sdhi0: regulator-vccq-sdhi0 {
                compatible = "regulator-gpio";
 
        clock-frequency = <24000000>;
 };
 
+&gpu {
+       mali-supply = <&reg_1p1v>;
+};
+
+&ostm1 {
+       status = "okay";
+};
+
+&ostm2 {
+       status = "okay";
+};
+
 &pinctrl {
        adc_pins: adc {
                pinmux = <RZG2L_PORT_PINMUX(9, 0, 2)>; /* ADC_TRG */
                line-name = "gpio_sd0_pwr_en";
        };
 
+       qspi0_pins: qspi0 {
+               qspi0-data {
+                       pins = "QSPI0_IO0", "QSPI0_IO1", "QSPI0_IO2", "QSPI0_IO3";
+                       power-source = <1800>;
+               };
+
+               qspi0-ctrl {
+                       pins = "QSPI0_SPCLK", "QSPI0_SSL", "QSPI_RESET#";
+                       power-source = <1800>;
+               };
+       };
+
        /*
         * SD0 device selection is XOR between GPIO_SD0_DEV_SEL and SW1[2]
         * The below switch logic can be used to select the device between
        };
 };
 
+&sbc {
+       pinctrl-0 = <&qspi0_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+
+       flash@0 {
+               compatible = "micron,mt25qu512a", "jedec,spi-nor";
+               reg = <0>;
+               m25p,fast-read;
+               spi-max-frequency = <50000000>;
+               spi-rx-bus-width = <4>;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       boot@0 {
+                               reg = <0x00000000 0x2000000>;
+                               read-only;
+                       };
+                       user@2000000 {
+                               reg = <0x2000000 0x2000000>;
+                       };
+               };
+       };
+};
+
 #if SDHI
 &sdhi0 {
        pinctrl-0 = <&sdhi0_pins>;
        status = "okay";
 };
 #endif
+
+&wdt0 {
+       status = "okay";
+       timeout-sec = <60>;
+};
+
+&wdt1 {
+       status = "okay";
+       timeout-sec = <60>;
+};
+
+&wdt2 {
+       status = "okay";
+       timeout-sec = <60>;
+};
index 2863e48..6f2a8bd 100644 (file)
  *
  */
 
+/* comment the #define statement to disable SCIF2 (SER0) on PMOD1 (CN7) */
+#define PMOD1_SER0     1
+
 / {
        aliases {
                serial0 = &scif0;
+               serial1 = &scif2;
                i2c0 = &i2c0;
                i2c1 = &i2c1;
                i2c3 = &i2c3;
                         <RZG2L_PORT_PINMUX(38, 1, 1)>; /* RxD */
        };
 
+       scif2_pins: scif2 {
+               pinmux = <RZG2L_PORT_PINMUX(48, 0, 1)>, /* TxD */
+                        <RZG2L_PORT_PINMUX(48, 1, 1)>, /* RxD */
+                        <RZG2L_PORT_PINMUX(48, 3, 1)>, /* CTS# */
+                        <RZG2L_PORT_PINMUX(48, 4, 1)>; /* RTS# */
+       };
+
        sd1-pwr-en-hog {
                gpio-hog;
                gpios = <RZG2L_GPIO(39, 2) GPIO_ACTIVE_HIGH>;
                input-enable;
        };
 
+       spi1_pins: spi1 {
+               pinmux = <RZG2L_PORT_PINMUX(44, 0, 1)>, /* CK */
+                        <RZG2L_PORT_PINMUX(44, 1, 1)>, /* MOSI */
+                        <RZG2L_PORT_PINMUX(44, 2, 1)>, /* MISO */
+                        <RZG2L_PORT_PINMUX(44, 3, 1)>; /* SSL */
+       };
+
        ssi0_pins: ssi0 {
                pinmux = <RZG2L_PORT_PINMUX(45, 0, 1)>, /* BCK */
                         <RZG2L_PORT_PINMUX(45, 1, 1)>, /* RCK */
        status = "okay";
 };
 
+/*
+ * To enable SCIF2 (SER0) on PMOD1 (CN7)
+ * SW1 should be at position 2->3 so that SER0_CTS# line is activated
+ * SW2 should be at position 2->3 so that SER0_TX line is activated
+ * SW3 should be at position 2->3 so that SER0_RX line is activated
+ * SW4 should be at position 2->3 so that SER0_RTS# line is activated
+ */
+#if PMOD1_SER0
+&scif2 {
+       pinctrl-0 = <&scif2_pins>;
+       pinctrl-names = "default";
+
+       uart-has-rtscts;
+       status = "okay";
+};
+#endif
+
 &sdhi1 {
        pinctrl-0 = <&sdhi1_pins>;
        pinctrl-1 = <&sdhi1_pins_uhs>;
        status = "okay";
 };
 
+&spi1 {
+       pinctrl-0 = <&spi1_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+};
+
 &ssi0 {
        pinctrl-0 = <&ssi0_pins>;
        pinctrl-names = "default";
index bf37777..6092dc4 100644 (file)
@@ -97,6 +97,7 @@
 
                port {
                        hdmi0_con: endpoint {
+                               remote-endpoint = <&rcar_dw_hdmi0_out>;
                        };
                };
        };
        };
 };
 
-&hdmi0_con {
-       remote-endpoint = <&rcar_dw_hdmi0_out>;
-};
-
 #ifdef SOC_HAS_HDMI1
 &hdmi1 {
        status = "okay";
index 7edffe7..a7e93df 100644 (file)
@@ -48,6 +48,7 @@
 
                port {
                        hdmi0_con: endpoint {
+                               remote-endpoint = <&rcar_dw_hdmi0_out>;
                        };
                };
        };
        };
 };
 
-&hdmi0_con {
-       remote-endpoint = <&rcar_dw_hdmi0_out>;
-};
-
 &i2c2 {
        pinctrl-0 = <&i2c2_pins>;
        pinctrl-names = "default";
index 00f50b0..f972704 100644 (file)
        };
 
        dsi: dsi@ff450000 {
-               compatible = "rockchip,px30-mipi-dsi";
+               compatible = "rockchip,px30-mipi-dsi", "snps,dw-mipi-dsi";
                reg = <0x0 0xff450000 0x0 0x10000>;
                interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&cru PCLK_MIPI_DSI>;
index 63c7681..627ee88 100644 (file)
                };
        };
 
+       hdd_a_power: hdd-a-power {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
+               pinctrl-0 = <&hdd_a_power_en>;
+               pinctrl-names = "default";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-name = "hdd_a_power";
+               startup-delay-us = <2000000>;
+       };
+
+       hdd_b_power: hdd-b-power {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
+               pinctrl-0 = <&hdd_b_power_en>;
+               pinctrl-names = "default";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-name = "hdd_b_power";
+               startup-delay-us = <2000000>;
+       };
+
        pcie_power: pcie-power {
                compatible = "regulator-fixed";
                enable-active-high;
                vin-supply = <&vcc5v0_perdev>;
        };
 
+       usblan_power: usblan-power {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio1 RK_PC7 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&usb_lan_en>;
+               regulator-name = "usblan_power";
+               regulator-always-on;
+               regulator-boot-on;
+               vin-supply = <&vcc5v0_usb>;
+       };
+
        vcc1v8_sys_s0: vcc1v8-sys-s0 {
                compatible = "regulator-fixed";
                regulator-name = "vcc1v8_sys_s0";
 };
 
 &pcie0 {
+       ep-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>;
+       max-link-speed = <2>;
        num-lanes = <2>;
+       pinctrl-names = "default";
        status = "okay";
 
        vpcie12v-supply = <&vcc12v_dcin>;
        };
 
        power {
+               hdd_a_power_en: hdd-a-power-en {
+                       rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+
+               hdd_b_power_en: hdd-b-power-en {
+                       rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+
                vcc5v0_usb_en: vcc5v0-usb-en {
                        rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
                };
+
+               usb_lan_en: usb-lan-en {
+                       rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
        };
 
        vcc3v0-sd {
        usb@fe900000 {
                dr_mode = "host";
                status = "okay";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               hub@1 {
+                       compatible = "usb2109,0815";
+                       reg = <1>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@1 {
+                               reg = <1>;
+                               #trigger-source-cells = <0>;
+                       };
+
+                       port@2 {
+                               reg = <2>;
+                               #trigger-source-cells = <0>;
+                       };
+
+                       port@3 {
+                               reg = <3>;
+                               #trigger-source-cells = <0>;
+                       };
+
+                       device@4 {
+                               compatible = "usbbda,8156";
+                               reg = <4>;
+                               #address-cells = <2>;
+                               #size-cells = <0>;
+
+                               interface@0 {   /* interface 0 of configuration 1 */
+                                       compatible = "usbbda,8156.config1.0";
+                                       reg = <0 1>;
+                               };
+                       };
+               };
        };
 };
index 98136c8..54f5957 100644 (file)
@@ -36,7 +36,7 @@
                reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
        };
 
-       sound {
+       sound: sound {
                compatible = "audio-graph-card";
                label = "Analog";
                dais = <&i2s0_p0>;
                };
        };
 
+       es8316 {
+               hp_detect: hp-detect {
+                       rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+
+               hp_int: hp-int {
+                       rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+       };
+
        pcie {
                pcie_pwr_en: pcie-pwr-en {
                        rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
index 281a04b..f5a68d8 100644 (file)
        model = "Radxa ROCK Pi 4A+";
        compatible = "radxa,rockpi4a-plus", "radxa,rockpi4", "rockchip,rk3399";
 };
+
+&es8316 {
+       pinctrl-0 = <&hp_detect &hp_int>;
+       pinctrl-names = "default";
+       interrupt-parent = <&gpio1>;
+       interrupts = <RK_PA1 IRQ_TYPE_LEVEL_HIGH>;
+};
+
+&sound {
+       hp-det-gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
+};
index dfad13d..cec3b7b 100644 (file)
        };
 };
 
+&es8316 {
+       pinctrl-0 = <&hp_detect &hp_int>;
+       pinctrl-names = "default";
+       interrupt-parent = <&gpio1>;
+       interrupts = <RK_PA1 IRQ_TYPE_LEVEL_HIGH>;
+};
+
 &sdio0 {
        status = "okay";
 
        };
 };
 
+&sound {
+       hp-det-gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
+};
+
 &uart0 {
        status = "okay";
 
        bluetooth {
-               compatible = "brcm,bcm43438-bt";
+               compatible = "brcm,bcm4345c5";
                clocks = <&rk808 1>;
-               clock-names = "ext_clock";
+               clock-names = "lpo";
                device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
                host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
                shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
+               max-speed = <1500000>;
                pinctrl-names = "default";
                pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
+               vbat-supply = <&vcc3v3_sys>;
+               vddio-supply = <&vcc_1v8>;
        };
 };
index 6c63e61..cf48746 100644 (file)
        status = "okay";
 
        bluetooth {
-               compatible = "brcm,bcm43438-bt";
+               compatible = "brcm,bcm4345c5";
                clocks = <&rk808 1>;
-               clock-names = "ext_clock";
+               clock-names = "lpo";
                device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
                host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
                shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
+               max-speed = <1500000>;
                pinctrl-names = "default";
                pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
+               vbat-supply = <&vcc3v3_sys>;
+               vddio-supply = <&vcc_1v8>;
        };
 };
index 99169bc..793d848 100644 (file)
        };
 };
 
+&es8316 {
+       pinctrl-0 = <&hp_detect &hp_int>;
+       pinctrl-names = "default";
+       interrupt-parent = <&gpio1>;
+       interrupts = <RK_PA1 IRQ_TYPE_LEVEL_HIGH>;
+};
+
 &sdio0 {
        status = "okay";
 
        };
 };
 
+&sound {
+       hp-det-gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
+};
+
 &uart0 {
        status = "okay";
 
        bluetooth {
-               compatible = "brcm,bcm43438-bt";
+               compatible = "brcm,bcm4345c5";
                clocks = <&rk808 1>;
-               clock-names = "ext_clock";
+               clock-names = "lpo";
                device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
                host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
                shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
+               max-speed = <1500000>;
                pinctrl-names = "default";
                pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
+               vbat-supply = <&vcc3v3_sys>;
+               vddio-supply = <&vcc_1v8>;
        };
 };
 
index 4d4b2a3..166399b 100644 (file)
        status = "okay";
 };
 
+&spi1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&spi1m1_cs0 &spi1m1_pins>;
+};
+
 &tsadc {
        /* tshut mode 0:CRU 1:GPIO */
        rockchip,hw-tshut-mode = <1>;
index 46d9552..a68033a 100644 (file)
                serial7 = &uart7;
                serial8 = &uart8;
                serial9 = &uart9;
+               spi0 = &spi0;
+               spi1 = &spi1;
+               spi2 = &spi2;
+               spi3 = &spi3;
        };
 
        cpus {
                clocks = <&pmucru CLK_PWM0>, <&pmucru PCLK_PWM0>;
                clock-names = "pwm", "pclk";
                pinctrl-0 = <&pwm0m0_pins>;
-               pinctrl-names = "active";
+               pinctrl-names = "default";
                #pwm-cells = <3>;
                status = "disabled";
        };
                clocks = <&pmucru CLK_PWM0>, <&pmucru PCLK_PWM0>;
                clock-names = "pwm", "pclk";
                pinctrl-0 = <&pwm1m0_pins>;
-               pinctrl-names = "active";
+               pinctrl-names = "default";
                #pwm-cells = <3>;
                status = "disabled";
        };
                clocks = <&pmucru CLK_PWM0>, <&pmucru PCLK_PWM0>;
                clock-names = "pwm", "pclk";
                pinctrl-0 = <&pwm2m0_pins>;
-               pinctrl-names = "active";
+               pinctrl-names = "default";
                #pwm-cells = <3>;
                status = "disabled";
        };
                clocks = <&pmucru CLK_PWM0>, <&pmucru PCLK_PWM0>;
                clock-names = "pwm", "pclk";
                pinctrl-0 = <&pwm3_pins>;
-               pinctrl-names = "active";
+               pinctrl-names = "default";
                #pwm-cells = <3>;
                status = "disabled";
        };
                clock-names = "tclk", "pclk";
        };
 
+       spi0: spi@fe610000 {
+               compatible = "rockchip,rk3568-spi", "rockchip,rk3066-spi";
+               reg = <0x0 0xfe610000 0x0 0x1000>;
+               interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru CLK_SPI0>, <&cru PCLK_SPI0>;
+               clock-names = "spiclk", "apb_pclk";
+               dmas = <&dmac0 20>, <&dmac0 21>;
+               dma-names = "tx", "rx";
+               pinctrl-names = "default";
+               pinctrl-0 = <&spi0m0_cs0 &spi0m0_cs1 &spi0m0_pins>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
+       spi1: spi@fe620000 {
+               compatible = "rockchip,rk3568-spi", "rockchip,rk3066-spi";
+               reg = <0x0 0xfe620000 0x0 0x1000>;
+               interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru CLK_SPI1>, <&cru PCLK_SPI1>;
+               clock-names = "spiclk", "apb_pclk";
+               dmas = <&dmac0 22>, <&dmac0 23>;
+               dma-names = "tx", "rx";
+               pinctrl-names = "default";
+               pinctrl-0 = <&spi1m0_cs0 &spi1m0_cs1 &spi1m0_pins>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
+       spi2: spi@fe630000 {
+               compatible = "rockchip,rk3568-spi", "rockchip,rk3066-spi";
+               reg = <0x0 0xfe630000 0x0 0x1000>;
+               interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru CLK_SPI2>, <&cru PCLK_SPI2>;
+               clock-names = "spiclk", "apb_pclk";
+               dmas = <&dmac0 24>, <&dmac0 25>;
+               dma-names = "tx", "rx";
+               pinctrl-names = "default";
+               pinctrl-0 = <&spi2m0_cs0 &spi2m0_cs1 &spi2m0_pins>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
+       spi3: spi@fe640000 {
+               compatible = "rockchip,rk3568-spi", "rockchip,rk3066-spi";
+               reg = <0x0 0xfe640000 0x0 0x1000>;
+               interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru CLK_SPI3>, <&cru PCLK_SPI3>;
+               clock-names = "spiclk", "apb_pclk";
+               dmas = <&dmac0 26>, <&dmac0 27>;
+               dma-names = "tx", "rx";
+               pinctrl-names = "default";
+               pinctrl-0 = <&spi3m0_cs0 &spi3m0_cs1 &spi3m0_pins>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
        uart1: serial@fe650000 {
                compatible = "rockchip,rk3568-uart", "snps,dw-apb-uart";
                reg = <0x0 0xfe650000 0x0 0x100>;
                clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>;
                clock-names = "pwm", "pclk";
                pinctrl-0 = <&pwm4_pins>;
-               pinctrl-names = "active";
+               pinctrl-names = "default";
                #pwm-cells = <3>;
                status = "disabled";
        };
                clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>;
                clock-names = "pwm", "pclk";
                pinctrl-0 = <&pwm5_pins>;
-               pinctrl-names = "active";
+               pinctrl-names = "default";
                #pwm-cells = <3>;
                status = "disabled";
        };
                clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>;
                clock-names = "pwm", "pclk";
                pinctrl-0 = <&pwm6_pins>;
-               pinctrl-names = "active";
+               pinctrl-names = "default";
                #pwm-cells = <3>;
                status = "disabled";
        };
                clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>;
                clock-names = "pwm", "pclk";
                pinctrl-0 = <&pwm7_pins>;
-               pinctrl-names = "active";
+               pinctrl-names = "default";
                #pwm-cells = <3>;
                status = "disabled";
        };
                clocks = <&cru CLK_PWM2>, <&cru PCLK_PWM2>;
                clock-names = "pwm", "pclk";
                pinctrl-0 = <&pwm8m0_pins>;
-               pinctrl-names = "active";
+               pinctrl-names = "default";
                #pwm-cells = <3>;
                status = "disabled";
        };
                clocks = <&cru CLK_PWM2>, <&cru PCLK_PWM2>;
                clock-names = "pwm", "pclk";
                pinctrl-0 = <&pwm9m0_pins>;
-               pinctrl-names = "active";
+               pinctrl-names = "default";
                #pwm-cells = <3>;
                status = "disabled";
        };
                clocks = <&cru CLK_PWM2>, <&cru PCLK_PWM2>;
                clock-names = "pwm", "pclk";
                pinctrl-0 = <&pwm10m0_pins>;
-               pinctrl-names = "active";
+               pinctrl-names = "default";
                #pwm-cells = <3>;
                status = "disabled";
        };
                clocks = <&cru CLK_PWM2>, <&cru PCLK_PWM2>;
                clock-names = "pwm", "pclk";
                pinctrl-0 = <&pwm11m0_pins>;
-               pinctrl-names = "active";
+               pinctrl-names = "default";
                #pwm-cells = <3>;
                status = "disabled";
        };
                clocks = <&cru CLK_PWM3>, <&cru PCLK_PWM3>;
                clock-names = "pwm", "pclk";
                pinctrl-0 = <&pwm12m0_pins>;
-               pinctrl-names = "active";
+               pinctrl-names = "default";
                #pwm-cells = <3>;
                status = "disabled";
        };
                clocks = <&cru CLK_PWM3>, <&cru PCLK_PWM3>;
                clock-names = "pwm", "pclk";
                pinctrl-0 = <&pwm13m0_pins>;
-               pinctrl-names = "active";
+               pinctrl-names = "default";
                #pwm-cells = <3>;
                status = "disabled";
        };
                clocks = <&cru CLK_PWM3>, <&cru PCLK_PWM3>;
                clock-names = "pwm", "pclk";
                pinctrl-0 = <&pwm14m0_pins>;
-               pinctrl-names = "active";
+               pinctrl-names = "default";
                #pwm-cells = <3>;
                status = "disabled";
        };
                clocks = <&cru CLK_PWM3>, <&cru PCLK_PWM3>;
                clock-names = "pwm", "pclk";
                pinctrl-0 = <&pwm15m0_pins>;
-               pinctrl-names = "active";
+               pinctrl-names = "default";
                #pwm-cells = <3>;
                status = "disabled";
        };
index 71f6097..90be511 100644 (file)
@@ -17,5 +17,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-j721e-sk.dtb
 
 dtb-$(CONFIG_ARCH_K3) += k3-j7200-common-proc-board.dtb
 
+dtb-$(CONFIG_ARCH_K3) += k3-j721s2-common-proc-board.dtb
+
 dtb-$(CONFIG_ARCH_K3) += k3-am642-evm.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-am642-sk.dtb
index 5ad638b..012011d 100644 (file)
                ti,cpts-ext-ts-inputs = <8>;
        };
 
+       timesync_router: pinctrl@a40000 {
+               compatible = "pinctrl-single";
+               reg = <0x0 0xa40000 0x0 0x800>;
+               #pinctrl-cells = <1>;
+               pinctrl-single,register-width = <32>;
+               pinctrl-single,function-mask = <0x000107ff>;
+       };
+
        usbss0: cdns-usb@f900000{
                compatible = "ti,am64-usb";
                reg = <0x00 0xf900000 0x00 0x100>;
                        bus_freq = <1000000>;
                };
        };
+
+       main_mcan0: can@20701000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x20701000 0x00 0x200>,
+                     <0x00 0x20708000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 98 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 98 5>, <&k3_clks 98 0>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan1: can@20711000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x20711000 0x00 0x200>,
+                     <0x00 0x20718000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 99 TI_SCI_PD_EXCLUSIVE>;
+               clocks =  <&k3_clks 99 5>, <&k3_clks 99 0>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
 };
index 6726c4c..e94ae17 100644 (file)
                        };
                };
        };
+
+       transceiver1: can-phy0 {
+               compatible = "ti,tcan1042";
+               #phy-cells = <0>;
+               max-bitrate = <5000000>;
+               standby-gpios = <&exp1 8 GPIO_ACTIVE_HIGH>;
+       };
+
+       transceiver2: can-phy1 {
+               compatible = "ti,tcan1042";
+               #phy-cells = <0>;
+               max-bitrate = <5000000>;
+               standby-gpios = <&exp1 9 GPIO_ACTIVE_HIGH>;
+       };
 };
 
 &main_pmx0 {
                        AM64X_IOPAD(0x0270, PIN_INPUT, 0) /* (D18) ECAP0_IN_APWM_OUT */
                >;
        };
+
+       main_mcan0_pins_default: main-mcan0-pins-default {
+               pinctrl-single,pins = <
+                       AM64X_IOPAD(0x0254, PIN_INPUT, 0) /* (B17) MCAN0_RX */
+                       AM64X_IOPAD(0x0250, PIN_OUTPUT, 0) /* (A17) MCAN0_TX */
+               >;
+       };
+
+       main_mcan1_pins_default: main-mcan1-pins-default {
+               pinctrl-single,pins = <
+                       AM64X_IOPAD(0x025c, PIN_INPUT, 0) /* (D17) MCAN1_RX */
+                       AM64X_IOPAD(0x0258, PIN_OUTPUT, 0) /* (C17) MCAN1_TX */
+               >;
+       };
 };
 
 &main_uart0 {
 &icssg1_mdio {
        status = "disabled";
 };
+
+&main_mcan0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&main_mcan0_pins_default>;
+       phys = <&transceiver1>;
+};
+
+&main_mcan1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&main_mcan1_pins_default>;
+       phys = <&transceiver2>;
+};
index 6b04745..a9785be 100644 (file)
 &icssg1_mdio {
        status = "disabled";
 };
+
+&main_mcan0 {
+       status = "disabled";
+};
+
+&main_mcan1 {
+       status = "disabled";
+};
index e2b397c..8a76f48 100644 (file)
@@ -60,6 +60,6 @@
                cache-level = <2>;
                cache-size = <0x40000>;
                cache-line-size = <64>;
-               cache-sets = <512>;
+               cache-sets = <256>;
        };
 };
index 65da226..3079eae 100644 (file)
        reset-gpios = <&wkup_gpio0 27 GPIO_ACTIVE_HIGH>;
 };
 
+&m_can0 {
+       status = "disabled";
+};
+
+&m_can1 {
+       status = "disabled";
+};
+
 &pcie1_ep {
        status = "disabled";
 };
 &icssg2_mdio {
        status = "disabled";
 };
+
+&mcasp0 {
+       status = "disabled";
+};
+
+&mcasp1 {
+       status = "disabled";
+};
+
+&mcasp2 {
+       status = "disabled";
+};
index c93ff15..8d592bf 100644 (file)
                };
        };
 
+       m_can0: mcan@40528000 {
+               compatible = "bosch,m_can";
+               reg = <0x0 0x40528000 0x0 0x400>,
+                     <0x0 0x40500000 0x0 0x4400>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 102 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 102 5>, <&k3_clks 102 0>;
+               clock-names = "hclk", "cclk";
+               interrupt-parent = <&gic500>;
+               interrupts = <GIC_SPI 544 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 545 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       m_can1: mcan@40568000 {
+               compatible = "bosch,m_can";
+               reg = <0x0 0x40568000 0x0 0x400>,
+                     <0x0 0x40540000 0x0 0x4400>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 103 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 103 5>, <&k3_clks 103 0>;
+               clock-names = "hclk", "cclk";
+               interrupt-parent = <&gic500>;
+               interrupts = <GIC_SPI 547 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 548 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
        fss: fss@47000000 {
                compatible = "simple-bus";
                #address-cells = <2>;
index cfbcebf..9043f91 100644 (file)
        status = "disabled";
 };
 
+&m_can0 {
+       status = "disabled";
+};
+
+&m_can1 {
+       status = "disabled";
+};
+
 &mailbox0_cluster0 {
        interrupts = <436>;
 
index d60ef4f..05a627a 100644 (file)
@@ -32,7 +32,7 @@
                #size-cells = <1>;
                ranges = <0x00 0x00 0x00100000 0x1c000>;
 
-               serdes_ln_ctrl: serdes-ln-ctrl@4080 {
+               serdes_ln_ctrl: mux-controller@4080 {
                        compatible = "mmio-mux";
                        #mux-control-cells = <1>;
                        mux-reg-masks = <0x4080 0x3>, <0x4084 0x3>, /* SERDES0 lane0/1 select */
index 47567cb..64fef4e 100644 (file)
@@ -62,7 +62,7 @@
                        i-cache-sets = <256>;
                        d-cache-size = <0x8000>;
                        d-cache-line-size = <64>;
-                       d-cache-sets = <128>;
+                       d-cache-sets = <256>;
                        next-level-cache = <&L2_0>;
                };
 
@@ -76,7 +76,7 @@
                        i-cache-sets = <256>;
                        d-cache-size = <0x8000>;
                        d-cache-line-size = <64>;
-                       d-cache-sets = <128>;
+                       d-cache-sets = <256>;
                        next-level-cache = <&L2_0>;
                };
        };
@@ -86,7 +86,7 @@
                cache-level = <2>;
                cache-size = <0x100000>;
                cache-line-size = <64>;
-               cache-sets = <2048>;
+               cache-sets = <1024>;
                next-level-cache = <&msmc_l3>;
        };
 
index dc2bc67..2d75969 100644 (file)
                              "cpb-codec-scki",
                              "cpb-codec-scki-48000", "cpb-codec-scki-44100";
        };
+
+       transceiver1: can-phy0 {
+               compatible = "ti,tcan1043";
+               #phy-cells = <0>;
+               max-bitrate = <5000000>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&mcu_mcan0_gpio_pins_default>;
+               standby-gpios = <&wkup_gpio0 54 GPIO_ACTIVE_LOW>;
+               enable-gpios = <&wkup_gpio0 0 GPIO_ACTIVE_HIGH>;
+       };
+
+       transceiver2: can-phy1 {
+               compatible = "ti,tcan1042";
+               #phy-cells = <0>;
+               max-bitrate = <5000000>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&mcu_mcan1_gpio_pins_default>;
+               standby-gpios = <&wkup_gpio0 2 GPIO_ACTIVE_HIGH>;
+       };
+
+       transceiver3: can-phy2 {
+               compatible = "ti,tcan1043";
+               #phy-cells = <0>;
+               max-bitrate = <5000000>;
+               standby-gpios = <&exp2 7 GPIO_ACTIVE_LOW>;
+               enable-gpios = <&exp2 6 GPIO_ACTIVE_HIGH>;
+       };
+
+       transceiver4: can-phy3 {
+               compatible = "ti,tcan1042";
+               #phy-cells = <0>;
+               max-bitrate = <5000000>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&main_mcan2_gpio_pins_default>;
+               standby-gpios = <&main_gpio0 127 GPIO_ACTIVE_HIGH>;
+       };
 };
 
 &main_pmx0 {
                        J721E_IOPAD(0x1a4, PIN_OUTPUT, 3) /* (W26) RGMII6_RXC.AUDIO_EXT_REFCLK2 */
                >;
        };
+
+       main_mcan0_pins_default: main-mcan0-pins-default {
+               pinctrl-single,pins = <
+                       J721E_IOPAD(0x208, PIN_INPUT, 0) /* (W5) MCAN0_RX */
+                       J721E_IOPAD(0x20c, PIN_OUTPUT, 0) /* (W6) MCAN0_TX */
+               >;
+       };
+
+       main_mcan2_pins_default: main-mcan2-pins-default {
+               pinctrl-single,pins = <
+                       J721E_IOPAD(0x01f0, PIN_INPUT, 3) /* (AC2) MCAN2_RX.GPIO0_123 */
+                       J721E_IOPAD(0x01f4, PIN_OUTPUT, 3) /* (AB1) MCAN2_TX.GPIO0_124 */
+               >;
+       };
+
+       main_mcan2_gpio_pins_default: main-mcan2-gpio-pins-default {
+               pinctrl-single,pins = <
+                       J721E_IOPAD(0x200, PIN_INPUT, 7) /* (AC4) UART1_CTSn.GPIO0_127 */
+               >;
+       };
 };
 
 &wkup_pmx0 {
                        J721E_WKUP_IOPAD(0x0088, PIN_INPUT, 0) /* MCU_MDIO0_MDIO */
                >;
        };
+
+       mcu_mcan0_pins_default: mcu-mcan0-pins-default {
+               pinctrl-single,pins = <
+                       J721E_WKUP_IOPAD(0xac, PIN_INPUT, 0) /* (C29) MCU_MCAN0_RX */
+                       J721E_WKUP_IOPAD(0xa8, PIN_OUTPUT, 0) /* (D29) MCU_MCAN0_TX */
+               >;
+       };
+
+       mcu_mcan0_gpio_pins_default: mcu-mcan0-gpio-pins-default {
+               pinctrl-single,pins = <
+                       J721E_WKUP_IOPAD(0xb0, PIN_INPUT, 7) /* (F26) WKUP_GPIO0_0 */
+                       J721E_WKUP_IOPAD(0x98, PIN_INPUT, 7) /* (E28) MCU_SPI0_D1.WKUP_GPIO0_54 */
+               >;
+       };
+
+       mcu_mcan1_pins_default: mcu-mcan1-pins-default {
+               pinctrl-single,pins = <
+                       J721E_WKUP_IOPAD(0xc4, PIN_INPUT, 0) /* (G24) WKUP_GPIO0_5.MCU_MCAN1_RX */
+                       J721E_WKUP_IOPAD(0xc0, PIN_OUTPUT, 0) /* (G25) WKUP_GPIO0_4.MCU_MCAN1_TX */
+               >;
+       };
+
+       mcu_mcan1_gpio_pins_default: mcu-mcan1-gpio-pins-default {
+               pinctrl-single,pins = <
+                       J721E_WKUP_IOPAD(0xb8, PIN_INPUT, 7) /* (F28) WKUP_GPIO0_2 */
+               >;
+       };
 };
 
 &wkup_uart0 {
 &icssg1_mdio {
        status = "disabled";
 };
+
+&mcu_mcan0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mcu_mcan0_pins_default>;
+       phys = <&transceiver1>;
+};
+
+&mcu_mcan1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mcu_mcan1_pins_default>;
+       phys = <&transceiver2>;
+};
+
+&main_mcan0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&main_mcan0_pins_default>;
+       phys = <&transceiver3>;
+};
+
+&main_mcan1 {
+       status = "disabled";
+};
+
+&main_mcan2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&main_mcan2_pins_default>;
+       phys = <&transceiver4>;
+};
+
+&main_mcan3 {
+       status = "disabled";
+};
+
+&main_mcan4 {
+       status = "disabled";
+};
+
+&main_mcan5 {
+       status = "disabled";
+};
+
+&main_mcan6 {
+       status = "disabled";
+};
+
+&main_mcan7 {
+       status = "disabled";
+};
+
+&main_mcan8 {
+       status = "disabled";
+};
+
+&main_mcan9 {
+       status = "disabled";
+};
+
+&main_mcan10 {
+       status = "disabled";
+};
+
+&main_mcan11 {
+       status = "disabled";
+};
+
+&main_mcan12 {
+       status = "disabled";
+};
+
+&main_mcan13 {
+       status = "disabled";
+};
index 08c8d1b..5998612 100644 (file)
@@ -42,7 +42,7 @@
                #size-cells = <1>;
                ranges = <0x0 0x0 0x00100000 0x1c000>;
 
-               serdes_ln_ctrl: mux@4080 {
+               serdes_ln_ctrl: mux-controller@4080 {
                        compatible = "mmio-mux";
                        reg = <0x00004080 0x50>;
                        #mux-control-cells = <1>;
                        bus_freq = <1000000>;
                };
        };
+
+       main_mcan0: can@2701000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x02701000 0x00 0x200>,
+                     <0x00 0x02708000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 156 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 156 0>, <&k3_clks 156 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan1: can@2711000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x02711000 0x00 0x200>,
+                     <0x00 0x02718000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 158 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 158 0>, <&k3_clks 158 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan2: can@2721000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x02721000 0x00 0x200>,
+                     <0x00 0x02728000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 160 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 160 0>, <&k3_clks 160 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan3: can@2731000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x02731000 0x00 0x200>,
+                     <0x00 0x02738000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 161 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 161 0>, <&k3_clks 161 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan4: can@2741000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x02741000 0x00 0x200>,
+                     <0x00 0x02748000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 162 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 162 0>, <&k3_clks 162 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan5: can@2751000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x02751000 0x00 0x200>,
+                     <0x00 0x02758000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 163 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 163 0>, <&k3_clks 163 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan6: can@2761000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x02761000 0x00 0x200>,
+                     <0x00 0x02768000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 164 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 164 0>, <&k3_clks 164 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan7: can@2771000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x02771000 0x00 0x200>,
+                     <0x00 0x02778000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 165 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 165 0>, <&k3_clks 165 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan8: can@2781000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x02781000 0x00 0x200>,
+                     <0x00 0x02788000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 166 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 166 0>, <&k3_clks 166 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 576 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 577 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan9: can@2791000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x02791000 0x00 0x200>,
+                     <0x00 0x02798000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 167 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 167 0>, <&k3_clks 167 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 579 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 580 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan10: can@27a1000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x027a1000 0x00 0x200>,
+                     <0x00 0x027a8000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 168 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 168 0>, <&k3_clks 168 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 582 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 583 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan11: can@27b1000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x027b1000 0x00 0x200>,
+                     <0x00 0x027b8000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 169 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 169 0>, <&k3_clks 169 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 585 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 586 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan12: can@27c1000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x027c1000 0x00 0x200>,
+                     <0x00 0x027c8000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 170 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 170 0>, <&k3_clks 170 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 588 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 589 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan13: can@27d1000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x027d1000 0x00 0x200>,
+                     <0x00 0x027d8000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 171 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 171 0>, <&k3_clks 171 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 591 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 592 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
 };
index d2dceda..b4972df 100644 (file)
                        ti,loczrama = <1>;
                };
        };
+
+       mcu_mcan0: can@40528000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x40528000 0x00 0x200>,
+                     <0x00 0x40500000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 172 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 172 0>, <&k3_clks 172 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 832 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 833 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       mcu_mcan1: can@40568000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x40568000 0x00 0x200>,
+                     <0x00 0x40540000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 173 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 173 0>, <&k3_clks 173 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 835 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 836 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
 };
index 214359e..4a3872f 100644 (file)
@@ -64,7 +64,7 @@
                        i-cache-sets = <256>;
                        d-cache-size = <0x8000>;
                        d-cache-line-size = <64>;
-                       d-cache-sets = <128>;
+                       d-cache-sets = <256>;
                        next-level-cache = <&L2_0>;
                };
 
@@ -78,7 +78,7 @@
                        i-cache-sets = <256>;
                        d-cache-size = <0x8000>;
                        d-cache-line-size = <64>;
-                       d-cache-sets = <128>;
+                       d-cache-sets = <256>;
                        next-level-cache = <&L2_0>;
                };
        };
@@ -88,7 +88,7 @@
                cache-level = <2>;
                cache-size = <0x100000>;
                cache-line-size = <64>;
-               cache-sets = <2048>;
+               cache-sets = <1024>;
                next-level-cache = <&msmc_l3>;
        };
 
diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts b/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts
new file mode 100644 (file)
index 0000000..a5a24f9
--- /dev/null
@@ -0,0 +1,421 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com/
+ *
+ * Common Processor Board: https://www.ti.com/tool/J721EXCPXEVM
+ */
+
+/dts-v1/;
+
+#include "k3-j721s2-som-p0.dtsi"
+#include <dt-bindings/net/ti-dp83867.h>
+
+/ {
+       compatible = "ti,j721s2-evm", "ti,j721s2";
+       model = "Texas Instruments J721S2 EVM";
+
+       chosen {
+               stdout-path = "serial10:115200n8";
+               bootargs = "console=ttyS10,115200n8 earlycon=ns16550a,mmio32,2880000";
+       };
+
+       evm_12v0: fixedregulator-evm12v0 {
+               /* main supply */
+               compatible = "regulator-fixed";
+               regulator-name = "evm_12v0";
+               regulator-min-microvolt = <12000000>;
+               regulator-max-microvolt = <12000000>;
+               regulator-always-on;
+               regulator-boot-on;
+       };
+
+       vsys_3v3: fixedregulator-vsys3v3 {
+               /* Output of LM5140 */
+               compatible = "regulator-fixed";
+               regulator-name = "vsys_3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               vin-supply = <&evm_12v0>;
+               regulator-always-on;
+               regulator-boot-on;
+       };
+
+       vsys_5v0: fixedregulator-vsys5v0 {
+               /* Output of LM5140 */
+               compatible = "regulator-fixed";
+               regulator-name = "vsys_5v0";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               vin-supply = <&evm_12v0>;
+               regulator-always-on;
+               regulator-boot-on;
+       };
+
+       vdd_mmc1: fixedregulator-sd {
+               /* Output of TPS22918 */
+               compatible = "regulator-fixed";
+               regulator-name = "vdd_mmc1";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+               enable-active-high;
+               vin-supply = <&vsys_3v3>;
+               gpio = <&exp2 2 GPIO_ACTIVE_HIGH>;
+       };
+
+       vdd_sd_dv: gpio-regulator-TLV71033 {
+               /* Output of TLV71033 */
+               compatible = "regulator-gpio";
+               regulator-name = "tlv71033";
+               pinctrl-names = "default";
+               pinctrl-0 = <&vdd_sd_dv_pins_default>;
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+               vin-supply = <&vsys_5v0>;
+               gpios = <&main_gpio0 8 GPIO_ACTIVE_HIGH>;
+               states = <1800000 0x0>,
+                        <3300000 0x1>;
+       };
+
+       transceiver1: can-phy1 {
+               compatible = "ti,tcan1043";
+               #phy-cells = <0>;
+               max-bitrate = <5000000>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&mcu_mcan0_gpio_pins_default>;
+               standby-gpios = <&wkup_gpio0 69 GPIO_ACTIVE_LOW>;
+               enable-gpios = <&wkup_gpio0 0 GPIO_ACTIVE_HIGH>;
+       };
+
+       transceiver2: can-phy2 {
+               compatible = "ti,tcan1042";
+               #phy-cells = <0>;
+               max-bitrate = <5000000>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&mcu_mcan1_gpio_pins_default>;
+               standby-gpios = <&wkup_gpio0 2 GPIO_ACTIVE_HIGH>;
+       };
+
+};
+
+&main_pmx0 {
+       main_uart8_pins_default: main-uart8-pins-default {
+               pinctrl-single,pins = <
+                       J721S2_IOPAD(0x040, PIN_INPUT, 14) /* (AC28) MCASP0_AXR0.UART8_CTSn */
+                       J721S2_IOPAD(0x044, PIN_OUTPUT, 14) /* (Y26) MCASP0_AXR1.UART8_RTSn */
+                       J721S2_IOPAD(0x0d0, PIN_INPUT, 11) /* (AF26) SPI0_CS1.UART8_RXD */
+                       J721S2_IOPAD(0x0d4, PIN_OUTPUT, 11) /* (AH27) SPI0_CLK.UART8_TXD */
+               >;
+       };
+
+       main_i2c3_pins_default: main-i2c3-pins-default {
+               pinctrl-single,pins = <
+                       J721S2_IOPAD(0x064, PIN_INPUT_PULLUP, 13) /* (W28) MCAN0_TX.I2C3_SCL */
+                       J721S2_IOPAD(0x060, PIN_INPUT_PULLUP, 13) /* (AC27) MCASP2_AXR1.I2C3_SDA */
+               >;
+       };
+
+       main_mmc1_pins_default: main-mmc1-pins-default {
+               pinctrl-single,pins = <
+                       J721S2_IOPAD(0x104, PIN_INPUT, 0) /* (P23) MMC1_CLK */
+                       J721S2_IOPAD(0x108, PIN_INPUT, 0) /* (N24) MMC1_CMD */
+                       J721S2_IOPAD(0x100, PIN_INPUT, 0) /* (###) MMC1_CLKLB */
+                       J721S2_IOPAD(0x0fc, PIN_INPUT, 0) /* (M23) MMC1_DAT0 */
+                       J721S2_IOPAD(0x0f8, PIN_INPUT, 0) /* (P24) MMC1_DAT1 */
+                       J721S2_IOPAD(0x0f4, PIN_INPUT, 0) /* (R24) MMC1_DAT2 */
+                       J721S2_IOPAD(0x0f0, PIN_INPUT, 0) /* (R22) MMC1_DAT3 */
+                       J721S2_IOPAD(0x0e8, PIN_INPUT, 8) /* (AE25) TIMER_IO0.MMC1_SDCD */
+               >;
+       };
+
+       vdd_sd_dv_pins_default: vdd-sd-dv-pins-default {
+               pinctrl-single,pins = <
+                       J721S2_IOPAD(0x020, PIN_INPUT, 7) /* (AA23) MCAN15_RX.GPIO0_8 */
+               >;
+       };
+};
+
+&wkup_pmx0 {
+       mcu_cpsw_pins_default: mcu-cpsw-pins-default {
+               pinctrl-single,pins = <
+                       J721S2_WKUP_IOPAD(0x094, PIN_INPUT, 0) /* (B22) MCU_RGMII1_RD0 */
+                       J721S2_WKUP_IOPAD(0x090, PIN_INPUT, 0) /* (B21) MCU_RGMII1_RD1 */
+                       J721S2_WKUP_IOPAD(0x08c, PIN_INPUT, 0) /* (C22) MCU_RGMII1_RD2 */
+                       J721S2_WKUP_IOPAD(0x088, PIN_INPUT, 0) /* (D23) MCU_RGMII1_RD3 */
+                       J721S2_WKUP_IOPAD(0x084, PIN_INPUT, 0) /* (D22) MCU_RGMII1_RXC */
+                       J721S2_WKUP_IOPAD(0x06c, PIN_INPUT, 0) /* (E23) MCU_RGMII1_RX_CTL */
+                       J721S2_WKUP_IOPAD(0x07c, PIN_OUTPUT, 0) /* (F23) MCU_RGMII1_TD0 */
+                       J721S2_WKUP_IOPAD(0x078, PIN_OUTPUT, 0) /* (G22) MCU_RGMII1_TD1 */
+                       J721S2_WKUP_IOPAD(0x074, PIN_OUTPUT, 0) /* (E21) MCU_RGMII1_TD2 */
+                       J721S2_WKUP_IOPAD(0x070, PIN_OUTPUT, 0) /* (E22) MCU_RGMII1_TD3 */
+                       J721S2_WKUP_IOPAD(0x080, PIN_OUTPUT, 0) /* (F21) MCU_RGMII1_TXC */
+                       J721S2_WKUP_IOPAD(0x068, PIN_OUTPUT, 0) /* (F22) MCU_RGMII1_TX_CTL */
+               >;
+       };
+
+       mcu_mdio_pins_default: mcu-mdio-pins-default {
+               pinctrl-single,pins = <
+                       J721S2_WKUP_IOPAD(0x09c, PIN_OUTPUT, 0) /* (A21) MCU_MDIO0_MDC */
+                       J721S2_WKUP_IOPAD(0x098, PIN_INPUT, 0) /* (A22) MCU_MDIO0_MDIO */
+               >;
+       };
+
+       mcu_mcan0_pins_default: mcu-mcan0-pins-default {
+               pinctrl-single,pins = <
+                       J721S2_WKUP_IOPAD(0x0bc, PIN_INPUT, 0) /* (E28) MCU_MCAN0_RX */
+                       J721S2_WKUP_IOPAD(0x0b8, PIN_OUTPUT, 0) /* (E27) MCU_MCAN0_TX */
+               >;
+       };
+
+       mcu_mcan1_pins_default: mcu-mcan1-pins-default {
+               pinctrl-single,pins = <
+                       J721S2_WKUP_IOPAD(0x0d4, PIN_INPUT, 0) /* (F26) WKUP_GPIO0_5.MCU_MCAN1_RX */
+                       J721S2_WKUP_IOPAD(0x0d0, PIN_OUTPUT, 0) /* (C23) WKUP_GPIO0_4.MCU_MCAN1_TX */
+               >;
+       };
+
+       mcu_mcan0_gpio_pins_default: mcu-mcan0-gpio-pins-default {
+               pinctrl-single,pins = <
+                       J721S2_WKUP_IOPAD(0x0c0, PIN_INPUT, 7) /* (D26) WKUP_GPIO0_0 */
+                       J721S2_WKUP_IOPAD(0x0a8, PIN_INPUT, 7) /* (B25) MCU_SPI0_D1.WKUP_GPIO0_69 */
+               >;
+       };
+
+       mcu_mcan1_gpio_pins_default: mcu-mcan1-gpio-pins-default {
+               pinctrl-single,pins = <
+                       J721S2_WKUP_IOPAD(0x0c8, PIN_INPUT, 7) /* (C28) WKUP_GPIO0_2 */
+               >;
+       };
+};
+
+&main_gpio2 {
+       status = "disabled";
+};
+
+&main_gpio4 {
+       status = "disabled";
+};
+
+&main_gpio6 {
+       status = "disabled";
+};
+
+&wkup_gpio1 {
+       status = "disabled";
+};
+
+&wkup_uart0 {
+       status = "reserved";
+};
+
+&main_uart0 {
+       status = "disabled";
+};
+
+&main_uart1 {
+       status = "disabled";
+};
+
+&main_uart2 {
+       status = "disabled";
+};
+
+&main_uart3 {
+       status = "disabled";
+};
+
+&main_uart4 {
+       status = "disabled";
+};
+
+&main_uart5 {
+       status = "disabled";
+};
+
+&main_uart6 {
+       status = "disabled";
+};
+
+&main_uart7 {
+       status = "disabled";
+};
+
+&main_uart8 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&main_uart8_pins_default>;
+       /* Shared with TFA on this platform */
+       power-domains = <&k3_pds 357 TI_SCI_PD_SHARED>;
+};
+
+&main_uart9 {
+       status = "disabled";
+};
+
+&main_i2c0 {
+       clock-frequency = <400000>;
+
+       exp1: gpio@20 {
+               compatible = "ti,tca6416";
+               reg = <0x20>;
+               gpio-controller;
+               #gpio-cells = <2>;
+               gpio-line-names = "PCIE_2L_MODE_SEL", "PCIE_2L_PERSTZ", "PCIE_2L_RC_RSTZ",
+                                 "PCIE_2L_EP_RST_EN", "PCIE_1L_MODE_SEL", "PCIE_1L_PERSTZ",
+                                 "PCIE_1L_RC_RSTZ", "PCIE_1L_EP_RST_EN", "PCIE_2L_PRSNT#",
+                                 "PCIE_1L_PRSNT#", "CDCI1_OE1/OE4", "CDCI1_OE2/OE3", "EXP_MUX1",
+                                 "EXP_MUX2", "EXP_MUX3", "GESI_EXP_PHY_RSTz";
+       };
+
+       exp2: gpio@22 {
+               compatible = "ti,tca6424";
+               reg = <0x22>;
+               gpio-controller;
+               #gpio-cells = <2>;
+               gpio-line-names = "APPLE_AUTH_RSTZ", "MLB_RSTZ", "GPIO_USD_PWR_EN", "USBC_PWR_EN",
+                                 "USBC_MODE_SEL1", "USBC_MODE_SEL0", "MCAN0_EN", "MCAN0_STB#",
+                                 "MUX_SPAREMUX_SPARE", "MCASP/TRACE_MUX_S0", "MCASP/TRACE_MUX_S1",
+                                 "MLB_MUX_SEL", "MCAN_MUX_SEL", "MCASP2/SPI3_MUX_SEL", "PCIe_CLKREQn_MUX_SEL",
+                                 "CDCI2_RSTZ", "ENET_EXP_PWRDN", "ENET_EXP_RESETZ", "ENET_I2CMUX_SEL",
+                                 "ENET_EXP_SPARE2", "M2PCIE_RTSZ", "USER_INPUT1", "USER_LED1", "USER_LED2";
+       };
+};
+
+&main_i2c1 {
+       status = "disabled";
+};
+
+&main_i2c2 {
+       status = "disabled";
+};
+
+&main_i2c3 {
+       status = "disabled";
+};
+
+&main_i2c4 {
+       status = "disabled";
+};
+
+&main_i2c5 {
+       status = "disabled";
+};
+
+&main_i2c6 {
+       status = "disabled";
+};
+
+&main_sdhci0 {
+       /* eMMC */
+       non-removable;
+       ti,driver-strength-ohm = <50>;
+       disable-wp;
+};
+
+&main_sdhci1 {
+       /* SD card */
+       pinctrl-0 = <&main_mmc1_pins_default>;
+       pinctrl-names = "default";
+       disable-wp;
+       vmmc-supply = <&vdd_mmc1>;
+       vqmmc-supply = <&vdd_sd_dv>;
+};
+
+&mcu_cpsw {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mcu_cpsw_pins_default &mcu_mdio_pins_default>;
+};
+
+&davinci_mdio {
+       phy0: ethernet-phy@0 {
+               reg = <0>;
+               ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
+               ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+               ti,min-output-impedance;
+       };
+};
+
+&cpsw_port1 {
+       phy-mode = "rgmii-rxid";
+       phy-handle = <&phy0>;
+};
+
+&mcu_mcan0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mcu_mcan0_pins_default>;
+       phys = <&transceiver1>;
+};
+
+&mcu_mcan1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mcu_mcan1_pins_default>;
+       phys = <&transceiver2>;
+};
+
+&main_mcan0 {
+       status = "disabled";
+};
+
+&main_mcan1 {
+       status = "disabled";
+};
+
+&main_mcan2 {
+       status = "disabled";
+};
+
+&main_mcan3 {
+       status = "disabled";
+};
+
+&main_mcan4 {
+       status = "disabled";
+};
+
+&main_mcan5 {
+       status = "disabled";
+};
+
+&main_mcan6 {
+       status = "disabled";
+};
+
+&main_mcan7 {
+       status = "disabled";
+};
+
+&main_mcan8 {
+       status = "disabled";
+};
+
+&main_mcan9 {
+       status = "disabled";
+};
+
+&main_mcan10 {
+       status = "disabled";
+};
+
+&main_mcan11 {
+       status = "disabled";
+};
+
+&main_mcan12 {
+       status = "disabled";
+};
+
+&main_mcan13 {
+       status = "disabled";
+};
+
+&main_mcan14 {
+       status = "disabled";
+};
+
+&main_mcan15 {
+       status = "disabled";
+};
+
+&main_mcan17 {
+       status = "disabled";
+};
diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
new file mode 100644 (file)
index 0000000..b04db1d
--- /dev/null
@@ -0,0 +1,937 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source for J721S2 SoC Family Main Domain peripherals
+ *
+ * Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+&cbass_main {
+       msmc_ram: sram@70000000 {
+               compatible = "mmio-sram";
+               reg = <0x0 0x70000000 0x0 0x400000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges = <0x0 0x0 0x70000000 0x400000>;
+
+               atf-sram@0 {
+                       reg = <0x0 0x20000>;
+               };
+
+               tifs-sram@1f0000 {
+                       reg = <0x1f0000 0x10000>;
+               };
+
+               l3cache-sram@200000 {
+                       reg = <0x200000 0x200000>;
+               };
+       };
+
+       gic500: interrupt-controller@1800000 {
+               compatible = "arm,gic-v3";
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+               #interrupt-cells = <3>;
+               interrupt-controller;
+               reg = <0x00 0x01800000 0x00 0x200000>, /* GICD */
+                     <0x00 0x01900000 0x00 0x100000>; /* GICR */
+
+               /* vcpumntirq: virtual CPU interface maintenance interrupt */
+               interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
+
+               gic_its: msi-controller@1820000 {
+                       compatible = "arm,gic-v3-its";
+                       reg = <0x00 0x01820000 0x00 0x10000>;
+                       socionext,synquacer-pre-its = <0x1000000 0x400000>;
+                       msi-controller;
+                       #msi-cells = <1>;
+               };
+       };
+
+       main_gpio_intr: interrupt-controller@a00000 {
+               compatible = "ti,sci-intr";
+               reg = <0x00 0x00a00000 0x00 0x800>;
+               ti,intr-trigger-type = <1>;
+               interrupt-controller;
+               interrupt-parent = <&gic500>;
+               #interrupt-cells = <1>;
+               ti,sci = <&sms>;
+               ti,sci-dev-id = <148>;
+               ti,interrupt-ranges = <8 360 56>;
+       };
+
+       main_pmx0: pinctrl@11c000 {
+               compatible = "pinctrl-single";
+               /* Proxy 0 addressing */
+               reg = <0x0 0x11c000 0x0 0x120>;
+               #pinctrl-cells = <1>;
+               pinctrl-single,register-width = <32>;
+               pinctrl-single,function-mask = <0xffffffff>;
+       };
+
+       main_uart0: serial@2800000 {
+               compatible = "ti,j721e-uart", "ti,am654-uart";
+               reg = <0x00 0x02800000 0x00 0x200>;
+               interrupts = <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>;
+               current-speed = <115200>;
+               clocks = <&k3_clks 146 3>;
+               clock-names = "fclk";
+               power-domains = <&k3_pds 146 TI_SCI_PD_EXCLUSIVE>;
+       };
+
+       main_uart1: serial@2810000 {
+               compatible = "ti,j721e-uart", "ti,am654-uart";
+               reg = <0x00 0x02810000 0x00 0x200>;
+               interrupts = <GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>;
+               current-speed = <115200>;
+               clocks = <&k3_clks 350 3>;
+               clock-names = "fclk";
+               power-domains = <&k3_pds 350 TI_SCI_PD_EXCLUSIVE>;
+       };
+
+       main_uart2: serial@2820000 {
+               compatible = "ti,j721e-uart", "ti,am654-uart";
+               reg = <0x00 0x02820000 0x00 0x200>;
+               interrupts = <GIC_SPI 194 IRQ_TYPE_LEVEL_HIGH>;
+               current-speed = <115200>;
+               clocks = <&k3_clks 351 3>;
+               clock-names = "fclk";
+               power-domains = <&k3_pds 351 TI_SCI_PD_EXCLUSIVE>;
+       };
+
+       main_uart3: serial@2830000 {
+               compatible = "ti,j721e-uart", "ti,am654-uart";
+               reg = <0x00 0x02830000 0x00 0x200>;
+               interrupts = <GIC_SPI 195 IRQ_TYPE_LEVEL_HIGH>;
+               current-speed = <115200>;
+               clocks = <&k3_clks 352 3>;
+               clock-names = "fclk";
+               power-domains = <&k3_pds 352 TI_SCI_PD_EXCLUSIVE>;
+       };
+
+       main_uart4: serial@2840000 {
+               compatible = "ti,j721e-uart", "ti,am654-uart";
+               reg = <0x00 0x02840000 0x00 0x200>;
+               interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>;
+               current-speed = <115200>;
+               clocks = <&k3_clks 353 3>;
+               clock-names = "fclk";
+               power-domains = <&k3_pds 353 TI_SCI_PD_EXCLUSIVE>;
+       };
+
+       main_uart5: serial@2850000 {
+               compatible = "ti,j721e-uart", "ti,am654-uart";
+               reg = <0x00 0x02850000 0x00 0x200>;
+               interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>;
+               current-speed = <115200>;
+               clocks = <&k3_clks 354 3>;
+               clock-names = "fclk";
+               power-domains = <&k3_pds 354 TI_SCI_PD_EXCLUSIVE>;
+       };
+
+       main_uart6: serial@2860000 {
+               compatible = "ti,j721e-uart", "ti,am654-uart";
+               reg = <0x00 0x02860000 0x00 0x200>;
+               interrupts = <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>;
+               current-speed = <115200>;
+               clocks = <&k3_clks 355 3>;
+               clock-names = "fclk";
+               power-domains = <&k3_pds 355 TI_SCI_PD_EXCLUSIVE>;
+       };
+
+       main_uart7: serial@2870000 {
+               compatible = "ti,j721e-uart", "ti,am654-uart";
+               reg = <0x00 0x02870000 0x00 0x200>;
+               interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>;
+               current-speed = <115200>;
+               clocks = <&k3_clks 356 3>;
+               clock-names = "fclk";
+               power-domains = <&k3_pds 356 TI_SCI_PD_EXCLUSIVE>;
+       };
+
+       main_uart8: serial@2880000 {
+               compatible = "ti,j721e-uart", "ti,am654-uart";
+               reg = <0x00 0x02880000 0x00 0x200>;
+               interrupts = <GIC_SPI 248 IRQ_TYPE_LEVEL_HIGH>;
+               current-speed = <115200>;
+               clocks = <&k3_clks 357 3>;
+               clock-names = "fclk";
+               power-domains = <&k3_pds 357 TI_SCI_PD_EXCLUSIVE>;
+       };
+
+       main_uart9: serial@2890000 {
+               compatible = "ti,j721e-uart", "ti,am654-uart";
+               reg = <0x00 0x02890000 0x00 0x200>;
+               interrupts = <GIC_SPI 249 IRQ_TYPE_LEVEL_HIGH>;
+               current-speed = <115200>;
+               clocks = <&k3_clks 358 3>;
+               clock-names = "fclk";
+               power-domains = <&k3_pds 358 TI_SCI_PD_EXCLUSIVE>;
+       };
+
+       main_gpio0: gpio@600000 {
+               compatible = "ti,j721e-gpio", "ti,keystone-gpio";
+               reg = <0x00 0x00600000 0x00 0x100>;
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-parent = <&main_gpio_intr>;
+               interrupts = <145>, <146>, <147>, <148>, <149>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+               ti,ngpio = <66>;
+               ti,davinci-gpio-unbanked = <0>;
+               power-domains = <&k3_pds 111 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 111 0>;
+               clock-names = "gpio";
+       };
+
+       main_gpio2: gpio@610000 {
+               compatible = "ti,j721e-gpio", "ti,keystone-gpio";
+               reg = <0x00 0x00610000 0x00 0x100>;
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-parent = <&main_gpio_intr>;
+               interrupts = <154>, <155>, <156>, <157>, <158>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+               ti,ngpio = <66>;
+               ti,davinci-gpio-unbanked = <0>;
+               power-domains = <&k3_pds 112 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 112 0>;
+               clock-names = "gpio";
+       };
+
+       main_gpio4: gpio@620000 {
+               compatible = "ti,j721e-gpio", "ti,keystone-gpio";
+               reg = <0x00 0x00620000 0x00 0x100>;
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-parent = <&main_gpio_intr>;
+               interrupts = <163>, <164>, <165>, <166>, <167>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+               ti,ngpio = <66>;
+               ti,davinci-gpio-unbanked = <0>;
+               power-domains = <&k3_pds 113 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 113 0>;
+               clock-names = "gpio";
+       };
+
+       main_gpio6: gpio@630000 {
+               compatible = "ti,j721e-gpio", "ti,keystone-gpio";
+               reg = <0x00 0x00630000 0x00 0x100>;
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-parent = <&main_gpio_intr>;
+               interrupts = <172>, <173>, <174>, <175>, <176>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+               ti,ngpio = <66>;
+               ti,davinci-gpio-unbanked = <0>;
+               power-domains = <&k3_pds 114 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 114 0>;
+               clock-names = "gpio";
+       };
+
+       main_i2c0: i2c@2000000 {
+               compatible = "ti,j721e-i2c", "ti,omap4-i2c";
+               reg = <0x00 0x02000000 0x00 0x100>;
+               interrupts = <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               clocks = <&k3_clks 214 1>;
+               clock-names = "fck";
+               power-domains = <&k3_pds 214 TI_SCI_PD_EXCLUSIVE>;
+       };
+
+       main_i2c1: i2c@2010000 {
+               compatible = "ti,j721e-i2c", "ti,omap4-i2c";
+               reg = <0x00 0x02010000 0x00 0x100>;
+               interrupts = <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               clocks = <&k3_clks 215 1>;
+               clock-names = "fck";
+               power-domains = <&k3_pds 215 TI_SCI_PD_EXCLUSIVE>;
+       };
+
+       main_i2c2: i2c@2020000 {
+               compatible = "ti,j721e-i2c", "ti,omap4-i2c";
+               reg = <0x00 0x02020000 0x00 0x100>;
+               interrupts = <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               clocks = <&k3_clks 216 1>;
+               clock-names = "fck";
+               power-domains = <&k3_pds 216 TI_SCI_PD_EXCLUSIVE>;
+       };
+
+       main_i2c3: i2c@2030000 {
+               compatible = "ti,j721e-i2c", "ti,omap4-i2c";
+               reg = <0x00 0x02030000 0x00 0x100>;
+               interrupts = <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               clocks = <&k3_clks 217 1>;
+               clock-names = "fck";
+               power-domains = <&k3_pds 217 TI_SCI_PD_EXCLUSIVE>;
+       };
+
+       main_i2c4: i2c@2040000 {
+               compatible = "ti,j721e-i2c", "ti,omap4-i2c";
+               reg = <0x00 0x02040000 0x00 0x100>;
+               interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               clocks = <&k3_clks 218 1>;
+               clock-names = "fck";
+               power-domains = <&k3_pds 218 TI_SCI_PD_EXCLUSIVE>;
+       };
+
+       main_i2c5: i2c@2050000 {
+               compatible = "ti,j721e-i2c", "ti,omap4-i2c";
+               reg = <0x00 0x02050000 0x00 0x100>;
+               interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               clocks = <&k3_clks 219 1>;
+               clock-names = "fck";
+               power-domains = <&k3_pds 219 TI_SCI_PD_EXCLUSIVE>;
+       };
+
+       main_i2c6: i2c@2060000 {
+               compatible = "ti,j721e-i2c", "ti,omap4-i2c";
+               reg = <0x00 0x02060000 0x00 0x100>;
+               interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               clocks = <&k3_clks 220 1>;
+               clock-names = "fck";
+               power-domains = <&k3_pds 220 TI_SCI_PD_EXCLUSIVE>;
+       };
+
+       main_sdhci0: mmc@4f80000 {
+               compatible = "ti,j721e-sdhci-8bit";
+               reg = <0x00 0x04f80000 0x00 0x1000>,
+                     <0x00 0x04f88000 0x00 0x400>;
+               interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
+               power-domains = <&k3_pds 98 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 98 7>, <&k3_clks 98 1>;
+               clock-names =  "clk_ahb", "clk_xin";
+               assigned-clocks = <&k3_clks 98 1>;
+               assigned-clock-parents = <&k3_clks 98 2>;
+               bus-width = <8>;
+               ti,otap-del-sel-legacy = <0x0>;
+               ti,otap-del-sel-mmc-hs = <0x0>;
+               ti,otap-del-sel-ddr52 = <0x6>;
+               ti,otap-del-sel-hs200 = <0x8>;
+               ti,otap-del-sel-hs400 = <0x5>;
+               ti,itap-del-sel-legacy = <0x10>;
+               ti,itap-del-sel-mmc-hs = <0xa>;
+               ti,strobe-sel = <0x77>;
+               ti,clkbuf-sel = <0x7>;
+               ti,trm-icp = <0x8>;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+               mmc-hs400-1_8v;
+               dma-coherent;
+       };
+
+       main_sdhci1: mmc@4fb0000 {
+               compatible = "ti,j721e-sdhci-4bit";
+               reg = <0x00 0x04fb0000 0x00 0x1000>,
+                     <0x00 0x04fb8000 0x00 0x400>;
+               interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
+               power-domains = <&k3_pds 99 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 99 8>, <&k3_clks 99 1>;
+               clock-names =  "clk_ahb", "clk_xin";
+               assigned-clocks = <&k3_clks 99 1>;
+               assigned-clock-parents = <&k3_clks 99 2>;
+               bus-width = <4>;
+               ti,otap-del-sel-legacy = <0x0>;
+               ti,otap-del-sel-sd-hs = <0x0>;
+               ti,otap-del-sel-sdr12 = <0xf>;
+               ti,otap-del-sel-sdr25 = <0xf>;
+               ti,otap-del-sel-sdr50 = <0xc>;
+               ti,otap-del-sel-sdr104 = <0x5>;
+               ti,otap-del-sel-ddr50 = <0xc>;
+               ti,itap-del-sel-legacy = <0x0>;
+               ti,itap-del-sel-sd-hs = <0x0>;
+               ti,itap-del-sel-sdr12 = <0x0>;
+               ti,itap-del-sel-sdr25 = <0x0>;
+               ti,clkbuf-sel = <0x7>;
+               ti,trm-icp = <0x8>;
+               dma-coherent;
+               /* Masking support for SDR104 capability */
+               sdhci-caps-mask = <0x00000003 0x00000000>;
+       };
+
+       main_navss: bus@30000000 {
+               compatible = "simple-mfd";
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges = <0x00 0x30000000 0x00 0x30000000 0x00 0x0c400000>;
+               ti,sci-dev-id = <224>;
+               dma-coherent;
+               dma-ranges;
+
+               main_navss_intr: interrupt-controller@310e0000 {
+                       compatible = "ti,sci-intr";
+                       reg = <0x00 0x310e0000 0x00 0x4000>;
+                       ti,intr-trigger-type = <4>;
+                       interrupt-controller;
+                       interrupt-parent = <&gic500>;
+                       #interrupt-cells = <1>;
+                       ti,sci = <&sms>;
+                       ti,sci-dev-id = <227>;
+                       ti,interrupt-ranges = <0 64 64>,
+                                             <64 448 64>,
+                                             <128 672 64>;
+               };
+
+               main_udmass_inta: msi-controller@33d00000 {
+                       compatible = "ti,sci-inta";
+                       reg = <0x00 0x33d00000 0x00 0x100000>;
+                       interrupt-controller;
+                       #interrupt-cells = <0>;
+                       interrupt-parent = <&main_navss_intr>;
+                       msi-controller;
+                       ti,sci = <&sms>;
+                       ti,sci-dev-id = <265>;
+                       ti,interrupt-ranges = <0 0 256>;
+               };
+
+               secure_proxy_main: mailbox@32c00000 {
+                       compatible = "ti,am654-secure-proxy";
+                       #mbox-cells = <1>;
+                       reg-names = "target_data", "rt", "scfg";
+                       reg = <0x00 0x32c00000 0x00 0x100000>,
+                             <0x00 0x32400000 0x00 0x100000>,
+                             <0x00 0x32800000 0x00 0x100000>;
+                       interrupt-names = "rx_011";
+                       interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+               };
+
+               hwspinlock: spinlock@30e00000 {
+                       compatible = "ti,am654-hwspinlock";
+                       reg = <0x00 0x30e00000 0x00 0x1000>;
+                       #hwlock-cells = <1>;
+               };
+
+               mailbox0_cluster0: mailbox@31f80000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f80000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               mailbox0_cluster1: mailbox@31f81000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f81000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               mailbox0_cluster2: mailbox@31f82000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f82000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               mailbox0_cluster3: mailbox@31f83000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f83000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               mailbox0_cluster4: mailbox@31f84000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f84000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               mailbox0_cluster5: mailbox@31f85000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f85000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               mailbox0_cluster6: mailbox@31f86000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f86000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               mailbox0_cluster7: mailbox@31f87000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f87000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               mailbox0_cluster8: mailbox@31f88000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f88000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               mailbox0_cluster9: mailbox@31f89000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f89000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               mailbox0_cluster10: mailbox@31f8a000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f8a000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               mailbox0_cluster11: mailbox@31f8b000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f8b000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               mailbox1_cluster0: mailbox@31f90000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f90000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               mailbox1_cluster1: mailbox@31f91000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f91000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               mailbox1_cluster2: mailbox@31f92000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f92000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               mailbox1_cluster3: mailbox@31f93000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f93000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               mailbox1_cluster4: mailbox@31f94000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f94000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               mailbox1_cluster5: mailbox@31f95000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f95000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               mailbox1_cluster6: mailbox@31f96000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f96000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               mailbox1_cluster7: mailbox@31f97000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f97000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               mailbox1_cluster8: mailbox@31f98000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f98000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               mailbox1_cluster9: mailbox@31f99000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f99000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               mailbox1_cluster10: mailbox@31f9a000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f9a000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               mailbox1_cluster11: mailbox@31f9b000 {
+                       compatible = "ti,am654-mailbox";
+                       reg = <0x00 0x31f9b000 0x00 0x200>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <4>;
+                       ti,mbox-num-fifos = <16>;
+                       interrupt-parent = <&main_navss_intr>;
+               };
+
+               main_ringacc: ringacc@3c000000 {
+                       compatible = "ti,am654-navss-ringacc";
+                       reg = <0x0 0x3c000000 0x0 0x400000>,
+                             <0x0 0x38000000 0x0 0x400000>,
+                             <0x0 0x31120000 0x0 0x100>,
+                             <0x0 0x33000000 0x0 0x40000>;
+                       reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target";
+                       ti,num-rings = <1024>;
+                       ti,sci-rm-range-gp-rings = <0x1>;
+                       ti,sci = <&sms>;
+                       ti,sci-dev-id = <259>;
+                       msi-parent = <&main_udmass_inta>;
+               };
+
+               main_udmap: dma-controller@31150000 {
+                       compatible = "ti,j721e-navss-main-udmap";
+                       reg = <0x0 0x31150000 0x0 0x100>,
+                             <0x0 0x34000000 0x0 0x80000>,
+                             <0x0 0x35000000 0x0 0x200000>;
+                       reg-names = "gcfg", "rchanrt", "tchanrt";
+                       msi-parent = <&main_udmass_inta>;
+                       #dma-cells = <1>;
+
+                       ti,sci = <&sms>;
+                       ti,sci-dev-id = <263>;
+                       ti,ringacc = <&main_ringacc>;
+
+                       ti,sci-rm-range-tchan = <0x0d>, /* TX_CHAN */
+                                               <0x0f>, /* TX_HCHAN */
+                                               <0x10>; /* TX_UHCHAN */
+                       ti,sci-rm-range-rchan = <0x0a>, /* RX_CHAN */
+                                               <0x0b>, /* RX_HCHAN */
+                                               <0x0c>; /* RX_UHCHAN */
+                       ti,sci-rm-range-rflow = <0x00>; /* GP RFLOW */
+               };
+
+               cpts@310d0000 {
+                       compatible = "ti,j721e-cpts";
+                       reg = <0x0 0x310d0000 0x0 0x400>;
+                       reg-names = "cpts";
+                       clocks = <&k3_clks 226 5>;
+                       clock-names = "cpts";
+                       interrupts-extended = <&main_navss_intr 391>;
+                       interrupt-names = "cpts";
+                       ti,cpts-periodic-outputs = <6>;
+                       ti,cpts-ext-ts-inputs = <8>;
+               };
+       };
+
+       main_mcan0: can@2701000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x02701000 0x00 0x200>,
+                     <0x00 0x02708000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 182 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 182 0>, <&k3_clks 182 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan1: can@2711000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x02711000 0x00 0x200>,
+                     <0x00 0x02718000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 183 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 183 0>, <&k3_clks 183 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan2: can@2721000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x02721000 0x00 0x200>,
+                     <0x00 0x02728000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 184 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 184 0>, <&k3_clks 184 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan3: can@2731000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x02731000 0x00 0x200>,
+                     <0x00 0x02738000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 185 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 185 0>, <&k3_clks 185 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan4: can@2741000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x02741000 0x00 0x200>,
+                     <0x00 0x02748000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 186 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 186 0>, <&k3_clks 186 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan5: can@2751000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x02751000 0x00 0x200>,
+                     <0x00 0x02758000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 187 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 187 0>, <&k3_clks 187 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan6: can@2761000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x02761000 0x00 0x200>,
+                     <0x00 0x02768000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 188 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 188 0>, <&k3_clks 188 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan7: can@2771000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x02771000 0x00 0x200>,
+                     <0x00 0x02778000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 189 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 189 0>, <&k3_clks 189 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan8: can@2781000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x02781000 0x00 0x200>,
+                     <0x00 0x02788000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 190 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 190 0>, <&k3_clks 190 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 576 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 577 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan9: can@2791000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x02791000 0x00 0x200>,
+                     <0x00 0x02798000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 191 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 191 0>, <&k3_clks 191 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 579 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 580 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan10: can@27a1000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x027a1000 0x00 0x200>,
+                     <0x00 0x027a8000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 192 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 192 0>, <&k3_clks 192 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 582 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 583 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan11: can@27b1000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x027b1000 0x00 0x200>,
+                     <0x00 0x027b8000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 193 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 193 0>, <&k3_clks 193 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 585 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 586 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan12: can@27c1000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x027c1000 0x00 0x200>,
+                     <0x00 0x027c8000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 194 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 194 0>, <&k3_clks 194 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 588 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 589 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan13: can@27d1000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x027d1000 0x00 0x200>,
+                     <0x00 0x027d8000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 195 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 195 0>, <&k3_clks 195 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 591 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 592 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan14: can@2681000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x02681000 0x00 0x200>,
+                     <0x00 0x02688000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 197 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 197 0>, <&k3_clks 197 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 594 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 595 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan15: can@2691000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x02691000 0x00 0x200>,
+                     <0x00 0x02698000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 199 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 199 0>, <&k3_clks 199 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 597 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 598 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan16: can@26a1000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x026a1000 0x00 0x200>,
+                     <0x00 0x026a8000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 201 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 201 0>, <&k3_clks 201 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 784 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 785 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       main_mcan17: can@26b1000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x026b1000 0x00 0x200>,
+                     <0x00 0x026b8000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 206 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 206 0>, <&k3_clks 206 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 787 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 788 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+};
diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi
new file mode 100644 (file)
index 0000000..7521963
--- /dev/null
@@ -0,0 +1,302 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source for J721S2 SoC Family MCU/WAKEUP Domain peripherals
+ *
+ * Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+&cbass_mcu_wakeup {
+       sms: system-controller@44083000 {
+               compatible = "ti,k2g-sci";
+               ti,host-id = <12>;
+
+               mbox-names = "rx", "tx";
+
+               mboxes= <&secure_proxy_main 11>,
+                       <&secure_proxy_main 13>;
+
+               reg-names = "debug_messages";
+               reg = <0x00 0x44083000 0x00 0x1000>;
+
+               k3_pds: power-controller {
+                       compatible = "ti,sci-pm-domain";
+                       #power-domain-cells = <2>;
+               };
+
+               k3_clks: clock-controller {
+                       compatible = "ti,k2g-sci-clk";
+                       #clock-cells = <2>;
+               };
+
+               k3_reset: reset-controller {
+                       compatible = "ti,sci-reset";
+                       #reset-cells = <2>;
+               };
+       };
+
+       chipid@43000014 {
+               compatible = "ti,am654-chipid";
+               reg = <0x00 0x43000014 0x00 0x4>;
+       };
+
+       mcu_ram: sram@41c00000 {
+               compatible = "mmio-sram";
+               reg = <0x00 0x41c00000 0x00 0x100000>;
+               ranges = <0x00 0x00 0x41c00000 0x100000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+       };
+
+       wkup_pmx0: pinctrl@4301c000 {
+               compatible = "pinctrl-single";
+               /* Proxy 0 addressing */
+               reg = <0x00 0x4301c000 0x00 0x178>;
+               #pinctrl-cells = <1>;
+               pinctrl-single,register-width = <32>;
+               pinctrl-single,function-mask = <0xffffffff>;
+       };
+
+       wkup_gpio_intr: interrupt-controller@42200000 {
+               compatible = "ti,sci-intr";
+               reg = <0x00 0x42200000 0x00 0x400>;
+               ti,intr-trigger-type = <1>;
+               interrupt-controller;
+               interrupt-parent = <&gic500>;
+               #interrupt-cells = <1>;
+               ti,sci = <&sms>;
+               ti,sci-dev-id = <125>;
+               ti,interrupt-ranges = <16 928 16>;
+       };
+
+       mcu_conf: syscon@40f00000 {
+               compatible = "syscon", "simple-mfd";
+               reg = <0x0 0x40f00000 0x0 0x20000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges = <0x0 0x0 0x40f00000 0x20000>;
+
+               phy_gmii_sel: phy@4040 {
+                       compatible = "ti,am654-phy-gmii-sel";
+                       reg = <0x4040 0x4>;
+                       #phy-cells = <1>;
+               };
+
+       };
+
+       wkup_uart0: serial@42300000 {
+               compatible = "ti,j721e-uart", "ti,am654-uart";
+               reg = <0x00 0x42300000 0x00 0x200>;
+               interrupts = <GIC_SPI 897 IRQ_TYPE_LEVEL_HIGH>;
+               current-speed = <115200>;
+               clocks = <&k3_clks 359 3>;
+               clock-names = "fclk";
+               power-domains = <&k3_pds 359 TI_SCI_PD_EXCLUSIVE>;
+       };
+
+       mcu_uart0: serial@40a00000 {
+               compatible = "ti,j721e-uart", "ti,am654-uart";
+               reg = <0x00 0x40a00000 0x00 0x200>;
+               interrupts = <GIC_SPI 846 IRQ_TYPE_LEVEL_HIGH>;
+               current-speed = <115200>;
+               clocks = <&k3_clks 149 3>;
+               clock-names = "fclk";
+               power-domains = <&k3_pds 149 TI_SCI_PD_EXCLUSIVE>;
+       };
+
+       wkup_gpio0: gpio@42110000 {
+               compatible = "ti,j721e-gpio", "ti,keystone-gpio";
+               reg = <0x00 0x42110000 0x00 0x100>;
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-parent = <&main_gpio_intr>;
+               interrupts = <103>, <104>, <105>, <106>, <107>, <108>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+               ti,ngpio = <89>;
+               ti,davinci-gpio-unbanked = <0>;
+               power-domains = <&k3_pds 115 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 115 0>;
+               clock-names = "gpio";
+       };
+
+       wkup_gpio1: gpio@42100000 {
+               compatible = "ti,j721e-gpio", "ti,keystone-gpio";
+               reg = <0x00 0x42100000 0x00 0x100>;
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-parent = <&main_gpio_intr>;
+               interrupts = <112>, <113>, <114>, <115>, <116>, <117>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+               ti,ngpio = <89>;
+               ti,davinci-gpio-unbanked = <0>;
+               power-domains = <&k3_pds 116 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 116 0>;
+               clock-names = "gpio";
+       };
+
+       wkup_i2c0: i2c@42120000 {
+               compatible = "ti,j721e-i2c", "ti,omap4-i2c";
+               reg = <0x00 0x42120000 0x00 0x100>;
+               interrupts = <GIC_SPI 896 IRQ_TYPE_LEVEL_HIGH>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               clocks = <&k3_clks 223 1>;
+               clock-names = "fck";
+               power-domains = <&k3_pds 223 TI_SCI_PD_EXCLUSIVE>;
+       };
+
+       mcu_i2c0: i2c@40b00000 {
+               compatible = "ti,j721e-i2c", "ti,omap4-i2c";
+               reg = <0x00 0x40b00000 0x00 0x100>;
+               interrupts = <GIC_SPI 852 IRQ_TYPE_LEVEL_HIGH>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               clocks = <&k3_clks 221 1>;
+               clock-names = "fck";
+               power-domains = <&k3_pds 221 TI_SCI_PD_EXCLUSIVE>;
+       };
+
+       mcu_i2c1: i2c@40b10000 {
+               compatible = "ti,j721e-i2c", "ti,omap4-i2c";
+               reg = <0x00 0x40b10000 0x00 0x100>;
+               interrupts = <GIC_SPI 853 IRQ_TYPE_LEVEL_HIGH>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               clocks = <&k3_clks 222 1>;
+               clock-names = "fck";
+               power-domains = <&k3_pds 222 TI_SCI_PD_EXCLUSIVE>;
+       };
+
+       mcu_mcan0: can@40528000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x40528000 0x00 0x200>,
+                     <0x00 0x40500000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 207 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 207 0>, <&k3_clks 207 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 832 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 833 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       mcu_mcan1: can@40568000 {
+               compatible = "bosch,m_can";
+               reg = <0x00 0x40568000 0x00 0x200>,
+                     <0x00 0x40540000 0x00 0x8000>;
+               reg-names = "m_can", "message_ram";
+               power-domains = <&k3_pds 208 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 208 0>, <&k3_clks 208 1>;
+               clock-names = "hclk", "cclk";
+               interrupts = <GIC_SPI 835 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 836 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "int0", "int1";
+               bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+       };
+
+       mcu_navss: bus@28380000{
+               compatible = "simple-mfd";
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges = <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>;
+               dma-coherent;
+               dma-ranges;
+
+               ti,sci-dev-id = <267>;
+
+               mcu_ringacc: ringacc@2b800000 {
+                       compatible = "ti,am654-navss-ringacc";
+                       reg = <0x0 0x2b800000 0x0 0x400000>,
+                             <0x0 0x2b000000 0x0 0x400000>,
+                             <0x0 0x28590000 0x0 0x100>,
+                             <0x0 0x2a500000 0x0 0x40000>;
+                       reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target";
+                       ti,num-rings = <286>;
+                       ti,sci-rm-range-gp-rings = <0x1>;
+                       ti,sci = <&sms>;
+                       ti,sci-dev-id = <272>;
+                       msi-parent = <&main_udmass_inta>;
+               };
+
+               mcu_udmap: dma-controller@285c0000 {
+                       compatible = "ti,j721e-navss-mcu-udmap";
+                       reg = <0x0 0x285c0000 0x0 0x100>,
+                             <0x0 0x2a800000 0x0 0x40000>,
+                             <0x0 0x2aa00000 0x0 0x40000>;
+                       reg-names = "gcfg", "rchanrt", "tchanrt";
+                       msi-parent = <&main_udmass_inta>;
+                       #dma-cells = <1>;
+
+                       ti,sci = <&sms>;
+                       ti,sci-dev-id = <273>;
+                       ti,ringacc = <&mcu_ringacc>;
+                       ti,sci-rm-range-tchan = <0x0d>, /* TX_CHAN */
+                                               <0x0f>; /* TX_HCHAN */
+                       ti,sci-rm-range-rchan = <0x0a>, /* RX_CHAN */
+                                               <0x0b>; /* RX_HCHAN */
+                       ti,sci-rm-range-rflow = <0x00>; /* GP RFLOW */
+               };
+       };
+
+       mcu_cpsw: ethernet@46000000 {
+               compatible = "ti,j721e-cpsw-nuss";
+               #address-cells = <2>;
+               #size-cells = <2>;
+               reg = <0x0 0x46000000 0x0 0x200000>;
+               reg-names = "cpsw_nuss";
+               ranges = <0x0 0x0 0x0 0x46000000 0x0 0x200000>;
+               dma-coherent;
+               clocks = <&k3_clks 29 28>;
+               clock-names = "fck";
+               power-domains = <&k3_pds 29 TI_SCI_PD_EXCLUSIVE>;
+
+               dmas = <&mcu_udmap 0xf000>,
+                      <&mcu_udmap 0xf001>,
+                      <&mcu_udmap 0xf002>,
+                      <&mcu_udmap 0xf003>,
+                      <&mcu_udmap 0xf004>,
+                      <&mcu_udmap 0xf005>,
+                      <&mcu_udmap 0xf006>,
+                      <&mcu_udmap 0xf007>,
+                      <&mcu_udmap 0x7000>;
+               dma-names = "tx0", "tx1", "tx2", "tx3",
+                           "tx4", "tx5", "tx6", "tx7",
+                           "rx";
+
+               ethernet-ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       cpsw_port1: port@1 {
+                               reg = <1>;
+                               ti,mac-only;
+                               label = "port1";
+                               ti,syscon-efuse = <&mcu_conf 0x200>;
+                               phys = <&phy_gmii_sel 1>;
+                       };
+               };
+
+               davinci_mdio: mdio@f00 {
+                       compatible = "ti,cpsw-mdio","ti,davinci_mdio";
+                       reg = <0x0 0xf00 0x0 0x100>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       clocks = <&k3_clks 29 28>;
+                       clock-names = "fck";
+                       bus_freq = <1000000>;
+               };
+
+               cpts@3d000 {
+                       compatible = "ti,am65-cpts";
+                       reg = <0x0 0x3d000 0x0 0x400>;
+                       clocks = <&k3_clks 29 3>;
+                       clock-names = "cpts";
+                       interrupts-extended = <&gic500 GIC_SPI 858 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "cpts";
+                       ti,cpts-ext-ts-inputs = <4>;
+                       ti,cpts-periodic-outputs = <2>;
+               };
+       };
+};
diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi
new file mode 100644 (file)
index 0000000..76f0cea
--- /dev/null
@@ -0,0 +1,175 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * SoM: https://www.ti.com/lit/zip/sprr439
+ *
+ * Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+/dts-v1/;
+
+#include "k3-j721s2.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+       memory@80000000 {
+               device_type = "memory";
+               /* 16 GB RAM */
+               reg = <0x00 0x80000000 0x00 0x80000000>,
+                     <0x08 0x80000000 0x03 0x80000000>;
+       };
+
+       /* Reserving memory regions still pending */
+       reserved_memory: reserved-memory {
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+
+               secure_ddr: optee@9e800000 {
+                       reg = <0x00 0x9e800000 0x00 0x01800000>;
+                       alignment = <0x1000>;
+                       no-map;
+               };
+       };
+
+       transceiver0: can-phy0 {
+               /* standby pin has been grounded by default */
+               compatible = "ti,tcan1042";
+               #phy-cells = <0>;
+               max-bitrate = <5000000>;
+       };
+};
+
+&main_pmx0 {
+       main_i2c0_pins_default: main-i2c0-pins-default {
+               pinctrl-single,pins = <
+                       J721S2_IOPAD(0x0e0, PIN_INPUT_PULLUP, 0) /* (AH25) I2C0_SCL */
+                       J721S2_IOPAD(0x0e4, PIN_INPUT_PULLUP, 0) /* (AE24) I2C0_SDA */
+               >;
+       };
+
+       main_mcan16_pins_default: main-mcan16-pins-default {
+               pinctrl-single,pins = <
+                       J721S2_IOPAD(0x028, PIN_INPUT, 0) /* (AB24) MCAN16_RX */
+                       J721S2_IOPAD(0x024, PIN_OUTPUT, 0) /* (Y28) MCAN16_TX */
+               >;
+       };
+};
+
+&main_i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&main_i2c0_pins_default>;
+       clock-frequency = <400000>;
+
+       exp_som: gpio@21 {
+               compatible = "ti,tca6408";
+               reg = <0x21>;
+               gpio-controller;
+               #gpio-cells = <2>;
+               gpio-line-names = "USB2.0_MUX_SEL", "CANUART_MUX1_SEL0",
+                                 "CANUART_MUX2_SEL0", "CANUART_MUX_SEL1",
+                                 "GPIO_RGMII1_RST", "GPIO_eDP_ENABLE",
+                                  "GPIO_LIN_EN", "CAN_STB";
+       };
+};
+
+&main_mcan16 {
+       pinctrl-0 = <&main_mcan16_pins_default>;
+       pinctrl-names = "default";
+       phys = <&transceiver0>;
+};
+
+&mailbox0_cluster0 {
+       status = "disabled";
+};
+
+&mailbox0_cluster1 {
+       status = "disabled";
+};
+
+&mailbox0_cluster2 {
+       status = "disabled";
+};
+
+&mailbox0_cluster3 {
+       status = "disabled";
+};
+
+&mailbox0_cluster4 {
+       status = "disabled";
+};
+
+&mailbox0_cluster5 {
+       status = "disabled";
+};
+
+&mailbox0_cluster6 {
+       status = "disabled";
+};
+
+&mailbox0_cluster7 {
+       status = "disabled";
+};
+
+&mailbox0_cluster8 {
+       status = "disabled";
+};
+
+&mailbox0_cluster9 {
+       status = "disabled";
+};
+
+&mailbox0_cluster10 {
+       status = "disabled";
+};
+
+&mailbox0_cluster11 {
+       status = "disabled";
+};
+
+&mailbox1_cluster0 {
+       status = "disabled";
+};
+
+&mailbox1_cluster1 {
+       status = "disabled";
+};
+
+&mailbox1_cluster2 {
+       status = "disabled";
+};
+
+&mailbox1_cluster3 {
+       status = "disabled";
+};
+
+&mailbox1_cluster4 {
+       status = "disabled";
+};
+
+&mailbox1_cluster5 {
+       status = "disabled";
+};
+
+&mailbox1_cluster6 {
+       status = "disabled";
+};
+
+&mailbox1_cluster7 {
+       status = "disabled";
+};
+
+&mailbox1_cluster8 {
+       status = "disabled";
+};
+
+&mailbox1_cluster9 {
+       status = "disabled";
+};
+
+&mailbox1_cluster10 {
+       status = "disabled";
+};
+
+&mailbox1_cluster11 {
+       status = "disabled";
+};
diff --git a/arch/arm64/boot/dts/ti/k3-j721s2.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2.dtsi
new file mode 100644 (file)
index 0000000..80d3cae
--- /dev/null
@@ -0,0 +1,189 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source for J721S2 SoC Family
+ *
+ * TRM (SPRUJ28 – NOVEMBER 2021) : http://www.ti.com/lit/pdf/spruj28
+ *
+ * Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com/
+ *
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/pinctrl/k3.h>
+#include <dt-bindings/soc/ti,sci_pm_domain.h>
+
+/ {
+
+       model = "Texas Instruments K3 J721S2 SoC";
+       compatible = "ti,j721s2";
+       interrupt-parent = <&gic500>;
+       #address-cells = <2>;
+       #size-cells = <2>;
+
+       aliases {
+               serial0 = &wkup_uart0;
+               serial1 = &mcu_uart0;
+               serial2 = &main_uart0;
+               serial3 = &main_uart1;
+               serial4 = &main_uart2;
+               serial5 = &main_uart3;
+               serial6 = &main_uart4;
+               serial7 = &main_uart5;
+               serial8 = &main_uart6;
+               serial9 = &main_uart7;
+               serial10 = &main_uart8;
+               serial11 = &main_uart9;
+               mmc0 = &main_sdhci0;
+               mmc1 = &main_sdhci1;
+               can0 = &main_mcan16;
+               can1 = &mcu_mcan0;
+               can2 = &mcu_mcan1;
+               can3 = &main_mcan3;
+               can4 = &main_mcan5;
+       };
+
+       chosen { };
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               cpu-map {
+                       cluster0: cluster0 {
+                               core0 {
+                                       cpu = <&cpu0>;
+                               };
+
+                               core1 {
+                                       cpu = <&cpu1>;
+                               };
+                       };
+               };
+
+               cpu0: cpu@0 {
+                       compatible = "arm,cortex-a72";
+                       reg = <0x000>;
+                       device_type = "cpu";
+                       enable-method = "psci";
+                       i-cache-size = <0xc000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <256>;
+                       next-level-cache = <&L2_0>;
+               };
+
+               cpu1: cpu@1 {
+                       compatible = "arm,cortex-a72";
+                       reg = <0x001>;
+                       device_type = "cpu";
+                       enable-method = "psci";
+                       i-cache-size = <0xc000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <256>;
+                       next-level-cache = <&L2_0>;
+               };
+       };
+
+       L2_0: l2-cache0 {
+               compatible = "cache";
+               cache-level = <2>;
+               cache-size = <0x100000>;
+               cache-line-size = <64>;
+               cache-sets = <1024>;
+               next-level-cache = <&msmc_l3>;
+       };
+
+       msmc_l3: l3-cache0 {
+               compatible = "cache";
+               cache-level = <3>;
+       };
+
+       firmware {
+               optee {
+                       compatible = "linaro,optee-tz";
+                       method = "smc";
+               };
+
+               psci: psci {
+                       compatible = "arm,psci-1.0";
+                       method = "smc";
+               };
+       };
+
+       a72_timer0: timer-cl0-cpu0 {
+               compatible = "arm,armv8-timer";
+               interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, /* cntpsirq */
+                            <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, /* cntpnsirq */
+                            <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, /* cntvirq */
+                            <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; /* cnthpirq */
+
+       };
+
+       pmu: pmu {
+               compatible = "arm,cortex-a72-pmu";
+               /* Recommendation from GIC500 TRM Table A.3 */
+               interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH>;
+       };
+
+       cbass_main: bus@100000 {
+               compatible = "simple-bus";
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges = <0x00 0x00100000 0x00 0x00100000 0x00 0x00020000>, /* ctrl mmr */
+                        <0x00 0x00600000 0x00 0x00600000 0x00 0x00031100>, /* GPIO */
+                        <0x00 0x01000000 0x00 0x01000000 0x00 0x0d000000>, /* Most peripherals */
+                        <0x00 0x0d800000 0x00 0x0d800000 0x00 0x00800000>, /* PCIe Core*/
+                        <0x00 0x18000000 0x00 0x18000000 0x00 0x08000000>, /* PCIe1 DAT0 */
+                        <0x00 0x64800000 0x00 0x64800000 0x00 0x0070c000>, /* C71_1 */
+                        <0x00 0x65800000 0x00 0x65800000 0x00 0x0070c000>, /* C71_2 */
+                        <0x00 0x70000000 0x00 0x70000000 0x00 0x00400000>, /* MSMC RAM */
+                        <0x00 0x30000000 0x00 0x30000000 0x00 0x0c400000>, /* MAIN NAVSS */
+                        <0x41 0x00000000 0x41 0x00000000 0x01 0x00000000>, /* PCIe1 DAT1 */
+                        <0x4e 0x20000000 0x4e 0x20000000 0x00 0x00080000>, /* GPU */
+
+                        /* MCUSS_WKUP Range */
+                        <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>,
+                        <0x00 0x40200000 0x00 0x40200000 0x00 0x00998400>,
+                        <0x00 0x40f00000 0x00 0x40f00000 0x00 0x00020000>,
+                        <0x00 0x41000000 0x00 0x41000000 0x00 0x00020000>,
+                        <0x00 0x41400000 0x00 0x41400000 0x00 0x00020000>,
+                        <0x00 0x41c00000 0x00 0x41c00000 0x00 0x00100000>,
+                        <0x00 0x42040000 0x00 0x42040000 0x00 0x03ac2400>,
+                        <0x00 0x45100000 0x00 0x45100000 0x00 0x00c24000>,
+                        <0x00 0x46000000 0x00 0x46000000 0x00 0x00200000>,
+                        <0x00 0x47000000 0x00 0x47000000 0x00 0x00068400>,
+                        <0x00 0x50000000 0x00 0x50000000 0x00 0x10000000>,
+                        <0x05 0x00000000 0x05 0x00000000 0x01 0x00000000>,
+                        <0x07 0x00000000 0x07 0x00000000 0x01 0x00000000>;
+
+               cbass_mcu_wakeup: bus@28380000 {
+                       compatible = "simple-bus";
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       ranges = <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>, /* MCU NAVSS*/
+                                <0x00 0x40200000 0x00 0x40200000 0x00 0x00998400>, /* First peripheral window */
+                                <0x00 0x40f00000 0x00 0x40f00000 0x00 0x00020000>, /* CTRL_MMR0 */
+                                <0x00 0x41000000 0x00 0x41000000 0x00 0x00020000>, /* MCU R5F Core0 */
+                                <0x00 0x41400000 0x00 0x41400000 0x00 0x00020000>, /* MCU R5F Core1 */
+                                <0x00 0x41c00000 0x00 0x41c00000 0x00 0x00100000>, /* MCU SRAM */
+                                <0x00 0x42040000 0x00 0x42040000 0x00 0x03ac2400>, /* WKUP peripheral window */
+                                <0x00 0x45100000 0x00 0x45100000 0x00 0x00c24000>, /* MMRs, remaining NAVSS */
+                                <0x00 0x46000000 0x00 0x46000000 0x00 0x00200000>, /* CPSW */
+                                <0x00 0x47000000 0x00 0x47000000 0x00 0x00068400>, /* OSPI register space */
+                                <0x00 0x50000000 0x00 0x50000000 0x00 0x10000000>, /* FSS OSPI0/1 data region 0 */
+                                <0x05 0x00000000 0x05 0x00000000 0x01 0x00000000>, /* FSS OSPI0 data region 3 */
+                                <0x07 0x00000000 0x07 0x00000000 0x01 0x00000000>; /* FSS OSPI1 data region 3*/
+
+               };
+
+       };
+};
+
+/* Now include peripherals from each bus segment */
+#include "k3-j721s2-main.dtsi"
+#include "k3-j721s2-mcu-wakeup.dtsi"
index 2f03cbf..e4727dc 100644 (file)
@@ -223,7 +223,14 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
                r = 1;
                break;
        case KVM_CAP_NR_VCPUS:
-               r = num_online_cpus();
+               /*
+                * ARM64 treats KVM_CAP_NR_CPUS differently from all other
+                * architectures, as it does not always bound it to
+                * KVM_CAP_MAX_VCPUS. It should not matter much because
+                * this is just an advisory value.
+                */
+               r = min_t(unsigned int, num_online_cpus(),
+                         kvm_arm_default_max_vcpus());
                break;
        case KVM_CAP_MAX_VCPUS:
        case KVM_CAP_MAX_VCPU_ID:
diff --git a/arch/hexagon/include/asm/timer-regs.h b/arch/hexagon/include/asm/timer-regs.h
deleted file mode 100644 (file)
index ee6c614..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Timer support for Hexagon
- *
- * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
- */
-
-#ifndef _ASM_TIMER_REGS_H
-#define _ASM_TIMER_REGS_H
-
-/*  This stuff should go into a platform specific file  */
-#define TCX0_CLK_RATE          19200
-#define TIMER_ENABLE           0
-#define TIMER_CLR_ON_MATCH     1
-
-/*
- * 8x50 HDD Specs 5-8.  Simulator co-sim not fixed until
- * release 1.1, and then it's "adjustable" and probably not defaulted.
- */
-#define RTOS_TIMER_INT         3
-#ifdef CONFIG_HEXAGON_COMET
-#define RTOS_TIMER_REGS_ADDR   0xAB000000UL
-#endif
-#define SLEEP_CLK_RATE         32000
-
-#endif
index 8d4ec76..dfe69e1 100644 (file)
@@ -7,11 +7,10 @@
 #define _ASM_TIMEX_H
 
 #include <asm-generic/timex.h>
-#include <asm/timer-regs.h>
 #include <asm/hexagon_vm.h>
 
 /* Using TCX0 as our clock.  CLOCK_TICK_RATE scheduled to be removed. */
-#define CLOCK_TICK_RATE              TCX0_CLK_RATE
+#define CLOCK_TICK_RATE              19200
 
 #define ARCH_HAS_READ_CURRENT_TIMER
 
diff --git a/arch/hexagon/kernel/.gitignore b/arch/hexagon/kernel/.gitignore
new file mode 100644 (file)
index 0000000..c5f676c
--- /dev/null
@@ -0,0 +1 @@
+vmlinux.lds
index feffe52..febc957 100644 (file)
 #include <linux/of_irq.h>
 #include <linux/module.h>
 
-#include <asm/timer-regs.h>
 #include <asm/hexagon_vm.h>
 
+#define TIMER_ENABLE           BIT(0)
+
 /*
  * For the clocksource we need:
  *     pcycle frequency (600MHz)
@@ -33,6 +34,13 @@ cycles_t     pcycle_freq_mhz;
 cycles_t       thread_freq_mhz;
 cycles_t       sleep_clk_freq;
 
+/*
+ * 8x50 HDD Specs 5-8.  Simulator co-sim not fixed until
+ * release 1.1, and then it's "adjustable" and probably not defaulted.
+ */
+#define RTOS_TIMER_INT         3
+#define RTOS_TIMER_REGS_ADDR   0xAB000000UL
+
 static struct resource rtos_timer_resources[] = {
        {
                .start  = RTOS_TIMER_REGS_ADDR,
@@ -80,7 +88,7 @@ static int set_next_event(unsigned long delta, struct clock_event_device *evt)
        iowrite32(0, &rtos_timer->clear);
 
        iowrite32(delta, &rtos_timer->match);
-       iowrite32(1 << TIMER_ENABLE, &rtos_timer->enable);
+       iowrite32(TIMER_ENABLE, &rtos_timer->enable);
        return 0;
 }
 
index d35d69d..55f7539 100644 (file)
@@ -27,6 +27,7 @@ void __raw_readsw(const void __iomem *addr, void *data, int len)
                *dst++ = *src;
 
 }
+EXPORT_SYMBOL(__raw_readsw);
 
 /*
  * __raw_writesw - read words a short at a time
@@ -47,6 +48,7 @@ void __raw_writesw(void __iomem *addr, const void *data, int len)
 
 
 }
+EXPORT_SYMBOL(__raw_writesw);
 
 /*  Pretty sure len is pre-adjusted for the length of the access already */
 void __raw_readsl(const void __iomem *addr, void *data, int len)
@@ -62,6 +64,7 @@ void __raw_readsl(const void __iomem *addr, void *data, int len)
 
 
 }
+EXPORT_SYMBOL(__raw_readsl);
 
 void __raw_writesl(void __iomem *addr, const void *data, int len)
 {
@@ -76,3 +79,4 @@ void __raw_writesl(void __iomem *addr, const void *data, int len)
 
 
 }
+EXPORT_SYMBOL(__raw_writesl);
index 99058a6..34d6458 100644 (file)
@@ -1145,7 +1145,7 @@ asmlinkage void set_esp0(unsigned long ssp)
  */
 asmlinkage void fpsp040_die(void)
 {
-       force_fatal_sig(SIGSEGV);
+       force_exit_sig(SIGSEGV);
 }
 
 #ifdef CONFIG_M68KFPU_EMU
index 5a3e325..1c91064 100644 (file)
@@ -381,6 +381,12 @@ void clk_disable(struct clk *clk)
 
 EXPORT_SYMBOL(clk_disable);
 
+struct clk *clk_get_parent(struct clk *clk)
+{
+       return NULL;
+}
+EXPORT_SYMBOL(clk_get_parent);
+
 unsigned long clk_get_rate(struct clk *clk)
 {
        if (!clk)
index a3aa22c..a07a5ed 100644 (file)
@@ -75,7 +75,7 @@ static unsigned int __init gen_fdt_mem_array(
 __init int yamon_dt_append_memory(void *fdt,
                                  const struct yamon_mem_region *regions)
 {
-       unsigned long phys_memsize, memsize;
+       unsigned long phys_memsize = 0, memsize;
        __be32 mem_array[2 * MAX_MEM_ARRAY_ENTRIES];
        unsigned int mem_entries;
        int i, err, mem_off;
index 70e32de..72d02d3 100644 (file)
 446    n32     landlock_restrict_self          sys_landlock_restrict_self
 # 447 reserved for memfd_secret
 448    n32     process_mrelease                sys_process_mrelease
+449    n32     futex_waitv                     sys_futex_waitv
index 1ca7bc3..e2c481f 100644 (file)
 446    n64     landlock_restrict_self          sys_landlock_restrict_self
 # 447 reserved for memfd_secret
 448    n64     process_mrelease                sys_process_mrelease
+449    n64     futex_waitv                     sys_futex_waitv
index a61c35e..3714c97 100644 (file)
 446    o32     landlock_restrict_self          sys_landlock_restrict_self
 # 447 reserved for memfd_secret
 448    o32     process_mrelease                sys_process_mrelease
+449    o32     futex_waitv                     sys_futex_waitv
index 562aa87..aa20d07 100644 (file)
@@ -1067,7 +1067,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
                r = 1;
                break;
        case KVM_CAP_NR_VCPUS:
-               r = num_online_cpus();
+               r = min_t(unsigned int, num_online_cpus(), KVM_MAX_VCPUS);
                break;
        case KVM_CAP_MAX_VCPUS:
                r = KVM_MAX_VCPUS;
index dd819e3..4916ccc 100644 (file)
@@ -158,6 +158,12 @@ void clk_deactivate(struct clk *clk)
 }
 EXPORT_SYMBOL(clk_deactivate);
 
+struct clk *clk_get_parent(struct clk *clk)
+{
+       return NULL;
+}
+EXPORT_SYMBOL(clk_get_parent);
+
 static inline u32 get_counter_resolution(void)
 {
        u32 res;
index d6fd8fa..53061cb 100644 (file)
@@ -231,6 +231,7 @@ CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRC_CCITT=m
 CONFIG_CRC_T10DIF=y
 CONFIG_FONTS=y
+CONFIG_PRINTK_TIME=y
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_FS=y
 CONFIG_DEBUG_MEMORY_INIT=y
index 7085df0..39e7985 100644 (file)
@@ -3,38 +3,19 @@
  * Copyright (C) 1999 Hewlett-Packard (Frank Rowand)
  * Copyright (C) 1999 Philipp Rumpf <prumpf@tux.org>
  * Copyright (C) 1999 SuSE GmbH
+ * Copyright (C) 2021 Helge Deller <deller@gmx.de>
  */
 
 #ifndef _PARISC_ASSEMBLY_H
 #define _PARISC_ASSEMBLY_H
 
-#define CALLEE_FLOAT_FRAME_SIZE        80
-
 #ifdef CONFIG_64BIT
-#define LDREG  ldd
-#define STREG  std
-#define LDREGX  ldd,s
-#define LDREGM ldd,mb
-#define STREGM std,ma
-#define SHRREG shrd
-#define SHLREG shld
-#define ANDCM   andcm,*
-#define        COND(x) * ## x
 #define RP_OFFSET      16
 #define FRAME_SIZE     128
 #define CALLEE_REG_FRAME_SIZE  144
 #define REG_SZ         8
 #define ASM_ULONG_INSN .dword
 #else  /* CONFIG_64BIT */
-#define LDREG  ldw
-#define STREG  stw
-#define LDREGX  ldwx,s
-#define LDREGM ldwm
-#define STREGM stwm
-#define SHRREG shr
-#define SHLREG shlw
-#define ANDCM   andcm
-#define COND(x)        x
 #define RP_OFFSET      20
 #define FRAME_SIZE     64
 #define CALLEE_REG_FRAME_SIZE  128
@@ -45,6 +26,7 @@
 /* Frame alignment for 32- and 64-bit */
 #define FRAME_ALIGN     64
 
+#define CALLEE_FLOAT_FRAME_SIZE        80
 #define CALLEE_SAVE_FRAME_SIZE (CALLEE_REG_FRAME_SIZE + CALLEE_FLOAT_FRAME_SIZE)
 
 #ifdef CONFIG_PA20
 
 #ifdef __ASSEMBLY__
 
+#ifdef CONFIG_64BIT
+#define LDREG  ldd
+#define STREG  std
+#define LDREGX  ldd,s
+#define LDREGM ldd,mb
+#define STREGM std,ma
+#define SHRREG shrd
+#define SHLREG shld
+#define ANDCM   andcm,*
+#define        COND(x) * ## x
+#else  /* CONFIG_64BIT */
+#define LDREG  ldw
+#define STREG  stw
+#define LDREGX  ldwx,s
+#define LDREGM ldwm
+#define STREGM stwm
+#define SHRREG shr
+#define SHLREG shlw
+#define ANDCM   andcm
+#define COND(x)        x
+#endif
+
 #ifdef CONFIG_64BIT
 /* the 64-bit pa gnu assembler unfortunately defaults to .level 1.1 or 2.0 so
  * work around that for now... */
index 7efb1aa..af2a598 100644 (file)
@@ -5,6 +5,7 @@
 #ifndef __ASSEMBLY__
 
 #include <linux/types.h>
+#include <linux/stringify.h>
 #include <asm/assembly.h>
 
 #define JUMP_LABEL_NOP_SIZE 4
index 4b9e3d7..2b3010a 100644 (file)
@@ -2,7 +2,7 @@
 #ifndef _ASM_PARISC_RT_SIGFRAME_H
 #define _ASM_PARISC_RT_SIGFRAME_H
 
-#define SIGRETURN_TRAMP 3
+#define SIGRETURN_TRAMP 4
 #define SIGRESTARTBLOCK_TRAMP 5 
 #define TRAMP_SIZE (SIGRETURN_TRAMP + SIGRESTARTBLOCK_TRAMP)
 
index bbfe23c..46b1050 100644 (file)
@@ -288,21 +288,22 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs,
           already in userspace. The first words of tramp are used to
           save the previous sigrestartblock trampoline that might be
           on the stack. We start the sigreturn trampoline at 
-          SIGRESTARTBLOCK_TRAMP. */
+          SIGRESTARTBLOCK_TRAMP+X. */
        err |= __put_user(in_syscall ? INSN_LDI_R25_1 : INSN_LDI_R25_0,
                        &frame->tramp[SIGRESTARTBLOCK_TRAMP+0]);
-       err |= __put_user(INSN_BLE_SR2_R0, 
+       err |= __put_user(INSN_LDI_R20, 
                        &frame->tramp[SIGRESTARTBLOCK_TRAMP+1]);
-       err |= __put_user(INSN_LDI_R20,
+       err |= __put_user(INSN_BLE_SR2_R0, 
                        &frame->tramp[SIGRESTARTBLOCK_TRAMP+2]);
+       err |= __put_user(INSN_NOP, &frame->tramp[SIGRESTARTBLOCK_TRAMP+3]);
 
-       start = (unsigned long) &frame->tramp[SIGRESTARTBLOCK_TRAMP+0];
-       end = (unsigned long) &frame->tramp[SIGRESTARTBLOCK_TRAMP+3];
+       start = (unsigned long) &frame->tramp[0];
+       end = (unsigned long) &frame->tramp[TRAMP_SIZE];
        flush_user_dcache_range_asm(start, end);
        flush_user_icache_range_asm(start, end);
 
        /* TRAMP Words 0-4, Length 5 = SIGRESTARTBLOCK_TRAMP
-        * TRAMP Words 5-7, Length 3 = SIGRETURN_TRAMP
+        * TRAMP Words 5-9, Length 4 = SIGRETURN_TRAMP
         * So the SIGRETURN_TRAMP is at the end of SIGRESTARTBLOCK_TRAMP
         */
        rp = (unsigned long) &frame->tramp[SIGRESTARTBLOCK_TRAMP];
index a5bdbb5..f166250 100644 (file)
@@ -36,7 +36,7 @@ struct compat_regfile {
         compat_int_t rf_sar;
 };
 
-#define COMPAT_SIGRETURN_TRAMP 3
+#define COMPAT_SIGRETURN_TRAMP 4
 #define COMPAT_SIGRESTARTBLOCK_TRAMP 5
 #define COMPAT_TRAMP_SIZE (COMPAT_SIGRETURN_TRAMP + \
                                COMPAT_SIGRESTARTBLOCK_TRAMP)
index bf751e0..358c000 100644 (file)
 446    common  landlock_restrict_self          sys_landlock_restrict_self
 # 447 reserved for memfd_secret
 448    common  process_mrelease                sys_process_mrelease
+449    common  futex_waitv                     sys_futex_waitv
index 0e3640e..5fa68c2 100644 (file)
@@ -196,3 +196,6 @@ clean-files := vmlinux.lds
 # Force dependency (incbin is bad)
 $(obj)/vdso32_wrapper.o : $(obj)/vdso32/vdso32.so.dbg
 $(obj)/vdso64_wrapper.o : $(obj)/vdso64/vdso64.so.dbg
+
+# for cleaning
+subdir- += vdso32 vdso64
index 2d59688..0d073b9 100644 (file)
@@ -733,6 +733,7 @@ _GLOBAL(mmu_pin_tlb)
 #ifdef CONFIG_PIN_TLB_DATA
        LOAD_REG_IMMEDIATE(r6, PAGE_OFFSET)
        LOAD_REG_IMMEDIATE(r7, MI_SVALID | MI_PS8MEG | _PMD_ACCESSED)
+       li      r8, 0
 #ifdef CONFIG_PIN_TLB_IMMR
        li      r0, 3
 #else
@@ -741,26 +742,26 @@ _GLOBAL(mmu_pin_tlb)
        mtctr   r0
        cmpwi   r4, 0
        beq     4f
-       LOAD_REG_IMMEDIATE(r8, 0xf0 | _PAGE_RO | _PAGE_SPS | _PAGE_SH | _PAGE_PRESENT)
        LOAD_REG_ADDR(r9, _sinittext)
 
 2:     ori     r0, r6, MD_EVALID
+       ori     r12, r8, 0xf0 | _PAGE_RO | _PAGE_SPS | _PAGE_SH | _PAGE_PRESENT
        mtspr   SPRN_MD_CTR, r5
        mtspr   SPRN_MD_EPN, r0
        mtspr   SPRN_MD_TWC, r7
-       mtspr   SPRN_MD_RPN, r8
+       mtspr   SPRN_MD_RPN, r12
        addi    r5, r5, 0x100
        addis   r6, r6, SZ_8M@h
        addis   r8, r8, SZ_8M@h
        cmplw   r6, r9
        bdnzt   lt, 2b
-
-4:     LOAD_REG_IMMEDIATE(r8, 0xf0 | _PAGE_DIRTY | _PAGE_SPS | _PAGE_SH | _PAGE_PRESENT)
+4:
 2:     ori     r0, r6, MD_EVALID
+       ori     r12, r8, 0xf0 | _PAGE_DIRTY | _PAGE_SPS | _PAGE_SH | _PAGE_PRESENT
        mtspr   SPRN_MD_CTR, r5
        mtspr   SPRN_MD_EPN, r0
        mtspr   SPRN_MD_TWC, r7
-       mtspr   SPRN_MD_RPN, r8
+       mtspr   SPRN_MD_RPN, r12
        addi    r5, r5, 0x100
        addis   r6, r6, SZ_8M@h
        addis   r8, r8, SZ_8M@h
@@ -781,7 +782,7 @@ _GLOBAL(mmu_pin_tlb)
 #endif
 #if defined(CONFIG_PIN_TLB_IMMR) || defined(CONFIG_PIN_TLB_DATA)
        lis     r0, (MD_RSV4I | MD_TWAM)@h
-       mtspr   SPRN_MI_CTR, r0
+       mtspr   SPRN_MD_CTR, r0
 #endif
        mtspr   SPRN_SRR1, r10
        mtspr   SPRN_SRR0, r11
index 1f07317..618aecc 100644 (file)
@@ -25,8 +25,14 @@ static inline int __get_user_sigset(sigset_t *dst, const sigset_t __user *src)
 
        return __get_user(dst->sig[0], (u64 __user *)&src->sig[0]);
 }
-#define unsafe_get_user_sigset(dst, src, label) \
-       unsafe_get_user((dst)->sig[0], (u64 __user *)&(src)->sig[0], label)
+#define unsafe_get_user_sigset(dst, src, label) do {                   \
+       sigset_t *__dst = dst;                                          \
+       const sigset_t __user *__src = src;                             \
+       int i;                                                          \
+                                                                       \
+       for (i = 0; i < _NSIG_WORDS; i++)                               \
+               unsafe_get_user(__dst->sig[i], &__src->sig[i], label);  \
+} while (0)
 
 #ifdef CONFIG_VSX
 extern unsigned long copy_vsx_to_user(void __user *to,
index 00a9c9c..3e053e2 100644 (file)
@@ -1063,7 +1063,7 @@ SYSCALL_DEFINE3(swapcontext, struct ucontext __user *, old_ctx,
         * We kill the task with a SIGSEGV in this situation.
         */
        if (do_setcontext(new_ctx, regs, 0)) {
-               force_fatal_sig(SIGSEGV);
+               force_exit_sig(SIGSEGV);
                return -EFAULT;
        }
 
index ef51853..d1e1fc0 100644 (file)
@@ -704,7 +704,7 @@ SYSCALL_DEFINE3(swapcontext, struct ucontext __user *, old_ctx,
         */
 
        if (__get_user_sigset(&set, &new_ctx->uc_sigmask)) {
-               force_fatal_sig(SIGSEGV);
+               force_exit_sig(SIGSEGV);
                return -EFAULT;
        }
        set_current_blocked(&set);
@@ -713,7 +713,7 @@ SYSCALL_DEFINE3(swapcontext, struct ucontext __user *, old_ctx,
                return -EFAULT;
        if (__unsafe_restore_sigcontext(current, NULL, 0, &new_ctx->uc_mcontext)) {
                user_read_access_end();
-               force_fatal_sig(SIGSEGV);
+               force_exit_sig(SIGSEGV);
                return -EFAULT;
        }
        user_read_access_end();
index f9ea0e5..3fa6d24 100644 (file)
@@ -187,6 +187,12 @@ static void watchdog_smp_panic(int cpu, u64 tb)
        if (sysctl_hardlockup_all_cpu_backtrace)
                trigger_allbutself_cpu_backtrace();
 
+       /*
+        * Force flush any remote buffers that might be stuck in IRQ context
+        * and therefore could not run their irq_work.
+        */
+       printk_trigger_flush();
+
        if (hardlockup_panic)
                nmi_panic(NULL, "Hard LOCKUP");
 
index eb776d0..32a4b4d 100644 (file)
@@ -2005,7 +2005,7 @@ hcall_real_table:
        .globl  hcall_real_table_end
 hcall_real_table_end:
 
-_GLOBAL(kvmppc_h_set_xdabr)
+_GLOBAL_TOC(kvmppc_h_set_xdabr)
 EXPORT_SYMBOL_GPL(kvmppc_h_set_xdabr)
        andi.   r0, r5, DABRX_USER | DABRX_KERNEL
        beq     6f
@@ -2015,7 +2015,7 @@ EXPORT_SYMBOL_GPL(kvmppc_h_set_xdabr)
 6:     li      r3, H_PARAMETER
        blr
 
-_GLOBAL(kvmppc_h_set_dabr)
+_GLOBAL_TOC(kvmppc_h_set_dabr)
 EXPORT_SYMBOL_GPL(kvmppc_h_set_dabr)
        li      r5, DABRX_USER | DABRX_KERNEL
 3:
index 35e9ccc..a72920f 100644 (file)
@@ -641,9 +641,9 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
                 * implementations just count online CPUs.
                 */
                if (hv_enabled)
-                       r = num_present_cpus();
+                       r = min_t(unsigned int, num_present_cpus(), KVM_MAX_VCPUS);
                else
-                       r = num_online_cpus();
+                       r = min_t(unsigned int, num_online_cpus(), KVM_MAX_VCPUS);
                break;
        case KVM_CAP_MAX_VCPUS:
                r = KVM_MAX_VCPUS;
index 8fc49b1..6ec9789 100644 (file)
@@ -314,7 +314,7 @@ static unsigned long __init kaslr_choose_location(void *dt_ptr, phys_addr_t size
                pr_warn("KASLR: No safe seed for randomizing the kernel base.\n");
 
        ram = min_t(phys_addr_t, __max_low_memory, size);
-       ram = map_mem_in_cams(ram, CONFIG_LOWMEM_CAM_NUM, true, false);
+       ram = map_mem_in_cams(ram, CONFIG_LOWMEM_CAM_NUM, true, true);
        linear_sz = min_t(unsigned long, ram, SZ_512M);
 
        /* If the linear size is smaller than 64M, do not randmize */
index 89353d4..647bf45 100644 (file)
@@ -645,7 +645,7 @@ static void early_init_this_mmu(void)
 
                if (map)
                        linear_map_top = map_mem_in_cams(linear_map_top,
-                                                        num_cams, true, true);
+                                                        num_cams, false, true);
        }
 #endif
 
@@ -766,7 +766,7 @@ void setup_initial_memory_limit(phys_addr_t first_memblock_base,
                num_cams = (mfspr(SPRN_TLB1CFG) & TLBnCFG_N_ENTRY) / 4;
 
                linear_sz = map_mem_in_cams(first_memblock_size, num_cams,
-                                           false, true);
+                                           true, true);
 
                ppc64_rma_size = min_t(u64, linear_sz, 0x40000000);
        } else
index 6f14c8f..59d3cfc 100644 (file)
@@ -376,9 +376,9 @@ static void initialize_form2_numa_distance_lookup_table(void)
 {
        int i, j;
        struct device_node *root;
-       const __u8 *numa_dist_table;
+       const __u8 *form2_distances;
        const __be32 *numa_lookup_index;
-       int numa_dist_table_length;
+       int form2_distances_length;
        int max_numa_index, distance_index;
 
        if (firmware_has_feature(FW_FEATURE_OPAL))
@@ -392,45 +392,41 @@ static void initialize_form2_numa_distance_lookup_table(void)
        max_numa_index = of_read_number(&numa_lookup_index[0], 1);
 
        /* first element of the array is the size and is encode-int */
-       numa_dist_table = of_get_property(root, "ibm,numa-distance-table", NULL);
-       numa_dist_table_length = of_read_number((const __be32 *)&numa_dist_table[0], 1);
+       form2_distances = of_get_property(root, "ibm,numa-distance-table", NULL);
+       form2_distances_length = of_read_number((const __be32 *)&form2_distances[0], 1);
        /* Skip the size which is encoded int */
-       numa_dist_table += sizeof(__be32);
+       form2_distances += sizeof(__be32);
 
-       pr_debug("numa_dist_table_len = %d, numa_dist_indexes_len = %d\n",
-                numa_dist_table_length, max_numa_index);
+       pr_debug("form2_distances_len = %d, numa_dist_indexes_len = %d\n",
+                form2_distances_length, max_numa_index);
 
        for (i = 0; i < max_numa_index; i++)
                /* +1 skip the max_numa_index in the property */
                numa_id_index_table[i] = of_read_number(&numa_lookup_index[i + 1], 1);
 
 
-       if (numa_dist_table_length != max_numa_index * max_numa_index) {
+       if (form2_distances_length != max_numa_index * max_numa_index) {
                WARN(1, "Wrong NUMA distance information\n");
-               /* consider everybody else just remote. */
-               for (i = 0;  i < max_numa_index; i++) {
-                       for (j = 0; j < max_numa_index; j++) {
-                               int nodeA = numa_id_index_table[i];
-                               int nodeB = numa_id_index_table[j];
-
-                               if (nodeA == nodeB)
-                                       numa_distance_table[nodeA][nodeB] = LOCAL_DISTANCE;
-                               else
-                                       numa_distance_table[nodeA][nodeB] = REMOTE_DISTANCE;
-                       }
-               }
+               form2_distances = NULL; // don't use it
        }
-
        distance_index = 0;
        for (i = 0;  i < max_numa_index; i++) {
                for (j = 0; j < max_numa_index; j++) {
                        int nodeA = numa_id_index_table[i];
                        int nodeB = numa_id_index_table[j];
-
-                       numa_distance_table[nodeA][nodeB] = numa_dist_table[distance_index++];
-                       pr_debug("dist[%d][%d]=%d ", nodeA, nodeB, numa_distance_table[nodeA][nodeB]);
+                       int dist;
+
+                       if (form2_distances)
+                               dist = form2_distances[distance_index++];
+                       else if (nodeA == nodeB)
+                               dist = LOCAL_DISTANCE;
+                       else
+                               dist = REMOTE_DISTANCE;
+                       numa_distance_table[nodeA][nodeB] = dist;
+                       pr_debug("dist[%d][%d]=%d ", nodeA, nodeB, dist);
                }
        }
+
        of_node_put(root);
 }
 
index bb789f3..a38372f 100644 (file)
@@ -186,7 +186,6 @@ err:
 static int mcu_remove(struct i2c_client *client)
 {
        struct mcu *mcu = i2c_get_clientdata(client);
-       int ret;
 
        kthread_stop(shutdown_thread);
 
index 49b4015..8f998e5 100644 (file)
@@ -1094,15 +1094,6 @@ static phys_addr_t ddw_memory_hotplug_max(void)
        phys_addr_t max_addr = memory_hotplug_max();
        struct device_node *memory;
 
-       /*
-        * The "ibm,pmemory" can appear anywhere in the address space.
-        * Assuming it is still backed by page structs, set the upper limit
-        * for the huge DMA window as MAX_PHYSMEM_BITS.
-        */
-       if (of_find_node_by_type(NULL, "ibm,pmemory"))
-               return (sizeof(phys_addr_t) * 8 <= MAX_PHYSMEM_BITS) ?
-                       (phys_addr_t) -1 : (1ULL << MAX_PHYSMEM_BITS);
-
        for_each_node_by_type(memory, "memory") {
                unsigned long start, size;
                int n_mem_addr_cells, n_mem_size_cells, len;
@@ -1238,7 +1229,6 @@ static bool enable_ddw(struct pci_dev *dev, struct device_node *pdn)
        u32 ddw_avail[DDW_APPLICABLE_SIZE];
        struct dma_win *window;
        struct property *win64;
-       bool ddw_enabled = false;
        struct failed_ddw_pdn *fpdn;
        bool default_win_removed = false, direct_mapping = false;
        bool pmem_present;
@@ -1253,7 +1243,6 @@ static bool enable_ddw(struct pci_dev *dev, struct device_node *pdn)
 
        if (find_existing_ddw(pdn, &dev->dev.archdata.dma_offset, &len)) {
                direct_mapping = (len >= max_ram_len);
-               ddw_enabled = true;
                goto out_unlock;
        }
 
@@ -1367,8 +1356,10 @@ static bool enable_ddw(struct pci_dev *dev, struct device_node *pdn)
                len = order_base_2(query.largest_available_block << page_shift);
                win_name = DMA64_PROPNAME;
        } else {
-               direct_mapping = true;
-               win_name = DIRECT64_PROPNAME;
+               direct_mapping = !default_win_removed ||
+                       (len == MAX_PHYSMEM_BITS) ||
+                       (!pmem_present && (len == max_ram_len));
+               win_name = direct_mapping ? DIRECT64_PROPNAME : DMA64_PROPNAME;
        }
 
        ret = create_ddw(dev, ddw_avail, &create, page_shift, len);
@@ -1406,8 +1397,8 @@ static bool enable_ddw(struct pci_dev *dev, struct device_node *pdn)
                        dev_info(&dev->dev, "failed to map DMA window for %pOF: %d\n",
                                 dn, ret);
 
-               /* Make sure to clean DDW if any TCE was set*/
-               clean_dma_window(pdn, win64->value);
+                       /* Make sure to clean DDW if any TCE was set*/
+                       clean_dma_window(pdn, win64->value);
                        goto out_del_list;
                }
        } else {
@@ -1454,7 +1445,6 @@ static bool enable_ddw(struct pci_dev *dev, struct device_node *pdn)
        spin_unlock(&dma_win_list_lock);
 
        dev->dev.archdata.dma_offset = win_addr;
-       ddw_enabled = true;
        goto out_unlock;
 
 out_del_list:
@@ -1490,10 +1480,10 @@ out_unlock:
         * as RAM, then we failed to create a window to cover persistent
         * memory and need to set the DMA limit.
         */
-       if (pmem_present && ddw_enabled && direct_mapping && len == max_ram_len)
+       if (pmem_present && direct_mapping && len == max_ram_len)
                dev->dev.bus_dma_limit = dev->dev.archdata.dma_offset + (1ULL << len);
 
-    return ddw_enabled && direct_mapping;
+       return direct_mapping;
 }
 
 static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev)
index 97796c6..785c292 100644 (file)
@@ -3,7 +3,6 @@ config PPC_XIVE
        bool
        select PPC_SMP_MUXED_IPI
        select HARDIRQS_SW_RESEND
-       select IRQ_DOMAIN_NOMAP
 
 config PPC_XIVE_NATIVE
        bool
index c5d75c0..7b69299 100644 (file)
@@ -1443,8 +1443,7 @@ static const struct irq_domain_ops xive_irq_domain_ops = {
 
 static void __init xive_init_host(struct device_node *np)
 {
-       xive_irq_domain = irq_domain_add_nomap(np, XIVE_MAX_IRQ,
-                                              &xive_irq_domain_ops, NULL);
+       xive_irq_domain = irq_domain_add_tree(np, &xive_irq_domain_ops, NULL);
        if (WARN_ON(xive_irq_domain == NULL))
                return;
        irq_set_default_host(xive_irq_domain);
index 5927c94..8a107ed 100644 (file)
@@ -107,11 +107,13 @@ PHONY += vdso_install
 vdso_install:
        $(Q)$(MAKE) $(build)=arch/riscv/kernel/vdso $@
 
+ifeq ($(KBUILD_EXTMOD),)
 ifeq ($(CONFIG_MMU),y)
 prepare: vdso_prepare
 vdso_prepare: prepare0
        $(Q)$(MAKE) $(build)=arch/riscv/kernel/vdso include/generated/vdso-offsets.h
 endif
+endif
 
 ifneq ($(CONFIG_XIP_KERNEL),y)
 ifeq ($(CONFIG_RISCV_M_MODE)$(CONFIG_SOC_CANAAN),yy)
index c252fd5..ef473e2 100644 (file)
@@ -19,6 +19,8 @@ CONFIG_SOC_VIRT=y
 CONFIG_SOC_MICROCHIP_POLARFIRE=y
 CONFIG_SMP=y
 CONFIG_HOTPLUG_CPU=y
+CONFIG_VIRTUALIZATION=y
+CONFIG_KVM=m
 CONFIG_JUMP_LABEL=y
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
index 434ef5b..6e9f12f 100644 (file)
@@ -19,6 +19,8 @@ CONFIG_SOC_VIRT=y
 CONFIG_ARCH_RV32I=y
 CONFIG_SMP=y
 CONFIG_HOTPLUG_CPU=y
+CONFIG_VIRTUALIZATION=y
+CONFIG_KVM=m
 CONFIG_JUMP_LABEL=y
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
index e3d3aed..fb84619 100644 (file)
@@ -740,7 +740,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu)
                 * Ensure we set mode to IN_GUEST_MODE after we disable
                 * interrupts and before the final VCPU requests check.
                 * See the comment in kvm_vcpu_exiting_guest_mode() and
-                * Documentation/virtual/kvm/vcpu-requests.rst
+                * Documentation/virt/kvm/vcpu-requests.rst
                 */
                vcpu->mode = IN_GUEST_MODE;
 
index eb3c045..3b0e703 100644 (file)
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * Copyright (c) 2019 Western Digital Corporation or its affiliates.
  *
  * Authors:
index 26399df..fb18af3 100644 (file)
@@ -74,7 +74,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
                r = 1;
                break;
        case KVM_CAP_NR_VCPUS:
-               r = num_online_cpus();
+               r = min_t(unsigned int, num_online_cpus(), KVM_MAX_VCPUS);
                break;
        case KVM_CAP_MAX_VCPUS:
                r = KVM_MAX_VCPUS;
index 8857ec3..2a5bb4f 100644 (file)
@@ -47,7 +47,7 @@ config ARCH_SUPPORTS_UPROBES
 config KASAN_SHADOW_OFFSET
        hex
        depends on KASAN
-       default 0x18000000000000
+       default 0x1C000000000000
 
 config S390
        def_bool y
@@ -194,6 +194,7 @@ config S390
        select HAVE_RELIABLE_STACKTRACE
        select HAVE_RSEQ
        select HAVE_SAMPLE_FTRACE_DIRECT
+       select HAVE_SAMPLE_FTRACE_DIRECT_MULTI
        select HAVE_SOFTIRQ_ON_OWN_STACK
        select HAVE_SYSCALL_TRACEPOINTS
        select HAVE_VIRT_CPU_ACCOUNTING
index 69c45f6..609e369 100644 (file)
@@ -77,10 +77,12 @@ KBUILD_AFLAGS_DECOMPRESSOR += $(aflags-y)
 KBUILD_CFLAGS_DECOMPRESSOR += $(cflags-y)
 
 ifneq ($(call cc-option,-mstack-size=8192 -mstack-guard=128),)
-cflags-$(CONFIG_CHECK_STACK) += -mstack-size=$(STACK_SIZE)
-ifeq ($(call cc-option,-mstack-size=8192),)
-cflags-$(CONFIG_CHECK_STACK) += -mstack-guard=$(CONFIG_STACK_GUARD)
-endif
+  CC_FLAGS_CHECK_STACK := -mstack-size=$(STACK_SIZE)
+  ifeq ($(call cc-option,-mstack-size=8192),)
+    CC_FLAGS_CHECK_STACK += -mstack-guard=$(CONFIG_STACK_GUARD)
+  endif
+  export CC_FLAGS_CHECK_STACK
+  cflags-$(CONFIG_CHECK_STACK) += $(CC_FLAGS_CHECK_STACK)
 endif
 
 ifdef CONFIG_EXPOLINE
index 7571dee..1aa11a8 100644 (file)
@@ -149,82 +149,56 @@ static void setup_ident_map_size(unsigned long max_physmem_end)
 
 static void setup_kernel_memory_layout(void)
 {
-       bool vmalloc_size_verified = false;
-       unsigned long vmemmap_off;
-       unsigned long vspace_left;
+       unsigned long vmemmap_start;
        unsigned long rte_size;
        unsigned long pages;
-       unsigned long vmax;
 
        pages = ident_map_size / PAGE_SIZE;
        /* vmemmap contains a multiple of PAGES_PER_SECTION struct pages */
        vmemmap_size = SECTION_ALIGN_UP(pages) * sizeof(struct page);
 
        /* choose kernel address space layout: 4 or 3 levels. */
-       vmemmap_off = round_up(ident_map_size, _REGION3_SIZE);
+       vmemmap_start = round_up(ident_map_size, _REGION3_SIZE);
        if (IS_ENABLED(CONFIG_KASAN) ||
            vmalloc_size > _REGION2_SIZE ||
-           vmemmap_off + vmemmap_size + vmalloc_size + MODULES_LEN > _REGION2_SIZE)
-               vmax = _REGION1_SIZE;
-       else
-               vmax = _REGION2_SIZE;
-
-       /* keep vmemmap_off aligned to a top level region table entry */
-       rte_size = vmax == _REGION1_SIZE ? _REGION2_SIZE : _REGION3_SIZE;
-       MODULES_END = vmax;
-       if (is_prot_virt_host()) {
-               /*
-                * forcing modules and vmalloc area under the ultravisor
-                * secure storage limit, so that any vmalloc allocation
-                * we do could be used to back secure guest storage.
-                */
-               adjust_to_uv_max(&MODULES_END);
-       }
-
-#ifdef CONFIG_KASAN
-       if (MODULES_END < vmax) {
-               /* force vmalloc and modules below kasan shadow */
-               MODULES_END = min(MODULES_END, KASAN_SHADOW_START);
+           vmemmap_start + vmemmap_size + vmalloc_size + MODULES_LEN >
+                   _REGION2_SIZE) {
+               MODULES_END = _REGION1_SIZE;
+               rte_size = _REGION2_SIZE;
        } else {
-               /*
-                * leave vmalloc and modules above kasan shadow but make
-                * sure they don't overlap with it
-                */
-               vmalloc_size = min(vmalloc_size, vmax - KASAN_SHADOW_END - MODULES_LEN);
-               vmalloc_size_verified = true;
-               vspace_left = KASAN_SHADOW_START;
+               MODULES_END = _REGION2_SIZE;
+               rte_size = _REGION3_SIZE;
        }
+       /*
+        * forcing modules and vmalloc area under the ultravisor
+        * secure storage limit, so that any vmalloc allocation
+        * we do could be used to back secure guest storage.
+        */
+       adjust_to_uv_max(&MODULES_END);
+#ifdef CONFIG_KASAN
+       /* force vmalloc and modules below kasan shadow */
+       MODULES_END = min(MODULES_END, KASAN_SHADOW_START);
 #endif
        MODULES_VADDR = MODULES_END - MODULES_LEN;
        VMALLOC_END = MODULES_VADDR;
 
-       if (vmalloc_size_verified) {
-               VMALLOC_START = VMALLOC_END - vmalloc_size;
-       } else {
-               vmemmap_off = round_up(ident_map_size, rte_size);
-
-               if (vmemmap_off + vmemmap_size > VMALLOC_END ||
-                   vmalloc_size > VMALLOC_END - vmemmap_off - vmemmap_size) {
-                       /*
-                        * allow vmalloc area to occupy up to 1/2 of
-                        * the rest virtual space left.
-                        */
-                       vmalloc_size = min(vmalloc_size, VMALLOC_END / 2);
-               }
-               VMALLOC_START = VMALLOC_END - vmalloc_size;
-               vspace_left = VMALLOC_START;
-       }
+       /* allow vmalloc area to occupy up to about 1/2 of the rest virtual space left */
+       vmalloc_size = min(vmalloc_size, round_down(VMALLOC_END / 2, _REGION3_SIZE));
+       VMALLOC_START = VMALLOC_END - vmalloc_size;
 
-       pages = vspace_left / (PAGE_SIZE + sizeof(struct page));
+       /* split remaining virtual space between 1:1 mapping & vmemmap array */
+       pages = VMALLOC_START / (PAGE_SIZE + sizeof(struct page));
        pages = SECTION_ALIGN_UP(pages);
-       vmemmap_off = round_up(vspace_left - pages * sizeof(struct page), rte_size);
-       /* keep vmemmap left most starting from a fresh region table entry */
-       vmemmap_off = min(vmemmap_off, round_up(ident_map_size, rte_size));
-       /* take care that identity map is lower then vmemmap */
-       ident_map_size = min(ident_map_size, vmemmap_off);
+       /* keep vmemmap_start aligned to a top level region table entry */
+       vmemmap_start = round_down(VMALLOC_START - pages * sizeof(struct page), rte_size);
+       /* vmemmap_start is the future VMEM_MAX_PHYS, make sure it is within MAX_PHYSMEM */
+       vmemmap_start = min(vmemmap_start, 1UL << MAX_PHYSMEM_BITS);
+       /* make sure identity map doesn't overlay with vmemmap */
+       ident_map_size = min(ident_map_size, vmemmap_start);
        vmemmap_size = SECTION_ALIGN_UP(ident_map_size / PAGE_SIZE) * sizeof(struct page);
-       VMALLOC_START = max(vmemmap_off + vmemmap_size, VMALLOC_START);
-       vmemmap = (struct page *)vmemmap_off;
+       /* make sure vmemmap doesn't overlay with vmalloc area */
+       VMALLOC_START = max(vmemmap_start + vmemmap_size, VMALLOC_START);
+       vmemmap = (struct page *)vmemmap_start;
 }
 
 /*
index ea398a0..7f3c9ac 100644 (file)
@@ -74,6 +74,12 @@ void *kexec_file_add_components(struct kimage *image,
 int arch_kexec_do_relocs(int r_type, void *loc, unsigned long val,
                         unsigned long addr);
 
+#define ARCH_HAS_KIMAGE_ARCH
+
+struct kimage_arch {
+       void *ipl_buf;
+};
+
 extern const struct kexec_file_ops s390_kexec_image_ops;
 extern const struct kexec_file_ops s390_kexec_elf_ops;
 
index d72a6df..785d54c 100644 (file)
@@ -191,8 +191,8 @@ static int copy_oldmem_user(void __user *dst, void *src, size_t count)
                                return rc;
                } else {
                        /* Check for swapped kdump oldmem areas */
-                       if (oldmem_data.start && from - oldmem_data.size < oldmem_data.size) {
-                               from -= oldmem_data.size;
+                       if (oldmem_data.start && from - oldmem_data.start < oldmem_data.size) {
+                               from -= oldmem_data.start;
                                len = min(count, oldmem_data.size - from);
                        } else if (oldmem_data.start && from < oldmem_data.size) {
                                len = min(count, oldmem_data.size - from);
index e2cc357..5ad1dde 100644 (file)
@@ -2156,7 +2156,7 @@ void *ipl_report_finish(struct ipl_report *report)
 
        buf = vzalloc(report->size);
        if (!buf)
-               return ERR_PTR(-ENOMEM);
+               goto out;
        ptr = buf;
 
        memcpy(ptr, report->ipib, report->ipib->hdr.len);
@@ -2195,6 +2195,7 @@ void *ipl_report_finish(struct ipl_report *report)
        }
 
        BUG_ON(ptr > buf + report->size);
+out:
        return buf;
 }
 
index 528edff..9975ad2 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/kexec.h>
 #include <linux/module_signature.h>
 #include <linux/verification.h>
+#include <linux/vmalloc.h>
 #include <asm/boot_data.h>
 #include <asm/ipl.h>
 #include <asm/setup.h>
@@ -170,6 +171,7 @@ static int kexec_file_add_ipl_report(struct kimage *image,
        struct kexec_buf buf;
        unsigned long addr;
        void *ptr, *end;
+       int ret;
 
        buf.image = image;
 
@@ -199,9 +201,13 @@ static int kexec_file_add_ipl_report(struct kimage *image,
                ptr += len;
        }
 
+       ret = -ENOMEM;
        buf.buffer = ipl_report_finish(data->report);
+       if (!buf.buffer)
+               goto out;
        buf.bufsz = data->report->size;
        buf.memsz = buf.bufsz;
+       image->arch.ipl_buf = buf.buffer;
 
        data->memsz += buf.memsz;
 
@@ -209,7 +215,9 @@ static int kexec_file_add_ipl_report(struct kimage *image,
                data->kernel_buf + offsetof(struct lowcore, ipl_parmblock_ptr);
        *lc_ipl_parmblock_ptr = (__u32)buf.mem;
 
-       return kexec_add_buffer(&buf);
+       ret = kexec_add_buffer(&buf);
+out:
+       return ret;
 }
 
 void *kexec_file_add_components(struct kimage *image,
@@ -322,3 +330,11 @@ int arch_kexec_apply_relocations_add(struct purgatory_info *pi,
        }
        return 0;
 }
+
+int arch_kimage_file_post_load_cleanup(struct kimage *image)
+{
+       vfree(image->arch.ipl_buf);
+       image->arch.ipl_buf = NULL;
+
+       return kexec_image_post_load_cleanup_default(image);
+}
index 40405f2..225ab2d 100644 (file)
@@ -606,7 +606,7 @@ static void __init setup_resources(void)
 
 static void __init setup_memory_end(void)
 {
-       memblock_remove(ident_map_size, ULONG_MAX);
+       memblock_remove(ident_map_size, PHYS_ADDR_MAX - ident_map_size);
        max_pfn = max_low_pfn = PFN_DOWN(ident_map_size);
        pr_notice("The maximum memory size is %luMB\n", ident_map_size >> 20);
 }
@@ -637,14 +637,6 @@ static struct notifier_block kdump_mem_nb = {
 
 #endif
 
-/*
- * Make sure that the area above identity mapping is protected
- */
-static void __init reserve_above_ident_map(void)
-{
-       memblock_reserve(ident_map_size, ULONG_MAX);
-}
-
 /*
  * Reserve memory for kdump kernel to be loaded with kexec
  */
@@ -785,7 +777,6 @@ static void __init memblock_add_mem_detect_info(void)
        }
        memblock_set_bottom_up(false);
        memblock_set_node(0, ULONG_MAX, &memblock.memory, 0);
-       memblock_dump_all();
 }
 
 /*
@@ -826,9 +817,6 @@ static void __init setup_memory(void)
                storage_key_init_range(start, end);
 
        psw_set_key(PAGE_DEFAULT_KEY);
-
-       /* Only cosmetics */
-       memblock_enforce_memory_limit(memblock_end_of_DRAM());
 }
 
 static void __init relocate_amode31_section(void)
@@ -999,24 +987,24 @@ void __init setup_arch(char **cmdline_p)
        setup_control_program_code();
 
        /* Do some memory reservations *before* memory is added to memblock */
-       reserve_above_ident_map();
        reserve_kernel();
        reserve_initrd();
        reserve_certificate_list();
        reserve_mem_detect_info();
+       memblock_set_current_limit(ident_map_size);
        memblock_allow_resize();
 
        /* Get information about *all* installed memory */
        memblock_add_mem_detect_info();
 
        free_mem_detect_info();
+       setup_memory_end();
+       memblock_dump_all();
+       setup_memory();
 
        relocate_amode31_section();
        setup_cr();
-
        setup_uv();
-       setup_memory_end();
-       setup_memory();
        dma_contiguous_reserve(ident_map_size);
        vmcp_cma_reserve();
        if (MACHINE_HAS_EDAT2)
index df5261e..ed9c5c2 100644 (file)
 446  common    landlock_restrict_self  sys_landlock_restrict_self      sys_landlock_restrict_self
 # 447 reserved for memfd_secret
 448  common    process_mrelease        sys_process_mrelease            sys_process_mrelease
+449  common    futex_waitv             sys_futex_waitv                 sys_futex_waitv
index 035705c..2b78078 100644 (file)
@@ -84,7 +84,7 @@ static void default_trap_handler(struct pt_regs *regs)
 {
        if (user_mode(regs)) {
                report_user_fault(regs, SIGSEGV, 0);
-               force_fatal_sig(SIGSEGV);
+               force_exit_sig(SIGSEGV);
        } else
                die(regs, "Unknown program exception");
 }
index e3e6ac5..245bddf 100644 (file)
@@ -22,7 +22,7 @@ KBUILD_AFLAGS_32 += -m31 -s
 KBUILD_CFLAGS_32 := $(filter-out -m64,$(KBUILD_CFLAGS))
 KBUILD_CFLAGS_32 += -m31 -fPIC -shared -fno-common -fno-builtin
 
-LDFLAGS_vdso32.so.dbg += -fPIC -shared -nostdlib -soname=linux-vdso32.so.1 \
+LDFLAGS_vdso32.so.dbg += -fPIC -shared -soname=linux-vdso32.so.1 \
        --hash-style=both --build-id=sha1 -melf_s390 -T
 
 $(targets:%=$(obj)/%.dbg): KBUILD_CFLAGS = $(KBUILD_CFLAGS_32)
index 6568de2..9e2b95a 100644 (file)
@@ -8,8 +8,9 @@ ARCH_REL_TYPE_ABS += R_390_GOT|R_390_PLT
 include $(srctree)/lib/vdso/Makefile
 obj-vdso64 = vdso_user_wrapper.o note.o
 obj-cvdso64 = vdso64_generic.o getcpu.o
-CFLAGS_REMOVE_getcpu.o = -pg $(CC_FLAGS_FTRACE) $(CC_FLAGS_EXPOLINE)
-CFLAGS_REMOVE_vdso64_generic.o = -pg $(CC_FLAGS_FTRACE) $(CC_FLAGS_EXPOLINE)
+VDSO_CFLAGS_REMOVE := -pg $(CC_FLAGS_FTRACE) $(CC_FLAGS_EXPOLINE) $(CC_FLAGS_CHECK_STACK)
+CFLAGS_REMOVE_getcpu.o = $(VDSO_CFLAGS_REMOVE)
+CFLAGS_REMOVE_vdso64_generic.o = $(VDSO_CFLAGS_REMOVE)
 
 # Build rules
 
@@ -25,7 +26,7 @@ KBUILD_AFLAGS_64 += -m64 -s
 
 KBUILD_CFLAGS_64 := $(filter-out -m64,$(KBUILD_CFLAGS))
 KBUILD_CFLAGS_64 += -m64 -fPIC -shared -fno-common -fno-builtin
-ldflags-y := -fPIC -shared -nostdlib -soname=linux-vdso64.so.1 \
+ldflags-y := -fPIC -shared -soname=linux-vdso64.so.1 \
             --hash-style=both --build-id=sha1 -T
 
 $(targets:%=$(obj)/%.dbg): KBUILD_CFLAGS = $(KBUILD_CFLAGS_64)
index c6257f6..14a18ba 100644 (file)
@@ -585,6 +585,8 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
                        r = KVM_MAX_VCPUS;
                else if (sclp.has_esca && sclp.has_64bscao)
                        r = KVM_S390_ESCA_CPU_SLOTS;
+               if (ext == KVM_CAP_NR_VCPUS)
+                       r = min_t(unsigned int, num_online_cpus(), r);
                break;
        case KVM_CAP_S390_COW:
                r = MACHINE_HAS_ESOP;
index cd677bc..ffab163 100644 (file)
@@ -244,7 +244,7 @@ static int setup_frame(struct ksignal *ksig, struct pt_regs *regs,
                get_sigframe(ksig, regs, sigframe_size);
 
        if (invalid_frame_pointer(sf, sigframe_size)) {
-               force_fatal_sig(SIGILL);
+               force_exit_sig(SIGILL);
                return -EINVAL;
        }
 
@@ -336,7 +336,7 @@ static int setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs,
        sf = (struct rt_signal_frame __user *)
                get_sigframe(ksig, regs, sigframe_size);
        if (invalid_frame_pointer(sf, sigframe_size)) {
-               force_fatal_sig(SIGILL);
+               force_exit_sig(SIGILL);
                return -EINVAL;
        }
 
index bbbd40c..8f20862 100644 (file)
@@ -122,7 +122,7 @@ void try_to_clear_window_buffer(struct pt_regs *regs, int who)
                if ((sp & 7) ||
                    copy_to_user((char __user *) sp, &tp->reg_window[window],
                                 sizeof(struct reg_window32))) {
-                       force_fatal_sig(SIGILL);
+                       force_exit_sig(SIGILL);
                        return;
                }
        }
index 95dd1ee..7399327 100644 (file)
@@ -193,7 +193,7 @@ config X86
        select HAVE_DYNAMIC_FTRACE_WITH_ARGS    if X86_64
        select HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
        select HAVE_SAMPLE_FTRACE_DIRECT        if X86_64
-       select HAVE_SAMPLE_FTRACE_MULTI_DIRECT  if X86_64
+       select HAVE_SAMPLE_FTRACE_DIRECT_MULTI  if X86_64
        select HAVE_EBPF_JIT
        select HAVE_EFFICIENT_UNALIGNED_ACCESS
        select HAVE_EISA
index 0b6b277..fd2ee94 100644 (file)
@@ -226,7 +226,7 @@ bool emulate_vsyscall(unsigned long error_code,
        if ((!tmp && regs->orig_ax != syscall_nr) || regs->ip != address) {
                warn_bad_vsyscall(KERN_DEBUG, regs,
                                  "seccomp tried to change syscall nr or ip");
-               force_fatal_sig(SIGSYS);
+               force_exit_sig(SIGSYS);
                return true;
        }
        regs->orig_ax = -1;
index 42cf01e..ec6444f 100644 (file)
@@ -2211,7 +2211,6 @@ intel_pmu_snapshot_branch_stack(struct perf_branch_entry *entries, unsigned int
        /* must not have branches... */
        local_irq_save(flags);
        __intel_pmu_disable_all(false); /* we don't care about BTS */
-       __intel_pmu_pebs_disable_all();
        __intel_pmu_lbr_disable();
        /*            ... until here */
        return __intel_pmu_snapshot_branch_stack(entries, cnt, flags);
@@ -2225,7 +2224,6 @@ intel_pmu_snapshot_arch_branch_stack(struct perf_branch_entry *entries, unsigned
        /* must not have branches... */
        local_irq_save(flags);
        __intel_pmu_disable_all(false); /* we don't care about BTS */
-       __intel_pmu_pebs_disable_all();
        __intel_pmu_arch_lbr_disable();
        /*            ... until here */
        return __intel_pmu_snapshot_branch_stack(entries, cnt, flags);
index eb2c6ce..3660f69 100644 (file)
@@ -3608,6 +3608,9 @@ static int skx_cha_hw_config(struct intel_uncore_box *box, struct perf_event *ev
        struct hw_perf_event_extra *reg1 = &event->hw.extra_reg;
        struct extra_reg *er;
        int idx = 0;
+       /* Any of the CHA events may be filtered by Thread/Core-ID.*/
+       if (event->hw.config & SNBEP_CBO_PMON_CTL_TID_EN)
+               idx = SKX_CHA_MSR_PMON_BOX_FILTER_TID;
 
        for (er = skx_uncore_cha_extra_regs; er->msr; er++) {
                if (er->event != (event->hw.config & er->config_mask))
@@ -3675,6 +3678,7 @@ static struct event_constraint skx_uncore_iio_constraints[] = {
        UNCORE_EVENT_CONSTRAINT(0xc0, 0xc),
        UNCORE_EVENT_CONSTRAINT(0xc5, 0xc),
        UNCORE_EVENT_CONSTRAINT(0xd4, 0xc),
+       UNCORE_EVENT_CONSTRAINT(0xd5, 0xc),
        EVENT_CONSTRAINT_END
 };
 
@@ -4525,6 +4529,13 @@ static void snr_iio_cleanup_mapping(struct intel_uncore_type *type)
        pmu_iio_cleanup_mapping(type, &snr_iio_mapping_group);
 }
 
+static struct event_constraint snr_uncore_iio_constraints[] = {
+       UNCORE_EVENT_CONSTRAINT(0x83, 0x3),
+       UNCORE_EVENT_CONSTRAINT(0xc0, 0xc),
+       UNCORE_EVENT_CONSTRAINT(0xd5, 0xc),
+       EVENT_CONSTRAINT_END
+};
+
 static struct intel_uncore_type snr_uncore_iio = {
        .name                   = "iio",
        .num_counters           = 4,
@@ -4536,6 +4547,7 @@ static struct intel_uncore_type snr_uncore_iio = {
        .event_mask_ext         = SNR_IIO_PMON_RAW_EVENT_MASK_EXT,
        .box_ctl                = SNR_IIO_MSR_PMON_BOX_CTL,
        .msr_offset             = SNR_IIO_MSR_OFFSET,
+       .constraints            = snr_uncore_iio_constraints,
        .ops                    = &ivbep_uncore_msr_ops,
        .format_group           = &snr_uncore_iio_format_group,
        .attr_update            = snr_iio_attr_update,
index 24f4a06..96eb7db 100644 (file)
@@ -177,6 +177,9 @@ void set_hv_tscchange_cb(void (*cb)(void))
                return;
        }
 
+       if (!hv_vp_index)
+               return;
+
        hv_reenlightenment_cb = cb;
 
        /* Make sure callback is registered before we write to MSRs */
@@ -383,20 +386,13 @@ static void __init hv_get_partition_id(void)
  */
 void __init hyperv_init(void)
 {
-       u64 guest_id, required_msrs;
+       u64 guest_id;
        union hv_x64_msr_hypercall_contents hypercall_msr;
        int cpuhp;
 
        if (x86_hyper_type != X86_HYPER_MS_HYPERV)
                return;
 
-       /* Absolutely required MSRs */
-       required_msrs = HV_MSR_HYPERCALL_AVAILABLE |
-               HV_MSR_VP_INDEX_AVAILABLE;
-
-       if ((ms_hyperv.features & required_msrs) != required_msrs)
-               return;
-
        if (hv_common_init())
                return;
 
index e5d8700..6ac61f8 100644 (file)
@@ -363,6 +363,7 @@ union kvm_mmu_extended_role {
                unsigned int cr4_smap:1;
                unsigned int cr4_smep:1;
                unsigned int cr4_la57:1;
+               unsigned int efer_lma:1;
        };
 };
 
index 4794b71..ff55df6 100644 (file)
@@ -163,12 +163,22 @@ static uint32_t  __init ms_hyperv_platform(void)
        cpuid(HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS,
              &eax, &hyp_signature[0], &hyp_signature[1], &hyp_signature[2]);
 
-       if (eax >= HYPERV_CPUID_MIN &&
-           eax <= HYPERV_CPUID_MAX &&
-           !memcmp("Microsoft Hv", hyp_signature, 12))
-               return HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS;
+       if (eax < HYPERV_CPUID_MIN || eax > HYPERV_CPUID_MAX ||
+           memcmp("Microsoft Hv", hyp_signature, 12))
+               return 0;
 
-       return 0;
+       /* HYPERCALL and VP_INDEX MSRs are mandatory for all features. */
+       eax = cpuid_eax(HYPERV_CPUID_FEATURES);
+       if (!(eax & HV_MSR_HYPERCALL_AVAILABLE)) {
+               pr_warn("x86/hyperv: HYPERCALL MSR not available.\n");
+               return 0;
+       }
+       if (!(eax & HV_MSR_VP_INDEX_AVAILABLE)) {
+               pr_warn("x86/hyperv: VP_INDEX MSR not available.\n");
+               return 0;
+       }
+
+       return HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS;
 }
 
 static unsigned char hv_get_nmi_reason(void)
index 63d3de0..8471a8b 100644 (file)
@@ -28,8 +28,7 @@ static DECLARE_WAIT_QUEUE_HEAD(ksgxd_waitq);
 static LIST_HEAD(sgx_active_page_list);
 static DEFINE_SPINLOCK(sgx_reclaimer_lock);
 
-/* The free page list lock protected variables prepend the lock. */
-static unsigned long sgx_nr_free_pages;
+static atomic_long_t sgx_nr_free_pages = ATOMIC_LONG_INIT(0);
 
 /* Nodes with one or more EPC sections. */
 static nodemask_t sgx_numa_mask;
@@ -403,14 +402,15 @@ skip:
 
                spin_lock(&node->lock);
                list_add_tail(&epc_page->list, &node->free_page_list);
-               sgx_nr_free_pages++;
                spin_unlock(&node->lock);
+               atomic_long_inc(&sgx_nr_free_pages);
        }
 }
 
 static bool sgx_should_reclaim(unsigned long watermark)
 {
-       return sgx_nr_free_pages < watermark && !list_empty(&sgx_active_page_list);
+       return atomic_long_read(&sgx_nr_free_pages) < watermark &&
+              !list_empty(&sgx_active_page_list);
 }
 
 static int ksgxd(void *p)
@@ -471,9 +471,9 @@ static struct sgx_epc_page *__sgx_alloc_epc_page_from_node(int nid)
 
        page = list_first_entry(&node->free_page_list, struct sgx_epc_page, list);
        list_del_init(&page->list);
-       sgx_nr_free_pages--;
 
        spin_unlock(&node->lock);
+       atomic_long_dec(&sgx_nr_free_pages);
 
        return page;
 }
@@ -625,9 +625,9 @@ void sgx_free_epc_page(struct sgx_epc_page *page)
        spin_lock(&node->lock);
 
        list_add_tail(&page->list, &node->free_page_list);
-       sgx_nr_free_pages++;
 
        spin_unlock(&node->lock);
+       atomic_long_inc(&sgx_nr_free_pages);
 }
 
 static bool __init sgx_setup_epc_section(u64 phys_addr, u64 size,
index e9ee8b5..04143a6 100644 (file)
@@ -964,6 +964,9 @@ unsigned long __get_wchan(struct task_struct *p)
        struct unwind_state state;
        unsigned long addr = 0;
 
+       if (!try_get_task_stack(p))
+               return 0;
+
        for (unwind_start(&state, p, NULL, NULL); !unwind_done(&state);
             unwind_next_frame(&state)) {
                addr = unwind_get_return_address(&state);
@@ -974,6 +977,8 @@ unsigned long __get_wchan(struct task_struct *p)
                break;
        }
 
+       put_task_stack(p);
+
        return addr;
 }
 
index 49b596d..c410be7 100644 (file)
@@ -742,6 +742,28 @@ dump_kernel_offset(struct notifier_block *self, unsigned long v, void *p)
        return 0;
 }
 
+static char *prepare_command_line(void)
+{
+#ifdef CONFIG_CMDLINE_BOOL
+#ifdef CONFIG_CMDLINE_OVERRIDE
+       strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
+#else
+       if (builtin_cmdline[0]) {
+               /* append boot loader cmdline to builtin */
+               strlcat(builtin_cmdline, " ", COMMAND_LINE_SIZE);
+               strlcat(builtin_cmdline, boot_command_line, COMMAND_LINE_SIZE);
+               strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
+       }
+#endif
+#endif
+
+       strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
+
+       parse_early_param();
+
+       return command_line;
+}
+
 /*
  * Determine if we were loaded by an EFI loader.  If so, then we have also been
  * passed the efi memmap, systab, etc., so we should use these data structures
@@ -830,6 +852,23 @@ void __init setup_arch(char **cmdline_p)
 
        x86_init.oem.arch_setup();
 
+       /*
+        * x86_configure_nx() is called before parse_early_param() (called by
+        * prepare_command_line()) to detect whether hardware doesn't support
+        * NX (so that the early EHCI debug console setup can safely call
+        * set_fixmap()). It may then be called again from within noexec_setup()
+        * during parsing early parameters to honor the respective command line
+        * option.
+        */
+       x86_configure_nx();
+
+       /*
+        * This parses early params and it needs to run before
+        * early_reserve_memory() because latter relies on such settings
+        * supplied as early params.
+        */
+       *cmdline_p = prepare_command_line();
+
        /*
         * Do some memory reservations *before* memory is added to memblock, so
         * memblock allocations won't overwrite it.
@@ -863,33 +902,6 @@ void __init setup_arch(char **cmdline_p)
        bss_resource.start = __pa_symbol(__bss_start);
        bss_resource.end = __pa_symbol(__bss_stop)-1;
 
-#ifdef CONFIG_CMDLINE_BOOL
-#ifdef CONFIG_CMDLINE_OVERRIDE
-       strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
-#else
-       if (builtin_cmdline[0]) {
-               /* append boot loader cmdline to builtin */
-               strlcat(builtin_cmdline, " ", COMMAND_LINE_SIZE);
-               strlcat(builtin_cmdline, boot_command_line, COMMAND_LINE_SIZE);
-               strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
-       }
-#endif
-#endif
-
-       strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
-       *cmdline_p = command_line;
-
-       /*
-        * x86_configure_nx() is called before parse_early_param() to detect
-        * whether hardware doesn't support NX (so that the early EHCI debug
-        * console setup can safely call set_fixmap()). It may then be called
-        * again from within noexec_setup() during parsing early parameters
-        * to honor the respective command line option.
-        */
-       x86_configure_nx();
-
-       parse_early_param();
-
 #ifdef CONFIG_MEMORY_HOTPLUG
        /*
         * Memory used by the kernel cannot be hot-removed because Linux
index cce1c89..c21bcd6 100644 (file)
@@ -160,7 +160,7 @@ Efault_end:
        user_access_end();
 Efault:
        pr_alert("could not access userspace vm86 info\n");
-       force_fatal_sig(SIGSEGV);
+       force_exit_sig(SIGSEGV);
        goto exit_vm86;
 }
 
index e19dabf..07e9215 100644 (file)
@@ -125,7 +125,7 @@ static void kvm_update_kvm_cpuid_base(struct kvm_vcpu *vcpu)
        }
 }
 
-struct kvm_cpuid_entry2 *kvm_find_kvm_cpuid_features(struct kvm_vcpu *vcpu)
+static struct kvm_cpuid_entry2 *kvm_find_kvm_cpuid_features(struct kvm_vcpu *vcpu)
 {
        u32 base = vcpu->arch.kvm_cpuid_base;
 
index 4a555f3..5e19e6e 100644 (file)
@@ -2022,7 +2022,7 @@ static void kvm_hv_hypercall_set_result(struct kvm_vcpu *vcpu, u64 result)
 {
        bool longmode;
 
-       longmode = is_64_bit_mode(vcpu);
+       longmode = is_64_bit_hypercall(vcpu);
        if (longmode)
                kvm_rax_write(vcpu, result);
        else {
@@ -2171,7 +2171,7 @@ int kvm_hv_hypercall(struct kvm_vcpu *vcpu)
        }
 
 #ifdef CONFIG_X86_64
-       if (is_64_bit_mode(vcpu)) {
+       if (is_64_bit_hypercall(vcpu)) {
                hc.param = kvm_rcx_read(vcpu);
                hc.ingpa = kvm_rdx_read(vcpu);
                hc.outgpa = kvm_r8_read(vcpu);
index 3379437..3be9bee 100644 (file)
@@ -4682,6 +4682,7 @@ static union kvm_mmu_extended_role kvm_calc_mmu_role_ext(struct kvm_vcpu *vcpu,
                /* PKEY and LA57 are active iff long mode is active. */
                ext.cr4_pke = ____is_efer_lma(regs) && ____is_cr4_pke(regs);
                ext.cr4_la57 = ____is_efer_lma(regs) && ____is_cr4_la57(regs);
+               ext.efer_lma = ____is_efer_lma(regs);
        }
 
        ext.valid = 1;
index 902c52a..21ac0a5 100644 (file)
@@ -237,7 +237,6 @@ static void sev_unbind_asid(struct kvm *kvm, unsigned int handle)
 static int sev_guest_init(struct kvm *kvm, struct kvm_sev_cmd *argp)
 {
        struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info;
-       bool es_active = argp->id == KVM_SEV_ES_INIT;
        int asid, ret;
 
        if (kvm->created_vcpus)
@@ -247,7 +246,8 @@ static int sev_guest_init(struct kvm *kvm, struct kvm_sev_cmd *argp)
        if (unlikely(sev->active))
                return ret;
 
-       sev->es_active = es_active;
+       sev->active = true;
+       sev->es_active = argp->id == KVM_SEV_ES_INIT;
        asid = sev_asid_new(sev);
        if (asid < 0)
                goto e_no_asid;
@@ -257,8 +257,6 @@ static int sev_guest_init(struct kvm *kvm, struct kvm_sev_cmd *argp)
        if (ret)
                goto e_free;
 
-       sev->active = true;
-       sev->asid = asid;
        INIT_LIST_HEAD(&sev->regions_list);
 
        return 0;
@@ -268,6 +266,7 @@ e_free:
        sev->asid = 0;
 e_no_asid:
        sev->es_active = false;
+       sev->active = false;
        return ret;
 }
 
@@ -1530,7 +1529,7 @@ static int sev_receive_finish(struct kvm *kvm, struct kvm_sev_cmd *argp)
        return sev_issue_cmd(kvm, SEV_CMD_RECEIVE_FINISH, &data, &argp->error);
 }
 
-static bool cmd_allowed_from_miror(u32 cmd_id)
+static bool is_cmd_allowed_from_mirror(u32 cmd_id)
 {
        /*
         * Allow mirrors VM to call KVM_SEV_LAUNCH_UPDATE_VMSA to enable SEV-ES
@@ -1757,7 +1756,7 @@ int svm_mem_enc_op(struct kvm *kvm, void __user *argp)
 
        /* Only the enc_context_owner handles some memory enc operations. */
        if (is_mirroring_enc_context(kvm) &&
-           !cmd_allowed_from_miror(sev_cmd.id)) {
+           !is_cmd_allowed_from_mirror(sev_cmd.id)) {
                r = -EINVAL;
                goto out;
        }
@@ -1990,7 +1989,12 @@ int svm_vm_copy_asid_from(struct kvm *kvm, unsigned int source_fd)
        mutex_unlock(&source_kvm->lock);
        mutex_lock(&kvm->lock);
 
-       if (sev_guest(kvm)) {
+       /*
+        * Disallow out-of-band SEV/SEV-ES init if the target is already an
+        * SEV guest, or if vCPUs have been created.  KVM relies on vCPUs being
+        * created after SEV/SEV-ES initialization, e.g. to init intercepts.
+        */
+       if (sev_guest(kvm) || kvm->created_vcpus) {
                ret = -EINVAL;
                goto e_mirror_unlock;
        }
index 437e685..5faad3d 100644 (file)
@@ -247,7 +247,7 @@ static __always_inline bool sev_es_guest(struct kvm *kvm)
 #ifdef CONFIG_KVM_AMD_SEV
        struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info;
 
-       return sev_guest(kvm) && sev->es_active;
+       return sev->es_active && !WARN_ON_ONCE(!sev->active);
 #else
        return false;
 #endif
index b213ca9..1e2f669 100644 (file)
@@ -670,33 +670,39 @@ static inline bool nested_vmx_prepare_msr_bitmap(struct kvm_vcpu *vcpu,
 static void nested_cache_shadow_vmcs12(struct kvm_vcpu *vcpu,
                                       struct vmcs12 *vmcs12)
 {
-       struct kvm_host_map map;
-       struct vmcs12 *shadow;
+       struct vcpu_vmx *vmx = to_vmx(vcpu);
+       struct gfn_to_hva_cache *ghc = &vmx->nested.shadow_vmcs12_cache;
 
        if (!nested_cpu_has_shadow_vmcs(vmcs12) ||
            vmcs12->vmcs_link_pointer == INVALID_GPA)
                return;
 
-       shadow = get_shadow_vmcs12(vcpu);
-
-       if (kvm_vcpu_map(vcpu, gpa_to_gfn(vmcs12->vmcs_link_pointer), &map))
+       if (ghc->gpa != vmcs12->vmcs_link_pointer &&
+           kvm_gfn_to_hva_cache_init(vcpu->kvm, ghc,
+                                     vmcs12->vmcs_link_pointer, VMCS12_SIZE))
                return;
 
-       memcpy(shadow, map.hva, VMCS12_SIZE);
-       kvm_vcpu_unmap(vcpu, &map, false);
+       kvm_read_guest_cached(vmx->vcpu.kvm, ghc, get_shadow_vmcs12(vcpu),
+                             VMCS12_SIZE);
 }
 
 static void nested_flush_cached_shadow_vmcs12(struct kvm_vcpu *vcpu,
                                              struct vmcs12 *vmcs12)
 {
        struct vcpu_vmx *vmx = to_vmx(vcpu);
+       struct gfn_to_hva_cache *ghc = &vmx->nested.shadow_vmcs12_cache;
 
        if (!nested_cpu_has_shadow_vmcs(vmcs12) ||
            vmcs12->vmcs_link_pointer == INVALID_GPA)
                return;
 
-       kvm_write_guest(vmx->vcpu.kvm, vmcs12->vmcs_link_pointer,
-                       get_shadow_vmcs12(vcpu), VMCS12_SIZE);
+       if (ghc->gpa != vmcs12->vmcs_link_pointer &&
+           kvm_gfn_to_hva_cache_init(vcpu->kvm, ghc,
+                                     vmcs12->vmcs_link_pointer, VMCS12_SIZE))
+               return;
+
+       kvm_write_guest_cached(vmx->vcpu.kvm, ghc, get_shadow_vmcs12(vcpu),
+                              VMCS12_SIZE);
 }
 
 /*
@@ -2830,6 +2836,17 @@ static int nested_vmx_check_controls(struct kvm_vcpu *vcpu,
        return 0;
 }
 
+static int nested_vmx_check_address_space_size(struct kvm_vcpu *vcpu,
+                                      struct vmcs12 *vmcs12)
+{
+#ifdef CONFIG_X86_64
+       if (CC(!!(vmcs12->vm_exit_controls & VM_EXIT_HOST_ADDR_SPACE_SIZE) !=
+               !!(vcpu->arch.efer & EFER_LMA)))
+               return -EINVAL;
+#endif
+       return 0;
+}
+
 static int nested_vmx_check_host_state(struct kvm_vcpu *vcpu,
                                       struct vmcs12 *vmcs12)
 {
@@ -2854,18 +2871,16 @@ static int nested_vmx_check_host_state(struct kvm_vcpu *vcpu,
                return -EINVAL;
 
 #ifdef CONFIG_X86_64
-       ia32e = !!(vcpu->arch.efer & EFER_LMA);
+       ia32e = !!(vmcs12->vm_exit_controls & VM_EXIT_HOST_ADDR_SPACE_SIZE);
 #else
        ia32e = false;
 #endif
 
        if (ia32e) {
-               if (CC(!(vmcs12->vm_exit_controls & VM_EXIT_HOST_ADDR_SPACE_SIZE)) ||
-                   CC(!(vmcs12->host_cr4 & X86_CR4_PAE)))
+               if (CC(!(vmcs12->host_cr4 & X86_CR4_PAE)))
                        return -EINVAL;
        } else {
-               if (CC(vmcs12->vm_exit_controls & VM_EXIT_HOST_ADDR_SPACE_SIZE) ||
-                   CC(vmcs12->vm_entry_controls & VM_ENTRY_IA32E_MODE) ||
+               if (CC(vmcs12->vm_entry_controls & VM_ENTRY_IA32E_MODE) ||
                    CC(vmcs12->host_cr4 & X86_CR4_PCIDE) ||
                    CC((vmcs12->host_rip) >> 32))
                        return -EINVAL;
@@ -2910,9 +2925,9 @@ static int nested_vmx_check_host_state(struct kvm_vcpu *vcpu,
 static int nested_vmx_check_vmcs_link_ptr(struct kvm_vcpu *vcpu,
                                          struct vmcs12 *vmcs12)
 {
-       int r = 0;
-       struct vmcs12 *shadow;
-       struct kvm_host_map map;
+       struct vcpu_vmx *vmx = to_vmx(vcpu);
+       struct gfn_to_hva_cache *ghc = &vmx->nested.shadow_vmcs12_cache;
+       struct vmcs_hdr hdr;
 
        if (vmcs12->vmcs_link_pointer == INVALID_GPA)
                return 0;
@@ -2920,17 +2935,21 @@ static int nested_vmx_check_vmcs_link_ptr(struct kvm_vcpu *vcpu,
        if (CC(!page_address_valid(vcpu, vmcs12->vmcs_link_pointer)))
                return -EINVAL;
 
-       if (CC(kvm_vcpu_map(vcpu, gpa_to_gfn(vmcs12->vmcs_link_pointer), &map)))
-               return -EINVAL;
+       if (ghc->gpa != vmcs12->vmcs_link_pointer &&
+           CC(kvm_gfn_to_hva_cache_init(vcpu->kvm, ghc,
+                                        vmcs12->vmcs_link_pointer, VMCS12_SIZE)))
+                return -EINVAL;
 
-       shadow = map.hva;
+       if (CC(kvm_read_guest_offset_cached(vcpu->kvm, ghc, &hdr,
+                                           offsetof(struct vmcs12, hdr),
+                                           sizeof(hdr))))
+               return -EINVAL;
 
-       if (CC(shadow->hdr.revision_id != VMCS12_REVISION) ||
-           CC(shadow->hdr.shadow_vmcs != nested_cpu_has_shadow_vmcs(vmcs12)))
-               r = -EINVAL;
+       if (CC(hdr.revision_id != VMCS12_REVISION) ||
+           CC(hdr.shadow_vmcs != nested_cpu_has_shadow_vmcs(vmcs12)))
+               return -EINVAL;
 
-       kvm_vcpu_unmap(vcpu, &map, false);
-       return r;
+       return 0;
 }
 
 /*
@@ -3535,6 +3554,9 @@ static int nested_vmx_run(struct kvm_vcpu *vcpu, bool launch)
        if (nested_vmx_check_controls(vcpu, vmcs12))
                return nested_vmx_fail(vcpu, VMXERR_ENTRY_INVALID_CONTROL_FIELD);
 
+       if (nested_vmx_check_address_space_size(vcpu, vmcs12))
+               return nested_vmx_fail(vcpu, VMXERR_ENTRY_INVALID_HOST_STATE_FIELD);
+
        if (nested_vmx_check_host_state(vcpu, vmcs12))
                return nested_vmx_fail(vcpu, VMXERR_ENTRY_INVALID_HOST_STATE_FIELD);
 
@@ -5264,10 +5286,11 @@ static int handle_vmptrld(struct kvm_vcpu *vcpu)
                return 1;
 
        if (vmx->nested.current_vmptr != vmptr) {
-               struct kvm_host_map map;
-               struct vmcs12 *new_vmcs12;
+               struct gfn_to_hva_cache *ghc = &vmx->nested.vmcs12_cache;
+               struct vmcs_hdr hdr;
 
-               if (kvm_vcpu_map(vcpu, gpa_to_gfn(vmptr), &map)) {
+               if (ghc->gpa != vmptr &&
+                   kvm_gfn_to_hva_cache_init(vcpu->kvm, ghc, vmptr, VMCS12_SIZE)) {
                        /*
                         * Reads from an unbacked page return all 1s,
                         * which means that the 32 bits located at the
@@ -5278,12 +5301,16 @@ static int handle_vmptrld(struct kvm_vcpu *vcpu)
                                VMXERR_VMPTRLD_INCORRECT_VMCS_REVISION_ID);
                }
 
-               new_vmcs12 = map.hva;
+               if (kvm_read_guest_offset_cached(vcpu->kvm, ghc, &hdr,
+                                                offsetof(struct vmcs12, hdr),
+                                                sizeof(hdr))) {
+                       return nested_vmx_fail(vcpu,
+                               VMXERR_VMPTRLD_INCORRECT_VMCS_REVISION_ID);
+               }
 
-               if (new_vmcs12->hdr.revision_id != VMCS12_REVISION ||
-                   (new_vmcs12->hdr.shadow_vmcs &&
+               if (hdr.revision_id != VMCS12_REVISION ||
+                   (hdr.shadow_vmcs &&
                     !nested_cpu_has_vmx_shadow_vmcs(vcpu))) {
-                       kvm_vcpu_unmap(vcpu, &map, false);
                        return nested_vmx_fail(vcpu,
                                VMXERR_VMPTRLD_INCORRECT_VMCS_REVISION_ID);
                }
@@ -5294,8 +5321,11 @@ static int handle_vmptrld(struct kvm_vcpu *vcpu)
                 * Load VMCS12 from guest memory since it is not already
                 * cached.
                 */
-               memcpy(vmx->nested.cached_vmcs12, new_vmcs12, VMCS12_SIZE);
-               kvm_vcpu_unmap(vcpu, &map, false);
+               if (kvm_read_guest_cached(vcpu->kvm, ghc, vmx->nested.cached_vmcs12,
+                                         VMCS12_SIZE)) {
+                       return nested_vmx_fail(vcpu,
+                               VMXERR_VMPTRLD_INCORRECT_VMCS_REVISION_ID);
+               }
 
                set_current_vmptr(vmx, vmptr);
        }
index a4ead60..4df2ac2 100644 (file)
@@ -141,6 +141,16 @@ struct nested_vmx {
         */
        struct vmcs12 *cached_shadow_vmcs12;
 
+       /*
+        * GPA to HVA cache for accessing vmcs12->vmcs_link_pointer
+        */
+       struct gfn_to_hva_cache shadow_vmcs12_cache;
+
+       /*
+        * GPA to HVA cache for VMCS12
+        */
+       struct gfn_to_hva_cache vmcs12_cache;
+
        /*
         * Indicates if the shadow vmcs or enlightened vmcs must be updated
         * with the data held by struct vmcs12.
index dc7eb5f..5a403d9 100644 (file)
@@ -3307,9 +3307,9 @@ static void record_steal_time(struct kvm_vcpu *vcpu)
                             "xor %1, %1\n"
                             "2:\n"
                             _ASM_EXTABLE_UA(1b, 2b)
-                            : "+r" (st_preempted),
-                              "+&r" (err)
-                            : "m" (st->preempted));
+                            : "+q" (st_preempted),
+                              "+&r" (err),
+                              "+m" (st->preempted));
                if (err)
                        goto out;
 
@@ -4179,7 +4179,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
                r = !static_call(kvm_x86_cpu_has_accelerated_tpr)();
                break;
        case KVM_CAP_NR_VCPUS:
-               r = num_online_cpus();
+               r = min_t(unsigned int, num_online_cpus(), KVM_MAX_VCPUS);
                break;
        case KVM_CAP_MAX_VCPUS:
                r = KVM_MAX_VCPUS;
@@ -8848,7 +8848,7 @@ int kvm_emulate_hypercall(struct kvm_vcpu *vcpu)
 
        trace_kvm_hypercall(nr, a0, a1, a2, a3);
 
-       op_64_bit = is_64_bit_mode(vcpu);
+       op_64_bit = is_64_bit_hypercall(vcpu);
        if (!op_64_bit) {
                nr &= 0xFFFFFFFF;
                a0 &= 0xFFFFFFFF;
@@ -9547,12 +9547,16 @@ static void vcpu_load_eoi_exitmap(struct kvm_vcpu *vcpu)
        if (!kvm_apic_hw_enabled(vcpu->arch.apic))
                return;
 
-       if (to_hv_vcpu(vcpu))
+       if (to_hv_vcpu(vcpu)) {
                bitmap_or((ulong *)eoi_exit_bitmap,
                          vcpu->arch.ioapic_handled_vectors,
                          to_hv_synic(vcpu)->vec_bitmap, 256);
+               static_call(kvm_x86_load_eoi_exitmap)(vcpu, eoi_exit_bitmap);
+               return;
+       }
 
-       static_call(kvm_x86_load_eoi_exitmap)(vcpu, eoi_exit_bitmap);
+       static_call(kvm_x86_load_eoi_exitmap)(
+               vcpu, (u64 *)vcpu->arch.ioapic_handled_vectors);
 }
 
 void kvm_arch_mmu_notifier_invalidate_range(struct kvm *kvm,
index ea264c4..997669a 100644 (file)
@@ -153,12 +153,24 @@ static inline bool is_64_bit_mode(struct kvm_vcpu *vcpu)
 {
        int cs_db, cs_l;
 
+       WARN_ON_ONCE(vcpu->arch.guest_state_protected);
+
        if (!is_long_mode(vcpu))
                return false;
        static_call(kvm_x86_get_cs_db_l_bits)(vcpu, &cs_db, &cs_l);
        return cs_l;
 }
 
+static inline bool is_64_bit_hypercall(struct kvm_vcpu *vcpu)
+{
+       /*
+        * If running with protected guest state, the CS register is not
+        * accessible. The hypercall register values will have had to been
+        * provided in 64-bit mode, so assume the guest is in 64-bit.
+        */
+       return vcpu->arch.guest_state_protected || is_64_bit_mode(vcpu);
+}
+
 static inline bool x86_exception_has_error_code(unsigned int vector)
 {
        static u32 exception_has_error_code = BIT(DF_VECTOR) | BIT(TS_VECTOR) |
index 8f62bae..dff2bdf 100644 (file)
@@ -127,9 +127,9 @@ void kvm_xen_update_runstate_guest(struct kvm_vcpu *v, int state)
        state_entry_time = vx->runstate_entry_time;
        state_entry_time |= XEN_RUNSTATE_UPDATE;
 
-       BUILD_BUG_ON(sizeof(((struct vcpu_runstate_info *)0)->state_entry_time) !=
+       BUILD_BUG_ON(sizeof_field(struct vcpu_runstate_info, state_entry_time) !=
                     sizeof(state_entry_time));
-       BUILD_BUG_ON(sizeof(((struct compat_vcpu_runstate_info *)0)->state_entry_time) !=
+       BUILD_BUG_ON(sizeof_field(struct compat_vcpu_runstate_info, state_entry_time) !=
                     sizeof(state_entry_time));
 
        if (kvm_write_guest_offset_cached(v->kvm, &v->arch.xen.runstate_cache,
@@ -144,9 +144,9 @@ void kvm_xen_update_runstate_guest(struct kvm_vcpu *v, int state)
         */
        BUILD_BUG_ON(offsetof(struct vcpu_runstate_info, state) !=
                     offsetof(struct compat_vcpu_runstate_info, state));
-       BUILD_BUG_ON(sizeof(((struct vcpu_runstate_info *)0)->state) !=
+       BUILD_BUG_ON(sizeof_field(struct vcpu_runstate_info, state) !=
                     sizeof(vx->current_runstate));
-       BUILD_BUG_ON(sizeof(((struct compat_vcpu_runstate_info *)0)->state) !=
+       BUILD_BUG_ON(sizeof_field(struct compat_vcpu_runstate_info, state) !=
                     sizeof(vx->current_runstate));
 
        if (kvm_write_guest_offset_cached(v->kvm, &v->arch.xen.runstate_cache,
@@ -163,9 +163,9 @@ void kvm_xen_update_runstate_guest(struct kvm_vcpu *v, int state)
                     offsetof(struct vcpu_runstate_info, time) - sizeof(u64));
        BUILD_BUG_ON(offsetof(struct compat_vcpu_runstate_info, state_entry_time) !=
                     offsetof(struct compat_vcpu_runstate_info, time) - sizeof(u64));
-       BUILD_BUG_ON(sizeof(((struct vcpu_runstate_info *)0)->time) !=
-                    sizeof(((struct compat_vcpu_runstate_info *)0)->time));
-       BUILD_BUG_ON(sizeof(((struct vcpu_runstate_info *)0)->time) !=
+       BUILD_BUG_ON(sizeof_field(struct vcpu_runstate_info, time) !=
+                    sizeof_field(struct compat_vcpu_runstate_info, time));
+       BUILD_BUG_ON(sizeof_field(struct vcpu_runstate_info, time) !=
                     sizeof(vx->runstate_times));
 
        if (kvm_write_guest_offset_cached(v->kvm, &v->arch.xen.runstate_cache,
@@ -205,9 +205,9 @@ int __kvm_xen_has_interrupt(struct kvm_vcpu *v)
        BUILD_BUG_ON(offsetof(struct vcpu_info, evtchn_upcall_pending) !=
                     offsetof(struct compat_vcpu_info, evtchn_upcall_pending));
        BUILD_BUG_ON(sizeof(rc) !=
-                    sizeof(((struct vcpu_info *)0)->evtchn_upcall_pending));
+                    sizeof_field(struct vcpu_info, evtchn_upcall_pending));
        BUILD_BUG_ON(sizeof(rc) !=
-                    sizeof(((struct compat_vcpu_info *)0)->evtchn_upcall_pending));
+                    sizeof_field(struct compat_vcpu_info, evtchn_upcall_pending));
 
        /*
         * For efficiency, this mirrors the checks for using the valid
@@ -299,7 +299,7 @@ int kvm_xen_hvm_get_attr(struct kvm *kvm, struct kvm_xen_hvm_attr *data)
                break;
 
        case KVM_XEN_ATTR_TYPE_SHARED_INFO:
-               data->u.shared_info.gfn = gpa_to_gfn(kvm->arch.xen.shinfo_gfn);
+               data->u.shared_info.gfn = kvm->arch.xen.shinfo_gfn;
                r = 0;
                break;
 
@@ -698,7 +698,7 @@ int kvm_xen_hypercall(struct kvm_vcpu *vcpu)
            kvm_hv_hypercall_enabled(vcpu))
                return kvm_hv_hypercall(vcpu);
 
-       longmode = is_64_bit_mode(vcpu);
+       longmode = is_64_bit_hypercall(vcpu);
        if (!longmode) {
                params[0] = (u32)kvm_rbx_read(vcpu);
                params[1] = (u32)kvm_rcx_read(vcpu);
index 88b1fce..663aabf 100644 (file)
@@ -640,7 +640,7 @@ int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol,
         */
        ret = blk_queue_enter(q, 0);
        if (ret)
-               return ret;
+               goto fail;
 
        rcu_read_lock();
        spin_lock_irq(&q->queue_lock);
@@ -676,13 +676,13 @@ int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol,
                new_blkg = blkg_alloc(pos, q, GFP_KERNEL);
                if (unlikely(!new_blkg)) {
                        ret = -ENOMEM;
-                       goto fail;
+                       goto fail_exit_queue;
                }
 
                if (radix_tree_preload(GFP_KERNEL)) {
                        blkg_free(new_blkg);
                        ret = -ENOMEM;
-                       goto fail;
+                       goto fail_exit_queue;
                }
 
                rcu_read_lock();
@@ -722,9 +722,10 @@ fail_preloaded:
 fail_unlock:
        spin_unlock_irq(&q->queue_lock);
        rcu_read_unlock();
+fail_exit_queue:
+       blk_queue_exit(q);
 fail:
        blkdev_put_no_open(bdev);
-       blk_queue_exit(q);
        /*
         * If queue was bypassing, we should retry.  Do so after a
         * short msleep().  It isn't strictly necessary but queue
index 9ee32f8..f0f38ca 100644 (file)
@@ -363,8 +363,10 @@ void blk_cleanup_queue(struct request_queue *q)
        blk_queue_flag_set(QUEUE_FLAG_DEAD, q);
 
        blk_sync_queue(q);
-       if (queue_is_mq(q))
+       if (queue_is_mq(q)) {
+               blk_mq_cancel_work_sync(q);
                blk_mq_exit_queue(q);
+       }
 
        /*
         * In theory, request pool of sched_tags belongs to request queue.
index 8e364bd..1fce6d1 100644 (file)
@@ -379,7 +379,7 @@ static void mq_flush_data_end_io(struct request *rq, blk_status_t error)
  * @rq is being submitted.  Analyze what needs to be done and put it on the
  * right queue.
  */
-bool blk_insert_flush(struct request *rq)
+void blk_insert_flush(struct request *rq)
 {
        struct request_queue *q = rq->q;
        unsigned long fflags = q->queue_flags;  /* may change, cache */
@@ -409,7 +409,7 @@ bool blk_insert_flush(struct request *rq)
         */
        if (!policy) {
                blk_mq_end_request(rq, 0);
-               return true;
+               return;
        }
 
        BUG_ON(rq->bio != rq->biotail); /*assumes zero or single bio rq */
@@ -420,8 +420,10 @@ bool blk_insert_flush(struct request *rq)
         * for normal execution.
         */
        if ((policy & REQ_FSEQ_DATA) &&
-           !(policy & (REQ_FSEQ_PREFLUSH | REQ_FSEQ_POSTFLUSH)))
-               return false;
+           !(policy & (REQ_FSEQ_PREFLUSH | REQ_FSEQ_POSTFLUSH))) {
+               blk_mq_request_bypass_insert(rq, false, true);
+               return;
+       }
 
        /*
         * @rq should go through flush machinery.  Mark it part of flush
@@ -437,8 +439,6 @@ bool blk_insert_flush(struct request *rq)
        spin_lock_irq(&fq->mq_flush_lock);
        blk_flush_complete_seq(rq, fq, REQ_FSEQ_ACTIONS & ~policy, 0);
        spin_unlock_irq(&fq->mq_flush_lock);
-
-       return true;
 }
 
 /**
index 3ab34c4..8799fa7 100644 (file)
@@ -2543,8 +2543,7 @@ static struct request *blk_mq_get_new_requests(struct request_queue *q,
        return NULL;
 }
 
-static inline bool blk_mq_can_use_cached_rq(struct request *rq,
-               struct bio *bio)
+static inline bool blk_mq_can_use_cached_rq(struct request *rq, struct bio *bio)
 {
        if (blk_mq_get_hctx_type(bio->bi_opf) != rq->mq_hctx->type)
                return false;
@@ -2565,7 +2564,6 @@ static inline struct request *blk_mq_get_request(struct request_queue *q,
        bool checked = false;
 
        if (plug) {
-
                rq = rq_list_peek(&plug->cached_rq);
                if (rq && rq->q == q) {
                        if (unlikely(!submit_bio_checks(bio)))
@@ -2587,12 +2585,14 @@ static inline struct request *blk_mq_get_request(struct request_queue *q,
 fallback:
        if (unlikely(bio_queue_enter(bio)))
                return NULL;
-       if (!checked && !submit_bio_checks(bio))
-               return NULL;
+       if (unlikely(!checked && !submit_bio_checks(bio)))
+               goto out_put;
        rq = blk_mq_get_new_requests(q, plug, bio, nsegs, same_queue_rq);
-       if (!rq)
-               blk_queue_exit(q);
-       return rq;
+       if (rq)
+               return rq;
+out_put:
+       blk_queue_exit(q);
+       return NULL;
 }
 
 /**
@@ -2647,8 +2647,10 @@ void blk_mq_submit_bio(struct bio *bio)
                return;
        }
 
-       if (op_is_flush(bio->bi_opf) && blk_insert_flush(rq))
+       if (op_is_flush(bio->bi_opf)) {
+               blk_insert_flush(rq);
                return;
+       }
 
        if (plug && (q->nr_hw_queues == 1 ||
            blk_mq_is_shared_tags(rq->mq_hctx->flags) ||
@@ -4417,6 +4419,19 @@ unsigned int blk_mq_rq_cpu(struct request *rq)
 }
 EXPORT_SYMBOL(blk_mq_rq_cpu);
 
+void blk_mq_cancel_work_sync(struct request_queue *q)
+{
+       if (queue_is_mq(q)) {
+               struct blk_mq_hw_ctx *hctx;
+               int i;
+
+               cancel_delayed_work_sync(&q->requeue_work);
+
+               queue_for_each_hw_ctx(q, hctx, i)
+                       cancel_delayed_work_sync(&hctx->run_work);
+       }
+}
+
 static int __init blk_mq_init(void)
 {
        int i;
index 8acfa65..afcf993 100644 (file)
@@ -128,6 +128,8 @@ extern void blk_mq_hctx_kobj_init(struct blk_mq_hw_ctx *hctx);
 void blk_mq_free_plug_rqs(struct blk_plug *plug);
 void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule);
 
+void blk_mq_cancel_work_sync(struct request_queue *q);
+
 void blk_mq_release(struct request_queue *q);
 
 static inline struct blk_mq_ctx *__blk_mq_get_ctx(struct request_queue *q,
index cef1f71..cd75b0f 100644 (file)
@@ -791,16 +791,6 @@ static void blk_release_queue(struct kobject *kobj)
 
        blk_free_queue_stats(q->stats);
 
-       if (queue_is_mq(q)) {
-               struct blk_mq_hw_ctx *hctx;
-               int i;
-
-               cancel_delayed_work_sync(&q->requeue_work);
-
-               queue_for_each_hw_ctx(q, hctx, i)
-                       cancel_delayed_work_sync(&hctx->run_work);
-       }
-
        blk_exit_queue(q);
 
        blk_queue_free_zone_bitmaps(q);
index b4fed20..ccde6e6 100644 (file)
@@ -271,7 +271,7 @@ void __blk_account_io_done(struct request *req, u64 now);
  */
 #define ELV_ON_HASH(rq) ((rq)->rq_flags & RQF_HASHED)
 
-bool blk_insert_flush(struct request *rq);
+void blk_insert_flush(struct request *rq);
 
 int elevator_switch_mq(struct request_queue *q,
                              struct elevator_type *new_e);
index 1f39f6e..19a78d5 100644 (file)
@@ -694,12 +694,18 @@ void elevator_init_mq(struct request_queue *q)
        if (!e)
                return;
 
+       /*
+        * We are called before adding disk, when there isn't any FS I/O,
+        * so freezing queue plus canceling dispatch work is enough to
+        * drain any dispatch activities originated from passthrough
+        * requests, then no need to quiesce queue which may add long boot
+        * latency, especially when lots of disks are involved.
+        */
        blk_mq_freeze_queue(q);
-       blk_mq_quiesce_queue(q);
+       blk_mq_cancel_work_sync(q);
 
        err = blk_mq_init_sched(q, e);
 
-       blk_mq_unquiesce_queue(q);
        blk_mq_unfreeze_queue(q);
 
        if (err) {
index c5392cc..30362ae 100644 (file)
@@ -1111,6 +1111,8 @@ static void disk_release(struct device *dev)
        might_sleep();
        WARN_ON_ONCE(disk_live(disk));
 
+       blk_mq_cancel_work_sync(disk->queue);
+
        disk_release_events(disk);
        kfree(disk->random);
        xa_destroy(&disk->part_tbl);
index 0e4ff24..313c14a 100644 (file)
@@ -69,7 +69,14 @@ int ioprio_check_cap(int ioprio)
 
        switch (class) {
                case IOPRIO_CLASS_RT:
-                       if (!capable(CAP_SYS_NICE) && !capable(CAP_SYS_ADMIN))
+                       /*
+                        * Originally this only checked for CAP_SYS_ADMIN,
+                        * which was implicitly allowed for pid 0 by security
+                        * modules such as SELinux. Make sure we check
+                        * CAP_SYS_ADMIN first to avoid a denial/avc for
+                        * possibly missing CAP_SYS_NICE permission.
+                        */
+                       if (!capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_NICE))
                                return -EPERM;
                        fallthrough;
                        /* rt has prio field too */
index 7cd0009..ef10480 100644 (file)
@@ -347,28 +347,3 @@ void acpi_device_notify_remove(struct device *dev)
 
        acpi_unbind_one(dev);
 }
-
-int acpi_dev_turn_off_if_unused(struct device *dev, void *not_used)
-{
-       struct acpi_device *adev = to_acpi_device(dev);
-
-       /*
-        * Skip device objects with device IDs, because they may be in use even
-        * if they are not companions of any physical device objects.
-        */
-       if (adev->pnp.type.hardware_id)
-               return 0;
-
-       mutex_lock(&adev->physical_node_lock);
-
-       /*
-        * Device objects without device IDs are not in use if they have no
-        * corresponding physical device objects.
-        */
-       if (list_empty(&adev->physical_node_list))
-               acpi_device_set_power(adev, ACPI_STATE_D3_COLD);
-
-       mutex_unlock(&adev->physical_node_lock);
-
-       return 0;
-}
index 8fbdc17..d91b560 100644 (file)
@@ -117,7 +117,6 @@ bool acpi_device_is_battery(struct acpi_device *adev);
 bool acpi_device_is_first_physical_node(struct acpi_device *adev,
                                        const struct device *dev);
 int acpi_bus_register_early_device(int type);
-int acpi_dev_turn_off_if_unused(struct device *dev, void *not_used);
 
 /* --------------------------------------------------------------------------
                      Device Matching and Notification
index a50f196..2c80765 100644 (file)
@@ -2564,12 +2564,6 @@ int __init acpi_scan_init(void)
                }
        }
 
-       /*
-        * Make sure that power management resources are not blocked by ACPI
-        * device objects with no users.
-        */
-       bus_for_each_dev(&acpi_bus_type, NULL, NULL, acpi_dev_turn_off_if_unused);
-
        acpi_turn_off_unused_power_resources();
 
        acpi_scan_initialized = true;
index d60f347..1e1167e 100644 (file)
@@ -438,6 +438,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
        /* AMD */
        { PCI_VDEVICE(AMD, 0x7800), board_ahci }, /* AMD Hudson-2 */
        { PCI_VDEVICE(AMD, 0x7900), board_ahci }, /* AMD CZ */
+       { PCI_VDEVICE(AMD, 0x7901), board_ahci_mobile }, /* AMD Green Sardine */
        /* AMD is using RAID class only for ahci controllers */
        { PCI_VENDOR_ID_AMD, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
          PCI_CLASS_STORAGE_RAID << 8, 0xffffff, board_ahci },
index 8a6835b..f76b841 100644 (file)
@@ -2323,6 +2323,18 @@ int ahci_port_resume(struct ata_port *ap)
 EXPORT_SYMBOL_GPL(ahci_port_resume);
 
 #ifdef CONFIG_PM
+static void ahci_handle_s2idle(struct ata_port *ap)
+{
+       void __iomem *port_mmio = ahci_port_base(ap);
+       u32 devslp;
+
+       if (pm_suspend_via_firmware())
+               return;
+       devslp = readl(port_mmio + PORT_DEVSLP);
+       if ((devslp & PORT_DEVSLP_ADSE))
+               ata_msleep(ap, devslp_idle_timeout);
+}
+
 static int ahci_port_suspend(struct ata_port *ap, pm_message_t mesg)
 {
        const char *emsg = NULL;
@@ -2336,6 +2348,9 @@ static int ahci_port_suspend(struct ata_port *ap, pm_message_t mesg)
                ata_port_freeze(ap);
        }
 
+       if (acpi_storage_d3(ap->host->dev))
+               ahci_handle_s2idle(ap);
+
        ahci_rpm_put_port(ap);
        return rc;
 }
index 8a0ccb1..59ad8c9 100644 (file)
@@ -2031,8 +2031,9 @@ retry:
                        dev->horkage |= ATA_HORKAGE_NO_DMA_LOG;
                        goto retry;
                }
-               ata_dev_err(dev, "Read log page 0x%02x failed, Emask 0x%x\n",
-                           (unsigned int)page, err_mask);
+               ata_dev_err(dev,
+                           "Read log 0x%02x page 0x%02x failed, Emask 0x%x\n",
+                           (unsigned int)log, (unsigned int)page, err_mask);
        }
 
        return err_mask;
@@ -2177,6 +2178,9 @@ static void ata_dev_config_ncq_prio(struct ata_device *dev)
        struct ata_port *ap = dev->link->ap;
        unsigned int err_mask;
 
+       if (!ata_identify_page_supported(dev, ATA_LOG_SATA_SETTINGS))
+               return;
+
        err_mask = ata_read_log_page(dev,
                                     ATA_LOG_IDENTIFY_DEVICE,
                                     ATA_LOG_SATA_SETTINGS,
@@ -2453,7 +2457,8 @@ static void ata_dev_config_devslp(struct ata_device *dev)
         * Check device sleep capability. Get DevSlp timing variables
         * from SATA Settings page of Identify Device Data Log.
         */
-       if (!ata_id_has_devslp(dev->id))
+       if (!ata_id_has_devslp(dev->id) ||
+           !ata_identify_page_supported(dev, ATA_LOG_SATA_SETTINGS))
                return;
 
        err_mask = ata_read_log_page(dev,
index 4e88597..5b78e86 100644 (file)
@@ -922,7 +922,7 @@ DEVICE_ATTR(ncq_prio_enable, S_IRUGO | S_IWUSR,
            ata_ncq_prio_enable_show, ata_ncq_prio_enable_store);
 EXPORT_SYMBOL_GPL(dev_attr_ncq_prio_enable);
 
-struct attribute *ata_ncq_sdev_attrs[] = {
+static struct attribute *ata_ncq_sdev_attrs[] = {
        &dev_attr_unload_heads.attr,
        &dev_attr_ncq_prio_enable.attr,
        &dev_attr_ncq_prio_supported.attr,
index 54d1f96..a8c11c0 100644 (file)
@@ -51,8 +51,6 @@
 
 #define CLK_USB_OHCI1_12M              92
 
-#define CLK_DRAM                       94
-
 /* All the DRAM gates are exported */
 
 /* And the DSI and GPU module clock is exported */
index d8c3844..e13f3c4 100644 (file)
@@ -42,8 +42,6 @@
 
 /* The first bunch of module clocks are exported */
 
-#define CLK_DRAM               96
-
 /* All the DRAM gates are exported */
 
 /* Some more module clocks are exported */
index 072ed61..60d9374 100644 (file)
@@ -523,6 +523,7 @@ config GPIO_REG
 config GPIO_ROCKCHIP
        tristate "Rockchip GPIO support"
        depends on ARCH_ROCKCHIP || COMPILE_TEST
+       select GENERIC_IRQ_CHIP
        select GPIOLIB_IRQCHIP
        default ARCH_ROCKCHIP
        help
index aeec4bf..84f96b7 100644 (file)
@@ -434,7 +434,7 @@ static void virtio_gpio_event_vq(struct virtqueue *vq)
                ret = generic_handle_domain_irq(vgpio->gc.irq.domain, gpio);
                if (ret)
                        dev_err(dev, "failed to handle interrupt: %d\n", ret);
-       };
+       }
 }
 
 static void virtio_gpio_request_vq(struct virtqueue *vq)
index b9c11c2..0de66f5 100644 (file)
@@ -827,6 +827,7 @@ static int amdgpu_connector_vga_get_modes(struct drm_connector *connector)
 
        amdgpu_connector_get_edid(connector);
        ret = amdgpu_connector_ddc_get_modes(connector);
+       amdgpu_get_native_mode(connector);
 
        return ret;
 }
index 5625f77..188accb 100644 (file)
@@ -3509,6 +3509,9 @@ int amdgpu_device_init(struct amdgpu_device *adev,
                adev->rmmio_size = pci_resource_len(adev->pdev, 2);
        }
 
+       for (i = 0; i < AMD_IP_BLOCK_TYPE_NUM; i++)
+               atomic_set(&adev->pm.pwr_state[i], POWER_STATE_UNKNOWN);
+
        adev->rmmio = ioremap(adev->rmmio_base, adev->rmmio_size);
        if (adev->rmmio == NULL) {
                return -ENOMEM;
index ff70bc2..4e36694 100644 (file)
@@ -587,6 +587,9 @@ static int amdgpu_discovery_set_common_ip_blocks(struct amdgpu_device *adev)
                amdgpu_device_ip_block_add(adev, &nv_common_ip_block);
                break;
        default:
+               dev_err(adev->dev,
+                       "Failed to add common ip block(GC_HWIP:0x%x)\n",
+                       adev->ip_versions[GC_HWIP][0]);
                return -EINVAL;
        }
        return 0;
@@ -619,6 +622,9 @@ static int amdgpu_discovery_set_gmc_ip_blocks(struct amdgpu_device *adev)
                amdgpu_device_ip_block_add(adev, &gmc_v10_0_ip_block);
                break;
        default:
+               dev_err(adev->dev,
+                       "Failed to add gmc ip block(GC_HWIP:0x%x)\n",
+                       adev->ip_versions[GC_HWIP][0]);
                return -EINVAL;
        }
        return 0;
@@ -648,6 +654,9 @@ static int amdgpu_discovery_set_ih_ip_blocks(struct amdgpu_device *adev)
                amdgpu_device_ip_block_add(adev, &navi10_ih_ip_block);
                break;
        default:
+               dev_err(adev->dev,
+                       "Failed to add ih ip block(OSSSYS_HWIP:0x%x)\n",
+                       adev->ip_versions[OSSSYS_HWIP][0]);
                return -EINVAL;
        }
        return 0;
@@ -688,6 +697,9 @@ static int amdgpu_discovery_set_psp_ip_blocks(struct amdgpu_device *adev)
                amdgpu_device_ip_block_add(adev, &psp_v13_0_ip_block);
                break;
        default:
+               dev_err(adev->dev,
+                       "Failed to add psp ip block(MP0_HWIP:0x%x)\n",
+                       adev->ip_versions[MP0_HWIP][0]);
                return -EINVAL;
        }
        return 0;
@@ -726,6 +738,9 @@ static int amdgpu_discovery_set_smu_ip_blocks(struct amdgpu_device *adev)
                amdgpu_device_ip_block_add(adev, &smu_v13_0_ip_block);
                break;
        default:
+               dev_err(adev->dev,
+                       "Failed to add smu ip block(MP1_HWIP:0x%x)\n",
+                       adev->ip_versions[MP1_HWIP][0]);
                return -EINVAL;
        }
        return 0;
@@ -753,6 +768,9 @@ static int amdgpu_discovery_set_display_ip_blocks(struct amdgpu_device *adev)
                        amdgpu_device_ip_block_add(adev, &dm_ip_block);
                        break;
                default:
+                       dev_err(adev->dev,
+                               "Failed to add dm ip block(DCE_HWIP:0x%x)\n",
+                               adev->ip_versions[DCE_HWIP][0]);
                        return -EINVAL;
                }
        } else if (adev->ip_versions[DCI_HWIP][0]) {
@@ -763,6 +781,9 @@ static int amdgpu_discovery_set_display_ip_blocks(struct amdgpu_device *adev)
                        amdgpu_device_ip_block_add(adev, &dm_ip_block);
                        break;
                default:
+                       dev_err(adev->dev,
+                               "Failed to add dm ip block(DCI_HWIP:0x%x)\n",
+                               adev->ip_versions[DCI_HWIP][0]);
                        return -EINVAL;
                }
 #endif
@@ -796,6 +817,9 @@ static int amdgpu_discovery_set_gc_ip_blocks(struct amdgpu_device *adev)
                amdgpu_device_ip_block_add(adev, &gfx_v10_0_ip_block);
                break;
        default:
+               dev_err(adev->dev,
+                       "Failed to add gfx ip block(GC_HWIP:0x%x)\n",
+                       adev->ip_versions[GC_HWIP][0]);
                return -EINVAL;
        }
        return 0;
@@ -829,6 +853,9 @@ static int amdgpu_discovery_set_sdma_ip_blocks(struct amdgpu_device *adev)
                amdgpu_device_ip_block_add(adev, &sdma_v5_2_ip_block);
                break;
        default:
+               dev_err(adev->dev,
+                       "Failed to add sdma ip block(SDMA0_HWIP:0x%x)\n",
+                       adev->ip_versions[SDMA0_HWIP][0]);
                return -EINVAL;
        }
        return 0;
@@ -845,6 +872,9 @@ static int amdgpu_discovery_set_mm_ip_blocks(struct amdgpu_device *adev)
                                amdgpu_device_ip_block_add(adev, &uvd_v7_0_ip_block);
                        break;
                default:
+                       dev_err(adev->dev,
+                               "Failed to add uvd v7 ip block(UVD_HWIP:0x%x)\n",
+                               adev->ip_versions[UVD_HWIP][0]);
                        return -EINVAL;
                }
                switch (adev->ip_versions[VCE_HWIP][0]) {
@@ -855,6 +885,9 @@ static int amdgpu_discovery_set_mm_ip_blocks(struct amdgpu_device *adev)
                                amdgpu_device_ip_block_add(adev, &vce_v4_0_ip_block);
                        break;
                default:
+                       dev_err(adev->dev,
+                               "Failed to add VCE v4 ip block(VCE_HWIP:0x%x)\n",
+                               adev->ip_versions[VCE_HWIP][0]);
                        return -EINVAL;
                }
        } else {
@@ -893,6 +926,9 @@ static int amdgpu_discovery_set_mm_ip_blocks(struct amdgpu_device *adev)
                        amdgpu_device_ip_block_add(adev, &vcn_v3_0_ip_block);
                        break;
                default:
+                       dev_err(adev->dev,
+                               "Failed to add vcn/jpeg ip block(UVD_HWIP:0x%x)\n",
+                               adev->ip_versions[UVD_HWIP][0]);
                        return -EINVAL;
                }
        }
index 0fad2bf..567df2d 100644 (file)
@@ -386,6 +386,7 @@ struct amdgpu_hive_info *amdgpu_get_xgmi_hive(struct amdgpu_device *adev)
                        "%s", "xgmi_hive_info");
        if (ret) {
                dev_err(adev->dev, "XGMI: failed initializing kobject for xgmi hive\n");
+               kobject_put(&hive->kobj);
                kfree(hive);
                hive = NULL;
                goto pro_end;
index 003ba6a..93e33dd 100644 (file)
@@ -1226,6 +1226,11 @@ static int stop_cpsch(struct device_queue_manager *dqm)
        bool hanging;
 
        dqm_lock(dqm);
+       if (!dqm->sched_running) {
+               dqm_unlock(dqm);
+               return 0;
+       }
+
        if (!dqm->is_hws_hang)
                unmap_queues_cpsch(dqm, KFD_UNMAP_QUEUES_FILTER_ALL_QUEUES, 0);
        hanging = dqm->is_hws_hang || dqm->is_resetting;
index c911b30..c27cb47 100644 (file)
@@ -4242,7 +4242,8 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
                } else if (dc_link_detect(link, DETECT_REASON_BOOT)) {
                        amdgpu_dm_update_connector_after_detect(aconnector);
                        register_backlight_device(dm, link);
-
+                       if (dm->num_of_edps)
+                               update_connector_ext_caps(aconnector);
                        if (psr_feature_enabled)
                                amdgpu_dm_set_psr_caps(link);
                }
index f1a46d1..4b9e68a 100644 (file)
@@ -98,7 +98,8 @@ enum amd_ip_block_type {
        AMD_IP_BLOCK_TYPE_ACP,
        AMD_IP_BLOCK_TYPE_VCN,
        AMD_IP_BLOCK_TYPE_MES,
-       AMD_IP_BLOCK_TYPE_JPEG
+       AMD_IP_BLOCK_TYPE_JPEG,
+       AMD_IP_BLOCK_TYPE_NUM,
 };
 
 enum amd_clockgating_state {
index 03581d5..08362d5 100644 (file)
@@ -927,6 +927,13 @@ int amdgpu_dpm_set_powergating_by_smu(struct amdgpu_device *adev, uint32_t block
 {
        int ret = 0;
        const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs;
+       enum ip_power_state pwr_state = gate ? POWER_STATE_OFF : POWER_STATE_ON;
+
+       if (atomic_read(&adev->pm.pwr_state[block_type]) == pwr_state) {
+               dev_dbg(adev->dev, "IP block%d already in the target %s state!",
+                               block_type, gate ? "gate" : "ungate");
+               return 0;
+       }
 
        switch (block_type) {
        case AMD_IP_BLOCK_TYPE_UVD:
@@ -979,6 +986,9 @@ int amdgpu_dpm_set_powergating_by_smu(struct amdgpu_device *adev, uint32_t block
                break;
        }
 
+       if (!ret)
+               atomic_set(&adev->pm.pwr_state[block_type], pwr_state);
+
        return ret;
 }
 
index 98f1b3d..16e3f72 100644 (file)
@@ -417,6 +417,12 @@ struct amdgpu_dpm {
        enum amd_dpm_forced_level forced_level;
 };
 
+enum ip_power_state {
+       POWER_STATE_UNKNOWN,
+       POWER_STATE_ON,
+       POWER_STATE_OFF,
+};
+
 struct amdgpu_pm {
        struct mutex            mutex;
        u32                     current_sclk;
@@ -452,6 +458,8 @@ struct amdgpu_pm {
        struct i2c_adapter smu_i2c;
        struct mutex            smu_i2c_mutex;
        struct list_head        pm_attr_list;
+
+       atomic_t                pwr_state[AMD_IP_BLOCK_TYPE_NUM];
 };
 
 #define R600_SSTU_DFLT                               0
index cbc3f99..2238ee1 100644 (file)
@@ -309,6 +309,7 @@ static int cyan_skillfish_print_clk_levels(struct smu_context *smu,
 {
        int ret = 0, size = 0;
        uint32_t cur_value = 0;
+       int i;
 
        smu_cmn_get_sysfs_buf(&buf, &size);
 
@@ -334,8 +335,6 @@ static int cyan_skillfish_print_clk_levels(struct smu_context *smu,
                size += sysfs_emit_at(buf, size, "VDDC: %7umV  %10umV\n",
                                                CYAN_SKILLFISH_VDDC_MIN, CYAN_SKILLFISH_VDDC_MAX);
                break;
-       case SMU_GFXCLK:
-       case SMU_SCLK:
        case SMU_FCLK:
        case SMU_MCLK:
        case SMU_SOCCLK:
@@ -346,6 +345,25 @@ static int cyan_skillfish_print_clk_levels(struct smu_context *smu,
                        return ret;
                size += sysfs_emit_at(buf, size, "0: %uMhz *\n", cur_value);
                break;
+       case SMU_SCLK:
+       case SMU_GFXCLK:
+               ret = cyan_skillfish_get_current_clk_freq(smu, clk_type, &cur_value);
+               if (ret)
+                       return ret;
+               if (cur_value  == CYAN_SKILLFISH_SCLK_MAX)
+                       i = 2;
+               else if (cur_value == CYAN_SKILLFISH_SCLK_MIN)
+                       i = 0;
+               else
+                       i = 1;
+               size += sysfs_emit_at(buf, size, "0: %uMhz %s\n", CYAN_SKILLFISH_SCLK_MIN,
+                               i == 0 ? "*" : "");
+               size += sysfs_emit_at(buf, size, "1: %uMhz %s\n",
+                               i == 1 ? cur_value : cyan_skillfish_sclk_default,
+                               i == 1 ? "*" : "");
+               size += sysfs_emit_at(buf, size, "2: %uMhz %s\n", CYAN_SKILLFISH_SCLK_MAX,
+                               i == 2 ? "*" : "");
+               break;
        default:
                dev_warn(smu->adev->dev, "Unsupported clock type\n");
                return ret;
index 71161f6..60a5570 100644 (file)
@@ -1265,7 +1265,7 @@ static int navi10_print_clk_levels(struct smu_context *smu,
                        enum smu_clk_type clk_type, char *buf)
 {
        uint16_t *curve_settings;
-       int i, size = 0, ret = 0;
+       int i, levels, size = 0, ret = 0;
        uint32_t cur_value = 0, value = 0, count = 0;
        uint32_t freq_values[3] = {0};
        uint32_t mark_index = 0;
@@ -1319,14 +1319,17 @@ static int navi10_print_clk_levels(struct smu_context *smu,
                        freq_values[1] = cur_value;
                        mark_index = cur_value == freq_values[0] ? 0 :
                                     cur_value == freq_values[2] ? 2 : 1;
-                       if (mark_index != 1)
-                               freq_values[1] = (freq_values[0] + freq_values[2]) / 2;
 
-                       for (i = 0; i < 3; i++) {
+                       levels = 3;
+                       if (mark_index != 1) {
+                               levels = 2;
+                               freq_values[1] = freq_values[2];
+                       }
+
+                       for (i = 0; i < levels; i++) {
                                size += sysfs_emit_at(buf, size, "%d: %uMhz %s\n", i, freq_values[i],
                                                i == mark_index ? "*" : "");
                        }
-
                }
                break;
        case SMU_PCIE:
index 421f38e..c02ed65 100644 (file)
@@ -683,6 +683,7 @@ static int vangogh_print_clk_levels(struct smu_context *smu,
        int i, size = 0, ret = 0;
        uint32_t cur_value = 0, value = 0, count = 0;
        bool cur_value_match_level = false;
+       uint32_t min, max;
 
        memset(&metrics, 0, sizeof(metrics));
 
@@ -743,6 +744,13 @@ static int vangogh_print_clk_levels(struct smu_context *smu,
                if (ret)
                        return ret;
                break;
+       case SMU_GFXCLK:
+       case SMU_SCLK:
+               ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_GetGfxclkFrequency, 0, &cur_value);
+               if (ret) {
+                       return ret;
+               }
+               break;
        default:
                break;
        }
@@ -768,6 +776,24 @@ static int vangogh_print_clk_levels(struct smu_context *smu,
                if (!cur_value_match_level)
                        size += sysfs_emit_at(buf, size, "   %uMhz *\n", cur_value);
                break;
+       case SMU_GFXCLK:
+       case SMU_SCLK:
+               min = (smu->gfx_actual_hard_min_freq > 0) ? smu->gfx_actual_hard_min_freq : smu->gfx_default_hard_min_freq;
+               max = (smu->gfx_actual_soft_max_freq > 0) ? smu->gfx_actual_soft_max_freq : smu->gfx_default_soft_max_freq;
+               if (cur_value  == max)
+                       i = 2;
+               else if (cur_value == min)
+                       i = 0;
+               else
+                       i = 1;
+               size += sysfs_emit_at(buf, size, "0: %uMhz %s\n", min,
+                               i == 0 ? "*" : "");
+               size += sysfs_emit_at(buf, size, "1: %uMhz %s\n",
+                               i == 1 ? cur_value : VANGOGH_UMD_PSTATE_STANDARD_GFXCLK,
+                               i == 1 ? "*" : "");
+               size += sysfs_emit_at(buf, size, "2: %uMhz %s\n", max,
+                               i == 2 ? "*" : "");
+               break;
        default:
                break;
        }
index 8215bbf..caf1775 100644 (file)
@@ -697,6 +697,11 @@ static int yellow_carp_get_current_clk_freq(struct smu_context *smu,
        case SMU_FCLK:
                return smu_cmn_send_smc_msg_with_param(smu,
                                SMU_MSG_GetFclkFrequency, 0, value);
+       case SMU_GFXCLK:
+       case SMU_SCLK:
+               return smu_cmn_send_smc_msg_with_param(smu,
+                               SMU_MSG_GetGfxclkFrequency, 0, value);
+               break;
        default:
                return -EINVAL;
        }
@@ -967,6 +972,7 @@ static int yellow_carp_print_clk_levels(struct smu_context *smu,
 {
        int i, size = 0, ret = 0;
        uint32_t cur_value = 0, value = 0, count = 0;
+       uint32_t min, max;
 
        smu_cmn_get_sysfs_buf(&buf, &size);
 
@@ -1005,6 +1011,27 @@ static int yellow_carp_print_clk_levels(struct smu_context *smu,
                                        cur_value == value ? "*" : "");
                }
                break;
+       case SMU_GFXCLK:
+       case SMU_SCLK:
+               ret = yellow_carp_get_current_clk_freq(smu, clk_type, &cur_value);
+               if (ret)
+                       goto print_clk_out;
+               min = (smu->gfx_actual_hard_min_freq > 0) ? smu->gfx_actual_hard_min_freq : smu->gfx_default_hard_min_freq;
+               max = (smu->gfx_actual_soft_max_freq > 0) ? smu->gfx_actual_soft_max_freq : smu->gfx_default_soft_max_freq;
+               if (cur_value  == max)
+                       i = 2;
+               else if (cur_value == min)
+                       i = 0;
+               else
+                       i = 1;
+               size += sysfs_emit_at(buf, size, "0: %uMhz %s\n", min,
+                               i == 0 ? "*" : "");
+               size += sysfs_emit_at(buf, size, "1: %uMhz %s\n",
+                               i == 1 ? cur_value : YELLOW_CARP_UMD_PSTATE_GFXCLK,
+                               i == 1 ? "*" : "");
+               size += sysfs_emit_at(buf, size, "2: %uMhz %s\n", max,
+                               i == 2 ? "*" : "");
+               break;
        default:
                break;
        }
index b3ad835..a9205a8 100644 (file)
@@ -24,5 +24,6 @@
 #define __YELLOW_CARP_PPT_H__
 
 extern void yellow_carp_set_ppt_funcs(struct smu_context *smu);
+#define YELLOW_CARP_UMD_PSTATE_GFXCLK       1100
 
 #endif
index 843d2cb..ea6f50c 100644 (file)
@@ -139,9 +139,13 @@ static void __smu_cmn_reg_print_error(struct smu_context *smu,
        const char *message = smu_get_message_name(smu, msg);
 
        switch (reg_c2pmsg_90) {
-       case SMU_RESP_NONE:
+       case SMU_RESP_NONE: {
+               u32 msg_idx = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_66);
+               u32 prm     = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_82);
                dev_err_ratelimited(adev->dev,
-                                   "SMU: I'm not done with your previous command!");
+                                   "SMU: I'm not done with your previous command: SMN_C2PMSG_66:0x%08X SMN_C2PMSG_82:0x%08X",
+                                   msg_idx, prm);
+       }
                break;
        case SMU_RESP_OK:
                /* The SMU executed the command. It completed with a
index d533881..9d05674 100644 (file)
@@ -210,8 +210,13 @@ void drm_gem_cma_free_object(struct drm_gem_object *gem_obj)
                        dma_buf_vunmap(gem_obj->import_attach->dmabuf, &map);
                drm_prime_gem_destroy(gem_obj, cma_obj->sgt);
        } else if (cma_obj->vaddr) {
-               dma_free_wc(gem_obj->dev->dev, cma_obj->base.size,
-                           cma_obj->vaddr, cma_obj->paddr);
+               if (cma_obj->map_noncoherent)
+                       dma_free_noncoherent(gem_obj->dev->dev, cma_obj->base.size,
+                                            cma_obj->vaddr, cma_obj->paddr,
+                                            DMA_TO_DEVICE);
+               else
+                       dma_free_wc(gem_obj->dev->dev, cma_obj->base.size,
+                                   cma_obj->vaddr, cma_obj->paddr);
        }
 
        drm_gem_object_release(gem_obj);
index 168c84a..71fbdcd 100644 (file)
@@ -696,10 +696,7 @@ static void gen11_dsi_map_pll(struct intel_encoder *encoder,
        intel_de_write(dev_priv, ICL_DPCLKA_CFGCR0, val);
 
        for_each_dsi_phy(phy, intel_dsi->phys) {
-               if (DISPLAY_VER(dev_priv) >= 12)
-                       val |= ICL_DPCLKA_CFGCR0_DDI_CLK_OFF(phy);
-               else
-                       val &= ~ICL_DPCLKA_CFGCR0_DDI_CLK_OFF(phy);
+               val &= ~ICL_DPCLKA_CFGCR0_DDI_CLK_OFF(phy);
        }
        intel_de_write(dev_priv, ICL_DPCLKA_CFGCR0, val);
 
@@ -1135,8 +1132,6 @@ static void
 gen11_dsi_enable_port_and_phy(struct intel_encoder *encoder,
                              const struct intel_crtc_state *crtc_state)
 {
-       struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
-
        /* step 4a: power up all lanes of the DDI used by DSI */
        gen11_dsi_power_up_lanes(encoder);
 
@@ -1162,8 +1157,7 @@ gen11_dsi_enable_port_and_phy(struct intel_encoder *encoder,
        gen11_dsi_configure_transcoder(encoder, crtc_state);
 
        /* Step 4l: Gate DDI clocks */
-       if (DISPLAY_VER(dev_priv) == 11)
-               gen11_dsi_gate_clocks(encoder);
+       gen11_dsi_gate_clocks(encoder);
 }
 
 static void gen11_dsi_powerup_panel(struct intel_encoder *encoder)
@@ -1271,7 +1265,8 @@ static void adlp_set_lp_hs_wakeup_gb(struct intel_encoder *encoder)
        if (DISPLAY_VER(i915) == 13) {
                for_each_dsi_port(port, intel_dsi->ports)
                        intel_de_rmw(i915, TGL_DSI_CHKN_REG(port),
-                                    TGL_DSI_CHKN_LSHS_GB, 0x4);
+                                    TGL_DSI_CHKN_LSHS_GB_MASK,
+                                    TGL_DSI_CHKN_LSHS_GB(4));
        }
 }
 
index 38b47e7..c48557d 100644 (file)
@@ -3080,8 +3080,8 @@ guc_create_parallel(struct intel_engine_cs **engines,
 
                ce = intel_engine_create_virtual(siblings, num_siblings,
                                                 FORCE_VIRTUAL);
-               if (!ce) {
-                       err = ERR_PTR(-ENOMEM);
+               if (IS_ERR(ce)) {
+                       err = ERR_CAST(ce);
                        goto unwind;
                }
 
index da9055c..bcee121 100644 (file)
@@ -11717,7 +11717,9 @@ enum skl_power_gate {
 #define TGL_DSI_CHKN_REG(port)         _MMIO_PORT(port,        \
                                                    _TGL_DSI_CHKN_REG_0, \
                                                    _TGL_DSI_CHKN_REG_1)
-#define TGL_DSI_CHKN_LSHS_GB                   REG_GENMASK(15, 12)
+#define TGL_DSI_CHKN_LSHS_GB_MASK              REG_GENMASK(15, 12)
+#define TGL_DSI_CHKN_LSHS_GB(byte_clocks)      REG_FIELD_PREP(TGL_DSI_CHKN_LSHS_GB_MASK, \
+                                                              (byte_clocks))
 
 /* Display Stream Splitter Control */
 #define DSS_CTL1                               _MMIO(0x67400)
index 6e3c450..3ff4934 100644 (file)
@@ -62,7 +62,6 @@ gv100_hdmi_ctrl(struct nvkm_ior *ior, int head, bool enable, u8 max_ac_packet,
                nvkm_wr32(device, 0x6f0108 + hdmi, vendor_infoframe.header);
                nvkm_wr32(device, 0x6f010c + hdmi, vendor_infoframe.subpack0_low);
                nvkm_wr32(device, 0x6f0110 + hdmi, vendor_infoframe.subpack0_high);
-               nvkm_wr32(device, 0x6f0110 + hdmi, 0x00000000);
                nvkm_wr32(device, 0x6f0114 + hdmi, 0x00000000);
                nvkm_wr32(device, 0x6f0118 + hdmi, 0x00000000);
                nvkm_wr32(device, 0x6f011c + hdmi, 0x00000000);
index 5bc5f77..f91fb31 100644 (file)
@@ -704,9 +704,13 @@ int drm_sched_job_add_implicit_dependencies(struct drm_sched_job *job,
        int ret;
 
        dma_resv_for_each_fence(&cursor, obj->resv, write, fence) {
+               /* Make sure to grab an additional ref on the added fence */
+               dma_fence_get(fence);
                ret = drm_sched_job_add_dependency(job, fence);
-               if (ret)
+               if (ret) {
+                       dma_fence_put(fence);
                        return ret;
+               }
        }
        return 0;
 }
index 5755f04..8c796de 100644 (file)
@@ -46,6 +46,7 @@ config DRM_SUN6I_DSI
        default MACH_SUN8I
        select CRC_CCITT
        select DRM_MIPI_DSI
+       select RESET_CONTROLLER
        select PHY_SUN6I_MIPI_DPHY
        help
          Choose this option if you want have an Allwinner SoC with
index 7f11ea0..ca873a3 100644 (file)
@@ -480,7 +480,7 @@ module_param(pressure_report_delay, uint, (S_IRUGO | S_IWUSR));
 MODULE_PARM_DESC(pressure_report_delay, "Delay in secs in reporting pressure");
 static atomic_t trans_id = ATOMIC_INIT(0);
 
-static int dm_ring_size = 20 * 1024;
+static int dm_ring_size = VMBUS_RING_SIZE(16 * 1024);
 
 /*
  * Driver specific state.
index fedc0fa..f5aacaf 100644 (file)
@@ -1906,7 +1906,8 @@ static int nldev_stat_set_mode_doit(struct sk_buff *msg,
        int ret;
 
        /* Currently only counter for QP is supported */
-       if (nla_get_u32(tb[RDMA_NLDEV_ATTR_STAT_RES]) != RDMA_NLDEV_ATTR_RES_QP)
+       if (!tb[RDMA_NLDEV_ATTR_STAT_RES] ||
+           nla_get_u32(tb[RDMA_NLDEV_ATTR_STAT_RES]) != RDMA_NLDEV_ATTR_RES_QP)
                return -EINVAL;
 
        mode = nla_get_u32(tb[RDMA_NLDEV_ATTR_STAT_MODE]);
index 692d5ff..c18634b 100644 (file)
@@ -1232,6 +1232,9 @@ static struct ib_qp *create_qp(struct ib_device *dev, struct ib_pd *pd,
        INIT_LIST_HEAD(&qp->rdma_mrs);
        INIT_LIST_HEAD(&qp->sig_mrs);
 
+       qp->send_cq = attr->send_cq;
+       qp->recv_cq = attr->recv_cq;
+
        rdma_restrack_new(&qp->res, RDMA_RESTRACK_QP);
        WARN_ONCE(!udata && !caller, "Missing kernel QP owner");
        rdma_restrack_set_name(&qp->res, udata ? NULL : caller);
index ed9fa0d..dc9211f 100644 (file)
@@ -1628,8 +1628,7 @@ static int init_cntr_names(const char *names_in, const size_t names_len,
                        n++;
 
        names_out =
-               kmalloc((n + num_extra_names) * sizeof(struct rdma_stat_desc) +
-                               names_len,
+               kzalloc((n + num_extra_names) * sizeof(*q) + names_len,
                        GFP_KERNEL);
        if (!names_out) {
                *num_cntrs = 0;
@@ -1637,7 +1636,7 @@ static int init_cntr_names(const char *names_in, const size_t names_len,
                return -ENOMEM;
        }
 
-       p = names_out + (n + num_extra_names) * sizeof(struct rdma_stat_desc);
+       p = names_out + (n + num_extra_names) * sizeof(*q);
        memcpy(p, names_in, names_len);
 
        q = (struct rdma_stat_desc *)names_out;
index ceca059..0d2fa33 100644 (file)
@@ -2215,6 +2215,11 @@ static const struct ib_device_ops mlx4_ib_hw_stats_ops = {
        .get_hw_stats = mlx4_ib_get_hw_stats,
 };
 
+static const struct ib_device_ops mlx4_ib_hw_stats_ops1 = {
+       .alloc_hw_device_stats = mlx4_ib_alloc_hw_device_stats,
+       .get_hw_stats = mlx4_ib_get_hw_stats,
+};
+
 static int mlx4_ib_alloc_diag_counters(struct mlx4_ib_dev *ibdev)
 {
        struct mlx4_ib_diag_counters *diag = ibdev->diag_counters;
@@ -2227,9 +2232,16 @@ static int mlx4_ib_alloc_diag_counters(struct mlx4_ib_dev *ibdev)
                return 0;
 
        for (i = 0; i < MLX4_DIAG_COUNTERS_TYPES; i++) {
-               /* i == 1 means we are building port counters */
-               if (i && !per_port)
-                       continue;
+               /*
+                * i == 1 means we are building port counters, set a different
+                * stats ops without port stats callback.
+                */
+               if (i && !per_port) {
+                       ib_set_device_ops(&ibdev->ib_dev,
+                                         &mlx4_ib_hw_stats_ops1);
+
+                       return 0;
+               }
 
                ret = __mlx4_ib_alloc_diag_counters(ibdev, &diag[i].descs,
                                                    &diag[i].offset,
index 47a04c3..b732ee9 100644 (file)
@@ -3286,7 +3286,7 @@ static void __exit amt_fini(void)
 {
        rtnl_link_unregister(&amt_link_ops);
        unregister_netdevice_notifier(&amt_notifier_block);
-       cancel_delayed_work(&source_gc_wq);
+       cancel_delayed_work_sync(&source_gc_wq);
        __amt_source_gc_work();
        destroy_workqueue(amt_wq);
 }
index fc0e660..3f1704c 100644 (file)
@@ -559,6 +559,11 @@ int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self,
                        goto err_exit;
 
                if (fw.len == 0xFFFFU) {
+                       if (sw.len > sizeof(self->rpc)) {
+                               printk(KERN_INFO "Invalid sw len: %x\n", sw.len);
+                               err = -EINVAL;
+                               goto err_exit;
+                       }
                        err = hw_atl_utils_fw_rpc_call(self, sw.len);
                        if (err < 0)
                                goto err_exit;
@@ -567,6 +572,11 @@ int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self,
 
        if (rpc) {
                if (fw.len) {
+                       if (fw.len > sizeof(self->rpc)) {
+                               printk(KERN_INFO "Invalid fw len: %x\n", fw.len);
+                               err = -EINVAL;
+                               goto err_exit;
+                       }
                        err =
                        hw_atl_utils_fw_downld_dwords(self,
                                                      self->rpc_addr,
index 80263c3..4a83c99 100644 (file)
@@ -127,9 +127,9 @@ struct ax88796c_device {
                #define AX_PRIV_FLAGS_MASK      (AX_CAP_COMP)
 
        unsigned long           flags;
-               #define EVENT_INTR              BIT(0)
-               #define EVENT_TX                BIT(1)
-               #define EVENT_SET_MULTI         BIT(2)
+               #define EVENT_INTR              0
+               #define EVENT_TX                1
+               #define EVENT_SET_MULTI         2
 
 };
 
index 1835d2e..fc7fce6 100644 (file)
@@ -635,11 +635,13 @@ static int bnx2x_ilt_client_mem_op(struct bnx2x *bp, int cli_num,
 {
        int i, rc;
        struct bnx2x_ilt *ilt = BP_ILT(bp);
-       struct ilt_client_info *ilt_cli = &ilt->clients[cli_num];
+       struct ilt_client_info *ilt_cli;
 
        if (!ilt || !ilt->lines)
                return -1;
 
+       ilt_cli = &ilt->clients[cli_num];
+
        if (ilt_cli->flags & (ILT_CLIENT_SKIP_INIT | ILT_CLIENT_SKIP_MEM))
                return 0;
 
index d0d5da9..4c9507d 100644 (file)
@@ -2258,6 +2258,16 @@ static inline void bnxt_db_write(struct bnxt *bp, struct bnxt_db_info *db,
        }
 }
 
+/* Must hold rtnl_lock */
+static inline bool bnxt_sriov_cfg(struct bnxt *bp)
+{
+#if defined(CONFIG_BNXT_SRIOV)
+       return BNXT_PF(bp) && (bp->pf.active_vfs || bp->sriov_cfg);
+#else
+       return false;
+#endif
+}
+
 extern const u16 bnxt_lhint_arr[];
 
 int bnxt_alloc_rx_data(struct bnxt *bp, struct bnxt_rx_ring_info *rxr,
index 5c464ea..951c4c5 100644 (file)
@@ -360,7 +360,7 @@ bnxt_dl_livepatch_report_err(struct bnxt *bp, struct netlink_ext_ack *extack,
                NL_SET_ERR_MSG_MOD(extack, "Live patch already applied");
                break;
        default:
-               netdev_err(bp->dev, "Unexpected live patch error: %hhd\n", err);
+               netdev_err(bp->dev, "Unexpected live patch error: %d\n", err);
                NL_SET_ERR_MSG_MOD(extack, "Failed to activate live patch");
                break;
        }
@@ -441,12 +441,13 @@ static int bnxt_dl_reload_down(struct devlink *dl, bool netns_change,
 
        switch (action) {
        case DEVLINK_RELOAD_ACTION_DRIVER_REINIT: {
-               if (BNXT_PF(bp) && bp->pf.active_vfs) {
+               rtnl_lock();
+               if (bnxt_sriov_cfg(bp)) {
                        NL_SET_ERR_MSG_MOD(extack,
-                                          "reload is unsupported when VFs are allocated");
+                                          "reload is unsupported while VFs are allocated or being configured");
+                       rtnl_unlock();
                        return -EOPNOTSUPP;
                }
-               rtnl_lock();
                if (bp->dev->reg_state == NETREG_UNREGISTERED) {
                        rtnl_unlock();
                        return -ENODEV;
index e6a4a76..1471b61 100644 (file)
@@ -1868,7 +1868,7 @@ static int bnxt_tc_setup_indr_block_cb(enum tc_setup_type type,
        struct flow_cls_offload *flower = type_data;
        struct bnxt *bp = priv->bp;
 
-       if (flower->common.chain_index)
+       if (!tc_cls_can_offload_and_chain0(bp->dev, type_data))
                return -EOPNOTSUPP;
 
        switch (type) {
index 13121c4..71730ef 100644 (file)
@@ -4709,6 +4709,10 @@ type3_infoblock(struct net_device *dev, u_char count, u_char *p)
         lp->ibn = 3;
         lp->active = *p++;
        if (MOTO_SROM_BUG) lp->active = 0;
+       /* if (MOTO_SROM_BUG) statement indicates lp->active could
+        * be 8 (i.e. the size of array lp->phy) */
+       if (WARN_ON(lp->active >= ARRAY_SIZE(lp->phy)))
+               return -EINVAL;
        lp->phy[lp->active].gep = (*p ? p : NULL); p += (2 * (*p) + 1);
        lp->phy[lp->active].rst = (*p ? p : NULL); p += (2 * (*p) + 1);
        lp->phy[lp->active].mc  = get_unaligned_le16(p); p += 2;
@@ -5000,19 +5004,23 @@ mii_get_phy(struct net_device *dev)
        }
        if ((j == limit) && (i < DE4X5_MAX_MII)) {
            for (k=0; k < DE4X5_MAX_PHY && lp->phy[k].id; k++);
-           lp->phy[k].addr = i;
-           lp->phy[k].id = id;
-           lp->phy[k].spd.reg = GENERIC_REG;      /* ANLPA register         */
-           lp->phy[k].spd.mask = GENERIC_MASK;    /* 100Mb/s technologies   */
-           lp->phy[k].spd.value = GENERIC_VALUE;  /* TX & T4, H/F Duplex    */
-           lp->mii_cnt++;
-           lp->active++;
-           printk("%s: Using generic MII device control. If the board doesn't operate,\nplease mail the following dump to the author:\n", dev->name);
-           j = de4x5_debug;
-           de4x5_debug |= DEBUG_MII;
-           de4x5_dbg_mii(dev, k);
-           de4x5_debug = j;
-           printk("\n");
+           if (k < DE4X5_MAX_PHY) {
+               lp->phy[k].addr = i;
+               lp->phy[k].id = id;
+               lp->phy[k].spd.reg = GENERIC_REG;      /* ANLPA register         */
+               lp->phy[k].spd.mask = GENERIC_MASK;    /* 100Mb/s technologies   */
+               lp->phy[k].spd.value = GENERIC_VALUE;  /* TX & T4, H/F Duplex    */
+               lp->mii_cnt++;
+               lp->active++;
+               printk("%s: Using generic MII device control. If the board doesn't operate,\nplease mail the following dump to the author:\n", dev->name);
+               j = de4x5_debug;
+               de4x5_debug |= DEBUG_MII;
+               de4x5_dbg_mii(dev, k);
+               de4x5_debug = j;
+               printk("\n");
+           } else {
+               goto purgatory;
+           }
        }
     }
   purgatory:
index 714e961..6451c83 100644 (file)
@@ -4550,10 +4550,10 @@ static int dpaa2_eth_remove(struct fsl_mc_device *ls_dev)
 
        fsl_mc_portal_free(priv->mc_io);
 
-       free_netdev(net_dev);
-
        dev_dbg(net_dev->dev.parent, "Removed interface %s\n", net_dev->name);
 
+       free_netdev(net_dev);
+
        return 0;
 }
 
index 23d9cbf..740850b 100644 (file)
@@ -400,6 +400,10 @@ static void hns_dsaf_ge_srst_by_port(struct dsaf_device *dsaf_dev, u32 port,
                return;
 
        if (!HNS_DSAF_IS_DEBUG(dsaf_dev)) {
+               /* DSAF_MAX_PORT_NUM is 6, but DSAF_GE_NUM is 8.
+                  We need check to prevent array overflow */
+               if (port >= DSAF_MAX_PORT_NUM)
+                       return;
                reg_val_1  = 0x1 << port;
                port_rst_off = dsaf_dev->mac_cb[port]->port_rst_off;
                /* there is difference between V1 and V2 in register.*/
index 5039a25..0bf3d47 100644 (file)
@@ -3003,9 +3003,10 @@ static void __e100_shutdown(struct pci_dev *pdev, bool *enable_wake)
        struct net_device *netdev = pci_get_drvdata(pdev);
        struct nic *nic = netdev_priv(netdev);
 
+       netif_device_detach(netdev);
+
        if (netif_running(netdev))
                e100_down(nic);
-       netif_device_detach(netdev);
 
        if ((nic->flags & wol_magic) | e100_asf(nic)) {
                /* enable reverse auto-negotiation */
@@ -3022,7 +3023,7 @@ static void __e100_shutdown(struct pci_dev *pdev, bool *enable_wake)
                *enable_wake = false;
        }
 
-       pci_clear_master(pdev);
+       pci_disable_device(pdev);
 }
 
 static int __e100_power_off(struct pci_dev *pdev, bool wake)
@@ -3042,8 +3043,6 @@ static int __maybe_unused e100_suspend(struct device *dev_d)
 
        __e100_shutdown(to_pci_dev(dev_d), &wake);
 
-       device_wakeup_disable(dev_d);
-
        return 0;
 }
 
@@ -3051,6 +3050,14 @@ static int __maybe_unused e100_resume(struct device *dev_d)
 {
        struct net_device *netdev = dev_get_drvdata(dev_d);
        struct nic *nic = netdev_priv(netdev);
+       int err;
+
+       err = pci_enable_device(to_pci_dev(dev_d));
+       if (err) {
+               netdev_err(netdev, "Resume cannot enable PCI device, aborting\n");
+               return err;
+       }
+       pci_set_master(to_pci_dev(dev_d));
 
        /* disable reverse auto-negotiation */
        if (nic->phy == phy_82552_v) {
@@ -3062,10 +3069,11 @@ static int __maybe_unused e100_resume(struct device *dev_d)
                           smartspeed & ~(E100_82552_REV_ANEG));
        }
 
-       netif_device_attach(netdev);
        if (netif_running(netdev))
                e100_up(nic);
 
+       netif_device_attach(netdev);
+
        return 0;
 }
 
index 3d528fb..4d939af 100644 (file)
@@ -161,6 +161,7 @@ enum i40e_vsi_state_t {
        __I40E_VSI_OVERFLOW_PROMISC,
        __I40E_VSI_REINIT_REQUESTED,
        __I40E_VSI_DOWN_REQUESTED,
+       __I40E_VSI_RELEASING,
        /* This must be last as it determines the size of the BITMAP */
        __I40E_VSI_STATE_SIZE__,
 };
@@ -1247,6 +1248,7 @@ void i40e_ptp_restore_hw_time(struct i40e_pf *pf);
 void i40e_ptp_init(struct i40e_pf *pf);
 void i40e_ptp_stop(struct i40e_pf *pf);
 int i40e_ptp_alloc_pins(struct i40e_pf *pf);
+int i40e_update_adq_vsi_queues(struct i40e_vsi *vsi, int vsi_offset);
 int i40e_is_vsi_uplink_mode_veb(struct i40e_vsi *vsi);
 i40e_status i40e_get_partition_bw_setting(struct i40e_pf *pf);
 i40e_status i40e_set_partition_bw_setting(struct i40e_pf *pf);
index ba86213..e118cf9 100644 (file)
@@ -1790,6 +1790,7 @@ static void i40e_vsi_setup_queue_map(struct i40e_vsi *vsi,
                                     bool is_add)
 {
        struct i40e_pf *pf = vsi->back;
+       u16 num_tc_qps = 0;
        u16 sections = 0;
        u8 netdev_tc = 0;
        u16 numtc = 1;
@@ -1797,13 +1798,33 @@ static void i40e_vsi_setup_queue_map(struct i40e_vsi *vsi,
        u8 offset;
        u16 qmap;
        int i;
-       u16 num_tc_qps = 0;
 
        sections = I40E_AQ_VSI_PROP_QUEUE_MAP_VALID;
        offset = 0;
+       /* zero out queue mapping, it will get updated on the end of the function */
+       memset(ctxt->info.queue_mapping, 0, sizeof(ctxt->info.queue_mapping));
+
+       if (vsi->type == I40E_VSI_MAIN) {
+               /* This code helps add more queue to the VSI if we have
+                * more cores than RSS can support, the higher cores will
+                * be served by ATR or other filters. Furthermore, the
+                * non-zero req_queue_pairs says that user requested a new
+                * queue count via ethtool's set_channels, so use this
+                * value for queues distribution across traffic classes
+                */
+               if (vsi->req_queue_pairs > 0)
+                       vsi->num_queue_pairs = vsi->req_queue_pairs;
+               else if (pf->flags & I40E_FLAG_MSIX_ENABLED)
+                       vsi->num_queue_pairs = pf->num_lan_msix;
+       }
 
        /* Number of queues per enabled TC */
-       num_tc_qps = vsi->alloc_queue_pairs;
+       if (vsi->type == I40E_VSI_MAIN ||
+           (vsi->type == I40E_VSI_SRIOV && vsi->num_queue_pairs != 0))
+               num_tc_qps = vsi->num_queue_pairs;
+       else
+               num_tc_qps = vsi->alloc_queue_pairs;
+
        if (enabled_tc && (vsi->back->flags & I40E_FLAG_DCB_ENABLED)) {
                /* Find numtc from enabled TC bitmap */
                for (i = 0, numtc = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) {
@@ -1881,15 +1902,11 @@ static void i40e_vsi_setup_queue_map(struct i40e_vsi *vsi,
                }
                ctxt->info.tc_mapping[i] = cpu_to_le16(qmap);
        }
-
-       /* Set actual Tx/Rx queue pairs */
-       vsi->num_queue_pairs = offset;
-       if ((vsi->type == I40E_VSI_MAIN) && (numtc == 1)) {
-               if (vsi->req_queue_pairs > 0)
-                       vsi->num_queue_pairs = vsi->req_queue_pairs;
-               else if (pf->flags & I40E_FLAG_MSIX_ENABLED)
-                       vsi->num_queue_pairs = pf->num_lan_msix;
-       }
+       /* Do not change previously set num_queue_pairs for PFs and VFs*/
+       if ((vsi->type == I40E_VSI_MAIN && numtc != 1) ||
+           (vsi->type == I40E_VSI_SRIOV && vsi->num_queue_pairs == 0) ||
+           (vsi->type != I40E_VSI_MAIN && vsi->type != I40E_VSI_SRIOV))
+               vsi->num_queue_pairs = offset;
 
        /* Scheduler section valid can only be set for ADD VSI */
        if (is_add) {
@@ -2623,7 +2640,8 @@ static void i40e_sync_filters_subtask(struct i40e_pf *pf)
 
        for (v = 0; v < pf->num_alloc_vsi; v++) {
                if (pf->vsi[v] &&
-                   (pf->vsi[v]->flags & I40E_VSI_FLAG_FILTER_CHANGED)) {
+                   (pf->vsi[v]->flags & I40E_VSI_FLAG_FILTER_CHANGED) &&
+                   !test_bit(__I40E_VSI_RELEASING, pf->vsi[v]->state)) {
                        int ret = i40e_sync_vsi_filters(pf->vsi[v]);
 
                        if (ret) {
@@ -5426,6 +5444,58 @@ static void i40e_vsi_update_queue_map(struct i40e_vsi *vsi,
               sizeof(vsi->info.tc_mapping));
 }
 
+/**
+ * i40e_update_adq_vsi_queues - update queue mapping for ADq VSI
+ * @vsi: the VSI being reconfigured
+ * @vsi_offset: offset from main VF VSI
+ */
+int i40e_update_adq_vsi_queues(struct i40e_vsi *vsi, int vsi_offset)
+{
+       struct i40e_vsi_context ctxt = {};
+       struct i40e_pf *pf;
+       struct i40e_hw *hw;
+       int ret;
+
+       if (!vsi)
+               return I40E_ERR_PARAM;
+       pf = vsi->back;
+       hw = &pf->hw;
+
+       ctxt.seid = vsi->seid;
+       ctxt.pf_num = hw->pf_id;
+       ctxt.vf_num = vsi->vf_id + hw->func_caps.vf_base_id + vsi_offset;
+       ctxt.uplink_seid = vsi->uplink_seid;
+       ctxt.connection_type = I40E_AQ_VSI_CONN_TYPE_NORMAL;
+       ctxt.flags = I40E_AQ_VSI_TYPE_VF;
+       ctxt.info = vsi->info;
+
+       i40e_vsi_setup_queue_map(vsi, &ctxt, vsi->tc_config.enabled_tc,
+                                false);
+       if (vsi->reconfig_rss) {
+               vsi->rss_size = min_t(int, pf->alloc_rss_size,
+                                     vsi->num_queue_pairs);
+               ret = i40e_vsi_config_rss(vsi);
+               if (ret) {
+                       dev_info(&pf->pdev->dev, "Failed to reconfig rss for num_queues\n");
+                       return ret;
+               }
+               vsi->reconfig_rss = false;
+       }
+
+       ret = i40e_aq_update_vsi_params(hw, &ctxt, NULL);
+       if (ret) {
+               dev_info(&pf->pdev->dev, "Update vsi config failed, err %s aq_err %s\n",
+                        i40e_stat_str(hw, ret),
+                        i40e_aq_str(hw, hw->aq.asq_last_status));
+               return ret;
+       }
+       /* update the local VSI info with updated queue map */
+       i40e_vsi_update_queue_map(vsi, &ctxt);
+       vsi->info.valid_sections = 0;
+
+       return ret;
+}
+
 /**
  * i40e_vsi_config_tc - Configure VSI Tx Scheduler for given TC map
  * @vsi: VSI to be configured
@@ -5716,24 +5786,6 @@ static void i40e_remove_queue_channels(struct i40e_vsi *vsi)
        INIT_LIST_HEAD(&vsi->ch_list);
 }
 
-/**
- * i40e_is_any_channel - channel exist or not
- * @vsi: ptr to VSI to which channels are associated with
- *
- * Returns true or false if channel(s) exist for associated VSI or not
- **/
-static bool i40e_is_any_channel(struct i40e_vsi *vsi)
-{
-       struct i40e_channel *ch, *ch_tmp;
-
-       list_for_each_entry_safe(ch, ch_tmp, &vsi->ch_list, list) {
-               if (ch->initialized)
-                       return true;
-       }
-
-       return false;
-}
-
 /**
  * i40e_get_max_queues_for_channel
  * @vsi: ptr to VSI to which channels are associated with
@@ -6240,26 +6292,15 @@ int i40e_create_queue_channel(struct i40e_vsi *vsi,
        /* By default we are in VEPA mode, if this is the first VF/VMDq
         * VSI to be added switch to VEB mode.
         */
-       if ((!(pf->flags & I40E_FLAG_VEB_MODE_ENABLED)) ||
-           (!i40e_is_any_channel(vsi))) {
-               if (!is_power_of_2(vsi->tc_config.tc_info[0].qcount)) {
-                       dev_dbg(&pf->pdev->dev,
-                               "Failed to create channel. Override queues (%u) not power of 2\n",
-                               vsi->tc_config.tc_info[0].qcount);
-                       return -EINVAL;
-               }
 
-               if (!(pf->flags & I40E_FLAG_VEB_MODE_ENABLED)) {
-                       pf->flags |= I40E_FLAG_VEB_MODE_ENABLED;
+       if (!(pf->flags & I40E_FLAG_VEB_MODE_ENABLED)) {
+               pf->flags |= I40E_FLAG_VEB_MODE_ENABLED;
 
-                       if (vsi->type == I40E_VSI_MAIN) {
-                               if (pf->flags & I40E_FLAG_TC_MQPRIO)
-                                       i40e_do_reset(pf, I40E_PF_RESET_FLAG,
-                                                     true);
-                               else
-                                       i40e_do_reset_safe(pf,
-                                                          I40E_PF_RESET_FLAG);
-                       }
+               if (vsi->type == I40E_VSI_MAIN) {
+                       if (pf->flags & I40E_FLAG_TC_MQPRIO)
+                               i40e_do_reset(pf, I40E_PF_RESET_FLAG, true);
+                       else
+                               i40e_do_reset_safe(pf, I40E_PF_RESET_FLAG);
                }
                /* now onwards for main VSI, number of queues will be value
                 * of TC0's queue count
@@ -7912,12 +7953,20 @@ config_tc:
                            vsi->seid);
                need_reset = true;
                goto exit;
-       } else {
-               dev_info(&vsi->back->pdev->dev,
-                        "Setup channel (id:%u) utilizing num_queues %d\n",
-                        vsi->seid, vsi->tc_config.tc_info[0].qcount);
+       } else if (enabled_tc &&
+                  (!is_power_of_2(vsi->tc_config.tc_info[0].qcount))) {
+               netdev_info(netdev,
+                           "Failed to create channel. Override queues (%u) not power of 2\n",
+                           vsi->tc_config.tc_info[0].qcount);
+               ret = -EINVAL;
+               need_reset = true;
+               goto exit;
        }
 
+       dev_info(&vsi->back->pdev->dev,
+                "Setup channel (id:%u) utilizing num_queues %d\n",
+                vsi->seid, vsi->tc_config.tc_info[0].qcount);
+
        if (pf->flags & I40E_FLAG_TC_MQPRIO) {
                if (vsi->mqprio_qopt.max_rate[0]) {
                        u64 max_tx_rate = vsi->mqprio_qopt.max_rate[0];
@@ -8482,9 +8531,8 @@ static int i40e_configure_clsflower(struct i40e_vsi *vsi,
                err = i40e_add_del_cloud_filter(vsi, filter, true);
 
        if (err) {
-               dev_err(&pf->pdev->dev,
-                       "Failed to add cloud filter, err %s\n",
-                       i40e_stat_str(&pf->hw, err));
+               dev_err(&pf->pdev->dev, "Failed to add cloud filter, err %d\n",
+                       err);
                goto err;
        }
 
@@ -13771,7 +13819,7 @@ int i40e_vsi_release(struct i40e_vsi *vsi)
                dev_info(&pf->pdev->dev, "Can't remove PF VSI\n");
                return -ENODEV;
        }
-
+       set_bit(__I40E_VSI_RELEASING, vsi->state);
        uplink_seid = vsi->uplink_seid;
        if (vsi->type != I40E_VSI_SRIOV) {
                if (vsi->netdev_registered) {
index 472f56b..80ae264 100644 (file)
@@ -183,17 +183,18 @@ void i40e_vc_notify_vf_reset(struct i40e_vf *vf)
 /***********************misc routines*****************************/
 
 /**
- * i40e_vc_disable_vf
+ * i40e_vc_reset_vf
  * @vf: pointer to the VF info
- *
- * Disable the VF through a SW reset.
+ * @notify_vf: notify vf about reset or not
+ * Reset VF handler.
  **/
-static inline void i40e_vc_disable_vf(struct i40e_vf *vf)
+static void i40e_vc_reset_vf(struct i40e_vf *vf, bool notify_vf)
 {
        struct i40e_pf *pf = vf->pf;
        int i;
 
-       i40e_vc_notify_vf_reset(vf);
+       if (notify_vf)
+               i40e_vc_notify_vf_reset(vf);
 
        /* We want to ensure that an actual reset occurs initiated after this
         * function was called. However, we do not want to wait forever, so
@@ -211,9 +212,14 @@ static inline void i40e_vc_disable_vf(struct i40e_vf *vf)
                usleep_range(10000, 20000);
        }
 
-       dev_warn(&vf->pf->pdev->dev,
-                "Failed to initiate reset for VF %d after 200 milliseconds\n",
-                vf->vf_id);
+       if (notify_vf)
+               dev_warn(&vf->pf->pdev->dev,
+                        "Failed to initiate reset for VF %d after 200 milliseconds\n",
+                        vf->vf_id);
+       else
+               dev_dbg(&vf->pf->pdev->dev,
+                       "Failed to initiate reset for VF %d after 200 milliseconds\n",
+                       vf->vf_id);
 }
 
 /**
@@ -674,14 +680,13 @@ static int i40e_config_vsi_rx_queue(struct i40e_vf *vf, u16 vsi_id,
                                    u16 vsi_queue_id,
                                    struct virtchnl_rxq_info *info)
 {
+       u16 pf_queue_id = i40e_vc_get_pf_queue_id(vf, vsi_id, vsi_queue_id);
        struct i40e_pf *pf = vf->pf;
+       struct i40e_vsi *vsi = pf->vsi[vf->lan_vsi_idx];
        struct i40e_hw *hw = &pf->hw;
        struct i40e_hmc_obj_rxq rx_ctx;
-       u16 pf_queue_id;
        int ret = 0;
 
-       pf_queue_id = i40e_vc_get_pf_queue_id(vf, vsi_id, vsi_queue_id);
-
        /* clear the context structure first */
        memset(&rx_ctx, 0, sizeof(struct i40e_hmc_obj_rxq));
 
@@ -719,6 +724,10 @@ static int i40e_config_vsi_rx_queue(struct i40e_vf *vf, u16 vsi_id,
        }
        rx_ctx.rxmax = info->max_pkt_size;
 
+       /* if port VLAN is configured increase the max packet size */
+       if (vsi->info.pvid)
+               rx_ctx.rxmax += VLAN_HLEN;
+
        /* enable 32bytes desc always */
        rx_ctx.dsize = 1;
 
@@ -2105,20 +2114,6 @@ err:
        return ret;
 }
 
-/**
- * i40e_vc_reset_vf_msg
- * @vf: pointer to the VF info
- *
- * called from the VF to reset itself,
- * unlike other virtchnl messages, PF driver
- * doesn't send the response back to the VF
- **/
-static void i40e_vc_reset_vf_msg(struct i40e_vf *vf)
-{
-       if (test_bit(I40E_VF_STATE_ACTIVE, &vf->vf_states))
-               i40e_reset_vf(vf, false);
-}
-
 /**
  * i40e_vc_config_promiscuous_mode_msg
  * @vf: pointer to the VF info
@@ -2217,11 +2212,12 @@ static int i40e_vc_config_queues_msg(struct i40e_vf *vf, u8 *msg)
        struct virtchnl_vsi_queue_config_info *qci =
            (struct virtchnl_vsi_queue_config_info *)msg;
        struct virtchnl_queue_pair_info *qpi;
-       struct i40e_pf *pf = vf->pf;
        u16 vsi_id, vsi_queue_id = 0;
-       u16 num_qps_all = 0;
+       struct i40e_pf *pf = vf->pf;
        i40e_status aq_ret = 0;
        int i, j = 0, idx = 0;
+       struct i40e_vsi *vsi;
+       u16 num_qps_all = 0;
 
        if (!test_bit(I40E_VF_STATE_ACTIVE, &vf->vf_states)) {
                aq_ret = I40E_ERR_PARAM;
@@ -2310,9 +2306,15 @@ static int i40e_vc_config_queues_msg(struct i40e_vf *vf, u8 *msg)
                pf->vsi[vf->lan_vsi_idx]->num_queue_pairs =
                        qci->num_queue_pairs;
        } else {
-               for (i = 0; i < vf->num_tc; i++)
-                       pf->vsi[vf->ch[i].vsi_idx]->num_queue_pairs =
-                              vf->ch[i].num_qps;
+               for (i = 0; i < vf->num_tc; i++) {
+                       vsi = pf->vsi[vf->ch[i].vsi_idx];
+                       vsi->num_queue_pairs = vf->ch[i].num_qps;
+
+                       if (i40e_update_adq_vsi_queues(vsi, i)) {
+                               aq_ret = I40E_ERR_CONFIG;
+                               goto error_param;
+                       }
+               }
        }
 
 error_param:
@@ -2607,8 +2609,7 @@ static int i40e_vc_request_queues_msg(struct i40e_vf *vf, u8 *msg)
        } else {
                /* successful request */
                vf->num_req_queues = req_pairs;
-               i40e_vc_notify_vf_reset(vf);
-               i40e_reset_vf(vf, false);
+               i40e_vc_reset_vf(vf, true);
                return 0;
        }
 
@@ -3803,8 +3804,7 @@ static int i40e_vc_add_qch_msg(struct i40e_vf *vf, u8 *msg)
        vf->num_req_queues = 0;
 
        /* reset the VF in order to allocate resources */
-       i40e_vc_notify_vf_reset(vf);
-       i40e_reset_vf(vf, false);
+       i40e_vc_reset_vf(vf, true);
 
        return I40E_SUCCESS;
 
@@ -3844,8 +3844,7 @@ static int i40e_vc_del_qch_msg(struct i40e_vf *vf, u8 *msg)
        }
 
        /* reset the VF in order to allocate resources */
-       i40e_vc_notify_vf_reset(vf);
-       i40e_reset_vf(vf, false);
+       i40e_vc_reset_vf(vf, true);
 
        return I40E_SUCCESS;
 
@@ -3907,7 +3906,7 @@ int i40e_vc_process_vf_msg(struct i40e_pf *pf, s16 vf_id, u32 v_opcode,
                i40e_vc_notify_vf_link_state(vf);
                break;
        case VIRTCHNL_OP_RESET_VF:
-               i40e_vc_reset_vf_msg(vf);
+               i40e_vc_reset_vf(vf, false);
                ret = 0;
                break;
        case VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE:
@@ -4161,7 +4160,7 @@ int i40e_ndo_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac)
        /* Force the VF interface down so it has to bring up with new MAC
         * address
         */
-       i40e_vc_disable_vf(vf);
+       i40e_vc_reset_vf(vf, true);
        dev_info(&pf->pdev->dev, "Bring down and up the VF interface to make this change effective.\n");
 
 error_param:
@@ -4169,34 +4168,6 @@ error_param:
        return ret;
 }
 
-/**
- * i40e_vsi_has_vlans - True if VSI has configured VLANs
- * @vsi: pointer to the vsi
- *
- * Check if a VSI has configured any VLANs. False if we have a port VLAN or if
- * we have no configured VLANs. Do not call while holding the
- * mac_filter_hash_lock.
- */
-static bool i40e_vsi_has_vlans(struct i40e_vsi *vsi)
-{
-       bool have_vlans;
-
-       /* If we have a port VLAN, then the VSI cannot have any VLANs
-        * configured, as all MAC/VLAN filters will be assigned to the PVID.
-        */
-       if (vsi->info.pvid)
-               return false;
-
-       /* Since we don't have a PVID, we know that if the device is in VLAN
-        * mode it must be because of a VLAN filter configured on this VSI.
-        */
-       spin_lock_bh(&vsi->mac_filter_hash_lock);
-       have_vlans = i40e_is_vsi_in_vlan(vsi);
-       spin_unlock_bh(&vsi->mac_filter_hash_lock);
-
-       return have_vlans;
-}
-
 /**
  * i40e_ndo_set_vf_port_vlan
  * @netdev: network interface device structure
@@ -4253,19 +4224,9 @@ int i40e_ndo_set_vf_port_vlan(struct net_device *netdev, int vf_id,
                /* duplicate request, so just return success */
                goto error_pvid;
 
-       if (i40e_vsi_has_vlans(vsi)) {
-               dev_err(&pf->pdev->dev,
-                       "VF %d has already configured VLAN filters and the administrator is requesting a port VLAN override.\nPlease unload and reload the VF driver for this change to take effect.\n",
-                       vf_id);
-               /* Administrator Error - knock the VF offline until he does
-                * the right thing by reconfiguring his network correctly
-                * and then reloading the VF driver.
-                */
-               i40e_vc_disable_vf(vf);
-               /* During reset the VF got a new VSI, so refresh the pointer. */
-               vsi = pf->vsi[vf->lan_vsi_idx];
-       }
-
+       i40e_vc_reset_vf(vf, true);
+       /* During reset the VF got a new VSI, so refresh a pointer. */
+       vsi = pf->vsi[vf->lan_vsi_idx];
        /* Locked once because multiple functions below iterate list */
        spin_lock_bh(&vsi->mac_filter_hash_lock);
 
@@ -4641,7 +4602,7 @@ int i40e_ndo_set_vf_trust(struct net_device *netdev, int vf_id, bool setting)
                goto out;
 
        vf->trusted = setting;
-       i40e_vc_disable_vf(vf);
+       i40e_vc_reset_vf(vf, true);
        dev_info(&pf->pdev->dev, "VF %u is now %strusted\n",
                 vf_id, setting ? "" : "un");
 
index e6e7c1d..75635bd 100644 (file)
@@ -39,6 +39,7 @@
 #include "iavf_txrx.h"
 #include "iavf_fdir.h"
 #include "iavf_adv_rss.h"
+#include <linux/bitmap.h>
 
 #define DEFAULT_DEBUG_LEVEL_SHIFT 3
 #define PFX "iavf: "
index 5a359a0..144a776 100644 (file)
@@ -1776,6 +1776,7 @@ static int iavf_set_channels(struct net_device *netdev,
 {
        struct iavf_adapter *adapter = netdev_priv(netdev);
        u32 num_req = ch->combined_count;
+       int i;
 
        if ((adapter->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_ADQ) &&
            adapter->num_tc) {
@@ -1786,7 +1787,7 @@ static int iavf_set_channels(struct net_device *netdev,
        /* All of these should have already been checked by ethtool before this
         * even gets to us, but just to be sure.
         */
-       if (num_req > adapter->vsi_res->num_queue_pairs)
+       if (num_req == 0 || num_req > adapter->vsi_res->num_queue_pairs)
                return -EINVAL;
 
        if (num_req == adapter->num_active_queues)
@@ -1798,6 +1799,20 @@ static int iavf_set_channels(struct net_device *netdev,
        adapter->num_req_queues = num_req;
        adapter->flags |= IAVF_FLAG_REINIT_ITR_NEEDED;
        iavf_schedule_reset(adapter);
+
+       /* wait for the reset is done */
+       for (i = 0; i < IAVF_RESET_WAIT_COMPLETE_COUNT; i++) {
+               msleep(IAVF_RESET_WAIT_MS);
+               if (adapter->flags & IAVF_FLAG_RESET_PENDING)
+                       continue;
+               break;
+       }
+       if (i == IAVF_RESET_WAIT_COMPLETE_COUNT) {
+               adapter->flags &= ~IAVF_FLAG_REINIT_ITR_NEEDED;
+               adapter->num_active_queues = num_req;
+               return -EOPNOTSUPP;
+       }
+
        return 0;
 }
 
@@ -1844,14 +1859,13 @@ static int iavf_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key,
 
        if (hfunc)
                *hfunc = ETH_RSS_HASH_TOP;
-       if (!indir)
-               return 0;
-
-       memcpy(key, adapter->rss_key, adapter->rss_key_size);
+       if (key)
+               memcpy(key, adapter->rss_key, adapter->rss_key_size);
 
-       /* Each 32 bits pointed by 'indir' is stored with a lut entry */
-       for (i = 0; i < adapter->rss_lut_size; i++)
-               indir[i] = (u32)adapter->rss_lut[i];
+       if (indir)
+               /* Each 32 bits pointed by 'indir' is stored with a lut entry */
+               for (i = 0; i < adapter->rss_lut_size; i++)
+                       indir[i] = (u32)adapter->rss_lut[i];
 
        return 0;
 }
index 847d67e..336e6bf 100644 (file)
@@ -696,6 +696,23 @@ static void iavf_del_vlan(struct iavf_adapter *adapter, u16 vlan)
        spin_unlock_bh(&adapter->mac_vlan_list_lock);
 }
 
+/**
+ * iavf_restore_filters
+ * @adapter: board private structure
+ *
+ * Restore existing non MAC filters when VF netdev comes back up
+ **/
+static void iavf_restore_filters(struct iavf_adapter *adapter)
+{
+       /* re-add all VLAN filters */
+       if (VLAN_ALLOWED(adapter)) {
+               u16 vid;
+
+               for_each_set_bit(vid, adapter->vsi.active_vlans, VLAN_N_VID)
+                       iavf_add_vlan(adapter, vid);
+       }
+}
+
 /**
  * iavf_vlan_rx_add_vid - Add a VLAN filter to a device
  * @netdev: network device struct
@@ -709,8 +726,11 @@ static int iavf_vlan_rx_add_vid(struct net_device *netdev,
 
        if (!VLAN_ALLOWED(adapter))
                return -EIO;
+
        if (iavf_add_vlan(adapter, vid) == NULL)
                return -ENOMEM;
+
+       set_bit(vid, adapter->vsi.active_vlans);
        return 0;
 }
 
@@ -725,11 +745,13 @@ static int iavf_vlan_rx_kill_vid(struct net_device *netdev,
 {
        struct iavf_adapter *adapter = netdev_priv(netdev);
 
-       if (VLAN_ALLOWED(adapter)) {
-               iavf_del_vlan(adapter, vid);
-               return 0;
-       }
-       return -EIO;
+       if (!VLAN_ALLOWED(adapter))
+               return -EIO;
+
+       iavf_del_vlan(adapter, vid);
+       clear_bit(vid, adapter->vsi.active_vlans);
+
+       return 0;
 }
 
 /**
@@ -1639,8 +1661,7 @@ static int iavf_process_aq_command(struct iavf_adapter *adapter)
                iavf_set_promiscuous(adapter, FLAG_VF_MULTICAST_PROMISC);
                return 0;
        }
-
-       if ((adapter->aq_required & IAVF_FLAG_AQ_RELEASE_PROMISC) &&
+       if ((adapter->aq_required & IAVF_FLAG_AQ_RELEASE_PROMISC) ||
            (adapter->aq_required & IAVF_FLAG_AQ_RELEASE_ALLMULTI)) {
                iavf_set_promiscuous(adapter, 0);
                return 0;
@@ -2123,8 +2144,8 @@ static void iavf_disable_vf(struct iavf_adapter *adapter)
 
        iavf_free_misc_irq(adapter);
        iavf_reset_interrupt_capability(adapter);
-       iavf_free_queues(adapter);
        iavf_free_q_vectors(adapter);
+       iavf_free_queues(adapter);
        memset(adapter->vf_res, 0, IAVF_VIRTCHNL_VF_RESOURCE_SIZE);
        iavf_shutdown_adminq(&adapter->hw);
        adapter->netdev->flags &= ~IFF_UP;
@@ -2410,7 +2431,7 @@ static void iavf_adminq_task(struct work_struct *work)
 
        /* check for error indications */
        val = rd32(hw, hw->aq.arq.len);
-       if (val == 0xdeadbeef) /* indicates device in reset */
+       if (val == 0xdeadbeef || val == 0xffffffff) /* device in reset */
                goto freedom;
        oldval = val;
        if (val & IAVF_VF_ARQLEN1_ARQVFE_MASK) {
@@ -3095,8 +3116,10 @@ static int iavf_configure_clsflower(struct iavf_adapter *adapter,
                return -ENOMEM;
 
        while (!mutex_trylock(&adapter->crit_lock)) {
-               if (--count == 0)
-                       goto err;
+               if (--count == 0) {
+                       kfree(filter);
+                       return err;
+               }
                udelay(1);
        }
 
@@ -3107,11 +3130,11 @@ static int iavf_configure_clsflower(struct iavf_adapter *adapter,
        /* start out with flow type and eth type IPv4 to begin with */
        filter->f.flow_type = VIRTCHNL_TCP_V4_FLOW;
        err = iavf_parse_cls_flower(adapter, cls_flower, filter);
-       if (err < 0)
+       if (err)
                goto err;
 
        err = iavf_handle_tclass(adapter, tc, filter);
-       if (err < 0)
+       if (err)
                goto err;
 
        /* add filter to the list */
@@ -3308,6 +3331,9 @@ static int iavf_open(struct net_device *netdev)
 
        spin_unlock_bh(&adapter->mac_vlan_list_lock);
 
+       /* Restore VLAN filters that were removed with IFF_DOWN */
+       iavf_restore_filters(adapter);
+
        iavf_configure(adapter);
 
        iavf_up_complete(adapter);
@@ -3503,7 +3529,8 @@ static netdev_features_t iavf_fix_features(struct net_device *netdev,
 {
        struct iavf_adapter *adapter = netdev_priv(netdev);
 
-       if (!(adapter->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN))
+       if (adapter->vf_res &&
+           !(adapter->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN))
                features &= ~(NETIF_F_HW_VLAN_CTAG_TX |
                              NETIF_F_HW_VLAN_CTAG_RX |
                              NETIF_F_HW_VLAN_CTAG_FILTER);
index 6433c90..072391c 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/io.h>
 #include <linux/dma-mapping.h>
 #include <linux/module.h>
+#include <linux/property.h>
 
 #include <asm/checksum.h>
 
@@ -239,6 +240,7 @@ ltq_etop_hw_init(struct net_device *dev)
 {
        struct ltq_etop_priv *priv = netdev_priv(dev);
        int i;
+       int err;
 
        ltq_pmu_enable(PMU_PPE);
 
@@ -273,7 +275,13 @@ ltq_etop_hw_init(struct net_device *dev)
 
                if (IS_TX(i)) {
                        ltq_dma_alloc_tx(&ch->dma);
-                       request_irq(irq, ltq_etop_dma_irq, 0, "etop_tx", priv);
+                       err = request_irq(irq, ltq_etop_dma_irq, 0, "etop_tx", priv);
+                       if (err) {
+                               netdev_err(dev,
+                                          "Unable to get Tx DMA IRQ %d\n",
+                                          irq);
+                               return err;
+                       }
                } else if (IS_RX(i)) {
                        ltq_dma_alloc_rx(&ch->dma);
                        for (ch->dma.desc = 0; ch->dma.desc < LTQ_DESC_NUM;
@@ -281,7 +289,13 @@ ltq_etop_hw_init(struct net_device *dev)
                                if (ltq_etop_alloc_skb(ch))
                                        return -ENOMEM;
                        ch->dma.desc = 0;
-                       request_irq(irq, ltq_etop_dma_irq, 0, "etop_rx", priv);
+                       err = request_irq(irq, ltq_etop_dma_irq, 0, "etop_rx", priv);
+                       if (err) {
+                               netdev_err(dev,
+                                          "Unable to get Rx DMA IRQ %d\n",
+                                          irq);
+                               return err;
+                       }
                }
                ch->dma.irq = irq;
        }
@@ -726,7 +740,7 @@ static struct platform_driver ltq_mii_driver = {
        },
 };
 
-int __init
+static int __init
 init_ltq_etop(void)
 {
        int ret = platform_driver_probe(&ltq_mii_driver, ltq_etop_probe);
index 62a97c4..ef87897 100644 (file)
@@ -429,12 +429,14 @@ static const struct of_device_id orion_mdio_match[] = {
 };
 MODULE_DEVICE_TABLE(of, orion_mdio_match);
 
+#ifdef CONFIG_ACPI
 static const struct acpi_device_id orion_mdio_acpi_match[] = {
        { "MRVL0100", BUS_TYPE_SMI },
        { "MRVL0101", BUS_TYPE_XSMI },
        { },
 };
 MODULE_DEVICE_TABLE(acpi, orion_mdio_acpi_match);
+#endif
 
 static struct platform_driver orion_mdio_driver = {
        .probe = orion_mdio_probe,
index c7fd466..a09a507 100644 (file)
@@ -236,10 +236,11 @@ static ssize_t rvu_dbg_lmtst_map_table_display(struct file *filp,
        u64 lmt_addr, val, tbl_base;
        int pf, vf, num_vfs, hw_vfs;
        void __iomem *lmt_map_base;
-       int index = 0, off = 0;
-       int bytes_not_copied;
        int buf_size = 10240;
+       size_t off = 0;
+       int index = 0;
        char *buf;
+       int ret;
 
        /* don't allow partial reads */
        if (*ppos != 0)
@@ -303,15 +304,17 @@ static ssize_t rvu_dbg_lmtst_map_table_display(struct file *filp,
        }
        off +=  scnprintf(&buf[off], buf_size - 1 - off, "\n");
 
-       bytes_not_copied = copy_to_user(buffer, buf, off);
+       ret = min(off, count);
+       if (copy_to_user(buffer, buf, ret))
+               ret = -EFAULT;
        kfree(buf);
 
        iounmap(lmt_map_base);
-       if (bytes_not_copied)
-               return -EFAULT;
+       if (ret < 0)
+               return ret;
 
-       *ppos = off;
-       return off;
+       *ppos = ret;
+       return ret;
 }
 
 RVU_DEBUG_FOPS(lmtst_map_table, lmtst_map_table_display, NULL);
index f71ec4d..8eaa24d 100644 (file)
@@ -339,6 +339,8 @@ static int mlx5_internal_err_ret_value(struct mlx5_core_dev *dev, u16 op,
        case MLX5_CMD_OP_PAGE_FAULT_RESUME:
        case MLX5_CMD_OP_QUERY_ESW_FUNCTIONS:
        case MLX5_CMD_OP_DEALLOC_SF:
+       case MLX5_CMD_OP_DESTROY_UCTX:
+       case MLX5_CMD_OP_DESTROY_UMEM:
                return MLX5_CMD_STAT_OK;
 
        case MLX5_CMD_OP_QUERY_HCA_CAP:
@@ -464,9 +466,7 @@ static int mlx5_internal_err_ret_value(struct mlx5_core_dev *dev, u16 op,
        case MLX5_CMD_OP_MODIFY_GENERAL_OBJECT:
        case MLX5_CMD_OP_QUERY_GENERAL_OBJECT:
        case MLX5_CMD_OP_CREATE_UCTX:
-       case MLX5_CMD_OP_DESTROY_UCTX:
        case MLX5_CMD_OP_CREATE_UMEM:
-       case MLX5_CMD_OP_DESTROY_UMEM:
        case MLX5_CMD_OP_ALLOC_MEMIC:
        case MLX5_CMD_OP_MODIFY_XRQ:
        case MLX5_CMD_OP_RELEASE_XRQ_ERROR:
index 02e77ff..5371ad0 100644 (file)
@@ -164,13 +164,14 @@ int mlx5_core_destroy_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq)
        MLX5_SET(destroy_cq_in, in, cqn, cq->cqn);
        MLX5_SET(destroy_cq_in, in, uid, cq->uid);
        err = mlx5_cmd_exec_in(dev, destroy_cq, in);
+       if (err)
+               return err;
 
        synchronize_irq(cq->irqn);
-
        mlx5_cq_put(cq);
        wait_for_completion(&cq->free);
 
-       return err;
+       return 0;
 }
 EXPORT_SYMBOL(mlx5_core_destroy_cq);
 
index 07c8d98..10d1950 100644 (file)
@@ -507,6 +507,8 @@ void mlx5_debug_cq_remove(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq)
        if (!mlx5_debugfs_root)
                return;
 
-       if (cq->dbg)
+       if (cq->dbg) {
                rem_res_tree(cq->dbg);
+               cq->dbg = NULL;
+       }
 }
index c1c6e74..2445e2a 100644 (file)
@@ -1356,9 +1356,13 @@ mlx5_tc_ct_match_add(struct mlx5_tc_ct_priv *priv,
 int
 mlx5_tc_ct_parse_action(struct mlx5_tc_ct_priv *priv,
                        struct mlx5_flow_attr *attr,
+                       struct mlx5e_tc_mod_hdr_acts *mod_acts,
                        const struct flow_action_entry *act,
                        struct netlink_ext_ack *extack)
 {
+       bool clear_action = act->ct.action & TCA_CT_ACT_CLEAR;
+       int err;
+
        if (!priv) {
                NL_SET_ERR_MSG_MOD(extack,
                                   "offload of ct action isn't available");
@@ -1369,6 +1373,17 @@ mlx5_tc_ct_parse_action(struct mlx5_tc_ct_priv *priv,
        attr->ct_attr.ct_action = act->ct.action;
        attr->ct_attr.nf_ft = act->ct.flow_table;
 
+       if (!clear_action)
+               goto out;
+
+       err = mlx5_tc_ct_entry_set_registers(priv, mod_acts, 0, 0, 0, 0);
+       if (err) {
+               NL_SET_ERR_MSG_MOD(extack, "Failed to set registers for ct clear");
+               return err;
+       }
+       attr->action |= MLX5_FLOW_CONTEXT_ACTION_MOD_HDR;
+
+out:
        return 0;
 }
 
@@ -1898,23 +1913,16 @@ __mlx5_tc_ct_flow_offload_clear(struct mlx5_tc_ct_priv *ct_priv,
 
        memcpy(pre_ct_attr, attr, attr_sz);
 
-       err = mlx5_tc_ct_entry_set_registers(ct_priv, mod_acts, 0, 0, 0, 0);
-       if (err) {
-               ct_dbg("Failed to set register for ct clear");
-               goto err_set_registers;
-       }
-
        mod_hdr = mlx5_modify_header_alloc(priv->mdev, ct_priv->ns_type,
                                           mod_acts->num_actions,
                                           mod_acts->actions);
        if (IS_ERR(mod_hdr)) {
                err = PTR_ERR(mod_hdr);
                ct_dbg("Failed to add create ct clear mod hdr");
-               goto err_set_registers;
+               goto err_mod_hdr;
        }
 
        pre_ct_attr->modify_hdr = mod_hdr;
-       pre_ct_attr->action |= MLX5_FLOW_CONTEXT_ACTION_MOD_HDR;
 
        rule = mlx5_tc_rule_insert(priv, orig_spec, pre_ct_attr);
        if (IS_ERR(rule)) {
@@ -1930,7 +1938,7 @@ __mlx5_tc_ct_flow_offload_clear(struct mlx5_tc_ct_priv *ct_priv,
 
 err_insert:
        mlx5_modify_header_dealloc(priv->mdev, mod_hdr);
-err_set_registers:
+err_mod_hdr:
        netdev_warn(priv->netdev,
                    "Failed to offload ct clear flow, err %d\n", err);
        kfree(pre_ct_attr);
index 363329f..99662af 100644 (file)
@@ -110,6 +110,7 @@ int mlx5_tc_ct_add_no_trk_match(struct mlx5_flow_spec *spec);
 int
 mlx5_tc_ct_parse_action(struct mlx5_tc_ct_priv *priv,
                        struct mlx5_flow_attr *attr,
+                       struct mlx5e_tc_mod_hdr_acts *mod_acts,
                        const struct flow_action_entry *act,
                        struct netlink_ext_ack *extack);
 
@@ -172,6 +173,7 @@ mlx5_tc_ct_add_no_trk_match(struct mlx5_flow_spec *spec)
 static inline int
 mlx5_tc_ct_parse_action(struct mlx5_tc_ct_priv *priv,
                        struct mlx5_flow_attr *attr,
+                       struct mlx5e_tc_mod_hdr_acts *mod_acts,
                        const struct flow_action_entry *act,
                        struct netlink_ext_ack *extack)
 {
index 8f64f2c..b689701 100644 (file)
@@ -102,6 +102,7 @@ struct mlx5e_tc_flow {
        refcount_t refcnt;
        struct rcu_head rcu_head;
        struct completion init_done;
+       struct completion del_hw_done;
        int tunnel_id; /* the mapped tunnel id of this flow */
        struct mlx5_flow_attr *attr;
 };
index 660cca7..042b1ab 100644 (file)
@@ -245,8 +245,14 @@ static void mlx5e_take_tmp_flow(struct mlx5e_tc_flow *flow,
                                struct list_head *flow_list,
                                int index)
 {
-       if (IS_ERR(mlx5e_flow_get(flow)))
+       if (IS_ERR(mlx5e_flow_get(flow))) {
+               /* Flow is being deleted concurrently. Wait for it to be
+                * unoffloaded from hardware, otherwise deleting encap will
+                * fail.
+                */
+               wait_for_completion(&flow->del_hw_done);
                return;
+       }
        wait_for_completion(&flow->init_done);
 
        flow->tmp_entry_index = index;
index 62abce0..a2a9f68 100644 (file)
@@ -55,6 +55,7 @@ struct mlx5e_ktls_offload_context_rx {
        DECLARE_BITMAP(flags, MLX5E_NUM_PRIV_RX_FLAGS);
 
        /* resync */
+       spinlock_t lock; /* protects resync fields */
        struct mlx5e_ktls_rx_resync_ctx resync;
        struct list_head list;
 };
@@ -386,14 +387,18 @@ static void resync_handle_seq_match(struct mlx5e_ktls_offload_context_rx *priv_r
        struct mlx5e_icosq *sq;
        bool trigger_poll;
 
-       memcpy(info->rec_seq, &priv_rx->resync.sw_rcd_sn_be, sizeof(info->rec_seq));
-
        sq = &c->async_icosq;
        ktls_resync = sq->ktls_resync;
+       trigger_poll = false;
 
        spin_lock_bh(&ktls_resync->lock);
-       list_add_tail(&priv_rx->list, &ktls_resync->list);
-       trigger_poll = !test_and_set_bit(MLX5E_SQ_STATE_PENDING_TLS_RX_RESYNC, &sq->state);
+       spin_lock_bh(&priv_rx->lock);
+       memcpy(info->rec_seq, &priv_rx->resync.sw_rcd_sn_be, sizeof(info->rec_seq));
+       if (list_empty(&priv_rx->list)) {
+               list_add_tail(&priv_rx->list, &ktls_resync->list);
+               trigger_poll = !test_and_set_bit(MLX5E_SQ_STATE_PENDING_TLS_RX_RESYNC, &sq->state);
+       }
+       spin_unlock_bh(&priv_rx->lock);
        spin_unlock_bh(&ktls_resync->lock);
 
        if (!trigger_poll)
@@ -617,6 +622,8 @@ int mlx5e_ktls_add_rx(struct net_device *netdev, struct sock *sk,
        if (err)
                goto err_create_key;
 
+       INIT_LIST_HEAD(&priv_rx->list);
+       spin_lock_init(&priv_rx->lock);
        priv_rx->crypto_info  =
                *(struct tls12_crypto_info_aes_gcm_128 *)crypto_info;
 
@@ -730,10 +737,14 @@ bool mlx5e_ktls_rx_handle_resync_list(struct mlx5e_channel *c, int budget)
                priv_rx = list_first_entry(&local_list,
                                           struct mlx5e_ktls_offload_context_rx,
                                           list);
+               spin_lock(&priv_rx->lock);
                cseg = post_static_params(sq, priv_rx);
-               if (IS_ERR(cseg))
+               if (IS_ERR(cseg)) {
+                       spin_unlock(&priv_rx->lock);
                        break;
-               list_del(&priv_rx->list);
+               }
+               list_del_init(&priv_rx->list);
+               spin_unlock(&priv_rx->lock);
                db_cseg = cseg;
        }
        if (db_cseg)
index 835caa1..3d45f4a 100644 (file)
@@ -1600,6 +1600,7 @@ static void mlx5e_tc_del_fdb_flow(struct mlx5e_priv *priv,
                else
                        mlx5e_tc_unoffload_fdb_rules(esw, flow, attr);
        }
+       complete_all(&flow->del_hw_done);
 
        if (mlx5_flow_has_geneve_opt(flow))
                mlx5_geneve_tlv_option_del(priv->mdev->geneve);
@@ -3607,7 +3608,9 @@ parse_tc_nic_actions(struct mlx5e_priv *priv,
                        attr->dest_chain = act->chain_index;
                        break;
                case FLOW_ACTION_CT:
-                       err = mlx5_tc_ct_parse_action(get_ct_priv(priv), attr, act, extack);
+                       err = mlx5_tc_ct_parse_action(get_ct_priv(priv), attr,
+                                                     &parse_attr->mod_hdr_acts,
+                                                     act, extack);
                        if (err)
                                return err;
 
@@ -4276,7 +4279,9 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv,
                                NL_SET_ERR_MSG_MOD(extack, "Sample action with connection tracking is not supported");
                                return -EOPNOTSUPP;
                        }
-                       err = mlx5_tc_ct_parse_action(get_ct_priv(priv), attr, act, extack);
+                       err = mlx5_tc_ct_parse_action(get_ct_priv(priv), attr,
+                                                     &parse_attr->mod_hdr_acts,
+                                                     act, extack);
                        if (err)
                                return err;
 
@@ -4465,6 +4470,7 @@ mlx5e_alloc_flow(struct mlx5e_priv *priv, int attr_size,
        INIT_LIST_HEAD(&flow->l3_to_l2_reformat);
        refcount_set(&flow->refcnt, 1);
        init_completion(&flow->init_done);
+       init_completion(&flow->del_hw_done);
 
        *__flow = flow;
        *__parse_attr = parse_attr;
index ec136b4..51a8cec 100644 (file)
@@ -1305,12 +1305,17 @@ abort:
  */
 int mlx5_eswitch_enable(struct mlx5_eswitch *esw, int num_vfs)
 {
+       bool toggle_lag;
        int ret;
 
        if (!mlx5_esw_allowed(esw))
                return 0;
 
-       mlx5_lag_disable_change(esw->dev);
+       toggle_lag = esw->mode == MLX5_ESWITCH_NONE;
+
+       if (toggle_lag)
+               mlx5_lag_disable_change(esw->dev);
+
        down_write(&esw->mode_lock);
        if (esw->mode == MLX5_ESWITCH_NONE) {
                ret = mlx5_eswitch_enable_locked(esw, MLX5_ESWITCH_LEGACY, num_vfs);
@@ -1324,7 +1329,10 @@ int mlx5_eswitch_enable(struct mlx5_eswitch *esw, int num_vfs)
                        esw->esw_funcs.num_vfs = num_vfs;
        }
        up_write(&esw->mode_lock);
-       mlx5_lag_enable_change(esw->dev);
+
+       if (toggle_lag)
+               mlx5_lag_enable_change(esw->dev);
+
        return ret;
 }
 
@@ -1572,6 +1580,11 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev)
        esw->enabled_vports = 0;
        esw->mode = MLX5_ESWITCH_NONE;
        esw->offloads.inline_mode = MLX5_INLINE_MODE_NONE;
+       if (MLX5_CAP_ESW_FLOWTABLE_FDB(dev, reformat) &&
+           MLX5_CAP_ESW_FLOWTABLE_FDB(dev, decap))
+               esw->offloads.encap = DEVLINK_ESWITCH_ENCAP_MODE_BASIC;
+       else
+               esw->offloads.encap = DEVLINK_ESWITCH_ENCAP_MODE_NONE;
 
        dev->priv.eswitch = esw;
        BLOCKING_INIT_NOTIFIER_HEAD(&esw->n_head);
@@ -1934,7 +1947,7 @@ free_out:
        return err;
 }
 
-u8 mlx5_eswitch_mode(struct mlx5_core_dev *dev)
+u8 mlx5_eswitch_mode(const struct mlx5_core_dev *dev)
 {
        struct mlx5_eswitch *esw = dev->priv.eswitch;
 
@@ -1948,7 +1961,7 @@ mlx5_eswitch_get_encap_mode(const struct mlx5_core_dev *dev)
        struct mlx5_eswitch *esw;
 
        esw = dev->priv.eswitch;
-       return mlx5_esw_allowed(esw) ? esw->offloads.encap :
+       return (mlx5_eswitch_mode(dev) == MLX5_ESWITCH_OFFLOADS)  ? esw->offloads.encap :
                DEVLINK_ESWITCH_ENCAP_MODE_NONE;
 }
 EXPORT_SYMBOL(mlx5_eswitch_get_encap_mode);
index f4eaa58..a464556 100644 (file)
@@ -3183,12 +3183,6 @@ int esw_offloads_enable(struct mlx5_eswitch *esw)
        u64 mapping_id;
        int err;
 
-       if (MLX5_CAP_ESW_FLOWTABLE_FDB(esw->dev, reformat) &&
-           MLX5_CAP_ESW_FLOWTABLE_FDB(esw->dev, decap))
-               esw->offloads.encap = DEVLINK_ESWITCH_ENCAP_MODE_BASIC;
-       else
-               esw->offloads.encap = DEVLINK_ESWITCH_ENCAP_MODE_NONE;
-
        mutex_init(&esw->offloads.termtbl_mutex);
        mlx5_rdma_enable_roce(esw->dev);
 
@@ -3286,7 +3280,6 @@ void esw_offloads_disable(struct mlx5_eswitch *esw)
        esw_offloads_metadata_uninit(esw);
        mlx5_rdma_disable_roce(esw->dev);
        mutex_destroy(&esw->offloads.termtbl_mutex);
-       esw->offloads.encap = DEVLINK_ESWITCH_ENCAP_MODE_NONE;
 }
 
 static int esw_mode_from_devlink(u16 mode, u16 *mlx5_mode)
@@ -3630,7 +3623,7 @@ int mlx5_devlink_eswitch_encap_mode_get(struct devlink *devlink,
        *encap = esw->offloads.encap;
 unlock:
        up_write(&esw->mode_lock);
-       return 0;
+       return err;
 }
 
 static bool
index 31c99d5..7e0e04c 100644 (file)
@@ -40,7 +40,7 @@
 #define MLX5_FC_STATS_PERIOD msecs_to_jiffies(1000)
 /* Max number of counters to query in bulk read is 32K */
 #define MLX5_SW_MAX_COUNTERS_BULK BIT(15)
-#define MLX5_SF_NUM_COUNTERS_BULK 6
+#define MLX5_SF_NUM_COUNTERS_BULK 8
 #define MLX5_FC_POOL_MAX_THRESHOLD BIT(18)
 #define MLX5_FC_POOL_USED_BUFF_RATIO 10
 
index 48d2ea6..4ddf6b3 100644 (file)
@@ -615,6 +615,7 @@ static int mlx5_handle_changeupper_event(struct mlx5_lag *ldev,
        bool is_bonded, is_in_lag, mode_supported;
        int bond_status = 0;
        int num_slaves = 0;
+       int changed = 0;
        int idx;
 
        if (!netif_is_lag_master(upper))
@@ -653,27 +654,27 @@ static int mlx5_handle_changeupper_event(struct mlx5_lag *ldev,
         */
        is_in_lag = num_slaves == MLX5_MAX_PORTS && bond_status == 0x3;
 
-       if (!mlx5_lag_is_ready(ldev) && is_in_lag) {
-               NL_SET_ERR_MSG_MOD(info->info.extack,
-                                  "Can't activate LAG offload, PF is configured with more than 64 VFs");
-               return 0;
-       }
-
        /* Lag mode must be activebackup or hash. */
        mode_supported = tracker->tx_type == NETDEV_LAG_TX_TYPE_ACTIVEBACKUP ||
                         tracker->tx_type == NETDEV_LAG_TX_TYPE_HASH;
 
-       if (is_in_lag && !mode_supported)
-               NL_SET_ERR_MSG_MOD(info->info.extack,
-                                  "Can't activate LAG offload, TX type isn't supported");
-
        is_bonded = is_in_lag && mode_supported;
        if (tracker->is_bonded != is_bonded) {
                tracker->is_bonded = is_bonded;
-               return 1;
+               changed = 1;
        }
 
-       return 0;
+       if (!is_in_lag)
+               return changed;
+
+       if (!mlx5_lag_is_ready(ldev))
+               NL_SET_ERR_MSG_MOD(info->info.extack,
+                                  "Can't activate LAG offload, PF is configured with more than 64 VFs");
+       else if (!mode_supported)
+               NL_SET_ERR_MSG_MOD(info->info.extack,
+                                  "Can't activate LAG offload, TX type isn't supported");
+
+       return changed;
 }
 
 static int mlx5_handle_changelowerstate_event(struct mlx5_lag *ldev,
@@ -716,9 +717,6 @@ static int mlx5_lag_netdev_event(struct notifier_block *this,
 
        ldev    = container_of(this, struct mlx5_lag, nb);
 
-       if (!mlx5_lag_is_ready(ldev) && event == NETDEV_CHANGELOWERSTATE)
-               return NOTIFY_DONE;
-
        tracker = ldev->tracker;
 
        switch (event) {
index 49089cb..8cbd36c 100644 (file)
@@ -135,25 +135,14 @@ static void dr_domain_fill_uplink_caps(struct mlx5dr_domain *dmn,
 
 static int dr_domain_query_vport(struct mlx5dr_domain *dmn,
                                 u16 vport_number,
+                                bool other_vport,
                                 struct mlx5dr_cmd_vport_cap *vport_caps)
 {
-       u16 cmd_vport = vport_number;
-       bool other_vport = true;
        int ret;
 
-       if (vport_number == MLX5_VPORT_UPLINK) {
-               dr_domain_fill_uplink_caps(dmn, vport_caps);
-               return 0;
-       }
-
-       if (dmn->info.caps.is_ecpf && vport_number == MLX5_VPORT_ECPF) {
-               other_vport = false;
-               cmd_vport = 0;
-       }
-
        ret = mlx5dr_cmd_query_esw_vport_context(dmn->mdev,
                                                 other_vport,
-                                                cmd_vport,
+                                                vport_number,
                                                 &vport_caps->icm_address_rx,
                                                 &vport_caps->icm_address_tx);
        if (ret)
@@ -161,7 +150,7 @@ static int dr_domain_query_vport(struct mlx5dr_domain *dmn,
 
        ret = mlx5dr_cmd_query_gvmi(dmn->mdev,
                                    other_vport,
-                                   cmd_vport,
+                                   vport_number,
                                    &vport_caps->vport_gvmi);
        if (ret)
                return ret;
@@ -176,9 +165,15 @@ static int dr_domain_query_esw_mngr(struct mlx5dr_domain *dmn)
 {
        return dr_domain_query_vport(dmn,
                                     dmn->info.caps.is_ecpf ? MLX5_VPORT_ECPF : 0,
+                                    false,
                                     &dmn->info.caps.vports.esw_manager_caps);
 }
 
+static void dr_domain_query_uplink(struct mlx5dr_domain *dmn)
+{
+       dr_domain_fill_uplink_caps(dmn, &dmn->info.caps.vports.uplink_caps);
+}
+
 static struct mlx5dr_cmd_vport_cap *
 dr_domain_add_vport_cap(struct mlx5dr_domain *dmn, u16 vport)
 {
@@ -190,7 +185,7 @@ dr_domain_add_vport_cap(struct mlx5dr_domain *dmn, u16 vport)
        if (!vport_caps)
                return NULL;
 
-       ret = dr_domain_query_vport(dmn, vport, vport_caps);
+       ret = dr_domain_query_vport(dmn, vport, true, vport_caps);
        if (ret) {
                kvfree(vport_caps);
                return NULL;
@@ -207,16 +202,26 @@ dr_domain_add_vport_cap(struct mlx5dr_domain *dmn, u16 vport)
        return vport_caps;
 }
 
+static bool dr_domain_is_esw_mgr_vport(struct mlx5dr_domain *dmn, u16 vport)
+{
+       struct mlx5dr_cmd_caps *caps = &dmn->info.caps;
+
+       return (caps->is_ecpf && vport == MLX5_VPORT_ECPF) ||
+              (!caps->is_ecpf && vport == 0);
+}
+
 struct mlx5dr_cmd_vport_cap *
 mlx5dr_domain_get_vport_cap(struct mlx5dr_domain *dmn, u16 vport)
 {
        struct mlx5dr_cmd_caps *caps = &dmn->info.caps;
        struct mlx5dr_cmd_vport_cap *vport_caps;
 
-       if ((caps->is_ecpf && vport == MLX5_VPORT_ECPF) ||
-           (!caps->is_ecpf && vport == 0))
+       if (dr_domain_is_esw_mgr_vport(dmn, vport))
                return &caps->vports.esw_manager_caps;
 
+       if (vport == MLX5_VPORT_UPLINK)
+               return &caps->vports.uplink_caps;
+
 vport_load:
        vport_caps = xa_load(&caps->vports.vports_caps_xa, vport);
        if (vport_caps)
@@ -241,17 +246,6 @@ static void dr_domain_clear_vports(struct mlx5dr_domain *dmn)
        }
 }
 
-static int dr_domain_query_uplink(struct mlx5dr_domain *dmn)
-{
-       struct mlx5dr_cmd_vport_cap *vport_caps;
-
-       vport_caps = mlx5dr_domain_get_vport_cap(dmn, MLX5_VPORT_UPLINK);
-       if (!vport_caps)
-               return -EINVAL;
-
-       return 0;
-}
-
 static int dr_domain_query_fdb_caps(struct mlx5_core_dev *mdev,
                                    struct mlx5dr_domain *dmn)
 {
@@ -281,11 +275,7 @@ static int dr_domain_query_fdb_caps(struct mlx5_core_dev *mdev,
                goto free_vports_caps_xa;
        }
 
-       ret = dr_domain_query_uplink(dmn);
-       if (ret) {
-               mlx5dr_err(dmn, "Failed to query uplink vport caps (err: %d)", ret);
-               goto free_vports_caps_xa;
-       }
+       dr_domain_query_uplink(dmn);
 
        return 0;
 
index 75c775b..7933652 100644 (file)
@@ -924,11 +924,12 @@ static int dr_matcher_init(struct mlx5dr_matcher *matcher,
 
        /* Check that all mask data was consumed */
        for (i = 0; i < consumed_mask.match_sz; i++) {
-               if (consumed_mask.match_buf[i]) {
-                       mlx5dr_dbg(dmn, "Match param mask contains unsupported parameters\n");
-                       ret = -EOPNOTSUPP;
-                       goto free_consumed_mask;
-               }
+               if (!((u8 *)consumed_mask.match_buf)[i])
+                       continue;
+
+               mlx5dr_dbg(dmn, "Match param mask contains unsupported parameters\n");
+               ret = -EOPNOTSUPP;
+               goto free_consumed_mask;
        }
 
        ret =  0;
index 3028b77..2333c24 100644 (file)
@@ -764,6 +764,7 @@ struct mlx5dr_roce_cap {
 
 struct mlx5dr_vports {
        struct mlx5dr_cmd_vport_cap esw_manager_caps;
+       struct mlx5dr_cmd_vport_cap uplink_caps;
        struct xarray vports_caps_xa;
 };
 
index cc2d907..23a336c 100644 (file)
@@ -392,7 +392,7 @@ static int sis96x_get_mac_addr(struct pci_dev *pci_dev,
                        /* get MAC address from EEPROM */
                        for (i = 0; i < 3; i++)
                                addr[i] = read_eeprom(ioaddr, i + EEPROMMACAddr);
-                        eth_hw_addr_set(net_dev, (u8 *)addr);
+                       eth_hw_addr_set(net_dev, (u8 *)addr);
 
                        rc = 1;
                        break;
index 8520812..b7c2579 100644 (file)
@@ -485,8 +485,28 @@ static int socfpga_dwmac_resume(struct device *dev)
 }
 #endif /* CONFIG_PM_SLEEP */
 
-static SIMPLE_DEV_PM_OPS(socfpga_dwmac_pm_ops, stmmac_suspend,
-                                              socfpga_dwmac_resume);
+static int __maybe_unused socfpga_dwmac_runtime_suspend(struct device *dev)
+{
+       struct net_device *ndev = dev_get_drvdata(dev);
+       struct stmmac_priv *priv = netdev_priv(ndev);
+
+       stmmac_bus_clks_config(priv, false);
+
+       return 0;
+}
+
+static int __maybe_unused socfpga_dwmac_runtime_resume(struct device *dev)
+{
+       struct net_device *ndev = dev_get_drvdata(dev);
+       struct stmmac_priv *priv = netdev_priv(ndev);
+
+       return stmmac_bus_clks_config(priv, true);
+}
+
+static const struct dev_pm_ops socfpga_dwmac_pm_ops = {
+       SET_SYSTEM_SLEEP_PM_OPS(stmmac_suspend, socfpga_dwmac_resume)
+       SET_RUNTIME_PM_OPS(socfpga_dwmac_runtime_suspend, socfpga_dwmac_runtime_resume, NULL)
+};
 
 static const struct socfpga_dwmac_ops socfpga_gen5_ops = {
        .set_phy_mode = socfpga_gen5_set_phy_mode,
index d3f350c..2eb2845 100644 (file)
@@ -511,6 +511,14 @@ bool stmmac_eee_init(struct stmmac_priv *priv)
        return true;
 }
 
+static inline u32 stmmac_cdc_adjust(struct stmmac_priv *priv)
+{
+       /* Correct the clk domain crossing(CDC) error */
+       if (priv->plat->has_gmac4 && priv->plat->clk_ptp_rate)
+               return (2 * NSEC_PER_SEC) / priv->plat->clk_ptp_rate;
+       return 0;
+}
+
 /* stmmac_get_tx_hwtstamp - get HW TX timestamps
  * @priv: driver private structure
  * @p : descriptor pointer
@@ -524,7 +532,6 @@ static void stmmac_get_tx_hwtstamp(struct stmmac_priv *priv,
 {
        struct skb_shared_hwtstamps shhwtstamp;
        bool found = false;
-       s64 adjust = 0;
        u64 ns = 0;
 
        if (!priv->hwts_tx_en)
@@ -543,12 +550,7 @@ static void stmmac_get_tx_hwtstamp(struct stmmac_priv *priv,
        }
 
        if (found) {
-               /* Correct the clk domain crossing(CDC) error */
-               if (priv->plat->has_gmac4 && priv->plat->clk_ptp_rate) {
-                       adjust += -(2 * (NSEC_PER_SEC /
-                                        priv->plat->clk_ptp_rate));
-                       ns += adjust;
-               }
+               ns -= stmmac_cdc_adjust(priv);
 
                memset(&shhwtstamp, 0, sizeof(struct skb_shared_hwtstamps));
                shhwtstamp.hwtstamp = ns_to_ktime(ns);
@@ -573,7 +575,6 @@ static void stmmac_get_rx_hwtstamp(struct stmmac_priv *priv, struct dma_desc *p,
 {
        struct skb_shared_hwtstamps *shhwtstamp = NULL;
        struct dma_desc *desc = p;
-       u64 adjust = 0;
        u64 ns = 0;
 
        if (!priv->hwts_rx_en)
@@ -586,11 +587,7 @@ static void stmmac_get_rx_hwtstamp(struct stmmac_priv *priv, struct dma_desc *p,
        if (stmmac_get_rx_timestamp_status(priv, p, np, priv->adv_ts)) {
                stmmac_get_timestamp(priv, desc, priv->adv_ts, &ns);
 
-               /* Correct the clk domain crossing(CDC) error */
-               if (priv->plat->has_gmac4 && priv->plat->clk_ptp_rate) {
-                       adjust += 2 * (NSEC_PER_SEC / priv->plat->clk_ptp_rate);
-                       ns -= adjust;
-               }
+               ns -= stmmac_cdc_adjust(priv);
 
                netdev_dbg(priv->dev, "get valid RX hw timestamp %llu\n", ns);
                shhwtstamp = skb_hwtstamps(skb);
index bfdf89e..8a19a06 100644 (file)
@@ -306,7 +306,6 @@ static void sp_setup(struct net_device *dev)
 {
        /* Finish setting up the DEVICE info. */
        dev->netdev_ops         = &sp_netdev_ops;
-       dev->needs_free_netdev  = true;
        dev->mtu                = SIXP_MTU;
        dev->hard_header_len    = AX25_MAX_HEADER_LEN;
        dev->header_ops         = &ax25_header_ops;
index 5528d97..ef790fd 100644 (file)
@@ -853,6 +853,7 @@ static void ipa_endpoint_init_hol_block_timer(struct ipa_endpoint *endpoint,
        u32 offset;
        u32 val;
 
+       /* This should only be changed when HOL_BLOCK_EN is disabled */
        offset = IPA_REG_ENDP_INIT_HOL_BLOCK_TIMER_N_OFFSET(endpoint_id);
        val = hol_block_timer_val(ipa, microseconds);
        iowrite32(val, ipa->reg_virt + offset);
@@ -868,6 +869,9 @@ ipa_endpoint_init_hol_block_enable(struct ipa_endpoint *endpoint, bool enable)
        val = enable ? HOL_BLOCK_EN_FMASK : 0;
        offset = IPA_REG_ENDP_INIT_HOL_BLOCK_EN_N_OFFSET(endpoint_id);
        iowrite32(val, endpoint->ipa->reg_virt + offset);
+       /* When enabling, the register must be written twice for IPA v4.5+ */
+       if (enable && endpoint->ipa->version >= IPA_VERSION_4_5)
+               iowrite32(val, endpoint->ipa->reg_virt + offset);
 }
 
 void ipa_endpoint_modem_hol_block_clear_all(struct ipa *ipa)
@@ -880,6 +884,7 @@ void ipa_endpoint_modem_hol_block_clear_all(struct ipa *ipa)
                if (endpoint->toward_ipa || endpoint->ee_id != GSI_EE_MODEM)
                        continue;
 
+               ipa_endpoint_init_hol_block_enable(endpoint, false);
                ipa_endpoint_init_hol_block_timer(endpoint, 0);
                ipa_endpoint_init_hol_block_enable(endpoint, true);
        }
index e3da95d..06cec71 100644 (file)
@@ -52,7 +52,7 @@ static bool ipa_resource_limits_valid(struct ipa *ipa,
                                return false;
        }
 
-       group_count = data->rsrc_group_src_count;
+       group_count = data->rsrc_group_dst_count;
        if (!group_count || group_count > IPA_RESOURCE_GROUP_MAX)
                return false;
 
index fecc9a1..1572878 100644 (file)
@@ -1010,6 +1010,7 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
 {
        struct tun_struct *tun = netdev_priv(dev);
        int txq = skb->queue_mapping;
+       struct netdev_queue *queue;
        struct tun_file *tfile;
        int len = skb->len;
 
@@ -1054,6 +1055,10 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
        if (ptr_ring_produce(&tfile->tx_ring, skb))
                goto drop;
 
+       /* NETIF_F_LLTX requires to do our own update of trans_start */
+       queue = netdev_get_tx_queue(dev, txq);
+       queue->trans_start = jiffies;
+
        /* Notify and wake up reader process */
        if (tfile->flags & TUN_FASYNC)
                kill_fasync(&tfile->fasync, SIGIO, POLL_IN);
index 4a02f33..f9877a3 100644 (file)
@@ -9603,12 +9603,9 @@ static int rtl8152_probe(struct usb_interface *intf,
                netdev->hw_features &= ~NETIF_F_RXCSUM;
        }
 
-       if (le16_to_cpu(udev->descriptor.idVendor) == VENDOR_ID_LENOVO) {
-               switch (le16_to_cpu(udev->descriptor.idProduct)) {
-               case DEVICE_ID_THINKPAD_THUNDERBOLT3_DOCK_GEN2:
-               case DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2:
-                       tp->lenovo_macpassthru = 1;
-               }
+       if (udev->parent &&
+                       le16_to_cpu(udev->parent->descriptor.idVendor) == VENDOR_ID_LENOVO) {
+               tp->lenovo_macpassthru = 1;
        }
 
        if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x3011 && udev->serial &&
index bae9d42..ecab906 100644 (file)
@@ -598,14 +598,14 @@ static struct irq_chip amd_gpio_irqchip = {
 
 #define PIN_IRQ_PENDING        (BIT(INTERRUPT_STS_OFF) | BIT(WAKE_STS_OFF))
 
-static irqreturn_t amd_gpio_irq_handler(int irq, void *dev_id)
+static bool do_amd_gpio_irq_handler(int irq, void *dev_id)
 {
        struct amd_gpio *gpio_dev = dev_id;
        struct gpio_chip *gc = &gpio_dev->gc;
-       irqreturn_t ret = IRQ_NONE;
        unsigned int i, irqnr;
        unsigned long flags;
        u32 __iomem *regs;
+       bool ret = false;
        u32  regval;
        u64 status, mask;
 
@@ -627,6 +627,14 @@ static irqreturn_t amd_gpio_irq_handler(int irq, void *dev_id)
                /* Each status bit covers four pins */
                for (i = 0; i < 4; i++) {
                        regval = readl(regs + i);
+                       /* caused wake on resume context for shared IRQ */
+                       if (irq < 0 && (regval & BIT(WAKE_STS_OFF))) {
+                               dev_dbg(&gpio_dev->pdev->dev,
+                                       "Waking due to GPIO %d: 0x%x",
+                                       irqnr + i, regval);
+                               return true;
+                       }
+
                        if (!(regval & PIN_IRQ_PENDING) ||
                            !(regval & BIT(INTERRUPT_MASK_OFF)))
                                continue;
@@ -650,9 +658,12 @@ static irqreturn_t amd_gpio_irq_handler(int irq, void *dev_id)
                        }
                        writel(regval, regs + i);
                        raw_spin_unlock_irqrestore(&gpio_dev->lock, flags);
-                       ret = IRQ_HANDLED;
+                       ret = true;
                }
        }
+       /* did not cause wake on resume context for shared IRQ */
+       if (irq < 0)
+               return false;
 
        /* Signal EOI to the GPIO unit */
        raw_spin_lock_irqsave(&gpio_dev->lock, flags);
@@ -664,6 +675,16 @@ static irqreturn_t amd_gpio_irq_handler(int irq, void *dev_id)
        return ret;
 }
 
+static irqreturn_t amd_gpio_irq_handler(int irq, void *dev_id)
+{
+       return IRQ_RETVAL(do_amd_gpio_irq_handler(irq, dev_id));
+}
+
+static bool __maybe_unused amd_gpio_check_wake(void *dev_id)
+{
+       return do_amd_gpio_irq_handler(-1, dev_id);
+}
+
 static int amd_get_groups_count(struct pinctrl_dev *pctldev)
 {
        struct amd_gpio *gpio_dev = pinctrl_dev_get_drvdata(pctldev);
@@ -1033,6 +1054,7 @@ static int amd_gpio_probe(struct platform_device *pdev)
                goto out2;
 
        platform_set_drvdata(pdev, gpio_dev);
+       acpi_register_wakeup_handler(gpio_dev->irq, amd_gpio_check_wake, gpio_dev);
 
        dev_dbg(&pdev->dev, "amd gpio driver loaded\n");
        return ret;
@@ -1050,6 +1072,7 @@ static int amd_gpio_remove(struct platform_device *pdev)
        gpio_dev = platform_get_drvdata(pdev);
 
        gpiochip_remove(&gpio_dev->gc);
+       acpi_unregister_wakeup_handler(amd_gpio_check_wake, gpio_dev);
 
        return 0;
 }
index 0cc346b..a786107 100644 (file)
@@ -258,7 +258,7 @@ static void apple_gpio_irq_ack(struct irq_data *data)
               pctl->base + REG_IRQ(irqgrp, data->hwirq));
 }
 
-static int apple_gpio_irq_type(unsigned int type)
+static unsigned int apple_gpio_irq_type(unsigned int type)
 {
        switch (type & IRQ_TYPE_SENSE_MASK) {
        case IRQ_TYPE_EDGE_RISING:
@@ -272,7 +272,7 @@ static int apple_gpio_irq_type(unsigned int type)
        case IRQ_TYPE_LEVEL_LOW:
                return REG_GPIOx_IN_IRQ_LO;
        default:
-               return -EINVAL;
+               return REG_GPIOx_IN_IRQ_OFF;
        }
 }
 
@@ -288,7 +288,7 @@ static void apple_gpio_irq_unmask(struct irq_data *data)
 {
        struct apple_gpio_pinctrl *pctl =
                gpiochip_get_data(irq_data_get_irq_chip_data(data));
-       int irqtype = apple_gpio_irq_type(irqd_get_trigger_type(data));
+       unsigned int irqtype = apple_gpio_irq_type(irqd_get_trigger_type(data));
 
        apple_gpio_set_reg(pctl, data->hwirq, REG_GPIOx_MODE,
                           FIELD_PREP(REG_GPIOx_MODE, irqtype));
@@ -313,10 +313,10 @@ static int apple_gpio_irq_set_type(struct irq_data *data,
 {
        struct apple_gpio_pinctrl *pctl =
                gpiochip_get_data(irq_data_get_irq_chip_data(data));
-       int irqtype = apple_gpio_irq_type(type);
+       unsigned int irqtype = apple_gpio_irq_type(type);
 
-       if (irqtype < 0)
-               return irqtype;
+       if (irqtype == REG_GPIOx_IN_IRQ_OFF)
+               return -EINVAL;
 
        apple_gpio_set_reg(pctl, data->hwirq, REG_GPIOx_MODE,
                           FIELD_PREP(REG_GPIOx_MODE, irqtype));
index b9191f1..3e0c007 100644 (file)
@@ -197,6 +197,7 @@ config PINCTRL_QCOM_SPMI_PMIC
        select PINMUX
        select PINCONF
        select GENERIC_PINCONF
+  select GPIOLIB
        select GPIOLIB_IRQCHIP
        select IRQ_DOMAIN_HIERARCHY
        help
@@ -211,6 +212,7 @@ config PINCTRL_QCOM_SSBI_PMIC
        select PINMUX
        select PINCONF
        select GENERIC_PINCONF
+  select GPIOLIB
        select GPIOLIB_IRQCHIP
        select IRQ_DOMAIN_HIERARCHY
        help
index c51793f..fdfd7b8 100644 (file)
@@ -1310,6 +1310,7 @@ static const struct msm_pinctrl_soc_data sdm845_pinctrl = {
        .ngpios = 151,
        .wakeirq_map = sdm845_pdc_map,
        .nwakeirq_map = ARRAY_SIZE(sdm845_pdc_map),
+       .wakeirq_dual_edge_errata = true,
 };
 
 static const struct msm_pinctrl_soc_data sdm845_acpi_pinctrl = {
index 4d8f863..1c042d3 100644 (file)
@@ -1597,10 +1597,10 @@ static const struct msm_pingroup sm8350_groups[] = {
        [200] = PINGROUP(200, qdss_gpio, _, _, _, _, _, _, _, _),
        [201] = PINGROUP(201, _, _, _, _, _, _, _, _, _),
        [202] = PINGROUP(202, _, _, _, _, _, _, _, _, _),
-       [203] = UFS_RESET(ufs_reset, 0x1d8000),
-       [204] = SDC_PINGROUP(sdc2_clk, 0x1cf000, 14, 6),
-       [205] = SDC_PINGROUP(sdc2_cmd, 0x1cf000, 11, 3),
-       [206] = SDC_PINGROUP(sdc2_data, 0x1cf000, 9, 0),
+       [203] = UFS_RESET(ufs_reset, 0xd8000),
+       [204] = SDC_PINGROUP(sdc2_clk, 0xcf000, 14, 6),
+       [205] = SDC_PINGROUP(sdc2_cmd, 0xcf000, 11, 3),
+       [206] = SDC_PINGROUP(sdc2_data, 0xcf000, 9, 0),
 };
 
 static const struct msm_gpio_wakeirq_map sm8350_pdc_map[] = {
index 425d55a..6853b5b 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 
+#include <asm/mach-ralink/ralink_regs.h>
 #include <asm/mach-ralink/mt7620.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
index 8d734bf..50bd26a 100644 (file)
@@ -275,7 +275,7 @@ static int tegra_pinctrl_set_mux(struct pinctrl_dev *pctldev,
        return 0;
 }
 
-static struct tegra_pingroup *tegra_pinctrl_get_group(struct pinctrl_dev *pctldev,
+static const struct tegra_pingroup *tegra_pinctrl_get_group(struct pinctrl_dev *pctldev,
                                        unsigned int offset)
 {
        struct tegra_pmx *pmx = pinctrl_dev_get_drvdata(pctldev);
@@ -289,7 +289,7 @@ static struct tegra_pingroup *tegra_pinctrl_get_group(struct pinctrl_dev *pctlde
                        continue;
                for (j = 0; j < num_pins; j++) {
                        if (offset == pins[j])
-                               return (struct tegra_pingroup *)&pmx->soc->groups[group];
+                               return &pmx->soc->groups[group];
                }
        }
 
index b4fef91..5c1dfcb 100644 (file)
@@ -1387,7 +1387,6 @@ static struct tegra_function tegra194_functions[] = {
                .schmitt_bit = schmitt_b,                       \
                .drvtype_bit = 13,                              \
                .lpdr_bit = e_lpdr,                             \
-               .drv_reg = -1,                                  \
 
 #define drive_touch_clk_pcc4            DRV_PINGROUP_ENTRY_Y(0x2004,   12,     5,      20,     5,      -1,     -1,     -1,     -1,     1)
 #define drive_uart3_rx_pcc6             DRV_PINGROUP_ENTRY_Y(0x200c,   12,     5,      20,     5,      -1,     -1,     -1,     -1,     1)
index 0b7f58f..c897a2f 100644 (file)
@@ -413,7 +413,7 @@ mlxreg_lc_create_static_devices(struct mlxreg_lc *mlxreg_lc, struct mlxreg_hotpl
                                int size)
 {
        struct mlxreg_hotplug_device *dev = devs;
-       int i;
+       int i, ret;
 
        /* Create static I2C device feeding by auxiliary or main power. */
        for (i = 0; i < size; i++, dev++) {
@@ -423,6 +423,7 @@ mlxreg_lc_create_static_devices(struct mlxreg_lc *mlxreg_lc, struct mlxreg_hotpl
                                dev->brdinfo->type, dev->nr, dev->brdinfo->addr);
 
                        dev->adapter = NULL;
+                       ret = PTR_ERR(dev->client);
                        goto fail_create_static_devices;
                }
        }
@@ -435,7 +436,7 @@ fail_create_static_devices:
                i2c_unregister_device(dev->client);
                dev->client = NULL;
        }
-       return IS_ERR(dev->client);
+       return ret;
 }
 
 static void
index d4c079f..7400bc5 100644 (file)
@@ -185,7 +185,7 @@ config ACER_WMI
 
 config AMD_PMC
        tristate "AMD SoC PMC driver"
-       depends on ACPI && PCI
+       depends on ACPI && PCI && RTC_CLASS
        help
          The driver provides support for AMD Power Management Controller
          primarily responsible for S2Idle transactions that are driven from
index 2fffa57..fe224a5 100644 (file)
@@ -187,7 +187,7 @@ config DELL_WMI_AIO
 
 config DELL_WMI_DESCRIPTOR
        tristate
-       default m
+       default n
        depends on ACPI_WMI
 
 config DELL_WMI_LED
index b183967..435a91f 100644 (file)
@@ -331,9 +331,11 @@ static int lis3lv02d_probe(struct platform_device *device)
        INIT_WORK(&hpled_led.work, delayed_set_status_worker);
        ret = led_classdev_register(NULL, &hpled_led.led_classdev);
        if (ret) {
+               i8042_remove_filter(hp_accel_i8042_filter);
                lis3lv02d_joystick_disable(&lis3_dev);
                lis3lv02d_poweroff(&lis3_dev);
                flush_work(&hpled_led.work);
+               lis3lv02d_remove_fs(&lis3_dev);
                return ret;
        }
 
index 7ee010a..c1d9ed9 100644 (file)
@@ -152,7 +152,7 @@ struct sabi_config {
 
 static const struct sabi_config sabi_configs[] = {
        {
-               /* I don't know if it is really 2, but it it is
+               /* I don't know if it is really 2, but it is
                 * less than 3 anyway */
                .sabi_version = 2,
 
index 9472aae..c4d9c45 100644 (file)
@@ -888,8 +888,10 @@ static int tlmi_analyze(void)
                        break;
                if (!item)
                        break;
-               if (!*item)
+               if (!*item) {
+                       kfree(item);
                        continue;
+               }
 
                /* It is not allowed to have '/' for file name. Convert it into '\'. */
                strreplace(item, '/', '\\');
@@ -902,6 +904,7 @@ static int tlmi_analyze(void)
                setting = kzalloc(sizeof(*setting), GFP_KERNEL);
                if (!setting) {
                        ret = -ENOMEM;
+                       kfree(item);
                        goto fail_clear_attr;
                }
                setting->index = i;
@@ -916,7 +919,6 @@ static int tlmi_analyze(void)
                }
                kobject_init(&setting->kobj, &tlmi_attr_setting_ktype);
                tlmi_priv.setting[i] = setting;
-               tlmi_priv.settings_count++;
                kfree(item);
        }
 
@@ -983,7 +985,12 @@ static void tlmi_remove(struct wmi_device *wdev)
 
 static int tlmi_probe(struct wmi_device *wdev, const void *context)
 {
-       tlmi_analyze();
+       int ret;
+
+       ret = tlmi_analyze();
+       if (ret)
+               return ret;
+
        return tlmi_sysfs_init();
 }
 
index f8e2682..2ce5086 100644 (file)
@@ -55,7 +55,6 @@ struct tlmi_attr_setting {
 struct think_lmi {
        struct wmi_device *wmi_device;
 
-       int settings_count;
        bool can_set_bios_settings;
        bool can_get_bios_selections;
        bool can_set_bios_password;
index 9c632df..b3ac9c3 100644 (file)
@@ -1105,15 +1105,6 @@ static int tpacpi_rfk_update_swstate(const struct tpacpi_rfk *tp_rfk)
        return status;
 }
 
-/* Query FW and update rfkill sw state for all rfkill switches */
-static void tpacpi_rfk_update_swstate_all(void)
-{
-       unsigned int i;
-
-       for (i = 0; i < TPACPI_RFK_SW_MAX; i++)
-               tpacpi_rfk_update_swstate(tpacpi_rfkill_switches[i]);
-}
-
 /*
  * Sync the HW-blocking state of all rfkill switches,
  * do notice it causes the rfkill core to schedule uevents
@@ -3074,9 +3065,6 @@ static void tpacpi_send_radiosw_update(void)
        if (wlsw == TPACPI_RFK_RADIO_OFF)
                tpacpi_rfk_update_hwblock_state(true);
 
-       /* Sync sw blocking state */
-       tpacpi_rfk_update_swstate_all();
-
        /* Sync hw blocking state last if it is hw-unblocked */
        if (wlsw == TPACPI_RFK_RADIO_ON)
                tpacpi_rfk_update_hwblock_state(false);
@@ -8766,6 +8754,7 @@ static const struct tpacpi_quirk fan_quirk_table[] __initconst = {
        TPACPI_Q_LNV3('N', '2', 'E', TPACPI_FAN_2CTL),  /* P1 / X1 Extreme (1st gen) */
        TPACPI_Q_LNV3('N', '2', 'O', TPACPI_FAN_2CTL),  /* P1 / X1 Extreme (2nd gen) */
        TPACPI_Q_LNV3('N', '2', 'V', TPACPI_FAN_2CTL),  /* P1 / X1 Extreme (3nd gen) */
+       TPACPI_Q_LNV3('N', '4', '0', TPACPI_FAN_2CTL),  /* P1 / X1 Extreme (4nd gen) */
        TPACPI_Q_LNV3('N', '3', '0', TPACPI_FAN_2CTL),  /* P15 (1st gen) / P15v (1st gen) */
        TPACPI_Q_LNV3('N', '3', '2', TPACPI_FAN_2CTL),  /* X1 Carbon (9th gen) */
 };
index 44faa3a..b740866 100644 (file)
@@ -166,16 +166,13 @@ static struct dtpm_ops dtpm_ops = {
 
 static int cpuhp_dtpm_cpu_offline(unsigned int cpu)
 {
-       struct em_perf_domain *pd;
        struct dtpm_cpu *dtpm_cpu;
 
-       pd = em_cpu_get(cpu);
-       if (!pd)
-               return -EINVAL;
-
        dtpm_cpu = per_cpu(dtpm_per_cpu, cpu);
+       if (dtpm_cpu)
+               dtpm_update_power(&dtpm_cpu->dtpm);
 
-       return dtpm_update_power(&dtpm_cpu->dtpm);
+       return 0;
 }
 
 static int cpuhp_dtpm_cpu_online(unsigned int cpu)
index 6bc5791..08e429a 100644 (file)
@@ -1699,12 +1699,9 @@ static int initialize_dco_operating_mode(struct idtcm_channel *channel)
 
 /* PTP Hardware Clock interface */
 
-/**
+/*
  * Maximum absolute value for write phase offset in picoseconds
  *
- * @channel:  channel
- * @delta_ns: delta in nanoseconds
- *
  * Destination signed register is 32-bit register in resolution of 50ps
  *
  * 0x7fffffff * 50 =  2147483647 * 50 = 107374182350
index 34f943c..0f1b5a7 100644 (file)
@@ -1304,10 +1304,11 @@ ptp_ocp_register_ext(struct ptp_ocp *bp, struct ocp_resource *r)
        if (!ext)
                return -ENOMEM;
 
-       err = -EINVAL;
        ext->mem = ptp_ocp_get_mem(bp, r);
-       if (!ext->mem)
+       if (IS_ERR(ext->mem)) {
+               err = PTR_ERR(ext->mem);
                goto out;
+       }
 
        ext->bp = bp;
        ext->info = r->extra;
@@ -1371,8 +1372,8 @@ ptp_ocp_register_mem(struct ptp_ocp *bp, struct ocp_resource *r)
        void __iomem *mem;
 
        mem = ptp_ocp_get_mem(bp, r);
-       if (!mem)
-               return -EINVAL;
+       if (IS_ERR(mem))
+               return PTR_ERR(mem);
 
        bp_assign_entry(bp, r, mem);
 
index 2c40fe1..6043c83 100644 (file)
@@ -731,7 +731,7 @@ static ssize_t dasd_ff_show(struct device *dev, struct device_attribute *attr,
                ff_flag = (devmap->features & DASD_FEATURE_FAILFAST) != 0;
        else
                ff_flag = (DASD_FEATURE_DEFAULT & DASD_FEATURE_FAILFAST) != 0;
-       return snprintf(buf, PAGE_SIZE, ff_flag ? "1\n" : "0\n");
+       return sysfs_emit(buf, ff_flag ? "1\n" : "0\n");
 }
 
 static ssize_t dasd_ff_store(struct device *dev, struct device_attribute *attr,
@@ -773,7 +773,7 @@ dasd_ro_show(struct device *dev, struct device_attribute *attr, char *buf)
        spin_unlock(&dasd_devmap_lock);
 
 out:
-       return snprintf(buf, PAGE_SIZE, ro_flag ? "1\n" : "0\n");
+       return sysfs_emit(buf, ro_flag ? "1\n" : "0\n");
 }
 
 static ssize_t
@@ -834,7 +834,7 @@ dasd_erplog_show(struct device *dev, struct device_attribute *attr, char *buf)
                erplog = (devmap->features & DASD_FEATURE_ERPLOG) != 0;
        else
                erplog = (DASD_FEATURE_DEFAULT & DASD_FEATURE_ERPLOG) != 0;
-       return snprintf(buf, PAGE_SIZE, erplog ? "1\n" : "0\n");
+       return sysfs_emit(buf, erplog ? "1\n" : "0\n");
 }
 
 static ssize_t
@@ -1033,13 +1033,13 @@ dasd_discipline_show(struct device *dev, struct device_attribute *attr,
                dasd_put_device(device);
                goto out;
        } else {
-               len = snprintf(buf, PAGE_SIZE, "%s\n",
-                              device->discipline->name);
+               len = sysfs_emit(buf, "%s\n",
+                                device->discipline->name);
                dasd_put_device(device);
                return len;
        }
 out:
-       len = snprintf(buf, PAGE_SIZE, "none\n");
+       len = sysfs_emit(buf, "none\n");
        return len;
 }
 
@@ -1056,30 +1056,30 @@ dasd_device_status_show(struct device *dev, struct device_attribute *attr,
        if (!IS_ERR(device)) {
                switch (device->state) {
                case DASD_STATE_NEW:
-                       len = snprintf(buf, PAGE_SIZE, "new\n");
+                       len = sysfs_emit(buf, "new\n");
                        break;
                case DASD_STATE_KNOWN:
-                       len = snprintf(buf, PAGE_SIZE, "detected\n");
+                       len = sysfs_emit(buf, "detected\n");
                        break;
                case DASD_STATE_BASIC:
-                       len = snprintf(buf, PAGE_SIZE, "basic\n");
+                       len = sysfs_emit(buf, "basic\n");
                        break;
                case DASD_STATE_UNFMT:
-                       len = snprintf(buf, PAGE_SIZE, "unformatted\n");
+                       len = sysfs_emit(buf, "unformatted\n");
                        break;
                case DASD_STATE_READY:
-                       len = snprintf(buf, PAGE_SIZE, "ready\n");
+                       len = sysfs_emit(buf, "ready\n");
                        break;
                case DASD_STATE_ONLINE:
-                       len = snprintf(buf, PAGE_SIZE, "online\n");
+                       len = sysfs_emit(buf, "online\n");
                        break;
                default:
-                       len = snprintf(buf, PAGE_SIZE, "no stat\n");
+                       len = sysfs_emit(buf, "no stat\n");
                        break;
                }
                dasd_put_device(device);
        } else
-               len = snprintf(buf, PAGE_SIZE, "unknown\n");
+               len = sysfs_emit(buf, "unknown\n");
        return len;
 }
 
@@ -1120,7 +1120,7 @@ static ssize_t dasd_vendor_show(struct device *dev,
        device = dasd_device_from_cdev(to_ccwdev(dev));
        vendor = "";
        if (IS_ERR(device))
-               return snprintf(buf, PAGE_SIZE, "%s\n", vendor);
+               return sysfs_emit(buf, "%s\n", vendor);
 
        if (device->discipline && device->discipline->get_uid &&
            !device->discipline->get_uid(device, &uid))
@@ -1128,7 +1128,7 @@ static ssize_t dasd_vendor_show(struct device *dev,
 
        dasd_put_device(device);
 
-       return snprintf(buf, PAGE_SIZE, "%s\n", vendor);
+       return sysfs_emit(buf, "%s\n", vendor);
 }
 
 static DEVICE_ATTR(vendor, 0444, dasd_vendor_show, NULL);
@@ -1148,7 +1148,7 @@ dasd_uid_show(struct device *dev, struct device_attribute *attr, char *buf)
        device = dasd_device_from_cdev(to_ccwdev(dev));
        uid_string[0] = 0;
        if (IS_ERR(device))
-               return snprintf(buf, PAGE_SIZE, "%s\n", uid_string);
+               return sysfs_emit(buf, "%s\n", uid_string);
 
        if (device->discipline && device->discipline->get_uid &&
            !device->discipline->get_uid(device, &uid)) {
@@ -1183,7 +1183,7 @@ dasd_uid_show(struct device *dev, struct device_attribute *attr, char *buf)
        }
        dasd_put_device(device);
 
-       return snprintf(buf, PAGE_SIZE, "%s\n", uid_string);
+       return sysfs_emit(buf, "%s\n", uid_string);
 }
 static DEVICE_ATTR(uid, 0444, dasd_uid_show, NULL);
 
@@ -1201,7 +1201,7 @@ dasd_eer_show(struct device *dev, struct device_attribute *attr, char *buf)
                eer_flag = dasd_eer_enabled(devmap->device);
        else
                eer_flag = 0;
-       return snprintf(buf, PAGE_SIZE, eer_flag ? "1\n" : "0\n");
+       return sysfs_emit(buf, eer_flag ? "1\n" : "0\n");
 }
 
 static ssize_t
@@ -1243,7 +1243,7 @@ dasd_expires_show(struct device *dev, struct device_attribute *attr, char *buf)
        device = dasd_device_from_cdev(to_ccwdev(dev));
        if (IS_ERR(device))
                return -ENODEV;
-       len = snprintf(buf, PAGE_SIZE, "%lu\n", device->default_expires);
+       len = sysfs_emit(buf, "%lu\n", device->default_expires);
        dasd_put_device(device);
        return len;
 }
@@ -1283,7 +1283,7 @@ dasd_retries_show(struct device *dev, struct device_attribute *attr, char *buf)
        device = dasd_device_from_cdev(to_ccwdev(dev));
        if (IS_ERR(device))
                return -ENODEV;
-       len = snprintf(buf, PAGE_SIZE, "%lu\n", device->default_retries);
+       len = sysfs_emit(buf, "%lu\n", device->default_retries);
        dasd_put_device(device);
        return len;
 }
@@ -1324,7 +1324,7 @@ dasd_timeout_show(struct device *dev, struct device_attribute *attr,
        device = dasd_device_from_cdev(to_ccwdev(dev));
        if (IS_ERR(device))
                return -ENODEV;
-       len = snprintf(buf, PAGE_SIZE, "%lu\n", device->blk_timeout);
+       len = sysfs_emit(buf, "%lu\n", device->blk_timeout);
        dasd_put_device(device);
        return len;
 }
@@ -1398,11 +1398,11 @@ static ssize_t dasd_hpf_show(struct device *dev, struct device_attribute *attr,
                return -ENODEV;
        if (!device->discipline || !device->discipline->hpf_enabled) {
                dasd_put_device(device);
-               return snprintf(buf, PAGE_SIZE, "%d\n", dasd_nofcx);
+               return sysfs_emit(buf, "%d\n", dasd_nofcx);
        }
        hpf = device->discipline->hpf_enabled(device);
        dasd_put_device(device);
-       return snprintf(buf, PAGE_SIZE, "%d\n", hpf);
+       return sysfs_emit(buf, "%d\n", hpf);
 }
 
 static DEVICE_ATTR(hpf, 0444, dasd_hpf_show, NULL);
@@ -1416,13 +1416,13 @@ static ssize_t dasd_reservation_policy_show(struct device *dev,
 
        devmap = dasd_find_busid(dev_name(dev));
        if (IS_ERR(devmap)) {
-               rc = snprintf(buf, PAGE_SIZE, "ignore\n");
+               rc = sysfs_emit(buf, "ignore\n");
        } else {
                spin_lock(&dasd_devmap_lock);
                if (devmap->features & DASD_FEATURE_FAILONSLCK)
-                       rc = snprintf(buf, PAGE_SIZE, "fail\n");
+                       rc = sysfs_emit(buf, "fail\n");
                else
-                       rc = snprintf(buf, PAGE_SIZE, "ignore\n");
+                       rc = sysfs_emit(buf, "ignore\n");
                spin_unlock(&dasd_devmap_lock);
        }
        return rc;
@@ -1457,14 +1457,14 @@ static ssize_t dasd_reservation_state_show(struct device *dev,
 
        device = dasd_device_from_cdev(to_ccwdev(dev));
        if (IS_ERR(device))
-               return snprintf(buf, PAGE_SIZE, "none\n");
+               return sysfs_emit(buf, "none\n");
 
        if (test_bit(DASD_FLAG_IS_RESERVED, &device->flags))
-               rc = snprintf(buf, PAGE_SIZE, "reserved\n");
+               rc = sysfs_emit(buf, "reserved\n");
        else if (test_bit(DASD_FLAG_LOCK_STOLEN, &device->flags))
-               rc = snprintf(buf, PAGE_SIZE, "lost\n");
+               rc = sysfs_emit(buf, "lost\n");
        else
-               rc = snprintf(buf, PAGE_SIZE, "none\n");
+               rc = sysfs_emit(buf, "none\n");
        dasd_put_device(device);
        return rc;
 }
@@ -1531,7 +1531,7 @@ dasd_path_threshold_show(struct device *dev,
        device = dasd_device_from_cdev(to_ccwdev(dev));
        if (IS_ERR(device))
                return -ENODEV;
-       len = snprintf(buf, PAGE_SIZE, "%lu\n", device->path_thrhld);
+       len = sysfs_emit(buf, "%lu\n", device->path_thrhld);
        dasd_put_device(device);
        return len;
 }
@@ -1578,7 +1578,7 @@ dasd_path_autodisable_show(struct device *dev,
        else
                flag = (DASD_FEATURE_DEFAULT &
                        DASD_FEATURE_PATH_AUTODISABLE) != 0;
-       return snprintf(buf, PAGE_SIZE, flag ? "1\n" : "0\n");
+       return sysfs_emit(buf, flag ? "1\n" : "0\n");
 }
 
 static ssize_t
@@ -1616,7 +1616,7 @@ dasd_path_interval_show(struct device *dev,
        device = dasd_device_from_cdev(to_ccwdev(dev));
        if (IS_ERR(device))
                return -ENODEV;
-       len = snprintf(buf, PAGE_SIZE, "%lu\n", device->path_interval);
+       len = sysfs_emit(buf, "%lu\n", device->path_interval);
        dasd_put_device(device);
        return len;
 }
@@ -1662,9 +1662,9 @@ dasd_device_fcs_show(struct device *dev, struct device_attribute *attr,
                return -ENODEV;
        fc_sec = dasd_path_get_fcs_device(device);
        if (fc_sec == -EINVAL)
-               rc = snprintf(buf, PAGE_SIZE, "Inconsistent\n");
+               rc = sysfs_emit(buf, "Inconsistent\n");
        else
-               rc = snprintf(buf, PAGE_SIZE, "%s\n", dasd_path_get_fcs_str(fc_sec));
+               rc = sysfs_emit(buf, "%s\n", dasd_path_get_fcs_str(fc_sec));
        dasd_put_device(device);
 
        return rc;
@@ -1677,7 +1677,7 @@ dasd_path_fcs_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
        struct dasd_path *path = to_dasd_path(kobj);
        unsigned int fc_sec = path->fc_security;
 
-       return snprintf(buf, PAGE_SIZE, "%s\n", dasd_path_get_fcs_str(fc_sec));
+       return sysfs_emit(buf, "%s\n", dasd_path_get_fcs_str(fc_sec));
 }
 
 static struct kobj_attribute path_fcs_attribute =
@@ -1698,7 +1698,7 @@ static ssize_t dasd_##_name##_show(struct device *dev,                    \
                val = _func(device);                                    \
        dasd_put_device(device);                                        \
                                                                        \
-       return snprintf(buf, PAGE_SIZE, "%d\n", val);                   \
+       return sysfs_emit(buf, "%d\n", val);                    \
 }                                                                      \
 static DEVICE_ATTR(_name, 0444, dasd_##_name##_show, NULL);            \
 
index 646ec79..dfde0d9 100644 (file)
@@ -1047,24 +1047,24 @@ raw3270_probe (struct ccw_device *cdev)
 static ssize_t
 raw3270_model_show(struct device *dev, struct device_attribute *attr, char *buf)
 {
-       return snprintf(buf, PAGE_SIZE, "%i\n",
-                       ((struct raw3270 *) dev_get_drvdata(dev))->model);
+       return sysfs_emit(buf, "%i\n",
+                         ((struct raw3270 *)dev_get_drvdata(dev))->model);
 }
 static DEVICE_ATTR(model, 0444, raw3270_model_show, NULL);
 
 static ssize_t
 raw3270_rows_show(struct device *dev, struct device_attribute *attr, char *buf)
 {
-       return snprintf(buf, PAGE_SIZE, "%i\n",
-                       ((struct raw3270 *) dev_get_drvdata(dev))->rows);
+       return sysfs_emit(buf, "%i\n",
+                         ((struct raw3270 *)dev_get_drvdata(dev))->rows);
 }
 static DEVICE_ATTR(rows, 0444, raw3270_rows_show, NULL);
 
 static ssize_t
 raw3270_columns_show(struct device *dev, struct device_attribute *attr, char *buf)
 {
-       return snprintf(buf, PAGE_SIZE, "%i\n",
-                       ((struct raw3270 *) dev_get_drvdata(dev))->cols);
+       return sysfs_emit(buf, "%i\n",
+                         ((struct raw3270 *)dev_get_drvdata(dev))->cols);
 }
 static DEVICE_ATTR(columns, 0444, raw3270_columns_show, NULL);
 
index 1097e76..5440f28 100644 (file)
@@ -285,7 +285,7 @@ static ssize_t chp_configure_show(struct device *dev,
        if (status < 0)
                return status;
 
-       return snprintf(buf, PAGE_SIZE, "%d\n", status);
+       return sysfs_emit(buf, "%d\n", status);
 }
 
 static int cfg_wait_idle(void);
index 73a3531..10d2655 100644 (file)
@@ -1695,10 +1695,8 @@ qla2x00_get_adapter_id(scsi_qla_host_t *vha, uint16_t *id, uint8_t *al_pa,
                mcp->in_mb |= MBX_13|MBX_12|MBX_11|MBX_10;
        if (IS_FWI2_CAPABLE(vha->hw))
                mcp->in_mb |= MBX_19|MBX_18|MBX_17|MBX_16;
-       if (IS_QLA27XX(vha->hw) || IS_QLA28XX(vha->hw)) {
-               mcp->in_mb |= MBX_15;
-               mcp->out_mb |= MBX_7|MBX_21|MBX_22|MBX_23;
-       }
+       if (IS_QLA27XX(vha->hw) || IS_QLA28XX(vha->hw))
+               mcp->in_mb |= MBX_15|MBX_21|MBX_22|MBX_23;
 
        mcp->tov = MBX_TOV_SECONDS;
        mcp->flags = 0;
index 55addd7..7afcec2 100644 (file)
@@ -792,6 +792,7 @@ store_state_field(struct device *dev, struct device_attribute *attr,
        int i, ret;
        struct scsi_device *sdev = to_scsi_device(dev);
        enum scsi_device_state state = 0;
+       bool rescan_dev = false;
 
        for (i = 0; i < ARRAY_SIZE(sdev_states); i++) {
                const int len = strlen(sdev_states[i].name);
@@ -810,20 +811,27 @@ store_state_field(struct device *dev, struct device_attribute *attr,
        }
 
        mutex_lock(&sdev->state_mutex);
-       ret = scsi_device_set_state(sdev, state);
-       /*
-        * If the device state changes to SDEV_RUNNING, we need to
-        * run the queue to avoid I/O hang, and rescan the device
-        * to revalidate it. Running the queue first is necessary
-        * because another thread may be waiting inside
-        * blk_mq_freeze_queue_wait() and because that call may be
-        * waiting for pending I/O to finish.
-        */
-       if (ret == 0 && state == SDEV_RUNNING) {
+       if (sdev->sdev_state == SDEV_RUNNING && state == SDEV_RUNNING) {
+               ret = count;
+       } else {
+               ret = scsi_device_set_state(sdev, state);
+               if (ret == 0 && state == SDEV_RUNNING)
+                       rescan_dev = true;
+       }
+       mutex_unlock(&sdev->state_mutex);
+
+       if (rescan_dev) {
+               /*
+                * If the device state changes to SDEV_RUNNING, we need to
+                * run the queue to avoid I/O hang, and rescan the device
+                * to revalidate it. Running the queue first is necessary
+                * because another thread may be waiting inside
+                * blk_mq_freeze_queue_wait() and because that call may be
+                * waiting for pending I/O to finish.
+                */
                blk_mq_run_hw_queues(sdev->request_queue, true);
                scsi_rescan_device(dev);
        }
-       mutex_unlock(&sdev->state_mutex);
 
        return ret == 0 ? count : -EINVAL;
 }
index 78343d3..554b6f7 100644 (file)
@@ -1899,12 +1899,12 @@ static void session_recovery_timedout(struct work_struct *work)
        }
        spin_unlock_irqrestore(&session->lock, flags);
 
-       if (session->transport->session_recovery_timedout)
-               session->transport->session_recovery_timedout(session);
-
        ISCSI_DBG_TRANS_SESSION(session, "Unblocking SCSI target\n");
        scsi_target_unblock(&session->dev, SDEV_TRANSPORT_OFFLINE);
        ISCSI_DBG_TRANS_SESSION(session, "Completed unblocking SCSI target\n");
+
+       if (session->transport->session_recovery_timedout)
+               session->transport->session_recovery_timedout(session);
 }
 
 static void __iscsi_unblock_session(struct work_struct *work)
index afd3814..13c09db 100644 (file)
@@ -6453,9 +6453,8 @@ static irqreturn_t ufshcd_tmc_handler(struct ufs_hba *hba)
        irqreturn_t ret = IRQ_NONE;
        int tag;
 
-       pending = ufshcd_readl(hba, REG_UTP_TASK_REQ_DOOR_BELL);
-
        spin_lock_irqsave(hba->host->host_lock, flags);
+       pending = ufshcd_readl(hba, REG_UTP_TASK_REQ_DOOR_BELL);
        issued = hba->outstanding_tasks & ~pending;
        for_each_set_bit(tag, &issued, hba->nutmrs) {
                struct request *req = hba->tmf_rqs[tag];
@@ -6616,11 +6615,6 @@ static int __ufshcd_issue_tm_cmd(struct ufs_hba *hba,
        err = wait_for_completion_io_timeout(&wait,
                        msecs_to_jiffies(TM_CMD_TIMEOUT));
        if (!err) {
-               /*
-                * Make sure that ufshcd_compl_tm() does not trigger a
-                * use-after-free.
-                */
-               req->end_io_data = NULL;
                ufshcd_add_tm_upiu_trace(hba, task_tag, UFS_TM_ERR);
                dev_err(hba->dev, "%s: task management cmd 0x%.2x timed-out\n",
                                __func__, tm_function);
@@ -7116,6 +7110,7 @@ static int ufshcd_abort(struct scsi_cmnd *cmd)
                goto release;
        }
 
+       lrbp->cmd = NULL;
        err = SUCCESS;
 
 release:
index 8b3d268..b808c94 100644 (file)
@@ -37,6 +37,7 @@
 #define CQSPI_NEEDS_WR_DELAY           BIT(0)
 #define CQSPI_DISABLE_DAC_MODE         BIT(1)
 #define CQSPI_SUPPORT_EXTERNAL_DMA     BIT(2)
+#define CQSPI_NO_SUPPORT_WR_COMPLETION BIT(3)
 
 /* Capabilities */
 #define CQSPI_SUPPORTS_OCTAL           BIT(0)
@@ -86,6 +87,7 @@ struct cqspi_st {
        struct cqspi_flash_pdata f_pdata[CQSPI_MAX_CHIPSELECT];
        bool                    use_dma_read;
        u32                     pd_dev_id;
+       bool                    wr_completion;
 };
 
 struct cqspi_driver_platdata {
@@ -996,9 +998,11 @@ static int cqspi_write_setup(struct cqspi_flash_pdata *f_pdata,
         * polling on the controller's side. spinand and spi-nor will take
         * care of polling the status register.
         */
-       reg = readl(reg_base + CQSPI_REG_WR_COMPLETION_CTRL);
-       reg |= CQSPI_REG_WR_DISABLE_AUTO_POLL;
-       writel(reg, reg_base + CQSPI_REG_WR_COMPLETION_CTRL);
+       if (cqspi->wr_completion) {
+               reg = readl(reg_base + CQSPI_REG_WR_COMPLETION_CTRL);
+               reg |= CQSPI_REG_WR_DISABLE_AUTO_POLL;
+               writel(reg, reg_base + CQSPI_REG_WR_COMPLETION_CTRL);
+       }
 
        reg = readl(reg_base + CQSPI_REG_SIZE);
        reg &= ~CQSPI_REG_SIZE_ADDRESS_MASK;
@@ -1736,6 +1740,10 @@ static int cqspi_probe(struct platform_device *pdev)
 
        cqspi->master_ref_clk_hz = clk_get_rate(cqspi->clk);
        master->max_speed_hz = cqspi->master_ref_clk_hz;
+
+       /* write completion is supported by default */
+       cqspi->wr_completion = true;
+
        ddata  = of_device_get_match_data(dev);
        if (ddata) {
                if (ddata->quirks & CQSPI_NEEDS_WR_DELAY)
@@ -1747,6 +1755,8 @@ static int cqspi_probe(struct platform_device *pdev)
                        cqspi->use_direct_mode = true;
                if (ddata->quirks & CQSPI_SUPPORT_EXTERNAL_DMA)
                        cqspi->use_dma_read = true;
+               if (ddata->quirks & CQSPI_NO_SUPPORT_WR_COMPLETION)
+                       cqspi->wr_completion = false;
 
                if (of_device_is_compatible(pdev->dev.of_node,
                                            "xlnx,versal-ospi-1.0"))
@@ -1859,6 +1869,10 @@ static const struct cqspi_driver_platdata intel_lgm_qspi = {
        .quirks = CQSPI_DISABLE_DAC_MODE,
 };
 
+static const struct cqspi_driver_platdata socfpga_qspi = {
+       .quirks = CQSPI_NO_SUPPORT_WR_COMPLETION,
+};
+
 static const struct cqspi_driver_platdata versal_ospi = {
        .hwcaps_mask = CQSPI_SUPPORTS_OCTAL,
        .quirks = CQSPI_DISABLE_DAC_MODE | CQSPI_SUPPORT_EXTERNAL_DMA,
@@ -1887,6 +1901,10 @@ static const struct of_device_id cqspi_dt_ids[] = {
                .compatible = "xlnx,versal-ospi-1.0",
                .data = (void *)&versal_ospi,
        },
+       {
+               .compatible = "intel,socfpga-qspi",
+               .data = (void *)&socfpga_qspi,
+       },
        { /* end of table */ }
 };
 
index 5d98611..c72e501 100644 (file)
@@ -912,7 +912,7 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
 
        ret = devm_spi_register_controller(&pdev->dev, controller);
        if (ret < 0) {
-               dev_err(&pdev->dev, "spi_register_controller error.\n");
+               dev_err_probe(&pdev->dev, ret, "spi_register_controller error: %i\n", ret);
                goto out_pm_get;
        }
 
index 27a446f..e2affae 100644 (file)
@@ -491,22 +491,26 @@ static int spi_geni_grab_gpi_chan(struct spi_geni_master *mas)
        int ret;
 
        mas->tx = dma_request_chan(mas->dev, "tx");
-       ret = dev_err_probe(mas->dev, IS_ERR(mas->tx), "Failed to get tx DMA ch\n");
-       if (ret < 0)
+       if (IS_ERR(mas->tx)) {
+               ret = dev_err_probe(mas->dev, PTR_ERR(mas->tx),
+                                   "Failed to get tx DMA ch\n");
                goto err_tx;
+       }
 
        mas->rx = dma_request_chan(mas->dev, "rx");
-       ret = dev_err_probe(mas->dev, IS_ERR(mas->rx), "Failed to get rx DMA ch\n");
-       if (ret < 0)
+       if (IS_ERR(mas->rx)) {
+               ret = dev_err_probe(mas->dev, PTR_ERR(mas->rx),
+                                   "Failed to get rx DMA ch\n");
                goto err_rx;
+       }
 
        return 0;
 
 err_rx:
+       mas->rx = NULL;
        dma_release_channel(mas->tx);
-       mas->tx = NULL;
 err_tx:
-       mas->rx = NULL;
+       mas->tx = NULL;
        return ret;
 }
 
index b23e675..fdd530b 100644 (file)
@@ -3099,12 +3099,6 @@ void spi_unregister_controller(struct spi_controller *ctlr)
 
        device_del(&ctlr->dev);
 
-       /* Release the last reference on the controller if its driver
-        * has not yet been converted to devm_spi_alloc_master/slave().
-        */
-       if (!ctlr->devm_allocated)
-               put_device(&ctlr->dev);
-
        /* free bus id */
        mutex_lock(&board_lock);
        if (found == ctlr)
@@ -3113,6 +3107,12 @@ void spi_unregister_controller(struct spi_controller *ctlr)
 
        if (IS_ENABLED(CONFIG_SPI_DYNAMIC))
                mutex_unlock(&ctlr->add_lock);
+
+       /* Release the last reference on the controller if its driver
+        * has not yet been converted to devm_spi_alloc_master/slave().
+        */
+       if (!ctlr->devm_allocated)
+               put_device(&ctlr->dev);
 }
 EXPORT_SYMBOL_GPL(spi_unregister_controller);
 
index 45c31f3..5d046de 100644 (file)
@@ -5,12 +5,12 @@
 
 config INT340X_THERMAL
        tristate "ACPI INT340X thermal drivers"
-       depends on X86 && ACPI && PCI
+       depends on X86_64 && ACPI && PCI
        select THERMAL_GOV_USER_SPACE
        select ACPI_THERMAL_REL
        select ACPI_FAN
        select INTEL_SOC_DTS_IOSF_CORE
-       select PROC_THERMAL_MMIO_RAPL if X86_64 && POWERCAP
+       select PROC_THERMAL_MMIO_RAPL if POWERCAP
        help
          Newer laptops and tablets that use ACPI may have thermal sensors and
          other devices with thermal control capabilities outside the core
index 648829a..82654dc 100644 (file)
@@ -421,6 +421,8 @@ static void thermal_zone_device_init(struct thermal_zone_device *tz)
 {
        struct thermal_instance *pos;
        tz->temperature = THERMAL_TEMP_INVALID;
+       tz->prev_low_trip = -INT_MAX;
+       tz->prev_high_trip = INT_MAX;
        list_for_each_entry(pos, &tz->thermal_instances, tz_node)
                pos->initialized = false;
 }
index 1b45116..40496e9 100644 (file)
@@ -332,13 +332,13 @@ static u8 sticon_build_attr(struct vc_data *conp, u8 color,
                            bool blink, bool underline, bool reverse,
                            bool italic)
 {
-    u8 attr = ((color & 0x70) >> 1) | ((color & 7));
+       u8 fg = color & 7;
+       u8 bg = (color & 0x70) >> 4;
 
-    if (reverse) {
-       color = ((color >> 3) & 0x7) | ((color & 0x7) << 3);
-    }
-
-    return attr;
+       if (reverse)
+               return (fg << 3) | bg;
+       else
+               return (bg << 3) | fg;
 }
 
 static void sticon_invert_region(struct vc_data *conp, u16 *p, int count)
index edca370..ea42ba6 100644 (file)
@@ -351,6 +351,17 @@ static int efifb_probe(struct platform_device *dev)
        char *option = NULL;
        efi_memory_desc_t md;
 
+       /*
+        * Generic drivers must not be registered if a framebuffer exists.
+        * If a native driver was probed, the display hardware was already
+        * taken and attempting to use the system framebuffer is dangerous.
+        */
+       if (num_registered_fb > 0) {
+               dev_err(&dev->dev,
+                       "efifb: a framebuffer is already registered\n");
+               return -EINVAL;
+       }
+
        if (screen_info.orig_video_isVGA != VIDEO_TYPE_EFI || pci_dev_disabled)
                return -ENODEV;
 
index 62f0ded..b63074f 100644 (file)
@@ -407,6 +407,17 @@ static int simplefb_probe(struct platform_device *pdev)
        struct simplefb_par *par;
        struct resource *mem;
 
+       /*
+        * Generic drivers must not be registered if a framebuffer exists.
+        * If a native driver was probed, the display hardware was already
+        * taken and attempting to use the system framebuffer is dangerous.
+        */
+       if (num_registered_fb > 0) {
+               dev_err(&pdev->dev,
+                       "simplefb: a framebuffer is already registered\n");
+               return -EINVAL;
+       }
+
        if (fb_get_options("simplefb", NULL))
                return -ENODEV;
 
index 473d21b..66899b6 100644 (file)
--- a/fs/attr.c
+++ b/fs/attr.c
@@ -35,7 +35,7 @@ static bool chown_ok(struct user_namespace *mnt_userns,
                     kuid_t uid)
 {
        kuid_t kuid = i_uid_into_mnt(mnt_userns, inode);
-       if (uid_eq(current_fsuid(), kuid) && uid_eq(uid, kuid))
+       if (uid_eq(current_fsuid(), kuid) && uid_eq(uid, inode->i_uid))
                return true;
        if (capable_wrt_inode_uidgid(mnt_userns, inode, CAP_CHOWN))
                return true;
@@ -62,7 +62,7 @@ static bool chgrp_ok(struct user_namespace *mnt_userns,
 {
        kgid_t kgid = i_gid_into_mnt(mnt_userns, inode);
        if (uid_eq(current_fsuid(), i_uid_into_mnt(mnt_userns, inode)) &&
-           (in_group_p(gid) || gid_eq(gid, kgid)))
+           (in_group_p(gid) || gid_eq(gid, inode->i_gid)))
                return true;
        if (capable_wrt_inode_uidgid(mnt_userns, inode, CAP_CHOWN))
                return true;
index 309516e..43c8995 100644 (file)
@@ -234,6 +234,13 @@ static void run_ordered_work(struct __btrfs_workqueue *wq,
                                  ordered_list);
                if (!test_bit(WORK_DONE_BIT, &work->flags))
                        break;
+               /*
+                * Orders all subsequent loads after reading WORK_DONE_BIT,
+                * paired with the smp_mb__before_atomic in btrfs_work_helper
+                * this guarantees that the ordered function will see all
+                * updates from ordinary work function.
+                */
+               smp_rmb();
 
                /*
                 * we are going to call the ordered done function, but
@@ -317,6 +324,13 @@ static void btrfs_work_helper(struct work_struct *normal_work)
        thresh_exec_hook(wq);
        work->func(work);
        if (need_order) {
+               /*
+                * Ensures all memory accesses done in the work function are
+                * ordered before setting the WORK_DONE_BIT. Ensuring the thread
+                * which is going to executed the ordered work sees them.
+                * Pairs with the smp_rmb in run_ordered_work.
+                */
+               smp_mb__before_atomic();
                set_bit(WORK_DONE_BIT, &work->flags);
                run_ordered_work(wq, work);
        } else {
index 59c3be8..514ead6 100644 (file)
@@ -3978,11 +3978,23 @@ static void btrfs_end_empty_barrier(struct bio *bio)
  */
 static void write_dev_flush(struct btrfs_device *device)
 {
-       struct request_queue *q = bdev_get_queue(device->bdev);
        struct bio *bio = device->flush_bio;
 
+#ifndef CONFIG_BTRFS_FS_CHECK_INTEGRITY
+       /*
+        * When a disk has write caching disabled, we skip submission of a bio
+        * with flush and sync requests before writing the superblock, since
+        * it's not needed. However when the integrity checker is enabled, this
+        * results in reports that there are metadata blocks referred by a
+        * superblock that were not properly flushed. So don't skip the bio
+        * submission only when the integrity checker is enabled for the sake
+        * of simplicity, since this is a debug tool and not meant for use in
+        * non-debug builds.
+        */
+       struct request_queue *q = bdev_get_queue(device->bdev);
        if (!test_bit(QUEUE_FLAG_WC, &q->queue_flags))
                return;
+#endif
 
        bio_reset(bio);
        bio->bi_end_io = btrfs_end_empty_barrier;
index fb8cc96..92138ac 100644 (file)
@@ -3985,6 +3985,10 @@ static long btrfs_ioctl_balance(struct file *file, void __user *arg)
        bool need_unlock; /* for mut. excl. ops lock */
        int ret;
 
+       if (!arg)
+               btrfs_warn(fs_info,
+       "IOC_BALANCE ioctl (v1) is deprecated and will be removed in kernel 5.18");
+
        if (!capable(CAP_SYS_ADMIN))
                return -EPERM;
 
index 65cb076..9febb80 100644 (file)
@@ -125,6 +125,7 @@ static inline size_t read_compress_length(const char *buf)
 static int copy_compressed_data_to_page(char *compressed_data,
                                        size_t compressed_size,
                                        struct page **out_pages,
+                                       unsigned long max_nr_page,
                                        u32 *cur_out,
                                        const u32 sectorsize)
 {
@@ -133,6 +134,9 @@ static int copy_compressed_data_to_page(char *compressed_data,
        struct page *cur_page;
        char *kaddr;
 
+       if ((*cur_out / PAGE_SIZE) >= max_nr_page)
+               return -E2BIG;
+
        /*
         * We never allow a segment header crossing sector boundary, previous
         * run should ensure we have enough space left inside the sector.
@@ -161,6 +165,10 @@ static int copy_compressed_data_to_page(char *compressed_data,
                                     orig_out + compressed_size - *cur_out);
 
                kunmap(cur_page);
+
+               if ((*cur_out / PAGE_SIZE) >= max_nr_page)
+                       return -E2BIG;
+
                cur_page = out_pages[*cur_out / PAGE_SIZE];
                /* Allocate a new page */
                if (!cur_page) {
@@ -203,6 +211,7 @@ int lzo_compress_pages(struct list_head *ws, struct address_space *mapping,
        const u32 sectorsize = btrfs_sb(mapping->host->i_sb)->sectorsize;
        struct page *page_in = NULL;
        char *sizes_ptr;
+       const unsigned long max_nr_page = *out_pages;
        int ret = 0;
        /* Points to the file offset of input data */
        u64 cur_in = start;
@@ -210,6 +219,7 @@ int lzo_compress_pages(struct list_head *ws, struct address_space *mapping,
        u32 cur_out = 0;
        u32 len = *total_out;
 
+       ASSERT(max_nr_page > 0);
        *out_pages = 0;
        *total_out = 0;
        *total_in = 0;
@@ -248,7 +258,8 @@ int lzo_compress_pages(struct list_head *ws, struct address_space *mapping,
                }
 
                ret = copy_compressed_data_to_page(workspace->cbuf, out_len,
-                                                  pages, &cur_out, sectorsize);
+                                                  pages, max_nr_page,
+                                                  &cur_out, sectorsize);
                if (ret < 0)
                        goto out;
 
index cf82ea6..8f6ceea 100644 (file)
@@ -73,8 +73,8 @@ struct scrub_page {
        u64                     physical_for_dev_replace;
        atomic_t                refs;
        u8                      mirror_num;
-       int                     have_csum:1;
-       int                     io_error:1;
+       unsigned int            have_csum:1;
+       unsigned int            io_error:1;
        u8                      csum[BTRFS_CSUM_SIZE];
 
        struct scrub_recover    *recover;
index 61ac57b..0997e3c 100644 (file)
@@ -7558,6 +7558,19 @@ int btrfs_read_chunk_tree(struct btrfs_fs_info *fs_info)
         */
        fs_info->fs_devices->total_rw_bytes = 0;
 
+       /*
+        * Lockdep complains about possible circular locking dependency between
+        * a disk's open_mutex (struct gendisk.open_mutex), the rw semaphores
+        * used for freeze procection of a fs (struct super_block.s_writers),
+        * which we take when starting a transaction, and extent buffers of the
+        * chunk tree if we call read_one_dev() while holding a lock on an
+        * extent buffer of the chunk tree. Since we are mounting the filesystem
+        * and at this point there can't be any concurrent task modifying the
+        * chunk tree, to keep it simple, just skip locking on the chunk tree.
+        */
+       ASSERT(!test_bit(BTRFS_FS_OPEN, &fs_info->flags));
+       path->skip_locking = 1;
+
        /*
         * Read all device items, and then all the chunk items. All
         * device items are found before any chunk item (their object id
@@ -7583,10 +7596,6 @@ int btrfs_read_chunk_tree(struct btrfs_fs_info *fs_info)
                                goto error;
                        break;
                }
-               /*
-                * The nodes on level 1 are not locked but we don't need to do
-                * that during mount time as nothing else can access the tree
-                */
                node = path->nodes[1];
                if (node) {
                        if (last_ra_node != node->start) {
@@ -7614,7 +7623,6 @@ int btrfs_read_chunk_tree(struct btrfs_fs_info *fs_info)
                         * requirement for chunk allocation, see the comment on
                         * top of btrfs_chunk_alloc() for details.
                         */
-                       ASSERT(!test_bit(BTRFS_FS_OPEN, &fs_info->flags));
                        chunk = btrfs_item_ptr(leaf, slot, struct btrfs_chunk);
                        ret = read_one_chunk(&found_key, leaf, chunk);
                        if (ret)
index 12bde7b..23a1ed2 100644 (file)
@@ -393,26 +393,14 @@ static void cifs_put_swn_reg(struct cifs_swn_reg *swnreg)
 
 static int cifs_swn_resource_state_changed(struct cifs_swn_reg *swnreg, const char *name, int state)
 {
-       int i;
-
        switch (state) {
        case CIFS_SWN_RESOURCE_STATE_UNAVAILABLE:
                cifs_dbg(FYI, "%s: resource name '%s' become unavailable\n", __func__, name);
-               for (i = 0; i < swnreg->tcon->ses->chan_count; i++) {
-                       spin_lock(&GlobalMid_Lock);
-                       if (swnreg->tcon->ses->chans[i].server->tcpStatus != CifsExiting)
-                               swnreg->tcon->ses->chans[i].server->tcpStatus = CifsNeedReconnect;
-                       spin_unlock(&GlobalMid_Lock);
-               }
+               cifs_ses_mark_for_reconnect(swnreg->tcon->ses);
                break;
        case CIFS_SWN_RESOURCE_STATE_AVAILABLE:
                cifs_dbg(FYI, "%s: resource name '%s' become available\n", __func__, name);
-               for (i = 0; i < swnreg->tcon->ses->chan_count; i++) {
-                       spin_lock(&GlobalMid_Lock);
-                       if (swnreg->tcon->ses->chans[i].server->tcpStatus != CifsExiting)
-                               swnreg->tcon->ses->chans[i].server->tcpStatus = CifsNeedReconnect;
-                       spin_unlock(&GlobalMid_Lock);
-               }
+               cifs_ses_mark_for_reconnect(swnreg->tcon->ses);
                break;
        case CIFS_SWN_RESOURCE_STATE_UNKNOWN:
                cifs_dbg(FYI, "%s: resource name '%s' changed to unknown state\n", __func__, name);
index f3073a6..4f5a3e8 100644 (file)
@@ -599,6 +599,7 @@ int cifs_try_adding_channels(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses)
 bool is_server_using_iface(struct TCP_Server_Info *server,
                           struct cifs_server_iface *iface);
 bool is_ses_using_iface(struct cifs_ses *ses, struct cifs_server_iface *iface);
+void cifs_ses_mark_for_reconnect(struct cifs_ses *ses);
 
 void extract_unc_hostname(const char *unc, const char **h, size_t *len);
 int copy_path_name(char *dst, const char *src);
index 82577a7..67e4c55 100644 (file)
@@ -1452,8 +1452,10 @@ cifs_get_tcp_session(struct smb3_fs_context *ctx,
        tcp_ses->max_in_flight = 0;
        tcp_ses->credits = 1;
        if (primary_server) {
+               spin_lock(&cifs_tcp_ses_lock);
                ++primary_server->srv_count;
                tcp_ses->primary_server = primary_server;
+               spin_unlock(&cifs_tcp_ses_lock);
        }
        init_waitqueue_head(&tcp_ses->response_q);
        init_waitqueue_head(&tcp_ses->request_q);
@@ -4111,18 +4113,6 @@ cifs_prune_tlinks(struct work_struct *work)
 }
 
 #ifdef CONFIG_CIFS_DFS_UPCALL
-static void mark_tcon_tcp_ses_for_reconnect(struct cifs_tcon *tcon)
-{
-       int i;
-
-       for (i = 0; i < tcon->ses->chan_count; i++) {
-               spin_lock(&GlobalMid_Lock);
-               if (tcon->ses->chans[i].server->tcpStatus != CifsExiting)
-                       tcon->ses->chans[i].server->tcpStatus = CifsNeedReconnect;
-               spin_unlock(&GlobalMid_Lock);
-       }
-}
-
 /* Update dfs referral path of superblock */
 static int update_server_fullpath(struct TCP_Server_Info *server, struct cifs_sb_info *cifs_sb,
                                  const char *target)
@@ -4299,7 +4289,7 @@ static int tree_connect_dfs_target(const unsigned int xid, struct cifs_tcon *tco
         */
        if (rc && server->current_fullpath != server->origin_fullpath) {
                server->current_fullpath = server->origin_fullpath;
-               mark_tcon_tcp_ses_for_reconnect(tcon);
+               cifs_ses_mark_for_reconnect(tcon->ses);
        }
 
        dfs_cache_free_tgts(tl);
index 5c1259d..e9b0fa2 100644 (file)
@@ -1355,12 +1355,7 @@ static void mark_for_reconnect_if_needed(struct cifs_tcon *tcon, struct dfs_cach
        }
 
        cifs_dbg(FYI, "%s: no cached or matched targets. mark dfs share for reconnect.\n", __func__);
-       for (i = 0; i < tcon->ses->chan_count; i++) {
-               spin_lock(&GlobalMid_Lock);
-               if (tcon->ses->chans[i].server->tcpStatus != CifsExiting)
-                       tcon->ses->chans[i].server->tcpStatus = CifsNeedReconnect;
-               spin_unlock(&GlobalMid_Lock);
-       }
+       cifs_ses_mark_for_reconnect(tcon->ses);
 }
 
 /* Refresh dfs referral of tcon and mark it for reconnect if needed */
index 2c10b18..8ad2993 100644 (file)
@@ -95,9 +95,9 @@ int cifs_try_adding_channels(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses)
        }
 
        if (!(ses->server->capabilities & SMB2_GLOBAL_CAP_MULTI_CHANNEL)) {
-               cifs_dbg(VFS, "server %s does not support multichannel\n", ses->server->hostname);
                ses->chan_max = 1;
                spin_unlock(&ses->chan_lock);
+               cifs_dbg(VFS, "server %s does not support multichannel\n", ses->server->hostname);
                return 0;
        }
        spin_unlock(&ses->chan_lock);
@@ -318,6 +318,19 @@ out:
        return rc;
 }
 
+/* Mark all session channels for reconnect */
+void cifs_ses_mark_for_reconnect(struct cifs_ses *ses)
+{
+       int i;
+
+       for (i = 0; i < ses->chan_count; i++) {
+               spin_lock(&GlobalMid_Lock);
+               if (ses->chans[i].server->tcpStatus != CifsExiting)
+                       ses->chans[i].server->tcpStatus = CifsNeedReconnect;
+               spin_unlock(&GlobalMid_Lock);
+       }
+}
+
 static __u32 cifs_ssetup_hdr(struct cifs_ses *ses, SESSION_SETUP_ANDX *pSMB)
 {
        __u32 capabilities = 0;
index 7235d53..d671084 100644 (file)
@@ -940,7 +940,7 @@ do_alloc:
                else if (height == ip->i_height)
                        ret = gfs2_hole_size(inode, lblock, len, mp, iomap);
                else
-                       iomap->length = size - pos;
+                       iomap->length = size - iomap->offset;
        } else if (flags & IOMAP_WRITE) {
                u64 alloc_size;
 
index adafaaf..3e718cf 100644 (file)
@@ -773,8 +773,8 @@ static inline bool should_fault_in_pages(ssize_t ret, struct iov_iter *i,
                                         size_t *prev_count,
                                         size_t *window_size)
 {
-       char __user *p = i->iov[0].iov_base + i->iov_offset;
        size_t count = iov_iter_count(i);
+       char __user *p;
        int pages = 1;
 
        if (likely(!count))
@@ -787,14 +787,14 @@ static inline bool should_fault_in_pages(ssize_t ret, struct iov_iter *i,
        if (*prev_count != count || !*window_size) {
                int pages, nr_dirtied;
 
-               pages = min_t(int, BIO_MAX_VECS,
-                             DIV_ROUND_UP(iov_iter_count(i), PAGE_SIZE));
+               pages = min_t(int, BIO_MAX_VECS, DIV_ROUND_UP(count, PAGE_SIZE));
                nr_dirtied = max(current->nr_dirtied_pause -
                                 current->nr_dirtied, 1);
                pages = min(pages, nr_dirtied);
        }
 
        *prev_count = count;
+       p = i->iov[0].iov_base + i->iov_offset;
        *window_size = (size_t)PAGE_SIZE * pages - offset_in_page(p);
        return true;
 }
@@ -1013,6 +1013,7 @@ static ssize_t gfs2_file_buffered_write(struct kiocb *iocb,
        struct gfs2_sbd *sdp = GFS2_SB(inode);
        struct gfs2_holder *statfs_gh = NULL;
        size_t prev_count = 0, window_size = 0;
+       size_t orig_count = iov_iter_count(from);
        size_t read = 0;
        ssize_t ret;
 
@@ -1057,6 +1058,7 @@ retry_under_glock:
        if (inode == sdp->sd_rindex)
                gfs2_glock_dq_uninit(statfs_gh);
 
+       from->count = orig_count - read;
        if (should_fault_in_pages(ret, from, &prev_count, &window_size)) {
                size_t leftover;
 
@@ -1064,6 +1066,7 @@ retry_under_glock:
                leftover = fault_in_iov_iter_readable(from, window_size);
                gfs2_holder_disallow_demote(gh);
                if (leftover != window_size) {
+                       from->count = min(from->count, window_size - leftover);
                        if (!gfs2_holder_queued(gh)) {
                                if (read)
                                        goto out_uninit;
index 19f38ae..8dbd6fe 100644 (file)
@@ -411,14 +411,14 @@ static void do_error(struct gfs2_glock *gl, const int ret)
 static void demote_incompat_holders(struct gfs2_glock *gl,
                                    struct gfs2_holder *new_gh)
 {
-       struct gfs2_holder *gh;
+       struct gfs2_holder *gh, *tmp;
 
        /*
         * Demote incompatible holders before we make ourselves eligible.
         * (This holder may or may not allow auto-demoting, but we don't want
         * to demote the new holder before it's even granted.)
         */
-       list_for_each_entry(gh, &gl->gl_holders, gh_list) {
+       list_for_each_entry_safe(gh, tmp, &gl->gl_holders, gh_list) {
                /*
                 * Since holders are at the front of the list, we stop when we
                 * find the first non-holder.
@@ -496,7 +496,7 @@ again:
         * Since we unlock the lockref lock, we set a flag to indicate
         * instantiate is in progress.
         */
-       if (test_bit(GLF_INSTANTIATE_IN_PROG, &gl->gl_flags)) {
+       if (test_and_set_bit(GLF_INSTANTIATE_IN_PROG, &gl->gl_flags)) {
                wait_on_bit(&gl->gl_flags, GLF_INSTANTIATE_IN_PROG,
                            TASK_UNINTERRUPTIBLE);
                /*
@@ -509,14 +509,10 @@ again:
                goto again;
        }
 
-       set_bit(GLF_INSTANTIATE_IN_PROG, &gl->gl_flags);
-
        ret = glops->go_instantiate(gh);
        if (!ret)
                clear_bit(GLF_INSTANTIATE_NEEDED, &gl->gl_flags);
-       clear_bit(GLF_INSTANTIATE_IN_PROG, &gl->gl_flags);
-       smp_mb__after_atomic();
-       wake_up_bit(&gl->gl_flags, GLF_INSTANTIATE_IN_PROG);
+       clear_and_wake_up_bit(GLF_INSTANTIATE_IN_PROG, &gl->gl_flags);
        return ret;
 }
 
index 5b12137..0f93e8b 100644 (file)
@@ -1402,13 +1402,6 @@ out:
        gfs2_ordered_del_inode(ip);
        clear_inode(inode);
        gfs2_dir_hash_inval(ip);
-       if (ip->i_gl) {
-               glock_clear_object(ip->i_gl, ip);
-               wait_on_bit_io(&ip->i_flags, GIF_GLOP_PENDING, TASK_UNINTERRUPTIBLE);
-               gfs2_glock_add_to_lru(ip->i_gl);
-               gfs2_glock_put_eventually(ip->i_gl);
-               ip->i_gl = NULL;
-       }
        if (gfs2_holder_initialized(&ip->i_iopen_gh)) {
                struct gfs2_glock *gl = ip->i_iopen_gh.gh_gl;
 
@@ -1421,6 +1414,13 @@ out:
                gfs2_holder_uninit(&ip->i_iopen_gh);
                gfs2_glock_put_eventually(gl);
        }
+       if (ip->i_gl) {
+               glock_clear_object(ip->i_gl, ip);
+               wait_on_bit_io(&ip->i_flags, GIF_GLOP_PENDING, TASK_UNINTERRUPTIBLE);
+               gfs2_glock_add_to_lru(ip->i_gl);
+               gfs2_glock_put_eventually(ip->i_gl);
+               ip->i_gl = NULL;
+       }
 }
 
 static struct inode *gfs2_alloc_inode(struct super_block *sb)
index b2a1d96..5a93a5d 100644 (file)
@@ -288,11 +288,8 @@ nfsd4_decode_bitmap4(struct nfsd4_compoundargs *argp, u32 *bmval, u32 bmlen)
        p = xdr_inline_decode(argp->xdr, count << 2);
        if (!p)
                return nfserr_bad_xdr;
-       i = 0;
-       while (i < count)
-               bmval[i++] = be32_to_cpup(p++);
-       while (i < bmlen)
-               bmval[i++] = 0;
+       for (i = 0; i < bmlen; i++)
+               bmval[i] = (i < count) ? be32_to_cpup(p++) : 0;
 
        return nfs_ok;
 }
index 30a3b66..509f851 100644 (file)
@@ -154,9 +154,13 @@ ssize_t read_from_oldmem(char *buf, size_t count,
                        nr_bytes = count;
 
                /* If pfn is not ram, return zeros for sparse dump files */
-               if (!pfn_is_ram(pfn))
-                       memset(buf, 0, nr_bytes);
-               else {
+               if (!pfn_is_ram(pfn)) {
+                       tmp = 0;
+                       if (!userbuf)
+                               memset(buf, 0, nr_bytes);
+                       else if (clear_user(buf, nr_bytes))
+                               tmp = -EFAULT;
+               } else {
                        if (encrypted)
                                tmp = copy_oldmem_page_encrypted(pfn, buf,
                                                                 nr_bytes,
@@ -165,12 +169,12 @@ ssize_t read_from_oldmem(char *buf, size_t count,
                        else
                                tmp = copy_oldmem_page(pfn, buf, nr_bytes,
                                                       offset, userbuf);
-
-                       if (tmp < 0) {
-                               up_read(&vmcore_cb_rwsem);
-                               return tmp;
-                       }
                }
+               if (tmp < 0) {
+                       up_read(&vmcore_cb_rwsem);
+                       return tmp;
+               }
+
                *ppos += nr_bytes;
                count -= nr_bytes;
                buf += nr_bytes;
index 328da35..8adabde 100644 (file)
@@ -173,7 +173,6 @@ config PSTORE_BLK
        tristate "Log panic/oops to a block device"
        depends on PSTORE
        depends on BLOCK
-       depends on BROKEN
        select PSTORE_ZONE
        default n
        help
index 5d1fbaf..4ae0cfc 100644 (file)
@@ -309,7 +309,7 @@ static int __init __best_effort_init(void)
        if (ret)
                kfree(best_effort_dev);
        else
-               pr_info("attached %s (%zu) (no dedicated panic_write!)\n",
+               pr_info("attached %s (%lu) (no dedicated panic_write!)\n",
                        blkdev, best_effort_dev->zone.total_size);
 
        return ret;
index 70abdfa..42e3e55 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/mm.h>
 #include <linux/slab.h>
 #include <linux/bio.h>
+#include <linux/iversion.h>
 
 #include "udf_i.h"
 #include "udf_sb.h"
@@ -43,7 +44,7 @@ static int udf_readdir(struct file *file, struct dir_context *ctx)
        struct fileIdentDesc *fi = NULL;
        struct fileIdentDesc cfi;
        udf_pblk_t block, iblock;
-       loff_t nf_pos;
+       loff_t nf_pos, emit_pos = 0;
        int flen;
        unsigned char *fname = NULL, *copy_name = NULL;
        unsigned char *nameptr;
@@ -57,6 +58,7 @@ static int udf_readdir(struct file *file, struct dir_context *ctx)
        int i, num, ret = 0;
        struct extent_position epos = { NULL, 0, {0, 0} };
        struct super_block *sb = dir->i_sb;
+       bool pos_valid = false;
 
        if (ctx->pos == 0) {
                if (!dir_emit_dot(file, ctx))
@@ -67,6 +69,21 @@ static int udf_readdir(struct file *file, struct dir_context *ctx)
        if (nf_pos >= size)
                goto out;
 
+       /*
+        * Something changed since last readdir (either lseek was called or dir
+        * changed)?  We need to verify the position correctly points at the
+        * beginning of some dir entry so that the directory parsing code does
+        * not get confused. Since UDF does not have any reliable way of
+        * identifying beginning of dir entry (names are under user control),
+        * we need to scan the directory from the beginning.
+        */
+       if (!inode_eq_iversion(dir, file->f_version)) {
+               emit_pos = nf_pos;
+               nf_pos = 0;
+       } else {
+               pos_valid = true;
+       }
+
        fname = kmalloc(UDF_NAME_LEN, GFP_NOFS);
        if (!fname) {
                ret = -ENOMEM;
@@ -122,13 +139,21 @@ static int udf_readdir(struct file *file, struct dir_context *ctx)
 
        while (nf_pos < size) {
                struct kernel_lb_addr tloc;
+               loff_t cur_pos = nf_pos;
 
-               ctx->pos = (nf_pos >> 2) + 1;
+               /* Update file position only if we got past the current one */
+               if (nf_pos >= emit_pos) {
+                       ctx->pos = (nf_pos >> 2) + 1;
+                       pos_valid = true;
+               }
 
                fi = udf_fileident_read(dir, &nf_pos, &fibh, &cfi, &epos, &eloc,
                                        &elen, &offset);
                if (!fi)
                        goto out;
+               /* Still not at offset where user asked us to read from? */
+               if (cur_pos < emit_pos)
+                       continue;
 
                liu = le16_to_cpu(cfi.lengthOfImpUse);
                lfi = cfi.lengthFileIdent;
@@ -186,8 +211,11 @@ static int udf_readdir(struct file *file, struct dir_context *ctx)
        } /* end while */
 
        ctx->pos = (nf_pos >> 2) + 1;
+       pos_valid = true;
 
 out:
+       if (pos_valid)
+               file->f_version = inode_query_iversion(dir);
        if (fibh.sbh != fibh.ebh)
                brelse(fibh.ebh);
        brelse(fibh.sbh);
index caeef08..0ed4861 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/sched.h>
 #include <linux/crc-itu-t.h>
 #include <linux/exportfs.h>
+#include <linux/iversion.h>
 
 static inline int udf_match(int len1, const unsigned char *name1, int len2,
                            const unsigned char *name2)
@@ -134,6 +135,8 @@ int udf_write_fi(struct inode *inode, struct fileIdentDesc *cfi,
                        mark_buffer_dirty_inode(fibh->ebh, inode);
                mark_buffer_dirty_inode(fibh->sbh, inode);
        }
+       inode_inc_iversion(inode);
+
        return 0;
 }
 
index 34247fb..f26b5e0 100644 (file)
@@ -57,6 +57,7 @@
 #include <linux/crc-itu-t.h>
 #include <linux/log2.h>
 #include <asm/byteorder.h>
+#include <linux/iversion.h>
 
 #include "udf_sb.h"
 #include "udf_i.h"
@@ -149,6 +150,7 @@ static struct inode *udf_alloc_inode(struct super_block *sb)
        init_rwsem(&ei->i_data_sem);
        ei->cached_extent.lstart = -1;
        spin_lock_init(&ei->i_extent_cache_lock);
+       inode_set_iversion(&ei->vfs_inode, 1);
 
        return &ei->vfs_inode;
 }
diff --git a/include/dt-bindings/clock/r8a779f0-cpg-mssr.h b/include/dt-bindings/clock/r8a779f0-cpg-mssr.h
new file mode 100644 (file)
index 0000000..f2ae1c6
--- /dev/null
@@ -0,0 +1,64 @@
+/* SPDX-License-Identifier: (GPL-2.0 or MIT) */
+/*
+ * Copyright (C) 2021 Renesas Electronics Corp.
+ */
+#ifndef __DT_BINDINGS_CLOCK_R8A779F0_CPG_MSSR_H__
+#define __DT_BINDINGS_CLOCK_R8A779F0_CPG_MSSR_H__
+
+#include <dt-bindings/clock/renesas-cpg-mssr.h>
+
+/* r8a779f0 CPG Core Clocks */
+
+#define R8A779F0_CLK_ZX                        0
+#define R8A779F0_CLK_ZS                        1
+#define R8A779F0_CLK_ZT                        2
+#define R8A779F0_CLK_ZTR               3
+#define R8A779F0_CLK_S0D2              4
+#define R8A779F0_CLK_S0D3              5
+#define R8A779F0_CLK_S0D4              6
+#define R8A779F0_CLK_S0D2_MM           7
+#define R8A779F0_CLK_S0D3_MM           8
+#define R8A779F0_CLK_S0D4_MM           9
+#define R8A779F0_CLK_S0D2_RT           10
+#define R8A779F0_CLK_S0D3_RT           11
+#define R8A779F0_CLK_S0D4_RT           12
+#define R8A779F0_CLK_S0D6_RT           13
+#define R8A779F0_CLK_S0D3_PER          14
+#define R8A779F0_CLK_S0D6_PER          15
+#define R8A779F0_CLK_S0D12_PER         16
+#define R8A779F0_CLK_S0D24_PER         17
+#define R8A779F0_CLK_S0D2_HSC          18
+#define R8A779F0_CLK_S0D3_HSC          19
+#define R8A779F0_CLK_S0D4_HSC          20
+#define R8A779F0_CLK_S0D6_HSC          21
+#define R8A779F0_CLK_S0D12_HSC         22
+#define R8A779F0_CLK_S0D2_CC           23
+#define R8A779F0_CLK_CL                        24
+#define R8A779F0_CLK_CL16M             25
+#define R8A779F0_CLK_CL16M_MM          26
+#define R8A779F0_CLK_CL16M_RT          27
+#define R8A779F0_CLK_CL16M_PER         28
+#define R8A779F0_CLK_CL16M_HSC         29
+#define R8A779F0_CLK_Z0                        30
+#define R8A779F0_CLK_Z1                        31
+#define R8A779F0_CLK_ZB3               32
+#define R8A779F0_CLK_ZB3D2             33
+#define R8A779F0_CLK_ZB3D4             34
+#define R8A779F0_CLK_SD0H              35
+#define R8A779F0_CLK_SD0               36
+#define R8A779F0_CLK_RPC               37
+#define R8A779F0_CLK_RPCD2             38
+#define R8A779F0_CLK_MSO               39
+#define R8A779F0_CLK_SASYNCRT          40
+#define R8A779F0_CLK_SASYNCPERD1       41
+#define R8A779F0_CLK_SASYNCPERD2       42
+#define R8A779F0_CLK_SASYNCPERD4       43
+#define R8A779F0_CLK_DBGSOC_HSC                44
+#define R8A779F0_CLK_RSW2              45
+#define R8A779F0_CLK_OSC               46
+#define R8A779F0_CLK_ZR                        47
+#define R8A779F0_CLK_CPEX              48
+#define R8A779F0_CLK_CBFUSA            49
+#define R8A779F0_CLK_R                 50
+
+#endif /* __DT_BINDINGS_CLOCK_R8A779F0_CPG_MSSR_H__ */
index 318eb15..1758921 100644 (file)
 #define CLK_USB_OHCI0          91
 
 #define CLK_USB_OHCI1          93
-
+#define CLK_DRAM               94
 #define CLK_DRAM_VE            95
 #define CLK_DRAM_CSI           96
 #define CLK_DRAM_DEINTERLACE   97
index 30d2d15..5d4ada2 100644 (file)
 #define CLK_USB_OHCI1          93
 #define CLK_USB_OHCI2          94
 #define CLK_USB_OHCI3          95
-
+#define CLK_DRAM               96
 #define CLK_DRAM_VE            97
 #define CLK_DRAM_CSI           98
 #define CLK_DRAM_DEINTERLACE   99
index 2c82072..8d7e66e 100644 (file)
@@ -4,11 +4,31 @@
 #ifndef DT_BINDINGS_CLOCK_TEGRA234_CLOCK_H
 #define DT_BINDINGS_CLOCK_TEGRA234_CLOCK_H
 
+/**
+ * @file
+ * @defgroup bpmp_clock_ids Clock ID's
+ * @{
+ */
+/**
+ * @brief controls the EMC clock frequency.
+ * @details Doing a clk_set_rate on this clock will select the
+ * appropriate clock source, program the source rate and execute a
+ * specific sequence to switch to the new clock source for both memory
+ * controllers. This can be used to control the balance between memory
+ * throughput and memory controller power.
+ */
+#define TEGRA234_CLK_EMC                       31U
 /** @brief output of gate CLK_ENB_FUSE */
-#define TEGRA234_CLK_FUSE                      40
+#define TEGRA234_CLK_FUSE                      40U
 /** @brief output of mux controlled by CLK_RST_CONTROLLER_CLK_SOURCE_SDMMC4 */
-#define TEGRA234_CLK_SDMMC4                    123
+#define TEGRA234_CLK_SDMMC4                    123U
 /** @brief output of mux controlled by CLK_RST_CONTROLLER_CLK_SOURCE_UARTA */
-#define TEGRA234_CLK_UARTA                     155
+#define TEGRA234_CLK_UARTA                     155U
+/** @brief CLK_RST_CONTROLLER_CLK_SOURCE_SDMMC_LEGACY_TM switch divider output */
+#define TEGRA234_CLK_SDMMC_LEGACY_TM           219U
+/** @brief PLL controlled by CLK_RST_CONTROLLER_PLLC4_BASE */
+#define TEGRA234_CLK_PLLC4                     237U
+/** @brief 32K input clock provided by PMIC */
+#define TEGRA234_CLK_CLK_32K                   289U
 
 #endif
diff --git a/include/dt-bindings/memory/tegra234-mc.h b/include/dt-bindings/memory/tegra234-mc.h
new file mode 100644 (file)
index 0000000..2662f70
--- /dev/null
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
+
+#ifndef DT_BINDINGS_MEMORY_TEGRA234_MC_H
+#define DT_BINDINGS_MEMORY_TEGRA234_MC_H
+
+/* special clients */
+#define TEGRA234_SID_INVALID           0x00
+#define TEGRA234_SID_PASSTHROUGH       0x7f
+
+
+/* NISO1 stream IDs */
+#define TEGRA234_SID_SDMMC4    0x02
+#define TEGRA234_SID_BPMP      0x10
+
+/*
+ * memory client IDs
+ */
+
+/* sdmmcd memory read client */
+#define TEGRA234_MEMORY_CLIENT_SDMMCRAB 0x63
+/* sdmmcd memory write client */
+#define TEGRA234_MEMORY_CLIENT_SDMMCWAB 0x67
+/* BPMP read client */
+#define TEGRA234_MEMORY_CLIENT_BPMPR 0x93
+/* BPMP write client */
+#define TEGRA234_MEMORY_CLIENT_BPMPW 0x94
+/* BPMPDMA read client */
+#define TEGRA234_MEMORY_CLIENT_BPMPDMAR 0x95
+/* BPMPDMA write client */
+#define TEGRA234_MEMORY_CLIENT_BPMPDMAW 0x96
+
+#endif
index e085f10..63e038e 100644 (file)
@@ -38,4 +38,7 @@
 #define AM64X_IOPAD(pa, val, muxmode)          (((pa) & 0x1fff)) ((val) | (muxmode))
 #define AM64X_MCU_IOPAD(pa, val, muxmode)      (((pa) & 0x1fff)) ((val) | (muxmode))
 
+#define J721S2_IOPAD(pa, val, muxmode)         (((pa) & 0x1fff)) ((val) | (muxmode))
+#define J721S2_WKUP_IOPAD(pa, val, muxmode)    (((pa) & 0x1fff)) ((val) | (muxmode))
+
 #endif
index b183250..9509706 100644 (file)
 #define EXYNOS5260_PIN_DRV_LV4         2
 #define EXYNOS5260_PIN_DRV_LV6         3
 
-/* Drive strengths for Exynos5410, Exynos542x and Exynos5800 */
+/*
+ * Drive strengths for Exynos5410, Exynos542x, Exynos5800 and Exynos850 (except
+ * GPIO_HSI block)
+ */
 #define EXYNOS5420_PIN_DRV_LV1         0
 #define EXYNOS5420_PIN_DRV_LV2         1
 #define EXYNOS5420_PIN_DRV_LV3         2
 #define EXYNOS5433_PIN_DRV_SLOW_SR5    0xc
 #define EXYNOS5433_PIN_DRV_SLOW_SR6    0xf
 
+/* Drive strengths for Exynos850 GPIO_HSI block */
+#define EXYNOS850_HSI_PIN_DRV_LV1      0       /* 1x   */
+#define EXYNOS850_HSI_PIN_DRV_LV1_5    1       /* 1.5x */
+#define EXYNOS850_HSI_PIN_DRV_LV2      2       /* 2x   */
+#define EXYNOS850_HSI_PIN_DRV_LV2_5    3       /* 2.5x */
+#define EXYNOS850_HSI_PIN_DRV_LV3      4       /* 3x   */
+#define EXYNOS850_HSI_PIN_DRV_LV4      5       /* 4x   */
+
 #define EXYNOS_PIN_FUNC_INPUT          0
 #define EXYNOS_PIN_FUNC_OUTPUT         1
 #define EXYNOS_PIN_FUNC_2              2
diff --git a/include/dt-bindings/power/imx8ulp-power.h b/include/dt-bindings/power/imx8ulp-power.h
new file mode 100644 (file)
index 0000000..a556b2e
--- /dev/null
@@ -0,0 +1,26 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
+/*
+ *  Copyright 2021 NXP
+ */
+
+#ifndef __DT_BINDINGS_IMX8ULP_POWER_H__
+#define __DT_BINDINGS_IMX8ULP_POWER_H__
+
+#define IMX8ULP_PD_DMA1                0
+#define IMX8ULP_PD_FLEXSPI2    1
+#define IMX8ULP_PD_USB0                2
+#define IMX8ULP_PD_USDHC0      3
+#define IMX8ULP_PD_USDHC1      4
+#define IMX8ULP_PD_USDHC2_USB1 5
+#define IMX8ULP_PD_DCNANO      6
+#define IMX8ULP_PD_EPDC                7
+#define IMX8ULP_PD_DMA2                8
+#define IMX8ULP_PD_GPU2D       9
+#define IMX8ULP_PD_GPU3D       10
+#define IMX8ULP_PD_HIFI4       11
+#define IMX8ULP_PD_ISI         12
+#define IMX8ULP_PD_MIPI_CSI    13
+#define IMX8ULP_PD_MIPI_DSI    14
+#define IMX8ULP_PD_PXP         15
+
+#endif
diff --git a/include/dt-bindings/power/r8a779f0-sysc.h b/include/dt-bindings/power/r8a779f0-sysc.h
new file mode 100644 (file)
index 0000000..0ec8ad7
--- /dev/null
@@ -0,0 +1,30 @@
+/* SPDX-License-Identifier: (GPL-2.0 or MIT) */
+/*
+ * Copyright (C) 2021 Renesas Electronics Corp.
+ */
+#ifndef __DT_BINDINGS_POWER_R8A779F0_SYSC_H__
+#define __DT_BINDINGS_POWER_R8A779F0_SYSC_H__
+
+/*
+ * These power domain indices match the Power Domain Register Numbers (PDR)
+ */
+
+#define R8A779F0_PD_A1E0D0C0           0
+#define R8A779F0_PD_A1E0D0C1           1
+#define R8A779F0_PD_A1E0D1C0           2
+#define R8A779F0_PD_A1E0D1C1           3
+#define R8A779F0_PD_A1E1D0C0           4
+#define R8A779F0_PD_A1E1D0C1           5
+#define R8A779F0_PD_A1E1D1C0           6
+#define R8A779F0_PD_A1E1D1C1           7
+#define R8A779F0_PD_A2E0D0             16
+#define R8A779F0_PD_A2E0D1             17
+#define R8A779F0_PD_A2E1D0             18
+#define R8A779F0_PD_A2E1D1             19
+#define R8A779F0_PD_A3E0               20
+#define R8A779F0_PD_A3E1               21
+
+/* Always-on power area */
+#define R8A779F0_PD_ALWAYS_ON          64
+
+#endif /* __DT_BINDINGS_POWER_R8A779A0_SYSC_H__*/
index b3c63be..50e13bc 100644 (file)
@@ -4,7 +4,15 @@
 #ifndef DT_BINDINGS_RESET_TEGRA234_RESET_H
 #define DT_BINDINGS_RESET_TEGRA234_RESET_H
 
-#define TEGRA234_RESET_SDMMC4                  85
-#define TEGRA234_RESET_UARTA                   100
+/**
+ * @file
+ * @defgroup bpmp_reset_ids Reset ID's
+ * @brief Identifiers for Resets controllable by firmware
+ * @{
+ */
+#define TEGRA234_RESET_SDMMC4                  85U
+#define TEGRA234_RESET_UARTA                   100U
+
+/** @} */
 
 #endif
diff --git a/include/dt-bindings/soc/samsung,exynos-usi.h b/include/dt-bindings/soc/samsung,exynos-usi.h
new file mode 100644 (file)
index 0000000..a01af16
--- /dev/null
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2021 Linaro Ltd.
+ * Author: Sam Protsenko <semen.protsenko@linaro.org>
+ *
+ * Device Tree bindings for Samsung Exynos USI (Universal Serial Interface).
+ */
+
+#ifndef __DT_BINDINGS_SAMSUNG_EXYNOS_USI_H
+#define __DT_BINDINGS_SAMSUNG_EXYNOS_USI_H
+
+#define USI_V2_NONE            0
+#define USI_V2_UART            1
+#define USI_V2_SPI             2
+#define USI_V2_I2C             3
+
+#endif /* __DT_BINDINGS_SAMSUNG_EXYNOS_USI_H */
index 143ce7e..668d007 100644 (file)
@@ -974,6 +974,15 @@ static inline int acpi_get_local_address(acpi_handle handle, u32 *addr)
        return -ENODEV;
 }
 
+static inline int acpi_register_wakeup_handler(int wake_irq,
+       bool (*wakeup)(void *context), void *context)
+{
+       return -ENXIO;
+}
+
+static inline void acpi_unregister_wakeup_handler(
+       bool (*wakeup)(void *context), void *context) { }
+
 #endif /* !CONFIG_ACPI */
 
 #ifdef CONFIG_ACPI_HOTPLUG_IOAPIC
index f715e88..e7a163a 100644 (file)
@@ -193,7 +193,7 @@ struct bpf_map {
        atomic64_t usercnt;
        struct work_struct work;
        struct mutex freeze_mutex;
-       u64 writecnt; /* writable mmap cnt; protected by freeze_mutex */
+       atomic64_t writecnt;
 };
 
 static inline bool map_value_has_spin_lock(const struct bpf_map *map)
@@ -1419,6 +1419,7 @@ void bpf_map_put(struct bpf_map *map);
 void *bpf_map_area_alloc(u64 size, int numa_node);
 void *bpf_map_area_mmapable_alloc(u64 size, int numa_node);
 void bpf_map_area_free(void *base);
+bool bpf_map_write_active(const struct bpf_map *map);
 void bpf_map_init_from_attr(struct bpf_map *map, union bpf_attr *attr);
 int  generic_map_lookup_batch(struct bpf_map *map,
                              const union bpf_attr *attr,
index c137396..ba025ae 100644 (file)
@@ -128,6 +128,13 @@ static inline void resv_map_dup_hugetlb_cgroup_uncharge_info(
                css_get(resv_map->css);
 }
 
+static inline void resv_map_put_hugetlb_cgroup_uncharge_info(
+                                               struct resv_map *resv_map)
+{
+       if (resv_map->css)
+               css_put(resv_map->css);
+}
+
 extern int hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages,
                                        struct hugetlb_cgroup **ptr);
 extern int hugetlb_cgroup_charge_cgroup_rsvd(int idx, unsigned long nr_pages,
@@ -211,6 +218,11 @@ static inline void resv_map_dup_hugetlb_cgroup_uncharge_info(
 {
 }
 
+static inline void resv_map_put_hugetlb_cgroup_uncharge_info(
+                                               struct resv_map *resv_map)
+{
+}
+
 static inline int hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages,
                                               struct hugetlb_cgroup **ptr)
 {
index 05e2277..b75395e 100644 (file)
@@ -131,6 +131,16 @@ static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns)
        return ns;
 }
 
+static inline struct ipc_namespace *get_ipc_ns_not_zero(struct ipc_namespace *ns)
+{
+       if (ns) {
+               if (refcount_inc_not_zero(&ns->ns.count))
+                       return ns;
+       }
+
+       return NULL;
+}
+
 extern void put_ipc_ns(struct ipc_namespace *ns);
 #else
 static inline struct ipc_namespace *copy_ipcs(unsigned long flags,
@@ -147,6 +157,11 @@ static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns)
        return ns;
 }
 
+static inline struct ipc_namespace *get_ipc_ns_not_zero(struct ipc_namespace *ns)
+{
+       return ns;
+}
+
 static inline void put_ipc_ns(struct ipc_namespace *ns)
 {
 }
index 9e0667e..c310648 100644 (file)
@@ -874,7 +874,7 @@ void kvm_release_pfn_dirty(kvm_pfn_t pfn);
 void kvm_set_pfn_dirty(kvm_pfn_t pfn);
 void kvm_set_pfn_accessed(kvm_pfn_t pfn);
 
-void kvm_release_pfn(kvm_pfn_t pfn, bool dirty, struct gfn_to_pfn_cache *cache);
+void kvm_release_pfn(kvm_pfn_t pfn, bool dirty);
 int kvm_read_guest_page(struct kvm *kvm, gfn_t gfn, void *data, int offset,
                        int len);
 int kvm_read_guest(struct kvm *kvm, gpa_t gpa, void *data, unsigned long len);
@@ -950,12 +950,8 @@ struct kvm_memory_slot *kvm_vcpu_gfn_to_memslot(struct kvm_vcpu *vcpu, gfn_t gfn
 kvm_pfn_t kvm_vcpu_gfn_to_pfn_atomic(struct kvm_vcpu *vcpu, gfn_t gfn);
 kvm_pfn_t kvm_vcpu_gfn_to_pfn(struct kvm_vcpu *vcpu, gfn_t gfn);
 int kvm_vcpu_map(struct kvm_vcpu *vcpu, gpa_t gpa, struct kvm_host_map *map);
-int kvm_map_gfn(struct kvm_vcpu *vcpu, gfn_t gfn, struct kvm_host_map *map,
-               struct gfn_to_pfn_cache *cache, bool atomic);
 struct page *kvm_vcpu_gfn_to_page(struct kvm_vcpu *vcpu, gfn_t gfn);
 void kvm_vcpu_unmap(struct kvm_vcpu *vcpu, struct kvm_host_map *map, bool dirty);
-int kvm_unmap_gfn(struct kvm_vcpu *vcpu, struct kvm_host_map *map,
-                 struct gfn_to_pfn_cache *cache, bool dirty, bool atomic);
 unsigned long kvm_vcpu_gfn_to_hva(struct kvm_vcpu *vcpu, gfn_t gfn);
 unsigned long kvm_vcpu_gfn_to_hva_prot(struct kvm_vcpu *vcpu, gfn_t gfn, bool *writable);
 int kvm_vcpu_read_guest_page(struct kvm_vcpu *vcpu, gfn_t gfn, void *data, int offset,
index 2237abb..234eab0 100644 (file)
@@ -53,13 +53,6 @@ struct gfn_to_hva_cache {
        struct kvm_memory_slot *memslot;
 };
 
-struct gfn_to_pfn_cache {
-       u64 generation;
-       gfn_t gfn;
-       kvm_pfn_t pfn;
-       bool dirty;
-};
-
 #ifdef KVM_ARCH_NR_OBJS_PER_MEMORY_CACHE
 /*
  * Memory caches are used to preallocate memory ahead of various MMU flows,
index 97afcea..8b18fe9 100644 (file)
@@ -145,13 +145,13 @@ u32 mlx5_eswitch_get_vport_metadata_for_set(struct mlx5_eswitch *esw,
        GENMASK(31 - ESW_TUN_ID_BITS - ESW_RESERVED_BITS, \
                ESW_TUN_OPTS_OFFSET + 1)
 
-u8 mlx5_eswitch_mode(struct mlx5_core_dev *dev);
+u8 mlx5_eswitch_mode(const struct mlx5_core_dev *dev);
 u16 mlx5_eswitch_get_total_vports(const struct mlx5_core_dev *dev);
 struct mlx5_core_dev *mlx5_eswitch_get_core_dev(struct mlx5_eswitch *esw);
 
 #else  /* CONFIG_MLX5_ESWITCH */
 
-static inline u8 mlx5_eswitch_mode(struct mlx5_core_dev *dev)
+static inline u8 mlx5_eswitch_mode(const struct mlx5_core_dev *dev)
 {
        return MLX5_ESWITCH_NONE;
 }
index bb8c6f5..c3a6e62 100644 (file)
@@ -105,7 +105,18 @@ struct page {
                        struct page_pool *pp;
                        unsigned long _pp_mapping_pad;
                        unsigned long dma_addr;
-                       atomic_long_t pp_frag_count;
+                       union {
+                               /**
+                                * dma_addr_upper: might require a 64-bit
+                                * value on 32-bit architectures.
+                                */
+                               unsigned long dma_addr_upper;
+                               /**
+                                * For frag page support, not supported in
+                                * 32-bit architectures with 64-bit DMA.
+                                */
+                               atomic_long_t pp_frag_count;
+                       };
                };
                struct {        /* slab, slob and slub */
                        union {
index 98a9371..ae4004e 100644 (file)
@@ -6,7 +6,6 @@
 #include <linux/preempt.h>
 #include <linux/smp.h>
 #include <linux/cpumask.h>
-#include <linux/printk.h>
 #include <linux/pfn.h>
 #include <linux/init.h>
 
index 85b656f..9497f6b 100644 (file)
@@ -198,6 +198,7 @@ void dump_stack_print_info(const char *log_lvl);
 void show_regs_print_info(const char *log_lvl);
 extern asmlinkage void dump_stack_lvl(const char *log_lvl) __cold;
 extern asmlinkage void dump_stack(void) __cold;
+void printk_trigger_flush(void);
 #else
 static inline __printf(1, 0)
 int vprintk(const char *s, va_list args)
@@ -274,6 +275,9 @@ static inline void dump_stack_lvl(const char *log_lvl)
 static inline void dump_stack(void)
 {
 }
+static inline void printk_trigger_flush(void)
+{
+}
 #endif
 
 #ifdef CONFIG_SMP
index 2350539..33a5064 100644 (file)
@@ -352,6 +352,7 @@ extern __must_check bool do_notify_parent(struct task_struct *, int);
 extern void __wake_up_parent(struct task_struct *p, struct task_struct *parent);
 extern void force_sig(int);
 extern void force_fatal_sig(int);
+extern void force_exit_sig(int);
 extern int send_sig(int, struct task_struct *, int);
 extern int zap_other_threads(struct task_struct *p);
 extern struct sigqueue *sigqueue_alloc(void);
index ba88a69..058d7f3 100644 (file)
@@ -158,7 +158,7 @@ static inline struct vm_struct *task_stack_vm_area(const struct task_struct *t)
  * Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring
  * subscriptions and synchronises with wait4().  Also used in procfs.  Also
  * pins the final release of task.io_context.  Also protects ->cpuset and
- * ->cgroup.subsys[]. And ->vfork_done.
+ * ->cgroup.subsys[]. And ->vfork_done. And ->sysvshm.shm_clist.
  *
  * Nests both inside and outside of read_lock(&tasklist_lock).
  * It must not be nested with write_lock_irq(&tasklist_lock),
diff --git a/include/linux/sdb.h b/include/linux/sdb.h
deleted file mode 100644 (file)
index a2404a2..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * This is the official version 1.1 of sdb.h
- */
-#ifndef __SDB_H__
-#define __SDB_H__
-#ifdef __KERNEL__
-#include <linux/types.h>
-#else
-#include <stdint.h>
-#endif
-
-/*
- * All structures are 64 bytes long and are expected
- * to live in an array, one for each interconnect.
- * Most fields of the structures are shared among the
- * various types, and most-specific fields are at the
- * beginning (for alignment reasons, and to keep the
- * magic number at the head of the interconnect record
- */
-
-/* Product, 40 bytes at offset 24, 8-byte aligned
- *
- * device_id is vendor-assigned; version is device-specific,
- * date is hex (e.g 0x20120501), name is UTF-8, blank-filled
- * and not terminated with a 0 byte.
- */
-struct sdb_product {
-       uint64_t                vendor_id;      /* 0x18..0x1f */
-       uint32_t                device_id;      /* 0x20..0x23 */
-       uint32_t                version;        /* 0x24..0x27 */
-       uint32_t                date;           /* 0x28..0x2b */
-       uint8_t                 name[19];       /* 0x2c..0x3e */
-       uint8_t                 record_type;    /* 0x3f */
-};
-
-/*
- * Component, 56 bytes at offset 8, 8-byte aligned
- *
- * The address range is first to last, inclusive
- * (for example 0x100000 - 0x10ffff)
- */
-struct sdb_component {
-       uint64_t                addr_first;     /* 0x08..0x0f */
-       uint64_t                addr_last;      /* 0x10..0x17 */
-       struct sdb_product      product;        /* 0x18..0x3f */
-};
-
-/* Type of the SDB record */
-enum sdb_record_type {
-       sdb_type_interconnect   = 0x00,
-       sdb_type_device         = 0x01,
-       sdb_type_bridge         = 0x02,
-       sdb_type_integration    = 0x80,
-       sdb_type_repo_url       = 0x81,
-       sdb_type_synthesis      = 0x82,
-       sdb_type_empty          = 0xFF,
-};
-
-/* Type 0: interconnect (first of the array)
- *
- * sdb_records is the length of the table including this first
- * record, version is 1. The bus type is enumerated later.
- */
-#define                                SDB_MAGIC       0x5344422d /* "SDB-" */
-struct sdb_interconnect {
-       uint32_t                sdb_magic;      /* 0x00-0x03 */
-       uint16_t                sdb_records;    /* 0x04-0x05 */
-       uint8_t                 sdb_version;    /* 0x06 */
-       uint8_t                 sdb_bus_type;   /* 0x07 */
-       struct sdb_component    sdb_component;  /* 0x08-0x3f */
-};
-
-/* Type 1: device
- *
- * class is 0 for "custom device", other values are
- * to be standardized; ABI version is for the driver,
- * bus-specific bits are defined by each bus (see below)
- */
-struct sdb_device {
-       uint16_t                abi_class;      /* 0x00-0x01 */
-       uint8_t                 abi_ver_major;  /* 0x02 */
-       uint8_t                 abi_ver_minor;  /* 0x03 */
-       uint32_t                bus_specific;   /* 0x04-0x07 */
-       struct sdb_component    sdb_component;  /* 0x08-0x3f */
-};
-
-/* Type 2: bridge
- *
- * child is the address of the nested SDB table
- */
-struct sdb_bridge {
-       uint64_t                sdb_child;      /* 0x00-0x07 */
-       struct sdb_component    sdb_component;  /* 0x08-0x3f */
-};
-
-/* Type 0x80: integration
- *
- * all types with bit 7 set are meta-information, so
- * software can ignore the types it doesn't know. Here we
- * just provide product information for an aggregate device
- */
-struct sdb_integration {
-       uint8_t                 reserved[24];   /* 0x00-0x17 */
-       struct sdb_product      product;        /* 0x08-0x3f */
-};
-
-/* Type 0x81: Top module repository url
- *
- * again, an informative field that software can ignore
- */
-struct sdb_repo_url {
-       uint8_t                 repo_url[63];   /* 0x00-0x3e */
-       uint8_t                 record_type;    /* 0x3f */
-};
-
-/* Type 0x82: Synthesis tool information
- *
- * this informative record
- */
-struct sdb_synthesis {
-       uint8_t                 syn_name[16];   /* 0x00-0x0f */
-       uint8_t                 commit_id[16];  /* 0x10-0x1f */
-       uint8_t                 tool_name[8];   /* 0x20-0x27 */
-       uint32_t                tool_version;   /* 0x28-0x2b */
-       uint32_t                date;           /* 0x2c-0x2f */
-       uint8_t                 user_name[15];  /* 0x30-0x3e */
-       uint8_t                 record_type;    /* 0x3f */
-};
-
-/* Type 0xff: empty
- *
- * this allows keeping empty slots during development,
- * so they can be filled later with minimal efforts and
- * no misleading description is ever shipped -- hopefully.
- * It can also be used to pad a table to a desired length.
- */
-struct sdb_empty {
-       uint8_t                 reserved[63];   /* 0x00-0x3e */
-       uint8_t                 record_type;    /* 0x3f */
-};
-
-/* The type of bus, for bus-specific flags */
-enum sdb_bus_type {
-       sdb_wishbone = 0x00,
-       sdb_data     = 0x01,
-};
-
-#define SDB_WB_WIDTH_MASK      0x0f
-#define SDB_WB_ACCESS8                 0x01
-#define SDB_WB_ACCESS16                        0x02
-#define SDB_WB_ACCESS32                        0x04
-#define SDB_WB_ACCESS64                        0x08
-#define SDB_WB_LITTLE_ENDIAN   0x80
-
-#define SDB_DATA_READ          0x04
-#define SDB_DATA_WRITE         0x02
-#define SDB_DATA_EXEC          0x01
-
-#endif /* __SDB_H__ */
index 686a666..c8cb7e6 100644 (file)
@@ -4226,7 +4226,7 @@ static inline void skb_remcsum_process(struct sk_buff *skb, void *ptr,
                return;
        }
 
-        if (unlikely(skb->ip_summed != CHECKSUM_COMPLETE)) {
+       if (unlikely(skb->ip_summed != CHECKSUM_COMPLETE)) {
                __skb_checksum_complete(skb);
                skb_postpull_rcsum(skb, skb->data, ptr - (void *)skb->data);
        }
index 50453b2..2d167ac 100644 (file)
@@ -673,7 +673,7 @@ struct trace_event_file {
 
 #define PERF_MAX_TRACE_SIZE    8192
 
-#define MAX_FILTER_STR_VAL     256     /* Should handle KSYM_SYMBOL_LEN */
+#define MAX_FILTER_STR_VAL     256U    /* Should handle KSYM_SYMBOL_LEN */
 
 enum event_trigger_type {
        ETT_NONE                = (0),
index b465f8f..04e87f4 100644 (file)
@@ -120,10 +120,15 @@ retry:
 
        if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {
                u16 gso_size = __virtio16_to_cpu(little_endian, hdr->gso_size);
+               unsigned int nh_off = p_off;
                struct skb_shared_info *shinfo = skb_shinfo(skb);
 
+               /* UFO may not include transport header in gso_size. */
+               if (gso_type & SKB_GSO_UDP)
+                       nh_off -= thlen;
+
                /* Too small packets are not really GSO ones. */
-               if (skb->len - p_off > gso_size) {
+               if (skb->len - nh_off > gso_size) {
                        shinfo->gso_size = gso_size;
                        shinfo->gso_type = gso_type;
 
index a964dae..ea85956 100644 (file)
@@ -30,6 +30,7 @@ enum nci_flag {
        NCI_UP,
        NCI_DATA_EXCHANGE,
        NCI_DATA_EXCHANGE_TO,
+       NCI_UNREG,
 };
 
 /* NCI device states */
index 3855f06..a408240 100644 (file)
@@ -216,14 +216,24 @@ static inline void page_pool_recycle_direct(struct page_pool *pool,
        page_pool_put_full_page(pool, page, true);
 }
 
+#define PAGE_POOL_DMA_USE_PP_FRAG_COUNT        \
+               (sizeof(dma_addr_t) > sizeof(unsigned long))
+
 static inline dma_addr_t page_pool_get_dma_addr(struct page *page)
 {
-       return page->dma_addr;
+       dma_addr_t ret = page->dma_addr;
+
+       if (PAGE_POOL_DMA_USE_PP_FRAG_COUNT)
+               ret |= (dma_addr_t)page->dma_addr_upper << 16 << 16;
+
+       return ret;
 }
 
 static inline void page_pool_set_dma_addr(struct page *page, dma_addr_t addr)
 {
        page->dma_addr = addr;
+       if (PAGE_POOL_DMA_USE_PP_FRAG_COUNT)
+               page->dma_addr_upper = upper_32_bits(addr);
 }
 
 static inline void page_pool_set_frag_count(struct page *page, long nr)
index 2758d9d..c2a79ae 100644 (file)
@@ -30,7 +30,7 @@ enum rdma_nl_flags {
  * constant as well and the compiler checks they are the same.
  */
 #define MODULE_ALIAS_RDMA_NETLINK(_index, _val)                                \
-       static inline void __chk_##_index(void)                                \
+       static inline void __maybe_unused __chk_##_index(void)                 \
        {                                                                      \
                BUILD_BUG_ON(_index != _val);                                  \
        }                                                                      \
index 036b750..4b7bac1 100644 (file)
@@ -887,7 +887,7 @@ config CC_HAS_INT128
 
 config CC_IMPLICIT_FALLTHROUGH
        string
-       default "-Wimplicit-fallthrough=5" if CC_IS_GCC
+       default "-Wimplicit-fallthrough=5" if CC_IS_GCC && $(cc-option,-Wimplicit-fallthrough=5)
        default "-Wimplicit-fallthrough" if CC_IS_CLANG && $(cc-option,-Wunreachable-code-fallthrough)
 
 #
index 4942bdd..b3048eb 100644 (file)
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -62,9 +62,18 @@ struct shmid_kernel /* private to the kernel */
        struct pid              *shm_lprid;
        struct ucounts          *mlock_ucounts;
 
-       /* The task created the shm object.  NULL if the task is dead. */
+       /*
+        * The task created the shm object, for
+        * task_lock(shp->shm_creator)
+        */
        struct task_struct      *shm_creator;
-       struct list_head        shm_clist;      /* list by creator */
+
+       /*
+        * List by creator. task_lock(->shm_creator) required for read/write.
+        * If list_empty(), then the creator is dead already.
+        */
+       struct list_head        shm_clist;
+       struct ipc_namespace    *ns;
 } __randomize_layout;
 
 /* shm_mode upper byte flags */
@@ -115,6 +124,7 @@ static void do_shm_rmid(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp)
        struct shmid_kernel *shp;
 
        shp = container_of(ipcp, struct shmid_kernel, shm_perm);
+       WARN_ON(ns != shp->ns);
 
        if (shp->shm_nattch) {
                shp->shm_perm.mode |= SHM_DEST;
@@ -225,10 +235,43 @@ static void shm_rcu_free(struct rcu_head *head)
        kfree(shp);
 }
 
-static inline void shm_rmid(struct ipc_namespace *ns, struct shmid_kernel *s)
+/*
+ * It has to be called with shp locked.
+ * It must be called before ipc_rmid()
+ */
+static inline void shm_clist_rm(struct shmid_kernel *shp)
 {
-       list_del(&s->shm_clist);
-       ipc_rmid(&shm_ids(ns), &s->shm_perm);
+       struct task_struct *creator;
+
+       /* ensure that shm_creator does not disappear */
+       rcu_read_lock();
+
+       /*
+        * A concurrent exit_shm may do a list_del_init() as well.
+        * Just do nothing if exit_shm already did the work
+        */
+       if (!list_empty(&shp->shm_clist)) {
+               /*
+                * shp->shm_creator is guaranteed to be valid *only*
+                * if shp->shm_clist is not empty.
+                */
+               creator = shp->shm_creator;
+
+               task_lock(creator);
+               /*
+                * list_del_init() is a nop if the entry was already removed
+                * from the list.
+                */
+               list_del_init(&shp->shm_clist);
+               task_unlock(creator);
+       }
+       rcu_read_unlock();
+}
+
+static inline void shm_rmid(struct shmid_kernel *s)
+{
+       shm_clist_rm(s);
+       ipc_rmid(&shm_ids(s->ns), &s->shm_perm);
 }
 
 
@@ -283,7 +326,7 @@ static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp)
        shm_file = shp->shm_file;
        shp->shm_file = NULL;
        ns->shm_tot -= (shp->shm_segsz + PAGE_SIZE - 1) >> PAGE_SHIFT;
-       shm_rmid(ns, shp);
+       shm_rmid(shp);
        shm_unlock(shp);
        if (!is_file_hugepages(shm_file))
                shmem_lock(shm_file, 0, shp->mlock_ucounts);
@@ -303,10 +346,10 @@ static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp)
  *
  * 2) sysctl kernel.shm_rmid_forced is set to 1.
  */
-static bool shm_may_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp)
+static bool shm_may_destroy(struct shmid_kernel *shp)
 {
        return (shp->shm_nattch == 0) &&
-              (ns->shm_rmid_forced ||
+              (shp->ns->shm_rmid_forced ||
                (shp->shm_perm.mode & SHM_DEST));
 }
 
@@ -337,7 +380,7 @@ static void shm_close(struct vm_area_struct *vma)
        ipc_update_pid(&shp->shm_lprid, task_tgid(current));
        shp->shm_dtim = ktime_get_real_seconds();
        shp->shm_nattch--;
-       if (shm_may_destroy(ns, shp))
+       if (shm_may_destroy(shp))
                shm_destroy(ns, shp);
        else
                shm_unlock(shp);
@@ -358,10 +401,10 @@ static int shm_try_destroy_orphaned(int id, void *p, void *data)
         *
         * As shp->* are changed under rwsem, it's safe to skip shp locking.
         */
-       if (shp->shm_creator != NULL)
+       if (!list_empty(&shp->shm_clist))
                return 0;
 
-       if (shm_may_destroy(ns, shp)) {
+       if (shm_may_destroy(shp)) {
                shm_lock_by_ptr(shp);
                shm_destroy(ns, shp);
        }
@@ -379,48 +422,97 @@ void shm_destroy_orphaned(struct ipc_namespace *ns)
 /* Locking assumes this will only be called with task == current */
 void exit_shm(struct task_struct *task)
 {
-       struct ipc_namespace *ns = task->nsproxy->ipc_ns;
-       struct shmid_kernel *shp, *n;
+       for (;;) {
+               struct shmid_kernel *shp;
+               struct ipc_namespace *ns;
 
-       if (list_empty(&task->sysvshm.shm_clist))
-               return;
+               task_lock(task);
+
+               if (list_empty(&task->sysvshm.shm_clist)) {
+                       task_unlock(task);
+                       break;
+               }
+
+               shp = list_first_entry(&task->sysvshm.shm_clist, struct shmid_kernel,
+                               shm_clist);
 
-       /*
-        * If kernel.shm_rmid_forced is not set then only keep track of
-        * which shmids are orphaned, so that a later set of the sysctl
-        * can clean them up.
-        */
-       if (!ns->shm_rmid_forced) {
-               down_read(&shm_ids(ns).rwsem);
-               list_for_each_entry(shp, &task->sysvshm.shm_clist, shm_clist)
-                       shp->shm_creator = NULL;
                /*
-                * Only under read lock but we are only called on current
-                * so no entry on the list will be shared.
+                * 1) Get pointer to the ipc namespace. It is worth to say
+                * that this pointer is guaranteed to be valid because
+                * shp lifetime is always shorter than namespace lifetime
+                * in which shp lives.
+                * We taken task_lock it means that shp won't be freed.
                 */
-               list_del(&task->sysvshm.shm_clist);
-               up_read(&shm_ids(ns).rwsem);
-               return;
-       }
+               ns = shp->ns;
 
-       /*
-        * Destroy all already created segments, that were not yet mapped,
-        * and mark any mapped as orphan to cover the sysctl toggling.
-        * Destroy is skipped if shm_may_destroy() returns false.
-        */
-       down_write(&shm_ids(ns).rwsem);
-       list_for_each_entry_safe(shp, n, &task->sysvshm.shm_clist, shm_clist) {
-               shp->shm_creator = NULL;
+               /*
+                * 2) If kernel.shm_rmid_forced is not set then only keep track of
+                * which shmids are orphaned, so that a later set of the sysctl
+                * can clean them up.
+                */
+               if (!ns->shm_rmid_forced)
+                       goto unlink_continue;
 
-               if (shm_may_destroy(ns, shp)) {
-                       shm_lock_by_ptr(shp);
-                       shm_destroy(ns, shp);
+               /*
+                * 3) get a reference to the namespace.
+                *    The refcount could be already 0. If it is 0, then
+                *    the shm objects will be free by free_ipc_work().
+                */
+               ns = get_ipc_ns_not_zero(ns);
+               if (!ns) {
+unlink_continue:
+                       list_del_init(&shp->shm_clist);
+                       task_unlock(task);
+                       continue;
                }
-       }
 
-       /* Remove the list head from any segments still attached. */
-       list_del(&task->sysvshm.shm_clist);
-       up_write(&shm_ids(ns).rwsem);
+               /*
+                * 4) get a reference to shp.
+                *   This cannot fail: shm_clist_rm() is called before
+                *   ipc_rmid(), thus the refcount cannot be 0.
+                */
+               WARN_ON(!ipc_rcu_getref(&shp->shm_perm));
+
+               /*
+                * 5) unlink the shm segment from the list of segments
+                *    created by current.
+                *    This must be done last. After unlinking,
+                *    only the refcounts obtained above prevent IPC_RMID
+                *    from destroying the segment or the namespace.
+                */
+               list_del_init(&shp->shm_clist);
+
+               task_unlock(task);
+
+               /*
+                * 6) we have all references
+                *    Thus lock & if needed destroy shp.
+                */
+               down_write(&shm_ids(ns).rwsem);
+               shm_lock_by_ptr(shp);
+               /*
+                * rcu_read_lock was implicitly taken in shm_lock_by_ptr, it's
+                * safe to call ipc_rcu_putref here
+                */
+               ipc_rcu_putref(&shp->shm_perm, shm_rcu_free);
+
+               if (ipc_valid_object(&shp->shm_perm)) {
+                       if (shm_may_destroy(shp))
+                               shm_destroy(ns, shp);
+                       else
+                               shm_unlock(shp);
+               } else {
+                       /*
+                        * Someone else deleted the shp from namespace
+                        * idr/kht while we have waited.
+                        * Just unlock and continue.
+                        */
+                       shm_unlock(shp);
+               }
+
+               up_write(&shm_ids(ns).rwsem);
+               put_ipc_ns(ns); /* paired with get_ipc_ns_not_zero */
+       }
 }
 
 static vm_fault_t shm_fault(struct vm_fault *vmf)
@@ -676,7 +768,11 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
        if (error < 0)
                goto no_id;
 
+       shp->ns = ns;
+
+       task_lock(current);
        list_add(&shp->shm_clist, &current->sysvshm.shm_clist);
+       task_unlock(current);
 
        /*
         * shmid gets reported as "inode#" in /proc/pid/maps.
@@ -1567,7 +1663,8 @@ out_nattch:
        down_write(&shm_ids(ns).rwsem);
        shp = shm_lock(ns, shmid);
        shp->shm_nattch--;
-       if (shm_may_destroy(ns, shp))
+
+       if (shm_may_destroy(shp))
                shm_destroy(ns, shp);
        else
                shm_unlock(shp);
index d48d8cf..fa2d86e 100644 (file)
@@ -447,8 +447,8 @@ static int ipcget_public(struct ipc_namespace *ns, struct ipc_ids *ids,
 static void ipc_kht_remove(struct ipc_ids *ids, struct kern_ipc_perm *ipcp)
 {
        if (ipcp->key != IPC_PRIVATE)
-               rhashtable_remove_fast(&ids->key_ht, &ipcp->khtnode,
-                                      ipc_kht_params);
+               WARN_ON_ONCE(rhashtable_remove_fast(&ids->key_ht, &ipcp->khtnode,
+                                      ipc_kht_params));
 }
 
 /**
@@ -498,7 +498,7 @@ void ipc_rmid(struct ipc_ids *ids, struct kern_ipc_perm *ipcp)
 {
        int idx = ipcid_to_idx(ipcp->id);
 
-       idr_remove(&ids->ipcs_idr, idx);
+       WARN_ON_ONCE(idr_remove(&ids->ipcs_idr, idx) != ipcp);
        ipc_kht_remove(ids, ipcp);
        ids->in_use--;
        ipcp->deleted = true;
index 2ca643a..43eb350 100644 (file)
@@ -1809,6 +1809,8 @@ sysctl_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
                return &bpf_sysctl_get_new_value_proto;
        case BPF_FUNC_sysctl_set_new_value:
                return &bpf_sysctl_set_new_value_proto;
+       case BPF_FUNC_ktime_get_coarse_ns:
+               return &bpf_ktime_get_coarse_ns_proto;
        default:
                return cgroup_base_func_proto(func_id, prog);
        }
index 1ffd469..649f076 100644 (file)
@@ -1364,8 +1364,6 @@ bpf_base_func_proto(enum bpf_func_id func_id)
                return &bpf_ktime_get_ns_proto;
        case BPF_FUNC_ktime_get_boot_ns:
                return &bpf_ktime_get_boot_ns_proto;
-       case BPF_FUNC_ktime_get_coarse_ns:
-               return &bpf_ktime_get_coarse_ns_proto;
        case BPF_FUNC_ringbuf_output:
                return &bpf_ringbuf_output_proto;
        case BPF_FUNC_ringbuf_reserve:
index 50f96ea..1033ee8 100644 (file)
@@ -132,6 +132,21 @@ static struct bpf_map *find_and_alloc_map(union bpf_attr *attr)
        return map;
 }
 
+static void bpf_map_write_active_inc(struct bpf_map *map)
+{
+       atomic64_inc(&map->writecnt);
+}
+
+static void bpf_map_write_active_dec(struct bpf_map *map)
+{
+       atomic64_dec(&map->writecnt);
+}
+
+bool bpf_map_write_active(const struct bpf_map *map)
+{
+       return atomic64_read(&map->writecnt) != 0;
+}
+
 static u32 bpf_map_value_size(const struct bpf_map *map)
 {
        if (map->map_type == BPF_MAP_TYPE_PERCPU_HASH ||
@@ -601,11 +616,8 @@ static void bpf_map_mmap_open(struct vm_area_struct *vma)
 {
        struct bpf_map *map = vma->vm_file->private_data;
 
-       if (vma->vm_flags & VM_MAYWRITE) {
-               mutex_lock(&map->freeze_mutex);
-               map->writecnt++;
-               mutex_unlock(&map->freeze_mutex);
-       }
+       if (vma->vm_flags & VM_MAYWRITE)
+               bpf_map_write_active_inc(map);
 }
 
 /* called for all unmapped memory region (including initial) */
@@ -613,11 +625,8 @@ static void bpf_map_mmap_close(struct vm_area_struct *vma)
 {
        struct bpf_map *map = vma->vm_file->private_data;
 
-       if (vma->vm_flags & VM_MAYWRITE) {
-               mutex_lock(&map->freeze_mutex);
-               map->writecnt--;
-               mutex_unlock(&map->freeze_mutex);
-       }
+       if (vma->vm_flags & VM_MAYWRITE)
+               bpf_map_write_active_dec(map);
 }
 
 static const struct vm_operations_struct bpf_map_default_vmops = {
@@ -668,7 +677,7 @@ static int bpf_map_mmap(struct file *filp, struct vm_area_struct *vma)
                goto out;
 
        if (vma->vm_flags & VM_MAYWRITE)
-               map->writecnt++;
+               bpf_map_write_active_inc(map);
 out:
        mutex_unlock(&map->freeze_mutex);
        return err;
@@ -1139,6 +1148,7 @@ static int map_update_elem(union bpf_attr *attr, bpfptr_t uattr)
        map = __bpf_map_get(f);
        if (IS_ERR(map))
                return PTR_ERR(map);
+       bpf_map_write_active_inc(map);
        if (!(map_get_sys_perms(map, f) & FMODE_CAN_WRITE)) {
                err = -EPERM;
                goto err_put;
@@ -1174,6 +1184,7 @@ free_value:
 free_key:
        kvfree(key);
 err_put:
+       bpf_map_write_active_dec(map);
        fdput(f);
        return err;
 }
@@ -1196,6 +1207,7 @@ static int map_delete_elem(union bpf_attr *attr)
        map = __bpf_map_get(f);
        if (IS_ERR(map))
                return PTR_ERR(map);
+       bpf_map_write_active_inc(map);
        if (!(map_get_sys_perms(map, f) & FMODE_CAN_WRITE)) {
                err = -EPERM;
                goto err_put;
@@ -1226,6 +1238,7 @@ static int map_delete_elem(union bpf_attr *attr)
 out:
        kvfree(key);
 err_put:
+       bpf_map_write_active_dec(map);
        fdput(f);
        return err;
 }
@@ -1533,6 +1546,7 @@ static int map_lookup_and_delete_elem(union bpf_attr *attr)
        map = __bpf_map_get(f);
        if (IS_ERR(map))
                return PTR_ERR(map);
+       bpf_map_write_active_inc(map);
        if (!(map_get_sys_perms(map, f) & FMODE_CAN_READ) ||
            !(map_get_sys_perms(map, f) & FMODE_CAN_WRITE)) {
                err = -EPERM;
@@ -1597,6 +1611,7 @@ free_value:
 free_key:
        kvfree(key);
 err_put:
+       bpf_map_write_active_dec(map);
        fdput(f);
        return err;
 }
@@ -1624,8 +1639,7 @@ static int map_freeze(const union bpf_attr *attr)
        }
 
        mutex_lock(&map->freeze_mutex);
-
-       if (map->writecnt) {
+       if (bpf_map_write_active(map)) {
                err = -EBUSY;
                goto err_put;
        }
@@ -4171,6 +4185,9 @@ static int bpf_map_do_batch(const union bpf_attr *attr,
                            union bpf_attr __user *uattr,
                            int cmd)
 {
+       bool has_read  = cmd == BPF_MAP_LOOKUP_BATCH ||
+                        cmd == BPF_MAP_LOOKUP_AND_DELETE_BATCH;
+       bool has_write = cmd != BPF_MAP_LOOKUP_BATCH;
        struct bpf_map *map;
        int err, ufd;
        struct fd f;
@@ -4183,16 +4200,13 @@ static int bpf_map_do_batch(const union bpf_attr *attr,
        map = __bpf_map_get(f);
        if (IS_ERR(map))
                return PTR_ERR(map);
-
-       if ((cmd == BPF_MAP_LOOKUP_BATCH ||
-            cmd == BPF_MAP_LOOKUP_AND_DELETE_BATCH) &&
-           !(map_get_sys_perms(map, f) & FMODE_CAN_READ)) {
+       if (has_write)
+               bpf_map_write_active_inc(map);
+       if (has_read && !(map_get_sys_perms(map, f) & FMODE_CAN_READ)) {
                err = -EPERM;
                goto err_put;
        }
-
-       if (cmd != BPF_MAP_LOOKUP_BATCH &&
-           !(map_get_sys_perms(map, f) & FMODE_CAN_WRITE)) {
+       if (has_write && !(map_get_sys_perms(map, f) & FMODE_CAN_WRITE)) {
                err = -EPERM;
                goto err_put;
        }
@@ -4205,8 +4219,9 @@ static int bpf_map_do_batch(const union bpf_attr *attr,
                BPF_DO_BATCH(map->ops->map_update_batch);
        else
                BPF_DO_BATCH(map->ops->map_delete_batch);
-
 err_put:
+       if (has_write)
+               bpf_map_write_active_dec(map);
        fdput(f);
        return err;
 }
index 890b3ec..50efda5 100644 (file)
@@ -1151,7 +1151,8 @@ static void mark_ptr_not_null_reg(struct bpf_reg_state *reg)
                        /* transfer reg's id which is unique for every map_lookup_elem
                         * as UID of the inner map.
                         */
-                       reg->map_uid = reg->id;
+                       if (map_value_has_timer(map->inner_map_meta))
+                               reg->map_uid = reg->id;
                } else if (map->map_type == BPF_MAP_TYPE_XSKMAP) {
                        reg->type = PTR_TO_XDP_SOCK;
                } else if (map->map_type == BPF_MAP_TYPE_SOCKMAP ||
@@ -4055,7 +4056,22 @@ static void coerce_reg_to_size(struct bpf_reg_state *reg, int size)
 
 static bool bpf_map_is_rdonly(const struct bpf_map *map)
 {
-       return (map->map_flags & BPF_F_RDONLY_PROG) && map->frozen;
+       /* A map is considered read-only if the following condition are true:
+        *
+        * 1) BPF program side cannot change any of the map content. The
+        *    BPF_F_RDONLY_PROG flag is throughout the lifetime of a map
+        *    and was set at map creation time.
+        * 2) The map value(s) have been initialized from user space by a
+        *    loader and then "frozen", such that no new map update/delete
+        *    operations from syscall side are possible for the rest of
+        *    the map's lifetime from that point onwards.
+        * 3) Any parallel/pending map update/delete operations from syscall
+        *    side have been completed. Only after that point, it's safe to
+        *    assume that map value(s) are immutable.
+        */
+       return (map->map_flags & BPF_F_RDONLY_PROG) &&
+              READ_ONCE(map->frozen) &&
+              !bpf_map_write_active(map);
 }
 
 static int bpf_map_direct_read(struct bpf_map *map, int off, int size, u64 *val)
@@ -11631,6 +11647,13 @@ static int check_map_prog_compatibility(struct bpf_verifier_env *env,
                }
        }
 
+       if (map_value_has_timer(map)) {
+               if (is_tracing_prog_type(prog_type)) {
+                       verbose(env, "tracing progs cannot use bpf_timer yet\n");
+                       return -EINVAL;
+               }
+       }
+
        if ((bpf_prog_is_dev_bound(prog->aux) || bpf_map_is_dev_bound(map)) &&
            !bpf_offload_prog_map_match(prog, map)) {
                verbose(env, "offload device mismatch between prog and map\n");
index 4508201..0b6379a 100644 (file)
@@ -48,7 +48,7 @@ bool syscall_user_dispatch(struct pt_regs *regs)
                 * the selector is loaded by userspace.
                 */
                if (unlikely(__get_user(state, sd->selector))) {
-                       force_fatal_sig(SIGSEGV);
+                       force_exit_sig(SIGSEGV);
                        return true;
                }
 
@@ -56,7 +56,7 @@ bool syscall_user_dispatch(struct pt_regs *regs)
                        return false;
 
                if (state != SYSCALL_DISPATCH_FILTER_BLOCK) {
-                       force_fatal_sig(SIGSYS);
+                       force_exit_sig(SIGSYS);
                        return true;
                }
        }
index 013bfd6..57b132b 100644 (file)
@@ -3253,6 +3253,11 @@ void defer_console_output(void)
        preempt_enable();
 }
 
+void printk_trigger_flush(void)
+{
+       defer_console_output();
+}
+
 int vprintk_deferred(const char *fmt, va_list args)
 {
        int r;
index 7c4b7ae..a629b11 100644 (file)
@@ -1298,6 +1298,12 @@ int do_send_sig_info(int sig, struct kernel_siginfo *info, struct task_struct *p
        return ret;
 }
 
+enum sig_handler {
+       HANDLER_CURRENT, /* If reachable use the current handler */
+       HANDLER_SIG_DFL, /* Always use SIG_DFL handler semantics */
+       HANDLER_EXIT,    /* Only visible as the process exit code */
+};
+
 /*
  * Force a signal that the process can't ignore: if necessary
  * we unblock the signal and change any SIG_IGN to SIG_DFL.
@@ -1310,7 +1316,8 @@ int do_send_sig_info(int sig, struct kernel_siginfo *info, struct task_struct *p
  * that is why we also clear SIGNAL_UNKILLABLE.
  */
 static int
-force_sig_info_to_task(struct kernel_siginfo *info, struct task_struct *t, bool sigdfl)
+force_sig_info_to_task(struct kernel_siginfo *info, struct task_struct *t,
+       enum sig_handler handler)
 {
        unsigned long int flags;
        int ret, blocked, ignored;
@@ -1321,9 +1328,10 @@ force_sig_info_to_task(struct kernel_siginfo *info, struct task_struct *t, bool
        action = &t->sighand->action[sig-1];
        ignored = action->sa.sa_handler == SIG_IGN;
        blocked = sigismember(&t->blocked, sig);
-       if (blocked || ignored || sigdfl) {
+       if (blocked || ignored || (handler != HANDLER_CURRENT)) {
                action->sa.sa_handler = SIG_DFL;
-               action->sa.sa_flags |= SA_IMMUTABLE;
+               if (handler == HANDLER_EXIT)
+                       action->sa.sa_flags |= SA_IMMUTABLE;
                if (blocked) {
                        sigdelset(&t->blocked, sig);
                        recalc_sigpending_and_wake(t);
@@ -1343,7 +1351,7 @@ force_sig_info_to_task(struct kernel_siginfo *info, struct task_struct *t, bool
 
 int force_sig_info(struct kernel_siginfo *info)
 {
-       return force_sig_info_to_task(info, current, false);
+       return force_sig_info_to_task(info, current, HANDLER_CURRENT);
 }
 
 /*
@@ -1660,7 +1668,20 @@ void force_fatal_sig(int sig)
        info.si_code = SI_KERNEL;
        info.si_pid = 0;
        info.si_uid = 0;
-       force_sig_info_to_task(&info, current, true);
+       force_sig_info_to_task(&info, current, HANDLER_SIG_DFL);
+}
+
+void force_exit_sig(int sig)
+{
+       struct kernel_siginfo info;
+
+       clear_siginfo(&info);
+       info.si_signo = sig;
+       info.si_errno = 0;
+       info.si_code = SI_KERNEL;
+       info.si_pid = 0;
+       info.si_uid = 0;
+       force_sig_info_to_task(&info, current, HANDLER_EXIT);
 }
 
 /*
@@ -1693,7 +1714,7 @@ int force_sig_fault_to_task(int sig, int code, void __user *addr
        info.si_flags = flags;
        info.si_isr = isr;
 #endif
-       return force_sig_info_to_task(&info, t, false);
+       return force_sig_info_to_task(&info, t, HANDLER_CURRENT);
 }
 
 int force_sig_fault(int sig, int code, void __user *addr
@@ -1813,7 +1834,8 @@ int force_sig_seccomp(int syscall, int reason, bool force_coredump)
        info.si_errno = reason;
        info.si_arch = syscall_get_arch(current);
        info.si_syscall = syscall;
-       return force_sig_info_to_task(&info, current, force_coredump);
+       return force_sig_info_to_task(&info, current,
+               force_coredump ? HANDLER_EXIT : HANDLER_CURRENT);
 }
 
 /* For the crazy architectures that include trap information in
index 7396488..ae97550 100644 (file)
@@ -1111,8 +1111,6 @@ bpf_tracing_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
                return &bpf_ktime_get_ns_proto;
        case BPF_FUNC_ktime_get_boot_ns:
                return &bpf_ktime_get_boot_ns_proto;
-       case BPF_FUNC_ktime_get_coarse_ns:
-               return &bpf_ktime_get_coarse_ns_proto;
        case BPF_FUNC_tail_call:
                return &bpf_tail_call_proto;
        case BPF_FUNC_get_current_pid_tgid:
index f9139dc..88de94d 100644 (file)
@@ -3812,6 +3812,18 @@ void trace_check_vprintf(struct trace_iterator *iter, const char *fmt,
                iter->fmt[i] = '\0';
                trace_seq_vprintf(&iter->seq, iter->fmt, ap);
 
+               /*
+                * If iter->seq is full, the above call no longer guarantees
+                * that ap is in sync with fmt processing, and further calls
+                * to va_arg() can return wrong positional arguments.
+                *
+                * Ensure that ap is no longer used in this case.
+                */
+               if (iter->seq.full) {
+                       p = "";
+                       break;
+               }
+
                if (star)
                        len = va_arg(ap, int);
 
@@ -6706,9 +6718,7 @@ waitagain:
                cnt = PAGE_SIZE - 1;
 
        /* reset all but tr, trace, and overruns */
-       memset(&iter->seq, 0,
-              sizeof(struct trace_iterator) -
-              offsetof(struct trace_iterator, seq));
+       memset_startat(iter, 0, seq);
        cpumask_clear(iter->started);
        trace_seq_init(&iter->seq);
        iter->pos = -1;
index 8a10046..9555b8e 100644 (file)
@@ -2576,28 +2576,27 @@ static struct hist_field *parse_expr(struct hist_trigger_data *hist_data,
 
        /* Split the expression string at the root operator */
        if (!sep)
-               goto free;
+               return ERR_PTR(-EINVAL);
+
        *sep = '\0';
        operand1_str = str;
        str = sep+1;
 
        /* Binary operator requires both operands */
        if (*operand1_str == '\0' || *str == '\0')
-               goto free;
+               return ERR_PTR(-EINVAL);
 
        operand_flags = 0;
 
        /* LHS of string is an expression e.g. a+b in a+b+c */
        operand1 = parse_expr(hist_data, file, operand1_str, operand_flags, NULL, n_subexprs);
-       if (IS_ERR(operand1)) {
-               ret = PTR_ERR(operand1);
-               operand1 = NULL;
-               goto free;
-       }
+       if (IS_ERR(operand1))
+               return ERR_CAST(operand1);
+
        if (operand1->flags & HIST_FIELD_FL_STRING) {
                hist_err(file->tr, HIST_ERR_INVALID_STR_OPERAND, errpos(operand1_str));
                ret = -EINVAL;
-               goto free;
+               goto free_op1;
        }
 
        /* RHS of string is another expression e.g. c in a+b+c */
@@ -2605,13 +2604,12 @@ static struct hist_field *parse_expr(struct hist_trigger_data *hist_data,
        operand2 = parse_expr(hist_data, file, str, operand_flags, NULL, n_subexprs);
        if (IS_ERR(operand2)) {
                ret = PTR_ERR(operand2);
-               operand2 = NULL;
-               goto free;
+               goto free_op1;
        }
        if (operand2->flags & HIST_FIELD_FL_STRING) {
                hist_err(file->tr, HIST_ERR_INVALID_STR_OPERAND, errpos(str));
                ret = -EINVAL;
-               goto free;
+               goto free_operands;
        }
 
        switch (field_op) {
@@ -2629,12 +2627,12 @@ static struct hist_field *parse_expr(struct hist_trigger_data *hist_data,
                break;
        default:
                ret = -EINVAL;
-               goto free;
+               goto free_operands;
        }
 
        ret = check_expr_operands(file->tr, operand1, operand2, &var1, &var2);
        if (ret)
-               goto free;
+               goto free_operands;
 
        operand_flags = var1 ? var1->flags : operand1->flags;
        operand2_flags = var2 ? var2->flags : operand2->flags;
@@ -2653,12 +2651,13 @@ static struct hist_field *parse_expr(struct hist_trigger_data *hist_data,
        expr = create_hist_field(hist_data, NULL, flags, var_name);
        if (!expr) {
                ret = -ENOMEM;
-               goto free;
+               goto free_operands;
        }
 
        operand1->read_once = true;
        operand2->read_once = true;
 
+       /* The operands are now owned and free'd by 'expr' */
        expr->operands[0] = operand1;
        expr->operands[1] = operand2;
 
@@ -2669,7 +2668,7 @@ static struct hist_field *parse_expr(struct hist_trigger_data *hist_data,
                if (!divisor) {
                        hist_err(file->tr, HIST_ERR_DIVISION_BY_ZERO, errpos(str));
                        ret = -EDOM;
-                       goto free;
+                       goto free_expr;
                }
 
                /*
@@ -2709,18 +2708,22 @@ static struct hist_field *parse_expr(struct hist_trigger_data *hist_data,
                expr->type = kstrdup_const(operand1->type, GFP_KERNEL);
                if (!expr->type) {
                        ret = -ENOMEM;
-                       goto free;
+                       goto free_expr;
                }
 
                expr->name = expr_str(expr, 0);
        }
 
        return expr;
-free:
-       destroy_hist_field(operand1, 0);
+
+free_operands:
        destroy_hist_field(operand2, 0);
-       destroy_hist_field(expr, 0);
+free_op1:
+       destroy_hist_field(operand1, 0);
+       return ERR_PTR(ret);
 
+free_expr:
+       destroy_hist_field(expr, 0);
        return ERR_PTR(ret);
 }
 
@@ -3026,8 +3029,10 @@ static inline void __update_field_vars(struct tracing_map_elt *elt,
                if (val->flags & HIST_FIELD_FL_STRING) {
                        char *str = elt_data->field_var_str[j++];
                        char *val_str = (char *)(uintptr_t)var_val;
+                       unsigned int size;
 
-                       strscpy(str, val_str, val->size);
+                       size = min(val->size, STR_VAR_LEN_MAX);
+                       strscpy(str, val_str, size);
                        var_val = (u64)(uintptr_t)str;
                }
                tracing_map_set_var(elt, var_idx, var_val);
@@ -4914,6 +4919,7 @@ static void hist_trigger_elt_update(struct hist_trigger_data *hist_data,
                        if (hist_field->flags & HIST_FIELD_FL_STRING) {
                                unsigned int str_start, var_str_idx, idx;
                                char *str, *val_str;
+                               unsigned int size;
 
                                str_start = hist_data->n_field_var_str +
                                        hist_data->n_save_var_str;
@@ -4922,7 +4928,9 @@ static void hist_trigger_elt_update(struct hist_trigger_data *hist_data,
 
                                str = elt_data->field_var_str[idx];
                                val_str = (char *)(uintptr_t)hist_val;
-                               strscpy(str, val_str, hist_field->size);
+
+                               size = min(hist_field->size, STR_VAR_LEN_MAX);
+                               strscpy(str, val_str, size);
 
                                hist_val = (u64)(uintptr_t)str;
                        }
index f9e8900..199ab20 100644 (file)
@@ -75,6 +75,12 @@ void nmi_trigger_cpumask_backtrace(const cpumask_t *mask,
                touch_softlockup_watchdog();
        }
 
+       /*
+        * Force flush any remote buffers that might be stuck in IRQ context
+        * and therefore could not run their irq_work.
+        */
+       printk_trigger_flush();
+
        clear_bit_unlock(0, &backtrace_flag);
        put_cpu();
 }
index 67ed689..0643573 100644 (file)
@@ -869,6 +869,7 @@ static void kasan_memchr(struct kunit *test)
        ptr = kmalloc(size, GFP_KERNEL | __GFP_ZERO);
        KUNIT_ASSERT_NOT_ERR_OR_NULL(test, ptr);
 
+       OPTIMIZER_HIDE_VAR(size);
        KUNIT_EXPECT_KASAN_FAIL(test,
                kasan_ptr_result = memchr(ptr, '1', size + 1));
 
@@ -894,6 +895,7 @@ static void kasan_memcmp(struct kunit *test)
        KUNIT_ASSERT_NOT_ERR_OR_NULL(test, ptr);
        memset(arr, 0, sizeof(arr));
 
+       OPTIMIZER_HIDE_VAR(size);
        KUNIT_EXPECT_KASAN_FAIL(test,
                kasan_int_result = memcmp(ptr, arr, size+1));
        kfree(ptr);
index 65218ec..fc45339 100644 (file)
@@ -11,8 +11,6 @@
 obj-$(CONFIG_ZSTD_COMPRESS) += zstd_compress.o
 obj-$(CONFIG_ZSTD_DECOMPRESS) += zstd_decompress.o
 
-ccflags-y += -O3
-
 zstd_compress-y := \
                zstd_compress_module.o \
                common/debug.o \
index a1a051e..f5a9c70 100644 (file)
@@ -16,6 +16,7 @@
 *********************************************************/
 /* force inlining */
 
+#if !defined(ZSTD_NO_INLINE)
 #if (defined(__GNUC__) && !defined(__STRICT_ANSI__)) || defined(__cplusplus) || defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L   /* C99 */
 #  define INLINE_KEYWORD inline
 #else
 
 #define FORCE_INLINE_ATTR __attribute__((always_inline))
 
+#else
+
+#define INLINE_KEYWORD
+#define FORCE_INLINE_ATTR
+
+#endif
 
 /*
   On MSVC qsort requires that functions passed into it use the __cdecl calling conversion(CC).
index ee03e0a..b0610b2 100644 (file)
@@ -411,6 +411,8 @@ static size_t ZSTD_seqDecompressedSize(seqStore_t const* seqStore, const seqDef*
     const seqDef* sp = sstart;
     size_t matchLengthSum = 0;
     size_t litLengthSum = 0;
+    /* Only used by assert(), suppress unused variable warnings in production. */
+    (void)litLengthSum;
     while (send-sp > 0) {
         ZSTD_sequenceLength const seqLen = ZSTD_getSequenceLength(seqStore, sp);
         litLengthSum += seqLen.litLength;
index 0433705..dfc55e3 100644 (file)
@@ -8,6 +8,18 @@
  * You may select, at your option, one of the above-listed licenses.
  */
 
+/*
+ * Disable inlining for the optimal parser for the kernel build.
+ * It is unlikely to be used in the kernel, and where it is used
+ * latency shouldn't matter because it is very slow to begin with.
+ * We prefer a ~180KB binary size win over faster optimal parsing.
+ *
+ * TODO(https://github.com/facebook/zstd/issues/2862):
+ * Improve the code size of the optimal parser in general, so we
+ * don't need this hack for the kernel build.
+ */
+#define ZSTD_NO_INLINE 1
+
 #include "zstd_compress_internal.h"
 #include "hist.h"
 #include "zstd_opt.h"
index 068ce59..28edafc 100644 (file)
@@ -890,6 +890,9 @@ config MAPPING_DIRTY_HELPERS
 config KMAP_LOCAL
        bool
 
+config KMAP_LOCAL_NON_LINEAR_PTE_ARRAY
+       bool
+
 # struct io_mapping based helper.  Selected by drivers that need them
 config IO_MAPPING
        bool
index eccc14b..9b520bb 100644 (file)
@@ -32,7 +32,7 @@ static char *user_input_str(const char __user *buf, size_t count, loff_t *ppos)
        if (*ppos)
                return ERR_PTR(-EINVAL);
 
-       kbuf = kmalloc(count + 1, GFP_KERNEL);
+       kbuf = kmalloc(count + 1, GFP_KERNEL | __GFP_NOWARN);
        if (!kbuf)
                return ERR_PTR(-ENOMEM);
 
@@ -133,7 +133,7 @@ static ssize_t dbgfs_schemes_read(struct file *file, char __user *buf,
        char *kbuf;
        ssize_t len;
 
-       kbuf = kmalloc(count, GFP_KERNEL);
+       kbuf = kmalloc(count, GFP_KERNEL | __GFP_NOWARN);
        if (!kbuf)
                return -ENOMEM;
 
@@ -452,7 +452,7 @@ static ssize_t dbgfs_init_regions_read(struct file *file, char __user *buf,
        char *kbuf;
        ssize_t len;
 
-       kbuf = kmalloc(count, GFP_KERNEL);
+       kbuf = kmalloc(count, GFP_KERNEL | __GFP_NOWARN);
        if (!kbuf)
                return -ENOMEM;
 
@@ -578,7 +578,7 @@ static ssize_t dbgfs_kdamond_pid_read(struct file *file,
        char *kbuf;
        ssize_t len;
 
-       kbuf = kmalloc(count, GFP_KERNEL);
+       kbuf = kmalloc(count, GFP_KERNEL | __GFP_NOWARN);
        if (!kbuf)
                return -ENOMEM;
 
@@ -877,12 +877,14 @@ static ssize_t dbgfs_monitor_on_write(struct file *file,
                return -EINVAL;
        }
 
+       mutex_lock(&damon_dbgfs_lock);
        if (!strncmp(kbuf, "on", count)) {
                int i;
 
                for (i = 0; i < dbgfs_nr_ctxs; i++) {
                        if (damon_targets_empty(dbgfs_ctxs[i])) {
                                kfree(kbuf);
+                               mutex_unlock(&damon_dbgfs_lock);
                                return -EINVAL;
                        }
                }
@@ -892,6 +894,7 @@ static ssize_t dbgfs_monitor_on_write(struct file *file,
        } else {
                ret = -EINVAL;
        }
+       mutex_unlock(&damon_dbgfs_lock);
 
        if (!ret)
                ret = count;
@@ -944,15 +947,16 @@ static int __init __damon_dbgfs_init(void)
 
 static int __init damon_dbgfs_init(void)
 {
-       int rc;
+       int rc = -ENOMEM;
 
+       mutex_lock(&damon_dbgfs_lock);
        dbgfs_ctxs = kmalloc(sizeof(*dbgfs_ctxs), GFP_KERNEL);
        if (!dbgfs_ctxs)
-               return -ENOMEM;
+               goto out;
        dbgfs_ctxs[0] = dbgfs_new_ctx();
        if (!dbgfs_ctxs[0]) {
                kfree(dbgfs_ctxs);
-               return -ENOMEM;
+               goto out;
        }
        dbgfs_nr_ctxs = 1;
 
@@ -963,6 +967,8 @@ static int __init damon_dbgfs_init(void)
                pr_err("%s: dbgfs init failed\n", __func__);
        }
 
+out:
+       mutex_unlock(&damon_dbgfs_lock);
        return rc;
 }
 
index 88f65f1..ca9fa8c 100644 (file)
@@ -503,16 +503,22 @@ static inline int kmap_local_calc_idx(int idx)
 
 static pte_t *__kmap_pte;
 
-static pte_t *kmap_get_pte(void)
+static pte_t *kmap_get_pte(unsigned long vaddr, int idx)
 {
+       if (IS_ENABLED(CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY))
+               /*
+                * Set by the arch if __kmap_pte[-idx] does not produce
+                * the correct entry.
+                */
+               return virt_to_kpte(vaddr);
        if (!__kmap_pte)
                __kmap_pte = virt_to_kpte(__fix_to_virt(FIX_KMAP_BEGIN));
-       return __kmap_pte;
+       return &__kmap_pte[-idx];
 }
 
 void *__kmap_local_pfn_prot(unsigned long pfn, pgprot_t prot)
 {
-       pte_t pteval, *kmap_pte = kmap_get_pte();
+       pte_t pteval, *kmap_pte;
        unsigned long vaddr;
        int idx;
 
@@ -524,9 +530,10 @@ void *__kmap_local_pfn_prot(unsigned long pfn, pgprot_t prot)
        preempt_disable();
        idx = arch_kmap_local_map_idx(kmap_local_idx_push(), pfn);
        vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
-       BUG_ON(!pte_none(*(kmap_pte - idx)));
+       kmap_pte = kmap_get_pte(vaddr, idx);
+       BUG_ON(!pte_none(*kmap_pte));
        pteval = pfn_pte(pfn, prot);
-       arch_kmap_local_set_pte(&init_mm, vaddr, kmap_pte - idx, pteval);
+       arch_kmap_local_set_pte(&init_mm, vaddr, kmap_pte, pteval);
        arch_kmap_local_post_map(vaddr, pteval);
        current->kmap_ctrl.pteval[kmap_local_idx()] = pteval;
        preempt_enable();
@@ -559,7 +566,7 @@ EXPORT_SYMBOL(__kmap_local_page_prot);
 void kunmap_local_indexed(void *vaddr)
 {
        unsigned long addr = (unsigned long) vaddr & PAGE_MASK;
-       pte_t *kmap_pte = kmap_get_pte();
+       pte_t *kmap_pte;
        int idx;
 
        if (addr < __fix_to_virt(FIX_KMAP_END) ||
@@ -584,8 +591,9 @@ void kunmap_local_indexed(void *vaddr)
        idx = arch_kmap_local_unmap_idx(kmap_local_idx(), addr);
        WARN_ON_ONCE(addr != __fix_to_virt(FIX_KMAP_BEGIN + idx));
 
+       kmap_pte = kmap_get_pte(addr, idx);
        arch_kmap_local_pre_unmap(addr);
-       pte_clear(&init_mm, addr, kmap_pte - idx);
+       pte_clear(&init_mm, addr, kmap_pte);
        arch_kmap_local_post_unmap(addr);
        current->kmap_ctrl.pteval[kmap_local_idx()] = __pte(0);
        kmap_local_idx_pop();
@@ -607,7 +615,7 @@ EXPORT_SYMBOL(kunmap_local_indexed);
 void __kmap_local_sched_out(void)
 {
        struct task_struct *tsk = current;
-       pte_t *kmap_pte = kmap_get_pte();
+       pte_t *kmap_pte;
        int i;
 
        /* Clear kmaps */
@@ -634,8 +642,9 @@ void __kmap_local_sched_out(void)
                idx = arch_kmap_local_map_idx(i, pte_pfn(pteval));
 
                addr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
+               kmap_pte = kmap_get_pte(addr, idx);
                arch_kmap_local_pre_unmap(addr);
-               pte_clear(&init_mm, addr, kmap_pte - idx);
+               pte_clear(&init_mm, addr, kmap_pte);
                arch_kmap_local_post_unmap(addr);
        }
 }
@@ -643,7 +652,7 @@ void __kmap_local_sched_out(void)
 void __kmap_local_sched_in(void)
 {
        struct task_struct *tsk = current;
-       pte_t *kmap_pte = kmap_get_pte();
+       pte_t *kmap_pte;
        int i;
 
        /* Restore kmaps */
@@ -663,7 +672,8 @@ void __kmap_local_sched_in(void)
                /* See comment in __kmap_local_sched_out() */
                idx = arch_kmap_local_map_idx(i, pte_pfn(pteval));
                addr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
-               set_pte_at(&init_mm, addr, kmap_pte - idx, pteval);
+               kmap_pte = kmap_get_pte(addr, idx);
+               set_pte_at(&init_mm, addr, kmap_pte, pteval);
                arch_kmap_local_post_map(addr, pteval);
        }
 }
index e09159c..f025d23 100644 (file)
@@ -1037,8 +1037,10 @@ void clear_vma_resv_huge_pages(struct vm_area_struct *vma)
         */
        struct resv_map *reservations = vma_resv_map(vma);
 
-       if (reservations && is_vma_resv_set(vma, HPAGE_RESV_OWNER))
+       if (reservations && is_vma_resv_set(vma, HPAGE_RESV_OWNER)) {
+               resv_map_put_hugetlb_cgroup_uncharge_info(reservations);
                kref_put(&reservations->refs, resv_map_release);
+       }
 
        reset_vma_resv_huge_pages(vma);
 }
@@ -5734,13 +5736,14 @@ int hugetlb_mcopy_atomic_pte(struct mm_struct *dst_mm,
        int ret = -ENOMEM;
        struct page *page;
        int writable;
-       bool new_pagecache_page = false;
+       bool page_in_pagecache = false;
 
        if (is_continue) {
                ret = -EFAULT;
                page = find_lock_page(mapping, idx);
                if (!page)
                        goto out;
+               page_in_pagecache = true;
        } else if (!*pagep) {
                /* If a page already exists, then it's UFFDIO_COPY for
                 * a non-missing case. Return -EEXIST.
@@ -5828,7 +5831,7 @@ int hugetlb_mcopy_atomic_pte(struct mm_struct *dst_mm,
                ret = huge_add_to_page_cache(page, mapping, idx);
                if (ret)
                        goto out_release_nounlock;
-               new_pagecache_page = true;
+               page_in_pagecache = true;
        }
 
        ptl = huge_pte_lockptr(h, dst_mm, dst_pte);
@@ -5892,7 +5895,7 @@ out_release_unlock:
        if (vm_shared || is_continue)
                unlock_page(page);
 out_release_nounlock:
-       if (!new_pagecache_page)
+       if (!page_in_pagecache)
                restore_reserve_on_error(h, dst_vma, dst_addr, page);
        put_page(page);
        goto out;
index da132a9..ca4822f 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3733,14 +3733,13 @@ void kmem_cache_free(struct kmem_cache *cachep, void *objp)
        if (!cachep)
                return;
 
+       trace_kmem_cache_free(_RET_IP_, objp, cachep->name);
        local_irq_save(flags);
        debug_check_no_locks_freed(objp, cachep->object_size);
        if (!(cachep->flags & SLAB_DEBUG_OBJECTS))
                debug_check_no_obj_freed(objp, cachep->object_size);
        __cache_free(cachep, objp, _RET_IP_);
        local_irq_restore(flags);
-
-       trace_kmem_cache_free(_RET_IP_, objp, cachep->name);
 }
 EXPORT_SYMBOL(kmem_cache_free);
 
index 58c01a3..56ad7ee 100644 (file)
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -147,7 +147,7 @@ static inline slab_flags_t kmem_cache_flags(unsigned int object_size,
 #define SLAB_CACHE_FLAGS (SLAB_NOLEAKTRACE | SLAB_RECLAIM_ACCOUNT | \
                          SLAB_TEMPORARY | SLAB_ACCOUNT)
 #else
-#define SLAB_CACHE_FLAGS (0)
+#define SLAB_CACHE_FLAGS (SLAB_NOLEAKTRACE)
 #endif
 
 /* Common flags available with current configuration */
index 74d3f6e..03deee1 100644 (file)
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -666,6 +666,7 @@ static void kmem_rcu_free(struct rcu_head *head)
 void kmem_cache_free(struct kmem_cache *c, void *b)
 {
        kmemleak_free_recursive(b, c->flags);
+       trace_kmem_cache_free(_RET_IP_, b, c->name);
        if (unlikely(c->flags & SLAB_TYPESAFE_BY_RCU)) {
                struct slob_rcu *slob_rcu;
                slob_rcu = b + (c->size - sizeof(struct slob_rcu));
@@ -674,8 +675,6 @@ void kmem_cache_free(struct kmem_cache *c, void *b)
        } else {
                __kmem_cache_free(b, c->size);
        }
-
-       trace_kmem_cache_free(_RET_IP_, b, c->name);
 }
 EXPORT_SYMBOL(kmem_cache_free);
 
index f7368bf..a862682 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3526,8 +3526,8 @@ void kmem_cache_free(struct kmem_cache *s, void *x)
        s = cache_from_obj(s, x);
        if (!s)
                return;
-       slab_free(s, virt_to_head_page(x), x, NULL, 1, _RET_IP_);
        trace_kmem_cache_free(_RET_IP_, x, s->name);
+       slab_free(s, virt_to_head_page(x), x, NULL, 1, _RET_IP_);
 }
 EXPORT_SYMBOL(kmem_cache_free);
 
index 1841c24..e8c9dc6 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -156,6 +156,7 @@ void put_pages_list(struct list_head *pages)
        }
 
        free_unref_page_list(pages);
+       INIT_LIST_HEAD(pages);
 }
 EXPORT_SYMBOL(put_pages_list);
 
index 5ba4f94..5ad72db 100644 (file)
@@ -4229,7 +4229,9 @@ static void __devlink_flash_update_notify(struct devlink *devlink,
        WARN_ON(cmd != DEVLINK_CMD_FLASH_UPDATE &&
                cmd != DEVLINK_CMD_FLASH_UPDATE_END &&
                cmd != DEVLINK_CMD_FLASH_UPDATE_STATUS);
-       WARN_ON(!xa_get_mark(&devlinks, devlink->index, DEVLINK_REGISTERED));
+
+       if (!xa_get_mark(&devlinks, devlink->index, DEVLINK_REGISTERED))
+               return;
 
        msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
        if (!msg)
index e471c9b..6102f09 100644 (file)
@@ -7162,6 +7162,8 @@ sock_filter_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
 #endif
        case BPF_FUNC_sk_storage_get:
                return &bpf_sk_storage_get_cg_sock_proto;
+       case BPF_FUNC_ktime_get_coarse_ns:
+               return &bpf_ktime_get_coarse_ns_proto;
        default:
                return bpf_base_func_proto(func_id);
        }
@@ -10327,6 +10329,8 @@ sk_reuseport_func_proto(enum bpf_func_id func_id,
                return &sk_reuseport_load_bytes_relative_proto;
        case BPF_FUNC_get_socket_cookie:
                return &bpf_get_socket_ptr_cookie_proto;
+       case BPF_FUNC_ktime_get_coarse_ns:
+               return &bpf_ktime_get_coarse_ns_proto;
        default:
                return bpf_base_func_proto(func_id);
        }
@@ -10833,6 +10837,8 @@ bpf_sk_base_func_proto(enum bpf_func_id func_id)
        case BPF_FUNC_skc_to_unix_sock:
                func = &bpf_skc_to_unix_sock_proto;
                break;
+       case BPF_FUNC_ktime_get_coarse_ns:
+               return &bpf_ktime_get_coarse_ns_proto;
        default:
                return bpf_base_func_proto(func_id);
        }
index 9b60e43..1a69784 100644 (file)
@@ -49,12 +49,6 @@ static int page_pool_init(struct page_pool *pool,
         * which is the XDP_TX use-case.
         */
        if (pool->p.flags & PP_FLAG_DMA_MAP) {
-               /* DMA-mapping is not supported on 32-bit systems with
-                * 64-bit DMA mapping.
-                */
-               if (sizeof(dma_addr_t) > sizeof(unsigned long))
-                       return -EOPNOTSUPP;
-
                if ((pool->p.dma_dir != DMA_FROM_DEVICE) &&
                    (pool->p.dma_dir != DMA_BIDIRECTIONAL))
                        return -EINVAL;
@@ -75,6 +69,10 @@ static int page_pool_init(struct page_pool *pool,
                 */
        }
 
+       if (PAGE_POOL_DMA_USE_PP_FRAG_COUNT &&
+           pool->p.flags & PP_FLAG_PAGE_FRAG)
+               return -EINVAL;
+
        if (ptr_ring_init(&pool->ring, ring_qsize, GFP_KERNEL) < 0)
                return -ENOMEM;
 
index 8f2b2f2..41e91d0 100644 (file)
@@ -2124,8 +2124,10 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority)
        newsk->sk_prot_creator = prot;
 
        /* SANITY */
-       if (likely(newsk->sk_net_refcnt))
+       if (likely(newsk->sk_net_refcnt)) {
                get_net(sock_net(newsk));
+               sock_inuse_add(sock_net(newsk), 1);
+       }
        sk_node_init(&newsk->sk_node);
        sock_lock_init(newsk);
        bh_lock_sock(newsk);
@@ -2197,8 +2199,6 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority)
        newsk->sk_err_soft = 0;
        newsk->sk_priority = 0;
        newsk->sk_incoming_cpu = raw_smp_processor_id();
-       if (likely(newsk->sk_net_refcnt))
-               sock_inuse_add(sock_net(newsk), 1);
 
        /* Before updating sk_refcnt, we must commit prior changes to memory
         * (Documentation/RCU/rculist_nulls.rst for details)
index 2cf02b4..4bb9401 100644 (file)
@@ -205,6 +205,8 @@ bpf_tcp_ca_get_func_proto(enum bpf_func_id func_id,
                    offsetof(struct tcp_congestion_ops, release))
                        return &bpf_sk_getsockopt_proto;
                return NULL;
+       case BPF_FUNC_ktime_get_coarse_ns:
+               return &bpf_ktime_get_coarse_ns_proto;
        default:
                return bpf_base_func_proto(func_id);
        }
index ec73a0d..323e622 100644 (file)
@@ -2591,7 +2591,7 @@ static int __devinet_sysctl_register(struct net *net, char *dev_name,
 free:
        kfree(t);
 out:
-       return -ENOBUFS;
+       return -ENOMEM;
 }
 
 static void __devinet_sysctl_unregister(struct net *net,
index b7796b4..bbb3d39 100644 (file)
@@ -1758,6 +1758,9 @@ static skb_frag_t *skb_advance_to_frag(struct sk_buff *skb, u32 offset_skb,
 {
        skb_frag_t *frag;
 
+       if (unlikely(offset_skb >= skb->len))
+               return NULL;
+
        offset_skb -= skb_headlen(skb);
        if ((int)offset_skb < 0 || skb_has_frag_list(skb))
                return NULL;
index 319dd7b..8bcecdd 100644 (file)
@@ -1807,6 +1807,17 @@ int udp_read_sock(struct sock *sk, read_descriptor_t *desc,
                skb = skb_recv_udp(sk, 0, 1, &err);
                if (!skb)
                        return err;
+
+               if (udp_lib_checksum_complete(skb)) {
+                       __UDP_INC_STATS(sock_net(sk), UDP_MIB_CSUMERRORS,
+                                       IS_UDPLITE(sk));
+                       __UDP_INC_STATS(sock_net(sk), UDP_MIB_INERRORS,
+                                       IS_UDPLITE(sk));
+                       atomic_inc(&sk->sk_drops);
+                       kfree_skb(skb);
+                       continue;
+               }
+
                used = recv_actor(desc, skb, 0, skb->len);
                if (used <= 0) {
                        if (!copied)
index ed2f061..f0bac6f 100644 (file)
@@ -808,6 +808,12 @@ int esp6_input_done2(struct sk_buff *skb, int err)
                struct tcphdr *th;
 
                offset = ipv6_skip_exthdr(skb, offset, &nexthdr, &frag_off);
+
+               if (offset < 0) {
+                       err = -EINVAL;
+                       goto out;
+               }
+
                uh = (void *)(skb->data + offset);
                th = (void *)(skb->data + offset);
                hdr_len += offset;
index e2b791c..bd3d319 100644 (file)
@@ -80,7 +80,8 @@ static int ieee80211_set_mon_options(struct ieee80211_sub_if_data *sdata,
        }
 
        /* also validate MU-MIMO change */
-       monitor_sdata = rtnl_dereference(local->monitor_sdata);
+       monitor_sdata = wiphy_dereference(local->hw.wiphy,
+                                         local->monitor_sdata);
 
        if (!monitor_sdata &&
            (params->vht_mumimo_groups || params->vht_mumimo_follow_addr))
@@ -840,7 +841,8 @@ static int ieee80211_set_monitor_channel(struct wiphy *wiphy,
 
        mutex_lock(&local->mtx);
        if (local->use_chanctx) {
-               sdata = rtnl_dereference(local->monitor_sdata);
+               sdata = wiphy_dereference(local->hw.wiphy,
+                                         local->monitor_sdata);
                if (sdata) {
                        ieee80211_vif_release_channel(sdata);
                        ret = ieee80211_vif_use_channel(sdata, chandef,
@@ -2707,7 +2709,8 @@ static int ieee80211_set_tx_power(struct wiphy *wiphy,
                sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
 
                if (sdata->vif.type == NL80211_IFTYPE_MONITOR) {
-                       sdata = rtnl_dereference(local->monitor_sdata);
+                       sdata = wiphy_dereference(local->hw.wiphy,
+                                                 local->monitor_sdata);
                        if (!sdata)
                                return -EOPNOTSUPP;
                }
@@ -2767,7 +2770,8 @@ static int ieee80211_set_tx_power(struct wiphy *wiphy,
        mutex_unlock(&local->iflist_mtx);
 
        if (has_monitor) {
-               sdata = rtnl_dereference(local->monitor_sdata);
+               sdata = wiphy_dereference(local->hw.wiphy,
+                                         local->monitor_sdata);
                if (sdata) {
                        sdata->user_power_level = local->user_power_level;
                        if (txp_type != sdata->vif.bss_conf.txpower_type)
index 9a2145c..20aa5cc 100644 (file)
@@ -588,7 +588,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, bool going_do
         */
        if (local->suspended) {
                WARN_ON(local->wowlan);
-               WARN_ON(rtnl_dereference(local->monitor_sdata));
+               WARN_ON(rcu_access_pointer(local->monitor_sdata));
                return;
        }
 
@@ -961,6 +961,7 @@ int ieee80211_add_virtual_monitor(struct ieee80211_local *local)
                return 0;
 
        ASSERT_RTNL();
+       lockdep_assert_wiphy(local->hw.wiphy);
 
        if (local->monitor_sdata)
                return 0;
@@ -1028,6 +1029,7 @@ void ieee80211_del_virtual_monitor(struct ieee80211_local *local)
                return;
 
        ASSERT_RTNL();
+       lockdep_assert_wiphy(local->hw.wiphy);
 
        mutex_lock(&local->iflist_mtx);
 
index fb3aaa3..b71a142 100644 (file)
@@ -72,19 +72,19 @@ static inline void ieee80211_mod_tpt_led_trig(struct ieee80211_local *local,
 #endif
 
 static inline void
-ieee80211_tpt_led_trig_tx(struct ieee80211_local *local, __le16 fc, int bytes)
+ieee80211_tpt_led_trig_tx(struct ieee80211_local *local, int bytes)
 {
 #ifdef CONFIG_MAC80211_LEDS
-       if (ieee80211_is_data(fc) && atomic_read(&local->tpt_led_active))
+       if (atomic_read(&local->tpt_led_active))
                local->tpt_led_trigger->tx_bytes += bytes;
 #endif
 }
 
 static inline void
-ieee80211_tpt_led_trig_rx(struct ieee80211_local *local, __le16 fc, int bytes)
+ieee80211_tpt_led_trig_rx(struct ieee80211_local *local, int bytes)
 {
 #ifdef CONFIG_MAC80211_LEDS
-       if (ieee80211_is_data(fc) && atomic_read(&local->tpt_led_active))
+       if (atomic_read(&local->tpt_led_active))
                local->tpt_led_trigger->rx_bytes += bytes;
 #endif
 }
index fc5c608..9541a4c 100644 (file)
@@ -364,7 +364,7 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
         * the compiler to think we have walked past the end of the
         * struct member.
         */
-       pos = (void *)&rthdr->it_optional[it_present - rthdr->it_optional];
+       pos = (void *)&rthdr->it_optional[it_present + 1 - rthdr->it_optional];
 
        /* the order of the following fields is important */
 
@@ -1952,7 +1952,8 @@ ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx)
                int keyid = rx->sta->ptk_idx;
                sta_ptk = rcu_dereference(rx->sta->ptk[keyid]);
 
-               if (ieee80211_has_protected(fc)) {
+               if (ieee80211_has_protected(fc) &&
+                   !(status->flag & RX_FLAG_IV_STRIPPED)) {
                        cs = rx->sta->cipher_scheme;
                        keyid = ieee80211_get_keyid(rx->skb, cs);
 
@@ -4863,6 +4864,7 @@ void ieee80211_rx_list(struct ieee80211_hw *hw, struct ieee80211_sta *pubsta,
        struct ieee80211_rate *rate = NULL;
        struct ieee80211_supported_band *sband;
        struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
+       struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 
        WARN_ON_ONCE(softirq_count() == 0);
 
@@ -4959,9 +4961,9 @@ void ieee80211_rx_list(struct ieee80211_hw *hw, struct ieee80211_sta *pubsta,
        if (!(status->flag & RX_FLAG_8023))
                skb = ieee80211_rx_monitor(local, skb, rate);
        if (skb) {
-               ieee80211_tpt_led_trig_rx(local,
-                                         ((struct ieee80211_hdr *)skb->data)->frame_control,
-                                         skb->len);
+               if ((status->flag & RX_FLAG_8023) ||
+                       ieee80211_is_data_present(hdr->frame_control))
+                       ieee80211_tpt_led_trig_rx(local, skb->len);
 
                if (status->flag & RX_FLAG_8023)
                        __ieee80211_rx_handle_8023(hw, pubsta, skb, list);
index a756a19..278945e 100644 (file)
@@ -1721,21 +1721,19 @@ static bool ieee80211_tx_frags(struct ieee80211_local *local,
  * Returns false if the frame couldn't be transmitted but was queued instead.
  */
 static bool __ieee80211_tx(struct ieee80211_local *local,
-                          struct sk_buff_head *skbs, int led_len,
-                          struct sta_info *sta, bool txpending)
+                          struct sk_buff_head *skbs, struct sta_info *sta,
+                          bool txpending)
 {
        struct ieee80211_tx_info *info;
        struct ieee80211_sub_if_data *sdata;
        struct ieee80211_vif *vif;
        struct sk_buff *skb;
        bool result;
-       __le16 fc;
 
        if (WARN_ON(skb_queue_empty(skbs)))
                return true;
 
        skb = skb_peek(skbs);
-       fc = ((struct ieee80211_hdr *)skb->data)->frame_control;
        info = IEEE80211_SKB_CB(skb);
        sdata = vif_to_sdata(info->control.vif);
        if (sta && !sta->uploaded)
@@ -1769,8 +1767,6 @@ static bool __ieee80211_tx(struct ieee80211_local *local,
 
        result = ieee80211_tx_frags(local, vif, sta, skbs, txpending);
 
-       ieee80211_tpt_led_trig_tx(local, fc, led_len);
-
        WARN_ON_ONCE(!skb_queue_empty(skbs));
 
        return result;
@@ -1920,7 +1916,6 @@ static bool ieee80211_tx(struct ieee80211_sub_if_data *sdata,
        ieee80211_tx_result res_prepare;
        struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
        bool result = true;
-       int led_len;
 
        if (unlikely(skb->len < 10)) {
                dev_kfree_skb(skb);
@@ -1928,7 +1923,6 @@ static bool ieee80211_tx(struct ieee80211_sub_if_data *sdata,
        }
 
        /* initialises tx */
-       led_len = skb->len;
        res_prepare = ieee80211_tx_prepare(sdata, &tx, sta, skb);
 
        if (unlikely(res_prepare == TX_DROP)) {
@@ -1951,8 +1945,7 @@ static bool ieee80211_tx(struct ieee80211_sub_if_data *sdata,
                return true;
 
        if (!invoke_tx_handlers_late(&tx))
-               result = __ieee80211_tx(local, &tx.skbs, led_len,
-                                       tx.sta, txpending);
+               result = __ieee80211_tx(local, &tx.skbs, tx.sta, txpending);
 
        return result;
 }
@@ -4175,6 +4168,7 @@ void __ieee80211_subif_start_xmit(struct sk_buff *skb,
        struct ieee80211_local *local = sdata->local;
        struct sta_info *sta;
        struct sk_buff *next;
+       int len = skb->len;
 
        if (unlikely(skb->len < ETH_HLEN)) {
                kfree_skb(skb);
@@ -4221,10 +4215,8 @@ void __ieee80211_subif_start_xmit(struct sk_buff *skb,
                }
        } else {
                /* we cannot process non-linear frames on this path */
-               if (skb_linearize(skb)) {
-                       kfree_skb(skb);
-                       goto out;
-               }
+               if (skb_linearize(skb))
+                       goto out_free;
 
                /* the frame could be fragmented, software-encrypted, and other
                 * things so we cannot really handle checksum offload with it -
@@ -4258,7 +4250,10 @@ void __ieee80211_subif_start_xmit(struct sk_buff *skb,
        goto out;
  out_free:
        kfree_skb(skb);
+       len = 0;
  out:
+       if (len)
+               ieee80211_tpt_led_trig_tx(local, len);
        rcu_read_unlock();
 }
 
@@ -4396,8 +4391,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
 }
 
 static bool ieee80211_tx_8023(struct ieee80211_sub_if_data *sdata,
-                             struct sk_buff *skb, int led_len,
-                             struct sta_info *sta,
+                             struct sk_buff *skb, struct sta_info *sta,
                              bool txpending)
 {
        struct ieee80211_local *local = sdata->local;
@@ -4410,6 +4404,8 @@ static bool ieee80211_tx_8023(struct ieee80211_sub_if_data *sdata,
        if (sta)
                sk_pacing_shift_update(skb->sk, local->hw.tx_sk_pacing_shift);
 
+       ieee80211_tpt_led_trig_tx(local, skb->len);
+
        if (ieee80211_queue_skb(local, sdata, sta, skb))
                return true;
 
@@ -4498,7 +4494,7 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
        if (key)
                info->control.hw_key = &key->conf;
 
-       ieee80211_tx_8023(sdata, skb, skb->len, sta, false);
+       ieee80211_tx_8023(sdata, skb, sta, false);
 
        return;
 
@@ -4637,7 +4633,7 @@ static bool ieee80211_tx_pending_skb(struct ieee80211_local *local,
                if (IS_ERR(sta) || (sta && !sta->uploaded))
                        sta = NULL;
 
-               result = ieee80211_tx_8023(sdata, skb, skb->len, sta, true);
+               result = ieee80211_tx_8023(sdata, skb, sta, true);
        } else {
                struct sk_buff_head skbs;
 
@@ -4647,7 +4643,7 @@ static bool ieee80211_tx_pending_skb(struct ieee80211_local *local,
                hdr = (struct ieee80211_hdr *)skb->data;
                sta = sta_info_get(sdata, hdr->addr1);
 
-               result = __ieee80211_tx(local, &skbs, skb->len, sta, true);
+               result = __ieee80211_tx(local, &skbs, sta, true);
        }
 
        return result;
index 39fa2a5..43df2f0 100644 (file)
@@ -796,7 +796,7 @@ static void __iterate_interfaces(struct ieee80211_local *local,
 
        sdata = rcu_dereference_check(local->monitor_sdata,
                                      lockdep_is_held(&local->iflist_mtx) ||
-                                     lockdep_rtnl_is_held());
+                                     lockdep_is_held(&local->hw.wiphy->mtx));
        if (sdata &&
            (iter_flags & IEEE80211_IFACE_ITER_RESUME_ALL || !active_only ||
             sdata->flags & IEEE80211_SDATA_IN_DRIVER))
@@ -2381,7 +2381,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
                                   IEEE80211_TPT_LEDTRIG_FL_RADIO, 0);
 
        /* add interfaces */
-       sdata = rtnl_dereference(local->monitor_sdata);
+       sdata = wiphy_dereference(local->hw.wiphy, local->monitor_sdata);
        if (sdata) {
                /* in HW restart it exists already */
                WARN_ON(local->resuming);
@@ -2426,7 +2426,8 @@ int ieee80211_reconfig(struct ieee80211_local *local)
                                WARN_ON(drv_add_chanctx(local, ctx));
                mutex_unlock(&local->chanctx_mtx);
 
-               sdata = rtnl_dereference(local->monitor_sdata);
+               sdata = wiphy_dereference(local->hw.wiphy,
+                                         local->monitor_sdata);
                if (sdata && ieee80211_sdata_running(sdata))
                        ieee80211_assign_chanctx(local, sdata);
        }
index 9ea6004..62c6733 100644 (file)
@@ -143,7 +143,6 @@ u16 ieee80211_select_queue_80211(struct ieee80211_sub_if_data *sdata,
 u16 __ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
                             struct sta_info *sta, struct sk_buff *skb)
 {
-       struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
        struct mac80211_qos_map *qos_map;
        bool qos;
 
@@ -156,7 +155,7 @@ u16 __ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
        else
                qos = false;
 
-       if (!qos || (info->control.flags & IEEE80211_TX_CTRL_DONT_REORDER)) {
+       if (!qos) {
                skb->priority = 0; /* required for correct WPA/11i MIC */
                return IEEE80211_AC_BE;
        }
index 3c645c1..dc7a240 100644 (file)
@@ -94,13 +94,13 @@ int nfc_dev_up(struct nfc_dev *dev)
 
        device_lock(&dev->dev);
 
-       if (dev->rfkill && rfkill_blocked(dev->rfkill)) {
-               rc = -ERFKILL;
+       if (!device_is_registered(&dev->dev)) {
+               rc = -ENODEV;
                goto error;
        }
 
-       if (!device_is_registered(&dev->dev)) {
-               rc = -ENODEV;
+       if (dev->rfkill && rfkill_blocked(dev->rfkill)) {
+               rc = -ERFKILL;
                goto error;
        }
 
@@ -1125,11 +1125,7 @@ int nfc_register_device(struct nfc_dev *dev)
        if (rc)
                pr_err("Could not register llcp device\n");
 
-       rc = nfc_genl_device_added(dev);
-       if (rc)
-               pr_debug("The userspace won't be notified that the device %s was added\n",
-                        dev_name(&dev->dev));
-
+       device_lock(&dev->dev);
        dev->rfkill = rfkill_alloc(dev_name(&dev->dev), &dev->dev,
                                   RFKILL_TYPE_NFC, &nfc_rfkill_ops, dev);
        if (dev->rfkill) {
@@ -1138,6 +1134,12 @@ int nfc_register_device(struct nfc_dev *dev)
                        dev->rfkill = NULL;
                }
        }
+       device_unlock(&dev->dev);
+
+       rc = nfc_genl_device_added(dev);
+       if (rc)
+               pr_debug("The userspace won't be notified that the device %s was added\n",
+                        dev_name(&dev->dev));
 
        return 0;
 }
@@ -1154,10 +1156,17 @@ void nfc_unregister_device(struct nfc_dev *dev)
 
        pr_debug("dev_name=%s\n", dev_name(&dev->dev));
 
+       rc = nfc_genl_device_removed(dev);
+       if (rc)
+               pr_debug("The userspace won't be notified that the device %s "
+                        "was removed\n", dev_name(&dev->dev));
+
+       device_lock(&dev->dev);
        if (dev->rfkill) {
                rfkill_unregister(dev->rfkill);
                rfkill_destroy(dev->rfkill);
        }
+       device_unlock(&dev->dev);
 
        if (dev->ops->check_presence) {
                device_lock(&dev->dev);
@@ -1167,11 +1176,6 @@ void nfc_unregister_device(struct nfc_dev *dev)
                cancel_work_sync(&dev->check_pres_work);
        }
 
-       rc = nfc_genl_device_removed(dev);
-       if (rc)
-               pr_debug("The userspace won't be notified that the device %s "
-                        "was removed\n", dev_name(&dev->dev));
-
        nfc_llcp_unregister_device(dev);
 
        mutex_lock(&nfc_devlist_mutex);
index 6fd873a..d253738 100644 (file)
@@ -144,12 +144,15 @@ inline int nci_request(struct nci_dev *ndev,
 {
        int rc;
 
-       if (!test_bit(NCI_UP, &ndev->flags))
-               return -ENETDOWN;
-
        /* Serialize all requests */
        mutex_lock(&ndev->req_lock);
-       rc = __nci_request(ndev, req, opt, timeout);
+       /* check the state after obtaing the lock against any races
+        * from nci_close_device when the device gets removed.
+        */
+       if (test_bit(NCI_UP, &ndev->flags))
+               rc = __nci_request(ndev, req, opt, timeout);
+       else
+               rc = -ENETDOWN;
        mutex_unlock(&ndev->req_lock);
 
        return rc;
@@ -473,6 +476,11 @@ static int nci_open_device(struct nci_dev *ndev)
 
        mutex_lock(&ndev->req_lock);
 
+       if (test_bit(NCI_UNREG, &ndev->flags)) {
+               rc = -ENODEV;
+               goto done;
+       }
+
        if (test_bit(NCI_UP, &ndev->flags)) {
                rc = -EALREADY;
                goto done;
@@ -545,6 +553,10 @@ done:
 static int nci_close_device(struct nci_dev *ndev)
 {
        nci_req_cancel(ndev, ENODEV);
+
+       /* This mutex needs to be held as a barrier for
+        * caller nci_unregister_device
+        */
        mutex_lock(&ndev->req_lock);
 
        if (!test_and_clear_bit(NCI_UP, &ndev->flags)) {
@@ -582,8 +594,8 @@ static int nci_close_device(struct nci_dev *ndev)
 
        del_timer_sync(&ndev->cmd_timer);
 
-       /* Clear flags */
-       ndev->flags = 0;
+       /* Clear flags except NCI_UNREG */
+       ndev->flags &= BIT(NCI_UNREG);
 
        mutex_unlock(&ndev->req_lock);
 
@@ -1266,6 +1278,12 @@ void nci_unregister_device(struct nci_dev *ndev)
 {
        struct nci_conn_info *conn_info, *n;
 
+       /* This set_bit is not protected with specialized barrier,
+        * However, it is fine because the mutex_lock(&ndev->req_lock);
+        * in nci_close_device() will help to emit one.
+        */
+       set_bit(NCI_UNREG, &ndev->flags);
+
        nci_close_device(ndev);
 
        destroy_workqueue(ndev->cmd_wq);
index d64b0ee..efc963a 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/if_arp.h>
 #include <net/net_namespace.h>
 #include <net/netlink.h>
+#include <net/dst.h>
 #include <net/pkt_sched.h>
 #include <net/pkt_cls.h>
 #include <linux/tc_act/tc_mirred.h>
@@ -228,6 +229,7 @@ static int tcf_mirred_act(struct sk_buff *skb, const struct tc_action *a,
        bool want_ingress;
        bool is_redirect;
        bool expects_nh;
+       bool at_ingress;
        int m_eaction;
        int mac_len;
        bool at_nh;
@@ -263,7 +265,8 @@ static int tcf_mirred_act(struct sk_buff *skb, const struct tc_action *a,
         * ingress - that covers the TC S/W datapath.
         */
        is_redirect = tcf_mirred_is_act_redirect(m_eaction);
-       use_reinsert = skb_at_tc_ingress(skb) && is_redirect &&
+       at_ingress = skb_at_tc_ingress(skb);
+       use_reinsert = at_ingress && is_redirect &&
                       tcf_mirred_can_reinsert(retval);
        if (!use_reinsert) {
                skb2 = skb_clone(skb, GFP_ATOMIC);
@@ -271,10 +274,12 @@ static int tcf_mirred_act(struct sk_buff *skb, const struct tc_action *a,
                        goto out;
        }
 
+       want_ingress = tcf_mirred_act_wants_ingress(m_eaction);
+
        /* All mirred/redirected skbs should clear previous ct info */
        nf_reset_ct(skb2);
-
-       want_ingress = tcf_mirred_act_wants_ingress(m_eaction);
+       if (want_ingress && !at_ingress) /* drop dst for egress -> ingress */
+               skb_dst_drop(skb2);
 
        expects_nh = want_ingress || !m_mac_header_xmit;
        at_nh = skb->data == skb_network_header(skb);
index 59284da..b61c802 100644 (file)
@@ -566,6 +566,10 @@ static void smc_stat_fallback(struct smc_sock *smc)
 
 static void smc_switch_to_fallback(struct smc_sock *smc, int reason_code)
 {
+       wait_queue_head_t *smc_wait = sk_sleep(&smc->sk);
+       wait_queue_head_t *clc_wait = sk_sleep(smc->clcsock->sk);
+       unsigned long flags;
+
        smc->use_fallback = true;
        smc->fallback_rsn = reason_code;
        smc_stat_fallback(smc);
@@ -575,6 +579,16 @@ static void smc_switch_to_fallback(struct smc_sock *smc, int reason_code)
                smc->clcsock->file->private_data = smc->clcsock;
                smc->clcsock->wq.fasync_list =
                        smc->sk.sk_socket->wq.fasync_list;
+
+               /* There may be some entries remaining in
+                * smc socket->wq, which should be removed
+                * to clcsocket->wq during the fallback.
+                */
+               spin_lock_irqsave(&smc_wait->lock, flags);
+               spin_lock(&clc_wait->lock);
+               list_splice_init(&smc_wait->head, &clc_wait->head);
+               spin_unlock(&clc_wait->lock);
+               spin_unlock_irqrestore(&smc_wait->lock, flags);
        }
 }
 
index 49b8ba3..25ebd30 100644 (file)
@@ -708,13 +708,14 @@ static u8 smcr_next_link_id(struct smc_link_group *lgr)
        int i;
 
        while (1) {
+again:
                link_id = ++lgr->next_link_id;
                if (!link_id)   /* skip zero as link_id */
                        link_id = ++lgr->next_link_id;
                for (i = 0; i < SMC_LINKS_PER_LGR_MAX; i++) {
                        if (smc_link_usable(&lgr->lnk[i]) &&
                            lgr->lnk[i].link_id == link_id)
-                               continue;
+                               goto again;
                }
                break;
        }
index dc60c32..b4d9419 100644 (file)
@@ -524,7 +524,7 @@ static int tipc_aead_init(struct tipc_aead **aead, struct tipc_aead_key *ukey,
                return -EEXIST;
 
        /* Allocate a new AEAD */
-       tmp = kzalloc(sizeof(*tmp), GFP_ATOMIC);
+       tmp = kzalloc(sizeof(*tmp), GFP_KERNEL);
        if (unlikely(!tmp))
                return -ENOMEM;
 
@@ -597,6 +597,10 @@ static int tipc_aead_init(struct tipc_aead **aead, struct tipc_aead_key *ukey,
        tmp->cloned = NULL;
        tmp->authsize = TIPC_AES_GCM_TAG_SIZE;
        tmp->key = kmemdup(ukey, tipc_aead_key_size(ukey), GFP_KERNEL);
+       if (!tmp->key) {
+               tipc_aead_free(&tmp->rcu);
+               return -ENOMEM;
+       }
        memcpy(&tmp->salt, ukey->key + keylen, TIPC_AES_GCM_SALT_SIZE);
        atomic_set(&tmp->users, 0);
        atomic64_set(&tmp->seqno, 0);
@@ -1470,7 +1474,7 @@ int tipc_crypto_start(struct tipc_crypto **crypto, struct net *net,
                return -EEXIST;
 
        /* Allocate crypto */
-       c = kzalloc(sizeof(*c), GFP_ATOMIC);
+       c = kzalloc(sizeof(*c), GFP_KERNEL);
        if (!c)
                return -ENOMEM;
 
@@ -1484,7 +1488,7 @@ int tipc_crypto_start(struct tipc_crypto **crypto, struct net *net,
        }
 
        /* Allocate statistic structure */
-       c->stats = alloc_percpu_gfp(struct tipc_crypto_stats, GFP_ATOMIC);
+       c->stats = alloc_percpu(struct tipc_crypto_stats);
        if (!c->stats) {
                if (c->wq)
                        destroy_workqueue(c->wq);
@@ -2457,7 +2461,7 @@ static void tipc_crypto_work_tx(struct work_struct *work)
        }
 
        /* Lets duplicate it first */
-       skey = kmemdup(aead->key, tipc_aead_key_size(aead->key), GFP_ATOMIC);
+       skey = kmemdup(aead->key, tipc_aead_key_size(aead->key), GFP_KERNEL);
        rcu_read_unlock();
 
        /* Now, generate new key, initiate & distribute it */
index 1b7a487..09ae844 100644 (file)
@@ -1298,8 +1298,11 @@ static bool tipc_data_input(struct tipc_link *l, struct sk_buff *skb,
                return false;
 #ifdef CONFIG_TIPC_CRYPTO
        case MSG_CRYPTO:
-               tipc_crypto_msg_rcv(l->net, skb);
-               return true;
+               if (TIPC_SKB_CB(skb)->decrypted) {
+                       tipc_crypto_msg_rcv(l->net, skb);
+                       return true;
+               }
+               fallthrough;
 #endif
        default:
                pr_warn("Dropping received illegal msg type\n");
index 81232b7..a27b3b5 100644 (file)
@@ -936,33 +936,37 @@ nl80211_packet_pattern_policy[MAX_NL80211_PKTPAT + 1] = {
        [NL80211_PKTPAT_OFFSET] = { .type = NLA_U32 },
 };
 
-int nl80211_prepare_wdev_dump(struct netlink_callback *cb,
-                             struct cfg80211_registered_device **rdev,
-                             struct wireless_dev **wdev)
+static int nl80211_prepare_wdev_dump(struct netlink_callback *cb,
+                                    struct cfg80211_registered_device **rdev,
+                                    struct wireless_dev **wdev,
+                                    struct nlattr **attrbuf)
 {
        int err;
 
        if (!cb->args[0]) {
-               struct nlattr **attrbuf;
+               struct nlattr **attrbuf_free = NULL;
 
-               attrbuf = kcalloc(NUM_NL80211_ATTR, sizeof(*attrbuf),
-                                 GFP_KERNEL);
-               if (!attrbuf)
-                       return -ENOMEM;
+               if (!attrbuf) {
+                       attrbuf = kcalloc(NUM_NL80211_ATTR, sizeof(*attrbuf),
+                                         GFP_KERNEL);
+                       if (!attrbuf)
+                               return -ENOMEM;
+                       attrbuf_free = attrbuf;
+               }
 
                err = nlmsg_parse_deprecated(cb->nlh,
                                             GENL_HDRLEN + nl80211_fam.hdrsize,
                                             attrbuf, nl80211_fam.maxattr,
                                             nl80211_policy, NULL);
                if (err) {
-                       kfree(attrbuf);
+                       kfree(attrbuf_free);
                        return err;
                }
 
                rtnl_lock();
                *wdev = __cfg80211_wdev_from_attrs(NULL, sock_net(cb->skb->sk),
                                                   attrbuf);
-               kfree(attrbuf);
+               kfree(attrbuf_free);
                if (IS_ERR(*wdev)) {
                        rtnl_unlock();
                        return PTR_ERR(*wdev);
@@ -6197,7 +6201,7 @@ static int nl80211_dump_station(struct sk_buff *skb,
        int sta_idx = cb->args[2];
        int err;
 
-       err = nl80211_prepare_wdev_dump(cb, &rdev, &wdev);
+       err = nl80211_prepare_wdev_dump(cb, &rdev, &wdev, NULL);
        if (err)
                return err;
        /* nl80211_prepare_wdev_dump acquired it in the successful case */
@@ -7092,7 +7096,7 @@ static int nl80211_dump_mpath(struct sk_buff *skb,
        int path_idx = cb->args[2];
        int err;
 
-       err = nl80211_prepare_wdev_dump(cb, &rdev, &wdev);
+       err = nl80211_prepare_wdev_dump(cb, &rdev, &wdev, NULL);
        if (err)
                return err;
        /* nl80211_prepare_wdev_dump acquired it in the successful case */
@@ -7292,7 +7296,7 @@ static int nl80211_dump_mpp(struct sk_buff *skb,
        int path_idx = cb->args[2];
        int err;
 
-       err = nl80211_prepare_wdev_dump(cb, &rdev, &wdev);
+       err = nl80211_prepare_wdev_dump(cb, &rdev, &wdev, NULL);
        if (err)
                return err;
        /* nl80211_prepare_wdev_dump acquired it in the successful case */
@@ -9718,7 +9722,7 @@ static int nl80211_dump_scan(struct sk_buff *skb, struct netlink_callback *cb)
        int start = cb->args[2], idx = 0;
        int err;
 
-       err = nl80211_prepare_wdev_dump(cb, &rdev, &wdev);
+       err = nl80211_prepare_wdev_dump(cb, &rdev, &wdev, NULL);
        if (err)
                return err;
        /* nl80211_prepare_wdev_dump acquired it in the successful case */
@@ -9851,7 +9855,7 @@ static int nl80211_dump_survey(struct sk_buff *skb, struct netlink_callback *cb)
        if (!attrbuf)
                return -ENOMEM;
 
-       res = nl80211_prepare_wdev_dump(cb, &rdev, &wdev);
+       res = nl80211_prepare_wdev_dump(cb, &rdev, &wdev, attrbuf);
        if (res) {
                kfree(attrbuf);
                return res;
index a3f3877..d642e3b 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Portions of this file
- * Copyright (C) 2018, 2020 Intel Corporation
+ * Copyright (C) 2018, 2020-2021 Intel Corporation
  */
 #ifndef __NET_WIRELESS_NL80211_H
 #define __NET_WIRELESS_NL80211_H
@@ -22,10 +22,6 @@ static inline u64 wdev_id(struct wireless_dev *wdev)
               ((u64)wiphy_to_rdev(wdev->wiphy)->wiphy_idx << 32);
 }
 
-int nl80211_prepare_wdev_dump(struct netlink_callback *cb,
-                             struct cfg80211_registered_device **rdev,
-                             struct wireless_dev **wdev);
-
 int nl80211_parse_chandef(struct cfg80211_registered_device *rdev,
                          struct genl_info *info,
                          struct cfg80211_chan_def *chandef);
index 5ff1f87..41ea65d 100644 (file)
@@ -1046,6 +1046,7 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev,
 
                switch (otype) {
                case NL80211_IFTYPE_AP:
+               case NL80211_IFTYPE_P2P_GO:
                        cfg80211_stop_ap(rdev, dev, true);
                        break;
                case NL80211_IFTYPE_ADHOC:
index 90c4e1e..bc4ad48 100644 (file)
@@ -500,7 +500,7 @@ struct xdp_buff *xp_alloc(struct xsk_buff_pool *pool)
                pool->free_list_cnt--;
                xskb = list_first_entry(&pool->free_list, struct xdp_buff_xsk,
                                        free_list_node);
-               list_del(&xskb->free_list_node);
+               list_del_init(&xskb->free_list_node);
        }
 
        xskb->xdp.data = xskb->xdp.data_hard_start + XDP_PACKET_HEADROOM;
@@ -568,7 +568,7 @@ static u32 xp_alloc_reused(struct xsk_buff_pool *pool, struct xdp_buff **xdp, u3
        i = nb_entries;
        while (i--) {
                xskb = list_first_entry(&pool->free_list, struct xdp_buff_xsk, free_list_node);
-               list_del(&xskb->free_list_node);
+               list_del_init(&xskb->free_list_node);
 
                *xdp = &xskb->xdp;
                xdp++;
@@ -615,6 +615,9 @@ EXPORT_SYMBOL(xp_can_alloc);
 
 void xp_free(struct xdp_buff_xsk *xskb)
 {
+       if (!list_empty(&xskb->free_list_node))
+               return;
+
        xskb->pool->free_list_cnt++;
        list_add(&xskb->free_list_node, &xskb->pool->free_list);
 }
index bec3528..43d2e9a 100644 (file)
@@ -31,6 +31,15 @@ config SAMPLE_FTRACE_DIRECT
          This builds an ftrace direct function example
          that hooks to wake_up_process and prints the parameters.
 
+config SAMPLE_FTRACE_DIRECT_MULTI
+       tristate "Build register_ftrace_direct_multi() example"
+       depends on DYNAMIC_FTRACE_WITH_DIRECT_CALLS && m
+       depends on HAVE_SAMPLE_FTRACE_DIRECT_MULTI
+       help
+         This builds an ftrace direct function example
+         that hooks to wake_up_process and schedule, and prints
+         the function addresses.
+
 config SAMPLE_TRACE_ARRAY
         tristate "Build sample module for kernel access to Ftrace instancess"
        depends on EVENT_TRACING && m
@@ -237,5 +246,5 @@ endif # SAMPLES
 config HAVE_SAMPLE_FTRACE_DIRECT
        bool
 
-config HAVE_SAMPLE_FTRACE_MULTI_DIRECT
+config HAVE_SAMPLE_FTRACE_DIRECT_MULTI
        bool
index b7b9830..4bcd6b9 100644 (file)
@@ -22,7 +22,7 @@ subdir-$(CONFIG_SAMPLE_TIMER)         += timers
 obj-$(CONFIG_SAMPLE_TRACE_EVENTS)      += trace_events/
 obj-$(CONFIG_SAMPLE_TRACE_PRINTK)      += trace_printk/
 obj-$(CONFIG_SAMPLE_FTRACE_DIRECT)     += ftrace/
-obj-$(CONFIG_SAMPLE_FTRACE_MULTI_DIRECT) += ftrace/
+obj-$(CONFIG_SAMPLE_FTRACE_DIRECT_MULTI) += ftrace/
 obj-$(CONFIG_SAMPLE_TRACE_ARRAY)       += ftrace/
 subdir-$(CONFIG_SAMPLE_UHID)           += uhid
 obj-$(CONFIG_VIDEO_PCI_SKELETON)       += v4l/
index 722b3fa..1752a46 100644 (file)
@@ -9,8 +9,6 @@
  * Include file for sample Host Bandwidth Manager (HBM) BPF programs
  */
 #define KBUILD_MODNAME "foo"
-#include <stddef.h>
-#include <stdbool.h>
 #include <uapi/linux/bpf.h>
 #include <uapi/linux/if_ether.h>
 #include <uapi/linux/if_packet.h>
index d84e694..a81704d 100644 (file)
@@ -309,7 +309,6 @@ int main(int argc, char **argv)
        const char *mprog_filename = NULL, *mprog_name = NULL;
        struct xdp_redirect_cpu *skel;
        struct bpf_map_info info = {};
-       char ifname_buf[IF_NAMESIZE];
        struct bpf_cpumap_val value;
        __u32 infosz = sizeof(info);
        int ret = EXIT_FAIL_OPTION;
@@ -390,10 +389,10 @@ int main(int argc, char **argv)
                case 'd':
                        if (strlen(optarg) >= IF_NAMESIZE) {
                                fprintf(stderr, "-d/--dev name too long\n");
+                               usage(argv, long_options, __doc__, mask, true, skel->obj);
                                goto end_cpu;
                        }
-                       safe_strncpy(ifname_buf, optarg, strlen(ifname_buf));
-                       ifindex = if_nametoindex(ifname_buf);
+                       ifindex = if_nametoindex(optarg);
                        if (!ifindex)
                                ifindex = strtoul(optarg, NULL, 0);
                        if (!ifindex) {
index b32d821..8740838 100644 (file)
@@ -120,7 +120,10 @@ struct sample_output {
                __u64 xmit;
        } totals;
        struct {
-               __u64 pps;
+               union {
+                       __u64 pps;
+                       __u64 num;
+               };
                __u64 drop;
                __u64 err;
        } rx_cnt;
@@ -1322,7 +1325,7 @@ int sample_install_xdp(struct bpf_program *xdp_prog, int ifindex, bool generic,
 
 static void sample_summary_print(void)
 {
-       double period = sample_out.rx_cnt.pps;
+       double num = sample_out.rx_cnt.num;
 
        if (sample_out.totals.rx) {
                double pkts = sample_out.totals.rx;
@@ -1330,7 +1333,7 @@ static void sample_summary_print(void)
                print_always("  Packets received    : %'-10llu\n",
                             sample_out.totals.rx);
                print_always("  Average packets/s   : %'-10.0f\n",
-                            sample_round(pkts / period));
+                            sample_round(pkts / num));
        }
        if (sample_out.totals.redir) {
                double pkts = sample_out.totals.redir;
@@ -1338,7 +1341,7 @@ static void sample_summary_print(void)
                print_always("  Packets redirected  : %'-10llu\n",
                             sample_out.totals.redir);
                print_always("  Average redir/s     : %'-10.0f\n",
-                            sample_round(pkts / period));
+                            sample_round(pkts / num));
        }
        if (sample_out.totals.drop)
                print_always("  Rx dropped          : %'-10llu\n",
@@ -1355,7 +1358,7 @@ static void sample_summary_print(void)
                print_always("  Packets transmitted : %'-10llu\n",
                             sample_out.totals.xmit);
                print_always("  Average transmit/s  : %'-10.0f\n",
-                            sample_round(pkts / period));
+                            sample_round(pkts / num));
        }
 }
 
@@ -1422,7 +1425,7 @@ static int sample_stats_collect(struct stats_record *rec)
        return 0;
 }
 
-static void sample_summary_update(struct sample_output *out, int interval)
+static void sample_summary_update(struct sample_output *out)
 {
        sample_out.totals.rx += out->totals.rx;
        sample_out.totals.redir += out->totals.redir;
@@ -1430,12 +1433,11 @@ static void sample_summary_update(struct sample_output *out, int interval)
        sample_out.totals.drop_xmit += out->totals.drop_xmit;
        sample_out.totals.err += out->totals.err;
        sample_out.totals.xmit += out->totals.xmit;
-       sample_out.rx_cnt.pps += interval;
+       sample_out.rx_cnt.num++;
 }
 
 static void sample_stats_print(int mask, struct stats_record *cur,
-                              struct stats_record *prev, char *prog_name,
-                              int interval)
+                              struct stats_record *prev, char *prog_name)
 {
        struct sample_output out = {};
 
@@ -1452,7 +1454,7 @@ static void sample_stats_print(int mask, struct stats_record *cur,
        else if (mask & SAMPLE_DEVMAP_XMIT_CNT_MULTI)
                stats_get_devmap_xmit_multi(cur, prev, 0, &out,
                                            mask & SAMPLE_DEVMAP_XMIT_CNT);
-       sample_summary_update(&out, interval);
+       sample_summary_update(&out);
 
        stats_print(prog_name, mask, cur, prev, &out);
 }
@@ -1495,7 +1497,7 @@ static void swap(struct stats_record **a, struct stats_record **b)
 }
 
 static int sample_timer_cb(int timerfd, struct stats_record **rec,
-                          struct stats_record **prev, int interval)
+                          struct stats_record **prev)
 {
        char line[64] = "Summary";
        int ret;
@@ -1524,7 +1526,7 @@ static int sample_timer_cb(int timerfd, struct stats_record **rec,
                snprintf(line, sizeof(line), "%s->%s", f ?: "?", t ?: "?");
        }
 
-       sample_stats_print(sample_mask, *rec, *prev, line, interval);
+       sample_stats_print(sample_mask, *rec, *prev, line);
        return 0;
 }
 
@@ -1579,7 +1581,7 @@ int sample_run(int interval, void (*post_cb)(void *), void *ctx)
                if (pfd[0].revents & POLLIN)
                        ret = sample_signal_cb();
                else if (pfd[1].revents & POLLIN)
-                       ret = sample_timer_cb(timerfd, &rec, &prev, interval);
+                       ret = sample_timer_cb(timerfd, &rec, &prev);
 
                if (ret)
                        break;
index e8a3f85..b9198e2 100644 (file)
@@ -3,7 +3,7 @@
 obj-$(CONFIG_SAMPLE_FTRACE_DIRECT) += ftrace-direct.o
 obj-$(CONFIG_SAMPLE_FTRACE_DIRECT) += ftrace-direct-too.o
 obj-$(CONFIG_SAMPLE_FTRACE_DIRECT) += ftrace-direct-modify.o
-obj-$(CONFIG_SAMPLE_FTRACE_MULTI_DIRECT) += ftrace-direct-multi.o
+obj-$(CONFIG_SAMPLE_FTRACE_DIRECT_MULTI) += ftrace-direct-multi.o
 
 CFLAGS_sample-trace-array.o := -I$(src)
 obj-$(CONFIG_SAMPLE_TRACE_ARRAY) += sample-trace-array.o
index b6d7806..2fafc9a 100644 (file)
@@ -4,6 +4,7 @@
 #include <linux/mm.h> /* for handle_mm_fault() */
 #include <linux/ftrace.h>
 #include <linux/sched/stat.h>
+#include <asm/asm-offsets.h>
 
 extern void my_direct_func(unsigned long ip);
 
@@ -14,6 +15,8 @@ void my_direct_func(unsigned long ip)
 
 extern void my_tramp(void *);
 
+#ifdef CONFIG_X86_64
+
 asm (
 "      .pushsection    .text, \"ax\", @progbits\n"
 "      .type           my_tramp, @function\n"
@@ -31,6 +34,33 @@ asm (
 "      .popsection\n"
 );
 
+#endif /* CONFIG_X86_64 */
+
+#ifdef CONFIG_S390
+
+asm (
+"      .pushsection    .text, \"ax\", @progbits\n"
+"      .type           my_tramp, @function\n"
+"      .globl          my_tramp\n"
+"   my_tramp:"
+"      lgr             %r1,%r15\n"
+"      stmg            %r0,%r5,"__stringify(__SF_GPRS)"(%r15)\n"
+"      stg             %r14,"__stringify(__SF_GPRS+8*8)"(%r15)\n"
+"      aghi            %r15,"__stringify(-STACK_FRAME_OVERHEAD)"\n"
+"      stg             %r1,"__stringify(__SF_BACKCHAIN)"(%r15)\n"
+"      lgr             %r2,%r0\n"
+"      brasl           %r14,my_direct_func\n"
+"      aghi            %r15,"__stringify(STACK_FRAME_OVERHEAD)"\n"
+"      lmg             %r0,%r5,"__stringify(__SF_GPRS)"(%r15)\n"
+"      lg              %r14,"__stringify(__SF_GPRS+8*8)"(%r15)\n"
+"      lgr             %r1,%r0\n"
+"      br              %r1\n"
+"      .size           my_tramp, .-my_tramp\n"
+"      .popsection\n"
+);
+
+#endif /* CONFIG_S390 */
+
 static struct ftrace_ops direct;
 
 static int __init ftrace_direct_multi_init(void)
index d0ce5cf..d5b5f2a 100644 (file)
 #define X86_FEATURE_XSAVEC             (10*32+ 1) /* XSAVEC instruction */
 #define X86_FEATURE_XGETBV1            (10*32+ 2) /* XGETBV with ECX = 1 instruction */
 #define X86_FEATURE_XSAVES             (10*32+ 3) /* XSAVES/XRSTORS instructions */
+#define X86_FEATURE_XFD                        (10*32+ 4) /* "" eXtended Feature Disabling */
 
 /*
  * Extended auxiliary flags: Linux defined - for features scattered in various
 /* Intel-defined CPU features, CPUID level 0x00000007:1 (EAX), word 12 */
 #define X86_FEATURE_AVX_VNNI           (12*32+ 4) /* AVX VNNI instructions */
 #define X86_FEATURE_AVX512_BF16                (12*32+ 5) /* AVX512 BFLOAT16 instructions */
+#define X86_FEATURE_AMX_TILE           (18*32+24) /* AMX tile Support */
 
 /* AMD-defined CPU features, CPUID level 0x80000008 (EBX), word 13 */
 #define X86_FEATURE_CLZERO             (13*32+ 0) /* CLZERO instruction */
index 2ef1f65..5a776a0 100644 (file)
@@ -504,4 +504,8 @@ struct kvm_pmu_event_filter {
 #define KVM_PMU_EVENT_ALLOW 0
 #define KVM_PMU_EVENT_DENY 1
 
+/* for KVM_{GET,SET,HAS}_DEVICE_ATTR */
+#define KVM_VCPU_TSC_CTRL 0 /* control group for the timestamp counter (TSC) */
+#define   KVM_VCPU_TSC_OFFSET 0 /* attribute for the TSC offset */
+
 #endif /* _ASM_X86_KVM_H */
index bbd1150..8791d0e 100644 (file)
@@ -88,5 +88,4 @@ $(BPFOBJ): $(wildcard $(LIBBPF_SRC)/*.[ch] $(LIBBPF_SRC)/Makefile) | $(BPFOBJ_OU
 
 $(DEFAULT_BPFTOOL): $(BPFOBJ) | $(BPFTOOL_OUTPUT)
        $(Q)$(MAKE) $(submake_extras) -C ../bpftool OUTPUT=$(BPFTOOL_OUTPUT)   \
-                   LIBBPF_OUTPUT=$(BPFOBJ_OUTPUT)                             \
-                   LIBBPF_DESTDIR=$(BPF_DESTDIR) CC=$(HOSTCC) LD=$(HOSTLD)
+                   CC=$(HOSTCC) LD=$(HOSTLD)
index 9204395..0b243ce 100644 (file)
@@ -200,7 +200,6 @@ int main(int argc, char *argv[])
        main_test_timerfd();
        main_test_stackprotector_all();
        main_test_libdw_dwarf_unwind();
-       main_test_sync_compare_and_swap(argc, argv);
        main_test_zlib();
        main_test_pthread_attr_setaffinity_np();
        main_test_pthread_barrier();
index a067410..1daa452 100644 (file)
@@ -269,6 +269,7 @@ struct kvm_xen_exit {
 #define KVM_EXIT_AP_RESET_HOLD    32
 #define KVM_EXIT_X86_BUS_LOCK     33
 #define KVM_EXIT_XEN              34
+#define KVM_EXIT_RISCV_SBI        35
 
 /* For KVM_EXIT_INTERNAL_ERROR */
 /* Emulate instruction failed. */
@@ -397,13 +398,23 @@ struct kvm_run {
                 * "ndata" is correct, that new fields are enumerated in "flags",
                 * and that each flag enumerates fields that are 64-bit aligned
                 * and sized (so that ndata+internal.data[] is valid/accurate).
+                *
+                * Space beyond the defined fields may be used to store arbitrary
+                * debug information relating to the emulation failure. It is
+                * accounted for in "ndata" but the format is unspecified and is
+                * not represented in "flags". Any such information is *not* ABI!
                 */
                struct {
                        __u32 suberror;
                        __u32 ndata;
                        __u64 flags;
-                       __u8  insn_size;
-                       __u8  insn_bytes[15];
+                       union {
+                               struct {
+                                       __u8  insn_size;
+                                       __u8  insn_bytes[15];
+                               };
+                       };
+                       /* Arbitrary debug data may follow. */
                } emulation_failure;
                /* KVM_EXIT_OSI */
                struct {
@@ -469,6 +480,13 @@ struct kvm_run {
                } msr;
                /* KVM_EXIT_XEN */
                struct kvm_xen_exit xen;
+               /* KVM_EXIT_RISCV_SBI */
+               struct {
+                       unsigned long extension_id;
+                       unsigned long function_id;
+                       unsigned long args[6];
+                       unsigned long ret[2];
+               } riscv_sbi;
                /* Fix the size of the union. */
                char padding[256];
        };
@@ -1112,6 +1130,7 @@ struct kvm_ppc_resize_hpt {
 #define KVM_CAP_BINARY_STATS_FD 203
 #define KVM_CAP_EXIT_ON_EMULATION_FAILURE 204
 #define KVM_CAP_ARM_MTE 205
+#define KVM_CAP_VM_MOVE_ENC_CONTEXT_FROM 206
 
 #ifdef KVM_CAP_IRQ_ROUTING
 
@@ -1223,11 +1242,16 @@ struct kvm_irqfd {
 
 /* Do not use 1, KVM_CHECK_EXTENSION returned it before we had flags.  */
 #define KVM_CLOCK_TSC_STABLE           2
+#define KVM_CLOCK_REALTIME             (1 << 2)
+#define KVM_CLOCK_HOST_TSC             (1 << 3)
 
 struct kvm_clock_data {
        __u64 clock;
        __u32 flags;
-       __u32 pad[9];
+       __u32 pad0;
+       __u64 realtime;
+       __u64 host_tsc;
+       __u32 pad[4];
 };
 
 /* For KVM_CAP_SW_TLB */
index d26e547..6f3df00 100644 (file)
@@ -45,8 +45,8 @@ struct bpf_gen {
        int nr_fd_array;
 };
 
-void bpf_gen__init(struct bpf_gen *gen, int log_level);
-int bpf_gen__finish(struct bpf_gen *gen);
+void bpf_gen__init(struct bpf_gen *gen, int log_level, int nr_progs, int nr_maps);
+int bpf_gen__finish(struct bpf_gen *gen, int nr_progs, int nr_maps);
 void bpf_gen__free(struct bpf_gen *gen);
 void bpf_gen__load_btf(struct bpf_gen *gen, const void *raw_data, __u32 raw_size);
 void bpf_gen__map_create(struct bpf_gen *gen, struct bpf_create_map_params *map_attr, int map_idx);
index 502dea5..9934851 100644 (file)
@@ -18,7 +18,7 @@
 #define MAX_USED_MAPS  64
 #define MAX_USED_PROGS 32
 #define MAX_KFUNC_DESCS 256
-#define MAX_FD_ARRAY_SZ (MAX_USED_PROGS + MAX_KFUNC_DESCS)
+#define MAX_FD_ARRAY_SZ (MAX_USED_MAPS + MAX_KFUNC_DESCS)
 
 /* The following structure describes the stack layout of the loader program.
  * In addition R6 contains the pointer to context.
@@ -33,8 +33,8 @@
  */
 struct loader_stack {
        __u32 btf_fd;
-       __u32 prog_fd[MAX_USED_PROGS];
        __u32 inner_map_fd;
+       __u32 prog_fd[MAX_USED_PROGS];
 };
 
 #define stack_off(field) \
@@ -42,6 +42,11 @@ struct loader_stack {
 
 #define attr_field(attr, field) (attr + offsetof(union bpf_attr, field))
 
+static int blob_fd_array_off(struct bpf_gen *gen, int index)
+{
+       return gen->fd_array + index * sizeof(int);
+}
+
 static int realloc_insn_buf(struct bpf_gen *gen, __u32 size)
 {
        size_t off = gen->insn_cur - gen->insn_start;
@@ -102,11 +107,15 @@ static void emit2(struct bpf_gen *gen, struct bpf_insn insn1, struct bpf_insn in
        emit(gen, insn2);
 }
 
-void bpf_gen__init(struct bpf_gen *gen, int log_level)
+static int add_data(struct bpf_gen *gen, const void *data, __u32 size);
+static void emit_sys_close_blob(struct bpf_gen *gen, int blob_off);
+
+void bpf_gen__init(struct bpf_gen *gen, int log_level, int nr_progs, int nr_maps)
 {
-       size_t stack_sz = sizeof(struct loader_stack);
+       size_t stack_sz = sizeof(struct loader_stack), nr_progs_sz;
        int i;
 
+       gen->fd_array = add_data(gen, NULL, MAX_FD_ARRAY_SZ * sizeof(int));
        gen->log_level = log_level;
        /* save ctx pointer into R6 */
        emit(gen, BPF_MOV64_REG(BPF_REG_6, BPF_REG_1));
@@ -118,19 +127,27 @@ void bpf_gen__init(struct bpf_gen *gen, int log_level)
        emit(gen, BPF_MOV64_IMM(BPF_REG_3, 0));
        emit(gen, BPF_EMIT_CALL(BPF_FUNC_probe_read_kernel));
 
+       /* amount of stack actually used, only used to calculate iterations, not stack offset */
+       nr_progs_sz = offsetof(struct loader_stack, prog_fd[nr_progs]);
        /* jump over cleanup code */
        emit(gen, BPF_JMP_IMM(BPF_JA, 0, 0,
-                             /* size of cleanup code below */
-                             (stack_sz / 4) * 3 + 2));
+                             /* size of cleanup code below (including map fd cleanup) */
+                             (nr_progs_sz / 4) * 3 + 2 +
+                             /* 6 insns for emit_sys_close_blob,
+                              * 6 insns for debug_regs in emit_sys_close_blob
+                              */
+                             nr_maps * (6 + (gen->log_level ? 6 : 0))));
 
        /* remember the label where all error branches will jump to */
        gen->cleanup_label = gen->insn_cur - gen->insn_start;
        /* emit cleanup code: close all temp FDs */
-       for (i = 0; i < stack_sz; i += 4) {
+       for (i = 0; i < nr_progs_sz; i += 4) {
                emit(gen, BPF_LDX_MEM(BPF_W, BPF_REG_1, BPF_REG_10, -stack_sz + i));
                emit(gen, BPF_JMP_IMM(BPF_JSLE, BPF_REG_1, 0, 1));
                emit(gen, BPF_EMIT_CALL(BPF_FUNC_sys_close));
        }
+       for (i = 0; i < nr_maps; i++)
+               emit_sys_close_blob(gen, blob_fd_array_off(gen, i));
        /* R7 contains the error code from sys_bpf. Copy it into R0 and exit. */
        emit(gen, BPF_MOV64_REG(BPF_REG_0, BPF_REG_7));
        emit(gen, BPF_EXIT_INSN());
@@ -160,8 +177,6 @@ static int add_data(struct bpf_gen *gen, const void *data, __u32 size)
  */
 static int add_map_fd(struct bpf_gen *gen)
 {
-       if (!gen->fd_array)
-               gen->fd_array = add_data(gen, NULL, MAX_FD_ARRAY_SZ * sizeof(int));
        if (gen->nr_maps == MAX_USED_MAPS) {
                pr_warn("Total maps exceeds %d\n", MAX_USED_MAPS);
                gen->error = -E2BIG;
@@ -174,8 +189,6 @@ static int add_kfunc_btf_fd(struct bpf_gen *gen)
 {
        int cur;
 
-       if (!gen->fd_array)
-               gen->fd_array = add_data(gen, NULL, MAX_FD_ARRAY_SZ * sizeof(int));
        if (gen->nr_fd_array == MAX_KFUNC_DESCS) {
                cur = add_data(gen, NULL, sizeof(int));
                return (cur - gen->fd_array) / sizeof(int);
@@ -183,11 +196,6 @@ static int add_kfunc_btf_fd(struct bpf_gen *gen)
        return MAX_USED_MAPS + gen->nr_fd_array++;
 }
 
-static int blob_fd_array_off(struct bpf_gen *gen, int index)
-{
-       return gen->fd_array + index * sizeof(int);
-}
-
 static int insn_bytes_to_bpf_size(__u32 sz)
 {
        switch (sz) {
@@ -359,10 +367,15 @@ static void emit_sys_close_blob(struct bpf_gen *gen, int blob_off)
        __emit_sys_close(gen);
 }
 
-int bpf_gen__finish(struct bpf_gen *gen)
+int bpf_gen__finish(struct bpf_gen *gen, int nr_progs, int nr_maps)
 {
        int i;
 
+       if (nr_progs != gen->nr_progs || nr_maps != gen->nr_maps) {
+               pr_warn("progs/maps mismatch\n");
+               gen->error = -EFAULT;
+               return gen->error;
+       }
        emit_sys_close_stack(gen, stack_off(btf_fd));
        for (i = 0; i < gen->nr_progs; i++)
                move_stack2ctx(gen,
index a1bea19..7c74342 100644 (file)
@@ -7258,7 +7258,7 @@ int bpf_object__load_xattr(struct bpf_object_load_attr *attr)
        }
 
        if (obj->gen_loader)
-               bpf_gen__init(obj->gen_loader, attr->log_level);
+               bpf_gen__init(obj->gen_loader, attr->log_level, obj->nr_programs, obj->nr_maps);
 
        err = bpf_object__probe_loading(obj);
        err = err ? : bpf_object__load_vmlinux_btf(obj, false);
@@ -7277,7 +7277,7 @@ int bpf_object__load_xattr(struct bpf_object_load_attr *attr)
                for (i = 0; i < obj->nr_maps; i++)
                        obj->maps[i].fd = -1;
                if (!err)
-                       err = bpf_gen__finish(obj->gen_loader);
+                       err = bpf_gen__finish(obj->gen_loader, obj->nr_programs, obj->nr_maps);
        }
 
        /* clean up fd_array */
index 07e65a0..afd1447 100644 (file)
@@ -1010,6 +1010,9 @@ ifndef NO_AUXTRACE
   ifndef NO_AUXTRACE
     $(call detected,CONFIG_AUXTRACE)
     CFLAGS += -DHAVE_AUXTRACE_SUPPORT
+    ifeq ($(feature-reallocarray), 0)
+      CFLAGS += -DCOMPAT_NEED_REALLOCARRAY
+    endif
   endif
 endif
 
index 1ca7bc3..e2c481f 100644 (file)
 446    n64     landlock_restrict_self          sys_landlock_restrict_self
 # 447 reserved for memfd_secret
 448    n64     process_mrelease                sys_process_mrelease
+449    n64     futex_waitv                     sys_futex_waitv
index 488f6e6..fa0ff4c 100644 (file)
@@ -223,6 +223,8 @@ static unsigned int group(pthread_t *pth,
                snd_ctx->out_fds[i] = fds[1];
                if (!thread_mode)
                        close(fds[0]);
+
+               free(ctx);
        }
 
        /* Now we have all the fds, fork the senders */
@@ -239,6 +241,8 @@ static unsigned int group(pthread_t *pth,
                for (i = 0; i < num_fds; i++)
                        close(snd_ctx->out_fds[i]);
 
+       free(snd_ctx);
+
        /* Return number of children to reap */
        return num_fds * 2;
 }
index 8167ebf..8ae4004 100644 (file)
@@ -619,14 +619,17 @@ static int report__browse_hists(struct report *rep)
        int ret;
        struct perf_session *session = rep->session;
        struct evlist *evlist = session->evlist;
-       const char *help = perf_tip(system_path(TIPDIR));
+       char *help = NULL, *path = NULL;
 
-       if (help == NULL) {
+       path = system_path(TIPDIR);
+       if (perf_tip(&help, path) || help == NULL) {
                /* fallback for people who don't install perf ;-) */
-               help = perf_tip(DOCDIR);
-               if (help == NULL)
-                       help = "Cannot load tips.txt file, please install perf!";
+               free(path);
+               path = system_path(DOCDIR);
+               if (perf_tip(&help, path) || help == NULL)
+                       help = strdup("Cannot load tips.txt file, please install perf!");
        }
+       free(path);
 
        switch (use_browser) {
        case 1:
@@ -651,7 +654,7 @@ static int report__browse_hists(struct report *rep)
                ret = evlist__tty_browse_hists(evlist, rep, help);
                break;
        }
-
+       free(help);
        return ret;
 }
 
index fbb68de..d01532d 100644 (file)
@@ -88,7 +88,6 @@ static int test__event_update(struct test_suite *test __maybe_unused, int subtes
        struct evsel *evsel;
        struct event_name tmp;
        struct evlist *evlist = evlist__new_default();
-       char *unit = strdup("KRAVA");
 
        TEST_ASSERT_VAL("failed to get evlist", evlist);
 
@@ -99,7 +98,8 @@ static int test__event_update(struct test_suite *test __maybe_unused, int subtes
 
        perf_evlist__id_add(&evlist->core, &evsel->core, 0, 0, 123);
 
-       evsel->unit = unit;
+       free((char *)evsel->unit);
+       evsel->unit = strdup("KRAVA");
 
        TEST_ASSERT_VAL("failed to synthesize attr update unit",
                        !perf_event__synthesize_event_update_unit(NULL, evsel, process_event_unit));
@@ -119,7 +119,6 @@ static int test__event_update(struct test_suite *test __maybe_unused, int subtes
        TEST_ASSERT_VAL("failed to synthesize attr update cpus",
                        !perf_event__synthesize_event_update_cpus(&tmp.tool, evsel, process_event_cpus));
 
-       free(unit);
        evlist__delete(evlist);
        return 0;
 }
index b669d22..07f2411 100644 (file)
@@ -36,7 +36,7 @@
  * These are based on the input value (213) specified
  * in branch_stack variable.
  */
-#define BS_EXPECTED_BE 0xa00d000000000000
+#define BS_EXPECTED_BE 0xa000d00000000000
 #define BS_EXPECTED_LE 0xd5000000
 #define FLAG(s)        s->branch_stack->entries[i].flags
 
index 820d942..9d4c451 100644 (file)
@@ -21,6 +21,7 @@ do {                                            \
 volatile u64 data1;
 volatile u8 data2[3];
 
+#ifndef __s390x__
 static int wp_read(int fd, long long *count, int size)
 {
        int ret = read(fd, count, size);
@@ -48,7 +49,6 @@ static void get__perf_event_attr(struct perf_event_attr *attr, int wp_type,
        attr->exclude_hv     = 1;
 }
 
-#ifndef __s390x__
 static int __event(int wp_type, void *wp_addr, unsigned long wp_len)
 {
        int fd;
index c1f24d0..5075ece 100644 (file)
@@ -535,6 +535,18 @@ struct perf_hpp_list perf_hpp_list = {
 #undef __HPP_SORT_ACC_FN
 #undef __HPP_SORT_RAW_FN
 
+static void fmt_free(struct perf_hpp_fmt *fmt)
+{
+       /*
+        * At this point fmt should be completely
+        * unhooked, if not it's a bug.
+        */
+       BUG_ON(!list_empty(&fmt->list));
+       BUG_ON(!list_empty(&fmt->sort_list));
+
+       if (fmt->free)
+               fmt->free(fmt);
+}
 
 void perf_hpp__init(void)
 {
@@ -598,9 +610,10 @@ void perf_hpp_list__prepend_sort_field(struct perf_hpp_list *list,
        list_add(&format->sort_list, &list->sorts);
 }
 
-void perf_hpp__column_unregister(struct perf_hpp_fmt *format)
+static void perf_hpp__column_unregister(struct perf_hpp_fmt *format)
 {
        list_del_init(&format->list);
+       fmt_free(format);
 }
 
 void perf_hpp__cancel_cumulate(void)
@@ -672,19 +685,6 @@ next:
 }
 
 
-static void fmt_free(struct perf_hpp_fmt *fmt)
-{
-       /*
-        * At this point fmt should be completely
-        * unhooked, if not it's a bug.
-        */
-       BUG_ON(!list_empty(&fmt->list));
-       BUG_ON(!list_empty(&fmt->sort_list));
-
-       if (fmt->free)
-               fmt->free(fmt);
-}
-
 void perf_hpp__reset_output_field(struct perf_hpp_list *list)
 {
        struct perf_hpp_fmt *fmt, *tmp;
index 4748bcf..fccac06 100644 (file)
@@ -51,6 +51,7 @@ struct arm_spe {
        u8                              timeless_decoding;
        u8                              data_queued;
 
+       u64                             sample_type;
        u8                              sample_flc;
        u8                              sample_llc;
        u8                              sample_tlb;
@@ -287,6 +288,12 @@ static void arm_spe_prep_sample(struct arm_spe *spe,
        event->sample.header.size = sizeof(struct perf_event_header);
 }
 
+static int arm_spe__inject_event(union perf_event *event, struct perf_sample *sample, u64 type)
+{
+       event->header.size = perf_event__sample_event_size(sample, type, 0);
+       return perf_event__synthesize_sample(event, type, 0, sample);
+}
+
 static inline int
 arm_spe_deliver_synth_event(struct arm_spe *spe,
                            struct arm_spe_queue *speq __maybe_unused,
@@ -295,6 +302,12 @@ arm_spe_deliver_synth_event(struct arm_spe *spe,
 {
        int ret;
 
+       if (spe->synth_opts.inject) {
+               ret = arm_spe__inject_event(event, sample, spe->sample_type);
+               if (ret)
+                       return ret;
+       }
+
        ret = perf_session__deliver_synth_event(spe->session, event, sample);
        if (ret)
                pr_err("ARM SPE: failed to deliver event, error %d\n", ret);
@@ -986,6 +999,8 @@ arm_spe_synth_events(struct arm_spe *spe, struct perf_session *session)
        else
                attr.sample_type |= PERF_SAMPLE_TIME;
 
+       spe->sample_type = attr.sample_type;
+
        attr.exclude_user = evsel->core.attr.exclude_user;
        attr.exclude_kernel = evsel->core.attr.exclude_kernel;
        attr.exclude_hv = evsel->core.attr.exclude_hv;
index a59fb2e..ac0127b 100644 (file)
@@ -241,7 +241,7 @@ void evsel__init(struct evsel *evsel,
 {
        perf_evsel__init(&evsel->core, attr, idx);
        evsel->tracking    = !idx;
-       evsel->unit        = "";
+       evsel->unit        = strdup("");
        evsel->scale       = 1.0;
        evsel->max_events  = ULONG_MAX;
        evsel->evlist      = NULL;
@@ -276,13 +276,8 @@ struct evsel *evsel__new_idx(struct perf_event_attr *attr, int idx)
        }
 
        if (evsel__is_clock(evsel)) {
-               /*
-                * The evsel->unit points to static alias->unit
-                * so it's ok to use static string in here.
-                */
-               static const char *unit = "msec";
-
-               evsel->unit = unit;
+               free((char *)evsel->unit);
+               evsel->unit = strdup("msec");
                evsel->scale = 1e-6;
        }
 
@@ -420,7 +415,11 @@ struct evsel *evsel__clone(struct evsel *orig)
 
        evsel->max_events = orig->max_events;
        evsel->tool_event = orig->tool_event;
-       evsel->unit = orig->unit;
+       free((char *)evsel->unit);
+       evsel->unit = strdup(orig->unit);
+       if (evsel->unit == NULL)
+               goto out_err;
+
        evsel->scale = orig->scale;
        evsel->snapshot = orig->snapshot;
        evsel->per_pkg = orig->per_pkg;
@@ -1441,6 +1440,7 @@ void evsel__exit(struct evsel *evsel)
        zfree(&evsel->group_name);
        zfree(&evsel->name);
        zfree(&evsel->pmu_name);
+       zfree(&evsel->unit);
        zfree(&evsel->metric_id);
        evsel__zero_per_pkg(evsel);
        hashmap__free(evsel->per_pkg_mask);
index fda8d14..79cce21 100644 (file)
@@ -4257,9 +4257,11 @@ int perf_event__process_event_update(struct perf_tool *tool __maybe_unused,
 
        switch (ev->type) {
        case PERF_EVENT_UPDATE__UNIT:
+               free((char *)evsel->unit);
                evsel->unit = strdup(ev->data);
                break;
        case PERF_EVENT_UPDATE__NAME:
+               free(evsel->name);
                evsel->name = strdup(ev->data);
                break;
        case PERF_EVENT_UPDATE__SCALE:
@@ -4268,11 +4270,11 @@ int perf_event__process_event_update(struct perf_tool *tool __maybe_unused,
                break;
        case PERF_EVENT_UPDATE__CPUS:
                ev_cpus = (struct perf_record_event_update_cpus *)ev->data;
-
                map = cpu_map__new_data(&ev_cpus->cpus);
-               if (map)
+               if (map) {
+                       perf_cpu_map__put(evsel->core.own_cpus);
                        evsel->core.own_cpus = map;
-               else
+               else
                        pr_err("failed to get event_update cpus\n");
        default:
                break;
index 65fe65b..b776465 100644 (file)
@@ -289,15 +289,10 @@ static long hist_time(unsigned long htime)
        return htime;
 }
 
-static void he_stat__add_period(struct he_stat *he_stat, u64 period,
-                               u64 weight, u64 ins_lat, u64 p_stage_cyc)
+static void he_stat__add_period(struct he_stat *he_stat, u64 period)
 {
-
        he_stat->period         += period;
-       he_stat->weight         += weight;
        he_stat->nr_events      += 1;
-       he_stat->ins_lat        += ins_lat;
-       he_stat->p_stage_cyc    += p_stage_cyc;
 }
 
 static void he_stat__add_stat(struct he_stat *dest, struct he_stat *src)
@@ -308,9 +303,6 @@ static void he_stat__add_stat(struct he_stat *dest, struct he_stat *src)
        dest->period_guest_sys  += src->period_guest_sys;
        dest->period_guest_us   += src->period_guest_us;
        dest->nr_events         += src->nr_events;
-       dest->weight            += src->weight;
-       dest->ins_lat           += src->ins_lat;
-       dest->p_stage_cyc               += src->p_stage_cyc;
 }
 
 static void he_stat__decay(struct he_stat *he_stat)
@@ -598,9 +590,6 @@ static struct hist_entry *hists__findnew_entry(struct hists *hists,
        struct hist_entry *he;
        int64_t cmp;
        u64 period = entry->stat.period;
-       u64 weight = entry->stat.weight;
-       u64 ins_lat = entry->stat.ins_lat;
-       u64 p_stage_cyc = entry->stat.p_stage_cyc;
        bool leftmost = true;
 
        p = &hists->entries_in->rb_root.rb_node;
@@ -619,11 +608,11 @@ static struct hist_entry *hists__findnew_entry(struct hists *hists,
 
                if (!cmp) {
                        if (sample_self) {
-                               he_stat__add_period(&he->stat, period, weight, ins_lat, p_stage_cyc);
+                               he_stat__add_period(&he->stat, period);
                                hist_entry__add_callchain_period(he, period);
                        }
                        if (symbol_conf.cumulate_callchain)
-                               he_stat__add_period(he->stat_acc, period, weight, ins_lat, p_stage_cyc);
+                               he_stat__add_period(he->stat_acc, period);
 
                        /*
                         * This mem info was allocated from sample__resolve_mem
@@ -733,9 +722,6 @@ __hists__add_entry(struct hists *hists,
                .stat = {
                        .nr_events = 1,
                        .period = sample->period,
-                       .weight = sample->weight,
-                       .ins_lat = sample->ins_lat,
-                       .p_stage_cyc = sample->p_stage_cyc,
                },
                .parent = sym_parent,
                .filtered = symbol__parent_filter(sym_parent) | al->filtered,
@@ -748,6 +734,9 @@ __hists__add_entry(struct hists *hists,
                .raw_size = sample->raw_size,
                .ops = ops,
                .time = hist_time(sample->time),
+               .weight = sample->weight,
+               .ins_lat = sample->ins_lat,
+               .p_stage_cyc = sample->p_stage_cyc,
        }, *he = hists__findnew_entry(hists, &entry, al, sample_self);
 
        if (!hists->has_callchains && he && he->callchain_size != 0)
index 5343b62..621f35a 100644 (file)
@@ -369,7 +369,6 @@ enum {
 };
 
 void perf_hpp__init(void);
-void perf_hpp__column_unregister(struct perf_hpp_fmt *format);
 void perf_hpp__cancel_cumulate(void);
 void perf_hpp__setup_output_field(struct perf_hpp_list *list);
 void perf_hpp__reset_output_field(struct perf_hpp_list *list);
index 5bfb6f8..ba74fdf 100644 (file)
@@ -402,8 +402,10 @@ static int add_event_tool(struct list_head *list, int *idx,
        if (!evsel)
                return -ENOMEM;
        evsel->tool_event = tool_event;
-       if (tool_event == PERF_TOOL_DURATION_TIME)
-               evsel->unit = "ns";
+       if (tool_event == PERF_TOOL_DURATION_TIME) {
+               free((char *)evsel->unit);
+               evsel->unit = strdup("ns");
+       }
        return 0;
 }
 
@@ -1630,7 +1632,8 @@ int parse_events_add_pmu(struct parse_events_state *parse_state,
        if (parse_state->fake_pmu)
                return 0;
 
-       evsel->unit = info.unit;
+       free((char *)evsel->unit);
+       evsel->unit = strdup(info.unit);
        evsel->scale = info.scale;
        evsel->per_pkg = info.per_pkg;
        evsel->snapshot = info.snapshot;
index 568a88c..a111065 100644 (file)
@@ -1325,88 +1325,68 @@ struct sort_entry sort_mispredict = {
        .se_width_idx   = HISTC_MISPREDICT,
 };
 
-static u64 he_weight(struct hist_entry *he)
-{
-       return he->stat.nr_events ? he->stat.weight / he->stat.nr_events : 0;
-}
-
 static int64_t
-sort__local_weight_cmp(struct hist_entry *left, struct hist_entry *right)
+sort__weight_cmp(struct hist_entry *left, struct hist_entry *right)
 {
-       return he_weight(left) - he_weight(right);
+       return left->weight - right->weight;
 }
 
 static int hist_entry__local_weight_snprintf(struct hist_entry *he, char *bf,
                                    size_t size, unsigned int width)
 {
-       return repsep_snprintf(bf, size, "%-*llu", width, he_weight(he));
+       return repsep_snprintf(bf, size, "%-*llu", width, he->weight);
 }
 
 struct sort_entry sort_local_weight = {
        .se_header      = "Local Weight",
-       .se_cmp         = sort__local_weight_cmp,
+       .se_cmp         = sort__weight_cmp,
        .se_snprintf    = hist_entry__local_weight_snprintf,
        .se_width_idx   = HISTC_LOCAL_WEIGHT,
 };
 
-static int64_t
-sort__global_weight_cmp(struct hist_entry *left, struct hist_entry *right)
-{
-       return left->stat.weight - right->stat.weight;
-}
-
 static int hist_entry__global_weight_snprintf(struct hist_entry *he, char *bf,
                                              size_t size, unsigned int width)
 {
-       return repsep_snprintf(bf, size, "%-*llu", width, he->stat.weight);
+       return repsep_snprintf(bf, size, "%-*llu", width,
+                              he->weight * he->stat.nr_events);
 }
 
 struct sort_entry sort_global_weight = {
        .se_header      = "Weight",
-       .se_cmp         = sort__global_weight_cmp,
+       .se_cmp         = sort__weight_cmp,
        .se_snprintf    = hist_entry__global_weight_snprintf,
        .se_width_idx   = HISTC_GLOBAL_WEIGHT,
 };
 
-static u64 he_ins_lat(struct hist_entry *he)
-{
-               return he->stat.nr_events ? he->stat.ins_lat / he->stat.nr_events : 0;
-}
-
 static int64_t
-sort__local_ins_lat_cmp(struct hist_entry *left, struct hist_entry *right)
+sort__ins_lat_cmp(struct hist_entry *left, struct hist_entry *right)
 {
-               return he_ins_lat(left) - he_ins_lat(right);
+       return left->ins_lat - right->ins_lat;
 }
 
 static int hist_entry__local_ins_lat_snprintf(struct hist_entry *he, char *bf,
                                              size_t size, unsigned int width)
 {
-               return repsep_snprintf(bf, size, "%-*u", width, he_ins_lat(he));
+       return repsep_snprintf(bf, size, "%-*u", width, he->ins_lat);
 }
 
 struct sort_entry sort_local_ins_lat = {
        .se_header      = "Local INSTR Latency",
-       .se_cmp         = sort__local_ins_lat_cmp,
+       .se_cmp         = sort__ins_lat_cmp,
        .se_snprintf    = hist_entry__local_ins_lat_snprintf,
        .se_width_idx   = HISTC_LOCAL_INS_LAT,
 };
 
-static int64_t
-sort__global_ins_lat_cmp(struct hist_entry *left, struct hist_entry *right)
-{
-               return left->stat.ins_lat - right->stat.ins_lat;
-}
-
 static int hist_entry__global_ins_lat_snprintf(struct hist_entry *he, char *bf,
                                               size_t size, unsigned int width)
 {
-               return repsep_snprintf(bf, size, "%-*u", width, he->stat.ins_lat);
+       return repsep_snprintf(bf, size, "%-*u", width,
+                              he->ins_lat * he->stat.nr_events);
 }
 
 struct sort_entry sort_global_ins_lat = {
        .se_header      = "INSTR Latency",
-       .se_cmp         = sort__global_ins_lat_cmp,
+       .se_cmp         = sort__ins_lat_cmp,
        .se_snprintf    = hist_entry__global_ins_lat_snprintf,
        .se_width_idx   = HISTC_GLOBAL_INS_LAT,
 };
@@ -1414,13 +1394,13 @@ struct sort_entry sort_global_ins_lat = {
 static int64_t
 sort__global_p_stage_cyc_cmp(struct hist_entry *left, struct hist_entry *right)
 {
-       return left->stat.p_stage_cyc - right->stat.p_stage_cyc;
+       return left->p_stage_cyc - right->p_stage_cyc;
 }
 
 static int hist_entry__p_stage_cyc_snprintf(struct hist_entry *he, char *bf,
                                        size_t size, unsigned int width)
 {
-       return repsep_snprintf(bf, size, "%-*u", width, he->stat.p_stage_cyc);
+       return repsep_snprintf(bf, size, "%-*u", width, he->p_stage_cyc);
 }
 
 struct sort_entry sort_p_stage_cyc = {
index b67c469..7b71455 100644 (file)
@@ -49,9 +49,6 @@ struct he_stat {
        u64                     period_us;
        u64                     period_guest_sys;
        u64                     period_guest_us;
-       u64                     weight;
-       u64                     ins_lat;
-       u64                     p_stage_cyc;
        u32                     nr_events;
 };
 
@@ -109,6 +106,9 @@ struct hist_entry {
        s32                     socket;
        s32                     cpu;
        u64                     code_page_size;
+       u64                     weight;
+       u64                     ins_lat;
+       u64                     p_stage_cyc;
        u8                      cpumode;
        u8                      depth;
 
index 37a9492..df3c467 100644 (file)
@@ -379,32 +379,32 @@ fetch_kernel_version(unsigned int *puint, char *str,
        return 0;
 }
 
-const char *perf_tip(const char *dirpath)
+int perf_tip(char **strp, const char *dirpath)
 {
        struct strlist *tips;
        struct str_node *node;
-       char *tip = NULL;
        struct strlist_config conf = {
                .dirname = dirpath,
                .file_only = true,
        };
+       int ret = 0;
 
+       *strp = NULL;
        tips = strlist__new("tips.txt", &conf);
        if (tips == NULL)
-               return errno == ENOENT ? NULL :
-                       "Tip: check path of tips.txt or get more memory! ;-p";
+               return -errno;
 
        if (strlist__nr_entries(tips) == 0)
                goto out;
 
        node = strlist__entry(tips, random() % strlist__nr_entries(tips));
-       if (asprintf(&tip, "Tip: %s", node->s) < 0)
-               tip = (char *)"Tip: get more memory! ;-)";
+       if (asprintf(strp, "Tip: %s", node->s) < 0)
+               ret = -ENOMEM;
 
 out:
        strlist__delete(tips);
 
-       return tip;
+       return ret;
 }
 
 char *perf_exe(char *buf, int len)
index ad73705..9f0d36b 100644 (file)
@@ -39,7 +39,7 @@ int fetch_kernel_version(unsigned int *puint,
 #define KVER_FMT       "%d.%d.%d"
 #define KVER_PARAM(x)  KVER_VERSION(x), KVER_PATCHLEVEL(x), KVER_SUBLEVEL(x)
 
-const char *perf_tip(const char *dirpath);
+int perf_tip(char **strp, const char *dirpath);
 
 #ifndef HAVE_SCHED_GETCPU_SUPPORT
 int sched_getcpu(void);
index 54b0a41..62fafbe 100644 (file)
@@ -187,7 +187,7 @@ DEFAULT_BPFTOOL := $(HOST_SCRATCH_DIR)/sbin/bpftool
 $(OUTPUT)/runqslower: $(BPFOBJ) | $(DEFAULT_BPFTOOL) $(RUNQSLOWER_OUTPUT)
        $(Q)$(MAKE) $(submake_extras) -C $(TOOLSDIR)/bpf/runqslower            \
                    OUTPUT=$(RUNQSLOWER_OUTPUT) VMLINUX_BTF=$(VMLINUX_BTF)     \
-                   BPFTOOL_OUTPUT=$(BUILD_DIR)/bpftool/                       \
+                   BPFTOOL_OUTPUT=$(HOST_BUILD_DIR)/bpftool/                  \
                    BPFOBJ_OUTPUT=$(BUILD_DIR)/libbpf                          \
                    BPFOBJ=$(BPFOBJ) BPF_INCLUDE=$(INCLUDE_DIR) &&             \
                    cp $(RUNQSLOWER_OUTPUT)runqslower $@
diff --git a/tools/testing/selftests/bpf/prog_tests/helper_restricted.c b/tools/testing/selftests/bpf/prog_tests/helper_restricted.c
new file mode 100644 (file)
index 0000000..e1de5f8
--- /dev/null
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <test_progs.h>
+#include "test_helper_restricted.skel.h"
+
+void test_helper_restricted(void)
+{
+       int prog_i = 0, prog_cnt;
+       int duration = 0;
+
+       do {
+               struct test_helper_restricted *test;
+               int maybeOK;
+
+               test = test_helper_restricted__open();
+               if (!ASSERT_OK_PTR(test, "open"))
+                       return;
+
+               prog_cnt = test->skeleton->prog_cnt;
+
+               for (int j = 0; j < prog_cnt; ++j) {
+                       struct bpf_program *prog = *test->skeleton->progs[j].prog;
+
+                       maybeOK = bpf_program__set_autoload(prog, prog_i == j);
+                       ASSERT_OK(maybeOK, "set autoload");
+               }
+
+               maybeOK = test_helper_restricted__load(test);
+               CHECK(!maybeOK, test->skeleton->progs[prog_i].name, "helper isn't restricted");
+
+               test_helper_restricted__destroy(test);
+       } while (++prog_i < prog_cnt);
+}
diff --git a/tools/testing/selftests/bpf/progs/test_helper_restricted.c b/tools/testing/selftests/bpf/progs/test_helper_restricted.c
new file mode 100644 (file)
index 0000000..68d64c3
--- /dev/null
@@ -0,0 +1,123 @@
+// SPDX-License-Identifier: GPL-2.0-only
+#include <time.h>
+#include <linux/bpf.h>
+#include <bpf/bpf_helpers.h>
+
+struct timer {
+       struct bpf_timer t;
+};
+
+struct lock {
+       struct bpf_spin_lock l;
+};
+
+struct {
+       __uint(type, BPF_MAP_TYPE_ARRAY);
+       __uint(max_entries, 1);
+       __type(key, __u32);
+       __type(value, struct timer);
+} timers SEC(".maps");
+
+struct {
+       __uint(type, BPF_MAP_TYPE_ARRAY);
+       __uint(max_entries, 1);
+       __type(key, __u32);
+       __type(value, struct lock);
+} locks SEC(".maps");
+
+static int timer_cb(void *map, int *key, struct timer *timer)
+{
+       return 0;
+}
+
+static void timer_work(void)
+{
+       struct timer *timer;
+       const int key = 0;
+
+       timer  = bpf_map_lookup_elem(&timers, &key);
+       if (timer) {
+               bpf_timer_init(&timer->t, &timers, CLOCK_MONOTONIC);
+               bpf_timer_set_callback(&timer->t, timer_cb);
+               bpf_timer_start(&timer->t, 10E9, 0);
+               bpf_timer_cancel(&timer->t);
+       }
+}
+
+static void spin_lock_work(void)
+{
+       const int key = 0;
+       struct lock *lock;
+
+       lock = bpf_map_lookup_elem(&locks, &key);
+       if (lock) {
+               bpf_spin_lock(&lock->l);
+               bpf_spin_unlock(&lock->l);
+       }
+}
+
+SEC("raw_tp/sys_enter")
+int raw_tp_timer(void *ctx)
+{
+       timer_work();
+
+       return 0;
+}
+
+SEC("tp/syscalls/sys_enter_nanosleep")
+int tp_timer(void *ctx)
+{
+       timer_work();
+
+       return 0;
+}
+
+SEC("kprobe/sys_nanosleep")
+int kprobe_timer(void *ctx)
+{
+       timer_work();
+
+       return 0;
+}
+
+SEC("perf_event")
+int perf_event_timer(void *ctx)
+{
+       timer_work();
+
+       return 0;
+}
+
+SEC("raw_tp/sys_enter")
+int raw_tp_spin_lock(void *ctx)
+{
+       spin_lock_work();
+
+       return 0;
+}
+
+SEC("tp/syscalls/sys_enter_nanosleep")
+int tp_spin_lock(void *ctx)
+{
+       spin_lock_work();
+
+       return 0;
+}
+
+SEC("kprobe/sys_nanosleep")
+int kprobe_spin_lock(void *ctx)
+{
+       spin_lock_work();
+
+       return 0;
+}
+
+SEC("perf_event")
+int perf_event_spin_lock(void *ctx)
+{
+       spin_lock_work();
+
+       return 0;
+}
+
+const char LICENSE[] SEC("license") = "GPL";
index 25afe42..465ef3f 100644 (file)
@@ -92,6 +92,7 @@ struct bpf_test {
        int fixup_map_event_output[MAX_FIXUPS];
        int fixup_map_reuseport_array[MAX_FIXUPS];
        int fixup_map_ringbuf[MAX_FIXUPS];
+       int fixup_map_timer[MAX_FIXUPS];
        /* Expected verifier log output for result REJECT or VERBOSE_ACCEPT.
         * Can be a tab-separated sequence of expected strings. An empty string
         * means no log verification.
@@ -604,8 +605,15 @@ static int create_cgroup_storage(bool percpu)
  *   int cnt;
  *   struct bpf_spin_lock l;
  * };
+ * struct bpf_timer {
+ *   __u64 :64;
+ *   __u64 :64;
+ * } __attribute__((aligned(8)));
+ * struct timer {
+ *   struct bpf_timer t;
+ * };
  */
-static const char btf_str_sec[] = "\0bpf_spin_lock\0val\0cnt\0l";
+static const char btf_str_sec[] = "\0bpf_spin_lock\0val\0cnt\0l\0bpf_timer\0timer\0t";
 static __u32 btf_raw_types[] = {
        /* int */
        BTF_TYPE_INT_ENC(0, BTF_INT_SIGNED, 0, 32, 4),  /* [1] */
@@ -616,6 +624,11 @@ static __u32 btf_raw_types[] = {
        BTF_TYPE_ENC(15, BTF_INFO_ENC(BTF_KIND_STRUCT, 0, 2), 8),
        BTF_MEMBER_ENC(19, 1, 0), /* int cnt; */
        BTF_MEMBER_ENC(23, 2, 32),/* struct bpf_spin_lock l; */
+       /* struct bpf_timer */                          /* [4] */
+       BTF_TYPE_ENC(25, BTF_INFO_ENC(BTF_KIND_STRUCT, 0, 0), 16),
+       /* struct timer */                              /* [5] */
+       BTF_TYPE_ENC(35, BTF_INFO_ENC(BTF_KIND_STRUCT, 0, 1), 16),
+       BTF_MEMBER_ENC(41, 4, 0), /* struct bpf_timer t; */
 };
 
 static int load_btf(void)
@@ -696,6 +709,29 @@ static int create_sk_storage_map(void)
        return fd;
 }
 
+static int create_map_timer(void)
+{
+       struct bpf_create_map_attr attr = {
+               .name = "test_map",
+               .map_type = BPF_MAP_TYPE_ARRAY,
+               .key_size = 4,
+               .value_size = 16,
+               .max_entries = 1,
+               .btf_key_type_id = 1,
+               .btf_value_type_id = 5,
+       };
+       int fd, btf_fd;
+
+       btf_fd = load_btf();
+       if (btf_fd < 0)
+               return -1;
+       attr.btf_fd = btf_fd;
+       fd = bpf_create_map_xattr(&attr);
+       if (fd < 0)
+               printf("Failed to create map with timer\n");
+       return fd;
+}
+
 static char bpf_vlog[UINT_MAX >> 8];
 
 static void do_test_fixup(struct bpf_test *test, enum bpf_prog_type prog_type,
@@ -722,6 +758,7 @@ static void do_test_fixup(struct bpf_test *test, enum bpf_prog_type prog_type,
        int *fixup_map_event_output = test->fixup_map_event_output;
        int *fixup_map_reuseport_array = test->fixup_map_reuseport_array;
        int *fixup_map_ringbuf = test->fixup_map_ringbuf;
+       int *fixup_map_timer = test->fixup_map_timer;
 
        if (test->fill_helper) {
                test->fill_insns = calloc(MAX_TEST_INSNS, sizeof(struct bpf_insn));
@@ -907,6 +944,13 @@ static void do_test_fixup(struct bpf_test *test, enum bpf_prog_type prog_type,
                        fixup_map_ringbuf++;
                } while (*fixup_map_ringbuf);
        }
+       if (*fixup_map_timer) {
+               map_fds[21] = create_map_timer();
+               do {
+                       prog[*fixup_map_timer].imm = map_fds[21];
+                       fixup_map_timer++;
+               } while (*fixup_map_timer);
+       }
 }
 
 struct libcap {
diff --git a/tools/testing/selftests/bpf/verifier/helper_restricted.c b/tools/testing/selftests/bpf/verifier/helper_restricted.c
new file mode 100644 (file)
index 0000000..a067b70
--- /dev/null
@@ -0,0 +1,196 @@
+{
+       "bpf_ktime_get_coarse_ns is forbidden in BPF_PROG_TYPE_KPROBE",
+       .insns = {
+               BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_ktime_get_coarse_ns),
+               BPF_MOV64_IMM(BPF_REG_0, 0),
+               BPF_EXIT_INSN(),
+       },
+       .errstr = "unknown func bpf_ktime_get_coarse_ns",
+       .result = REJECT,
+       .prog_type = BPF_PROG_TYPE_KPROBE,
+},
+{
+       "bpf_ktime_get_coarse_ns is forbidden in BPF_PROG_TYPE_TRACEPOINT",
+       .insns = {
+               BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_ktime_get_coarse_ns),
+               BPF_MOV64_IMM(BPF_REG_0, 0),
+               BPF_EXIT_INSN(),
+       },
+       .errstr = "unknown func bpf_ktime_get_coarse_ns",
+       .result = REJECT,
+       .prog_type = BPF_PROG_TYPE_TRACEPOINT,
+},
+{
+       "bpf_ktime_get_coarse_ns is forbidden in BPF_PROG_TYPE_PERF_EVENT",
+       .insns = {
+       BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_ktime_get_coarse_ns),
+       BPF_MOV64_IMM(BPF_REG_0, 0),
+       BPF_EXIT_INSN(),
+       },
+       .errstr = "unknown func bpf_ktime_get_coarse_ns",
+       .result = REJECT,
+       .prog_type = BPF_PROG_TYPE_PERF_EVENT,
+},
+{
+       "bpf_ktime_get_coarse_ns is forbidden in BPF_PROG_TYPE_RAW_TRACEPOINT",
+       .insns = {
+       BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_ktime_get_coarse_ns),
+       BPF_MOV64_IMM(BPF_REG_0, 0),
+       BPF_EXIT_INSN(),
+       },
+       .errstr = "unknown func bpf_ktime_get_coarse_ns",
+       .result = REJECT,
+       .prog_type = BPF_PROG_TYPE_RAW_TRACEPOINT,
+},
+{
+       "bpf_timer_init isn restricted in BPF_PROG_TYPE_KPROBE",
+       .insns = {
+       BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
+       BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
+       BPF_ST_MEM(BPF_DW, BPF_REG_2, 0, 0),
+       BPF_LD_MAP_FD(BPF_REG_1, 0),
+       BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_map_lookup_elem),
+       BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 4),
+       BPF_MOV64_REG(BPF_REG_1, BPF_REG_0),
+       BPF_LD_MAP_FD(BPF_REG_2, 0),
+       BPF_MOV64_IMM(BPF_REG_3, 1),
+       BPF_EMIT_CALL(BPF_FUNC_timer_init),
+       BPF_EXIT_INSN(),
+       },
+       .fixup_map_timer = { 3, 8 },
+       .errstr = "tracing progs cannot use bpf_timer yet",
+       .result = REJECT,
+       .prog_type = BPF_PROG_TYPE_KPROBE,
+},
+{
+       "bpf_timer_init is forbidden in BPF_PROG_TYPE_PERF_EVENT",
+       .insns = {
+       BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
+       BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
+       BPF_ST_MEM(BPF_DW, BPF_REG_2, 0, 0),
+       BPF_LD_MAP_FD(BPF_REG_1, 0),
+       BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_map_lookup_elem),
+       BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 4),
+       BPF_MOV64_REG(BPF_REG_1, BPF_REG_0),
+       BPF_LD_MAP_FD(BPF_REG_2, 0),
+       BPF_MOV64_IMM(BPF_REG_3, 1),
+       BPF_EMIT_CALL(BPF_FUNC_timer_init),
+       BPF_EXIT_INSN(),
+       },
+       .fixup_map_timer = { 3, 8 },
+       .errstr = "tracing progs cannot use bpf_timer yet",
+       .result = REJECT,
+       .prog_type = BPF_PROG_TYPE_PERF_EVENT,
+},
+{
+       "bpf_timer_init is forbidden in BPF_PROG_TYPE_TRACEPOINT",
+       .insns = {
+       BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
+       BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
+       BPF_ST_MEM(BPF_DW, BPF_REG_2, 0, 0),
+       BPF_LD_MAP_FD(BPF_REG_1, 0),
+       BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_map_lookup_elem),
+       BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 4),
+       BPF_MOV64_REG(BPF_REG_1, BPF_REG_0),
+       BPF_LD_MAP_FD(BPF_REG_2, 0),
+       BPF_MOV64_IMM(BPF_REG_3, 1),
+       BPF_EMIT_CALL(BPF_FUNC_timer_init),
+       BPF_EXIT_INSN(),
+       },
+       .fixup_map_timer = { 3, 8 },
+       .errstr = "tracing progs cannot use bpf_timer yet",
+       .result = REJECT,
+       .prog_type = BPF_PROG_TYPE_TRACEPOINT,
+},
+{
+       "bpf_timer_init is forbidden in BPF_PROG_TYPE_RAW_TRACEPOINT",
+       .insns = {
+       BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
+       BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
+       BPF_ST_MEM(BPF_DW, BPF_REG_2, 0, 0),
+       BPF_LD_MAP_FD(BPF_REG_1, 0),
+       BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_map_lookup_elem),
+       BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 4),
+       BPF_MOV64_REG(BPF_REG_1, BPF_REG_0),
+       BPF_LD_MAP_FD(BPF_REG_2, 0),
+       BPF_MOV64_IMM(BPF_REG_3, 1),
+       BPF_EMIT_CALL(BPF_FUNC_timer_init),
+       BPF_EXIT_INSN(),
+       },
+       .fixup_map_timer = { 3, 8 },
+       .errstr = "tracing progs cannot use bpf_timer yet",
+       .result = REJECT,
+       .prog_type = BPF_PROG_TYPE_RAW_TRACEPOINT,
+},
+{
+       "bpf_spin_lock is forbidden in BPF_PROG_TYPE_KPROBE",
+       .insns = {
+       BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
+       BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
+       BPF_ST_MEM(BPF_DW, BPF_REG_2, 0, 0),
+       BPF_LD_MAP_FD(BPF_REG_1, 0),
+       BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_map_lookup_elem),
+       BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 2),
+       BPF_MOV64_REG(BPF_REG_1, BPF_REG_0),
+       BPF_EMIT_CALL(BPF_FUNC_spin_lock),
+       BPF_EXIT_INSN(),
+       },
+       .fixup_map_spin_lock = { 3 },
+       .errstr = "tracing progs cannot use bpf_spin_lock yet",
+       .result = REJECT,
+       .prog_type = BPF_PROG_TYPE_KPROBE,
+},
+{
+       "bpf_spin_lock is forbidden in BPF_PROG_TYPE_TRACEPOINT",
+       .insns = {
+       BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
+       BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
+       BPF_ST_MEM(BPF_DW, BPF_REG_2, 0, 0),
+       BPF_LD_MAP_FD(BPF_REG_1, 0),
+       BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_map_lookup_elem),
+       BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 2),
+       BPF_MOV64_REG(BPF_REG_1, BPF_REG_0),
+       BPF_EMIT_CALL(BPF_FUNC_spin_lock),
+       BPF_EXIT_INSN(),
+       },
+       .fixup_map_spin_lock = { 3 },
+       .errstr = "tracing progs cannot use bpf_spin_lock yet",
+       .result = REJECT,
+       .prog_type = BPF_PROG_TYPE_TRACEPOINT,
+},
+{
+       "bpf_spin_lock is forbidden in BPF_PROG_TYPE_PERF_EVENT",
+       .insns = {
+       BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
+       BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
+       BPF_ST_MEM(BPF_DW, BPF_REG_2, 0, 0),
+       BPF_LD_MAP_FD(BPF_REG_1, 0),
+       BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_map_lookup_elem),
+       BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 2),
+       BPF_MOV64_REG(BPF_REG_1, BPF_REG_0),
+       BPF_EMIT_CALL(BPF_FUNC_spin_lock),
+       BPF_EXIT_INSN(),
+       },
+       .fixup_map_spin_lock = { 3 },
+       .errstr = "tracing progs cannot use bpf_spin_lock yet",
+       .result = REJECT,
+       .prog_type = BPF_PROG_TYPE_PERF_EVENT,
+},
+{
+       "bpf_spin_lock is forbidden in BPF_PROG_TYPE_RAW_TRACEPOINT",
+       .insns = {
+       BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
+       BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
+       BPF_ST_MEM(BPF_DW, BPF_REG_2, 0, 0),
+       BPF_LD_MAP_FD(BPF_REG_1, 0),
+       BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_map_lookup_elem),
+       BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 2),
+       BPF_MOV64_REG(BPF_REG_1, BPF_REG_0),
+       BPF_EMIT_CALL(BPF_FUNC_spin_lock),
+       BPF_EXIT_INSN(),
+       },
+       .fixup_map_spin_lock = { 3 },
+       .errstr = "tracing progs cannot use bpf_spin_lock yet",
+       .result = REJECT,
+       .prog_type = BPF_PROG_TYPE_RAW_TRACEPOINT,
+},
index 2798927..128a348 100644 (file)
        .fixup_map_in_map = { 3 },
        .result = ACCEPT,
 },
+{
+       "map in map state pruning",
+       .insns = {
+       BPF_ST_MEM(0, BPF_REG_10, -4, 0),
+       BPF_MOV64_REG(BPF_REG_6, BPF_REG_10),
+       BPF_ALU64_IMM(BPF_ADD, BPF_REG_6, -4),
+       BPF_MOV64_REG(BPF_REG_2, BPF_REG_6),
+       BPF_LD_MAP_FD(BPF_REG_1, 0),
+       BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_map_lookup_elem),
+       BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0, 1),
+       BPF_EXIT_INSN(),
+       BPF_MOV64_REG(BPF_REG_2, BPF_REG_6),
+       BPF_MOV64_REG(BPF_REG_1, BPF_REG_0),
+       BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_map_lookup_elem),
+       BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0, 11),
+       BPF_MOV64_REG(BPF_REG_2, BPF_REG_6),
+       BPF_LD_MAP_FD(BPF_REG_1, 0),
+       BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_map_lookup_elem),
+       BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0, 1),
+       BPF_EXIT_INSN(),
+       BPF_MOV64_REG(BPF_REG_2, BPF_REG_6),
+       BPF_MOV64_REG(BPF_REG_1, BPF_REG_0),
+       BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_map_lookup_elem),
+       BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0, 1),
+       BPF_EXIT_INSN(),
+       BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_0, 0),
+       BPF_EXIT_INSN(),
+       },
+       .fixup_map_in_map = { 4, 14 },
+       .flags = BPF_F_TEST_STATE_FREQ,
+       .result = VERBOSE_ACCEPT,
+       .errstr = "processed 25 insns",
+       .prog_type = BPF_PROG_TYPE_XDP,
+},
 {
        "invalid inner map pointer",
        .insns = {
index 39f2bbe..d7b312b 100644 (file)
@@ -3,5 +3,6 @@
 TEST_PROGS := gpio-mockup.sh
 TEST_FILES := gpio-mockup-sysfs.sh
 TEST_GEN_PROGS_EXTENDED := gpio-mockup-cdev
+CFLAGS += -O2 -g -Wall -I../../../../usr/include/
 
 include ../lib.mk
index e83eac7..d1640f4 100644 (file)
@@ -117,7 +117,7 @@ int main(int argc, char *argv[])
 {
        char *chip;
        int opt, ret, cfd, lfd;
-       unsigned int offset, val, abiv;
+       unsigned int offset, val = 0, abiv;
        uint32_t flags_v1;
        uint64_t flags_v2;
 
index d4a8301..3763105 100644 (file)
@@ -23,6 +23,7 @@
 /x86_64/platform_info_test
 /x86_64/set_boot_cpu_id
 /x86_64/set_sregs_test
+/x86_64/sev_migrate_tests
 /x86_64/smm_test
 /x86_64/state_test
 /x86_64/svm_vmcall_test
index 5d95113..d890903 100644 (file)
@@ -47,7 +47,7 @@
 #include "guest_modes.h"
 
 /* Global variable used to synchronize all of the vCPU threads. */
-static int iteration = -1;
+static int iteration;
 
 /* Defines what vCPU threads should do during a given iteration. */
 static enum {
@@ -215,12 +215,11 @@ static bool spin_wait_for_next_iteration(int *current_iteration)
        return true;
 }
 
-static void *vcpu_thread_main(void *arg)
+static void vcpu_thread_main(struct perf_test_vcpu_args *vcpu_args)
 {
-       struct perf_test_vcpu_args *vcpu_args = arg;
        struct kvm_vm *vm = perf_test_args.vm;
        int vcpu_id = vcpu_args->vcpu_id;
-       int current_iteration = -1;
+       int current_iteration = 0;
 
        while (spin_wait_for_next_iteration(&current_iteration)) {
                switch (READ_ONCE(iteration_work)) {
@@ -235,8 +234,6 @@ static void *vcpu_thread_main(void *arg)
 
                vcpu_last_completed_iteration[vcpu_id] = current_iteration;
        }
-
-       return NULL;
 }
 
 static void spin_wait_for_vcpu(int vcpu_id, int target_iteration)
@@ -277,8 +274,7 @@ static void run_iteration(struct kvm_vm *vm, int vcpus, const char *description)
 static void access_memory(struct kvm_vm *vm, int vcpus, enum access_type access,
                          const char *description)
 {
-       perf_test_args.wr_fract = (access == ACCESS_READ) ? INT_MAX : 1;
-       sync_global_to_guest(vm, perf_test_args);
+       perf_test_set_wr_fract(vm, (access == ACCESS_READ) ? INT_MAX : 1);
        iteration_work = ITERATION_ACCESS_MEMORY;
        run_iteration(vm, vcpus, description);
 }
@@ -296,48 +292,16 @@ static void mark_memory_idle(struct kvm_vm *vm, int vcpus)
        run_iteration(vm, vcpus, "Mark memory idle");
 }
 
-static pthread_t *create_vcpu_threads(int vcpus)
-{
-       pthread_t *vcpu_threads;
-       int i;
-
-       vcpu_threads = malloc(vcpus * sizeof(vcpu_threads[0]));
-       TEST_ASSERT(vcpu_threads, "Failed to allocate vcpu_threads.");
-
-       for (i = 0; i < vcpus; i++) {
-               vcpu_last_completed_iteration[i] = iteration;
-               pthread_create(&vcpu_threads[i], NULL, vcpu_thread_main,
-                              &perf_test_args.vcpu_args[i]);
-       }
-
-       return vcpu_threads;
-}
-
-static void terminate_vcpu_threads(pthread_t *vcpu_threads, int vcpus)
-{
-       int i;
-
-       /* Set done to signal the vCPU threads to exit */
-       done = true;
-
-       for (i = 0; i < vcpus; i++)
-               pthread_join(vcpu_threads[i], NULL);
-}
-
 static void run_test(enum vm_guest_mode mode, void *arg)
 {
        struct test_params *params = arg;
        struct kvm_vm *vm;
-       pthread_t *vcpu_threads;
        int vcpus = params->vcpus;
 
        vm = perf_test_create_vm(mode, vcpus, params->vcpu_memory_bytes, 1,
-                                params->backing_src);
+                                params->backing_src, !overlap_memory_access);
 
-       perf_test_setup_vcpus(vm, vcpus, params->vcpu_memory_bytes,
-                             !overlap_memory_access);
-
-       vcpu_threads = create_vcpu_threads(vcpus);
+       perf_test_start_vcpu_threads(vcpus, vcpu_thread_main);
 
        pr_info("\n");
        access_memory(vm, vcpus, ACCESS_WRITE, "Populating memory");
@@ -352,8 +316,10 @@ static void run_test(enum vm_guest_mode mode, void *arg)
        mark_memory_idle(vm, vcpus);
        access_memory(vm, vcpus, ACCESS_READ, "Reading from idle memory");
 
-       terminate_vcpu_threads(vcpu_threads, vcpus);
-       free(vcpu_threads);
+       /* Set done to signal the vCPU threads to exit */
+       done = true;
+
+       perf_test_join_vcpu_threads(vcpus);
        perf_test_destroy_vm(vm);
 }
 
index 1510b21..6a719d0 100644 (file)
@@ -42,10 +42,9 @@ static uint64_t guest_percpu_mem_size = DEFAULT_PER_VCPU_MEM_SIZE;
 static size_t demand_paging_size;
 static char *guest_data_prototype;
 
-static void *vcpu_worker(void *data)
+static void vcpu_worker(struct perf_test_vcpu_args *vcpu_args)
 {
        int ret;
-       struct perf_test_vcpu_args *vcpu_args = (struct perf_test_vcpu_args *)data;
        int vcpu_id = vcpu_args->vcpu_id;
        struct kvm_vm *vm = perf_test_args.vm;
        struct kvm_run *run;
@@ -68,8 +67,6 @@ static void *vcpu_worker(void *data)
        ts_diff = timespec_elapsed(start);
        PER_VCPU_DEBUG("vCPU %d execution time: %ld.%.9lds\n", vcpu_id,
                       ts_diff.tv_sec, ts_diff.tv_nsec);
-
-       return NULL;
 }
 
 static int handle_uffd_page_request(int uffd_mode, int uffd, uint64_t addr)
@@ -282,7 +279,6 @@ struct test_params {
 static void run_test(enum vm_guest_mode mode, void *arg)
 {
        struct test_params *p = arg;
-       pthread_t *vcpu_threads;
        pthread_t *uffd_handler_threads = NULL;
        struct uffd_handler_args *uffd_args = NULL;
        struct timespec start;
@@ -293,9 +289,7 @@ static void run_test(enum vm_guest_mode mode, void *arg)
        int r;
 
        vm = perf_test_create_vm(mode, nr_vcpus, guest_percpu_mem_size, 1,
-                                p->src_type);
-
-       perf_test_args.wr_fract = 1;
+                                p->src_type, p->partition_vcpu_memory_access);
 
        demand_paging_size = get_backing_src_pagesz(p->src_type);
 
@@ -304,12 +298,6 @@ static void run_test(enum vm_guest_mode mode, void *arg)
                    "Failed to allocate buffer for guest data pattern");
        memset(guest_data_prototype, 0xAB, demand_paging_size);
 
-       vcpu_threads = malloc(nr_vcpus * sizeof(*vcpu_threads));
-       TEST_ASSERT(vcpu_threads, "Memory allocation failed");
-
-       perf_test_setup_vcpus(vm, nr_vcpus, guest_percpu_mem_size,
-                             p->partition_vcpu_memory_access);
-
        if (p->uffd_mode) {
                uffd_handler_threads =
                        malloc(nr_vcpus * sizeof(*uffd_handler_threads));
@@ -322,26 +310,15 @@ static void run_test(enum vm_guest_mode mode, void *arg)
                TEST_ASSERT(pipefds, "Unable to allocate memory for pipefd");
 
                for (vcpu_id = 0; vcpu_id < nr_vcpus; vcpu_id++) {
-                       vm_paddr_t vcpu_gpa;
+                       struct perf_test_vcpu_args *vcpu_args;
                        void *vcpu_hva;
                        void *vcpu_alias;
-                       uint64_t vcpu_mem_size;
-
 
-                       if (p->partition_vcpu_memory_access) {
-                               vcpu_gpa = guest_test_phys_mem +
-                                          (vcpu_id * guest_percpu_mem_size);
-                               vcpu_mem_size = guest_percpu_mem_size;
-                       } else {
-                               vcpu_gpa = guest_test_phys_mem;
-                               vcpu_mem_size = guest_percpu_mem_size * nr_vcpus;
-                       }
-                       PER_VCPU_DEBUG("Added VCPU %d with test mem gpa [%lx, %lx)\n",
-                                      vcpu_id, vcpu_gpa, vcpu_gpa + vcpu_mem_size);
+                       vcpu_args = &perf_test_args.vcpu_args[vcpu_id];
 
                        /* Cache the host addresses of the region */
-                       vcpu_hva = addr_gpa2hva(vm, vcpu_gpa);
-                       vcpu_alias = addr_gpa2alias(vm, vcpu_gpa);
+                       vcpu_hva = addr_gpa2hva(vm, vcpu_args->gpa);
+                       vcpu_alias = addr_gpa2alias(vm, vcpu_args->gpa);
 
                        /*
                         * Set up user fault fd to handle demand paging
@@ -355,32 +332,18 @@ static void run_test(enum vm_guest_mode mode, void *arg)
                                            pipefds[vcpu_id * 2], p->uffd_mode,
                                            p->uffd_delay, &uffd_args[vcpu_id],
                                            vcpu_hva, vcpu_alias,
-                                           vcpu_mem_size);
+                                           vcpu_args->pages * perf_test_args.guest_page_size);
                }
        }
 
-       /* Export the shared variables to the guest */
-       sync_global_to_guest(vm, perf_test_args);
-
        pr_info("Finished creating vCPUs and starting uffd threads\n");
 
        clock_gettime(CLOCK_MONOTONIC, &start);
-
-       for (vcpu_id = 0; vcpu_id < nr_vcpus; vcpu_id++) {
-               pthread_create(&vcpu_threads[vcpu_id], NULL, vcpu_worker,
-                              &perf_test_args.vcpu_args[vcpu_id]);
-       }
-
+       perf_test_start_vcpu_threads(nr_vcpus, vcpu_worker);
        pr_info("Started all vCPUs\n");
 
-       /* Wait for the vcpu threads to quit */
-       for (vcpu_id = 0; vcpu_id < nr_vcpus; vcpu_id++) {
-               pthread_join(vcpu_threads[vcpu_id], NULL);
-               PER_VCPU_DEBUG("Joined thread for vCPU %d\n", vcpu_id);
-       }
-
+       perf_test_join_vcpu_threads(nr_vcpus);
        ts_diff = timespec_elapsed(start);
-
        pr_info("All vCPU threads joined\n");
 
        if (p->uffd_mode) {
@@ -404,7 +367,6 @@ static void run_test(enum vm_guest_mode mode, void *arg)
        perf_test_destroy_vm(vm);
 
        free(guest_data_prototype);
-       free(vcpu_threads);
        if (p->uffd_mode) {
                free(uffd_handler_threads);
                free(uffd_args);
index 7ffab5b..1954b96 100644 (file)
@@ -31,7 +31,7 @@ static bool host_quit;
 static int iteration;
 static int vcpu_last_completed_iteration[KVM_MAX_VCPUS];
 
-static void *vcpu_worker(void *data)
+static void vcpu_worker(struct perf_test_vcpu_args *vcpu_args)
 {
        int ret;
        struct kvm_vm *vm = perf_test_args.vm;
@@ -41,7 +41,6 @@ static void *vcpu_worker(void *data)
        struct timespec ts_diff;
        struct timespec total = (struct timespec){0};
        struct timespec avg;
-       struct perf_test_vcpu_args *vcpu_args = (struct perf_test_vcpu_args *)data;
        int vcpu_id = vcpu_args->vcpu_id;
 
        run = vcpu_state(vm, vcpu_id);
@@ -83,8 +82,6 @@ static void *vcpu_worker(void *data)
        pr_debug("\nvCPU %d dirtied 0x%lx pages over %d iterations in %ld.%.9lds. (Avg %ld.%.9lds/iteration)\n",
                vcpu_id, pages_count, vcpu_last_completed_iteration[vcpu_id],
                total.tv_sec, total.tv_nsec, avg.tv_sec, avg.tv_nsec);
-
-       return NULL;
 }
 
 struct test_params {
@@ -170,7 +167,6 @@ static void free_bitmaps(unsigned long *bitmaps[], int slots)
 static void run_test(enum vm_guest_mode mode, void *arg)
 {
        struct test_params *p = arg;
-       pthread_t *vcpu_threads;
        struct kvm_vm *vm;
        unsigned long **bitmaps;
        uint64_t guest_num_pages;
@@ -186,9 +182,10 @@ static void run_test(enum vm_guest_mode mode, void *arg)
        struct timespec clear_dirty_log_total = (struct timespec){0};
 
        vm = perf_test_create_vm(mode, nr_vcpus, guest_percpu_mem_size,
-                                p->slots, p->backing_src);
+                                p->slots, p->backing_src,
+                                p->partition_vcpu_memory_access);
 
-       perf_test_args.wr_fract = p->wr_fract;
+       perf_test_set_wr_fract(vm, p->wr_fract);
 
        guest_num_pages = (nr_vcpus * guest_percpu_mem_size) >> vm_get_page_shift(vm);
        guest_num_pages = vm_adjust_num_guest_pages(mode, guest_num_pages);
@@ -203,25 +200,15 @@ static void run_test(enum vm_guest_mode mode, void *arg)
                vm_enable_cap(vm, &cap);
        }
 
-       vcpu_threads = malloc(nr_vcpus * sizeof(*vcpu_threads));
-       TEST_ASSERT(vcpu_threads, "Memory allocation failed");
-
-       perf_test_setup_vcpus(vm, nr_vcpus, guest_percpu_mem_size,
-                             p->partition_vcpu_memory_access);
-
-       sync_global_to_guest(vm, perf_test_args);
-
        /* Start the iterations */
        iteration = 0;
        host_quit = false;
 
        clock_gettime(CLOCK_MONOTONIC, &start);
-       for (vcpu_id = 0; vcpu_id < nr_vcpus; vcpu_id++) {
+       for (vcpu_id = 0; vcpu_id < nr_vcpus; vcpu_id++)
                vcpu_last_completed_iteration[vcpu_id] = -1;
 
-               pthread_create(&vcpu_threads[vcpu_id], NULL, vcpu_worker,
-                              &perf_test_args.vcpu_args[vcpu_id]);
-       }
+       perf_test_start_vcpu_threads(nr_vcpus, vcpu_worker);
 
        /* Allow the vCPUs to populate memory */
        pr_debug("Starting iteration %d - Populating\n", iteration);
@@ -290,8 +277,7 @@ static void run_test(enum vm_guest_mode mode, void *arg)
 
        /* Tell the vcpu thread to quit */
        host_quit = true;
-       for (vcpu_id = 0; vcpu_id < nr_vcpus; vcpu_id++)
-               pthread_join(vcpu_threads[vcpu_id], NULL);
+       perf_test_join_vcpu_threads(nr_vcpus);
 
        avg = timespec_div(get_dirty_log_total, p->iterations);
        pr_info("Get dirty log over %lu iterations took %ld.%.9lds. (Avg %ld.%.9lds/iteration)\n",
@@ -306,7 +292,6 @@ static void run_test(enum vm_guest_mode mode, void *arg)
        }
 
        free_bitmaps(bitmaps, p->slots);
-       free(vcpu_threads);
        perf_test_destroy_vm(vm);
 }
 
index 792c60e..3fcd89e 100644 (file)
@@ -115,7 +115,7 @@ static void guest_code(void)
                        addr = guest_test_virt_mem;
                        addr += (READ_ONCE(random_array[i]) % guest_num_pages)
                                * guest_page_size;
-                       addr &= ~(host_page_size - 1);
+                       addr = align_down(addr, host_page_size);
                        *(uint64_t *)addr = READ_ONCE(iteration);
                }
 
@@ -737,14 +737,14 @@ static void run_test(enum vm_guest_mode mode, void *arg)
        if (!p->phys_offset) {
                guest_test_phys_mem = (vm_get_max_gfn(vm) -
                                       guest_num_pages) * guest_page_size;
-               guest_test_phys_mem &= ~(host_page_size - 1);
+               guest_test_phys_mem = align_down(guest_test_phys_mem, host_page_size);
        } else {
                guest_test_phys_mem = p->phys_offset;
        }
 
 #ifdef __s390x__
        /* Align to 1M (segment size) */
-       guest_test_phys_mem &= ~((1 << 20) - 1);
+       guest_test_phys_mem = align_down(guest_test_phys_mem, 1 << 20);
 #endif
 
        pr_info("guest physical test memory offset: 0x%lx\n", guest_test_phys_mem);
index df9f1a3..a86f953 100644 (file)
@@ -8,6 +8,8 @@
 #ifndef SELFTEST_KVM_PERF_TEST_UTIL_H
 #define SELFTEST_KVM_PERF_TEST_UTIL_H
 
+#include <pthread.h>
+
 #include "kvm_util.h"
 
 /* Default guest test virtual memory offset */
@@ -18,6 +20,7 @@
 #define PERF_TEST_MEM_SLOT_INDEX       1
 
 struct perf_test_vcpu_args {
+       uint64_t gpa;
        uint64_t gva;
        uint64_t pages;
 
@@ -27,7 +30,7 @@ struct perf_test_vcpu_args {
 
 struct perf_test_args {
        struct kvm_vm *vm;
-       uint64_t host_page_size;
+       uint64_t gpa;
        uint64_t guest_page_size;
        int wr_fract;
 
@@ -36,19 +39,15 @@ struct perf_test_args {
 
 extern struct perf_test_args perf_test_args;
 
-/*
- * Guest physical memory offset of the testing memory slot.
- * This will be set to the topmost valid physical address minus
- * the test memory size.
- */
-extern uint64_t guest_test_phys_mem;
-
 struct kvm_vm *perf_test_create_vm(enum vm_guest_mode mode, int vcpus,
                                   uint64_t vcpu_memory_bytes, int slots,
-                                  enum vm_mem_backing_src_type backing_src);
+                                  enum vm_mem_backing_src_type backing_src,
+                                  bool partition_vcpu_memory_access);
 void perf_test_destroy_vm(struct kvm_vm *vm);
-void perf_test_setup_vcpus(struct kvm_vm *vm, int vcpus,
-                          uint64_t vcpu_memory_bytes,
-                          bool partition_vcpu_memory_access);
+
+void perf_test_set_wr_fract(struct kvm_vm *vm, int wr_fract);
+
+void perf_test_start_vcpu_threads(int vcpus, void (*vcpu_fn)(struct perf_test_vcpu_args *));
+void perf_test_join_vcpu_threads(int vcpus);
 
 #endif /* SELFTEST_KVM_PERF_TEST_UTIL_H */
index f8fddc8..99e0dcd 100644 (file)
@@ -104,6 +104,7 @@ size_t get_trans_hugepagesz(void);
 size_t get_def_hugetlb_pagesz(void);
 const struct vm_mem_backing_src_alias *vm_mem_backing_src_alias(uint32_t i);
 size_t get_backing_src_pagesz(uint32_t i);
+bool is_backing_src_hugetlb(uint32_t i);
 void backing_src_help(const char *flag);
 enum vm_mem_backing_src_type parse_backing_src_type(const char *type_name);
 long get_run_delay(void);
@@ -117,4 +118,29 @@ static inline bool backing_src_is_shared(enum vm_mem_backing_src_type t)
        return vm_mem_backing_src_alias(t)->flag & MAP_SHARED;
 }
 
+/* Aligns x up to the next multiple of size. Size must be a power of 2. */
+static inline uint64_t align_up(uint64_t x, uint64_t size)
+{
+       uint64_t mask = size - 1;
+
+       TEST_ASSERT(size != 0 && !(size & (size - 1)),
+                   "size not a power of 2: %lu", size);
+       return ((x + mask) & ~mask);
+}
+
+static inline uint64_t align_down(uint64_t x, uint64_t size)
+{
+       uint64_t x_aligned_up = align_up(x, size);
+
+       if (x == x_aligned_up)
+               return x;
+       else
+               return x_aligned_up - size;
+}
+
+static inline void *align_ptr_up(void *x, size_t size)
+{
+       return (void *)align_up((unsigned long)x, size);
+}
+
 #endif /* SELFTEST_KVM_TEST_UTIL_H */
index 36407cb..3836322 100644 (file)
@@ -280,7 +280,7 @@ static struct kvm_vm *pre_init_before_test(enum vm_guest_mode mode, void *arg)
 #ifdef __s390x__
        alignment = max(0x100000, alignment);
 #endif
-       guest_test_phys_mem &= ~(alignment - 1);
+       guest_test_phys_mem = align_down(guest_test_virt_mem, alignment);
 
        /* Set up the shared data structure test_args */
        test_args.vm = vm;
index eac44f5..13e8e3d 100644 (file)
@@ -157,8 +157,7 @@ void kvm_vm_elf_load(struct kvm_vm *vm, const char *filename)
                        "memsize of 0,\n"
                        "  phdr index: %u p_memsz: 0x%" PRIx64,
                        n1, (uint64_t) phdr.p_memsz);
-               vm_vaddr_t seg_vstart = phdr.p_vaddr;
-               seg_vstart &= ~(vm_vaddr_t)(vm->page_size - 1);
+               vm_vaddr_t seg_vstart = align_down(phdr.p_vaddr, vm->page_size);
                vm_vaddr_t seg_vend = phdr.p_vaddr + phdr.p_memsz - 1;
                seg_vend |= vm->page_size - 1;
                size_t seg_size = seg_vend - seg_vstart + 1;
index 14bb4d5..8f2e0bb 100644 (file)
 
 static int vcpu_mmap_sz(void);
 
-/* Aligns x up to the next multiple of size. Size must be a power of 2. */
-static void *align(void *x, size_t size)
-{
-       size_t mask = size - 1;
-       TEST_ASSERT(size != 0 && !(size & (size - 1)),
-                   "size not a power of 2: %lu", size);
-       return (void *) (((size_t) x + mask) & ~mask);
-}
-
 int open_path_or_exit(const char *path, int flags)
 {
        int fd;
@@ -191,15 +182,15 @@ const char *vm_guest_mode_string(uint32_t i)
 }
 
 const struct vm_guest_mode_params vm_guest_mode_params[] = {
-       { 52, 48,  0x1000, 12 },
-       { 52, 48, 0x10000, 16 },
-       { 48, 48,  0x1000, 12 },
-       { 48, 48, 0x10000, 16 },
-       { 40, 48,  0x1000, 12 },
-       { 40, 48, 0x10000, 16 },
-       {  0,  0,  0x1000, 12 },
-       { 47, 64,  0x1000, 12 },
-       { 44, 64,  0x1000, 12 },
+       [VM_MODE_P52V48_4K]     = { 52, 48,  0x1000, 12 },
+       [VM_MODE_P52V48_64K]    = { 52, 48, 0x10000, 16 },
+       [VM_MODE_P48V48_4K]     = { 48, 48,  0x1000, 12 },
+       [VM_MODE_P48V48_64K]    = { 48, 48, 0x10000, 16 },
+       [VM_MODE_P40V48_4K]     = { 40, 48,  0x1000, 12 },
+       [VM_MODE_P40V48_64K]    = { 40, 48, 0x10000, 16 },
+       [VM_MODE_PXXV48_4K]     = {  0,  0,  0x1000, 12 },
+       [VM_MODE_P47V64_4K]     = { 47, 64,  0x1000, 12 },
+       [VM_MODE_P44V64_4K]     = { 44, 64,  0x1000, 12 },
 };
 _Static_assert(sizeof(vm_guest_mode_params)/sizeof(struct vm_guest_mode_params) == NUM_VM_MODES,
               "Missing new mode params?");
@@ -879,9 +870,17 @@ void vm_userspace_mem_region_add(struct kvm_vm *vm,
        alignment = 1;
 #endif
 
+       /*
+        * When using THP mmap is not guaranteed to returned a hugepage aligned
+        * address so we have to pad the mmap. Padding is not needed for HugeTLB
+        * because mmap will always return an address aligned to the HugeTLB
+        * page size.
+        */
        if (src_type == VM_MEM_SRC_ANONYMOUS_THP)
                alignment = max(backing_src_pagesz, alignment);
 
+       ASSERT_EQ(guest_paddr, align_up(guest_paddr, backing_src_pagesz));
+
        /* Add enough memory to align up if necessary */
        if (alignment > 1)
                region->mmap_size += alignment;
@@ -914,8 +913,13 @@ void vm_userspace_mem_region_add(struct kvm_vm *vm,
                    "test_malloc failed, mmap_start: %p errno: %i",
                    region->mmap_start, errno);
 
+       TEST_ASSERT(!is_backing_src_hugetlb(src_type) ||
+                   region->mmap_start == align_ptr_up(region->mmap_start, backing_src_pagesz),
+                   "mmap_start %p is not aligned to HugeTLB page size 0x%lx",
+                   region->mmap_start, backing_src_pagesz);
+
        /* Align host address */
-       region->host_mem = align(region->mmap_start, alignment);
+       region->host_mem = align_ptr_up(region->mmap_start, alignment);
 
        /* As needed perform madvise */
        if ((src_type == VM_MEM_SRC_ANONYMOUS ||
@@ -958,7 +962,7 @@ void vm_userspace_mem_region_add(struct kvm_vm *vm,
                            "mmap of alias failed, errno: %i", errno);
 
                /* Align host alias address */
-               region->host_alias = align(region->mmap_alias, alignment);
+               region->host_alias = align_ptr_up(region->mmap_alias, alignment);
        }
 }
 
index 0ef80db..722df3a 100644 (file)
 
 struct perf_test_args perf_test_args;
 
-uint64_t guest_test_phys_mem;
-
 /*
  * Guest virtual memory offset of the testing memory slot.
  * Must not conflict with identity mapped test code.
  */
 static uint64_t guest_test_virt_mem = DEFAULT_GUEST_TEST_MEM;
 
+struct vcpu_thread {
+       /* The id of the vCPU. */
+       int vcpu_id;
+
+       /* The pthread backing the vCPU. */
+       pthread_t thread;
+
+       /* Set to true once the vCPU thread is up and running. */
+       bool running;
+};
+
+/* The vCPU threads involved in this test. */
+static struct vcpu_thread vcpu_threads[KVM_MAX_VCPUS];
+
+/* The function run by each vCPU thread, as provided by the test. */
+static void (*vcpu_thread_fn)(struct perf_test_vcpu_args *);
+
+/* Set to true once all vCPU threads are up and running. */
+static bool all_vcpu_threads_running;
+
 /*
  * Continuously write to the first 8 bytes of each page in the
  * specified region.
  */
 static void guest_code(uint32_t vcpu_id)
 {
-       struct perf_test_vcpu_args *vcpu_args = &perf_test_args.vcpu_args[vcpu_id];
+       struct perf_test_args *pta = &perf_test_args;
+       struct perf_test_vcpu_args *vcpu_args = &pta->vcpu_args[vcpu_id];
        uint64_t gva;
        uint64_t pages;
        int i;
@@ -37,9 +56,9 @@ static void guest_code(uint32_t vcpu_id)
 
        while (true) {
                for (i = 0; i < pages; i++) {
-                       uint64_t addr = gva + (i * perf_test_args.guest_page_size);
+                       uint64_t addr = gva + (i * pta->guest_page_size);
 
-                       if (i % perf_test_args.wr_fract == 0)
+                       if (i % pta->wr_fract == 0)
                                *(uint64_t *)addr = 0x0123456789ABCDEF;
                        else
                                READ_ONCE(*(uint64_t *)addr);
@@ -49,35 +68,81 @@ static void guest_code(uint32_t vcpu_id)
        }
 }
 
+void perf_test_setup_vcpus(struct kvm_vm *vm, int vcpus,
+                          uint64_t vcpu_memory_bytes,
+                          bool partition_vcpu_memory_access)
+{
+       struct perf_test_args *pta = &perf_test_args;
+       struct perf_test_vcpu_args *vcpu_args;
+       int vcpu_id;
+
+       for (vcpu_id = 0; vcpu_id < vcpus; vcpu_id++) {
+               vcpu_args = &pta->vcpu_args[vcpu_id];
+
+               vcpu_args->vcpu_id = vcpu_id;
+               if (partition_vcpu_memory_access) {
+                       vcpu_args->gva = guest_test_virt_mem +
+                                        (vcpu_id * vcpu_memory_bytes);
+                       vcpu_args->pages = vcpu_memory_bytes /
+                                          pta->guest_page_size;
+                       vcpu_args->gpa = pta->gpa + (vcpu_id * vcpu_memory_bytes);
+               } else {
+                       vcpu_args->gva = guest_test_virt_mem;
+                       vcpu_args->pages = (vcpus * vcpu_memory_bytes) /
+                                          pta->guest_page_size;
+                       vcpu_args->gpa = pta->gpa;
+               }
+
+               vcpu_args_set(vm, vcpu_id, 1, vcpu_id);
+
+               pr_debug("Added VCPU %d with test mem gpa [%lx, %lx)\n",
+                        vcpu_id, vcpu_args->gpa, vcpu_args->gpa +
+                        (vcpu_args->pages * pta->guest_page_size));
+       }
+}
+
 struct kvm_vm *perf_test_create_vm(enum vm_guest_mode mode, int vcpus,
                                   uint64_t vcpu_memory_bytes, int slots,
-                                  enum vm_mem_backing_src_type backing_src)
+                                  enum vm_mem_backing_src_type backing_src,
+                                  bool partition_vcpu_memory_access)
 {
+       struct perf_test_args *pta = &perf_test_args;
        struct kvm_vm *vm;
        uint64_t guest_num_pages;
+       uint64_t backing_src_pagesz = get_backing_src_pagesz(backing_src);
        int i;
 
        pr_info("Testing guest mode: %s\n", vm_guest_mode_string(mode));
 
-       perf_test_args.host_page_size = getpagesize();
-       perf_test_args.guest_page_size = vm_guest_mode_params[mode].page_size;
+       /* By default vCPUs will write to memory. */
+       pta->wr_fract = 1;
+
+       /*
+        * Snapshot the non-huge page size.  This is used by the guest code to
+        * access/dirty pages at the logging granularity.
+        */
+       pta->guest_page_size = vm_guest_mode_params[mode].page_size;
 
        guest_num_pages = vm_adjust_num_guest_pages(mode,
-                               (vcpus * vcpu_memory_bytes) / perf_test_args.guest_page_size);
+                               (vcpus * vcpu_memory_bytes) / pta->guest_page_size);
 
-       TEST_ASSERT(vcpu_memory_bytes % perf_test_args.host_page_size == 0,
+       TEST_ASSERT(vcpu_memory_bytes % getpagesize() == 0,
                    "Guest memory size is not host page size aligned.");
-       TEST_ASSERT(vcpu_memory_bytes % perf_test_args.guest_page_size == 0,
+       TEST_ASSERT(vcpu_memory_bytes % pta->guest_page_size == 0,
                    "Guest memory size is not guest page size aligned.");
        TEST_ASSERT(guest_num_pages % slots == 0,
                    "Guest memory cannot be evenly divided into %d slots.",
                    slots);
 
+       /*
+        * Pass guest_num_pages to populate the page tables for test memory.
+        * The memory is also added to memslot 0, but that's a benign side
+        * effect as KVM allows aliasing HVAs in meslots.
+        */
        vm = vm_create_with_vcpus(mode, vcpus, DEFAULT_GUEST_PHY_PAGES,
-                                 (vcpus * vcpu_memory_bytes) / perf_test_args.guest_page_size,
-                                 0, guest_code, NULL);
+                                 guest_num_pages, 0, guest_code, NULL);
 
-       perf_test_args.vm = vm;
+       pta->vm = vm;
 
        /*
         * If there should be more memory in the guest test region than there
@@ -90,20 +155,18 @@ struct kvm_vm *perf_test_create_vm(enum vm_guest_mode mode, int vcpus,
                    guest_num_pages, vm_get_max_gfn(vm), vcpus,
                    vcpu_memory_bytes);
 
-       guest_test_phys_mem = (vm_get_max_gfn(vm) - guest_num_pages) *
-                             perf_test_args.guest_page_size;
-       guest_test_phys_mem &= ~(perf_test_args.host_page_size - 1);
+       pta->gpa = (vm_get_max_gfn(vm) - guest_num_pages) * pta->guest_page_size;
+       pta->gpa = align_down(pta->gpa, backing_src_pagesz);
 #ifdef __s390x__
        /* Align to 1M (segment size) */
-       guest_test_phys_mem &= ~((1 << 20) - 1);
+       pta->gpa = align_down(pta->gpa, 1 << 20);
 #endif
-       pr_info("guest physical test memory offset: 0x%lx\n", guest_test_phys_mem);
+       pr_info("guest physical test memory offset: 0x%lx\n", pta->gpa);
 
        /* Add extra memory slots for testing */
        for (i = 0; i < slots; i++) {
                uint64_t region_pages = guest_num_pages / slots;
-               vm_paddr_t region_start = guest_test_phys_mem +
-                       region_pages * perf_test_args.guest_page_size * i;
+               vm_paddr_t region_start = pta->gpa + region_pages * pta->guest_page_size * i;
 
                vm_userspace_mem_region_add(vm, backing_src, region_start,
                                            PERF_TEST_MEM_SLOT_INDEX + i,
@@ -111,10 +174,15 @@ struct kvm_vm *perf_test_create_vm(enum vm_guest_mode mode, int vcpus,
        }
 
        /* Do mapping for the demand paging memory slot */
-       virt_map(vm, guest_test_virt_mem, guest_test_phys_mem, guest_num_pages);
+       virt_map(vm, guest_test_virt_mem, pta->gpa, guest_num_pages);
+
+       perf_test_setup_vcpus(vm, vcpus, vcpu_memory_bytes, partition_vcpu_memory_access);
 
        ucall_init(vm, NULL);
 
+       /* Export the shared variables to the guest. */
+       sync_global_to_guest(vm, perf_test_args);
+
        return vm;
 }
 
@@ -124,36 +192,60 @@ void perf_test_destroy_vm(struct kvm_vm *vm)
        kvm_vm_free(vm);
 }
 
-void perf_test_setup_vcpus(struct kvm_vm *vm, int vcpus,
-                          uint64_t vcpu_memory_bytes,
-                          bool partition_vcpu_memory_access)
+void perf_test_set_wr_fract(struct kvm_vm *vm, int wr_fract)
+{
+       perf_test_args.wr_fract = wr_fract;
+       sync_global_to_guest(vm, perf_test_args);
+}
+
+static void *vcpu_thread_main(void *data)
+{
+       struct vcpu_thread *vcpu = data;
+
+       WRITE_ONCE(vcpu->running, true);
+
+       /*
+        * Wait for all vCPU threads to be up and running before calling the test-
+        * provided vCPU thread function. This prevents thread creation (which
+        * requires taking the mmap_sem in write mode) from interfering with the
+        * guest faulting in its memory.
+        */
+       while (!READ_ONCE(all_vcpu_threads_running))
+               ;
+
+       vcpu_thread_fn(&perf_test_args.vcpu_args[vcpu->vcpu_id]);
+
+       return NULL;
+}
+
+void perf_test_start_vcpu_threads(int vcpus, void (*vcpu_fn)(struct perf_test_vcpu_args *))
 {
-       vm_paddr_t vcpu_gpa;
-       struct perf_test_vcpu_args *vcpu_args;
        int vcpu_id;
 
+       vcpu_thread_fn = vcpu_fn;
+       WRITE_ONCE(all_vcpu_threads_running, false);
+
        for (vcpu_id = 0; vcpu_id < vcpus; vcpu_id++) {
-               vcpu_args = &perf_test_args.vcpu_args[vcpu_id];
+               struct vcpu_thread *vcpu = &vcpu_threads[vcpu_id];
 
-               vcpu_args->vcpu_id = vcpu_id;
-               if (partition_vcpu_memory_access) {
-                       vcpu_args->gva = guest_test_virt_mem +
-                                        (vcpu_id * vcpu_memory_bytes);
-                       vcpu_args->pages = vcpu_memory_bytes /
-                                          perf_test_args.guest_page_size;
-                       vcpu_gpa = guest_test_phys_mem +
-                                  (vcpu_id * vcpu_memory_bytes);
-               } else {
-                       vcpu_args->gva = guest_test_virt_mem;
-                       vcpu_args->pages = (vcpus * vcpu_memory_bytes) /
-                                          perf_test_args.guest_page_size;
-                       vcpu_gpa = guest_test_phys_mem;
-               }
+               vcpu->vcpu_id = vcpu_id;
+               WRITE_ONCE(vcpu->running, false);
 
-               vcpu_args_set(vm, vcpu_id, 1, vcpu_id);
+               pthread_create(&vcpu->thread, NULL, vcpu_thread_main, vcpu);
+       }
 
-               pr_debug("Added VCPU %d with test mem gpa [%lx, %lx)\n",
-                        vcpu_id, vcpu_gpa, vcpu_gpa +
-                        (vcpu_args->pages * perf_test_args.guest_page_size));
+       for (vcpu_id = 0; vcpu_id < vcpus; vcpu_id++) {
+               while (!READ_ONCE(vcpu_threads[vcpu_id].running))
+                       ;
        }
+
+       WRITE_ONCE(all_vcpu_threads_running, true);
+}
+
+void perf_test_join_vcpu_threads(int vcpus)
+{
+       int vcpu_id;
+
+       for (vcpu_id = 0; vcpu_id < vcpus; vcpu_id++)
+               pthread_join(vcpu_threads[vcpu_id].thread, NULL);
 }
index b724291..6d23878 100644 (file)
@@ -283,6 +283,11 @@ size_t get_backing_src_pagesz(uint32_t i)
        }
 }
 
+bool is_backing_src_hugetlb(uint32_t i)
+{
+       return !!(vm_mem_backing_src_alias(i)->flag & MAP_HUGETLB);
+}
+
 static void print_available_backing_src_types(const char *prefix)
 {
        int i;
index 4cfcafe..1410d0a 100644 (file)
@@ -36,11 +36,9 @@ static uint64_t guest_percpu_mem_size = DEFAULT_PER_VCPU_MEM_SIZE;
 
 static bool run_vcpus = true;
 
-static void *vcpu_worker(void *data)
+static void vcpu_worker(struct perf_test_vcpu_args *vcpu_args)
 {
        int ret;
-       struct perf_test_vcpu_args *vcpu_args =
-               (struct perf_test_vcpu_args *)data;
        int vcpu_id = vcpu_args->vcpu_id;
        struct kvm_vm *vm = perf_test_args.vm;
        struct kvm_run *run;
@@ -59,8 +57,6 @@ static void *vcpu_worker(void *data)
                            "Invalid guest sync status: exit_reason=%s\n",
                            exit_reason_str(run->exit_reason));
        }
-
-       return NULL;
 }
 
 struct memslot_antagonist_args {
@@ -80,7 +76,7 @@ static void add_remove_memslot(struct kvm_vm *vm, useconds_t delay,
         * Add the dummy memslot just below the perf_test_util memslot, which is
         * at the top of the guest physical address space.
         */
-       gpa = guest_test_phys_mem - pages * vm_get_page_size(vm);
+       gpa = perf_test_args.gpa - pages * vm_get_page_size(vm);
 
        for (i = 0; i < nr_modifications; i++) {
                usleep(delay);
@@ -100,29 +96,15 @@ struct test_params {
 static void run_test(enum vm_guest_mode mode, void *arg)
 {
        struct test_params *p = arg;
-       pthread_t *vcpu_threads;
        struct kvm_vm *vm;
-       int vcpu_id;
 
        vm = perf_test_create_vm(mode, nr_vcpus, guest_percpu_mem_size, 1,
-                                VM_MEM_SRC_ANONYMOUS);
-
-       perf_test_args.wr_fract = 1;
-
-       vcpu_threads = malloc(nr_vcpus * sizeof(*vcpu_threads));
-       TEST_ASSERT(vcpu_threads, "Memory allocation failed");
-
-       perf_test_setup_vcpus(vm, nr_vcpus, guest_percpu_mem_size,
-                             p->partition_vcpu_memory_access);
-
-       /* Export the shared variables to the guest */
-       sync_global_to_guest(vm, perf_test_args);
+                                VM_MEM_SRC_ANONYMOUS,
+                                p->partition_vcpu_memory_access);
 
        pr_info("Finished creating vCPUs\n");
 
-       for (vcpu_id = 0; vcpu_id < nr_vcpus; vcpu_id++)
-               pthread_create(&vcpu_threads[vcpu_id], NULL, vcpu_worker,
-                              &perf_test_args.vcpu_args[vcpu_id]);
+       perf_test_start_vcpu_threads(nr_vcpus, vcpu_worker);
 
        pr_info("Started all vCPUs\n");
 
@@ -131,16 +113,10 @@ static void run_test(enum vm_guest_mode mode, void *arg)
 
        run_vcpus = false;
 
-       /* Wait for the vcpu threads to quit */
-       for (vcpu_id = 0; vcpu_id < nr_vcpus; vcpu_id++)
-               pthread_join(vcpu_threads[vcpu_id], NULL);
-
+       perf_test_join_vcpu_threads(nr_vcpus);
        pr_info("All vCPU threads joined\n");
 
-       ucall_uninit(vm);
-       kvm_vm_free(vm);
-
-       free(vcpu_threads);
+       perf_test_destroy_vm(vm);
 }
 
 static void help(char *name)
index eda0d2a..a0699f0 100644 (file)
 
 #define PVTIME_ADDR    (SHINFO_REGION_GPA + PAGE_SIZE)
 #define RUNSTATE_ADDR  (SHINFO_REGION_GPA + PAGE_SIZE + 0x20)
+#define VCPU_INFO_ADDR (SHINFO_REGION_GPA + 0x40)
 
 #define RUNSTATE_VADDR (SHINFO_REGION_GVA + PAGE_SIZE + 0x20)
+#define VCPU_INFO_VADDR        (SHINFO_REGION_GVA + 0x40)
+
+#define EVTCHN_VECTOR  0x10
 
 static struct kvm_vm *vm;
 
@@ -56,15 +60,44 @@ struct vcpu_runstate_info {
     uint64_t time[4];
 };
 
+struct arch_vcpu_info {
+    unsigned long cr2;
+    unsigned long pad; /* sizeof(vcpu_info_t) == 64 */
+};
+
+struct vcpu_info {
+        uint8_t evtchn_upcall_pending;
+        uint8_t evtchn_upcall_mask;
+        unsigned long evtchn_pending_sel;
+        struct arch_vcpu_info arch;
+        struct pvclock_vcpu_time_info time;
+}; /* 64 bytes (x86) */
+
 #define RUNSTATE_running  0
 #define RUNSTATE_runnable 1
 #define RUNSTATE_blocked  2
 #define RUNSTATE_offline  3
 
+static void evtchn_handler(struct ex_regs *regs)
+{
+       struct vcpu_info *vi = (void *)VCPU_INFO_VADDR;
+       vi->evtchn_upcall_pending = 0;
+
+       GUEST_SYNC(0x20);
+}
+
 static void guest_code(void)
 {
        struct vcpu_runstate_info *rs = (void *)RUNSTATE_VADDR;
 
+       __asm__ __volatile__(
+               "sti\n"
+               "nop\n"
+       );
+
+       /* Trigger an interrupt injection */
+       GUEST_SYNC(0);
+
        /* Test having the host set runstates manually */
        GUEST_SYNC(RUNSTATE_runnable);
        GUEST_ASSERT(rs->time[RUNSTATE_runnable] != 0);
@@ -153,7 +186,7 @@ int main(int argc, char *argv[])
 
        struct kvm_xen_vcpu_attr vi = {
                .type = KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO,
-               .u.gpa = SHINFO_REGION_GPA + 0x40,
+               .u.gpa = VCPU_INFO_ADDR,
        };
        vcpu_ioctl(vm, VCPU_ID, KVM_XEN_VCPU_SET_ATTR, &vi);
 
@@ -163,6 +196,16 @@ int main(int argc, char *argv[])
        };
        vcpu_ioctl(vm, VCPU_ID, KVM_XEN_VCPU_SET_ATTR, &pvclock);
 
+       struct kvm_xen_hvm_attr vec = {
+               .type = KVM_XEN_ATTR_TYPE_UPCALL_VECTOR,
+               .u.vector = EVTCHN_VECTOR,
+       };
+       vm_ioctl(vm, KVM_XEN_HVM_SET_ATTR, &vec);
+
+       vm_init_descriptor_tables(vm);
+       vcpu_init_descriptor_tables(vm, VCPU_ID);
+       vm_install_exception_handler(vm, EVTCHN_VECTOR, evtchn_handler);
+
        if (do_runstate_tests) {
                struct kvm_xen_vcpu_attr st = {
                        .type = KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADDR,
@@ -171,9 +214,14 @@ int main(int argc, char *argv[])
                vcpu_ioctl(vm, VCPU_ID, KVM_XEN_VCPU_SET_ATTR, &st);
        }
 
+       struct vcpu_info *vinfo = addr_gpa2hva(vm, VCPU_INFO_VADDR);
+       vinfo->evtchn_upcall_pending = 0;
+
        struct vcpu_runstate_info *rs = addr_gpa2hva(vm, RUNSTATE_ADDR);
        rs->state = 0x5a;
 
+       bool evtchn_irq_expected = false;
+
        for (;;) {
                volatile struct kvm_run *run = vcpu_state(vm, VCPU_ID);
                struct ucall uc;
@@ -193,16 +241,21 @@ int main(int argc, char *argv[])
                        struct kvm_xen_vcpu_attr rst;
                        long rundelay;
 
-                       /* If no runstate support, bail out early */
-                       if (!do_runstate_tests)
-                               goto done;
-
-                       TEST_ASSERT(rs->state_entry_time == rs->time[0] +
-                                   rs->time[1] + rs->time[2] + rs->time[3],
-                                   "runstate times don't add up");
+                       if (do_runstate_tests)
+                               TEST_ASSERT(rs->state_entry_time == rs->time[0] +
+                                           rs->time[1] + rs->time[2] + rs->time[3],
+                                           "runstate times don't add up");
 
                        switch (uc.args[1]) {
-                       case RUNSTATE_running...RUNSTATE_offline:
+                       case 0:
+                               evtchn_irq_expected = true;
+                               vinfo->evtchn_upcall_pending = 1;
+                               break;
+
+                       case RUNSTATE_runnable...RUNSTATE_offline:
+                               TEST_ASSERT(!evtchn_irq_expected, "Event channel IRQ not seen");
+                               if (!do_runstate_tests)
+                                       goto done;
                                rst.type = KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_CURRENT;
                                rst.u.runstate.state = uc.args[1];
                                vcpu_ioctl(vm, VCPU_ID, KVM_XEN_VCPU_SET_ATTR, &rst);
@@ -236,6 +289,10 @@ int main(int argc, char *argv[])
                                        sched_yield();
                                } while (get_run_delay() < rundelay);
                                break;
+                       case 0x20:
+                               TEST_ASSERT(evtchn_irq_expected, "Unexpected event channel IRQ");
+                               evtchn_irq_expected = false;
+                               break;
                        }
                        break;
                }
index a4bd1b0..697994a 100644 (file)
@@ -6,6 +6,7 @@ CONFIG_IPV6_MULTIPLE_TABLES=y
 CONFIG_NET_VRF=m
 CONFIG_BPF_SYSCALL=y
 CONFIG_CGROUP_BPF=y
+CONFIG_NET_ACT_CT=m
 CONFIG_NET_ACT_MIRRED=m
 CONFIG_NET_ACT_MPLS=m
 CONFIG_NET_ACT_VLAN=m
index d9eca22..de19eb6 100755 (executable)
@@ -3,7 +3,7 @@
 
 ALL_TESTS="gact_drop_and_ok_test mirred_egress_redirect_test \
        mirred_egress_mirror_test matchall_mirred_egress_mirror_test \
-       gact_trap_test"
+       gact_trap_test mirred_egress_to_ingress_test"
 NUM_NETIFS=4
 source tc_common.sh
 source lib.sh
@@ -13,10 +13,12 @@ tcflags="skip_hw"
 h1_create()
 {
        simple_if_init $h1 192.0.2.1/24
+       tc qdisc add dev $h1 clsact
 }
 
 h1_destroy()
 {
+       tc qdisc del dev $h1 clsact
        simple_if_fini $h1 192.0.2.1/24
 }
 
@@ -153,6 +155,49 @@ gact_trap_test()
        log_test "trap ($tcflags)"
 }
 
+mirred_egress_to_ingress_test()
+{
+       RET=0
+
+       tc filter add dev $h1 protocol ip pref 100 handle 100 egress flower \
+               ip_proto icmp src_ip 192.0.2.1 dst_ip 192.0.2.2 type 8 action \
+                       ct commit nat src addr 192.0.2.2 pipe \
+                       ct clear pipe \
+                       ct commit nat dst addr 192.0.2.1 pipe \
+                       mirred ingress redirect dev $h1
+
+       tc filter add dev $swp1 protocol ip pref 11 handle 111 ingress flower \
+               ip_proto icmp src_ip 192.0.2.1 dst_ip 192.0.2.2 type 8 action drop
+       tc filter add dev $swp1 protocol ip pref 12 handle 112 ingress flower \
+               ip_proto icmp src_ip 192.0.2.1 dst_ip 192.0.2.2 type 0 action pass
+
+       $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \
+               -t icmp "ping,id=42,seq=10" -q
+
+       tc_check_packets "dev $h1 egress" 100 1
+       check_err $? "didn't mirror first packet"
+
+       tc_check_packets "dev $swp1 ingress" 111 1
+       check_fail $? "didn't redirect first packet"
+       tc_check_packets "dev $swp1 ingress" 112 1
+       check_err $? "didn't receive reply to first packet"
+
+       ping 192.0.2.2 -I$h1 -c1 -w1 -q 1>/dev/null 2>&1
+
+       tc_check_packets "dev $h1 egress" 100 2
+       check_err $? "didn't mirror second packet"
+       tc_check_packets "dev $swp1 ingress" 111 1
+       check_fail $? "didn't redirect second packet"
+       tc_check_packets "dev $swp1 ingress" 112 2
+       check_err $? "didn't receive reply to second packet"
+
+       tc filter del dev $h1 egress protocol ip pref 100 handle 100 flower
+       tc filter del dev $swp1 ingress protocol ip pref 11 handle 111 flower
+       tc filter del dev $swp1 ingress protocol ip pref 12 handle 112 flower
+
+       log_test "mirred_egress_to_ingress ($tcflags)"
+}
+
 setup_prepare()
 {
        h1=${NETIFS[p1]}
index fdeb44d..3224651 100755 (executable)
@@ -118,16 +118,18 @@ gre_gst_test_checks()
        local addr=$2
        local proto=$3
 
-       $NS_EXEC nc $proto -kl $port >/dev/null &
+       [ "$proto" == 6 ] && addr="[$addr]"
+
+       $NS_EXEC socat - tcp${proto}-listen:$port,reuseaddr,fork >/dev/null &
        PID=$!
        while ! $NS_EXEC ss -ltn | grep -q $port; do ((i++)); sleep 0.01; done
 
-       cat $TMPFILE | timeout 1 nc $proto -N $addr $port
+       cat $TMPFILE | timeout 1 socat -u STDIN TCP:$addr:$port
        log_test $? 0 "$name - copy file w/ TSO"
 
        ethtool -K veth0 tso off
 
-       cat $TMPFILE | timeout 1 nc $proto -N $addr $port
+       cat $TMPFILE | timeout 1 socat -u STDIN TCP:$addr:$port
        log_test $? 0 "$name - copy file w/ GSO"
 
        ethtool -K veth0 tso on
@@ -155,8 +157,8 @@ gre6_gso_test()
 
        sleep 2
 
-       gre_gst_test_checks GREv6/v4 172.16.2.2
-       gre_gst_test_checks GREv6/v6 2001:db8:1::2 -6
+       gre_gst_test_checks GREv6/v4 172.16.2.2 4
+       gre_gst_test_checks GREv6/v6 2001:db8:1::2 6
 
        cleanup
 }
@@ -212,8 +214,8 @@ if [ ! -x "$(command -v ip)" ]; then
        exit $ksft_skip
 fi
 
-if [ ! -x "$(command -v nc)" ]; then
-       echo "SKIP: Could not run test without nc tool"
+if [ ! -x "$(command -v socat)" ]; then
+       echo "SKIP: Could not run test without socat tool"
        exit $ksft_skip
 fi
 
index d317245..9646bb9 100644 (file)
@@ -2548,72 +2548,36 @@ struct page *gfn_to_page(struct kvm *kvm, gfn_t gfn)
 }
 EXPORT_SYMBOL_GPL(gfn_to_page);
 
-void kvm_release_pfn(kvm_pfn_t pfn, bool dirty, struct gfn_to_pfn_cache *cache)
+void kvm_release_pfn(kvm_pfn_t pfn, bool dirty)
 {
        if (pfn == 0)
                return;
 
-       if (cache)
-               cache->pfn = cache->gfn = 0;
-
        if (dirty)
                kvm_release_pfn_dirty(pfn);
        else
                kvm_release_pfn_clean(pfn);
 }
 
-static void kvm_cache_gfn_to_pfn(struct kvm_memory_slot *slot, gfn_t gfn,
-                                struct gfn_to_pfn_cache *cache, u64 gen)
-{
-       kvm_release_pfn(cache->pfn, cache->dirty, cache);
-
-       cache->pfn = gfn_to_pfn_memslot(slot, gfn);
-       cache->gfn = gfn;
-       cache->dirty = false;
-       cache->generation = gen;
-}
-
-static int __kvm_map_gfn(struct kvm_memslots *slots, gfn_t gfn,
-                        struct kvm_host_map *map,
-                        struct gfn_to_pfn_cache *cache,
-                        bool atomic)
+int kvm_vcpu_map(struct kvm_vcpu *vcpu, gfn_t gfn, struct kvm_host_map *map)
 {
        kvm_pfn_t pfn;
        void *hva = NULL;
        struct page *page = KVM_UNMAPPED_PAGE;
-       struct kvm_memory_slot *slot = __gfn_to_memslot(slots, gfn);
-       u64 gen = slots->generation;
 
        if (!map)
                return -EINVAL;
 
-       if (cache) {
-               if (!cache->pfn || cache->gfn != gfn ||
-                       cache->generation != gen) {
-                       if (atomic)
-                               return -EAGAIN;
-                       kvm_cache_gfn_to_pfn(slot, gfn, cache, gen);
-               }
-               pfn = cache->pfn;
-       } else {
-               if (atomic)
-                       return -EAGAIN;
-               pfn = gfn_to_pfn_memslot(slot, gfn);
-       }
+       pfn = gfn_to_pfn(vcpu->kvm, gfn);
        if (is_error_noslot_pfn(pfn))
                return -EINVAL;
 
        if (pfn_valid(pfn)) {
                page = pfn_to_page(pfn);
-               if (atomic)
-                       hva = kmap_atomic(page);
-               else
-                       hva = kmap(page);
+               hva = kmap(page);
 #ifdef CONFIG_HAS_IOMEM
-       } else if (!atomic) {
-               hva = memremap(pfn_to_hpa(pfn), PAGE_SIZE, MEMREMAP_WB);
        } else {
-               return -EINVAL;
+               hva = memremap(pfn_to_hpa(pfn), PAGE_SIZE, MEMREMAP_WB);
 #endif
        }
 
@@ -2627,27 +2591,9 @@ static int __kvm_map_gfn(struct kvm_memslots *slots, gfn_t gfn,
 
        return 0;
 }
-
-int kvm_map_gfn(struct kvm_vcpu *vcpu, gfn_t gfn, struct kvm_host_map *map,
-               struct gfn_to_pfn_cache *cache, bool atomic)
-{
-       return __kvm_map_gfn(kvm_memslots(vcpu->kvm), gfn, map,
-                       cache, atomic);
-}
-EXPORT_SYMBOL_GPL(kvm_map_gfn);
-
-int kvm_vcpu_map(struct kvm_vcpu *vcpu, gfn_t gfn, struct kvm_host_map *map)
-{
-       return __kvm_map_gfn(kvm_vcpu_memslots(vcpu), gfn, map,
-               NULL, false);
-}
 EXPORT_SYMBOL_GPL(kvm_vcpu_map);
 
-static void __kvm_unmap_gfn(struct kvm *kvm,
-                       struct kvm_memory_slot *memslot,
-                       struct kvm_host_map *map,
-                       struct gfn_to_pfn_cache *cache,
-                       bool dirty, bool atomic)
+void kvm_vcpu_unmap(struct kvm_vcpu *vcpu, struct kvm_host_map *map, bool dirty)
 {
        if (!map)
                return;
@@ -2655,45 +2601,21 @@ static void __kvm_unmap_gfn(struct kvm *kvm,
        if (!map->hva)
                return;
 
-       if (map->page != KVM_UNMAPPED_PAGE) {
-               if (atomic)
-                       kunmap_atomic(map->hva);
-               else
-                       kunmap(map->page);
-       }
+       if (map->page != KVM_UNMAPPED_PAGE)
+               kunmap(map->page);
 #ifdef CONFIG_HAS_IOMEM
-       else if (!atomic)
-               memunmap(map->hva);
        else
-               WARN_ONCE(1, "Unexpected unmapping in atomic context");
+               memunmap(map->hva);
 #endif
 
        if (dirty)
-               mark_page_dirty_in_slot(kvm, memslot, map->gfn);
+               kvm_vcpu_mark_page_dirty(vcpu, map->gfn);
 
-       if (cache)
-               cache->dirty |= dirty;
-       else
-               kvm_release_pfn(map->pfn, dirty, NULL);
+       kvm_release_pfn(map->pfn, dirty);
 
        map->hva = NULL;
        map->page = NULL;
 }
-
-int kvm_unmap_gfn(struct kvm_vcpu *vcpu, struct kvm_host_map *map, 
-                 struct gfn_to_pfn_cache *cache, bool dirty, bool atomic)
-{
-       __kvm_unmap_gfn(vcpu->kvm, gfn_to_memslot(vcpu->kvm, map->gfn), map,
-                       cache, dirty, atomic);
-       return 0;
-}
-EXPORT_SYMBOL_GPL(kvm_unmap_gfn);
-
-void kvm_vcpu_unmap(struct kvm_vcpu *vcpu, struct kvm_host_map *map, bool dirty)
-{
-       __kvm_unmap_gfn(vcpu->kvm, kvm_vcpu_gfn_to_memslot(vcpu, map->gfn),
-                       map, NULL, dirty, false);
-}
 EXPORT_SYMBOL_GPL(kvm_vcpu_unmap);
 
 struct page *kvm_vcpu_gfn_to_page(struct kvm_vcpu *vcpu, gfn_t gfn)